FSM and Efficient Synthesizable FSM Design Using Verilog
FSM and Efficient Synthesizable FSM Design Using Verilog
CLK
Binary Encoded or One Hot Encoding
000 00001
IDLE IDLE
10000
001 00010
S4 S1 S4 S1
110
011 00100
010 S3 S2 01000 S3 S2
Binary Encoded or One Hot Encoding
A binary-encoded FSM design only requires as
many flip-flops as are needed to uniquely encode
the number of states in the state machine.
Number of FF
if(log2(number of states) == integer)
required FF = log2(number of states)
else
required FF = integer(log2(#states))+1;
Binary Encoded or One Hot Encoding
A onehot FSM design requires a flip-flop for each
state in the design and only one flip-flop (the flip-
flop representing the current or "hot" state) is set
at a time in a onehot FSM design.