← ProblemsCircuits / Sequential Logic / More Circuits

Conway's Game of Life 16x16

2%cellular-automataloops-generate

Conway's Game of Life is a two-dimensional cellular automaton. Build it on a 16×16 grid stored row-major in a 256-bit vector: cell (row, col) is q[row*16 + col].

Each cell has 8 neighbors. The grid is a torus: edges wrap around, so row 0's upper neighbors are in row 15, column 0's left neighbors are in column 15, and so on. Every cell updates simultaneously each clock cycle:

  • exactly 3 live neighbors → cell becomes alive (1)
  • exactly 2 live neighbors → cell keeps its current state
  • any other count (0, 1, 4–8) → cell dies (0)

When load is 1, load data[255:0] into q instead of stepping. There is no reset.