Module 17 min

Why Clock Domain Crossing Matters

What breaks when a signal crosses clocks

Why this matters

almost every real chip has more than one clock, and signals constantly pass between them. Get the crossing wrong and the chip fails intermittently in ways simulation often will not show. CDC is one of the most asked-about topics in RTL and verification interviews for exactly this reason.

What a clock domain is

A clock domain is all the logic driven by one clock. Two domains are asynchronous when their clocks have no fixed phase relationship - different frequencies, or the same frequency from different sources. A signal that leaves one domain and is sampled in another has crossed a clock domain boundary.

Why the crossing is dangerous

A flip-flop only captures data reliably if the data is stable for a small window before and after the clock edge (setup and hold). When the source and destination clocks are asynchronous, the source signal can change at any time relative to the destination edge, including right inside that window. There is no way to prevent it by timing alone.

When that happens, the destination flop can go metastable: its output hovers at an undefined level between 0 and 1 before eventually settling to one or the other. If downstream logic samples it while it is still undefined, the design behaves unpredictably.

What goes wrong in practice

  • Random, rare failures that appear only at certain temperatures or voltages
  • Bugs that vanish when you add a probe or slow the clock, then return
  • Data that is corrupted only when bits change at just the wrong moment
Watch out

static timing analysis does not check asynchronous crossings the normal way, because the paths are declared false or asynchronous. So a design can pass timing and still be full of CDC bugs. CDC must be handled in the RTL and checked with dedicated CDC analysis, not ordinary STA.

The plan for this path

You will learn metastability and why it cannot be eliminated, the two-flop synchronizer for single bits, why buses need different handling, gray-coded asynchronous FIFOs, handshake synchronizers, and reset synchronization. By the end you will know which technique to reach for at any crossing.