[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
相关推荐
思尔芯S2C1 小时前
思尔芯携手Andes晶心科技,加速先进RISC-V 芯片开发
人工智能·科技·fpga开发·risc-v·debugging·prototyping·soc validation
tiantianuser12 小时前
RDMA简介5之RoCE v2队列
fpga开发·verilog·fpga·rdma·高速传输·rocev2
碎碎思13 小时前
打破延迟极限的 FPGA 机械键盘
fpga开发·计算机外设
ALINX技术博客1 天前
【新品解读】一板多能,AXRF49 定义新一代 RFSoC FPGA 开发平台
射频工程·fpga·amd·rfsoc·alinx
hahaha60161 天前
Flash烧录速度和加载配置速度(纯FPGA & ZYNQ)
fpga开发
hahaha60161 天前
ARINC818编解码设计FPGA实现
fpga开发
XMAIPC_Robot1 天前
基于RK3568的多网多串电力能源1U机箱解决方案,支持B码,4G等
linux·fpga开发·能源·边缘计算
迎风打盹儿1 天前
FPGA仿真中阻塞赋值(=)和非阻塞赋值(<=)区别
verilog·fpga·阻塞赋值·非阻塞赋值·testbench仿真
广药门徒1 天前
在使用一些不用驱动大电流的设备就可以用stm32的自己的上下拉但是本身上下拉不就是给iicspi这些他通信给信号的吗中怎么还跟驱动能力扯上了有什么场景嘛
stm32·单片机·fpga开发
hahaha60162 天前
XDMA pcie环路测试
fpga开发