In digital electronics, clock domain crossing (CDC) is the process of transferring a bit signal or multi-bit signal group from a clock domain to a different clock domain. Many digital systems have multiple clock domains that must exchange information with one another via signals, and consequently CDC is widely used in such systems. Usually it is impractical to implement CDC by directly connecting a signal from one clock domain to another, as this can result in glitches or metastability (or both) that might corrupt the information received in the destination clock domain. Various techniques are used to avoid these problems and ensure that information is reliably conveyed across clock domains. In general, all of these techniques involve synchronizing the signals of interest to the clock signal that drives the destination clock domain. In any particular application, the appropriate CDC technique may be determined by factors such as the relationship between source and destination clock frequencies, peak data transfer rate, signal duration, and whether a signal represents control or data information.
Clock domains Many digital systems have more than one clock domain, a circuit in which all sequential elements (e.g., flip-flops) are triggered by the same clock signal. For example, many SoCs and microcontrollers have interfaces and independent power domains that necessarily operate in different clock domains. Also, clock skew caused by speed-of-light delays and other factors can limit the physical size of a clock domain, making it necessary in some cases to divide a large clock domain into smaller ones. Some systems employ clock gating which, due to gate propagation delay, effectively creates a unique clock signal and thus a new clock domain. In such systems, it is often necessary for different clock domains to communicate with each other by sending signals from one clock domain to another.
CDC reliability issues
The clock signals in two different clock domains may have different frequencies or phases, or both. In either case, the timing relationship between the active edges of the two clock signals cannot be relied upon to be consistent. Consequently, each clock signal – and therefore all of the synchronous signals in its domain – are effectively asynchronous from the perspective of the other clock domain. This is potentially problematic, because metastability can occur if an asynchronous signal changes state at nearly the same time it is sampled in a destination clock domain. More specifically, this is caused by a signal edge that violates the setup or hold time requirements of the sampling flip-flop. When this happens, the flip-flop may briefly output disruptive, invalid logic levels before eventually settling at an unpredictable, legal level, which in turn can cause error-inducing glitches and data loss.
Common CDC techniques
Single-signal CDC
2-FF synchronizer
To avoid CDC metastability and its associated problems, a standalone signal is in many cases synchronized to the destination clock by passing it through a chain of two flip-flops (FFs) in the destination clock domain (a 2-FF synchronizer). The first FF in the chain performs the initial synchronization by sampling the signal on destination clock active edges, while the second FF serves to filter out any metastability at the output of the first FF. To ensure reliable performance, any metastability at the first FF output must fully decay within one clock cycle (i.e., before it is sampled by the second FF).
3-FF synchronizer The reliability of a 2-FF synchronizer is specified in terms of the mean time before failure (MTBF) to eliminate metastability at the synchronizer output. In this context, a failure occurs when metastability persists in the first FF for an entire clock cycle and causes the second FF to also become metastable, thus potentially disrupting downstream logic. MTBF is inversely proportional to the destination clock frequency, and consequently it may become unacceptably low at very high clock speeds. In such cases, an additional FF is usually added to the synchronizer to increase the MTBF, thus creating a 3-FF synchronizer.
Synchronizing to slower domains Transferring a stand-alone signal to a clock domain with a lower clock frequency will often require additional circuitry beyond a basic 2-FF synchronizer and, in some cases, may require feedback from the destination domain to the source domain indicating that the signal was received.
Toggle synchronizer A 2-FF synchronizer cannot reliably transfer a one-cycle-wide pulse to a lower frequency clock domain because the entire pulse could occur between consecutive active edges of the destination clock, and consequently would not be captured by the synchronizer's input flip-flop. The toggle synchronizer shown below resolves this by converting each pulse to a signal edge, producing a signal that changes state when a pulse arrives. The signal is transferred to the destination clock domain with a 2-FF synchronizer and then processed by an edge detector, which completes the CDC transfer by issuing a synchronized pulse with a duration of exactly one destination clock cycle.
Multi-bit data buses
Multi-cycle path (MCP/DMUX) In cases where a CDC multi-bit data bus can tolerate several clock cycles per transfer without data loss (e.g., slowly changing configuration registers; occasional status updates), the CDC circuit is often split into separate control and data paths, a mechanism known as a multi-cycle path (MCP) or mux-recirculation (DMUX) synchronizer. In a DMUX synchronizer, the control path consists of a single synchronized bit that indicates data is stable, while the data path is simply the data bus, directly connected without synchronization to the destination clock domain. By synchronizing a single control bit rather than synchronizing every data bit individually, this technique results in a relatively simple circuit. In operation, the source domain sends a data word by holding it steady for multiple clock cycles while asserting the control bit. When the synchronized control bit arrives in the destination domain, the unsynchronized data is already stable, allowing the multiplexer to synchronously gate the word to its outputs. The control bit is then negated by the source domain and, when it has propagated through the synchronizer, the multiplexer effectively becomes a latch that stores the word.
… excerpt ends here. Continue reading the full article.





