PPT Slide
7 – Sequential Logic Examples
Choices for state encoding
With n state bits for m states there are 2n! / (2n – m)! [m ? n ? log m]
- 2n codes possible for the 1st state
- 2n–1 for the 2nd
- 2n–2 for the 3rd, ...
- a huge number of combinations even for small values of n and m
- 4 states in 2 state bits yields 24 possible state assignments
- 4 states in 3 state bits yields 1,680 possible state assignments
- 4 states in 4 state bits yields 43,680 possible state assignments
Possible strategies
- sequential – just number states in the order they appear in state table
- gray-code – try to give adjacent states (with an arc between them) codes that differ in only one bit position
- random – pick random codes
- one-hot – use as many state bits as there are states (bit=1 implies state)
- output – use outputs to help encode states
- no guarantee of optimality – another intractable problem
- no known optimal algorithms, just heuristics