From df734a7d4627d8eee16707e4ffd581f24e2c36f7 Mon Sep 17 00:00:00 2001 From: Rupert Swarbrick Date: Thu, 30 May 2024 17:04:06 +0100 Subject: [PATCH] [dv] Fix info message in csr_seq_lib.sv 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 --- hw/dv/sv/csr_utils/csr_seq_lib.sv | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/dv/sv/csr_utils/csr_seq_lib.sv b/hw/dv/sv/csr_utils/csr_seq_lib.sv index c07787deca6160..fbdae58abb93ea 100644 --- a/hw/dv/sv/csr_utils/csr_seq_lib.sv +++ b/hw/dv/sv/csr_utils/csr_seq_lib.sv @@ -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