mirror of
https://github.com/openhwgroup/cva6.git
synced 2025-04-20 12:17:19 -04:00
Fix index calculation for locked PMP csr logic (#1335)
Fixes #1332 Superseeds #1334 Signed-off-by: Moritz Schneider <moritz.schneider@inf.ethz.ch> Co-authored-by: Ömer Güzel <omer.guzel@agu.edu.tr>
This commit is contained in:
parent
49d1262512
commit
306973a386
1 changed files with 1 additions and 1 deletions
|
@ -872,7 +872,7 @@ module csr_regfile import ariane_pkg::*; #(
|
|||
// index is specified by the last byte in the address
|
||||
automatic int index = csr_addr.csr_decode.address[3:0];
|
||||
// check if the entry or the entry above is locked
|
||||
if (!pmpcfg_q[index].locked && !(pmpcfg_q[index].locked && pmpcfg_q[index].addr_mode == riscv::TOR)) begin
|
||||
if (!pmpcfg_q[index].locked && !(pmpcfg_q[index+1].locked && pmpcfg_q[index].addr_mode == riscv::TOR)) begin
|
||||
pmpaddr_d[index] = csr_wdata[riscv::PLEN-3:0];
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue