Upload
cleopatra-chase
View
215
Download
0
Embed Size (px)
Citation preview
ECE 448: Lab 5
VGA Display. Breaking-Bricks.
Organization and Grading
Flexibility in the Second Part of the Semester
• You can work on all lab assignments from Part II of the course
either individually or in groups of two students.
• The number of required and bonus tasks, as well as
the grading scheme will be different for individuals and
the groups of two.
• In case of the group work, both students are expected to
be intimately familiar with the entire solution to the given
lab assignment and the entire lab report.
This knowledge will be verified during the experiment
demonstration and the same grade will be applied to
the entire team.
Flexibility in the Second Part of the Semester
Lab 4: VGA display (2 weeks) – 6 points
Lab 5: DSP & FPGA Embedded Resources (2 weeks) – 6 points
Lab 6: PicoBlaze & Serial Communication (3 weeks) – 6 points
Lab 6a: Logic Analyzer (in class) – 2 points
Lab 4: VGA display (3 weeks) – 6 points
Lab 5: DSP & FPGA Embedded Resources (4 weeks) – 6 points
Lab 6a: Logic Analyzer (in class) – 2 points
Schedule A:
Schedule B:
Total: 20 points
Total: 14 points
VGA Background
Video Graphic Array (VGA)• Resolution: 640x480• Display: 16 colors (4 bits), 256 colors (8 bits)• Refresh Rate: 25Hz, 30Hz, 60Hz (frames / second)• RGB: Red, Green and Blue colors
Horizontal TraceHorizontal Flyback
Vertical Flyback
0 639
479
0
VGA Monitor
VGA Control Signal Timing
Resolution640x480
32 us
30.08 us
26.24 us
25.6 us
32 us
30.08 us
26.24 us
32 us
30.08 us
15.36 ms
15.68 ms
16.8ms
15.744 ms
VGA Control Signal Timing
Resolution640x480
32 us
30.08 us
26.24 us
640 clock cycles
32 us
30.08 us
656 clock cycles
800 clock cycles
752 clock cycles
480 lines
490 lines
525 lines
492 lines
Frequency 25Mhz
VGA 15 Pin
PINs on BoardNET "HS" LOC = "J14" | DRIVE = 2 | PULLUP ; NET "VS" LOC = "K13" | DRIVE = 2 | PULLUP ;NET "OutRed<2>" LOC = "F13" | DRIVE = 2 | PULLUPNET "OutRed<1>" LOC = "D13" | DRIVE = 2 | PULLUP ; NET "OutRed<0>" LOC = "C14" | DRIVE = 2 | PULLUP ; We do not
use this pin. NET "OutGreen<2>" LOC = "G14" | DRIVE = 2 | PULLUP;NET "OutGreen<1>" LOC = "G13" | DRIVE = 2 | PULLUP ;NET "OutGreen<0>" LOC = "F14" | DRIVE = 2 | PULLUP ; We do not
use this pin.NET "OutBlue<2>" LOC = "J13" | DRIVE = 2 | PULLUP ; NET "OutBlue<1>" LOC = "H13" | DRIVE = 2 | PULLUP ;
Introduction to Lab 5
Task 1: Display Ball (in Blue color) and Background (in Cyan color)
(for individuals: required, 1 points; for teams: required, 0.75 points)
• Draw a ball in the center of the screen
Task 1: Display Ball (in Blue color) and Background (in Cyan color)
(for individuals: required, 1 points; for teams: required, 0.75 points)
• Ball Fill: implements equation [(X-X0)2+(Y-Y0)2< R2]• Color Generator: Selects colors for ball and background• VGA Controller: Sync generator (may use Digilent)
VGAController
ColorGenerator
H COUNT
V COUNT
H SYNC
V SYNC
H SYNC
V SYNC
RED
GREEN
BLUE
RED
GREEN
BLUE
FILL
2
2
2
11
11
11
11
X
Y
X0
Y0320
240
FILL
BLANK
BLANK
CIRCLEFILL
X
Y
X0
Y0
FILL
X0
Y0
X
Y
Task 2: Display Pedal bar (in Red color) (for individuals: required, 1 points; for teams: required, 0.75 points)
• Add a pedal bar (in red color). • Adjust the width of pedal = 5 pixels (in x-axis) and height = 60
pixels (in y-axis).
Task 3: Display Boundary (in Green color)(for individuals: required, 1 points; for teams: required, 0.75 points)
• Add a boundary (in green color). • Adjust the boundary thickness = 3 pixels, length = 634 pixels (in x-axis)
and height = 474 pixels (in y-axis).
Task 4: Ball and Pedal bar movements(for individuals: required, 1 points; for teams: required, 0.75 points)
• Move the ball automatically to any point inside the boundary. • The ball should bounce back when it hits the boundary or pedal bar and must not exit the
boundary. • The movement of pedal bar is controlled by using switch 0 ( High: Up, Low: Down)
Task 4: Ball and Pedal bar movements(for individuals: required, 1 points; for teams: required, 0.75 points)
• Clock divider: 5ms per step, pulsed output (high for 1 clock)• Count: [NEXT = PREV +/- 4*(STEP+1)] • Automatic Count: limit out to within boundary (use generic)• Duplicate for Y-axis (Clock Divider shared by X and Y-axis)
Task 5: Ball speed and Pedal bar sizes(for individuals: required, 1 points; for teams: required, 1 points)
• Switches 1-2 select the step size to change the balls speed (in both horizontal and vertical direction). • 3 speed configurations for ball (1X, 2X, 3X)
• Switch 3-4 select the pedal bar sizes • 3 size configurations for pedal bar (25%, 50% and 100%)
Task 6: Displaying Bricks (for individuals: required, 1 points; for teams: required, 1 points)
• Add 2 bricks, 4 bricks each in three vertical columns (in magenta color). • Adjust the width of each brick = 5 pixels (in x-axis) and height as per
your requirement (see figure above).
Task 7: Bricks disappearing when hit by a ball (for individuals: bonus, 2 points; for teams: required, 1 points)
• when ball hits any of the bricks, it should disappear.
Task 8 : Display score on Seven segment display(for teams only: bonus, 2 points)
•Display the score on seven segment display. •Whenever the ball hits any of the bricks, increment total score. •When all of the bricks are broken, pause the game and display DONE on seven segment display.
Switch Functions• Switch[0] Up and down movement of Pedal bar
• Switch[2:1] Step Size (in both X and Y-axis)
– 00: step size = 4 (1X: default speed)– 01: step size = 8 (2X: twice the speed)– 10: step size = 12 (3X: three times the speed)
• Switch[4:3] Pedal bar sizes
– 00: 100% of pedal size (default size)– 01: 50% of pedal size (half size)– 10: 25% of pedal size (quarter of actual size)