Você está na página 1de 26

ECE298 DIGITAL SYSTEMS DESIGN LABORATORY

Final Project
Deming Chen

Todays Topics
Snapshots of some previous final projects Useful hints for carrying out the final projects successfully

Snapshots of previous projects

1
Debugging tool for TTL chips (Medium) - Need to do research for the connection b/w FPGA board and the protoboard - Difficulty of this project will vary depending on how many chips will be tested Tank wars (Medium) - Additional features might be fine control of shot angle and power, trajectory physics, sprite graphics, health bars, wind, multiple weapons, destructible terrain, tank moved by explosions Single player blackjack - Hard-medium. They have to have at least basic features to get full demo points. - Additional features: two players, betting, split..
4

2
Holy Ship - Initially had too many features. Think about completion of the game in a timely manner and capability of FPGA board switching screens back and forth while playing game. - Start with the only basic features: ship, enemies, shoot, energy, die, and etc.. - With the basic features, Medium-easy level. Once they get the working game, then try additional features such as different levels, timer, lives, etc. XiangQi (Chinese chess) - Hard-medium. - The difficult part would be displaying on the screen and limits for each piece's movement. Think about computer's intelligence. In that sense, start with 2-player game in which each takes turn.

3
One player snake
- Easy. Start with 1 player game and proceed to 2-player game when it's working.
- Snake should grow on eating food; Food should be randomly generated; Snake should die on hitting the wall; Snake should die on touching itself

- Additional features
- discrete grid based smoothing, levels, points, randomly generated food, ...

Tetris
- Medium. Additional features can be added.

Space shooter
- Medium-easy. - Additional features: 2-player enabled, different levels, different weapons, enemy types, sprite graphics, scoring.

Jump and shoot man (Megaman)


- Medium-easy. Simplified version of Megaman. Additional features can be provided.
6

4
MIDI Keyboard Synthesizer
Converting the asynchronous data from the MIDI keyboard connector to pass through an RS232 connector so that it can interface with the Altera DE2. From there, we will interpret the data and generate the appropriate tone corresponding to the desired key pressed Comments: Interesting project with a difficulty rating of Medium-Hard

Game: Robotron
"A PS/2 keyboard will be used to move the player character and have him shoot. Enemies will try to catch and/or shoot the player." Comments: Medium difficulty rating, starting with a single level and gradual increment would be a good way to proceed.

Game: Connect4
Comments: Easy-Medium Since this is a comparatively easy project, difficulty rating would depend on the final set of features implemented.

5
360 View
Contents: read in a panoramic image file and display a portion of the image on the screen and show functions like rotation Difficulty level: medium Suggestions: add more advanced functions, like in storage image files,

The Calculator of the Future


Contents: the standard simple functions including add, subtract, multiply and divide and some advance functions Difficulty level: medium Suggestions: add more optional modes like the ones in scientific computing calculator in Windows

Improved Version of Brickbreaker


Contents: the classic brickbreaker game plus other advanced functions Difficulty level: medium-hard Suggestions: try multiple levels, scoring, different angles of motion, etc.

6
Real-time Image Processing
Contents: integrate the keyboard and camera module to perform image processing. Functions include rotate, flip, resize, palette modification, etc. Difficulty level: medium-hard Suggestions: carefully choose algorithms for rotation, enlarging, shrinking if you want to get good performance, and better to use hardware implementation rather than software implementation which may reduce the difficulty points.

Wireshark
Contents: it will take packets, dump them to SD-RAM and then have some other program written that can browse through the packets and manage the settings for the wireshark, such as filters based on IP, port, protocol, etc. Difficulty level: medium-hard Suggestions: make sure that you can have enough time to finish it and make more your own contributions rather than use the existing interface, and you can separate the work into several parts and finish them step by step

7
Reverse Polish Notation Calculator for Floats in VHDL
Implement a 16-bit floating point calculator in VHDL. The user inputs decimal numbers and operation keys (for division, multiplication, addition, or subtraction) from the keyboard in an order corresponding to Reverse Polish Notation. Difficulty level: medium to hard. TA suggestions: do a thorough research on floating point implementation before attempting the project.

Intergalactic Battle
The user will be in control of a spaceship through the keyboard input, which will shoot at other ships that are descending down the screen Many students have implemented similar project before, the difficulties varies with the nature of the features the game supports. A more sophisticated version is here http://www.youtube.com/watch?v=wBeSvm9JWs0 TA suggestions: start with a basic version, make it work, then attempt to implement fancier features.
10

Ideas of Extra Features (in general)


Random number generator instead of fixed patterns (for games) Score tracker & different levels (for games) AI (for competitive games) Image processing features (for Paint) Input methods other than keyboard
Mouse, Touchpad, Camera, Wii controller, etc.

Graphics and/or animations


Dont have to be too fancy. This is not an art class. (although cannot be too ugly)

11

Design Suggestions
Random generator: create a very long shift register which keeps on rotating. Selects a random number by stopping clock. Use registers to keep track of the movements of your game objects. Display the score using bit mapping (will be posted on the website). Add music using the sound driver provided on the website. Avoid manipulation of the clock. Do not try to change the lab 8 keyboard, make it as a black box and then add additional entities to the design. This helps in debugging. Ask TA or friend to get the keyboard entity if you dont have a working version. But please specify this in the report. Same thing with any other entities or any online sources. Please verify with TA whether it is ok to use existing code that is not designed by you.

12

More Suggestions
Think hardware when you write SystemVerilog Design before implementing Sleep well before coding (since it is digital) Try not do handshaking between entities Design your entities as finite state machines if they behave like controllers More systematic way of writing hardware
Modular design: divide and conquer Design & verify your modules completely before merging them (simulation, simulation, simulation) Make basics work first and then add enhancement

13

Be an early bird
In hardware design, 30% of the time is spent on designing (the process of writing the actual code) and 70% is spent on debugging and verification. Your project WILL contain bugs, fixing those bugs are going to be very time-consuming. Consider this delay in your schedule.

14

Check for Timing Violation


If youve a complex design, the default 50MHz clock may be too fast, so you may need to lower the frequency. You can check for timing violation in Quartus TimeQuest tool.

15

A small tutorial on Sprites

16

What are Sprites?


Game objects are represented using pictures called sprites
In a space shooter game, the space ship can be represented as a triangle sprite Enemies can be circle sprites You can create your own sprite graphics to recreate games such as Mario or Megaman

17

A Full Sprite System Block Diagram


VGA

Color_table

Color_mapper

Sprite_table

Game_entity_table

18

Sprite System Block Descriptions


Color_mapper
Maps a draw_x and draw_y coordinate to Red, Green, and Blue Pixel Value

Sprite_table
Contains a table of sprites Each sprite is represented as an array of colors Sprite 0 can hold Mario, Sprite 1 can hold a cloud, Sprite 2 can hold a goomba

19

Sprite_table Circle Graphic


1 Represents Black Outline of a circle 2 Represents Yellow Inside of the circle 0 Represents White or Transparent Not painted colors Sprite represents a circle with black outline and yellow fill

0 1 1

1 2 2

1 2 2

0 1 1

20

Sprite System Block Descriptions 1


Color_table
Maps each color found in the sprite definition to wider RGB value
Color 0 => Black Color 1 => Red Color 2 => Green

Can swap color tables for animation effect


Invert color mappings to make the sprite flash

21

Sprite System Block Descriptions 2


Game_entity_table
An array which holds state about every game entity
Mario, Cloud, Goomba, etc. Object location represented by my top left/up corner or midpoint Alive/dead marker used to mark whether entity is alive or dead

22

So How Do You Draw Sprites?


Game_entry_table keeps track of top-left and bottom-right corners of every sprite Sprite_table has actual pixel sprite data Color_table is used to index sprite colors into RGB Pixel Values

23

Drawing Sprites
Compare the value of DrawX and DrawY against the top-left and bottom-right corners of the sprite If DrawX >= SpriteTopLeftX AND DrawX < SpriteTopLeftX + SpriteWidth If DrawY >= SpriteTopLeftY AND DrawY < SpriteTopLeftY + SpriteHeight Look up pixel value inside sprite table Look up color in color table Display Pixel

24

SoC Type of Projects


Profiling a project Identifying computational intensive portion Carrying out HW/SW partitioning Use NIOS II and accelerator approach Can potentially deliver very cool final projects.
Please propose so TA and I can give you feedback Will assign difficulty level based on the specific projects Some examples: face detection, aerospace applications, data compression, object tracking, etc.

25

26

Você também pode gostar