Executing transactions, Execute_transaction(), execute*_phase(), Waiting events – Altera Mentor Verification IP Altera Edition AMBA AXI4-Lite User Manual

Page 33: Wait_on()

Advertising
background image

SystemVerilog API Overview

Executing Transactions

Mentor Verification IP AE AXI4-Lite User Guide, V10.3

33

April 2014

Executing Transactions

Executing a transaction in a master/slave BFM test program initiates the transaction onto the
protocol signals. Each master/slave BFM API has execution tasks that push transactions into the
BFM internal transaction queues.

Figure 2-1

on page 27 illustrates the internal BFM structure.

execute_transaction(), execute*_phase()

If the DUT is a slave, then the execute_transaction() task is called in the master BFM test
program. If the DUT is a master, then the execute*_phase() task is called in the slave BFM test
program.

For example, to execute a master write transaction the master BFM test program contains the
following code:

// By default the execution of a transaction will block
bfm.execute_transaction(write_trans);

For example, to execute a slave write response phase, the slave BFM test program contains the
following code:

// By default the execution of a transaction will block
bfm.execute_write_response_phase(slave_trans);

Waiting Events

Each BFM API has tasks that block the test program code execution until an event has occurred.

The

wait_on()

task blocks the test program until an ACLK or ARESETn signal event has

occurred before proceeding.

The

get*_transaction(), get*_phase(), get*_cycle()

tasks block the test program code execution

until a complete transaction, phase, or cycle has occurred, respectively.

wait_on()

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
bfm.wait_on(AXI4_RESET_POSEDGE);

Advertising