CodiodeCodiode
Home
Problem Solving
Skill Tracks
My Assignments
Contests
Leaderboard
Community
Settings
Codiode/Problems/Sequential Logic

Unreachable Recovery State

MediumLogic CircuitDebug

A one-hot encoded state machine controls a critical sequence and must recover to an idle state if radiation or power glitches cause an invalid state. The next-state logic computes the next state N2, N1, N0 based on the current state S2, S1, S0 and a Go signal.

Expected behavior:

| S2 | S1 | S0 | Go | N2 | N1 | N0 | Note | |---|---|---|---|---|---|---|---| | 0 | 0 | 1 | 0 | 0 | 0 | 1 | IDLE wait | | 0 | 0 | 1 | 1 | 0 | 1 | 0 | IDLE to ACTIVE | | 0 | 1 | 0 | 0 | 1 | 0 | 0 | ACTIVE to DONE | | 0 | 1 | 0 | 1 | 1 | 0 | 0 | ACTIVE to DONE | | 1 | 0 | 0 | 0 | 0 | 0 | 1 | DONE to IDLE | | 1 | 0 | 0 | 1 | 0 | 0 | 1 | DONE to IDLE | | 0 | 1 | 1 | 0 | 0 | 0 | 1 | Invalid state recovery | | 1 | 1 | 1 | 1 | 0 | 0 | 1 | Invalid state recovery | | 0 | 0 | 0 | 0 | 0 | 0 | 1 | Invalid state recovery |

Simulation shows N0 = 0 for input S2=0, S1=1, S0=1, Go=0. The state machine fails to recover from an invalid state. Inspect the circuit and correct the fault.

Constraints

  • Do not modify the logic paths for valid state transitions.
  • Ensure all invalid one-hot states route to the IDLE state.

Topics

one-hotdebugstate-machinefault-recovery

Solve this problem

Place the gates, wire them up and watch the signals settle. Every submission runs on the same simulation engine that grades it.

This problem is part of Codiode Pro. The statement above is free to read.

Sign in to solveSee what Pro unlocks

The circuit builder and code editor need a desktop screen. On a phone, read the problem here and open it on a laptop to solve.

Related problems

  • 3-bit Ripple Counter from Toggle Flip-FlopsEasy
  • D Latch from a 2:1 MUXEasy
  • 2-bit Ring CounterEasy
  • T Flip-Flop from a D Flip-FlopEasy
  • Handshake Deadlock Due to Early ResetHard
  • Reconvergence of Individually Synchronized BitsHard
  • Debug: Asynchronous Clear GlitchHard
  • Clock Gate Enable Crossing DomainsHard

Browse all problems · Learning tracks