Skip to content

Commit

Permalink
[dv] Fix info message in csr_seq_lib.sv
Browse files Browse the repository at this point in the history
The list of CSRs was probably empty when this message gets printed,
giving messages like:

    Testing 0 csrs [0 - 46] in all supplied models.

Just move the print so that it appears after test_csrs has been
populated.

Signed-off-by: Rupert Swarbrick <[email protected]>
  • Loading branch information
rswarbrick authored and cfrantz committed Jun 14, 2024
1 parent 38f578e commit df734a7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hw/dv/sv/csr_utils/csr_seq_lib.sv
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,14 @@ class csr_base_seq extends uvm_reg_sequence #(uvm_sequence #(uvm_reg_item));
end_idx = test_csr_chunk * chunk_size;
if (end_idx >= all_csrs.size()) end_idx = all_csrs.size() - 1;

`uvm_info(`gtn, $sformatf("Testing %0d csrs [%0d - %0d] in all supplied models.",
test_csrs.size(), start_idx, end_idx), UVM_MEDIUM)
test_csrs.delete();
for (int i = start_idx; i <= end_idx; i++) begin
test_csrs.push_back(all_csrs[i]);
`uvm_info(`gtn, $sformatf("Testing CSR %0s, reset: 0x%0x.", all_csrs[i].get_full_name(),
all_csrs[i].get_mirrored_value()), UVM_HIGH)
end
`uvm_info(`gtn, $sformatf("Testing %0d csrs [%0d - %0d] in all supplied models.",
test_csrs.size(), start_idx, end_idx), UVM_MEDIUM)
test_csrs.shuffle();
endfunction

Expand Down

0 comments on commit df734a7

Please sign in to comment.