[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: q15:0 is row 0, q31: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
相关推荐
FPGA小迷弟16 小时前
FPGA 应用技术能力的完整闭环(1-4)
fpga开发·dsp开发·fpga·sdr·无线电
NamoAmitabha12816 小时前
vivado时序报红/插入流水线寄存器/降低扇出
fpga·vivado
Eloudy18 小时前
FPGA 开发与 IC 数字前端设计
fpga开发
tju新生代魔迷20 小时前
Verilog HDL 学习笔记(十八)| 附录C:关键字、系统任务和编译指令
fpga开发
free-elcmacom1 天前
FPGA学习笔记<1>FPGA的开发流程
fpga开发·硬件工程·hdl
明德扬1 天前
AD9653单通道波形怎么看?幅度、频率与基础测量入门
学习·fpga开发·fpga
ERROR:991 天前
GPT Images 2.5将手稿转时序图效果不佳
fpga开发
尤老师FPGA1 天前
声学相机介绍
fpga开发
科恒盛远1 天前
ZU902 FMC194 可编程宽带信号源实测
fpga开发·硬件工程·信号处理
大盛供应链·卢生1 天前
哪些国产芯片可以替代进口芯片,哪些替代不了
fpga开发·容器