Executing transactions, Execute_transaction() – Altera Mentor Verification IP Altera Edition AMBA AXI4-Stream User Manual
Page 81

VHDL API Overview
Executing Transactions
Mentor Verification IP AE AMBA AXI4-Stream User Guide, V10.3
81
April 2014
shows a master BFM test program creating a master transaction with a packet
length of 10 transfers.
Example 7-4. Master BFM Test Program Transaction Creation
-- Define a local variable trans to hold the transaction record.
variable trans: integer;
-- Create a master transaction of 10 transfers.
create_master_transaction(10, trans, bfm_index,
axi4stream_tr_if_0(bfm_index));
shows a slave BFM test program creating a slave transaction.
Example 7-5. Slave BFM Test Program Transaction Creation
-- Define a local variable trans to hold the transaction record.
variable trans: integer;
-- Create a slave transaction.
create_slave_transaction(trans, bfm_index,axi4stream_tr_if_0(bfm_index));
In the above example, the bfm_index specifies the actual BFM.
Executing Transactions
Executing a transaction in a master/slave BFM test program initiates the transaction onto the
protocol signals. Each master/slave BFM API has execution procedures that push transactions
into the BFM internal transaction queues.
on page 76 illustrates the internal BFM
structure.
execute_transaction()
If the DUT is a slave, then the
procedure is called in the master BFM test
program.
shows a master test program executing a master transaction.
Example 7-6. Master Test Program Transaction Execution
-- 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));
...
-- By default the execution of a transaction will block.
execute_transaction(trans, bfm_index, axi4stream_tr_if_0(bfm_index));