Hello,
I am having 2 multidimensional queue’s to store design data and reference data. I am popping the queue’s when data is available in them and comparing the values inside a task. As data can be available inside the queue anytime so this comparison is done inside a forever loop. As forever loops are never ending so to avoid the simulation getting hanged, i have added a delay. But i guess adding a delay inside scoreboard is not a very good approach. Can someone help me out with giving some alternate solution instead of having a delay.
comparison task as below:-
task scoreboard::compare_data();
logic [47:0] exp_data[4];
logic [47:0] act_data[4];
forever begin
for(int i=0;i<4;i++) begin
if (ref_data_q[i].size() >= 1 && dut_data_q[i].size() >= 1) begin
exp_data[i] = ref_data_q[i].pop_front();
act_data[i] = dut_data_q[i].pop_front();
if(exp_data[i] !== act_data[i])
uvm_fatal("SB",$sformatf("Data mismatch !!! Match count so far %0d, Exp_data=%0h::Act_data=%0h",match_count[i],exp_data[i],act_data[i])) else
uvm_info(“SB”,$sformatf(“Data Correct !!! Match count so far %0d, Exp_data=%0h::Act_data=%0h”,match_count[i],exp_data[i],act_data[i]),UVM_DEBUG)
match_count[i]++;
end
#1ps;
end
end
endtask //compare_data