Hello everyone!
I’m verifying, let’s say, some interconnect with multiple masters and slaves connected to it.
I want to clarify to myself, how to properly handle parallel transactions incoming in scoreboard. See minimal example below.
class icon_scoreboard extends uvm_scoreboard;
`uvm_component_utils(icon_scoreboard)
uvm_tlm_analysis_fifo#(icon_trans) fifos []; int fifos_am;
function new(string name = "", uvm_component parent = null);
super.new(name, parent);
endfunction
virtual function void build_phase(uvm_phase phase);
// Get analysis FIFO amount.
if(!uvm_resource_db #(int)::read_by_name(
get_full_name(), "fifos_am", fifos_am)) ...
// Create analysis FIFO.
fifos = new[fifos_am];
foreach(fifos[i]) begin
fifos[i] = new(...);
end
endfunction
...
virtual task main_phase(uvm_phase phase);
// Question:
// How to properly handle parallel transactions here?
// Transactions timestamps, uvm_wait_for_nba_region()?
endtask
...
endclass
In this example we can recieve multiple transactions from FIFOs (they are connected to masters/slaves) at the same time (same time slot). The problem here is that due to non-determinism in active event region, transactions can arrive to FIFOs in random order during the same time slot.
My question is how to properly collect and process transactions at the same time slot to verify, for example, priority algorithm? My thoughts are to use transactions timestamps or uvm_wait_for_nba_region()
. But is there a more elegant solution?
Best regards,
serge06