RTL Studio Open IDE

Bus Interfaces

AXI-Stream Skid Buffer

Single-entry skid buffer for AXI-Stream interfaces to handle backpressure.

About this block

Simulate it in the Verilog IDE

Hardverilogsimsyn

AXI-Stream Skid Buffer is a Verilog reference block in the Bus Interfaces catalog. AXI, APB, Wishbone, and other on-chip bus interface adapters. Marked Hard: a larger reference. Simulate the packaged testbench before you change the RTL.

This IP provides a robust, low-latency skid buffer for AXI-Stream protocols.

It prevents data loss during backpressure events by allowing the source to accept data into an empty buffer even when the sink is not ready.

The implementation is simple, synthesizable, and suitable for applications requiring guaranteed data delivery without complex FIFO management.

  1. Choose Open in IDE. RTL Studio loads the packaged workspace for AXI-Stream Skid Buffer.
  2. Read the Verilog module in the editor. The catalog line for this block: Single-entry skid buffer for AXI-Stream interfaces to handle backpressure.
  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

  • Single-Entry Buffering: Holds one data word to absorb backpressure.
  • Zero Data Loss: Guarantees that valid data from the source is never dropped.
  • Low Latency: Pass-through behavior when the buffer is empty.
  • Backpressure Handling: Asserts s_tready only when the sink is ready OR the buffer is empty.
  • Synchronous Reset: Simple active-low reset behavior.

Interface

The module exposes two AXI-Stream interfaces:

  • Source (s_): Connected to the upstream producer.
  • Sink (m_): Connected to the downstream consumer.

Data flows from s_ to m_ through the internal register.

Signal NameDirectionWidthDescription
clkinput1Clock input
rst_ninput1Active-low reset
s_tdatainput8Source data input
s_tvalidinput1Source valid signal
s_treadyoutput1Source ready signal
m_tdataoutput8Sink data output
m_tvalidoutput1Sink valid signal
m_treadyinput1Sink ready signal

Architecture

The design uses a single register to store the data word (reg_tdata) and a valid flag (reg_valid) to track buffer occupancy.

### Handshake Logic

The core logic determines s_tready based on the following rule:

$$ s\_tready = m\_tready \lor \neg reg\_valid $$

  • If the sink is ready (m_tready == 1), the source can send data directly (or into the buffer if it's empty).
  • If the sink is not ready but the buffer is empty (reg_valid == 0), the source can still send data into the buffer.
  • If the sink is not ready AND the buffer is full (reg_valid == 1), the source is backpressured (s_tready == 0).

Verification

The testbench validates three key scenarios:

  1. Basic Pass-Through: Confirms data integrity when the sink is always ready.
  2. Backpressure Handling: Verifies that data is buffered correctly when the sink is blocked.
  3. Intermittent Backpressure: Tests continuous stream recovery after backpressure events.

### Test Results

Test CaseDescriptionResult
TC1Basic Pass-ThroughPASS
TC2Backpressure HandlingPASS
TC3Continuous Stream with Intermittent BackpressurePASS

### Expected Simulation Output

After running the simulation, the log panel should display:

  • TC1 PASS: Data passed through correctly
  • TC2 PASS: Source backpressured correctly
  • TC2 PASS: Data recovered after backpressure
  • TC3 PASS: Source blocked during backpressure
  • TC3 PASS: Last beat recovered correctly
  • INFO: PASS

More in Bus Interfaces

All Bus Interfaces blocks