Skip to content

Commit

Permalink
[csr/scounteren] fix privilege violation logic (#1650)
Browse files Browse the repository at this point in the history
  • Loading branch information
acaldaya authored Nov 27, 2023
1 parent 7d01f24 commit 5709daa
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 @@ -1351,7 +1351,7 @@ module csr_regfile
end else if (priv_lvl_o == riscv::PRIV_LVL_S && CVA6Cfg.RVS) begin
privilege_violation = ~mcounteren_q[csr_addr_i[4:0]];
end else if (priv_lvl_o == riscv::PRIV_LVL_U && CVA6Cfg.RVU) begin
privilege_violation = ~mcounteren_q[csr_addr_i[4:0]] & ~scounteren_q[csr_addr_i[4:0]];
privilege_violation = ~mcounteren_q[csr_addr_i[4:0]] | ~scounteren_q[csr_addr_i[4:0]];
end
end
end
Expand Down

0 comments on commit 5709daa

Please sign in to comment.