Altera® AXI4 Bus Functional Model User Guides

ID 838773
Date 3/19/2025
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

2.5.1.1.3. Interface axi4_stream_if

The axi4_stream_if AXI4 streaming interface is for use as the port to the both the Transmitter and Receiver BFMs.

AXI4 Streaming Interface

interface axi4_stream_if #(
   parameter AXI4_STREAMING_DATA_BUS_WIDTH = 32, 
   parameter AXI4_STREAMING_TID_WIDTH = 12,      
   parameter AXI4_STREAMING_TDEST_WIDTH = 12,   
   parameter AXI4_STREAMING_TUSER_WIDTH = 12  
)(
   input wire clk,
   input wire rst_n
);

The interface definition begins with four parameters that are passed to the axi4_stream_if interface.

Specify the AXI4_STREAMING_DATA_BUS_WIDTH data bus width parameter in bytes to provide the width required for the TDATA signal on the bus. The bus has a default width of 32 bytes or 256 bits.

AXI4_STREAMING_TID_WIDTH and AXI4_STREAMING_TDEST_WIDTH provide the Source and Destination IDs width parameters for the bus TID and TDEST signals, respectively. The default values are set at their maximum width of 12 bits each.

AXI4_STREAMING_TUSER_WIDTH provides the TUSER width parameter. The width of TUSER is per data byte, and calculated by:
AXI4_STREAMING_DATA_BUS_WIDTH * AXI4_STREAMING_TUSER_WIDTH

This calculation is to align with the AMBA AXI4-Stream Protocol Specification that specifies the width of this field is an integer multiple of AXI4_STREAMING_DATA_BUS_WIDTH (bytes), allowing TUSER values on a per-byte basis.7

7 AMBA AXI4-Stream Protocol Specification, ARM IHI0051B ID040921.