axi_transaction

The axi_transaction class is the base class of AXI protocol. It inherits all the methods of xil_sequence_item.

Functions
new
function new(
input string name = "unnamed_axi_transaction",
xil_axi_uint protocol = 0,
xil_axi_uint addrw = 32,
xil_axi_uint dataw = 32,
xil_axi_uint idw = 0,
xil_axi_uint awusrw = 0,
xil_axi_uint wusrw = 0,
xil_axi_uint busrw = 0,
xil_axi_uint arusrw = 0,
xil_axi_uint rusrw = 0,
xil_axi_uint supports_narrow = 1,
xil_axi_uint has_burst = 1,
xil_axi_uint has_lock = 1,
xil_axi_uint has_cache = 1,
xil_axi_uint has_region = 1,
xil_axi_uint has_prot = 1,
xil_axi_uint has_qos = 1,
xil_axi_uint has_wstrb = 1,
xil_axi_uint has_bresp = 1,
xil_axi_uint has_rresp = 1
);

Constructor to create a new AXI transaction.

copy
function void copy(
axi_transaction rhs
);

Copies the contents of the input transaction to the current transaction

get_type_name
virtual function string get_type_name();

Returns the name of the class type

my_clone
virtual function axi_transaction my_clone ();

Clones the current transaction and returns a handle to the new transaction.

set_protocol
virtual function void set_protocol(
input xil_axi_uint update
);

Sets the protocol type of the transaction.  update = 0 => protocol = XIL_VERSION_AXI4; update = 1 => protocol = XIL_VERSION_AXI3; update = 2 => protocol = XIL_VERSION_LITE;

get_adjust_response_delay_enabled
virtual function xil_axi_boolean_t get_adjust_response_delay_enabled();

Returns the current state of adjust_response_delay_enabled of the transaction.

set_adjust_response_delay_enabled
virtual function void set_adjust_response_delay_enabled(
input xil_axi_boolean_t update
);

Sets the value of adjust_response_delay_enabled of the transaction.

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 of the transaction.

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.

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 of the transaction.

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.

set_supports_narrow
virtual function void set_supports_narrow(
input xil_axi_uint update
);

Sets the value of supports_narrow of the transaction. Internal use only

set_has_burst
virtual function void set_has_burst(
input xil_axi_uint update
);

Sets the value of has_burst of the transaction. Internal use only

set_has_lock
virtual function void set_has_lock(
input xil_axi_uint update
);

Sets the value of has_lock of the transaction. Internal use only

set_has_cache
virtual function void set_has_cache(
input xil_axi_uint update
);

Sets the value of has_cache of the transaction. Internal use only

set_has_region
virtual function void set_has_region(
input xil_axi_uint update
);

Sets the value of has_region of the transaction. Internal use only

set_has_prot
virtual function void set_has_prot(
input xil_axi_uint update
);

Sets the value of has_prot of the transaction. Internal use only

set_has_qos
virtual function void set_has_qos(
input xil_axi_uint update
);

Sets the value of has_qos of the transaction. Internal use only

set_has_wstrb
virtual function void set_has_wstrb(
input xil_axi_uint update
);

Sets the value of has_wstrb of the transaction. Internal use only

set_adjust_strb
virtual function void set_adjust_strb(
input xil_axi_uint update
);

sets the value of adjust_strb of the transaction. Internal use only

set_has_bresp
virtual function void set_has_bresp(
input xil_axi_uint update
);

Sets the value of has_bresp of the transaction. Internal use only

set_has_rresp
virtual function void set_has_rresp(
input xil_axi_uint update
);

Sets the value of has_rresp of the transaction. Internal use only

get_supports_narrow
virtual function xil_axi_boolean_t get_supports_narrow();

Returns the value of supports_narrow of the transaction.

get_has_burst
virtual function xil_axi_boolean_t get_has_burst();

Returns the value of has_burst of the transaction.

get_has_lock
virtual function xil_axi_boolean_t get_has_lock();

Returns the value of has_lock of the transaction.

get_has_cache
virtual function xil_axi_boolean_t get_has_cache();

Returns the value of has_cache of the transaction.

get_has_region
virtual function xil_axi_boolean_t get_has_region();

Returns the value of has_region of the transaction.

get_has_prot
virtual function xil_axi_boolean_t get_has_prot();

Returns the value of has_prot of the transaction.

get_has_qos
virtual function xil_axi_boolean_t get_has_qos();

Returns the value of has_qos of the transaction.

get_has_wstrb
virtual function xil_axi_boolean_t get_has_wstrb();

Returns the value of has_wstrb of the transaction.

