Clock-Domain Crossing
Asynchronous Reset Synchronizer for FIFO Gray Pointer Crossings
2-stage asynchronous reset synchronizer chain for safe Gray-coded FIFO pointer synchronization across clock domains with active-low reset handling.
About this block
Simulate it in the Verilog IDE
Asynchronous Reset Synchronizer for FIFO Gray Pointer Crossings is a SystemVerilog reference block in the Clock-Domain Crossing catalog. Clock-domain crossing FIFOs, synchronizers, and handshake bridges. Marked Hard: a larger reference. Simulate the packaged testbench before you change the RTL.
This IP implements a 2-stage asynchronous reset synchronizer chain optimized for safe reset handling across clock domains when synchronizing Gray-coded FIFO pointers. It ensures metastability resolution while preserving reset integrity during assertion and deassertion. The design separates asynchronous reset handling in the source domain from synchronous reset handling in the destination domain to meet CDC best practices. The synchronizer chain consists of two registers in the destination domain, with the first stage capturing data from the source domain and the second stage providing final synchronized output. Reset is active-low and asynchronous in the source domain, while synchronous in the destination domain—ensuring deterministic reset release timing. The module supports configurable Gray pointer width (minimum 2 bits) and is compatible with standard CDC verification flows. It follows lowRISC/ibex CDC infrastructure conventions and is suitable for integration into asynchronous FIFOs, handshake protocols, or cross-domain control logic. The testbench validates reset timing, metastability resolution, and Gray code transitions under multi-clock conditions. All test cases pass successfully, confirming safe reset propagation and pointer synchronization. The implementation is synthesizable and verified with Verilator.
The async_reset_fifo_sync IP provides a robust, synthesizable solution for synchronizing Gray-coded pointers across asynchronous reset boundaries. Its dual-domain reset handling (asynchronous source, synchronous destination) prevents reset-induced glitches and metastability propagation. Designed for FIFO pointer synchronization, it integrates seamlessly into CDC-critical paths and aligns with open-source IP standards. Integrators should ensure WIDTH ≥ 2, align reset deassertion timing with CDC guidelines, and verify timing closure across domains.
- Choose Open in IDE. RTL Studio loads the packaged workspace for Asynchronous Reset Synchronizer for FIFO Gray Pointer Crossings.
- Read the SystemVerilog module in the editor. The catalog line for this block: 2-stage asynchronous reset synchronizer chain for safe Gray-coded FIFO pointer synchronization across clock domains with active-low reset handling.
- 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
| Name | Direction | Type | Description |
|---|---|---|---|
clk_src | input | logic | Source clock domain (asynchronous reset domain) |
rst_n_src | input | logic | Asynchronous active-low reset in source domain |
d_in | input | logic [WIDTH-1:0] | Gray-coded pointer value from source domain |
q_out | output | logic [WIDTH-1:0] | Synchronized gray pointer in destination domain |
clk_dst | input | logic | Destination clock domain |
rst_n_dst | input | logic | Synchronous active-low reset in destination domain |
Verification
| Test Case | Description | Status |
|---|---|---|
| TC1 | Reset assertion during stable input | PASS |
| TC2 | Reset deassertion with metastability handling | PASS |
| TC3 | Gray pointer transitions (0→1→3→2→6→7→5→4) | PASS |
| TC4 | Reset asserted mid-pointer transition | PASS |
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
- 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)
- Slow-Enable Fast Sample-Hold