Execute_transfer(), Example, G the – Altera Mentor Verification IP Altera Edition AMBA AXI4-Stream User Manual
Page 40: Task for each transfer within a

Mentor Verification IP AE AMBA AXI4-Stream User Guide, V10.3
40
SystemVerilog Master BFM
execute_transfer()
April 2014
execute_transfer()
This task executes a master transfer previously created by the
function. This task may be blocking (default) or nonblocking, as defined by the transaction
operation_mode field.
It sets the TVALID protocol signal at the appropriate time defined by the transaction
valid_delay field, and sets the transfer_done array index element field to 1 when the transfer is
complete.
If this is the last transfer of the transaction, then it sets the transaction_done field to 1 and
returns the last argument set to 1 to indicate the whole transaction is complete.
Example
// Declare a local variable to hold the transaction record.
axi4stream_transaction trans;
// Create a master transaction with a transfer count of 3 and assign
// it to the local trans variable.
trans = bfm.create_master_transaction(3);
....
// Execute the first transfer of the trans transaction.
bfm.execute_transfer(trans, 0, last);
// Execute the second transfer of the trans transaction0.
bfm.execute_transfer(trans, 1, last);
Prototype
task automatic execute_transfer
(
axi4stream_transaction trans,
int index = 0, // Optional
output bit last
);
Arguments
trans
The axi4stream_transaction record.
index
(Optional) Transfer number.
Returns
last