get_adjust_strb
virtual function xil_axi_boolean_t get_adjust_strb();

Return the value of adjust_strb of the transaction.

get_has_bresp
virtual function xil_axi_boolean_t get_has_bresp();

Returns the value of has_bresp of the transaction.

get_has_rresp
virtual function xil_axi_boolean_t get_has_rresp();

Returns the value of has_rresp of the transaction.

get_protocol
virtual function xil_axi_uint get_protocol();

Returns the value of protocol type of the transaction.

set_addr_width
virtual function void set_addr_width(
input xil_axi_uint updated
);

Sets the value of address width of the transaction. Internal use only

get_addr_width
virtual function xil_axi_uint get_addr_width();

Returns the value of address width of the transaction.

set_data_width
virtual function void set_data_width(
xil_axi_uint updated
);

Sets the value of WDATA/RDATA width of the transaction. Internal use only

get_data_width
virtual function xil_axi_uint get_data_width();

Returns the value of WDATA/RDATA width of the transaction.

set_id_width
virtual function void set_id_width(
xil_axi_uint updated
);

Sets the value of ID width of the transaction. Internal use only

get_id_width
virtual function xil_axi_uint get_id_width();

Returns the value of ID width of the transaction.

set_awuser_width
virtual function void set_awuser_width(
xil_axi_uint updated
);

Sets the value of AWUSER width of the transaction. Internal use only

get_awuser_width
virtual function xil_axi_uint get_awuser_width();

Returns the value of AWUSER width of the transaction.

set_wuser_width
virtual function void set_wuser_width(
xil_axi_uint updated
);

Sets the value of WUSER width of the transaction. Internal use only

get_wuser_width
virtual function xil_axi_uint get_wuser_width();

Returns the value of WUSER width of the transaction.

set_buser_width
virtual function void set_buser_width(
xil_axi_uint updated
);

Sets the value of BUSER width of the transaction. Internal use only

get_buser_width
virtual function xil_axi_uint get_buser_width();

Returns the value of BISER width of the transaction.

set_aruser_width
virtual function void set_aruser_width(
xil_axi_uint updated
);

Sets the value of ARUSER width of the transaction. Internal use only

get_aruser_width
virtual function xil_axi_uint get_aruser_width();

Returns the value of ARUSER width of the transaction.

set_ruser_width
virtual function void set_ruser_width(
xil_axi_uint updated
);

Sets the value of RUSER width of the transaction. Internal use only

get_ruser_width
virtual function xil_axi_uint get_ruser_width();

Returns the value of RUSER width of the transaction.

get_axi_version
virtual function xil_axi_vif_axi_version_t get_axi_version();

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

set_axi_version
virtual function void set_axi_version(
xil_axi_vif_axi_version_t updated
);

Sets the value of AXI VERSION of the transaction. Internal use only

get_axi_version_name
virtual function string get_axi_version_name();

Returns the string name of the AXI version of the transaction.

set_creation_time
virtual function void set_creation_time(
time in
);

Sets creation_time of the transaction. Internal use only

get_creation_time
virtual function time get_creation_time();

Returns creation_time of the transaction.

cmd_convert2string
virtual function string cmd_convert2string();

Returns the string of the AXI basic command properties which are cmd name,cmd_id,addr,id,length,size name, burst name, cache,lock name and prot. This is debugging tool to observe the transaction.

cmd_sprintf
virtual function string cmd_sprintf();

Returns the string of the AXI basic command properties. refer cmd_convert2string  for AXI basic command properties. This is debugging tool to observe the transaction.

convert2string
virtual function string convert2string();

Returns the string of the AXI transaction. This is debugging tool to observe the transaction.

Name
CMD
ADDR
W/RID
LEN
SIZE
BURST
CACHE
LOCK
PROT
REGION
QOS
AWUSER/BUSER/BRESP/ARUSER
DRIVER_RETURN_ITEM
CREATION_TIME
SUBMIT_TIME
PAYLOAD
set_submit_time
virtual function void set_submit_time(
time in
);

Sets sumbit_time of the transaction.

get_submit_time
virtual function time get_submit_time();

Gets submit_time of the transaction.

set_submit_cycle
virtual function void set_submit_cycle(
xil_axi_ulong in
);

Sets sumbit_cycle of the transaction.

get_submit_cycle
virtual function xil_axi_ulong get_submit_cycle();

Gets submit_cycle of the transaction.

get_region_range
virtual function void get_region_range(
output xil_axi_region_t min,
output xil_axi_region_t max
);

Returns the MIN/MAX values that are used to constrain the AxREGION value.

