ITS       A       REVOLUTION !!

Class Demo...

by Scott Sirowy and Jeremy Harrison

 

 

Recently we were given a project in our intermediate embedded systems course at the University of California, Riverside in which we were asked to create a  cost efficient prototype of the popular arcade game Dance Dance Revolution. The only major restriction we were given in the project was our choice of microprocessor, which included the 8051 and/or the  Xilinx Spartan FPGA. 

Anyone with a basic understanding of the game knows that many events are taking place simultaneously. The game display is constantly updating, while user input needs to be continuously input and timed according to game specifications. Not only that, but user scores and life meters need to be calculated and output as quickly as possible.

Based on the preliminary game design goals, it was clear that  we needed to capture the program in a hierarchical concurrent finite state model. Most students chose to capture this model using the 8051 micro controller programmed using C because of ease and familiarity with the language. However,  we found it much easier to capture the functionality of the game using the Xilinx Spartan FPGA and VHDL. 

Our decision to use VHDL and the FPGA's came in part to the fact that it is possible to write code that has multiple processes running at the same time. We were easily able to describe the game tasks above in separate processes with much  greater ease than the C language would allow. Instead of using interrupts and polling techniques, we were able to designate specific processes that would exclusively capture the user's input for processing. We designated one process for scrolling the LED display, while another process controlled the time multiplexing of the lights. Another process captured the user's input from the dance foot pad at very specific intervals and another calculated the user's score based on the inputted information. 

Timing is one of the most fundamental aspects of Dance Dance Revolution. The game requires correct inputs and outputs at very specific time intervals. Using the FPGA allowed us to easily create a clock divider that captured the time accurately. Other students ran into numerous problems with the 8051's because they had to use a more complicated scheme to capture the time. 

Testing was another key factor in our choice to use the Xilinx FPGA and the Digilent Lab boards. Xilinx provided us with simulation tools that allowed us to diagnose and debug our code. It allowed us to quickly see what values are intermediate values were being assigned, allowing us to correct logical errors in the code. The Digilent boards also allowed us easy to access to a number of pre-connected switches, LED's and buttons which made debugging an easier and more pleasant experience.

Many factors played a part in our decision to use the Xilinx FPGA over the 8051 micro controller. Among those included process concurrency necessary for the game, accurate timing, and ease of testing. Ultimately, design time was one of our biggest concerns. The Xilinx FPGA allowed us to create a product in a minimal amount of time. Functionalities of the game that took some students over a week to complete using the 8051 often took us about an hour or two. This not only allowed us more time for testing, but also gave us the time to increase the functionality of the game itself. The Xilinx FPGA boards provided us with a host of advantages that enabled us to build a superior final design. 

On a grander scale, our project ultimately begs the question:  are FPGA's ready to break into the classroom and industry and become the de-facto standard for the upcoming generation? Only if one wants reliability, speed, real time concurrent processing, and reduced design time. As  we see it, the FPGA provides benefits unmatched by the 8051 and the micro controller. Who knows, our Dance Dance Revolution game may indeed have begun a new Revolution of a new kind, or maybe that is just in our minds!!