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

Wake Up Logic for Gated Clock

HardLogic CircuitBuild

Mobile processors and IoT sensors power down their clock trees to save energy. When the clock is off, standard synchronous logic is frozen and cannot detect the signal to turn the clock back on.

Design an asynchronous wake-up controller that manages a clock gate. The circuit receives a continuous clk_in, a synchronous active-high sleep_req, and an asynchronous active-high wake_irq.

The system maintains an internal enable state. When sleep_req is high during a rising clock edge, the enable state drops to 0. When wake_irq goes high, the enable state is asynchronously forced to 1 immediately, regardless of the clock. The final output clk_out is the logical AND of clk_in and the system enable.

| sleep_req | wake_irq | Clock Edge | Next Enable State | |-------------|------------|------------|-------------------| | X | 1 | Asynchronous | 1 (Awake) | | 0 | 0 | Rising | 1 (Awake) | | 1 | 0 | Rising | 0 (Sleep) |

Constraints

  • Use a D flip-flop with an asynchronous preset/set pin to hold the system enable state.
  • Do not use a latch for the clock gate: use a simple AND gate for this idealized implementation.
  • The asynchronous set must override the synchronous D input.

Topics

Flip-FlopsSynchronizationClock Gating

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