Handle_read(), Example 6-18. process_read() – Altera Mentor Verification IP Altera Edition AMBA AXI4-Lite User Manual
Page 132
Mentor Verification IP AE AXI4-Lite User Guide, V10.3
132
SystemVerilog Tutorials
Verifying a Master DUT
April 2014
In the fork-join_none block, the read_trans record is passed into the
the variable t.
Example 6-18. 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 a phase (beat). 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 within 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).
The read data phase is executed over the protocol signals by calling the