set_region_range
virtual function void set_region_range(
input xil_axi_region_t min,
input xil_axi_region_t max
);

Sets the MIN/MAX values that are used to constrain the AxREGION value.

get_num_bytes_in_transaction
virtual function xil_axi_uint get_num_bytes_in_transaction();

Returns the number of bytes DATA of the transaction based on the current properties of the transaction. It equals to (length +1) *  size(in bytes)

set_read_cmd
virtual function void set_read_cmd(
input xil_axi_ulong addr,
input xil_axi_burst_t burst = XIL_AXI_BURST_TYPE_INCR,
input xil_axi_uint id = 0,
input xil_axi_len_t len = 0,
input xil_axi_size_t size = XIL_AXI_SIZE_4BYTE
);

Helper function to set the most common READ command properties of the transaction. Address,burst type,length, and size can be set through this command. This API is being used for READ Command only.

set_write_cmd
virtual function void set_write_cmd(
input xil_axi_ulong addr,
input xil_axi_burst_t burst = XIL_AXI_BURST_TYPE_INCR,
input xil_axi_uint id = 0,
input xil_axi_len_t len = 0,
input xil_axi_size_t size = XIL_AXI_SIZE_4BYTE
);

Helper function to set the most common WRITE command properties of the transaction. It sets address, burst type, id, length and size of the WRITE transaction. This API can only be used for WRITE Command only.

set_cmd
virtual function void set_cmd(
input xil_axi_cmd_t cmd,
input xil_axi_ulong addr,
input xil_axi_burst_t burst = XIL_AXI_BURST_TYPE_INCR,
input xil_axi_uint id = 0,
input xil_axi_len_t len = 0,
input xil_axi_size_t size = XIL_AXI_SIZE_4BYTE
);

Helper function to set the most common command properties of the transaction. It sets cmd type,address, burst type, id, length and size of the transaction,

get_region
virtual function xil_axi_region_t get_region ();

Returns the value of AxREGION of the transaction.

set_region
virtual function void set_region (
input xil_axi_region_t updated
);

Sets the value of AxREGION of the transaction.

get_qos
virtual function xil_axi_qos_t get_qos ();

Returns the value of AxQOS of the transaction.

set_qos
virtual function void set_qos (
input xil_axi_qos_t updated
);

Sets the value of AxQOS of the transaction.

get_id
virtual function xil_axi_uint get_id ();

Returns the value of AxID/RID/BID of the transaction.

set_id
virtual function void set_id (
input xil_axi_uint new_id
);

Sets the value of AxID/RID/BID of the transaction.

set_driver_return_item
virtual function void set_driver_return_item ();

Sets the driver_return_item property to XIL_AXI_PAYLOAD_RETURN of the transaction.

set_driver_return_item_policy
virtual function void set_driver_return_item_policy (
input xil_axi_driver_return_policy_t set
);

Sets the driver_return_item property of the transaction. If user want to get the data back from driver, the driver_return_item has to be set to not  XIL_AXI_NO_RETURN.

Simple usage of this API to get read data back from driver from master agent is listed below, more details please refer PG267 section about How to Receive Read Data and/or example design in Vivado about sim-set sim_adv_mst_active__pt_slv__slv_passive, under there look for *mst_stimulus.sv file:

rd_trans = agent.rd_driver.create_transaction("read transaction with randomization for getting data back");
fully_randomized_transaction(rd_trans);
rd_trans.set_driver_return_item_policy(XIL_AXI_PAYLOAD_RETURN);
agent.rd_driver.send(rd_trans);
agent.rd_driver.wait_rsp(rd_trans);
data_block_for_read = rd_trans.get_data_block();
$display("Read data from Driver: Block Data %h ", data_block_for_read);
DataBeat_for_read = new[rd_trans.get_len()+1];
for( xil_axi_uint beat=0; beat<rd_trans.get_len()+1; beat++) begin
DataBeat_for_read[beat] = rd_trans.get_data_beat(beat);
$display("Read data from Driver: beat index %d, Data beat %h ", beat, DataBeat_for_read[beat]);
get_driver_return_item_policy
virtual function xil_axi_driver_return_policy_t get_driver_return_item_policy ();

Returns the value of driver_return_item property of the transaction.

get_addr
function xil_axi_ulong get_addr ();

Returns the value of AxADDR of the transaction. AxADDR here can be AWADDR or ARADDR.

set_addr
virtual function void set_addr (
input xil_axi_ulong updated
);

