Analysis updated 2026-07-18 · repo last pushed 2026-01-14
Play Tic Tac Toe against unbeatable FPGA hardware using a serial terminal.
Learn how to implement game logic directly in hardware using Verilog.
Explore FPGA development by simulating the project with Verilator without needing physical hardware.
Display the game board on a monitor via HDMI while playing through serial input.
| doctorwkt/verilog_tic-tac-toe | agg23/openfpga-template | yii2004/tinycodesign | |
|---|---|---|---|
| Stars | 9 | 6 | 20 |
| Language | Verilog | Verilog | Verilog |
| Last pushed | 2026-01-14 | 2023-12-11 | — |
| Maintenance | Quiet | Dormant | — |
| Setup difficulty | moderate | moderate | hard |
| Complexity | 3/5 | 3/5 | 4/5 |
| Audience | developer | developer | researcher |
Figures from each repo's GitHub metadata at analysis time.
Requires an FPGA development board like TinyFPGA B2 or ULX3S, or alternatively Verilator installed for software simulation.
This project is a Tic Tac Toe game where you play against a piece of hardware instead of a computer program. It runs on a small programmable chip called an FPGA, and the chip is good enough at the game that it will always win or at least force a draw against you. Instead of running software on a regular processor, the game logic is wired directly into the chip itself. A script pre-calculates every possible best move for the FPGA's side, and that knowledge gets baked into the hardware so the chip always picks an optimal response to your play. When you make a move, the system checks that it's valid, updates the board, looks up the best counter-move, updates the board again, and cycles back to wait for your next turn. There's also a module that watches for win conditions or draws after each move. You'd interact with the game by typing moves through a serial terminal connected to the board, where you send numbers corresponding to board positions. An alternative version contributed by another developer adds an HDMI output, so you can see the board displayed as nine colored squares on a monitor while still entering moves through the serial connection. That version renumbers the board positions to match a typical keyboard's numeric keypad, with 7-8-9 across the top and 1-2-3 across the bottom. The people most likely to use this are hobbyists and learners who already own an FPGA development board like the TinyFPGA B2 or ULX3S and want a fun, interactive project to put on it. The README doesn't go into detail about setup beyond the serial connection notes, but it does mention the project can be simulated in software called Verilator, so you could explore the logic without needing physical hardware. What's notable is the design approach: rather than computing moves on the fly, the best responses are all figured out ahead of time and turned into a lookup table embedded in the chip. This means the FPGA doesn't need to "think" during the game, it just instantly retrieves the right move, which is a natural fit for how hardware operates.
A Tic Tac Toe game implemented in hardware on an FPGA chip. The chip always wins or draws because every best move is pre-calculated and baked into the hardware as a lookup table.
Mainly Verilog. The stack also includes Verilog, FPGA, Verilator.
Quiet — no commits in 6-12 months (last push 2026-01-14).
Setup difficulty is rated moderate, with roughly 1h+ to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.