Mealy FSM using T flip flops

digital-logicflipflopmultiplexer

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.

Best Answer

The steps from diagram to circuit are:

  1. Create the state transition table
    • state before (name, encoded)
    • inputs (external, internal)
    • flipflop input (T)
    • flipflop output (Q)
    • state after (name, encoded)
  2. Fill in states (before, after) regarding your diagram
  3. encode each state in the diagram. E.g. binary or one-hot
  4. Double all lines for each external input
  5. Fill out the Q columns (identical to state after, because Q saves the state)
  6. 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.