Waiting events, Wait_on(), Get*_transaction(), get*_phase(), get*_cycle() – Altera Mentor Verification IP Altera Edition AMBA AXI4-Lite User Manual
Page 145: Example 7-2. slave bfm test program using

VHDL API Overview
Waiting Events
Mentor Verification IP AE AXI4-Lite User Guide, V10.3
145
April 2014
Waiting Events
Each BFM API has procedures that block the test program code execution until an event has
occurred.
procedure blocks the test program until an ACLK or ARESETn signal event has
occurred before proceeding.
get*_transaction(), get*_phase(), get*_cycle()
procedures block the test program code
execution until a complete transaction, phase or cycle has occurred, respectively.
wait_on()
For example, a BFM test program can wait for the positive edge of the ARESETn signal using
the following code:
-- Block test program execution until the positive edge of the clock
wait_on(AXI4_RESET_POSEDGE, bfm_index, axi4_tr_if_0(bfm_index));
In the above example, the bfm_index specifies the BFM.
get*_transaction(), 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
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-2. Slave BFM Test Program Using
create_slave_transaction(write_trans, bfm_index, axi4_tr_if_0(
bfm_index
));
get_write_addr_phase(write_trans, bfm_index,
axi4
_tr_if_0(bfm_index));
...
execute_write_response_phase(write_trans, bfm_index, AXI4_PATH_2,
axi4
_tr_if_2(bfm_index));
In the above example, the bfm_index specifies the BFM.
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.