Get*_transaction(), get*_phase(), get*_cycle(), Access transaction record, Set*() – Altera Mentor Verification IP Altera Edition AMBA AXI4-Lite User Manual
Page 34: Get*(), Example 2-2. slave test program using

Mentor Verification IP AE AXI4-Lite User Guide, V10.3
34
SystemVerilog API Overview
Access Transaction Record
April 2014
get*_transaction(), get*_phase(), get*_cycle()
A slave BFM test program can use a received write address phase to form the response to the
write transaction. The test program gets the write address phase for the transaction by calling
the
task. This task blocks until it has received the address phase,
allowing the test program to call the
execute_write_response_phase()
a later stage, as shown in the slave BFM test program in
Example 2-2. Slave Test Program Using
slave_trans = bfm.create_slave_transaction();
bfm.get_write_addr_phase(slave_trans);
...
bfm.execute_write_response_phase(slave_trans);
Note
Not all BFM APIs support the full complement of
get*_transaction(), get*_phase(),
tasks. Refer to the individual master, slave, or monitor BFM API for details.
Access Transaction Record
Each BFM API has tasks that can access a complete or partially complete
.
tasks are used in a test program to set and get information from the
transaction record.
Note
The set*() and get*() tasks are not explicitly described in each BFM API chapter. The
simple rule for the task name is set_ or get_ followed by the name of the transaction field
accessed. Refer to “
” on page 30 for transaction field name details.
set*()
For example, to set the WSTRB write strobes signal in the
transaction, the master test program would use the set_write_strobes() task, as shown in the
following code:
write_trans.set_write_strobes(4'b0010);
get*()
For example, a slave BFM test program uses a received write address phase to get the
AWPROT signal value from the
, as shown in the following slave BFM test
program code: