Blackjack on an FPGA

Fall 2017

cyclone II

A Cyclone II board similar to the one used in the course

This project was done as part ECSE 323: Digital System Design. This course focused on the design and implementation of a simplified game of blackjack (21) on a Cyclone II FPGA.

The programming was done with VHDL code and schematic layouts in the Quartus II development software.

The game was developed several stages, divided up as labs. Labs 1 to 4 concerned the creation and testing of the separate circuits and modules needed for the game. Lab 5 is the final integration of all the modules and the testing of the final system.

Some of sub circuits designed include a stack structure for holding the cards in the deck, finite state machines for controlling the system and a dealer player, and a random number generator.

The game involved the player competing against the computer (dealer) to have the score closest to 21, without exceeding 21. Faces cards have a value of 10. Aces count as 11 or 1, whichever is favourable. The player plays first. The dealer will hit until it exceeds 21. The player input was given via the buttons and dip switches on the board. Information was output using the 7 segment displays and the LEDs.

The full project and documentation can be viewed on my GitHub. The final game is located under lab5 > g07_lab5.qpf

GitHub Link