From b6bd96668b4b40628635f8f338264c70728a0a54 Mon Sep 17 00:00:00 2001 From: Ayoub Jalali Date: Fri, 4 Aug 2023 16:16:13 +0200 Subject: [PATCH] Override unsupported CSR method in cfg cva6 env, to remove unsupported CSR for STEP1 cfg --- cva6/env/uvme/uvme_cva6_cfg.sv | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/cva6/env/uvme/uvme_cva6_cfg.sv b/cva6/env/uvme/uvme_cva6_cfg.sv index 57da280d0c..134f75bd2b 100644 --- a/cva6/env/uvme/uvme_cva6_cfg.sv +++ b/cva6/env/uvme/uvme_cva6_cfg.sv @@ -179,6 +179,11 @@ class uvme_cva6_cfg_c extends uvma_core_cntrl_cfg_c; */ extern virtual function void sample_parameters(uvma_core_cntrl_cntxt_c cntxt); + /** + * Set unsupported_csr_mask based on extensions/modes supported + */ + extern virtual function void set_unsupported_csr_mask(); + endclass : uvme_cva6_cfg_c @@ -227,4 +232,13 @@ function void uvme_cva6_cfg_c::sample_parameters(uvma_core_cntrl_cntxt_c cntxt); endfunction : sample_parameters +function void uvme_cva6_cfg_c::set_unsupported_csr_mask(); + + super.set_unsupported_csr_mask(); + + // Remove unsupported CSRs for STEP1 configuration + unsupported_csr_mask[uvma_core_cntrl_pkg::MCOUNTINHIBIT] = 1; + +endfunction : set_unsupported_csr_mask + `endif // __UVME_CVA6_CFG_SV__