Nim game

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. (6.2 KB)

Hey Bob–

Great work! That’s a really nice example for FPGAs as well as FrontPanel! Thanks for posting it.

I’ve attached bitfiles for the XEM3001, XEM3005, and XEM3010 in case folks were interested. (85.2 KB)

The Nim game example has been updated to reflect changes in the interface to FrontPanel and Xilinx ISE. The original version produces synthesis errors under ISE 13.2. (27.5 KB)