Access transaction record, Set*(), Get*() – Altera Mentor Verification IP Altera Edition AMBA AXI3/4TM User Manual

Page 42

Advertising
background image

Mentor VIP AE AXI3/4 User Guide, V10.2b

24

SystemVerilog API Overview
Access Transaction Record

September 2013

Note

Not all BFM APIs support the full complement of

get*_transaction(), get*_burst(),

get*_phase(), get*_cycle()

tasks. Refer to the individual master, slave or monitor BFM

API for details.

Access Transaction Record

Each BFM API has tasks that can access a complete or partially complete

Transaction Record

.

The

set*()

and

get*()

tasks are used in a test program to set and get information from the

transaction record.

Note

The set*() and get*() tasks are not explicitly described in each BFM API chapter. The
simple rule for the task name is set_ or get_ followed by the name of the transaction field
accessed. Refer to

“Transaction Fields”

on page 17 for transaction field name details.

set*()

For example, to set the WSTRB write strobes signal for the first phase (beat) in the

Transaction

Record

of a write transaction, the master test program would use the set_write_strobes() task, as

shown in the code below.

write_trans.set_write_strobes(4'b0010, 0);

get*()

For example, a slave BFM test program uses a received write address phase to get the AWPROT
signal value from the

Transaction Record

, as shown in the slave BFM test program code below.

// Define a variable prot_value of type axi_transaction
axi_prot_e prot_value;

slave_trans = bfm.create_slave_transaction();

// Wait for a write address phase
bfm.get_write_addr_phase(slave_trans);

... …

// Get the AWPROT signal value of the slave transaction
prot_value = bfm.get_prot(slave_trans);

Advertising