Sets the value of AxADDR of the transaction. AxADDR here can be AWADDR or ARADDR .If user accidently set the address out of range(0, 1<< this.get_addr_width() -1), a warning message will pop up and the address will be truncated to make sure it is in the address range.

get_addr_offset
virtual function xil_axi_uint get_addr_offset();

Gets address offset of the transaction.

get_cmd_id
virtual function xil_axi_uint get_cmd_id();

Returns the value of an ID field for the transaction. This can be used for tracking the transaction within the DRIVER or environment.

get_cmd_type
virtual function xil_axi_cmd_t get_cmd_type();

Returns the transaction command type (READ/WRITE) of the transaction.

set_cmd_type
virtual function void set_cmd_type(
input xil_axi_cmd_t updated
);

Sets the transaction command type (READ/WRITE) of the transaction.

get_cmd_type_name
virtual function string get_cmd_type_name();

Returns the string name of the command type of the transaction.

get_len
virtual function xil_axi_len_t get_len();

Returns the value of AxLEN of the transaction. AxLEN can be ARLEN and AWLEN.

set_len
virtual function void set_len(
input xil_axi_len_t updated
);

Sets the value of AxLEN of the transaction. AxLEN can be ARLEN and AWLEN, A fatal DRC occurs when any of the following conditions occur: If AXI VIP is configured to be AXI4LITE and the user sets the length other than 0.  If AXI VIP is configured to be AXI3 and the user sets the length greater than 16.  If the burst type is not INCR and the user sets the length to a value great than 16.  If the burst type is fixed and the user sets the length to a value great than 16.  If the burst type is WRAP and the user sets the length to a value that is not 2,4,8,16.

get_size
virtual function xil_axi_size_t get_size();

Returns the value of AxSIZE of the transaction. AxSIZE can be ARSIZE and AWSIZE.

get_size_name
virtual function string get_size_name();

Returns the string name of the value of AxSIZE of the transaction.

get_dw_size
virtual function xil_axi_size_t get_dw_size();

Helper function that will convert the data width value to AxSIZE and return the value;

set_size
virtual function void set_size(
input xil_axi_size_t updated
);

Sets the value of AxSIZE of the transaction.

get_burst
virtual function xil_axi_burst_t get_burst();

Returns the value of AxBURST of the transaction. AxBURST can be ARBURST and AWBURST.

get_burst_name
virtual function string get_burst_name();

Returns the string name of the value of AxBURST of the transaction.

set_burst
virtual function void set_burst(
input xil_axi_burst_t updated
);

Sets the value of AxBURST of the transaction. AxBURST can be ARBURST and AWBURST.  When AXI VIP HAS_BURST is low, burst type can only be set to INCR, otherwise, FATAL DRC will be file.  When AXI VIP HAS_BURST is high and it is AXI4LITE, burst type can only be set to INCR. otherwise, FATAL DRC will be file

get_lock
virtual function xil_axi_lock_t get_lock();

Returns the value of AxLOCK of the transaction. AxLOCK can be ARLOCK and AWLOCK.

set_lock
virtual function void set_lock(
input xil_axi_lock_t updated
);

Sets the value of AxLOCK of the transaction. AxLOCK can be ARLOCK and AWLOCK.

get_cache
virtual function xil_axi_cache_t get_cache();

Returns the value of AxCACHE of the transaction. AxCACHE can be ARCACHE and AWCACHE.

set_cache
virtual function void set_cache(
input xil_axi_cache_t updated
);

Sets the value of AxCACHE of the transaction. AxCACHE can be ARCACHE and AWCACHE.

get_prot
virtual function xil_axi_prot_t get_prot();

Returns the value of AxPROT of the transaction.AxPROT can be ARPROT and AWPROT.

set_prot
virtual function void set_prot(
input xil_axi_prot_t updated
);

Sets the value of AxPROT of the transaction. AxPROT can be ARPROT and AWPROT.

set_trans_state
virtual function void set_trans_state(
input xil_axi_trans_state_t updated
);

Sets trans_state of the transaction.

get_trans_state
virtual function xil_axi_trans_state_t get_trans_state();

Returns trans_state of the transaction.

do_compare
virtual function bit do_compare (
xil_object rhs
);

Compares two transactions together to make sure that they are identical. It will return 1 when successful.

get_awuser
virtual function xil_axi_user_beat get_awuser();

Returns the value of the AWUSER.

set_awuser
virtual function void set_awuser(
input xil_axi_user_beat updated
);

Sets the value of the AWUSER. Warning will be poped out if user try to set awuser value which is out of range.

get_aruser
virtual function xil_axi_user_beat get_aruser();

Returns the value of the ARUSER.

