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

Maximum Pulse Width Timeout

MediumLogic CircuitBuild

Communication buses often rely on shared lines that can be pulled low by any device. If a node fails and holds the line low indefinitely, the entire bus hangs unless a watchdog timer detects the timeout and triggers a reset.

The circuit monitors a single input sig_in. When sig_in is high, the system is idle and the err_flag output remains 0. If sig_in drops low and remains low for more than 15 consecutive clock cycles, err_flag must assert high on the 16th cycle. The err_flag must immediately deassert to 0 on the next clock cycle where sig_in returns high.

Constraints

  • Use sequential logic elements to track the elapsed cycles.
  • Prevent the internal counter from wrapping around to zero if sig_in remains low indefinitely.
  • Reset the internal counter synchronously whenever sig_in is high.

Topics

countererror-detectionstate-machinetimeout

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