RTL Studio Open IDE

Bus Interfaces

AXI-Stream Register Slice — L2 Upgrade

AXI-Stream Register Slice with Retry/Timeout/Error Decode

About this block

Simulate it in the Verilog IDE

Hardverilogsimsyn

AXI-Stream Register Slice — L2 Upgrade 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 implements a robust AXI-Stream Register Slice designed to break combinational loops and handle backpressure gracefully. Unlike standard register slices, this module includes configurable timeout detection to identify stuck sinks and asserts an error signal (m_terror) when a transaction cannot complete within the specified time.

It supports multi-beat transactions with proper tlast propagation and ensures data integrity during backpressure conditions. The design is fully compliant with AXI-Stream standards and includes automatic recovery mechanisms.

  1. Choose Open in IDE. RTL Studio loads the packaged workspace for AXI-Stream Register Slice — L2 Upgrade.
  2. Read the Verilog module in the editor. The catalog line for this block: AXI-Stream Register Slice with Retry/Timeout/Error Decode.
  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

  • AXI-Stream Compliant: Fully supports tvalid, tready, tdata, and tlast signals.
  • Backpressure Handling: Registers input data to prevent loss when the sink is busy.
  • Timeout Detection: Configurable counter detects stuck sinks and triggers an error state.
  • Error Signaling: Asserts m_terror when the timeout threshold is reached.
  • Auto-Recovery: Clears error state and resumes normal operation when the sink becomes ready.
  • Multi-Beat Support: Correctly propagates tlast across backpressure cycles.

Interface

The module provides a source interface (upstream) and a sink interface (downstream).

Signal NameDirectionWidthDescription
clkInput1Clock input
rst_nInput1Active-low reset
s_tvalidInput1Source valid signal
s_treadyOutput1Source ready signal (backpressure)
s_tdataInput8Source data bus
s_tlastInput1Source last signal
m_tvalidOutput1Sink valid signal
m_treadyInput1Sink ready signal
m_tdataOutput8Sink data bus
m_tlastOutput1Sink last signal
m_terrorOutput1Sink error signal (timeout)

### Parameters

ParameterDefaultDescription
TIMEOUT_CYCLES8Number of clock cycles before asserting error

Architecture

The design uses a Finite State Machine (FSM) to manage data flow between the source and sink.

### State Diagram

### State Descriptions

  1. Idle: Waits for valid input. If sink is ready, data passes through immediately.
  2. Hold: Sink is busy. Data is registered internally. Timeout counter starts.
  3. Retry: Timeout reached. m_terror is asserted. Waits for sink to become ready.

Verification

The provided testbench verifies basic pass-through, tlast propagation, backpressure handling, and timeout detection.

### Running Simulation

  1. Open your simulator (e.g., ModelSim, VCS, Xcelium).
  2. Compile the RTL and testbench.
  3. Run the simulation.

### Expected Results

The simulation log should display:

  • TC1 PASS: Basic Pass-Through
  • TC2 PASS: TLAST Propagation
  • TC3 PASS: Backpressure Handling
  • TC4 PASS: Timeout Detection
  • TC5 PASS: Multi-Beat TLAST

More in Bus Interfaces

All Bus Interfaces blocks