RTL Studio Open IDE

Clock-Domain Crossing

Handshake CDC with 8-Bit Payload

Reliable asynchronous clock domain crossing using a two-way handshake protocol for 8-bit data payloads.

About this block

Simulate it in the Verilog IDE

Hardverilogsimsyn

Handshake CDC with 8-Bit Payload 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.

This IP core implements a robust, latch-free Clock Domain Crossing (CDC) mechanism for transferring 8-bit parallel data between asynchronous clock domains. It utilizes a two-way handshake protocol (Request/Acknowledge) to ensure data integrity and prevent metastability. The design is fully synthesizable for both FPGA and ASIC flows and includes synchronized request and acknowledge signals.

This IP provides a robust, latch-free solution for 8-bit data transfer across asynchronous clock domains.

By utilizing a two-way handshake with synchronized request and acknowledge signals, it ensures data integrity and prevents metastability issues.

  1. Choose Open in IDE. RTL Studio loads the packaged workspace for Handshake CDC with 8-Bit Payload.
  2. Read the Verilog module in the editor. The catalog line for this block: Reliable asynchronous clock domain crossing using a two-way handshake protocol for 8-bit data payloads.
  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.

Features

  • 8-Bit Parallel Data Transfer: Supports transfer of 8-bit data words.
  • Two-Way Handshake: Uses a robust request/acknowledge protocol for flow control.
  • Metastability Mitigation: Includes 2-stage synchronizers for both req and ack signals.
  • Reset Handling: Handles asynchronous reset conditions in both source and destination domains.
  • Edge Detection: Provides clear rise and fall edge detection for handshake timing control.
  • Latch-Free Design: Ensures predictable timing and synthesizability.

Interface

The module operates with the following ports:

Port NameDirectionWidthDescription
src_clkInput1Source clock domain
src_rst_nInput1Active-low source reset
dst_clkInput1Destination clock domain
dst_rst_nInput1Active-low destination reset
payload_inInput8Data to be transferred
reqInput1Request signal from source
ackOutput1Acknowledge signal from destination
payload_outOutput8Received data in destination

Architecture

The handshake protocol follows a strict four-step sequence to ensure safe data transfer:

  1. Request: The source asserts req and drives payload_in.
  2. Acknowledge: The destination detects the synchronized req, asserts ack, and latches payload_in.
  3. Deassert Request: The source detects the synchronized ack and deasserts req.
  4. Deassert Acknowledge: The destination detects the deassertion of req and deasserts ack.

### Signal Flow

The following diagram illustrates the signal flow and synchronization stages:

Verification

The design is verified using a testbench (tb/tb_handshake_cdc_payload_8bit.v) that covers three primary scenarios:

Test CaseDescriptionExpected Result
TC1Basic single transferPayload matches expected value
TC2Multiple transfersAll payloads transferred correctly
TC3Rapid successive transfersNo data loss or corruption

### Running Simulation

To verify the design:

  1. Open your preferred HDL simulator.
  2. Load the testbench file: tb/tb_handshake_cdc_payload_8bit.v.
  3. Run the simulation.
  4. Check the log panel for the following output:

- TC1 PASS - TC2 PASS - TC3 PASS - Simulation ends with INFO: PASS.

More in Clock-Domain Crossing

All Clock-Domain Crossing blocks