Improve CC (#2801)
Some checks failed
bender-up-to-date / bender-up-to-date (push) Has been cancelled
ci / build-riscv-tests (push) Has been cancelled
ci / execute-riscv64-tests (push) Has been cancelled
ci / execute-riscv32-tests (push) Has been cancelled

addr_mode[1] = 1 for NATOP and NA4. As cv32a60x supports only TOR and OFF, the line can be conditioned by CVA6Cfg.PMPNapotEn
This commit is contained in:
JeanRochCoulon 2025-02-28 11:13:52 +01:00 committed by GitHub
parent 3b2b34f951
commit d9f76bd4fb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -863,7 +863,7 @@ module csr_regfile
// -> last bit of pmpaddr must be set 0/1 based on the mode:
// NA4, NAPOT: 1
// TOR, OFF: 0
if (pmpcfg_q[index].addr_mode[1] == 1'b1)
if (CVA6Cfg.PMPNapotEn && pmpcfg_q[index].addr_mode[1] == 1'b1)
csr_rdata = {pmpaddr_q[index][CVA6Cfg.PLEN-3:1], 1'b1};
else csr_rdata = {pmpaddr_q[index][CVA6Cfg.PLEN-3:1], 1'b0};
end