DDR

Our class’ final project in EE 271 (Digital Logic) was to use digital logic to create something on an FPGA (field-programmable logic array) board. There was a list of possible projects which included an easy project that all but five people (in a class of about 60) chose. I was one of the five who chose something different. I chose DDR.

For those who do not know DDR, I will briefly explain. DDR (Dance Dance Revolution) is a video game where the player stands on a platform and hits colored arrows with their feet according to the musical and visual cues on the screen. In my project, it was adapted to using fingers to hit buttons that corresponded with what was shown on an LED matrix. For example, a pattern that has three dots in line will go up the screen. When that pattern goes to a certain position, the player should hit three buttons at the same time, and it will clear the dots and add points. The next pattern will appear and go up the screen, and the player should hit the corresponding buttons.

Requirements:
Pattern should appear on the screen and rise up.
Once the pattern gets to a certain position, it changes color and allows to be cleared.
If the player presses the corresponding buttons when the pattern is in that position, a point is added.

When the pattern goes off the screen, two points are deducted.
Points are deducted for hitting a button when the pattern is not in a point-gaining position.
The lowest score is 0, and the highest score is 9999.

Extras I Added:
At the prime position, pattern turns green.
Two points are added if player hits the pattern at prime position.
At one line above/below prime position, pattern turns orange.
One point is added if player hits one line above/below prime position.

Development
The development board I used was the Altera DE-1 board and programmed it with Verilog code. Quartus was the design software that I used, and I had the option of using schematics or pure code. Schematics are definitely more intuitive but very tedious to draw because the project was so big and complex. I chose to do it in code. As for hardware, it was relatively simple. I bought an 8×8 LED matrix and wired it up to the board. The people who chose to do the easy project merely used the 7-segment displays that were on the board already and very easy to control. A hard part about the hardware (haha hardware, get it? ok bad joke) was in figuring out how to turn on a certain dot with a certain color. Different wires had to be on to make just one dot have a different color.

With that resolved, I went on to draw the top level diagram, also indicating the width of each bus.


It might be a bit difficult to see where it starts because everything uses everything at the same time. The clock though is the fundamental part, and it could be viewed as the beginning. The clock provides a signal, and everything basically looks at that at the same time.

I then developed each block and tested the block to check that it worked. This is an important method of testing debugging. If I wrote everything and then tested, debugging would have been gruesome because I wouldn’t know which block(s) were having problems. So, I ran simulations and analyzed the waveforms to check that the output was what I expected before developing other blocks.

Result
It took me 40 hours to complete this project, but it was worth it. I went off the path that everyone took and created something fun and interesting to me. Additionally, it was more challenging than the easy project that most people did, and I learned a great deal about coding, debugging, and digital logic. Being an independent project, I proved to myself that I am competent enough to develop code and logic on my own and think logically to work out problems.