Skip to content
BetterDL

Lock-up state

Also called: lockup state, lock-up, lockout state, hang state

An unused state, or a loop of unused states, that a counter or state machine can enter at power-up and never leave, so it never reaches its proper sequence.

A lock-up state is a trap. The machine gets into it, usually at power-up or after a glitch, and the next-state logic keeps it there, or keeps it cycling among other bad states, forever. The normal sequence is never reached, and the circuit looks dead.

Lock-up comes from unused states. During design their next states are don't-cares, and the K-map simplification quietly fills each one with a 0 or 1. Nothing forces those choices to lead anywhere sensible. If an unused code happens to point at itself, or two unused codes point at each other, you have a lock-up.

Famous cases:

How to prevent it:

  • After choosing equations, check every unused code (see self starting counter).
  • If one locks up, choose that don't-care differently, even if it costs a gate.
  • Add a reset that forces a valid state at power-up.
startCLKCLKCLKCLK00011011

Worked example

Example

A mod-3 counter that locks up

A mod-3 counter runs 00 → 01 → 10 → 00 on D flip-flops; code 11 is a don't-care. A designer fills that don't-care with 1 in both K-maps, giving D1 = and D0 = . The diagram shows the result.

  1. 1.

    Real states: 00 → D1 = 0, D0 = 1 → 01 ✓. 01 → 10 ✓. 10 → D1 = 0, D0 = 0 → 00 ✓.

  2. 2.

    Unused 11: D1 = 1, D0 = 0 + 1 = 1 → 11. It stays there forever: a lock-up state.

  3. 3.

    Fix: treat that don't-care as 0 in D0's map, so D0 = . Now 11 → 10, a real state, and the counter is self-starting.

Common mistakes

  • Assuming don't-cares can't cause trouble. Once the equations exist, each don't-care has a definite next state.

  • Only checking for self-loops. Two or more unused states that cycle among themselves lock up too.

  • Relying on the machine "never" starting in a bad code. Power-up states are unpredictable.

Practice Lock-up state

Interactive questions with instant feedback and a worked solution for every wrong answer.

Learn it step by step

Lock-up state is taught in Counters and Finite State Machines.