项目作者: hassan-salloum

项目描述 :
FPGA Spartan 3A (Shooting Game)
高级语言: HTML
项目地址: git://github.com/hassan-salloum/FPGA_VGA.git
创建时间: 2019-06-09T09:08:06Z
项目社区:https://github.com/hassan-salloum/FPGA_VGA

开源协议:

下载


FPGA Spartan 3A Shooting Game

This project walks you through building your first FPGA game step by step. You’ll learn about VGA functionality, synchronization, and FPGA programming using the Elbert V2 Spartan 3A development board.


Requirements & Setup

1️⃣We will use the Elbert V2 Spartan 3A FPGA board:Numato Elbert V2 FPGA Board
2️⃣To program the FPGA, install the required USB driver: Download USB CDC Driver
3️⃣We will use Xilinx ISE 14.7 for FPGA development: Download Xilinx ISE 14.7
4️⃣To upload bitstreams to the FPGA, install ElbertV2Config.exe: Download ElbertV2Config
5️⃣ Additional Resources: Elbert V2 Documentation


VGA Functionality

To display graphics, we need to understand how the VGA controller works.

📌VGA Controller Simplified view

image

📌Horizontal & Vertical Synchronization

This explains how VGA timing works and how we can use it to draw images in the VGA_sync module.
image


Main Code Structure

The project consists of four core modules:

  • 🟢 TopModule → Declares the VGA system inputs/outputs.
  • 🔵 U1 - IN_CLOCK_OUT → Converts 12 MHz input to 25 MHz output.
  • 🟣 U2 - Counter → Uses 25 MHz input to synchronize VGA_sync and TopModule.
  • 🟠 U3 - VGA_sync → Handles vertical & horizontal synchronization and video output.

Get Started

1️⃣ Set up your FPGA board and install all required software.
2️⃣ Understand the VGA synchronization and how it drives pixel rendering.
3️⃣ Compile & upload the code to test the game on your FPGA board.