
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 get_write_addr_phase() task. This task blocks until it has received the address phase,
allowing the test program to call the execute_write_response_phase() task for the transaction at
a later stage, as shown in the slave BFM test program in Example 2-2.
Example 2-2. Slave Test Program Using get_write_addr_phase()
slave_trans = bfm.create_slave_transaction();
bfm.get_write_addr_phase(slave_trans);
...
bfm.execute_write_response_phase(slave_trans);
Not all BFM APIs support the full complement of get*_transaction(), get*_phase(),
get*_cycle() 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 Transaction Record.
The set*() and get*() tasks are used in a test program to set and get information from the
transaction record.
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 “Transaction Fields” on page 30 for transaction field name details.
set*()
For example, to set the WSTRB write strobes signal in the Transaction Record of a write
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 Transaction Record, as shown in the following slave BFM test
program code:
Komentarze do niniejszej Instrukcji