Clock Domain Crossing (CDC)
Definition
A Clock Domain Crossing (CDC) occurs when a signal, data word, or control signal generated in one clock domain is consumed in another clock domain that operates asynchronously (i.e., with an unrelated or derived clock frequency/phase). SoC and FPGA designs frequently contain multiple asynchronous clock domains, particularly under the Globally-Asynchronous Locally-Synchronous (GALS) power-management approach used to improve energy efficiency.
Metastability and Functional Risk
When a signal transitions near the sampling edge of a receiving flip-flop in another domain, the receiving storage element can enter a metastable state, potentially propagating an indeterminate logic value downstream. CDC paths are therefore prone to metastability-induced functional bugs. Per the formal-verification literature on CDC, conventional methods such as register-transfer-level (RTL) simulation and static timing analysis are not sufficient on their own to catch every CDC issue, leaving verification gaps. CDC-related bugs are among the most common causes of costly silicon re-spins.
Mitigation: Synchronization Primitives
The standard mitigation is to insert synchronization primitives on the crossing path so that metastability cannot propagate functional errors. In OpenTitan's design governance, for example, the sign-off checklist requires that "All CDC synchronization flops use behavioral synchronization macros (e.g. prim_flop_2sync) not manually created flops." Such two-flop (or multi-flop) synchronizers are constructed from carefully separated back-to-back flops that give the metastable state time to resolve before downstream logic samples the value.
Verification Practice
Recommended verification practice for CDC includes:
- Setting up a dedicated CDC checking run when tooling is available.
- Ensuring the CDC run shows no must-fix errors, with any remaining issues captured in a reviewed waiver file.
- Block-level CDC flows may be waived only when no such tooling exists at the block level.
- Complementing structural CDC checks with pragmatic formal verification, including Metastability Injection (MSI) on identified CDC paths, to reduce verification gaps.
Related Considerations
- Reset Domain Crossing (RDC): Closely related discipline covering reset signal propagation across domains. The OpenTitan checklist treats it as a parallel requirement, with an RDC run expected to be configured and free of must-fix errors.
- Distributed configuration memory: Settings-register architectures can be distributed to support clock-domain crossing and dynamic partial reconfiguration, trading off fan-out for resource efficiency on FPGAs.
See Also
prim_flop_2sync— behavioral synchronization macro used to implement CDC flops.