Waiting events, Wait_on(), Get_packet(), get_transfer() – Altera Mentor Verification IP Altera Edition AMBA AXI4-Stream User Manual
Page 82: Example 7-7. test program wait for event, Example 7-8. slave test program, Get_pack

Mentor Verification IP AE AMBA AXI4-Stream User Guide, V10.3
82
VHDL API Overview
Waiting Events
April 2014
In the above example, the bfm_index specifies the actual slave BFM.
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.
procedures block the test program code execution until a
complete stream packet or transfer has occurred.
wait_on()
shows a BFM test program waiting for the positive edge of the ARESETn signal.
Example 7-7. Test Program Wait for Event
-- Block test program execution until the positive edge of the
-- ARESETn signal.
wait_on(AXI4STREAM_RESET_POSEDGE, bfm_index,
axi4stream_tr_if_0(bfm_index));
In the above example, the bfm_index specifies the actual master BFM.
get_packet(), get_transfer()
shows a slave BFM test program using the
procedure to block until it
has received a data stream transfer.
Example 7-8. Slave Test Program
-- Define a local variable trans to hold the transaction record
variable trans: integer;
...
-- Create a slave transaction
create_slave_transaction(trans, bfm_index,
axi4stream_tr_if_0(bfm_index));
...
--Wait for the first data stream transfer to occur.
get_transfer(trans, 0, last, bfm_index, axi4stream_tr_if_0(bfm_index));
In the above example, the bfm_index specifies the actual slave BFM.