This lab took the bouncing ball from Lab 3 and built it into the classic video game PONG. The game is displayed on a VGA display and is controlled by an analog potentiometer connected to an analog to digital converter. Just as in Lab 3,
DSD Lab 6
pong.vhd
This source node replaces the old VGA sync file. It sets all of the ports and outputs and calls the other source files.
DSD - Lab 6 adc
adc_if.vhd
This handles the analog to digital conversion needed to use the potentiometer as a controller
ball_n_bat
ball_n_bat.vhd
This code draws the bat and controls how it interacts with the ball. It takes values from the ADC output to control the movement of the bat.
ball
ball.vhd
This code draws the ball and controls how it interacts with the edges of the frame.
vga_sync
vga_sync.vhd
This creates timing signals for the video and sets the horizontal and vertical resolution to be displayed. It keeps the video output in time with the clock and refresh rate.
pong.xdc
pong.xdc
This code creates a clock for the FPGA to use and configures all the board and VGA pins needed by the circuit for interfacing with hardware.