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.
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.
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.
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).
Why exactly 1.5 periods (or 3 edges)?
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.
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.
How do we fix this? There are two primary architectural solutions when sending data from a fast clock to a slow clock:
ack (acknowledge) signal synchronized back from the slow domain. This is robust, frequency-agnostic, and safe across all PVT variations.Here is a simple synthesizable Verilog implementation of an open-loop pulse stretcher holding a pulse for 6 cycles (resolving our worked example above):
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;
endmoduleNever 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.