
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.
The wait_on() procedure blocks the test program until an ACLK or ARESETn signal event has
occurred before proceeding.
The 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 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-2 below.
Example 7-2. Slave BFM Test Program Using get_write_addr_phase()
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.
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.
Kommentare zu diesen Handbüchern