FPGA Arcade

Description

The project is based on minigames implemented with a menu selection system using the switches and LEDs on the BASYS 3 board. The left button selects the minigames. Currently, the menu comprises two mini-games. One of them is “flick the fastest” using the switches. This is a PvP game. The second game is “whack a mole” where the player must flick the switch above which the LED glows. Each game has a set high score to achieve. After a player reaches a high score, the game ends and goes back to its menu selection state.

How It Works

A RISC-V architecture is used to implement the “computer” on the Basys 3 board. SystemVerilog in the Vivado design suite is used to write the various parts including the ALU, register file, and program counter.

Above is an example module from the RISC-V computer, the FSM.

Using MMIO, the LEDS, buttons, and switches are accesssed in the program. Generally, the switch values are checked and the LED's display an output. An interrupt is triggered when a button is pressed, and the label executed depends on which the value of a register. The value corresponds to a lit LED (1 of 16). The system is designed as such so that the menu is running in a constant loop until the user wants to play a game. The use of labels helps future users add to the library of minigames in an organized manner.