From 631513eda801a45d16bd864a07b3ffa52b1cba26 Mon Sep 17 00:00:00 2001 From: Asmaa Kassimi <163407779+Asmaa-Kassimi@users.noreply.github.com> Date: Thu, 25 Jul 2024 11:03:38 +0100 Subject: [PATCH] Add RVU condition to increase coverage (#2396) --- core/csr_regfile.sv | 2 +- spyglass/reference_summary.rpt | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/core/csr_regfile.sv b/core/csr_regfile.sv index 1527fe202a..e15cf24c66 100644 --- a/core/csr_regfile.sv +++ b/core/csr_regfile.sv @@ -2302,7 +2302,7 @@ module csr_regfile // if we are reading or writing, check for the correct privilege level this has // precedence over interrupts if (csr_op_i inside {CSR_WRITE, CSR_SET, CSR_CLEAR, CSR_READ}) begin - if ((riscv::priv_lvl_t'(priv_lvl_o & csr_addr.csr_decode.priv_lvl) != csr_addr.csr_decode.priv_lvl)) begin + if (CVA6Cfg.RVU && (riscv::priv_lvl_t'(priv_lvl_o & csr_addr.csr_decode.priv_lvl) != csr_addr.csr_decode.priv_lvl)) begin privilege_violation = 1'b1; end // check access to debug mode only CSRs diff --git a/spyglass/reference_summary.rpt b/spyglass/reference_summary.rpt index c383d57efa..8988519e4b 100644 --- a/spyglass/reference_summary.rpt +++ b/spyglass/reference_summary.rpt @@ -8,17 +8,14 @@ # Working Directory: /home/akassimi/rhel8/cva6_synthesis/cva6/spyglass # SpyGlass Version : SpyGlass_vS-2021.09-SP2-3 # Policy Name : SpyGlass(SpyGlass_vS-2021.09-SP2-03) -# clock-reset(SpyGlass_vS-2021.09-SP2-03) # erc(SpyGlass_vS-2021.09-SP2-03) # latch(SpyGlass_vS-2021.09-SP2-03) # lint(SpyGlass_vS-2021.09-SP2-03) # morelint(SpyGlass_vS-2021.09-SP2-03) # openmore(SpyGlass_vS-2021.09-SP2-03) -# power_est(SpyGlass_vS-2021.09-SP2-03) # simulation(SpyGlass_vS-2021.09-SP2-03) # starc(SpyGlass_vS-2021.09-SP2-03) # starc2005(SpyGlass_vS-2021.09-SP2-03) -# txv(SpyGlass_vS-2021.09-SP2-03) # # Total Number of Generated Messages : 1501 # Number of Waived Messages : 2