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

Clock Switch with Asynchronous Reset

HardLogic CircuitBuild

A glitch-free clock multiplexer must power up in a deterministic state to ensure downstream logic receives a valid clock immediately. If the synchronization flip-flops initialize randomly, the entire chip may receive no clock and fail to boot.

Implement a glitch-free clock switch that selects between clk_a and clk_b based on the sel signal. To prevent runt pulses during switching, use negative-edge-triggered synchronizers with cross-coupled feedback to enforce a break-before-make policy. The circuit must use the active-high asynchronous rst signal to force the switch into a safe state where clk_a is selected by default.

| rst | sel | Active Clock | clk_out | |-------|-------|--------------|-----------| | 1 | X | clk_a | clk_a | | 0 | 0 | clk_a | clk_a | | 0 | 1 | clk_b | clk_b |

Constraints

  • Implement a break-before-make glitch-free clock multiplexer.
  • Use only negative-edge-triggered flip-flops for synchronization.
  • Route the asynchronous rst signal to the flip-flop preset and clear pins to enforce clk_a as the default.
  • Do not use positive-edge-triggered flip-flops.

Topics

multiplexerresetclockingsynchronization

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