RTL Studio Open IDE

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

Mediumverilogsimsyn

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.

  1. Choose Open in IDE. RTL Studio loads the packaged workspace for Two-Stage Synchronizer Chain.
  2. 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.
  3. Run the packaged testbench with the in-browser Verilator simulator, then open the VCD in the waveform viewer.
  4. 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 NameDirectionTypeDescription
clk_syncinputwireDestination (synchronizing) clock
rst_sync_ninputwireSynchronous active-low reset (ignored if USE_ASYNC_RESET=1)
rst_async_ninputwireAsynchronous active-low reset (used only if USE_ASYNC_RESET=1)
data_ininputwireAsynchronous input signal
data_outoutputwireSynchronized output (alias of data_out_sync)
data_out_syncoutputwireDouble-synchronized output (primary use signal)

Verification

Test CaseDescriptionPass Criteria
TC1Power-on reset behaviorOutputs initialized to RESET_POLARITY
TC2Single stable transitionInput change captured correctly after 2 cycles
TC3Back-to-back togglesNo glitch propagation under worst-case timing
TC4Random phase offset stressAll 10 random toggles synchronized correctly
TC5Reset during transitionReset overrides output without metastable latch
TC6Continuous toggling (20 cycles)Output tracks input with no errors

More in Clock-Domain Crossing

All Clock-Domain Crossing blocks