Guideline #2: Encode the FSM states carefully
State encoding affects the speed and size of your FSM
- State code is a vector: log(n) to n bits (n ? # of states)
Encoding options:
- Minimum state vector (log n) versus one-hot codes (n)
- Trade flip-flop count for logic complexity
- CAD tools can help choose your state encoding
Consider using output signals as part of the state vector
Consider how the FSM starts (or resets)
- Self-starting FSM or explicit reset input