Skip to content

Commit

Permalink
Bump CVV to fix issue 2484 (#2302)
Browse files Browse the repository at this point in the history
  • Loading branch information
AyoubJalali authored Jul 2, 2024
1 parent 9ebe42f commit f18bac5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 0 additions & 6 deletions verif/env/uvme/uvme_cva6_cfg.sv
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,6 @@ class uvme_cva6_cfg_c extends uvma_core_cntrl_cfg_c;
// Zihpm extension
rand bit ext_zihpm_supported;

// hypervisor mode
rand bit mode_h_supported;

// Handle to RTL configuration
rand cva6_cfg_t CVA6Cfg;

Expand All @@ -75,7 +72,6 @@ class uvme_cva6_cfg_c extends uvma_core_cntrl_cfg_c;
`uvm_field_int ( HPDCache_supported , UVM_DEFAULT )
`uvm_field_int ( nr_pmp_entries , UVM_DEFAULT )
`uvm_field_int ( ext_zihpm_supported , UVM_DEFAULT )
`uvm_field_int ( mode_h_supported , UVM_DEFAULT )
`uvm_field_int ( sys_clk_period , UVM_DEFAULT + UVM_DEC)

`uvm_field_object(clknrst_cfg, UVM_DEFAULT)
Expand Down Expand Up @@ -297,9 +293,7 @@ function void uvme_cva6_cfg_c::set_unsupported_csr_mask();
super.set_unsupported_csr_mask();

// Remove unsupported CSRs for Embedded configuration
unsupported_csr_mask[uvma_core_cntrl_pkg::MTVAL2] = 1;
unsupported_csr_mask[uvma_core_cntrl_pkg::MCOUNTINHIBIT] = 1;
unsupported_csr_mask[uvma_core_cntrl_pkg::MTINST] = 1;

// Add supported CSRs for Embedded configuration
for (int i = 0; i < MAX_NUM_HPMCOUNTERS; i++) begin
Expand Down
6 changes: 6 additions & 0 deletions verif/tb/core/uvma_cva6pkg_utils.sv
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ function st_core_cntrl_cfg cva6pkg_to_core_cntrl_cfg(st_core_cntrl_cfg cfg);
cfg.disable_all_csr_checks = 0;
cfg.mode_s_supported = CVA6Cfg.RVS;
cfg.mode_u_supported = CVA6Cfg.RVU;
cfg.mode_h_supported = CVA6Cfg.RVH;

cfg.pmp_supported = (CVA6Cfg.NrPMPEntries > 0);
cfg.pmp_regions = CVA6Cfg.NrPMPEntries;
Expand All @@ -57,6 +58,11 @@ function st_core_cntrl_cfg cva6pkg_to_core_cntrl_cfg(st_core_cntrl_cfg cfg);
cfg.unsupported_csr_mask['h643] = 1; // HTVAL
cfg.unsupported_csr_mask['h64A] = 1; // HTINST

if (!cfg.mode_h_supported) begin
cfg.unsupported_csr_mask['h34A] = 1; // MTINST
cfg.unsupported_csr_mask['h34B] = 1; // MTVAL2
end

// Disable comparison
cfg.unsupported_csr_mask['h7C0] = 1; // ICACHE
cfg.unsupported_csr_mask['h7C1] = 1; // DCACHE
Expand Down

0 comments on commit f18bac5

Please sign in to comment.