# VGA Controller ## Table of Contents - [VGA Controller](#vga-controller) - [Table of Contents](#table-of-contents) - [Description](#description) - [Overview](#overview) - [Introduction](#introduction) - [Design Details](#design-details) - [Component Symbols](#component-symbols) - [System Block Diagram](#system-block-diagram) - [Process Diagram](#process-diagram) - [State Diagram](#state-diagram) - [Conclusion](#conclusion) ## Description VGA Controller designed to play Pong on a VGA Monitor. The cache controller is implemented in VHDL in Xilinx ISE for the Xilinx Spartan-3E FPGA (Field Programmable Gate Array). This project was done as part of the course COE 758: Digital Systems Engineering at Toronto Metropolitan University. The assignment document for this project can be found [here](https://www.ee.torontomu.ca/~lkirisch/ele758/labs/SimpleVideoGame[11-11-11].pdf) ## Overview The primary objective was to develop a VGA-compatible video game using VHDL, demonstrating real-time signal processing and interfacing with external devices. The system consists of a static video frame representing a game field and dynamic elements, including a ball and two players. The game field is displayed in green with white borders, while the ball and players are depicted in yellow, blue, and red. The ball movement and reflection are handled based on collision detection with the field boundaries and player paddles. The VGA controller was designed to synchronize HSync and VSync signals for proper display output. The project demonstrates a practical application of VHDL coding for real-time graphics generation and on-chip interfacing. Successful testing on the Spartan-3E FPGA showed accurate video output, dynamic ball and paddle movements, and correct behavior upon collisions and scoring. ## Introduction The Simple Video Game Processor project aims to explore the functionality of the VGA standard and its implementation using FPGA technology. FPGAs provide a flexible platform for designing custom real-time signal processing systems. VGA displays require precise timing for synchronization, making it an ideal application for learning video output subsystem design. This project involves creating a Pong-like game where two players control paddles to reflect a moving ball on the screen. The game logic, VGA controller, and dynamic element management are implemented in VHDL, leveraging the Xilinx ISE development environment. ## Design Details To better understand the design the following diagrams have been created: ### Component Symbols
VGA Controller Symbol Diagram Dark
Figure 1: Symbol Diagrams of Simple Video Game Processor.
### System Block Diagram
VGA Controller System Block Diagram
Figure 2: Top-Level Block Diagram of Simple Video Game Processor.
### Process Diagram
VGA Controller Process Diagram
Figure 3: Process Diagram for Ball Movement Logic.
### State Diagram
VGA Controller State Diagram
Figure 4: State Diagram for Ball Movement Logic.
## Conclusion The Simple Video Game Processor project successfully demonstrated the use of FPGA technology for real-time video signal generation and interfacing with external I/O devices. The implementation of a VGA controller, coupled with custom game logic, highlighted the capabilities of VHDL for developing complex digital systems. The project met all specified requirements, and the final demonstration showed a functioning game with dynamic visual elements. Future improvements could include adding sound effects or enhancing the game mechanics for a more interactive experience.