Timing is a very important issue in state machine design. In order for a carefully sequenced design to work correctly, various timing conditions must be met. See Figure 65.
Flip flop data sheets specify the values for these (and other) parameters which the designer must take into account. For instance, set up and hold times must be met when applying data to a flip flop.
If the setup and hold time requirements are not met, then correct operation of the memory element and hence of the state machine cannot be guaranteed.
For instance, suppose tsu = 20 ns, be the data arrives only 10 ns before the active clock edge. Then the device can enter a metastable state, Figure 66.
The late arriving data can push Q half-way from LOW to HIGH, i.e. somewhere in the invalid range of voltages. This can cause problems and errors in circuits connected to Q.
Moreover, Q can go either LOW or HIGH, so the next state is unpredictable.
Metastable states should be avoided.
ANU Engineering - ENGN3213