Handle_read(), Example 6-43. process_read() – Altera Mentor Verification IP Altera Edition AMBA AXI3/4TM User Manual
Page 195

SystemVerilog Tutorials
Verifying a Master DUT
Mentor VIP AE AXI3/4 User Guide, V10.2b
177
September 2013
In the fork-join_none block, the read_trans record is passed into the
the variable t.
Example 6-43. process_read()
// Task : process_read
// This method keep receiving read address phase and calls another
// method to process received transaction.
task process_read;
forever
begin
axi4_transaction read_trans;
read_trans = bfm.create_slave_transaction();
bfm.get_read_addr_phase(read_trans);
fork
begin
automatic axi4_transaction t = read_trans;
handle_read(t);
end
join_none
#0;
end
endtask
handle_read()
The handle_read() task gets the data from the
as a burst or a phase (beat),
depending on the
configuration. The read_trans argument contains the record of
the read transaction up to the point of this task call, namely the content of the read address
phase.
The call to
configures the RVALID signal delay for each phase
(beat).
In a loop the call to the
helper function returns the actual address addr for a
particular byte location. This byte address is used to read the data byte from
function, assigning the local mem_data variable with read
. The call to the
helper function sets the byte with in the
read transaction record. The loop continues reading and setting the read data from internal
memory for the whole of the read data phase (beat).
If the
configuration is set to the default of AXI4_TRANSACTION_SLAVE then the
loop continues until the read data has been set for the whole burst. Otherwise the individual read
data phase is executed over the protocol signals by calling the