Loading simulator…
Use the following one-hot assignment:
| State | Q3Q2Q1Q0 |
|---|---|
| IDLE | 0001 |
| ACTIVE | 0010 |
| COMPLETE | 0100 |
| ERROR | 1000 |
The D inputs are obtained directly from the transitions entering each state:
D0 = fault'·Q0·start'
D1 = fault'·(Q0·start + Q1·complete' + Q2·start)
D2 = fault'·(Q1·complete + Q2·start')
D3 = fault·(Q0 + Q1 + Q2) + Q3
The common fault' factor disables all normal destinations when a fault occurs.
D3 then loads ERROR, so the fault path has highest priority.
In ACTIVE, D2 uses complete while the hold term in D1 uses complete'; therefore a simultaneous start = 1 cannot override completion.