
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.
The wait_on() procedure blocks the test program until an ACLK or ARESETn signal event has
occurred before proceeding.
The get_packet(), get_transfer() procedures block the test program code execution until a
complete stream packet or transfer has occurred.
wait_on()
Example 7-7 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()
Example 7-8 shows a slave BFM test program using the get_packet() procedure to block until it
has received a data stream transfer.
Example 7-8. Slave Test Program get_packet() Procedure
-- 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.
Kommentare zu diesen Handbüchern