Download presentation
Presentation is loading. Please wait.
Published byColleen Hill Modified over 8 years ago
1
ECE 448: Lab 4 VGA Display Snake Game
2
Flexibility in the Second Part of the Semester Lab 4: VGA display (2 weeks) – 8 points Lab 5: Computer Graphics (2 weeks) – 8 points Lab 6: PicoBlaze System (2 weeks) – 8 points Lab 7: Logic Analyzer (in class) – 2 bonus points Lab 4: VGA display (3 weeks) – 8 points Lab 5: Computer Graphics or Lab 6: PicoBlaze System (3 weeks) – 8 points Lab 7: Logic Analyzer (in class) – 2 bonus points Schedule A: Schedule B: Total: 24+2 points Total: 16+2 points
3
Flexibility in the Second Part of the Semester 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) Schedule A+: Total: 25 points
4
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.
5
Lab 4 Exercises
6
6ECE 448 – FPGA and ASIC Design with VHDL Reading P. Chu, FPGA Prototyping by VHDL Examples Chapter 12, VGA Controller I: Graphic Nexys3 Reference Manual VGA Port, pages 15-17 Nexys4 Reference Manual VGA Port, pages 13-17
7
7 Lab 4 Exercise 1 Displaying synchronization signals on the oscilloscope
8
8 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. Lab 4 Exercise 1: Tasks
9
9 Lab 4 Exercise 2 Resolution: 640x480 Display: 8 colors (3 bits), 16 colors (4 bits), 64 colors (6 bits), 256 colors (8 bits) Refresh Rate: 25Hz, 30Hz, 60Hz (frames / second)
10
Interface
11
Use of switches
12
Configuration : 1
13
Configuration : 2
14
Configuration : 3
15
Configuration : 4
16
Configuration : 5
17
Configuration : 6
18
Configuration : 7
19
Configuration : 8
20
Specification of coordinates of three objects assuming sw(4)=0
21
Specification of colors of three objects
22
Specification of dimensions of the ball
23
Introduction to Lab 4
24
Game Objects and Background
25
Task 1: Create Background (Points: 15%) Snake Color: Black and Red Color Generator: Selects colors for the background VGA Controller: Sync generator
26
Task 2: Snake Movement(Points:20%) The game should reset when the snake hits the boundary. The snake must not cross the boundary. Movement of snake is always ON. The Red arrows depict movement of the Snake; they should not be drawn on the screen.
30
Task 3: Snake speed (Points: 5%) Switches 0-1 select the step size to change the Snake’s speed (in both horizontal and vertical direction). position “00” means step size = 4, “01” means step size = 8, and “10” means step size = 12.
31
Task 4: Displaying Boundaries and Diamonds (Points:25%) The Snake should be restricted to stay within the boundaries. Whenever the Snake touches any of the Diamonds they should disappear from the screen.
32
Task 5: Displaying score and rules on VGA display (Points:25%) Whenever the Snake touches any of the Red Diamonds, the Score should be incremented and displayed on the screen. Whenever the Snake touches the Boundary the Game has to restart and the score must be reset to ‘0’.
33
Task 6: Displaying Text on the Screen (Points: 10%) When the Snake eats all food, then you should display “You Won!” in the Green Color on the screen.
34
Bonus Task 1: Adding movable boundaries (Points: 10%) Add two small blue inner boundaries which act exactly the same like the outside black boundary. These lines move up and down in constant speed, as shown in the figure below. Whenever the Snake touches the Boundary the Game has to restart and the score must be reset to ‘0’.
35
Bonus Task 1: : Adding movable boundaries(2)
36
Bonus Task 1:Adding movable boundaries(3)
37
Bonus Task 2:Adding Blinking Stars (Points: 10%) When the Snake eats all food, you should display “You Won!”, with blinking stars, for 5 Seconds as shown below.
38
Lab 3 Demos
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.