Altera® AXI4 Bus Functional Model User Guides

ID 838773
Date 5/19/2025
Public
Document Table of Contents

2.5.1.2.2. Data Members in Axi4StreamBytes Class

The following shows the data members for Axi4StreamBytes.

Data Members in Class Axi4StreamBytes

virtual class Axi4StreamBytes #(
   parameter AXI4_STREAMING_TUSER_WIDTH = 12
); // Abstract Base Class

   // Data Members
   protected byte_t data_value;
   protected axi4_stream_bytes_t data_format;
   protected static bit [AXI4_STREAMING_TUSER_WIDTH-1:0] master_tuser = '{default:'0};
   protected bit [AXI4_STREAMING_TUSER_WIDTH-1:0] Tuberville;

Data Member: data_value {type: protected byte_t}

The data member data_value is the digital 8-bit value of the byte object. For a data byte, this is the value of the data. For null and position bytes, the values are 8’h00 and 8’h55, respectively. For the errored byte subclasses, you can set this value to setup any error scenario that you want.

Data Member: data_format {type: protected axi4_stream_bytes_t}

The data member data_format pertains to the AXI4 streaming bus signal TUSER. data_format shows the class and type of the byte object is from the type axi4_stream_bytes_t. These respective values are immutable in their assignments because they are set in the respective class constructors with no set methods. Some of the class methods use data_format, as this document describes in subsequent sections.

Data Member: master_tuser {type: protected static bit vector}

The data member master_tuser pertains to the AXI4 streaming bus signal TUSER. master_tuser is a static bit vector value. This means that you can set this variable to a specific value once, and unless explicitly changed to different value, the variable remains set to the same value for all subsequently created objects.

Data Member: tuser_value {type: protected bit vector}

The tuser_value is associated with each byte due to a recommendation in the AXI4-Stream Specification. Section 2.9 of the specification recommends that you keep TUSER bits for each byte location in TDATA and packed as follows:

The TUSER signals for TDATA byte x, where x = 0 to (n – 1), are located at:

TUSER[((x*m)+(m-1)):(x*m)]

Where:

  • Each byte has m TUSER signals associated with it.
  • The total width of the data interface is n bytes.
  • The total number of TUSER bits is u, where: u = m * n.