[HDLBits] Conwaylife

Conway's Game of Life is a two-dimensional cellular automaton.

The "game" is played on a two-dimensional grid of cells, where each cell is either 1 (alive) or 0 (dead). At each time step, each cell changes state depending on how many neighbours it has:

  • 0-1 neighbour: Cell becomes 0.
  • 2 neighbours: Cell state does not change.
  • 3 neighbours: Cell becomes 1.
  • 4+ neighbours: Cell becomes 0.

The game is formulated for an infinite grid. In this circuit, we will use a 16x16 grid. To make things more interesting, we will use a 16x16 toroid, where the sides wrap around to the other side of the grid. For example, the corner cell (0,0) has 8 neighbours: (15,1), (15,0), (15,15), (0,1), (0,15), (1,1), (1,0), and (1,15). The 16x16 grid is represented by a length 256 vector, where each row of 16 cells is represented by a sub-vector: q[15:0] is row 0, q[31:16] is row 1, etc. (This tool accepts SystemVerilog, so you may use 2D vectors if you wish.)

  • load: Loads data into q at the next clock edge, for loading initial state.
  • q: The 16x16 current state of the game, updated every clock cycle.

The game state should advance by one timestep every clock cycle.

John Conway, mathematician and creator of the Game of Life cellular automaton, passed away from COVID-19 on April 11, 2020.

复制代码
buhuizuo
相关推荐
釉色清风3 小时前
openEuler 多样算力支持:CPU、GPU 与 FPGA 异构加速实战
fpga开发
Joshua-a17 小时前
Quartus命令行烧录FPGA
fpga开发
FPGA_无线通信19 小时前
OFDM FFT 时频域转换
fpga开发
XINVRY-FPGA21 小时前
EP4CE30F23I7N Altera Cyclone IV E SRAM FPGA
嵌入式硬件·fpga开发·云计算·硬件工程·信息与通信·信号处理·fpga
156082072191 天前
FPGA(采用RGMII接口)逻辑实现千兆网TCP/IP协议栈调试记录
网络协议·tcp/ip·fpga开发
9527华安1 天前
FPGA纯verilog实现JESD204B协议,基于AD9250数据接收,提供3套工程源码和技术支持
fpga开发·jesd204b·ad9250
FPGA_无线通信1 天前
OFDM 精频偏补偿
算法·fpga开发
我爱C编程1 天前
【仿真测试】基于FPGA的完整16QAM软解调链路实现,含频偏锁定,帧同步,定时点,Viterbi译码,信道,误码统计
fpga开发·16qam·软解调·帧同步·维特比译码·频偏估计·定时点提取
高速上的乌龟1 天前
Lattice LFCPNX-100 Fpga开发+源码:基于spi协议的flash驱动控制
fpga开发
ehiway1 天前
中科亿海微SoM模组——FPGA高速信号采集解决方案
fpga开发