Skip to content

Commit

Permalink
[dv] Fail in run_intr_test_vseq if testing nonexistent intr_test
Browse files Browse the repository at this point in the history
I found this because the rom_ctrl testing was occasionally running a
very short sequence! It turns out that run_intr_test_vseq exited
quickly if there weren't actually any interrupt registers.

Rather than claiming we're doing something, let's just stop with a
failure.

Signed-off-by: Rupert Swarbrick <[email protected]>
  • Loading branch information
rswarbrick committed Jan 23, 2025
1 parent 8e3b744 commit a94d9f0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions hw/dv/sv/cip_lib/seq_lib/cip_base_vseq.sv
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,11 @@ class cip_base_vseq #(
end
end

// Checking the intr_test register works only makes sense if there is at least one interrupt
// register. We shouldn't call this sequence for blocks that don't have one, so let's fail
// understandably if we have done so by accident.
`DV_CHECK(intr_csrs.size() > 0, "Called intr_test vseq without any interrupt register.")

num_times = num_times * intr_csrs.size();
for (int trans = 1; trans <= num_times; trans++) begin
bit [BUS_DW-1:0] num_used_bits;
Expand Down

0 comments on commit a94d9f0

Please sign in to comment.