image

Clock Domain Crossing for 50 MHz to 150 MHz: Moving 16-bit Data Reliably

A faster receiving clock does not make a clock-domain crossing safe. A 50 MHz producer can be connected to a 150 MHz consumer only if the crossing preserves three properties:

  1. Metastability containment: any asynchronous control signal must be synchronized before it controls destination-domain logic.
  2. Word coherence: all 16 bits observed by the receiver must belong to the same transmitted word.
  3. Flow control: the receiver must not lose words if it stalls, even briefly.

For a continuous 16-bit stream, the correct default architecture is a dual-clock asynchronous FIFO. For occasional register-style transfers, a request/acknowledge handshake is sufficient. A plain two-flip-flop synchronizer is only a single-bit control-signal primitive.

Two-flip-flop synchronizer for a single-bit CDC level signal

Two-flip-flop synchronizer for a single-bit CDC level signal.

Scope and clock assumption

This article assumes the 50 MHz and 150 MHz clocks are asynchronous or treated as asynchronous. That is the conservative assumption when the clocks come from independent oscillators, independently reconfigured PLL outputs, unrelated SoC/FPGA clocking resources, or when the phase relationship is not guaranteed over all modes.

If the 50 MHz and 150 MHz clocks are generated from the same PLL and have a fully constrained, deterministic phase relationship, the transfer may instead be analyzed as a synchronous timing problem. In that case, use explicit generated clocks and static timing analysis. Do not blindly mark related clocks asynchronous just to suppress timing violations.

For an Arria 10 design compiled in Quartus Prime, still run the CDC and metastability reports even when the intended architecture is obvious. CDC failures are structural failures; ordinary RTL simulation usually does not model flip-flop metastability.

1. Why CDC fails

1.1 Metastability

A flip-flop can become metastable when its input changes too close to the active sampling edge. The output eventually resolves to 0 or 1, but the resolution time is not bounded by the normal clock-to-output timing used in RTL simulation.

A two-flip-flop synchronizer reduces the probability that a metastable value escapes into ordinary destination-domain logic. It does not make failure impossible; it makes the mean time between failures large enough for the design target when implemented and constrained correctly.

1.2 Multi-bit incoherence

Synchronizing each bit of a 16-bit data bus independently is not a valid data-transfer scheme.

Unsafe independent synchronization of a 16-bit data bus

Unsafe bus synchronization: each bit may arrive in a different destination cycle, producing word tearing.

Example:

  • Source word changes from W0 = 0xAAAA to W1 = 0x5555.
  • The physical routing and synchronizer resolution of each bit are not identical.
  • The destination might sample a mixture such as 0xA55A.

That value was never transmitted. This is often called word tearing or bus incoherence. A correct CDC design must transfer the word atomically.

2. Throughput for the 50 MHz to 150 MHz case

The source clock period is:

Tsrc = 1 / 50 MHz = 20 ns

The destination clock period is:

Tdst = 1 / 150 MHz = 6.667 ns

If the source produces one 16-bit word every 50 MHz cycle:

word rate = 50 Mword/s
bit rate  = 16 * 50 Mword/s = 800 Mbit/s

If the destination can consume one word per 150 MHz cycle, its theoretical drain capacity is:

drain rate = 150 Mword/s

The average drain rate is therefore sufficient. The CDC problem is not the average rate; it is safe sampling, burst absorption, and backpressure.

FIFO depth when the receiver can stall

If the source continues writing while the destination stalls for Tstall, the FIFO must absorb at least:

Nstall = ceil(fsrc * Tstall)

Add margin for FIFO flag latency, clock tolerance, and software-visible behavior. In practice, choose a power-of-two depth at or above the computed requirement.

Examples:

Destination stall time Minimum words from formula Practical depth
200 ns ceil(50e6 * 200e-9) = 10 16 words
500 ns ceil(50e6 * 500e-9) = 25 32 words
1 us ceil(50e6 * 1e-6) = 50 64 words

This assumes the write side keeps producing one word per source cycle. If the source can stop immediately when full asserts, smaller margins may be acceptable. If full takes multiple source cycles to affect upstream logic, include those in-flight words.

3. CDC techniques

3.1 Two-flip-flop synchronizer: single-bit only

Use a two-flip-flop synchronizer for a single-bit level signal, such as a status bit, mode bit, or slow control input.

