Skip to content

Commit

Permalink
Improve CC (#2801)
Browse files Browse the repository at this point in the history
addr_mode[1] = 1 for NATOP and NA4. As cv32a60x supports only TOR and OFF, the line can be conditioned by CVA6Cfg.PMPNapotEn
  • Loading branch information
JeanRochCoulon authored Feb 28, 2025
1 parent 3b2b34f commit d9f76bd
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 @@ -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
Expand Down

0 comments on commit d9f76bd

Please sign in to comment.