2. CSIR-NAL
MTechProjectReview
2
Title of Project Thesis
Design and Development of
Graphics Processing Unit (GPU) Framework
on FPGA
Target FPGA - Spartan-6
XC6SLX45T-3FGG484
Internal Guide
Mr. JAYAKUMAR EP
Asst. Professor
Department of ECE
NIT, Calicut
External Guide
Dr. ANANDA CM
Sr. Principal Scientist
Head, Aerospace Electronics
Systems Division
CSIR-NAL, Bangalore
3. CSIR-NAL
MTechProjectReview
3
Agenda
Scope & Objective of the Project
System Overview
Triple Video Buffers
DDR3 Memory Controller Integration
Host Application Development
Results & Conclusion
Summary
Rendering Algorithm
Video Demonstration
Design Blocks Interface
8. CSIR-NAL
MTechProjectReview
8
XGA_
Generator
Clk_65 RGB
HSync
VSync
DDR3
Memory
RGB with control signals
generated for fixed pattern/color
Display pixels has been feed from
DDR3 memory
Graphics Controller: Converting Bitmaps
into signals for screen with control
signals for chosen resolution
Pixel Mapping: Each Pixel of the screen
mapped to a DDR3 memory location
Active Data
11. CSIR-NAL
MTechProjectReview
11
DDR3 Memory Read & Write Blocks
Input
Wrapper
Output
Wrapper
Spartan6 FPGA
MIG Wrapper
Memory
Controller
CORECmd_
FIFO
DATA
FIFO
DDR3
Memory
Memory Interface is a free software tool used to
generate memory controllers and interfaces
for Xilinx FPGAs
Top Design
Read & Write
Logics
Xilinx’s Memory Interface Controller Physical Component
in Board
Command FIFO holds
Starting Address & Length
of Data
Data FIFO holds Pixel color
(RGB)
12. CSIR-NAL
MTechProjectReview
12
FSM for DDR3 Memory Access
START
Initialize all
Counters/
Register
Memory
Calibration
Status
Send Command to
Controller for Writing to
DDR3
Controller’s
Data FIFO
Empty
Write into Data FIFO
Increment Address to Next
Location
Write Finish
Status
STOP
Completed
Not
Completed
Empty
Not
Empty
Finished
Not
Finished
START
Initialize all
Counters/
Register
Memory
Calibration
Status
Send Command to
Controller for Reading
DDR3
Controller’s
Data FIFO
Full
Read Data FIFO Content
Increment Address to Next
Location
Read Finish
Status
STOP
Completed
Not
Completed
FULL
Not
FULL
Finished
Not
Finished
WRITE READ
17. CSIR-NAL
MTechProjectReview
17
Triple Display Buffer Design – How It Works?
Operational Buffer
Memory Region
Display Buffer1
Display Buffer2
Display Buffer3
Port 2
Colour Data/
Command Handler
Port 5
Tri-Buffer
Display
Wrapper
Port 3
Port 4
Flush Logic
Wrapper
On
Vsync_Trigger
On Flush
Trigger
XGA Video
Generator
Operational Buffer: Dedicated Buffer for drawing
the frame content
Display Buffers: Buffer the frame for display
34. CSIR-NAL
MTechProjectReview
34
Summary
GPU frame work on FPGA
has been realized
successfully for Avionics
Applications.
IEEE Conference Paper
Acceptance Notification Received
Recent Trends in Electronics,
Information & Communication
Technology (RTEICT 2016)
35. CSIR-NAL
MTechProjectReview
35
To Fulfill Real World GPU Demands more functionalities like:
Derived objects relevant for avionics field.
Anti-Aliasing (adjusting pixel intensities along the line path to smooth raster
lines)
Blending
Overlay Additional Information on top current frame
Multi-Layer Implementation with addition of memory buffers
Pipelining (Process multiple commands instead of single at a time)
Migrate Rasterization functionalities also in FPGA (HDL) program
Future Work - Extended
36. CSIR-NAL
MTechProjectReview
36
[1] Rapid Prototyping of Digital Systems, SOPC Edition, James O. Hamblen, Tyson S. Hall,
Michael D. Furman, Springer – 2008 Edition.
[2] www.ijettjournal.org/volume-14/number-6/IJETT-V14P251.pdf
[3] http://blog.digitalelectronics.co.in/2008/09/simple-xvga-1024x768-controller-in.html
[4] is.muni.cz/th/150871/fi_m/Masters_Thesis.pdf
[5] http://www.edn.com/electronics-blogs/dev-monkey-blog/4408548/Minimizing-Video-
Processing-Design-Time-with-FPGA-Development-Kits-and-Reference-Designs-4408548
[6] www.xilinx.com/support/documentation/user_guides/ug388.pdf
[7] https://docs.oracle.com/javase/tutorial/extra/fullscreen/doublebuf.html
References
40. CSIR-NAL
MTechProjectReview
40
Display
Controller
Board
* For LVDS Signal
Generation in
Display Resolution
Format
* Resolution based
UP or DOWN
scaling
Video
Design
Controller
DVI Chip on
FPGA
Board
HDMI VGA
LVDS
Signal is
Serial
Data of
6 lines
CLK
Parallel Data gets converted into
Serial Data by using LVDS Format to
avoid delay
VSync
HSync
Parallel
Data LCD Panel
Controller
(It has V_count &
H_count resets
based on Vsync &
Hsync signals)
CLK
DISPLAY PANELFPGA Board
RGB
VSync
Rest of
Designs
Interfaces: Display Controller Design and Display Panel Controllers
41. CSIR-NAL
MTechProjectReview
41
architecture Behavioral of VSync_Postive_Edge is
signal v_signal:std_logic:='0';
begin
p:process(clk,V_sync_in)
begin
if(clk = '1' and
clk'event ) then
v_signal <= V_sync_in;
end if;
end process p;
V_sync_pos_out <= not(v_signal) and V_sync_in;
Flip
Flop
architecture Behavioral of VSync_Postive_Edge is
signal v_signal:std_logic:='0';
begin
p:process(clk,V_sync_in)
begin
if(clk = '1' and
clk'event ) then
v_signal <= V_sync_in;
end if;
end process p;
V_sync_pos_out <= v_signal and not (V_sync_in);
Flip
Flop
Edge (Positive & Negative) Detect Process
46. CSIR-NAL
MTechProjectReview
46
Triple Display Buffer Design – With Break Point
Operational Buffer
Memory Region
Display Buffer1
Display Buffer2
Display Buffer3
Port 2Input Wrapper
Port 5
Tri-Buffer
Display
Wrapper
Port 3
Port 4
Flush Logic
Wrapper
On
Vsync_Trigger
XGA Video
Generator
Set pattern -1
Pattern -1
47. CSIR-NAL
MTechProjectReview
47
CSIR-NAL
Operational Buffer
Memory Region
Display Buffer1
Display Buffer2
Display Buffer3
Port 2Input Wrapper
Port 5
Tri-Buffer
Display
Wrapper
Port 3
Port 4
Flush Logic
Wrapper
On
Vsync_Trigger
On Flush
Trigger
Flush pattern -1
XGA Video
Generator
Pattern -1
Pattern -1
Pattern -1
Pattern -1
Triple Display Buffer Design – With Break Point
48. CSIR-NAL
MTechProjectReview
48
CSIR-NAL
Operational Buffer
Memory Region
Display Buffer1
Display Buffer2
Display Buffer3
Port 2Input Wrapper
Port 5
Tri-Buffer
Display
Wrapper
Port 3
Port 4
Flush Logic
Wrapper
On
Vsync_Trigger
XGA Video
Generator
Set pattern -2
Pattern -2
Pattern -1
Triple Display Buffer Design – With Break Point
49. CSIR-NAL
MTechProjectReview
49
CSIR-NAL
Operational Buffer
Memory Region
Display Buffer1
Display Buffer2
Display Buffer3
Port 2Input Wrapper
Port 5
Tri-Buffer
Display
Wrapper
Port 3
Port 4
Flush Logic
Wrapper
On
Vsync_Trigger
On Flush
Trigger
Flush pattern -2
XGA Video
Generator
Pattern -2
Pattern -2
Pattern -2
Pattern -2
Triple Display Buffer Design – With Break Point
50. CSIR-NAL
MTechProjectReview
50
CSIR-NAL
Operational Buffer
Memory Region
Display Buffer1
Display Buffer2
Display Buffer3
Port 2Input Wrapper
Port 5
Tri-Buffer
Display
Wrapper
Port 3
Port 4
Flush Logic
Wrapper
On
Vsync_Trigger
XGA Video
Generator
Set pattern -3
Pattern -3
Pattern -2
Triple Display Buffer Design – With Break Point
51. CSIR-NAL
MTechProjectReview
51
CSIR-NAL
Operational Buffer
Memory Region
Display Buffer1
Display Buffer2
Display Buffer3
Port 2Input Wrapper
Port 5
Tri-Buffer
Display
Wrapper
Port 3
Port 4
Flush Logic
Wrapper
On
Vsync_Trigger
On Flush
Trigger
Flush pattern -3
XGA Video
Generator
Pattern -3
Pattern -3
Pattern -3
Pattern -3
Triple Display Buffer Design – With Break Point
52. CSIR-NAL
MTechProjectReview
52
CSIR-NAL
Operational Buffer
Memory Region
Display Buffer1
Display Buffer2
Display Buffer3
Port 2Input Wrapper
Port 5
Tri-Buffer
Display
Wrapper
Port 3
Port 4
Flush Logic
Wrapper
On
Vsync_Trigger
XGA Video
Generator
Set pattern -4
Pattern -4
Pattern -3
Triple Display Buffer Design – With Break Point
53. CSIR-NAL
MTechProjectReview
53
CSIR-NAL
Operational Buffer
Memory Region
Display Buffer1
Display Buffer2
Display Buffer3
Port 2Input Wrapper
Port 5
Tri-Buffer
Display
Wrapper
Port 3
Port 4
Flush Logic
Wrapper
On
Vsync_Trigger
On Flush
Trigger
Flush pattern -4
XGA Video
Generator
Pattern -4
Pattern -4
Pattern -4
Pattern -4
Triple Display Buffer Design – With Break Point
57. CSIR-NAL
MTechProjectReview
57
XGA Resolution 1024 x 768: Control Signals
Populate Color Pixel Data in ACTIVE AREA to Make them Visible in a Frame
H_Count
V_Count
V_Sync is indication of START of FRAME
59. CSIR-NAL
MTechProjectReview
59
64 Data
64 Data
64 Data
64 Data
64 Data
One Shot Write
of 64 Data
St_addr. To write
Keep
incrementing 64
every time up to
limit of total Pixel
value
Memory
Controller
DATA FIFO
(64 Depth)
CMD
FIFO
Port 2
Memory
Controller
DATA FIFO
(64 Depth)
CMD
FIFO
Port 3
St_addr. To Read
Keep
incrementing 64
every time up to
limit of total Pixel
value
One Shot Read
of 64 Data
One Shot Write
of 64 Data
St_addr. To write
Keep
incrementing 64
every time up to
limit of total Pixel
value
St_addr. To Read
Keep
incrementing 64
every time up to
limit of total Pixel
value
One Shot Read
of 64 Data
DDR3 Memory Read & Write Sequence
Input
Wrapper
Output
Wrapper
WRITE READ
60. CSIR-NAL
MTechProjectReview
60
DDR3 Memory
GPU Engine
What is Triple Display Frame Buffer?
Frame Buffer Display
Operational Buffer: Dedicated Buffer for drawing the
frame content
Display Buffers: Buffer the frame for display
We can’t clear the display between each frame of data written into display; So last frame of information
gets retained along with current frame of information, may lead to flicker
Chances of have Half-screen with old data and remaining with new data; sometimes we may miss
some frames in between in case of FPS is higher
Layering implementation is impossible with this single operational buffer, which is mandate for
aerospace display application development
If 1 Buffer
If 2 Buffers
If 3 Buffers
Generally, GPU generates 24 FPS, its very hard to witness the function of triple buffer operation.
Once Vertical Sync. Triggered from controller, display buffers gets read by tri_buffer_display logic. Triple Buffering to prevent FPS drops related to enabling Vsync; help to both remove tearing while also preventing the significant FPS drop encountered when VSync is enabled
Operational Buffer: Time Depends on what primitives we draw; Display Buffer: Clear/Flush timing is fixed.