Presentation is loading. Please wait.

Presentation is loading. Please wait.

Implementation of Pong over VGA on the Nexys 4 FPGA

Similar presentations


Presentation on theme: "Implementation of Pong over VGA on the Nexys 4 FPGA"— Presentation transcript:

1 Implementation of Pong over VGA on the Nexys 4 FPGA
EECS 443: Digital Systems Design Final Project Presentation Austin Cosner and David Easley 5/3/2016

2 Presentation Overview
Project Introduction VGA Tutorial Project Implementation Project Demo Wrap-Up

3 Project Introduction Project Objective Advantages of Pong
Game using VGA Advantages of Pong Easy Implementation Rectangular Objects Basic Physics

4 VGA Tutorial Basic VGA Components H Sync (Horizontal Sync)
V Sync (Vertical Sync) Colors On the Nexys 4 Board 4 bits per color RGB

5 VGA Tutorial H Sync and V Sync Signal Explanation

6 VGA Tutorial Sync Signal Components Sync Pulse Back Porch Front Porch
Visible Display Area

7 VGA Tutorial RGB Signal Explanation 4 bits for each RGB Component
12 bit Color total 4096 Color Combinations Creates a Voltage 0V to 0.7V Color is sampled per pixel

8 VGA Tutorial Timing Example Hz)

9 Project Implementation
7 Modules

10 Project Implementation (G1 : CLK Wiz)
Module 1 : Clocking Wizard Xilinx IP Found in IP Catalog Operation 100 MHz => 40 MHz Generate Pixel Clock

11 Project Implementation (G2 : VGA Contr.)
Module 2 : VGA Controller Custom Design Backbone Module Operation Create H Sync, V Sync and Video On Signals Generate Signals and Pixel Counters

12 Project Implementation (G2 : VGA Contr.)
Main Process 2 Counters Horizontal Counter Range 0 to 1055 Vertical Counter Range 0 to 627 Horizontal Visible 216 to 1016 Vertical Visible 29 to 629

13 Project Implementation (G3 : Pixel Gen.)
Module 3 : Pixel Generator Custom Design Backbone Module Operation Generate RGB Signals Generate RGB Signals based on VGA Controller Counters

14 Project Implementation (G3 : Pixel Gen.)
Object Drawing While the current pixel being drawn is within the bounds of an object, set that object to the “on” state Constants (for permanent bounds) and signals (for movement)

15 Project Implementation (G3 : Pixel Gen.)
Color Selection Processes Decisions made on a per-pixel basis Aligned with the VGA clock With-select-when dependent on what pixel is currently in question

16 Project Implementation (G3 : Pixel Gen.)
Paddle Movement Reset to middle of side Button press sends paddle up/down Paddle movement signals used in ball reflection

17 Project Implementation (G3 : Pixel Gen.)
Ball Movement Reset to center, starting velocity randomized (see random generator later) Next state logic advancement at beginning of process iteration

18 Project Implementation (G3 : Pixel Gen.)
Ball Movement ctd. Result of ball impact on paddle varies on paddle movement Same direction movement = higher velocity ball Opposite direction slows and changes ball’s vertical movement

19 Project Implementation (G3 : Pixel Gen.)
Ball Movement ctd. Ball reflects off of the screen bounds and the wall based on current position

20 Project Implementation (G3 : Pixel Gen.)
Ball Movement ctd. Prevent ball’s next position from going through the paddle or wall

21 Project Implementation (G4 : CLK Divider)
Module 4 : Clock Divider Custom Design Support Module Operation Create the Animation Clock Used in: Paddle/Ball Movement

22 Project Implementation (G4 : CLK Divider)
Main Process Simple Counter Generic Input Argument Max Count Val 50% Duty Cycle Count to Half

23 Project Implementation (G5 : State Mach.)
Module 5 : State Machine Contrl. Custom Design Backbone Module Operation Control the Game State and Internal Signals Used in: Scorekeeping Object Reset

24 Project Implementation (G5 : State Mach.)
Basic State Diagram Simple FSM, only three states Returns to idle state upon reset signal Point scored during game adds to count and returns to idle

25 Project Implementation (G5 : State Mach.)
Main Process Basic case statement State iteration through conditional signal assignment

26 Project Implementation (G6 : 7-Seg Contr.)
Module 6 : 7-Segment Controller Custom Design Support Module Operation Display the Score for the game on the 7-Segments Used in: Score Counter Output

27 Project Implementation (G6 : 7-Seg Contr.)
Main Process With...Select MUX Build Cathode String Hardcoded Anode String

28 Project Implementation (G7 : RNG)
Module 7 : Random Number Gen. Custom Design Support Module Operation Create 2 pseudo-random numbers Used in: Velocity variation

29 Project Implementation (G7 : RNG)
Two Processes Each process is triggered off of a different VGA clock Pseudo random at its finest Two counters for 6 states (0-5) Mapped to speeds via with-select-when statements

30 Project Demo

31 Wrap-Up Future Work/Improvements 2 players Round Ball Variable Speed
Improved Input Display Buffer

32 Wrap-Up Thanks for listening! Questions?


Download ppt "Implementation of Pong over VGA on the Nexys 4 FPGA"

Similar presentations


Ads by Google