Using the axi4 basic slave test program api, Axi4 advanced slave api definition – Altera Mentor Verification IP Altera Edition AMBA AXI3/4TM User Manual

Page 192

Advertising
background image

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

174

SystemVerilog Tutorials
Verifying a Master DUT

September 2013

Note

In addition to the above variables and procedures, you can configure other aspects of the
AXI4 Slave BFM by using the procedures:

“set_config()”

on page 76 and

“get_config()”

on page 78.

Using the AXI4 Basic Slave Test Program API

There are a set of tasks and functions that you can use to create stimulus scenarios based on a
memory-model slave with a minimal amount of editing, as described in the

AXI4 Basic Slave

API Definition

section.

Consider the following configurations when using the slave test program.

slave_mode

- The read and write channel interaction can cause simultaneous read and

write transactions to occur at the same address. With the default slave_mode setting the
read transaction data burst is buffered at the start of the burst and the write data burst is
buffered at the end of the burst. This can result in the read data being stale at the time it
is transmitted over the protocol signals. If this is an undesirable feature, then set the
slave_mode to be AXI4_PHASE_SLAVE.

slave_ready_delay_mode

- By default each channel handshake *READY signal will

always follow, or be simultaneous with, the channel *VALID signal. By configuring the
slave_ready_delay_mode to be AXI4_TRANS2READY, *READY before *VALID
scenarios can be achieved.

m_max_outstanding_read_trans - The maximum number of outstanding (incomplete)
read transactions that can be initiated by a master test program before the slave test
program applies back-pressure to the master by deasserting the ARREADY signal. When
subsequent read transactions complete, then the slave test program asserts ARREADY.

m_max_outstanding_write_trans - The maximum number of outstanding (incomplete)
write transactions that can be initiated by a master test program before the slave test
program applies back-pressure to the master by deasserting the AWREADY signal. When
subsequent read transactions complete, then the slave test program asserts AWREADY.

AXI4 Advanced Slave API Definition

Note

You are not required to edit the following Advance Slave API unless you require a
different response than the default (OKAY) response.

The remaining section of this tutorial presents a walk-through of the Advanced Slave API in the
slave test program. It consists of four main tasks,

process_read()

,

process_write()

,

handle_read()

, and

handle_write()

in the slave test program, as shown in

Figure 6-8

. There are

additional

handle_write_addr_ready()

,

handle_read_addr_ready()

and

Advertising