Access transaction record, Set*(), Get*() – Altera Mentor Verification IP Altera Edition AMBA AXI4-Stream User Manual
Page 83: Example 7-9. master test program, Example 7-10. slave test program
VHDL API Overview
Access Transaction Record
Mentor Verification IP AE AMBA AXI4-Stream User Guide, V10.3
83
April 2014
Access Transaction Record
Each BFM API has procedures that can access a complete or partially complete
procedures are used in a test program to set and get information
from the transaction record.
set*()
shows the master test program calling the
procedure to set the first
byte_type in the transaction.
Example 7-9. Master Test Program
Procedure
-- Define a local variable trans to hold the transaction record.
variable trans: integer;
-- Create a master transaction with 10 transfers.
create_master_transaction(10, trans, bfm_index,
axi4stream_tr_if_0(bfm_index));
-- Set the first byte_type in the transfer.
set_byte_type(AXI4STREAM_DATA_BYTE, 0, trans, bfm_index,
axi4stream_tr_if_0(bfm_index));
In the above example, the bfm_index specifies the actual master BFM.
get*()
shows the slave test program calling the
data byte_type of a transaction.
Example 7-10. Slave Test Program
Procedure
-- Define a local variable trans to hold the transaction record.
variable trans: integer;
-- Define a local variable to hold the transaction byte type
variable byte_type: integer;
-- Create a slave transaction
create_slave_transaction(trans, bfm_index,
axi4stream_tr_if_0(bfm_index));
-- Get the first byte_type of a transaction.
get_byte_type(byte_type, 0, trans, bfm_index,
axi4stream_tr_if_0(bfm_index));
In the above example, the bfm_index specifies the actual slave BFM.