axi_mst_rd_driver

AXI Master Read Driver object.

It receives READ transactions from the user environment and drives the AR channel

Receives READY transactions from the user environment and drives the RREADY signal of the R channel.

Trigger an event when the AR Command is accepted

Collects and re-orders R Channel beats and returns a completed transaction when the RLAST is accepted

Information
class member

axi_vif_mem_proxy `AXI_PARAM_ORDER  vif_proxy; AXI VIF Proxy Class.

xil_seq_item_pull_port #(axi_transaction,axi_transaction) seq_item_port; provides method to send read transaction to axi_mst_rd_driver.

xil_seq_item_pull_port #(axi_ready_gen, axi_ready_gen)  rready_seq_item_port; provides the method to send rready information to axi_mst_rd_driver.

Functions
new
function new(
string name = "unnamed_axi_mst_rd_driver"
);

Constructor to create an AXI master read driver in axi_mst_rd_driver.

set_vif
function void set_vif(
axi_vif_mem_proxy `AXI_PARAM_ORDER vif
);

Assigns the virtual interface of the AXI master read driver in axi_mst_rd_driver.

set_rready_gen
function void set_rready_gen(
input axi_ready_gen_t new_method
);

Sets rready of the AXI master read driver. There are three ways for rready generation in AXI master read driver.

1.User can first create a axi_ready_gen, customerize it and then use set_rready_gen to send it to AXI master read driver. User can't fill in more than 500 axi_ready_gen at one time, otherwise it will error out.

2.User can can first create a axi_ready_gen, customerize it and then use send_rready to send it to AXI master read driver.

3. If neither of above method is being called, then AXI master read driver will a) if XIL_DO_NOT_USE_ADV_RANDOMIZATION is being defined, rready is being generated with cheap_random(this is for tools which doesn't support advanced randomization.  b) else rready will be randomly generated

get_rready_gen
function axi_ready_gen_t get_rready_gen();

Returns rready_gen of the AXI master read driver in axi_mst_rd_driver.

set_forward_progress_timeout_value
function void set_forward_progress_timeout_value (
input xil_axi_uint new_timeout
);

Sets the number of cycles that the driver will wait until it will flag a watch dog error of the <axi_mst_rd_driver>.Default value is 50000.

get_forward_progress_timeout_value
function xil_axi_uint get_forward_progress_timeout_value ();

Returns the number of cycles that the driver will wait until it will flag a watch dog error of the <axi_mst_rd_driver>.Default value is 50000 and user can use set_forward_progress_timeout_value to change it.

set_waiting_valid_timeout_value
function void set_waiting_valid_timeout_value (
input xil_axi_uint new_timeout
);

Sets waiting_valid_timeout_value of axi_mst_rd_driver, waiting_valid_timeout_value is used for driver to wait a certain number of cycles for rvalid/rready, arvalid/arready handshake occurs before it times out.

get_waiting_valid_timeout_value
function xil_axi_uint get_waiting_valid_timeout_value ();

Returns waiting_valid_timeout_value of axi_mst_rd_driver. waiting_valid_timeout_value is used for driver to wait a certain number of cycles for rvalid/rready, arvalid/arready handshake occurs before it times out.

set_transaction_depth
function void set_transaction_depth(
input xil_axi_uint new_depth
);

Sets the number of transactions that the Driver will have in flight at one time in axi_mst_rd_driver.

get_transaction_depth
function xil_axi_uint get_transaction_depth();

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

is_driver_idle
function xil_axi_boolean_t is_driver_idle();

Returns TRUE if driver is idle, else FALSE in axi_mst_rd_driver

get_num_transactions_inflight
function xil_axi_uint get_num_transactions_inflight();

Returns number of transactions in flight in axi_mst_rd_driver

get_adjust_addr_delay_enabled
virtual function xil_axi_boolean_t get_adjust_addr_delay_enabled();

Returns the current state of adjust_addr_delay_enabled in axi_mst_rd_driver.

set_adjust_addr_delay_enabled
virtual function void set_adjust_addr_delay_enabled(
input xil_axi_boolean_t update
);

Sets the value of adjust_addr_delay_enabled of the transaction in axi_mst_rd_driver.

get_adjust_data_beat_delay_enabled
virtual function xil_axi_boolean_t get_adjust_data_beat_delay_enabled();

Returns the current state of adjust_data_beat_delay_enabled in axi_mst_rd_driver.

set_adjust_data_beat_delay_enabled
virtual function void set_adjust_data_beat_delay_enabled(
input xil_axi_boolean_t update
);

Sets the value of adjust_data_beat_delay_enabled of the transaction in axi_mst_rd_driver.

run_phase
task run_phase();

Start control processes for operation of axi_mst_rd_driver

stop_phase
virtual task stop_phase();

Stops all control processes of axi_mst_rd_driver

halt_phase
virtual task halt_phase();

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

resume_phase
virtual task resume_phase();

Resumes processing pending transactions.

send
task send(
input axi_transaction t
);

Sends the AXI transaction to axi_mst_rd_driver. Usually user would create a new axi_transaction by calling create_transaction of axi_mst_rd_driver, either randomize the transaction or set it up. Then it calls send to send the transaction to axi_mst_rd_driver.  It is a blocking process. please refer example design for the usage.

wait_rsp
task wait_rsp(
output axi_transaction t
);

This blocking function will not return until driver send back response transaction of axi_mst_rd_driver. please refer example design for the usage.

create_transaction
virtual function axi_transaction create_transaction (
string name = "unnamed_transaction"
);

Returns an AXI transaction class that has been "newed" of axi_mst_rd_driver. please refer example design for the usage.

send_rready
task send_rready(
input axi_ready_gen t
);

Sends the ready structure to the driver for controlling the READY channel of axi_mst_rd_driver.  Usually user would create a new axi_ready_gen by calling create_ready of axi_mst_rd_driver, either randomize the rready or set it up manually. Then it calls send to send the rready to axi_mst_rd_driver.

create_ready
virtual function axi_ready_gen create_ready (
string name = "unnamed_ready"
);

Returns a ready class that has been "newed" of axi_mst_rd_driver.

wait_driver_idle
task wait_driver_idle();

This is a blocking task which will wait until there are no outstanding transactions in the driver. This means that all the transactions send to the driver have received a corresponding RLast response of axi_mst_rd_driver.