FPGA Center

 * Project Definition

 * SYNC Module

 * IMG GEN Module

  * VHDL Source Code 

Project Definition

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

VGA Synchronization

Horizontal Synchronization

Vertical Synchronization

VGA Timing

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.

Home | Fpga | VHDL | VHDL Dictionary | Digital Design | Simulation | PCB | Examples | Contact Us
Copyright © 2010 - 2013 FPGAcenter. All Rights Reserved.