Codiode

Counter: Lockup Detection Output Signal

MediumLogic CircuitBuild

System watchdogs monitor critical state machines and counters to ensure they do not freeze during operation. A lockup detector flags when a sequential element remains in the identical state across multiple clock cycles, allowing a microcontroller to trigger a reset or alert.

Construct a lockup detection circuit for a 4-bit counter. The circuit receives the current counter state via inputs Q3, Q2, Q1, and Q0. It must register these inputs on every clock cycle to maintain a record of the previous state. The output LOCKUP must be driven HIGH continuously whenever the current state exactly matches the registered previous state. A synchronous active-high rst signal must clear the registered previous state to 0.

Q == Q_prev LOCKUP
0 0
1 1

Constraints

  • Use exactly four D flip-flops to store the previous state.
  • Implement the state comparison using only basic combinational logic gates.
  • Do not use high-level equality comparator blocks: build the bitwise comparison manually.
  • The rst signal must synchronously clear all flip-flops to 0.

Topics

Flip-FlopsCountersState ComparisonWatchdog

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.

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.

Part of Counters

Problem 122 of 139 in the Counters track.

Related problems

Browse all problems · Digital logic design practice problems · Learning tracks

Solve this on a laptopSend yourself the link and continue there.