Altera® AXI4 Bus Functional Model User Guides

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

2.5.1.2.1. Class Axi4StreamBytes

This class forms the superclass for all the byte classes contained in package axi4_stream_bytes_class_pkg. As previously mentioned, polymorphism is designed into this class hierarchy so that you can use the containers and handles to this base for all other classes in this hierarchy. The Axi4StreamBytes class forms the basis for all the data, position, and null bytes and their errored versions.

typedef is an enumeration for the types of bytes:

Table 30.  Byte Type Enumeration
Byte Types Description Associated Class
DATA Data bytes that convey information from the transmitter to the receiver. This is the relevant data. Axi4StreamBytesData
POSITION Position bytes that must be sent from the transmitter to the receiver to preserve the data positions in the transfers. These bytes are not bytes of applications data, but are placeholders for data structure. Axi4StreamBytesPosition
NULL Null bytes are simple, empty void-fillers in the AXI4 streaming bus that do not have any function. These bytes can be ignored and removed from the data stream without any restrictions. Axi4StreamBytesNull
DATA_ERROR Data bytes that may have errors in either value or format. These bytes are for testing error detection and recovery in designs. Axi4StreamBytesDataError
POSITION_ERROR Position bytes that may have errors in either value or format. These bytes are for testing error detection and recovery in designs. Axi4StreamBytesPositionError
NULL_ERROR Null bytes that may have errors in either value or format. These bytes are for testing error detection and recovery in designs. Axi4StreamBytesNullError

The typedef contains some standard data values for use in some of the non-Data bytes. In the AXI4 streaming BFM, all valid Null bytes have a value of 8’h00, all zeros. You can identify position bytes by their alternating one-zero pattern with a 8’h55. The ALL_ONES pattern allows you to set data apart from Idle states. The ALL_ONES pattern is for error conditions or other unique data situations.

Typedefs in Bytes Class Package

typedef enum {
   DATA,
   POSITION,
   NULL,
   DATA_ERROR,
   POSITION_ERROR,
   NULL_ERROR
} axi4_stream_bytes_t;

typedef enum byte_t {
   NULL_DATA     = 8'h00,
   POSITION_DATA = 8'h55,
   ALL_ONES      = 8'hFF
} data_value_default_t;