axi_passthrough_agent

AXI Passthrough Agent Class.

The AXI passthrough agent is comprised of other classes which are monitor, runtime master write driver, runtime master read driver, runtime slave write driver, runtime slave read driver.

By default, passthrough agent is in monitor mode.

In order to issue transaction as master, it has to be switched to runtime master mode.

In order to receive transaction, it has to be switched into runtime slave mode.

Please refer PG 267 section about "Useful Coding Guidelines and Examples" for more details.

Information
class member

axi_monitor  `AXI_PARAM_ORDER monitor;

axi_slv_wr_driver  `AXI_PARAM_ORDER slv_wr_driver;

axi_slv_rd_driver  `AXI_PARAM_ORDER slv_rd_driver;

axi_mst_wr_driver  `AXI_PARAM_ORDER mst_wr_driver;

axi_mst_rd_driver  `AXI_PARAM_ORDER mst_rd_driver;

axi_vif_mem_proxy  `AXI_PARAM_ORDER vif_proxy;

axi_passthrough_agent includes a monitor, a master read driver, a master write driver, a slave read driver, a slave write driver and vif_proxy. Please refer below picture for more details about axi_passthrough_agent.

Functions
new
function new (
string name "unnamed_axi_passthrough_agent",
virtual interface axi_vip_if `AXI_PARAM_ORDER vif
);

Constructor to create an AXI Passthrough Agent.~name~ is the instance name and axi_vip_if is the interface in the design.  Please see PG267 for how to find the interface in design hierarchy.

set_verbosity
virtual function void set_verbosity(
xil_verbosity updated
);

Sets the verbosity of the axi_passthrough_agent and all sub classes to determine whether the information will be printed out or not.Refer xil_verbosity for usage

set_agent_tag
virtual function void set_agent_tag(
string updated
);

Sets the tag of the axi_passthrough_agent and all sub classes. If more than one VIPs(in passthrough mode) being used in the same testbench, User can use set_agent_tag with different tag to tell where exactly the log message comes from.

set_vif
function void set_vif(
axi_vif_mem_proxy `AXI_PARAM_ORDER vif
);

Sets the Agent's virtual interface. This is the interface that will be monitored and/or driven.

set_wr_transaction_depth
function void set_wr_transaction_depth(
input xil_axi_uint update
);

Sets the maximum number of WRITE transactions that the axi_passthrough_agent will have in flight at one time.

get_wr_transaction_depth
function xil_axi_uint get_wr_transaction_depth();

Returns the maximum number of WRITE transactions that the axi_passthrough_agent will have in flight at one time.

set_rd_transaction_depth
function void set_rd_transaction_depth(
input xil_axi_uint update
);

Sets the maximum number of READ transactions that the axi_passthrough_agent will have in flight at one time.

get_rd_transaction_depth
function xil_axi_uint get_rd_transaction_depth();

Returns the maximum number of READ transactions that the axi_passthrough_agent will have in flight at one time.

enable_transaction_depth_checks
function void enable_transaction_depth_checks();

Turn on transaction depth check and its monitor's enable_transaction_depth_checks in axi_passthrough_agent

disable_transaction_depth_checks
function void disable_transaction_depth_checks();

Turn off transaction depth check and its monitor's enable_transaction_depth_checks in axi_passthrough_agent

start_monitor
virtual task start_monitor();

Enables the monitor in this agent to start collecting data.

start_master
virtual task start_master();

Enables runtime master mode READ and WRITE drivers of this agent. Start monitor to collect data.  The drivers will only issue axi transactions when the send functions are called.

start_slave
virtual task start_slave();

Enables runtime slave mode READ and WRITE drivers of this agent. start monitor to collect data.  The drivers will only issue ready when the send functions are called.

stop_master
virtual task stop_master();

Disables the READ and WRITE drivers of the master. Once disabled, no further action will occur by the drivers.

halt_master
virtual task halt_master();

Allows for all inflight transactions to complete and no new transaction will be serviced. All other transactions will halt.

resume_master
virtual task resume_master();

Resumes processing of the pending transactions.

stop_slave
virtual task stop_slave();

Disables the READ and WRITE drivers of the slave. Once disabled, no further action will occur by the drivers.

stop_monitor
virtual task stop_monitor();

Disables the monitor in this agent from start collecting data. Once disabled, no further action will occur by the monitor.

