Get_transfer(), Example, Example 2-8. slave test program – Altera Mentor Verification IP Altera Edition AMBA AXI4-Stream User Manual
Page 51: Task

SystemVerilog Slave BFM
get_transfer()
Mentor Verification IP AE AMBA AXI4-Stream User Guide, V10.3
51
April 2014
get_transfer()
This blocking task gets a slave transfer previously created by the
function, and identified by the optional index argument.
It sets the TREADY protocol signal at the appropriate time defined by the transaction
ready_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 slave transaction and assign it to the local
// trans variable.
trans = bfm.create_slave_transaction();
....
// Get the first transfer of the trans transaction.
bfm.get_transfer(trans, 0, last);
// Get the second transfer of the trans transaction.
bfm.get_transfer(trans, 1, last);
Prototype
task automatic get_transfer
(
axi4stream_transaction trans,
int index = 0, // Optional
output bit last
);
Arguments
trans
The axi4stream_transaction record.
index
(Optional) Transfer number.
last
Flag to indicate the last transfer in the packet.
Returns
last