Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[rv_dm,dv] Avoid a fast JTAG clock #23363

Merged
merged 2 commits into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions hw/ip/rv_dm/dv/env/seq_lib/rv_dm_base_vseq.sv
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ class rv_dm_base_vseq extends cip_base_vseq #(
rand int unsigned tck_period_ps;
constraint tck_period_ps_c {
tck_period_ps dist {
[10_000:20_000] :/ 1, // 50-100MHz
[20_001:42_000] :/ 1, // 24-50MHz
[42_001:100_000] :/ 1 // 10-24MHz
[100_000:200_000] :/ 1, // 5-10MHz
[200_001:420_000] :/ 1, // 2.4-5MHz
[420_001:1000_000] :/ 1 // 1-2.4MHz
};
}

Expand Down
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
Loading