Inspiration
We were inspired by Conway's Game of Life, which is a classic cellular automaton. We wanted to build on this idea and implement a different set of rules for cell states and their transitions, giving us more control over the behavior and creating a more colorful output.
What it does
The automaton simulates cells that can be in different states. A state-0 cell turns into a state-1 cell if it has exactly two neighbors in state-1. State-1 cells stay the same if they have 3, 4, or 5 neighbors in state-1. If they have fewer or more state-1 neighbors, they turn into a state-2 cell, then a state-3 cell, and eventually die. After death, they reduce in color until fading to black.
How we built it
We built the Fire Automaton by creating a hardware description using Verilog. The simulation runs on a pixel grid with a random initialization of cell states. The system continuously updates the state of each cell based on its neighbors and displays the result on a video output. We first prototype the cellular automaton in Python to tune the spontaneous random clusters, then adapted it to the SystemVerilog of the FPGA.
Challenges we ran into
During the development, we ran into issues with the Vivado software, which was struggling to compile the design. The compile time kept increasing, eventually reaching up to 2.5 hours, mainly because the software couldn’t find an efficient way to route the gates. To solve this, we added more flops and reduced the number of cells being simulated to simplify testing. After fine-tuning the simulation, we increased the number of cells again and let the final project compile overnight.
Accomplishments that we're proud of
We’re particularly proud of our optimization of the state transition logic, efficiently calculating the next state based on the number of neighboring cells while strategically using flops to give the compilation software an easier time ensuring smooth and accurate updates throughout the simulation. The visual feedback, with cells transitioning through a spectrum of colors as they evolve, is also an accomplishment for us.
What we learned
We started from the very basics, having only ever programed an FPGA in our computer architecture lab. We needed to learn how to use SystemVerilog, and how to effectively debug it when our only sources of input and output are a couple of probes only capable of transferring a few bytes each. We learned how to implement cellular automata in an FPGA, including state-based transitions and handling of large grids of cells. We learned how to create pseudo-randomness using an LFSR. We also learned how to generate video output and synchronize pixel data with the cellular automaton state.
What's next for Fire Automaton
- Optimization: We can improve the performance of the simulation, especially as the number of cells grows, by optimizing memory usage and computation speed.
- More Complex Rules: We may introduce more complex rules for cell transitions or incorporate new states to make the simulation more dynamic and visually interesting.
- Interactive Controls: Adding user controls to interact with the simulation (e.g., changing the initial state or triggering specific events) to make the simulation more interactive.
Built With
- fpga
- systemverilog
- verilog
Log in or sign up for Devpost to join the conversation.