Functions that read and write a byte of data to, Internal memory do_byte_read(), Do_byte_write() – Altera Mentor Verification IP Altera Edition AMBA AXI3/4TM User Manual
Page 175: Respectively

SystemVerilog Tutorials
Verifying a Master DUT
Mentor VIP AE AXI3/4 User Guide, V10.2b
157
September 2013
for the slave is defined as a sparse array of 8-bits, so that each byte of data
is stored as an address/data pair.
Example 6-17. internal memory
// Storage for a memory
bit [7:0] mem [*];
function, when called, reads a data byte from the
, mem,
given an address location as demonstrated in
You can edit this function to modify the way the read data is extracted from the
Example 6-18. do_byte_read()
// Function : do_byte_read
// Function to provide read data byte from memory at
// particular input address
function bit[7:0] do_byte_read(addr_t addr);
return mem[addr];
endfunction
function, when called, writes a data byte to the
, mem,
given an address location as
illustrates.
You can edit this function to modify the way the write data is stored in the
.
Example 6-19. do_byte_write()
// Function : do_byte_write
// Function to write data byte to memory at particular
// input address
function void do_byte_write(addr_t addr, bit [7:0] data);
mem[addr] = data;
endfunction