set_aruser
virtual function void set_aruser(
input xil_axi_user_beat updated
);

Sets the value of the ARUSER. Warning will be poped out if user try to set aruser value which is out of range.

get_buser
virtual function xil_axi_user_beat get_buser();

Returns the value of the BUSER.

set_buser
virtual function void set_buser(
input xil_axi_user_beat updated
);

Sets the value of the BUSER of the transaction. Warning will be poped out if user try to set buser value which is out of range.

get_beat_index
virtual function xil_axi_uint get_beat_index();

Get current beat index of the beat.

increment_beat_index
virtual function void increment_beat_index();

Increment beat index of the beat.

clr_beat_index
virtual function void clr_beat_index();

Clear beat index of the beat.

get_addr_delay
virtual function xil_axi_uint get_addr_delay();

Returns the value of the address delay from the time command being recevied by write/read driver of master agent to the time the command being put on interface bus. Refer PG267 AXI VIP Agent and Flow Methology about Write Command and Data Flow.

set_addr_delay
virtual function void set_addr_delay(
input xil_axi_uint updated
);

Sets the value of the address delay from the time command being recevied by write/read driver of master agent to the time the command being put on interface bus. Refer PG267 AXI VIP Agent and Flow Methology about Write Command and Data Flow.

adjust_data_insertion_delay
virtual function void adjust_data_insertion_delay(
input xil_axi_ulong now
);

Adjust data insertion delay of the transaction. This API is disabled when adjust_data_beat_delay_enabled is low, when it is high, it will be used to adjust the delay between the time when the command is to be processed and the time when the data is applied to the interface.

adjust_addr_delay
virtual function void adjust_addr_delay(
input xil_axi_ulong now
);

Adjust address delay of the transaction. This API is disabled when adjust_addr_delay_enabled is low, when it is high, it will be used to adjust the address delay of the transaction.

adjust_response_delay
virtual function void adjust_response_delay(
input xil_axi_ulong now
);

Adjust responseess delay of the transaction. This API is disabled when adjust_response_delay_enabled is low, when it is high, it will be used to adjust the response delay.

get_data_insertion_delay
virtual function xil_axi_uint get_data_insertion_delay();

Returns the transactions insertion delay value. The delay value is the number of clock cycles between transfer being processed to the data transfer being applied to the interface. Refer PG267 AXI VIP Agent and Flow Methology about Write Command and Data Flow.

set_data_insertion_delay
virtual function void set_data_insertion_delay(
input xil_axi_uint updated
);

Sets the transactions data insertion delay value, it is number of cycles. This is the delay from the time the transfer is processed to the time the transfer is applied to the interface. Refer PG267 AXI VIP Agent and Flow Methology about Write Command and Data Flow.

get_response_delay
virtual function xil_axi_uint get_response_delay();

Returns the number of cycles that the driver will wait before sending the response. Refer PG267 AXI VIP Agent and Flow Methology about Write Response/Reaction and Data Flow.

set_response_delay
virtual function void set_response_delay(
input xil_axi_uint updated
);

Sets the number of cycles that the driver will wait before sending the response.

get_allow_data_before_cmd
virtual function xil_axi_uint get_allow_data_before_cmd();

Returns allow_data_before_cmd of the transaction. allow_data_before_cmd is the number of data beat in one transfer which is being written to interface data bus before command is being written.If it is zero, it means that command is being written before data.

set_allow_data_before_cmd
virtual function void set_allow_data_before_cmd(
input xil_axi_uint updated
);

Sets allow_data_before_cmd of the transaction. allow_data_before_cmd is the number of data beat in one transfer which is being written to interface data bus before command is being written.If it is zero, it means that command is being written before data.  The default xfer_wrcmd_order of the transaction is  XIL_AXI_WRCMD_ORDER_NONE.  When this API is being called, user has to make sure that xfer_wrcmd_order of the transaction has to be set to XIL_AXI_WRCMD_ORDER_DATA_BEFORE_CMD so that this API is doing what user expected. user can user set_xfer_wrcmd_order to set the xfer_wrcmd_order of the transaction.

get_xfer_preemptive_probability
virtual function xil_axi_uint get_xfer_preemptive_probability();

Gets xfer_preemptive_probability of the transaction.

set_xfer_preemptive_probability
virtual function void set_xfer_preemptive_probability(
input xil_axi_uint updated
);

Sets xfer_preemptive_probability of the transaction.

Preemptive
get_bresp
virtual function xil_axi_resp_t get_bresp();

Returns the value of BRESP of the transaction.