Do not use it directly for a 16-bit payload bus. A 2FF chain contains metastability; it does not guarantee that multiple bits are captured in the same destination cycle.

Implementation notes:

  • Register the signal in the source domain before the crossing. This removes combinational glitches that increase the effective toggle rate.
  • Place both synchronizer registers in the destination clock domain.
  • In Quartus, mark synchronizers so the tool can identify and report them, and check the metastability report.

3.2 Independent 16-bit bus synchronizers: avoid

A 16-lane array of two-flip-flop synchronizers looks attractive but is wrong for arbitrary data. Each lane can resolve and be observed in a different destination cycle. The destination can see a value that never existed in the source domain.

Only use a multi-bit bus synchronizer without handshake/FIFO when the encoded protocol guarantees safe intermediate values. Examples include a correctly constrained Gray counter or a one-hot token with explicit protocol guarantees. This is not true for arbitrary 16-bit data.

3.3 Toggle synchronizer: event transfer

A one-cycle source pulse can be missed by the destination if it is not widened or encoded. A common solution is to convert the pulse into a toggle, synchronize the toggle, then edge-detect it in the destination domain.

Pulse-to-toggle event synchronizer across clock domains

Pulse-to-toggle synchronizer for transferring events, not payload data.

This transfers an event, not a payload. If the event indicates that a 16-bit word is available, the word must be stored in a safe structure, such as a handshake-held register or FIFO memory.

3.4 Request/acknowledge handshake: safe but low throughput

A request/acknowledge protocol transfers an occasional word atomically:

  1. The source writes data_hold[15:0] and toggles req.
  2. The destination synchronizes req, detects the change, and latches the data while it is held stable.
  3. The destination toggles ack.
  4. The source synchronizes ack and is then allowed to update data_hold.
Request acknowledge handshake for atomic 16-bit CDC transfer

Request/acknowledge handshake: safe for occasional atomic words, but limited by round-trip CDC latency.

This is robust for register writes, configuration words, commands, and slow status snapshots. It is usually not suitable for a continuous 50 Mword/s stream.

A better first-order throughput estimate is based on the round-trip latency:

Ttransfer >= Nreq_sync * Tdst + Nack_sync * Tsrc + protocol_overhead

With two destination synchronizer stages and two source synchronizer stages:

Ttransfer >= 2 * 6.667 ns + 2 * 20 ns = 53.3 ns

That is an ideal lower bound before edge-detect, latch, acknowledge-generation, and ready-state overhead. A practical implementation is commonly in the range of 60 ns to 100 ns per word, or about 10 Mword/s to 17 Mword/s. It therefore cannot sustain a new word every 20 ns unless you batch multiple words per handshake or replace the handshake with a FIFO.

A dual-clock FIFO is the standard solution for continuous or bursty payload transfer.

Asynchronous FIFO using Gray-coded pointer synchronization

Asynchronous FIFO: the recommended architecture for a continuous 16-bit stream from 50 MHz to 150 MHz.

The payload data is stored in memory. The write pointer is generated in the write clock domain; the read pointer is generated in the read clock domain. Pointer values cross domains using synchronizer chains, typically after conversion to Gray code so only one pointer bit changes per increment:

gray = binary xor (binary >> 1)

The FIFO derives full in the write domain and empty in the read domain from synchronized pointer values. Data is read only when empty = 0, and written only when full = 0.

For Intel FPGA designs, prefer the vendor FIFO IP (DCFIFO / FIFO Intel FPGA IP) unless there is a strong reason to build a custom FIFO. The IP already accounts for device-specific memory, synchronization, flag latency, and timing constraints.

Recommended starting parameters for this example:

Parameter Suggested value
Write clock 50 MHz
Read clock 150 MHz
Data width 16 bits
Depth 16 words minimum for 200 ns read stalls; 32 words for 500 ns stalls
Synchronization At least the vendor setting intended for unsynchronized clocks
Reset Use the FIFO IP reset synchronization options where available
Status Use full only in the write clock domain and empty only in the read clock domain

3.6 DIY asynchronous FIFO: possible, but verify deeply

A custom FIFO can be built from true dual-port RAM, binary local pointers, Gray-coded crossing pointers, two-or-more-stage synchronizers, and local full/empty logic. This is an advanced design block, not a casual exercise.

