ArticleslgStudy

engineering

Clock domain crossing

Clock domain crossing is a engineering topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Clock domain crossing rather than just read about it. In short: 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.

Clock domain crossing — main illustration
Clock domain crossing — illustration

Key takeaways

  • Clock domain crossing belongs to engineering; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Clock domain crossing to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Clock domain crossing from memory before moving on to harder problems.

Reference excerpt

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.

Illustrations

Clock domain crossing: Generic clock domain crossing synchronizer
Generic clock domain crossing synchronizer
Clock domain crossing: Metastability caused by timing violation
Metastability caused by timing violation
Clock domain crossing: A 2FF synchronizer
A 2FF synchronizer
Clock domain crossing illustration
Clock domain crossing illustration

Worked examples

Example 1 — a first encounter with Clock domain crossing

Start with the simplest possible case. Write down what Clock domain crossing claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In engineering, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Clock domain crossing before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Clock domain crossing ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Clock domain crossing

In research
Clock domain crossing appears in engineering research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Clock domain crossing in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Clock domain crossing is common in secondary-school and first-year university syllabi. It links to neighbouring topics Electronic circuit verification, Telecommunication theory, so understanding it makes those chapters shorter.
In everyday life
Look for Clock domain crossing outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Clock domain crossing” →

How to study Clock domain crossing in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Clock domain crossing means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Clock domain crossing out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Clock domain crossing in simple terms?

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 C…

Why does Clock domain crossing matter?

Because it connects several engineering ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Clock domain crossing?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Clock domain crossing.

Tags

  • Electronic circuit verification
  • Telecommunication theory

Keep exploring