[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
相关推荐
泛联新安2 小时前
VHawk-CDC:国内首款自主可控跨时钟域分析验证工具,破解FPGA设计CDC验证难题
fpga·跨时钟域·验证工具
ALINX技术博客2 小时前
【黑金云课堂】FPGA技术教程Linux开发:摄像头GPU渲染显示/Qt OpenGLES使用
linux·qt·fpga开发·gpu
S&Z34632 小时前
SZ901下载器烧写国产Flash指南
fpga开发
liuluyang5302 小时前
Verilog-1995风格,reg变量声明两次
fpga开发
cjie2214 小时前
安路好用的调试工具VPI
fpga开发
chenlance1 天前
基于FPGA的激光器多通道数据采集与波形控制系统设计
fpga开发
9527华安1 天前
FPGA实现GTP高速收发器2路视频传输,基于aurora 8b10b编解码架构,提供4套工程源码和技术支持
图像处理·fpga开发·aurora·高速收发器·8b10b·derdes
cjie2211 天前
lanczos插值引起的振铃现象
计算机视觉·fpga开发
liuluyang5301 天前
Verilog 中 wire 与 wor 的区别详解
fpga开发·verilog
泛联新安1 天前
国产化FPGA测试工具链--让你的FPGA设计验证更高效、更安全、更自主
fpga·eda·半导体