For a custom FIFO, verify at least:

  • no write occurs when full;
  • no read occurs when empty;
  • read data order exactly matches write order;
  • full and empty are generated only in their local domains;
  • reset releases safely in both domains;
  • Gray pointer bits meet skew or maximum-delay constraints so the destination observes one-bit changes;
  • CDC tools identify only the intended crossings.

4. Selection guide

Decision guide for selecting a CDC structure

CDC selection guide for single-bit controls, events, occasional words, and streams.

Use the following rules:

Requirement Recommended CDC structure
One slow-changing status/control bit 2FF synchronizer
One event or interrupt toggle synchronizer, optionally with acknowledge
Occasional 16-bit command or register value request/acknowledge handshake
Continuous or bursty 16-bit stream asynchronous FIFO
High-rate packetized data with backpressure asynchronous FIFO with explicit almost-full/almost-empty policy
Arbitrary 16-bit bus sampled through 16 independent synchronizers do not use

5. Quartus / Arria 10 verification checklist

For an Arria 10 FPGA project, use a CDC checklist that is visible in review and repeatable in CI or a scripted build.

Clock constraints

Declare the clocks explicitly:

create_clock -name clk_50m  -period 20.000 [get_ports clk_50m]
create_clock -name clk_150m -period 6.667  [get_ports clk_150m]

If the clocks are truly unrelated, group them as asynchronous at the top level, but do not use this as a substitute for correct CDC structures:

set_clock_groups -asynchronous \
  -group [get_clocks clk_50m] \
  -group [get_clocks clk_150m]

When using Intel FIFO IP, keep the generated/embedded constraints with the IP. For custom Gray-pointer CDC paths, add appropriate maximum skew or delay constraints to preserve the one-bit-at-a-time property at the destination synchronizers.

Reports to inspect

Run and inspect:

report_cdc_viewer -summary -panel_name "CDC Summary"
report_metastability -panel_name "Metastability"

Look for:

  • unexpected raw paths between clk_50m and clk_150m;
  • synchronizer chains that Quartus does not identify;
  • combinational logic before synchronizer chains;
  • multi-bit CDC crossings that are not FIFO pointers, Gray counters, or handshakes;
  • reset-domain crossings, especially asynchronous reset release paths.

RTL review rules

  • CDC payloads cross through FIFO memory or a handshake-held register, not directly through combinational logic.
  • full is consumed only by write-domain logic.
  • empty is consumed only by read-domain logic.
  • Source-domain data for a handshake remains stable until acknowledged.
  • Synchronizer outputs drive destination-domain logic only; first-stage synchronizer outputs do not fan out.
  • Testbenches vary clock phase, frequency ratio, reset timing, stalls, and burst length.

6. Correct answer for this 50 MHz to 150 MHz problem

For a continuous stream of 16-bit words produced at 50 MHz, use an asynchronous FIFO.

A request/acknowledge handshake is safe but too slow for one word every 20 ns. A two-flip-flop synchronizer is correct for a one-bit status signal but not for the 16-bit payload. A 16-bit array of independent synchronizers is unsafe because it can tear words.

The smallest practical FIFO depth depends on the longest destination stall. If the read side can stall for 200 ns, use at least 16 words. If it can stall for 500 ns, use at least 32 words. If Linux-visible software or a memory-mapped register interface can introduce longer pauses, size the FIFO from the worst-case pause, not from the 150 MHz average drain rate.

Exercises

  1. A 50 MHz source produces one 16-bit word every cycle. The 150 MHz consumer can stall for 500 ns. What FIFO depth should you choose?
  2. Why does synchronizing all 16 bits independently not guarantee a valid received word?
  3. In a REQ/ACK crossing, why must the source hold data_hold[15:0] stable until ACK returns?
  4. What extra constraint concern exists for Gray-coded FIFO pointers after place-and-route?

Answers

  1. ceil(50e6 * 500e-9) = 25, so choose at least 32 words.
  2. Different bits can be captured on different destination clock edges, producing a mixed old/new word.
  3. The destination samples the data after it observes the synchronized request; if the source changes the data before the acknowledge returns, the sampled word is not guaranteed coherent.
  4. Gray code changes one source bit per increment, but post-route skew can make multiple bit transitions appear at different destination sampling times unless the pointer CDC path is correctly constrained.

References