ECE 448 Lab 4 VGA Display The Frogger
ECE 448: Lab 4 VGA Display The Frogger
Flexibility in the Second Part of the Semester Schedule A: Lab 4: VGA display (2 weeks) – 8 points Lab 5: Computer Graphics (2 weeks) – 8 points Lab 6: Pico. Blaze System (2 weeks) – 8 points Lab 7: Logic Analyzer (in class) – 2 bonus points Total: 24+2 points Schedule B: Lab 4: VGA display (3 weeks) – 8 points Lab 5: Computer Graphics or Lab 6: Pico. Blaze System Lab 7: Logic Analyzer (3 weeks) – 8 points (in class) – 2 bonus points Total: 16+2 points
Flexibility in the Second Part of the Semester Schedule A+: • Intended for students who do exceptionally well in the first part of the semester ( ≥ 90% of points for Labs 1 -3) • An open-ended project proposed by students, the TAs, or the instructor • Can be done individually or in groups of two students • Schedule: Detailed Specification (1 week) Milestone 1 (2 weeks) Milestone 2 (2 weeks) Final Report & Deliverable (1 week) Total: 25 points
Expected Project Tasks Schedule A+: 1. Use of at least one complex input/output device • VGA display • Keyboard or Mouse (USB-HID) • Ethernet, etc. 2. Use of on-chip embedded resources: BRAMs, DSP units or External on-board memory or Soft microcontroller core (e. g. Picoblaze) 3. (bonus) Use of PMOD Accessory Boards implementing additional functions, e. g. , A/D, D/A, motor drivers, sensors, cameras.
Lab 4 Exercises
Reading • P. Chu, FPGA Prototyping by VHDL Examples Chapter 12, VGA Controller I: Graphic • Nexys 3 Reference Manual VGA Port, pages 15 -17 ECE 448 – FPGA and ASIC Design with VHDL 6
Lab 4 Exercise 1 Displaying synchronization signals on the oscilloscope 7
Lab 4 Exercise 1: Tasks • Develop a testbench for the circuit, described in the figure on the previous slide. • Perform functional simulation, displaying ALL ports of vga_sync component. • Synthesize and implement the top-level circuit using provided UCF file • Perform timing simulation, displaying ALL ports of vga_sync component. • Perform experimental testing using oscilloscope, displaying clk, hsync, vsync. 8
Lab 4 Exercise 2 • Resolution: 640 x 480 • Display: 8 colors (3 bits), 16 colors (4 bits), 64 colors (6 bits), 256 colors (8 bits) • Refresh Rate: 25 Hz, 30 Hz, 60 Hz (frames / second) 9
Interface
Use of switches
Configuration : 1
Configuration : 2
Configuration : 3
Configuration : 4
Configuration : 5
Configuration : 6
Configuration : 7
Configuration : 8
Specification of coordinates of three objects assuming sw(4)=0
Specification of colors of three objects
Specification of dimensions of the ball
Introduction to Lab 4
Game Objects and Background
Task 1: Create Background (Points: 20%) • Maze Color: Blue, Cyan, Black, and yellow • Color Generator: Selects colors for the background • VGA Controller: Sync generator
Task 2: Display Bricks (Points: 10%) • Brick Color: Magenta • The Bricks should be stationary objects placed at the top of water zone shown above.
Task 3: Display and create movement of “logs” (Points: 15%) • • The upper row of logs should move horizontally to the right in a wrap-around manner. The lower row of logs should have the exact same movement pattern, but in the opposite direction, i. e. , to the left.
Task 4: Display and create movement of character “cars” (Points: 15%) • The cars should also move in a wrap-around manner, i. e. , toward left for the upper row of the cars and toward right for the lower row of the cars.
Task 5: Introduce “The Frog” (Points: 25%) • The movement of the Frog should be controlled by four push buttons (BTNU for Up, BTND for Down, BTNL for Left, and BTNR for Right). • The Frog should move in the direction represented by the button pressed. • The goal of the Frog is to reach any of the magenta bricks located at the top without colliding with any of the cars and without falling into the water.
Task 5 : Displaying score and number of lives left on VGA display (Points: 15%) • Display the score and number of lives on VGA display. • Every forward move on the street should result in 10 points. • Each time the Frog successfully rides on any of the logs, 20 points should be added to the total score. • The Frog should have three lives initially. Every collision with a car or fall into the water should result in the loss of one life. • When the Frog reaches any of the Bricks, this event should pause the game, and YOU WON should be displayed on the VGA display.
- Slides: 30