Verifying premium access...
CDC Course / Module 6: Fast-to-Slow CDC Challenges
Lesson 6.1

The "Three Edge" Requirement

When crossing signals between clock domains, our focus is usually on mitigating metastability when going from a slow clock to a fast clock. However, a far more insidious problem occurs when crossing from a FAST clock to a SLOW clock domain. In this scenario, signals might disappear entirely if they aren't held stable for long enough. Welcome to the "Three-Edge" requirement.

1 The Fast-to-Slow Pulse Problem

Consider a control signal generated in a 500 MHz clock domain (period = 2ns) that needs to be synchronized into a 100 MHz clock domain (period = 10ns). If the sending logic asserts a pulse for just one clock cycle (2ns), what happens when the 100 MHz receiving domain tries to sample it?

Because the receiving clock only ticks every 10ns, the 2ns pulse might easily occur completely between two rising edges of the slow clock. The synchronizer flops are never clocked while the pulse is active. The signal is entirely missed.

Invisible Failure

Unlike metastability which can cause unpredictable glitches, a missed pulse due to violating the Three-Edge requirement causes silent failure. The synchronizer perfectly ignores the pulse, meaning state machines hang or data is dropped. Furthermore, standard RTL simulations might completely miss the problem if clock phases happen to perfectly align in the testbench.

2 The Three-Edge Rule Explained

To guarantee that a slow clock will capture a signal generated by an asynchronous or faster clock, the signal must span at least three consecutive edges of the receiving clock (i.e., at least 1.5 clock periods of the slow clock).

// Minimum required pulse width for reliable CDC
Tpulse_min > 1.5 × Treceive_clk

Why exactly 1.5 periods (or 3 edges)?

3 Timing Diagram: Missed vs. Captured

clk_fast clk_slow pulse_miss pulse_good Missed entirely! Safely sampled here

4 Worked Example

200 MHz to 50 MHz Crossing

A sender logic block operates on a clk_200 domain. It generates a valid pulse data_vld lasting exactly one cycle. We need to pass this to a synchronizer in the clk_50 domain.

Parameter Value Calculation
Sender Clock Period (T_fast) 5 ns 1 / 200 MHz
Receiver Clock Period (T_slow) 20 ns 1 / 50 MHz
Default Pulse Width 5 ns 1 T_fast cycle
Required Minimum Pulse Width 30 ns 1.5 × 20 ns

Conclusion: The 5ns pulse is completely invisible to the 20ns clock domain. We must stretch the pulse from 5ns to at least 30ns (which is 6 cycles of the 200 MHz clock) for it to be reliably captured by a standard 2-flop synchronizer.

5 Interactive Lab: Pulse Capture Simulator

Try sending pulses from the Fast domain to the Slow domain. See how short pulses fall between the slow clock edges, while stretched pulses get properly captured.

Waiting for user input...

6 Designing Solutions

How do we fix this? There are two primary architectural solutions when sending data from a fast clock to a slow clock:

Here is a simple synthesizable Verilog implementation of an open-loop pulse stretcher holding a pulse for 6 cycles (resolving our worked example above):

filename.v
module pulse_stretcher (
    input  wire clk_fast,
    input  wire rst_n,
    input  wire pulse_in,
    output wire stretched_pulse
);
    // 3-bit counter to hold state up to 6 cycles
    reg [2:0] count;
    
    always @(posedge clk_fast or negedge rst_n) begin
        if (!rst_n) begin
            count <= 3'd0;
        end else begin
            if (pulse_in) begin
                // Start stretching for 6 cycles
                count <= 3'd6;
            end else if (count > 3'd0) begin
                // Decrement until zero
                count <= count - 3'd1;
            end
        end
    end
    
    // Assert output as long as counter is active
    assign stretched_pulse = (count > 3'd0) || pulse_in;

endmodule

Key Takeaway

Never assume a synchronizer will catch a fast pulse. For robust fast-to-slow clock domain crossing, the source signal must span at least 1.5 periods of the destination clock to guarantee it will be sampled safely without dropping the data.

Advertisement