Basic slave api definition, Internal memory, Do_byte_read() – Altera Mentor Verification IP Altera Edition AMBA AXI4-Lite User Manual
Page 124: Example 6-8. internal memory, Model that contains two apis: a
Mentor Verification IP AE AXI4-Lite User Guide, V10.3
124
SystemVerilog Tutorials
Verifying a Master DUT
April 2014
For a complete code listing of the slave test program, refer to “
Basic Slave API Definition
The Basic Slave Test Program API contains the following elements:
•
Functions that read and write a byte of data to
include
and
, respectively.
•
Functions
set_read_data_valid_delay() and set_wr_resp_valid_delay()
delay of the read data channel RVALID, and write response channel BVALID signals,
respectively.
•
Variables
configure the delay of the read/write address channel ARVALID/AWVALID signals,
and
to configure the delay of the write response channel
BVALID signal.
•
A
variable to configure the behavior of the handshake signals
*VALID to *READY delay.
Internal Memory
The internal memory 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-8. Internal Memory
// Storage for a memory
bit [7:0] mem [*];
do_byte_read()
The do_byte_read() function, when called, will read a data byte from the
given an address location as shown below.
You can edit this function to modify the way the read data is extracted from the internal
memory.