Clock-Domain Crossing
Enable Level Synchronizer — L1 Upgrade
Enable Level Synchronizer with Busy Hold for CDC
About this block
Simulate it in the Verilog IDE
Enable Level Synchronizer — L1 Upgrade 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 Intellectual Property (IP) implements an enable-level synchronizer with a busy-hold mechanism. It safely crosses a single-bit enable signal between two asynchronous clock domains. The module ensures that the destination enable signal is stable before deasserting, preventing glitches and metastability issues common in Clock Domain Crossing (CDC) scenarios.
Key features include:
- 3-Stage Synchronizer Chain: Mitigates metastability for the enable signal.
- Busy-Hold Logic: Prevents premature deassertion of downstream logic by holding the busy flag until the deassertion is fully synchronized.
- Asynchronous Reset: Supports active-low asynchronous reset for safe initialization.
This IP provides a robust enable-level synchronizer with a busy-hold mechanism, suitable for L1 upgrade scenarios requiring reliable clock domain crossing. It uses a 3-stage synchronizer chain to mitigate metastability and a busy flag to ensure downstream logic sees a clean transition. The design has been verified through comprehensive simulation covering idle, assertion, deassertion, and reset behaviors.
- Choose Open in IDE. RTL Studio loads the packaged workspace for Enable Level Synchronizer — L1 Upgrade.
- Read the Verilog module in the editor. The catalog line for this block: Enable Level Synchronizer with Busy Hold for CDC.
- 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 core design consists of two main components:
- Synchronizer Chain: A 3-stage flip-flop chain registered on the destination clock (
clk_dst) to synchronize the source enable (en_src). - Busy Logic: Monitors the source enable and the synchronized output. The
busysignal is asserted whenen_srcis high and remains high until the synchronized output (en_dst) goes low AND the previous source state was low. This ensures the downstream logic has fully processed the enable pulse.
Ports
| Port Name | Direction | Width | Description |
|---|---|---|---|
clk_src | Input | 1 | Source clock domain |
clk_dst | Input | 1 | Destination clock domain |
rst_n | Input | 1 | Active-low asynchronous reset |
en_src | Input | 1 | Source enable signal to be synchronized |
en_dst | Output | 1 | Synchronized destination enable signal |
busy | Output | 1 | Busy flag: High during synchronization/holding |
Constraints
- Clock Domains:
clk_srcandclk_dstmust be asynchronous. No specific frequency ratio is required, but the destination clock should be fast enough to capture the synchronized signal. - Reset:
rst_nis asynchronous and active-low. Ensure reset is deasserted before enabling signals. - Timing: The busy hold logic ensures
en_dstis stable. No additional SDC/XDC constraints are strictly required for CDC, but standard CDC constraints (false paths, multicycle paths) may be applied if needed by your synthesis tool.
Verification
The provided testbench (tb_enable_level_sync_busy_hold.v) validates the following scenarios:
- Idle State: Verifies
en_dstandbusyare low whenen_srcis low. - Assertion: Verifies
en_dstgoes high after propagation delay andbusyis asserted. - Deassertion: Verifies
busyremains high untilen_dstgoes low, ensuring safe handshaking. - Reset: Verifies all outputs are forced to low upon reset.
To verify the IP, run the simulation script provided in the sim directory. The testbench will output a summary of passed test cases.
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
- 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