set_bresp
virtual function void set_bresp(
input xil_axi_resp_t updated
);

Sets the value of BRESP of the transaction.

get_bresp_name
virtual function string get_bresp_name();

Gets bresp name of the transaction.

is_bresp_okay
virtual function xil_axi_uint is_bresp_okay();

Returns 1 if bresp is XIL_AXI_RESP_OKAY, else returns 0

is_bresp_slverr
virtual function xil_axi_uint is_bresp_slverr();

Returns 1 if bresp is XIL_AXI_RESP_SLVERR, else returns 0

is_bresp_decerr
virtual function xil_axi_uint is_bresp_decerr();

Returns 1 if bresp is XIL_AXI_RESP_DECERR, else returns 0

is_bresp_exokay
virtual function xil_axi_uint is_bresp_exokay();

Returns 1 if bresp is XIL_AXI_RESP_EXOKAY, else returns 0

all_rresp_okay
virtual function xil_axi_uint all_rresp_okay();

Returns 1 if rresp is XIL_AXI_RESP_OKAY, else returns 0

all_rresp_exokay
virtual function xil_axi_uint all_rresp_exokay();

Returns 1 if rresp is XIL_AXI_RESP_EXOKAY, else returns 0

all_rresp_slverr
virtual function xil_axi_uint all_rresp_slverr();

Returns 1 if rresp is XIL_AXI_RESP_SLVERR, else returns 0

all_rresp_decerr
virtual function xil_axi_uint all_rresp_decerr();

Returns 1 if rresp is XIL_AXI_RESP_DECERR, else returns 0

get_beat_index_delay
virtual function xil_axi_uint get_beat_index_delay();

Returns the current beat delay of the transaction.

set_beat_index_delay
virtual function void set_beat_index_delay(
input xil_axi_uint updated
);

Sets the specified beat delay of the transaction.

set_strb_beat_unpacked
function void set_strb_beat_unpacked(
input xil_axi_uint index,
input bit ret_strb[]
);

Sets the strobe of one beat of the transaction.

set_data_beat_unpacked
function void set_data_beat_unpacked(
input xil_axi_uint index,
input xil_axi_payload_byte ret_data[]
);

Sets the data of one beat of the transaction.

get_data_beat_unpacked
function void get_data_beat_unpacked(
input xil_axi_uint index,
output xil_axi_payload_byte ret_data[]
);

Returns the data of one beat of the transaction.

set_all_resp_okay
virtual function void set_all_resp_okay();

Sets all_resp_okay of the transaction to be true

get_all_resp_okay
function xil_axi_boolean_t get_all_resp_okay();

Returns all_resp_okay of the transaction.

clr_all_resp_okay
virtual function void clr_all_resp_okay();

Sets all_resp_okay of the transaction.

set_exclude_resp_exokay
virtual function void set_exclude_resp_exokay();

Sets exclude_resp_exokay of the transaction to be true

get_exclude_resp_exokay
function xil_axi_boolean_t get_exclude_resp_exokay();

Returns exclude_resp_exokay of the transaction.

clr_exclude_resp_exokay
virtual function void clr_exclude_resp_exokay();

Sets exclude_resp_exokay of the transaction to be false

set_xfer_alignment
virtual function void set_xfer_alignment(
input xil_axi_xfer_alignment_t update
);

Sets xfer_alignent of the transaction.

get_xfer_alignment
virtual function xil_axi_xfer_alignment_t get_xfer_alignment();

Returns xfer_alignment of the transaction.

set_xfer_wrcmd_order
virtual function void set_xfer_wrcmd_order(
input xil_axi_xfer_wrcmd_order_t update
);

Sets xfer_wrcmd_order of the transaction.

get_xfer_wrcmd_order
virtual function xil_axi_xfer_wrcmd_order_t get_xfer_wrcmd_order();

Gets xfer_wrcmd_order of the transaction.

set_xfer_wrdata_insertion_policy
virtual function void set_xfer_wrdata_insertion_policy(
input xil_axi_xfer_wrdata_insertion_policy_t update
);

Sets xfer_wrdata_insertion_policy of the transaction.

get_xfer_wrdata_insertion_policy
virtual function xil_axi_xfer_wrdata_insertion_policy_t get_xfer_wrdata_insertion_policy();

Gets xfer_wrdata_insertion_policy of the transaction.

get_addr_delay_range
function void get_addr_delay_range(
output xil_axi_uint min,
output xil_axi_uint max
);

Returns min_addr_delay and max_addr_delay of the transaction.

set_addr_delay_range
virtual function void set_addr_delay_range(
input xil_axi_uint min,
input xil_axi_uint max
);

