So I am to design a mealy state machine which detects the sequence 101. The state diagram was given, and from there I obtained the flip-flop excitation equations. I am supposed to use 2-1 multiplexers to implement the excitation equations, but I am having difficulty tying this together with T flip flops. I don't want anyone to do my assignment for me (which is why I'm only asking for theoretical answers), but I am a bit stuck as to how to approach this.
The steps from diagram to circuit are:
- Create the state transition table
- state before (name, encoded)
- inputs (external, internal)
- flipflop input (T)
- flipflop output (Q)
- state after (name, encoded)
- Fill in states (before, after) regarding your diagram
- encode each state in the diagram. E.g. binary or one-hot
- Double all lines for each external input
- Fill out the Q columns (identical to state after, because Q saves the state)
- Use the T-FF transition table to fill out the T columns.
FF transition tables:
D-FF Q -> Q' | D ----------------- 0 0 | 0 0 1 | 1 1 0 | 0 1 1 | 1 T-FF Q -> Q' | T ----------------- 0 0 | 0 0 1 | 1 1 0 | 1 1 1 | 0
These tables describe how D or T must be driven to change Q to Q'.
Last step: The equations use all inputs (external and internal) and produce T.