| 1. |
Difference Between Onehot And Binary Encoding? |
|
Answer» Common classifications used to describe the state encoding of an FSM are Binary (or highly encoded) and One hot. A binaryencoded FSM design only requires as many flipflops as are needed to uniquely encode the number of states in the state machine. The actual number of flipflops required is EQUAL to the ceiling of the logbase2 of the number of states in the FSM. A onehot FSM design requires a flipflop for each state in the design and only one flipflop (the flipflop representing the current or “hot” state) is set at a time in a one hot FSM design. For a state machine with 916 states, a binary FSM only requires 4 flipflops while a onehot FSM requires a flipflop for each state in the design FPGA vendors frequently recommend USING a onehot state encoding style because flipflops are PLENTIFUL in an FPGA and the combinational logic required to implement a onehot FSM design is TYPICALLY smaller than most binary encoding styles. Since FPGA performance is typically related to the combinational logic size of the FPGA design, onehot FSMs typically run FASTER than a binary encoded FSM with larger combinational logic blocks Common classifications used to describe the state encoding of an FSM are Binary (or highly encoded) and One hot. A binaryencoded FSM design only requires as many flipflops as are needed to uniquely encode the number of states in the state machine. The actual number of flipflops required is equal to the ceiling of the logbase2 of the number of states in the FSM. A onehot FSM design requires a flipflop for each state in the design and only one flipflop (the flipflop representing the current or “hot” state) is set at a time in a one hot FSM design. For a state machine with 916 states, a binary FSM only requires 4 flipflops while a onehot FSM requires a flipflop for each state in the design FPGA vendors frequently recommend using a onehot state encoding style because flipflops are plentiful in an FPGA and the combinational logic required to implement a onehot FSM design is typically smaller than most binary encoding styles. Since FPGA performance is typically related to the combinational logic size of the FPGA design, onehot FSMs typically run faster than a binary encoded FSM with larger combinational logic blocks |
|