Create*_transaction(), Executing transactions – Altera Mentor Verification IP Altera Edition AMBA AXI3/4TM User Manual
Page 39

SystemVerilog API Overview
Executing Transactions
Mentor VIP AE AXI3/4 User Guide, V10.2b
21
September 2013
The monitor BFM API allows you to create a monitor transaction without providing any
arguments. All protocol transaction fields automatically default to legal protocol values to
create a complete slave transaction record. Refer to the
for default protocol transaction field values.
Note
If you change the default value of a protocol transaction field, this value is valid for all
future transactions until a new value is set.
create*_transaction()
There are two master BFM API functions available to create transactions,
slave BFM API, and a
For example, the following master BFM test program creates a simple write transaction with a
start address of 1, and a single data phase with a data value of 2, the master BFM test program
would contain the following code:
// Define a variable trans of type axi_transaction
axi_transaction write_trans;
// Create master write transaction
write_trans = bfm.create_write_transaction(1);
write_trans.data_words[0] = 2;
For example, to create a simple slave transaction the slave BFM test program would contain the
following code:
// Define a variable slave_trans of type axi_transaction
axi_transaction slave_trans;
// Create slave transaction
slave_trans = bfm.create_slave_transaction();
Note
The above test program code segments are for AXI3 BFMs. Substitute the
axi_transaction type definition with axi4_transaction for AXI4 BFMs.
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 tasks that push transactions into the
BFM internal transaction queues.
on page 13 illustrates the internal BFM structure.