7. Repair the Locked FSM

Loading simulator…

A deadlock or lock-up occurs when an FSM becomes trapped and cannot make required progress.

The circuit uses decoded present-state signals so that each conditional transition remains visible:

I = Q2'·Q1'·Q0'       L = Q2'·Q1'·Q0
R = Q2'·Q1·Q0'        J = Q2'·Q1·Q0
S = Q2·Q1'·Q0'        D = Q2.Q1.Q0'

The correct conditional transition terms are:

T_RJ = R·X'           T_RD = R·X
T_JJ = J·X'           T_JS = J·X
T_SS = S·X

They drive the implemented destination equations:

D2 = T_RD + T_JS + T_SS
D1 = L + T_RJ + T_JJ + T_RD
D0 = I + T_RJ + T_JJ
Y  = D = Q2·Q1·Q0'

I and L connect directly to the appropriate D-input networks because IDLE → LOAD and LOAD → RUN are unconditional; extra AND gates would only act as buffers.

There is no physical T_SI or T_DI: SERVICE + X=0 and DONE both go to IDLE = 000, so neither transition needs to assert a HIGH D-input bit.

The same absence of HIGH terms returns unused encodings 101 and 111 safely to IDLE.

In the faulty template, decoded J directly feeds the D1 and D0 retention paths, making JAM retention independent of X, while no J·X path asserts D2.

Consequently both JAM + X=0 and JAM + X=1 return to 011, and SERVICE is unreachable from JAM.

The localized repair qualifies the retention path as T_JJ = J·X' and adds the escape path T_JS = J·X to D2.

Thus X=0 retains JAM, while X=1 generates D2D1D0 = 100 and enters SERVICE. All non-JAM transition logic remains unchanged.