axi_monitor

When active the AXI Monitor will record transactions that are presented on the virtual interface. It does below functions: Monitors all 5 AXI channels: AW, AR, R, W, and B. Collects and re-orders R Channel beats and returns a completed transaction when the RLAST is accepted Collects and re-orders B Channel response and returns a completed transaction when the B channel is accepted Transaction based protocol checking.

Information
class member

xil_analysis_port #(axi_monitor_transaction) item_collected_port; provides methods for axi monitor transaction.

xil_analysis_port #(xil_axi_cmd_beat) axi_cmd_port; provides methods for axi command.

xil_analysis_port #(xil_axi_cmd_beat) axi_rd_cmd_port; provides methods for axi read command.

xil_analysis_port #(xil_axi_cmd_beat) axi_wr_cmd_port; provides methods for axi write command.

xil_analysis_port #(xil_axi_resp_beat) axi_bresp_port; provides methods for axi bresponse.

xil_analysis_port #(xil_axi_write_beat) axi_wr_beat_port; provides methods for axi write beat.

xil_analysis_port #(xil_axi_read_beat) axi_rd_beat_port; provides methods for axi read beat. axi_vif_mem_proxy `AXI_PARAM_ORDER vif_proxy; AXI VIF Proxy Class

    By default, only item_collected_port is on. To turn on other ports.Use below codes
    axi_cmd_port.set_enabled() to turn on axi_cmd_port,
    axi_wr_cmd_port.set_enabled() to turn on axi_wr_cmd_port;
    axi_rd_cmd_port.set_enabled() to turn on axi_rd_cmd_port;
    axi_bresp_port.set_enabled() to turn on axi_bresp_port;
    axi_wr_beat_port.set_enabled()to turn on axi_wr_beat_port;
    axi_rd_beat_port.set_enabled() to turn on axi_rd_beat_port;

Functions
new

function new ( |
string | name | = | "unnamed_axi_monitor"
| );

Constructor to create a new monitor object. initalize the original settings and pass the input name as the montior instance name.

set_vif

function void set_vif( |
axi_vif_mem_proxy ` | AXI_PARAM_ORDER | vif
| );

Assigns input virtual interface vif to the virtual interface of the monitor.

get_axi_version
virtual function xil_axi_vif_axi_version_t get_axi_version();

Returns the value of AXI version of the transaction of axi_monitor. please refer xil_axi_vif_axi_version_t for possible axi version.

get_axi_version_name
virtual function string get_axi_version_name();

Returns the enum string name of AXI version of the transaction of axi_monitor. please refer xil_axi_vif_axi_version_t for possible axi version

set_wr_transaction_depth

function void set_wr_transaction_depth( |
input | xil_axi_uint | update
| );

Sets the maximum number of WRITE transactions which axi_monitor can accept. Usually user set this depth from the agent which will automatically set it's driver/monitor

get_wr_transaction_depth
function xil_axi_uint get_wr_transaction_depth();

Returns the maximum number of WRITE transactions that the Driver 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 which axi_monitor can accept. Usually user set this depth from the agent which will automatically set it's driver/monitor

get_rd_transaction_depth
function xil_axi_uint get_rd_transaction_depth();

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

enable_transaction_depth_checks
function void enable_transaction_depth_checks();

Turn on checker for comparison of current write/read transaction depth against maximum wr_transaction_depth/rd_transaction_depth of axi_monitor.

disable_transaction_depth_checks
function void disable_transaction_depth_checks();

Turn off checker for comparison of current write/read transaction depth against maximum wr_transaction_depth/rd_transaction_depth of axi_monitor.

get_transaction_depth_check_status
function xil_axi_uint get_transaction_depth_check_status();

Returns transaction_depth_checks_enabled value of axi_monitor. If user is not sure whether transaction_depth_checks_enabled is on or off, This API can be called to serve this purpose.

disable_exclusive_checks
function void disable_exclusive_checks();

Turn off current agent's exclusive transfer checks

enable_exclusive_checks
function void enable_exclusive_checks();

Turn on current agent's exclusive transfer checks

get_num_rd_transactions_inflight
function xil_axi_uint get_num_rd_transactions_inflight();

Returns number of read transaction in flight

get_num_wr_transactions_inflight
function xil_axi_uint get_num_wr_transactions_inflight();

Returns number of write transaction in flight

run_phase
virtual task run_phase();

Start control processes for operation

stop_phase
virtual task stop_phase();

Stops all control processes.

create_transaction

virtual function axi_monitor_transaction create_transaction ( |
string | name | = | "unnamed_transaction",
xil_axi_cmd_t | dir |  |
| );

Returns an AXI monitor transaction class that has been "newed"