Create*_transaction() – Altera Mentor Verification IP Altera Edition AMBA AXI4-Lite User Manual
Page 32
Mentor Verification IP AE AXI4-Lite User Guide, V10.3
32
SystemVerilog API Overview
Creating Transactions
April 2014
The master BFM API allows you to create a master transaction by providing only the address
argument for a read or write transaction. All other protocol transaction fields automatically
default to legal protocol values to create a complete master transaction record. Refer to the
functions for default protocol read
and write transaction field values.
The slave BFM API allows you to create a slave 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
transaction field values.
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 you set a new value.
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 axi4_transaction
axi4_transaction write_trans;
// Create master write transaction
write_trans = bfm.create_write_transaction(1);
write_trans.data_words = 2;
For example, to create a simple slave transaction, the slave BFM test program contains the
following code:
// Define a variable slave_trans of type axi4_transaction
axi4_transaction slave_trans;
// Create slave transaction
slave_trans = bfm.create_slave_transaction();