Skip to content

Commit

Permalink
[rv_dm,dv] Increase timeout for CSR tests
Browse files Browse the repository at this point in the history
Honestly, this timeout mechanism doesn't make a huge amount of sense,
but this workaround should sort things out at the rv_dm level.

Signed-off-by: Rupert Swarbrick <rswarbrick@lowrisc.org>
  • Loading branch information
rswarbrick committed May 30, 2024
1 parent 8a4c7d7 commit 45628e7
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions hw/ip/rv_dm/dv/env/seq_lib/rv_dm_common_vseq.sv
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,21 @@ class rv_dm_common_vseq extends rv_dm_base_vseq;
unavailable == 0;
}

// This is a thin wrapper around the base class version of run_csr_vseq, but setting the timeout
// for the CSR operations to be larger. This is needed because the timeout counts from (roughly)
// the start of the CSR sequence and isn't enough to allow for slow values of the JTAG clock.
virtual task run_csr_vseq(string csr_test_type,
int num_test_csrs = 0,
bit do_rand_wr_and_reset = 1,
dv_base_reg_block models[$] = {},
string ral_name = "");
uint old_dtn = csr_utils_pkg::default_timeout_ns;

csr_utils_pkg::default_timeout_ns = 10 * old_dtn;
super.run_csr_vseq(csr_test_type, num_test_csrs, do_rand_wr_and_reset, models, ral_name);
csr_utils_pkg::default_timeout_ns = old_dtn;
endtask

virtual task body();
run_common_vseq_wrapper(num_trans);
endtask : body
Expand Down

0 comments on commit 45628e7

Please sign in to comment.