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

Missing Clock Watchdog Timer

HardLogic CircuitBuild

Mission-critical systems cannot freeze when a primary oscillator fails. A watchdog circuit monitors the primary high-speed clock using a reliable low-speed reference clock, automatically triggering a failover sequence or system reset if the primary clock dies.

The circuit must monitor clk_fast using clk_slow. Assert alarm high if no rising edges are detected on clk_fast for three consecutive rising edges of clk_slow. If a rising edge occurs on clk_fast, the internal monitor must reset. The system is initialized with an active-low asynchronous reset rst_n.

Constraints

  • Implement using only standard combinational logic gates and D flip-flops.
  • The alarm output must be synchronous to clk_slow.
  • Do not use high-level behavioral counter blocks.
  • Handle asynchronous clock domains safely to prevent metastability.

Topics

state-machineclockingsynchronizationwatchdog

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