
Mentor VIP AE AXI3/4 User Guide, V10.2b
196
VHDL API Overview
Access Transaction Record
September 2013
get*_transaction(), get*_burst(), get*_phase(), get*_cycle()
For example, a slave BFM test program can use a received write address phase to form the
response of the write transaction. The test program gets the write address phase for the
transaction by calling the get_write_addr_phase() procedure. This task blocks until it has
received the address phase, allowing the test program to then call the
execute_write_response_phase() procedure for the transaction, as shown in the slave BFM test
program in Example 7-3 below.
Example 7-3. Slave BFM Test Program Using get_write_addr_phase()
-- * = axi| axi4
-- ** = AXI | AXI4
create_slave_transaction(write_trans, bfm_index, *_tr_if_0(
bfm_index));
get_write_addr_phase(write_trans, bfm_index, *_tr_if_0(bfm_index));
...
execute_write_response_phase(write_trans, bfm_index, **_PATH_2,
*_tr_if_2(bfm_index));
In the above example, the bfm_index specifies the BFM.
Not all BFM APIs support the full complement of get*_transaction(), get*_burst(),
get*_phase(), get*_cycle() tasks. Refer to the individual master, slave or monitor BFM
API for details.
Access Transaction Record
Each BFM API has procedures that can access a complete, or partially complete, Transaction
Record. The set*() and get*() procedures are used in a test program to set and get information
from the transaction record.
set*()
For example, to set the WSTRB write strobes signal for the first phase (beat) in the Transaction
Record of a write transaction, the master test program would use the set_write_strobes()
procedure, as shown in the code below.
-- * = axi| axi4
set_write_strobes(2, tr_id, bfm_index, *_tr_if_0(bfm_index));
In the above example, the bfm_index specifies the BFM.
Comentários a estes Manuais