The included ISE Verilog source files and FrontPanel xfp file will implement the Nim game on an OpalKelly XEM3005.
Five piles of objects are displayed by FrontPanel. Human and FPGA take turns removing any or all items from any ONE pile during each move. The player that takes the last item from the board wins. The human can win, but must play perfectly to do so.
This firmware should work on any other OpalKelly FPGA board with appropriate changes to the ucf file and possibly changes to the use of 4 LEDs.
This example might be useful, and maybe even amusing, to those new to FPGA development on OpalKelly boards. It certainly does not stress the FPGA or the development environment.
nim_example.zip (6.2 KB)