Sets min_addr_delay and max_addr_delay of the transaction. when transaction is randomized,addr_insertion_delay will be inside the range of min_addr_insertion_delay and max_addr_insertion_delay.

get_data_insertion_delay_range
function void get_data_insertion_delay_range(
output xil_axi_uint min,
output xil_axi_uint max
);

Returns min_data_insertion_delay and max_data_insertion_delay of the transaction.

get_response_delay_range
function void get_response_delay_range(
output xil_axi_uint min,
output xil_axi_uint max
);

Returns min_response_delay and max_response_delay of the transaction.

set_data_insertion_delay_range
virtual function void set_data_insertion_delay_range(
input xil_axi_uint min,
input xil_axi_uint max
);

Sets min_data_insertion_delay and max_data_insertion_delay of the transaction. when transaction is randomized,data_insertion_delay will be inside the range of min_data_insertion_delay and max_data_insertion_delay.

set_response_delay_range
virtual function void set_response_delay_range(
input xil_axi_uint min,
input xil_axi_uint max
);

Sets min_response_delay and max_response_delay of the transaction. when transaction is randomized,response_delay will be inside the range of min_response_delay and max_response_delay.

get_allow_data_before_cmd_rang
function void get_allow_data_before_cmd_range(
output xil_axi_uint min,
output xil_axi_uint max
);

Returns min_allow_data_before_cmd and max_allow_data_before_cmd of the transaction.

set_allow_data_before_cmd_range
virtual function void set_allow_data_before_cmd_range(
input xil_axi_uint min,
input xil_axi_uint max
);

Sets min_allow_data_before_cmd and max_allow_data_before_cmd of the transaction. when transaction is randomized, allow_data_before_cmd  will be inside the range of min_allow_data_before_cmd and max_allow_data_before_cmd.

get_beat_delay_range
function void get_beat_delay_range(
output xil_axi_uint min,
output xil_axi_uint max
);

Returns min_beat_delay and max_beat_delay of the transaction.

set_beat_delay_range
virtual function void set_beat_delay_range(
input xil_axi_uint min,
input xil_axi_uint max
);

Sets min_beat_delay and max_beat_delay of the transaction. when transaction is randomized,beat_delay will be inside the range of min_beat_delay and max_beat_delay.

get_report_errors_number
virtual function xil_axi_uint get_report_errors_number();

Returns report_errors_number of the transaction.

set_report_errors_number
virtual function void set_report_errors_number(
xil_axi_uint updated
);

Sets report_errors_number of the transaction. report_errors_number is being used to decide maximum number of  miscomparsion error messages about data beat,rresp,ruser,wuser will be printed out when API do_compare is being called.

get_burst_byte_offset
function xil_axi_uint get_burst_byte_offset(
input xil_axi_uint index
);

Returns burst byte offset of beat(index) of the transaction.

get_transfer_byte_count
virtual function xil_axi_uint get_transfer_byte_count();

Returns total number of bytes of one transfer. It equals to transfer.size * (transfer.len+1)

clr_strb_array
virtual function void clr_strb_array();

Sets all strobe bits of the transaction to 0

set_strb_array
virtual function void set_strb_array();

Sets all strobe bits of the transaction to 1

clr_data_array
virtual function void clr_data_array();

Sets data to unknown and strobe to be unknown for write transaction

size_wr_beats
virtual function void size_wr_beats();

Sets data,strobe and wuser(if WUSER_WIDTH>0),beat_delay of write transaction

size_rd_beats
virtual function void size_rd_beats();

Sets data,rresp and ruser(if RUSER_WIDTH>0),beat_delay of read transaction

adjust_head_strb
function void adjust_head_strb();

Adjust strobe bit of unaligned head to be 0

post_randomize
function void post_randomize();

Sets final value of region,prot,qos,cache,address,bresp,rresp,strobe of transaction

set_beat_delay
virtual function void set_beat_delay(
input xil_axi_uint index,
input xil_axi_uint updated
);

Assign the inter-beat delay of the specified beat.

get_beat_delay
virtual function xil_axi_uint get_beat_delay(
input xil_axi_uint index
);

Returns the inter-beat delay of the specified beat.

set_data_beat
virtual function void set_data_beat(
input xil_axi_uint index,
input xil_axi_data_beat new_data,
input xil_axi_uint new_beat_delay = 0,
input xil_axi_strb_beat new_strb
);

