Transaction record, Transaction definition, Example 2-3. transaction record definition – Altera Mentor Verification IP Altera Edition AMBA AXI4-Stream User Manual

Page 23: When you create a transaction, a, Is created and e

Advertising
background image

SystemVerilog API Overview

Creating Transactions

Mentor Verification IP AE AMBA AXI4-Stream User Guide, V10.3

23

April 2014

Transaction Record

The transaction record contains two types of transaction fields, protocol and operational, that
either transfer information over the protocol signals, or define how and when a transfer occurs,
respectively.

Protocol fields contain transaction information that is transferred over the protocol signals. For
example, the id field is transferred over the TID protocol signals during a transaction to identify
a data stream.

Operational fields define how and when the transaction is transferred. Their content is not
transferred over protocol signals. For example, the operation_mode field controls the
blocking/nonblocking operation of a transaction, but this information is not transferred over the
protocol signals.

Transaction Definition

The transaction record exists as a SystemVerilog class definition in each BFM.

Example 2-3

shows the definition of the axi4stream_transaction class members that form the transaction
record.

Example 2-3. Transaction Record Definition

// Global Transaction Class
class axi4stream_transaction;
// Protocol
byte unsigned data[];
axi4stream_byte_type_e byte_type[];
bit [((`MAX_AXI4_ID_WIDTH) - 1):0] id;
bit [((`MAX_AXI4_DEST_WIDTH) - 1):0] dest;
bit [((`MAX_AXI4_USER_WIDTH) - 1):0] user_data [];
int valid_delay[];
int ready_delay[];

// Housekeeping
axi4stream_operation_mode_e

operation_mode = AXI4STREAM_TRANSACTION_BLOCKING;

bit transfer_done[];
bit transaction_done;

...

endclass

Note

The axi4stream_transaction class code above is shown for information only. Access to
each transaction record during its life is performed by various set*() and get*() tasks
described later in this chapter.

Advertising