In this Project we will develop a pong game and display it on a monitor. We will carry the project on the FPGA and will send the video to the monitor via VGA interface. Our video resolution will be 640x480 and eight colors.
We will design two module in order to develop the Pong Game. First module called SYNC MODULE will generate the HS (Horizontal Synchronization), VS(Vertical Synchronization) and the control signals which is used by second module. Second module called IMG GEN will generate the all necessary images is used in the pong game. Â Below is the block diagram of the pong game module.
In our project we will design the images by using only eight color. If you want to increase the color , you should use the video DACÂ device like ADV7123
We use Quartus II 11.1 version as compiler. We use Cyclone III FPGA Development Kit in order to carry the project out. You can download the complete project file from here.
Before begin the project, let’s take a quick look at the VGA protocol.
VGA(Video Graphics Array)
VGA is a video display standard developed by IBM and introduced in 1987 in IBM. It is widely supported by PC graphics hardware and monitors.
In VGA standard The image is divided into array of small picture elements called pixels. Every pixel contains a sample of the image. Â An image is displayed on the screen by turning on and off individual pixels. The monitor continuously scans through the entire screen and rapidly turning individual pixels on and off
The scanning starts from row 0, column 0 in the top left corner of the screen and moves to the right until it reaches the last column shown in Figure 1. When the scan reaches the end of a row, it retraces to the beginning of the next row. When it reaches the last pixel in the bottom right corner of the screen , it retraces back to the top-left corner where scanning began and repeats the scanning process. The entire screen must be scanned(refresh) not less than 60 times per second. This period is called the refresh rate.
There are two type of signals in VGA
Control (Synchronization) Signal
There are two Synchronization Signals used synchronization of the video in VGA called horizontal sync and horizontal sync. These signals are digital signals.
There are three type video signals in VGA called Red(R), green(G) and blue(B). The three color signals collectively referred to as the RGB signal control the color of a pixel at a given location on the screen. They are analog signals with voltages ranging from 0,7 to 1 V.
Three bit VGA color combination
The following table lists timing values for several popular resolutions.
After taking a look at the VGA we can continue our project where we left off.