Friday, October 14, 2011

Game of Life - Step 1

I've completed and attached the first step to my "Conway's Game of Life" project! This allows for arbitrarily sized games, dependent on how big you can realistically synthesize n^2 D Flip Flops.
As you can see by the real exciting image on the right, I'm able to simulate a game properly.

I have a few remaining issues with this:

  • The game state is stored in two arrays, A and B. A contains the initial state, B is the evolved state. After the first iteration, I need to swap their roles. I'm not sure the best way to do this.
    • Use Verilog for loops to swap the registers
      • How would this synthesize in hardware?
      • How would this impact timing? This would be attempting to do this in a single clock cycle
    • Copy a couple at a time, breaking across clock cycles
      • Seems like the reasonable variant of option 1
      • Will probably take a while
    • Put every read/write in a conditional block, directing the read/write to the appropriate register
      • Synthesizes reasonably, pretty quick
      • Best option I've come across so far
      • What I'm currently using
    • Another option?
      • I'm asking around on some forums, perhaps there is another option I'm not considering.
  • Is there a way to reduce the states in my FSM?
    • The current states are really easy to work with, but there may be an optimization I can do here
  • Output game state to an external display
    • Currently when I synthesize this in hardware I have no way to actually observe the states changing, which makes this pretty useless.
    • Simple VGA output should be easy
  • Pipelining?
    • So this could benefit from pipelining, but I'm going to avoid doing that at this stage. Perhaps for a next project when I have a more solid footing!

Source: Game Of Life, Version 1

2 comments:

  1. Hey I was reading your blot today because I was having similar problems with using a gophone... anyway would it be possible to just have a and b switch roles logically, with no copying. Seems like it would take less macrocells and have way less delay.

    ReplyDelete
    Replies
    1. Yeah. I ended up doing some research on this, and it seems this is the standard way to do things.

      Delete