set_nobackpressure_readies
virtual task set_nobackpressure_readies();

Convenience function to set the RREADY/BREADY of the master and ARREADY/WREADY/AWREADY of the slave to not apply any backpressure to the simulation.

wait_mst_drivers_idle
task wait_mst_drivers_idle();

This API will be used when axi_passthrough_agent is in runtime master mode. It will not return until all the downstream transactions have completed.

AXI4_READ_BURST
virtual task AXI4_READ_BURST (
input xil_axi_uint id,
input xil_axi_ulong addr,
input xil_axi_len_t len,
input xil_axi_size_t size,
input xil_axi_burst_t burst,
input xil_axi_lock_t lock,
input xil_axi_cache_t cache,
input xil_axi_prot_t prot,
input xil_axi_region_t region,
input xil_axi_qos_t qos,
input xil_axi_user_beat aruser,
output bit [8*4096-1:0data,
output xil_axi_resp_t [255:0resp,
output xil_axi_data_beat [255:0ruser 
);

This task does a full read process for AXI4 when this passthrough agent is in runtime master mode. It is composed of a series of tasks and functions,it first creates transaction from master read driver,sets up the transaction, sends it and then waits till response back.  This task returns when the read transaction is complete.

AXI3_READ_BURST
virtual task AXI3_READ_BURST (
input xil_axi_uint id,
input xil_axi_ulong addr,
input xil_axi_len_t len,
input xil_axi_size_t size,
input xil_axi_burst_t burst,
input xil_axi_lock_t lock,
input xil_axi_cache_t cache,
input xil_axi_prot_t prot,
output bit [8*2048-1:0data,
output xil_axi_resp_t [15:0resp 
);

This task does a full read process for AXI3 when this passthrough agent is in runtime master mode.It is composed of a series of tasks and functions,it first creates transaction from master read driver,sets up the transaction, sends it and then waits till response back.  This task returns when the read transaction is complete.

AXI4LITE_READ_BURST
virtual task AXI4LITE_READ_BURST (
input xil_axi_ulong addr,
input xil_axi_prot_t prot,
output bit [8*8-1:0data,
output xil_axi_resp_t resp 
);

This task does a full read process for AXI4LITE when this passthrough agent is in runtime master mode.It is composed of a series of tasks and functions,it first creates transaction from master read driver,sets up the transaction, sends it and then waits till response back.  This task returns when the read transaction is complete.

AXI4_WRITE_BURST
virtual task AXI4_WRITE_BURST (
input xil_axi_uint id,
input xil_axi_ulong addr,
input xil_axi_len_t len,
input xil_axi_size_t size,
input xil_axi_burst_t burst,
input xil_axi_lock_t lock,
input xil_axi_cache_t cache,
input xil_axi_prot_t prot,
input xil_axi_region_t region,
input xil_axi_qos_t qos,
input xil_axi_user_beat awuser,
input bit [8*4096-1:0data,
input xil_axi_data_beat [255:0wuser,
output xil_axi_resp_t resp 
);

This task does a full write process for AXI4. It is composed of a series of tasks and  functions.It first creates transaction from master write driver,sets up the transaction, sends it and then waits till response back.  This task returns when the complete write transaction is complete.

AXI3_WRITE_BURST
virtual task AXI3_WRITE_BURST (
input xil_axi_uint id,
input xil_axi_ulong addr,
input xil_axi_len_t len,
input xil_axi_size_t size,
input xil_axi_burst_t burst,
input xil_axi_lock_t lock,
input xil_axi_cache_t cache,
input xil_axi_prot_t prot,
input bit [8*2048-1:0data,
output xil_axi_resp_t resp 
);

This task does a full write process for AXI3.It is composed of a series of tasks and  functions.It first creates transaction from master write driver,sets up the transaction, sends it and then waits till response back.  This task returns when the complete write transaction is complete.

AXI4LITE_WRITE_BURST
virtual task AXI4LITE_WRITE_BURST (
input xil_axi_ulong addr,
input xil_axi_prot_t prot,
input bit [8*8-1:0data,
output xil_axi_resp_t resp 
);

This task does a full write process for AXI4LITE.It is composed of a series of tasks and  functions.It first creates transaction from master write driver,sets up the transaction, sends it and then waits till response back.  This task returns when the complete write transaction is complete.