Skip to content

Commit a1e6725

Browse files
committed
[pattgen,dv] Tidy up how reset tracking works in scoreboard
No big change, but there wasn't really a way for the scoreboard to start again after a reset. Add one. Signed-off-by: Rupert Swarbrick <[email protected]>
1 parent 163669e commit a1e6725

File tree

1 file changed

+18
-12
lines changed

1 file changed

+18
-12
lines changed

hw/ip/pattgen/dv/env/pattgen_scoreboard.sv

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30,19 +30,14 @@ class pattgen_scoreboard extends cip_base_scoreboard #(
3030

3131
task run_phase(uvm_phase phase);
3232
super.run_phase(phase);
33-
forever begin
34-
`DV_SPINWAIT_EXIT(
35-
for (uint i = 0; i < NUM_PATTGEN_CHANNELS; i++) begin
36-
fork
37-
automatic uint channel = i;
38-
compare_trans(channel);
39-
join_none
40-
end
41-
wait fork;,
42-
@(negedge cfg.clk_rst_vif.rst_n),
43-
)
33+
for (uint i = 0; i < NUM_PATTGEN_CHANNELS; i++) begin
34+
fork
35+
automatic uint channel = i;
36+
compare_trans(channel);
37+
join_none
4438
end
45-
endtask : run_phase
39+
wait fork;
40+
endtask
4641

4742
virtual task process_tl_access(tl_seq_item item, tl_channels_e channel, string ral_name);
4843
uvm_reg csr;
@@ -193,6 +188,17 @@ class pattgen_scoreboard extends cip_base_scoreboard #(
193188
endtask : process_tl_access
194189

195190
task compare_trans(uint channel);
191+
wait(cfg.clk_rst_vif.rst_n);
192+
fork begin : isolation_fork
193+
fork
194+
wait(!cfg.clk_rst_vif.rst_n);
195+
compare_trans_(channel);
196+
join_any
197+
disable fork;
198+
end join
199+
endtask
200+
201+
task compare_trans_(uint channel);
196202
pattgen_item exp_item;
197203
pattgen_item dut_item;
198204

0 commit comments

Comments
 (0)