Skip to content

Commit 850de98

Browse files
committed
[top_earlgrey/dv] Add DV_SPINWAIT in chip_sw_lc_raw_unlock_vseq
clkmgr should confirm extclk enablement within a few JTAG reads. If that doesn't happen, then the added spinwait allows aborting the test earlier than waiting for the full test timeout. Signed-off-by: Andreas Kurth <[email protected]>
1 parent bb60e84 commit 850de98

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

hw/top_earlgrey/dv/env/seq_lib/chip_sw_lc_raw_unlock_vseq.sv

+10-8
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,16 @@ class chip_sw_lc_raw_unlock_vseq extends chip_sw_base_vseq;
3838
p_sequencer.jtag_sequencer_h, extcl_en);
3939

4040
`uvm_info(`gfn, "Waiting for extclk transition", UVM_LOW)
41-
while (!ack) begin
42-
jtag_riscv_agent_pkg::jtag_read_csr(base_addr + ral.clkmgr_aon.extclk_status.get_offset(),
43-
p_sequencer.jtag_sequencer_h, status);
44-
45-
ack = dv_base_reg_pkg::get_field_val(
46-
ral.clkmgr_aon.extclk_status.ack, status
47-
) == prim_mubi_pkg::MuBi4True;
48-
end
41+
`DV_SPINWAIT(
42+
while (!ack) begin
43+
jtag_riscv_agent_pkg::jtag_read_csr(base_addr + ral.clkmgr_aon.extclk_status.get_offset(),
44+
p_sequencer.jtag_sequencer_h, status);
45+
46+
ack = dv_base_reg_pkg::get_field_val(
47+
ral.clkmgr_aon.extclk_status.ack, status
48+
) == prim_mubi_pkg::MuBi4True;
49+
end,
50+
"Timed out waiting for clkmgr to confirm extclk enablement")
4951
endtask
5052

5153
virtual task body();

0 commit comments

Comments
 (0)