Clock-Domain Crossing
Two-Stage Synchronizer Chain
Parameterized two-stage synchronizer for single-bit asynchronous signal crossing with optional async reset support.
About this block
Simulate it in the Verilog IDE
Two-Stage Synchronizer Chain is a Verilog reference block in the Clock-Domain Crossing catalog. Clock-domain crossing FIFOs, synchronizers, and handshake bridges. Marked Medium: more state or a wider datapath, still one workspace in the IDE.
This OpenIP provides a two-stage synchronizer chain for safely crossing a single-bit asynchronous signal into a synchronous clock domain.
It mitigates metastability by sampling the asynchronous input twice on the destination clock edge, significantly improving mean time between failures (MTBF).
The module supports parameterizable reset polarity and optional asynchronous reset assertion.
- Choose Open in IDE. RTL Studio loads the packaged workspace for Two-Stage Synchronizer Chain.
- Read the Verilog module in the editor. The catalog line for this block: Parameterized two-stage synchronizer for single-bit asynchronous signal crossing with optional async reset support.
- Run the packaged testbench with the in-browser Verilator simulator, then open the VCD in the waveform viewer.
- Run Yosys in the same IDE for a generic netlist. Sky130 liberty mapping is a separate Pro library option.
RTL Studio is the Verilog simulator and IDE around this block: Slang lint, Verilator, VCD waveforms, and Yosys, in the browser. Simulation guide · Yosys guide.
Ports
| Port Name | Direction | Type | Description |
|---|---|---|---|
clk_sync | input | wire | Destination (synchronizing) clock |
rst_sync_n | input | wire | Synchronous active-low reset (ignored if USE_ASYNC_RESET=1) |
rst_async_n | input | wire | Asynchronous active-low reset (used only if USE_ASYNC_RESET=1) |
data_in | input | wire | Asynchronous input signal |
data_out | output | wire | Synchronized output (alias of data_out_sync) |
data_out_sync | output | wire | Double-synchronized output (primary use signal) |
Verification
| Test Case | Description | Pass Criteria |
|---|---|---|
| TC1 | Power-on reset behavior | Outputs initialized to RESET_POLARITY |
| TC2 | Single stable transition | Input change captured correctly after 2 cycles |
| TC3 | Back-to-back toggles | No glitch propagation under worst-case timing |
| TC4 | Random phase offset stress | All 10 random toggles synchronized correctly |
| TC5 | Reset during transition | Reset overrides output without metastable latch |
| TC6 | Continuous toggling (20 cycles) | Output tracks input with no errors |
More in Clock-Domain Crossing
- 1-Bit Handshake CDC Bridge
- 3-Stage Asynchronous Reset Synchronizer
- 4-Bit Bus Synchronizer (2-FF per bit)
- 4-Bit Gray Bus Synchronizer — L2 Upgrade
- Async Handshake Pulse Bridge
- Async Set Sync-Clear Flag — L2 Upgrade
- Asynchronous Reset Synchronizer for FIFO Gray Pointer Crossings
- Dual-Clock Pulse with Credit Return
- Enable Level Synchronizer — L1 Upgrade
- Four-Phase Req/Ack CDC Payload 16-bit
- Handshake CDC with 8-Bit Payload
- Multi-Bit Bus Synchronizer (2-FF)
- Multi-Bit Mux-Select Synchronizer — L2 Upgrade
- Pulse-Ack Round-Trip Across 2 Clocks
- Req/Ack Payload Hold 8-bit
- Single-Cycle Pulse Synchronizer (2-FF + Edge Detector)