[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
相关推荐
FPGA_小田老师1 小时前
FPGA调试利器:JTAG to AXI Master IP核详解与实战演练
fpga开发·jtag测试·jtag2axi ip·ddr3自动化
FPGA_小田老师4 小时前
FPGA开发入门:深入理解计数器——数字逻辑的时序基石
fpga开发·verilog·状态机·计数器·计数器设计
碎碎思4 小时前
用 FPGA 实现 PCIe 传输,开源核 LitePCIe 深度解读
fpga开发
9527华安4 小时前
FPGA纯verilog实现JESD204B协议,基于AD9625数据接收,提供2套工程源码和技术支持
fpga开发·jesd204b·ad9625
Shang180989357268 小时前
MS2107高性能USB 2.0视频信号和音频采集,支持NTSC/PAL制式,适用于低成本视频采集设备
嵌入式硬件·fpga开发·音视频·硬件工程·信息与通信·dsp开发
学工科的皮皮志^_^10 小时前
网口学习理解
经验分享·笔记·嵌入式硬件·学习·fpga开发·以太网
博览鸿蒙16 小时前
FPGA高频面试问题整理—附答案
fpga开发
cmc10281 天前
134.FPGA常见管脚与时钟的约束方法
fpga开发
第二层皮-合肥1 天前
AD导出FPGA管脚的方法
fpga开发
ehiway1 天前
国际先进!中科亿海微国产嵌入式FPGA IP核及EDA系统设计技术通过科技成果评价
网络协议·tcp/ip·fpga开发