3.4.14 · D5Sequential Circuits

Question bank — Clock domain crossing

1,398 words6 min readBack to topic

Prerequisite mental models you should already own: the ball on the hill, the setup/hold window, and what makes two clocks "unrelated".


True or false — justify

A two-flop synchronizer completely eliminates metastability.
False. Metastability is physics and can never be removed; the synchronizer only gives the first flop time to resolve, pushing the probability of failure down so MTBF becomes astronomically large but still finite.
If two clocks have the exact same frequency, no CDC discipline is needed.
False. Same frequency but unknown or drifting phase still means the source can change data inside the destination's setup/hold window, so it is still an asynchronous crossing needing a synchronizer.
Adding one more flop to a synchronizer (three stages) multiplies reliability.
True. Each extra stage adds one clock period of settling , and MTBF , so reliability is multiplied by — a huge factor per stage.
A faster destination clock always makes CDC safer.
False. A faster clock means a shorter period, so less settling time per flop and a higher in the denominator — both shrink MTBF. Faster is generally worse for a fixed synchronizer.
You can safely run a 32-bit bus through 32 independent two-flop synchronizers.
False. Each bit resolves after an independent random delay, so bits can land on different cycles; the receiver may assemble a word that was never actually sent — this is data incoherence.
Gray code is safe to cross because at most one bit differs between consecutive values.
True. If only one bit is changing during a transition, even if that bit goes metastable the receiver reads either the old or the new count — both are valid, off by at most one.
In a handshake, the wide data bus is passed through synchronizers.
False. Only the 1-bit req/ack control lines are synchronized; the data bus is held stable and is only sampled after the receiver knows (via synced req) it is safe, so the bus itself never crosses through a synchronizer.
MTBF depends on the data toggle rate , not just the clock.
True. More frequent asynchronous input changes means more chances to violate setup/hold, so MTBF — a rarely-changing signal is inherently safer.
If MTBF comes out to "longer than the age of the universe," the design is guaranteed to never fail.
False. MTBF is a statistical mean; a failure could occur tomorrow, just with vanishingly small probability. "Astronomically unlikely" is not "impossible."

Spot the error

"The available settling time is exactly one clock period, ."
Missing terms. The correct window is : FF1's output appears only after its clock-to-Q delay (extends the window) and FF2 needs data one setup time early (shrinks it).
"Since FF1 goes metastable, we should tap its output for our logic and let FF2 handle the clean copy."
Wrong tap point. The metastable node (FF1 output) must feed nothing but FF2; any other logic reading a mid-resolution voltage can itself go metastable or diverge. Only FF2's stable output is used.
" is the time we wait for the signal to settle."
Confused symbols. is the flop's regeneration time constant (a fixed technology property, ~tens of ps). The time we choose to wait is ; safety comes from making the ratio large.
"To fix a marginal MTBF, increase ."
Backwards and impossible. is a measured device constant you cannot tune, and it sits in the denominator — larger gives worse MTBF. You fix MTBF by increasing (more stages).
"I'll synchronize req and ack but skip the synchronizers to save area since they're just one bit."
Fatal. req and ack are the very control signals crossing the boundary — if they are not synchronized they can go metastable and the entire handshake can deadlock or double-latch. The single-bit control lines are exactly what must be synchronized.
"Gray-coding a binary bus of arbitrary data words makes it safe to cross."
Misapplied. Gray code only guarantees single-bit changes for values that increment/decrement by one (like counters/pointers). Arbitrary data can jump by many bits at once, breaking the one-bit-change guarantee — use a handshake or FIFO instead.

Why questions

Why is the MTBF formula exponential in ?
Because near the peak the flop acts as a positive-feedback amplifier, ; the probability it is still unresolved decays as , so each extra bit of waiting multiplies reliability rather than merely adding to it.
Why do we clock both synchronizer flops with the destination clock, not the source?
The goal is to hand data safely into the destination's timing; sampling with the destination clock is what aligns the resolved value to the destination edges. Using the source clock would leave the crossing unsynchronized.
Why is a handshake slower than just synchronizing bits directly?
Each control bit must be synchronized through two flops in each direction (req over, ack back), costing several clock cycles of latency per transfer — the price paid to guarantee the data bus is stable and coherent.
Why does an asynchronous FIFO use Gray-coded pointers rather than binary?
The read and write pointers must cross into the opposite clock domain to compare full/empty; Gray coding ensures only one pointer bit changes per step, so a metastable bit still yields a pointer off by at most one — safe for the comparison logic.
Why can't we make MTBF truly infinite by adding enough stages?
Each stage multiplies MTBF by a finite factor ; the product is enormous but always finite because the initial imbalance can be arbitrarily close to zero, giving a non-zero (if tiny) chance of not resolving in any fixed time.

Edge cases

What happens if the async input changes exactly once and then stays constant forever?
Only that single edge can violate setup/hold, so there is at most one metastability event; after it resolves the signal is stable and safe. Low makes MTBF large — this is the friendliest case.
What if the two clocks happen to be integer-related (e.g. 2:1) with a fixed known phase?
Then the crossing may be mesochronous/synchronous — with a fixed, characterizable phase relationship you might meet setup/hold by static timing analysis and skip synchronizers, but only if the skew is truly bounded and known. Treat as CDC otherwise.
What if the settling window comes out negative (very fast clock, large )?
The first flop has no time to resolve before FF2 samples it, so the synchronizer offers essentially no protection; MTBF collapses toward the raw failure rate. You must slow the clock, add stages, or redesign.
What if the destination clock stops while a signal is mid-metastable?
With no more clock edges, FF2 never re-samples, so the metastable voltage on FF1 continues to resolve on its own (analog physics) but the resolved value is not captured until clocking resumes — a stalled clock does not "freeze" metastability, it just delays capture.
What about crossing a signal from a fast domain to a much slower one — can the slow clock miss a short pulse?
Yes. If the source pulse is narrower than the destination clock period, the slow domain can sample between edges and miss it entirely. This needs pulse-stretching or a proper handshake, not just a two-flop synchronizer.

Recall One-line summary of every trap

Metastability is never removed (only made rare), settling time has three terms not one, single bits use two flops, counters use Gray code, and whole words use a handshake or async FIFO — never brute-force a bus.