Skip to content

Latest commit

 

History

History
33 lines (17 loc) · 1.3 KB

README.md

File metadata and controls

33 lines (17 loc) · 1.3 KB

Sudoku

We implemented the game of Sudoku using Verilog on a Nexys3 board. We had classic Sudoku puzzles as well as Chess Sudoku ones.

picture of game

Design

The player selects numbers, resets the current game, and can go to the next game by controlling a keypad. The player can move up, down, left, right, and pause using 5 buttons on the Nexys3 board.

The game displays on a monitor using a vga display controller, implemented by vga.v.

We track the time for a given puzzle and display it on a 4-digit 7-segment display.

To store the puzzles, we encoded the grid into a 324 binary string where each of the 81 squares is represented in BCD.

s = ''
for r in range(9):
    for c in range(9):
        s += bin(puzzle[r][c])[2:].rjust(4,'0')

Acknowledgments