Embedded LSI Architecture
Embedded LSI Architecture
FPGA Application Report
Version 1.0
By:
HAO Cong
2010-11
Document Language:
English
Revision History
Date Version Description Author
2010-11-21 <1.0> Finish the 1
st
edition of FPGA application report HAO Cong
Final date <x.x> <details> <name>
Embedded LSI Architecture
Key Words
Verilog HDL
FPAG Application
Spartan-3
Abstract
Based on Spartan-3 evaluation board, I designed a FPGA Application named Greedy
Snake Game, which is implemented by Verilog Hardware Description Language. The Game
has both input from keys and output to screen. Users can play the game freely and easily.
How did the game be designed will be introduced in detail in this report, including the
modules’ organization and implementation. Analyses of the program such as timing and area
are also concluded.
Embedded LSI Architecture
Table of Contents
1. INTRODUCTION............................................................................................1
1.1 Tools and Environment.................................................................................................1
1.2 Introduction of the Game..............................................................................................1
2. DESIGN OVERVIEW ..................................................................................... 3
2.1 Top View .......................................................................................................................3
2.2 Control Unit and Data Path ..........................................................................................3
3. MODULES ..................................................................................................... 4
3.1 Game_ctrl_unit .............................................................................................................4
3.2 Snake............................................................................................................................5
3.2.1 Store of Snake....................................................................................................5
3.2.2 Movement of snake............................................................................................5
3.2.3 Changing direction .............................................................................................6
3.2.4 Judgment of death .............................................................................................6
3.2.5 Display................................................................................................................6
3.3 Snake_eating_apple.....................................................................................................7
3.3.1 Generating apple................................................................................................7
3.3.2 Eating apple .......................................................................................................7
3.4 VGA_control .................................................................................................................7
3.5 Key................................................................................................................................9
3.6 On-Board Display .........................................................................................................9
3.6.1 7SEG LED (module Seg_display) .....................................................................9
3.6.2 LED ..................................................................................................................10
4. ANALYZE REPORT..................................................................................... 10
4.1 Synthesis Schematics ................................................................................................10
4.2 Resources ..................................................................................................................14
4.2.1 Device Utilization Summary.............................................................................14
4.2.2 HDL Synthesis Report......................................................................................14
4.2.3 Advanced HDL Synthesis Report.....................................................................15
4.2.4 Timing Summary ..............................................................................................16
5. IMPROVEMENT........................................................................................... 16
6. SUMMARY ................................................................................................... 17
Embedded LSI Architecture
1
1. INTRODUCTION
1.1 Tools and Environment
Project name: Greedy Snake Game
Evaluation board: Spartan-3 (XC35200 / FT256AFQ0413)
Development environment: Xilinx ISE
Language: Verilog HDL
1.2 Introduction of the Game
The Greedy Snake is a traditional game, and my program implemented it almost fully.
There’s a moving snake in the game, whose moving direction can be controlled by players
using up/down/left/right key. There’s also a random-occurred apple on the screen. When the
head of the snake touches the apple, the snake grows a little longer and a new apple appears.
If the snake hits wall or its body, it dies.
In this application, there are five keys on the board, separately up, down, left, right and
reset, which are inputs. The output concludes image on screen, LEDs and 7SEG LEDs on the
board. The image on screen shows main interface of the game, LEDs show the status of the
game (playing or dead), and 7SEG LEDs show current score of player.
Figure 1: whole picture of the game (initial status)
Embedded LSI Architecture
2
Figure 2: main interface of the game
Figure 3: other outputs on the board