3/17/2007

Encoding Styles for FSM

  • Binary encoding is good for creating small (less than 16 states) FSMs in FPGAs. Larger FSMs require too much Next state logic and perform slower when binary encoded.
  • One-Hot encoding is good for building larger FSMs since it requires very little Next state logic. OHE is more reliable than Binary encoding, because fewer bits change at once making the circuit less likely to glitch. OHE leaves a lot of unused states in the FSM and also uses a lot of registers (but there are a lot of registers in FPGAs).
  • Gray encoding of your state machine uses less resources than OHE and also gets good speed. Gray encoding is also the most reliable encoding technique, because only one bit changes per transition. However, Gray encoding requires the designer to be very aware of the coding technique chosen when simulating the FSM, and this is often a pain.

No comments: