Clock-Domain Crossing
1-Bit Handshake CDC Bridge
A robust 1-bit handshake protocol for crossing clock domains ensuring reliable data transfer without loss.
About this block
Simulate it in the Verilog IDE
1-Bit Handshake CDC Bridge is a Verilog 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.
A robust, asynchronous 1-bit handshake protocol for crossing clock domains (CDC). This IP ensures reliable data transfer between two asynchronous clock domains (src_clk and dst_clk) using a four-step request/acknowledge (req/ack) mechanism. It mitigates metastability risks using 2-flop synchronizers.
This module provides a safe and efficient method for synchronizing single-bit control signals across clock domains. It prevents data loss and metastability issues through proper synchronization techniques. The handshake protocol guarantees that the source domain waits for the destination domain to acknowledge receipt before de-asserting the request signal.
Key Features:
- Metastability Safe: Uses 2-flop synchronizers in both directions.
- Reliable Handshake: 4-step req/ack protocol ensures no data loss.
- Simple Interface: Minimal port count for easy integration.
- Verified: Includes testbench with basic, back-to-back, and idle scenarios.
- Choose Open in IDE. RTL Studio loads the packaged workspace for 1-Bit Handshake CDC Bridge.
- Read the Verilog module in the editor. The catalog line for this block: A robust 1-bit handshake protocol for crossing clock domains ensuring reliable data transfer without loss.
- 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.
Architecture
The design consists of two main clock domains:
- Source Domain (
src_clk): Generates the request pulse and waits for the synchronized acknowledge. - Destination Domain (
dst_clk): Detects the synchronized request and generates the acknowledge pulse.
### Data Flow
The data flow follows a standard handshake pattern:
req_inis asserted insrc_clk.req_inis synchronized todst_clkvia a 2-flop synchronizer (req_sync).ack_outis asserted indst_clkupon detectingreq_sync.ack_outis synchronized back tosrc_clkvia a 2-flop synchronizer (ack_sync).req_inis de-asserted insrc_clkupon detectingack_sync.ack_outis de-asserted indst_clkupon detectingreq_inde-assertion (synchronized).
Ports
| Port Name | Direction | Width | Description |
|---|---|---|---|
src_clk | Input | 1 | Source clock domain input |
dst_clk | Input | 1 | Destination clock domain input |
rst_n | Input | 1 | Active-low asynchronous reset |
req_in | Input | 1 | Request signal from source domain |
ack_out | Output | 1 | Acknowledge signal to source domain |
More in Clock-Domain Crossing
- 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)
- Slow-Enable Fast Sample-Hold