Configuration, Set_config(), Get_config() – Altera Mentor Verification IP Altera Edition AMBA AXI4-Stream User Manual
Page 22: Creating transactions, Example 2-1. bfm test program set configuration, Example 2-2. bfm test program get configuration

Mentor Verification IP AE AMBA AXI4-Stream User Guide, V10.3
22
SystemVerilog API Overview
Configuration
April 2014
Configuration
Configuration sets timeout delays, error reporting, and other attributes of the BFM.
Each BFM has a
function that sets the configuration of the BFM. Refer to the
individual BFM APIs for details.
Each BFM also has a
function that returns the configuration of the BFM. Refer to
the individual BFM APIs for details.
set_config()
shows how to set the burst timeout factor to 1000 for a transaction in the master
BFM test program.
Example 2-1. BFM Test Program Set Configuration
// Setting the burst timeout factor to 1000
master_bfm.set_config(AXI4STREAM_CONFIG_BURST_TIMEOUT_FACTOR, 1000);
get_config()
shows how to get the signal hold time in the master BFM test program.
Example 2-2. BFM Test Program Get Configuration
// Getting hold time value
hold_time = master_bfm.get_config(AXI4STREAM_CONFIG_HOLD_TIME);
Creating Transactions
To transfer information between a master BFM and slave DUT over the protocol signals, you
must create a transaction in the master test program. Similarly, to transfer information between
a master DUT and a slave BFM, you must create a transaction in the slave test program. To
monitor the transfer of information using a monitor BFM, you must create a transaction in the
monitor test program.
When you create a transaction, a
is created and exists for the life of the
transaction. This transaction record can be accessed by the BFM test programs during the life of
the transaction as it transfers information between the master and slave.