Skip to content

Commit

Permalink
Update csr_regfile.sv to fix #2373 (#2374)
Browse files Browse the repository at this point in the history
  • Loading branch information
somyadashora authored Jul 25, 2024
1 parent 3deb95a commit 1e48237
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/csr_regfile.sv
Original file line number Diff line number Diff line change
Expand Up @@ -2247,7 +2247,7 @@ module csr_regfile
// precedence over interrupts
if (csr_op_i inside {CSR_WRITE, CSR_SET, CSR_CLEAR, CSR_READ}) begin
if (access_priv < csr_addr.csr_decode.priv_lvl) begin
if (v_q && csr_addr.csr_decode.priv_lvl == riscv::PRIV_LVL_HS)
if (v_q && csr_addr.csr_decode.priv_lvl <= riscv::PRIV_LVL_HS)
virtual_privilege_violation = 1'b1;
else privilege_violation = 1'b1;
end
Expand Down

0 comments on commit 1e48237

Please sign in to comment.