Convenience function that will assign the value of the specified beat. it will set the assigned index data and strobe information, default strb is {128{1'b1}} .

set_data_block
virtual function void set_data_block(
input bit [8*4096-1:0block
);

Convenience function that will assign the data payload for the complete transaction.

set_strb_beat
virtual function void set_strb_beat(
input xil_axi_uint index,
input xil_axi_strb_beat new_strb
);

Convenience function that will assign the value STRB of the specified beat. default strb is {128{1'b1}}.

get_data_beat
virtual function xil_axi_data_beat get_data_beat(
input xil_axi_uint index
);

Returns the value of the specified beat. This is NOT always the RDATA/WDATA representation.  It will align the signification bytes to the lower bytes and set the unused bytes to zeros.

get_data_block
virtual function bit [8*4096-1:0] get_data_block();

Returns the 4K bytes of the payload for the transaction. This is NOT always the RDATA/WDATA representation.  It will align the signification bytes to the lower bytes and set the unused bytes to zeros.

get_strb_beat
virtual function xil_axi_strb_beat get_strb_beat(
input xil_axi_uint index
);

Returns the value of the specified beat. This is NOT always the WSTRB representation.  It will align the signification strobes to the lower bytes and set the unused strobes to zeros.

set_user_beat
virtual function void set_user_beat(
input xil_axi_uint index,
input xil_axi_user_beat updated
);

Sets user value of one beat

set_ruser
virtual function void set_ruser(
input xil_axi_uint index,
input xil_axi_user_beat updated
);

Sets the value of the RUSER for the beat specified

set_wuser
virtual function void set_wuser(
input xil_axi_uint index,
input xil_axi_user_beat updated
);

Sets the value of the WUSER for the beat specified

set_rresp
virtual function void set_rresp(
input xil_axi_uint index,
input xil_axi_resp_t resp
);

Sets the value of the RRESP for the beat specified

get_rresp
virtual function xil_axi_resp_t get_rresp(
input xil_axi_uint index
);

Returns the value of the RRESP for the beat specified

get_rresp_name
virtual function string get_rresp_name(
input xil_axi_uint index
);

Returns the name of the RRESP for the beat specified

get_user_beat
virtual function xil_axi_user_beat get_user_beat(
input xil_axi_uint index
);

Returns the value of the xUSER beat at the index provided of the transaction. xUSER here can be WUSER/RUSER.

get_wuser
virtual function xil_axi_user_beat get_wuser(
input xil_axi_uint index
);

Returns the value of the WUSER for the beat specified

get_ruser
virtual function xil_axi_user_beat get_ruser(
input xil_axi_uint index
);

Returns the value of the RUSER for the beat specified

convert_addr_wrap_to_incr
virtual function xil_axi_ulong convert_addr_wrap_to_incr();

Returns the INCR address of the WRAP transaction. The returned INCR address will be aligned to the AxSIZE of the transaction.

convert_wrap_to_incr
virtual function axi_transaction convert_wrap_to_incr();

Returns an axi_transaction based on the current transaction, however, converts the WRAP to INCR byte order.  This function will change the resultant INCR transaction address to be aligned.

convert_incr_to_wrap
virtual function axi_transaction convert_incr_to_wrap(
input [10:0wrap_offset
);

Returns an axi_transaction based on the current transaction, however, converts the INCR to WRAP byte order.  This function requires the WRAP offset to correctly return the target word.

import_data_beat_fields
virtual function void import_data_beat_fields(
inout xil_axi_write_beat write_beat
);

Sets data,strobe,wuser of write beat

import_cmd_fields
virtual function void import_cmd_fields (
inout xil_axi_cmd_beat cmd
);

Sets addr, cmd, len,size,burst,lock,cache,prot,region,qos,data and beat_delay of cmd beat For write command, set awuser(if AWUSER_WIDTH>0),wuser(if WUSER_WIDTH>0), For read command, set aruser(if ARUSER_WIDTH>0),ruser(if RUSER_WIDTH>0).

import_rd_beat
virtual function void import_rd_beat(
inout xil_axi_read_beat beat
);

Sets data, ruser(if RUSER_WIDTH>0),rresp of read beat

auto_fill_transaction
function void auto_fill_transaction(
input xil_axi_data_fill_t data_pat,
input xil_axi_strb_fill_t strb_pat,
input xil_axi_data_beat data_fill
);

Fill the transaction with different patterns based on the data_pat/strb_pat selected. When the data_pat is NOT set to XIL_AXI_DATA_FILL_NOTOUCH, The values of the strb's will all be set even if the strb_pat is set to XIL_AXI_DATA_FILL_NOTOUCH. refer xil_axi_data_fill_t, xil_axi_strb_fill_t for more information.