Altera® AXI4 Bus Functional Model User Guides

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

2.5.1.4.2. Data Members in Class Axi4StreamPacket

Data Member: master_packet_id {type: static uint64_t}

Data Member: packet_id {type: uint64_t}

The master_packet_id and packet_id data members place a unique identifying marker on each packet object created. The master_packet_id is a static unsigned 64-bit integer that is a free-running counter for the entire class, counting the number of packet objects created. The Axi4StreamPacket object’s constructor increments master_packet_id each time a packet object is created. The variable packet_id is a copy of the master_packet_id variable value at this creation time. The copy of master_packet_id into packet_id occurs in the Axi4StreamPacket object constructor, just after the master_packet_id is incremented. You can use these two values in a variety of ways. For example, as a unique designator for the object, as a count of how many packet objects have been created, and to determine where the current object is in the overall packet traffic created.

Data Member: transfers[$] {type: Axi4StreamTransfer}

The SystemVerilog queue transfers[$] of class Axi4StreamTransfer0 stores the input transfers that drive the activity on the AXI4 streaming bus.

Data Member: transfers_done[$] {type: Axi4StreamTransfer}

The SystemVerilog queue transfers_done[$] of class Axi4StreamTransfer is also a storage for transfers. Once a packet is withdrawn from the transfers[$] queue for use, it is first stored in the transfers_done[$] queue before being provided to the application. The transfers_done[$] queue then acts as a history of the transfers performed on the AXI4 streaming bus by the packet. You can then access this history and print it out.

Data Member: creation_time {type: realtime}

A value captured in the Axi4StreamPacket object’s constructor and is the value $realtime. You can use this value as a reference of when the packet was created to implement latency calculations, if desired.