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

Why One FF Is Insufficient for Synchronization

MediumLogic CircuitTiming Diagram

Two positive-edge-triggered D flip-flops are connected in series: Q1 samples ASYNC_IN, and Q2 samples Q1. Four signals are shown: CLK (clock, period 8), ASYNC_IN (asynchronous input), Q1 (first stage output, initially 0), and Q2 (second stage output, initially 0). If a flip-flop's input changes at the exact same time step as a CLK LOW-to-HIGH transition, its output becomes metastable (X). Assume metastability on Q1 resolves to a stable 1 at time step 10. Trace both Q1 and Q2 across all 16 time steps.

Constraints

  • Use X for any time step where a signal is metastable.
  • Assume the flip-flops have zero propagation delay and sample the value present immediately prior to the clock edge.

Topics

Flip-FlopsMetastabilitySynchronizer

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