[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
相关推荐
郝旭帅电子设计团队7 小时前
图像处理是什么
图像处理·fpga开发·郝旭帅电子设计团队·郝旭帅
weixin_4526006914 小时前
D2632大电流低差压可调线性稳压器介绍,D2632可替换MIC29302
fpga开发·机器人·无人机·电动工具·车载摄像头
ARM|X86+FPGA工业主板厂家17 小时前
基于ARM+FPGA平台在精密测控领域的应用:ZYNQ千兆以太网高速数据记录仪
arm开发·fpga开发
cmc102817 小时前
275.需要双边沿触发时,直接对时钟取反会不会出问题
fpga开发
ARM|X86+FPGA工业主板厂家20 小时前
基于ARM+FPGA平台在精密测控领域的应用:ZYNQ FPGA图像预处理加速系统
arm开发·fpga开发
LCMICRO-133108477462 天前
国产长芯微LPS7118完全pin-pin替代ADP7118,是一款采用 CMOS 技术设计的低噪声、高 PSRR、快速瞬态响应、低压差线性稳压器
arm开发·单片机·嵌入式硬件·fpga开发·硬件工程·线性稳压器·adp7118
LCMICRO-133108477462 天前
国产长芯微LM3042完全P2P替代LT3042,是一款高性能低压差线性稳压器
arm开发·单片机·嵌入式硬件·fpga开发·硬件工程·线性稳压器·lt3042
ARM|X86+FPGA工业主板厂家2 天前
基于ARM+FPGA平台在精密测控领域的应用:ZYNQ高精度温振压多参融合采集系统
fpga开发
辰丁电子3 天前
PCB设计:EMMC设计规范
fpga开发·pcb设计·pcb工艺·layout·pcb layout
小蘇的FPGA4 天前
FPGA远程更新升级和测试(MultiBoot)
fpga开发