Helper functions, Get_write_addr_data(), Example – Altera Mentor Verification IP Altera Edition AMBA AXI3/4TM User Manual

Page 151

Advertising
background image

SystemVerilog AXI3 and AXI4 Monitor BFMs

Helper Functions

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

133

September 2013

Helper Functions

AMBA AXI protocols typically provide a start address only in a transaction, with the following
addresses for each byte of a data burst calculated using the size, length, and type transaction
fields. Helper functions provide you with a simple interface to set and get address/data values.

get_write_addr_data()

This nonblocking function returns the actual address addr and data of a particular byte in a
write data burst . It is used in a monitor test program as a helper function to store a byte of data
at a particular address in the monitor memory. If the corresponding index does not exist, then
this function returns false, otherwise it returns true.

Example

bfm.get_write_addr_data(write_trans, 0, addr, data);

Prototype

// * = axi | axi4
// ** = AXI | AXI4
function bit get_write_addr_data
(

input *_transaction trans,
input int index = 0,
output bit [((**_ADDRESS_WIDTH) - 1) : 0] addr[],
output bit [7:0] data[]

);

Arguments

trans

The *_transaction record.

index

Array element number.

addr

Write address array

data

Write data array

Returns

bit

Flag to indicate existence of index array element;

0 = array element non-existent.
1 = array element exists.

Advertising