CDC Course / Module 6: Fast-to-Slow CDC Challenges
Lesson 6.2

Pulse Synchronization

Welcome, Architect. Crossing a single-cycle pulse from a fast clock domain to a slow clock domain is a classic CDC challenge. If the destination clock is slower than the source clock, a standard 2-flop synchronizer will often miss the pulse entirely because it doesn't stay asserted long enough for the slow clock edge to sample it.

The solution? An Open-Loop Pulse Stretcher (or toggle synchronizer).

1
The Theory of Toggle-Based Pulse Sync

The fundamental idea is to convert a transient event (a pulse) into a persistent state (a level change) in the source domain. We then synchronize that level change into the destination domain. Once safely in the destination domain, we edge-detect the level change to recreate the pulse.

Mechanism:
1. tx_toggle <= tx_pulse ^ tx_toggle; (Source Domain)
2. rx_sync <= tx_toggle; (CDC via 2-flop sync)
3. rx_pulse <= rx_sync[1] ^ rx_sync[2]; (Destination Edge Detection)
Fast Domain (clk_tx) Toggle FF tx_pulse Slow Domain (clk_rx) S1 S2 S3 rx_pulse
2
Verilog Implementation

Below is the synthesizable RTL for a robust open-loop pulse synchronizer.

filename.v
module pulse_sync (
    input  wire clk_tx,
    input  wire rst_tx_n,
    input  wire tx_pulse,

    input  wire clk_rx,
    input  wire rst_rx_n,
    output wire rx_pulse
);

    // --- TX Domain ---
    reg tx_toggle;

    always @(posedge clk_tx or negedge rst_tx_n) begin
        if (!rst_tx_n) begin
            tx_toggle <= 1'b0;
        end else if (tx_pulse) begin
            tx_toggle <= ~tx_toggle; // Convert pulse to level change
        end
    end

    // --- RX Domain ---
    reg [2:0] rx_sync; // 2 stages for CDC, 1 stage for edge detection

    always @(posedge clk_rx or negedge rst_rx_n) begin
        if (!rst_rx_n) begin
            rx_sync <= 3'b000;
        end else begin
            // Shift register: rx_sync[0] is the first CDC stage
            rx_sync <= {rx_sync[1:0], tx_toggle};
        end
    end

    // Edge detection: XOR the output of the two synchronizer flops
    // rx_sync[1] is the safe synchronized signal.
    // rx_sync[2] is the delayed version of it.
    assign rx_pulse = rx_sync[1] ^ rx_sync[2];

endmodule
Worked Example: Waveform Progression
Cycle tx_pulse tx_toggle rx_sync[0] rx_sync[1] rx_sync[2] rx_pulse
T0000000
T1110000
T2011 (meta?)000
T3011101 (Pulse!)
T4011110
3
Interactive Lab

Step through the pulse synchronizer. Click "Send Pulse" to toggle the fast domain flop, then step the slow clock to propagate it through the synchronizer chain.

tx_toggle
0
→
rx_sync[0]
0
→
rx_sync[1]
0
→
rx_sync[2]
0
⇒
rx_pulse
0

System Idle.

WARNING: The Limitation of Open-Loop Pulse Sync
If two tx_pulse events arrive back-to-back (or close together) before the first toggle level has safely propagated through the slow domain's 3-flop chain, the tx_toggle flop will flip back to its original state. The slow clock will sample the same level twice, and the second pulse is lost silently.

Rule of thumb: tx_pulse minimum spacing must be at least 3 destination clock cycles. If your pulses can be bursty, you must use an asynchronous FIFO or a closed-loop handshake synchronizer.
4
Testbench Snippet
filename.v
module tb_pulse_sync;
    reg clk_fast = 0;
    reg clk_slow = 0;
    reg rst_n = 0;
    reg tx_pulse = 0;
    wire rx_pulse;

    // Fast clock: 2ns period (500MHz)
    always #1 clk_fast = ~clk_fast;
    // Slow clock: 10ns period (100MHz)
    always #5 clk_slow = ~clk_slow;

    pulse_sync dut (
        .clk_tx(clk_fast),
        .rst_tx_n(rst_n),
        .tx_pulse(tx_pulse),
        .clk_rx(clk_slow),
        .rst_rx_n(rst_n),
        .rx_pulse(rx_pulse)
    );

    initial begin
        #20 rst_n = 1;
        
        // Send a single pulse
        @(posedge clk_fast);
        tx_pulse = 1;
        @(posedge clk_fast);
        tx_pulse = 0;

        // Wait for it to propagate
        #100;
        $finish;
    end
endmodule
Key Takeaway: An open-loop pulse synchronizer is fast and cheap, converting pulses to levels via a toggle flop and edge-detecting them in the destination domain. However, it requires safe spacing between input pulses to prevent data loss.
Advertisement