
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 handle_read() function via
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 Internal Memory 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 set_read_data_valid_delay() configures the RVALID signal delay for each phase
(beat).
In a loop, the call to the get_read_addr() helper function returns the actual address addr for a
particular byte location. This byte address is used to read the data byte from Internal Memory
with the call to the do_byte_read() function, assigning the local mem_data variable with read
data do_byte_read(). The call to the set_read_data() 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
execute_read_data_phase().
Kommentare zu diesen Handbüchern