CPE 133 Final PROJECT

by nicholasweiss9898 in Circuits > Computers

262 Views, 0 Favorites, 0 Comments

CPE 133 Final PROJECT

IMG-4692.jpg

We created a super fun game on the Basys3! I have never had so much fun ever!

Supplies

Basys3 Board

Verilog

Block Diagram

Screenshot 2023-03-16 164929.png
IMG-0079.jpg

This is our block diagram and elaborated design for this project.

Random Number Generator

Screenshot 2023-03-16 165907.png

We used D Flip Flops to create a random number generator. To do so, we used 16 flip flops, with three bits XOR'd together to create the random number. This number will be represented by LED lights on the Basys3 board.

Game FSM

Screenshot 2023-03-16 170135.png
Screenshot 2023-03-16 170208.png
Screenshot 2023-03-16 170233.png
Screenshot 2023-03-16 170246.png

Here is the code for our top level module code.

Game Description

This game is a Simon-says type game. Pressing the top button will generate a random series of LEDs to flash for about 2 seconds. After they disappear, the player will attempt to flip on the switches that remember being lit up. After the player flips the switches, they press the bottom button to check their answer. If it is correct, the seven-segment display will display an ā€œSā€ for success, or ā€œLā€ for loss, depending on if the player guessed correctly. If the player wants a new attempt at the game, they must press the center button for it to restart.

Demo