Configuration, Set_config(), Get_config() – Altera Mentor Verification IP Altera Edition AMBA AXI4-Stream User Manual

Page 77: Creating transactions, Example 7-1. bfm test program set configuration, Example 7-2. bfm test program get configuration

Advertising
background image

VHDL API Overview

Configuration

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

77

April 2014

Configuration

Configuration sets timeout delays, error reporting, and other attributes of the BFM.

Each BFM has a

set_config()

procedure that sets the configuration of the BFM. Refer to the

individual BFM API for details. Each BFM has a

get_config()

procedure that sets the

configuration of the BFM. Refer to the individual BFM API for details.

set_config()

Example 7-1

shows how to set the burst timeout factor to 1000 for a transaction in the master

BFM test program.

Example 7-1. BFM Test Program Set Configuration

-- Setting the burst timeout factor to 1000
set_config(AXI4STREAM_CONFIG_BURST_TIMEOUT_FACTOR, 1000, bfm_index,

axi4stream_tr_if_0(bfm_index))

In the above example, the bfm_index specifies the actual master BFM.

get_config()

Example 7-2

shows how to get the protocol signal hold time in the master BFM test program.

Example 7-2. BFM Test Program Get Configuration

-- Getting the burst timeout factor
get_config(AXI4STREAM_CONFIG_BURST_TIMEOUT_FACTOR, config_value,

bfm_index, axi4stream_tr_if_0(bfm_index))

In the above example, the bfm_index specifies the actual master BFM.

Creating Transactions

To transfer information between a master BFM and slave DUT over the protocol signals, you
must create a transaction in the master test program. Similarly, to transfer information between
a master DUT and a slave BFM, you must create a transaction in the slave test program. To
monitor the transfer of information using a monitor BFM, you must create a transaction in the
monitor test program.

When you create a

Transaction Record

, it exists for the life of the transaction. The BFM test

programs can access this transaction record during the life of the transaction as it transfers
information between the master and slave.

Advertising