PMP checker size check to avoid spurious warnings

This commit is contained in:
David Harris 2023-02-19 16:08:23 -08:00
parent 342791081a
commit 5b8d1e4134

View File

@ -57,13 +57,14 @@ module pmpchecker (
logic [`PMP_ENTRIES-1:0] L, X, W, R; // PMP matches and has flag set logic [`PMP_ENTRIES-1:0] L, X, W, R; // PMP matches and has flag set
logic [`PMP_ENTRIES-1:0] PAgePMPAdr; // for TOR PMP matching, PhysicalAddress > PMPAdr[i] logic [`PMP_ENTRIES-1:0] PAgePMPAdr; // for TOR PMP matching, PhysicalAddress > PMPAdr[i]
pmpadrdec pmpadrdecs[`PMP_ENTRIES-1:0]( if (`PMP_ENTRIES > 0)
.PhysicalAddress, pmpadrdec pmpadrdecs[`PMP_ENTRIES-1:0](
.PMPCfg(PMPCFG_ARRAY_REGW), .PhysicalAddress,
.PMPAdr(PMPADDR_ARRAY_REGW), .PMPCfg(PMPCFG_ARRAY_REGW),
.PAgePMPAdrIn({PAgePMPAdr[`PMP_ENTRIES-2:0], 1'b1}), .PMPAdr(PMPADDR_ARRAY_REGW),
.PAgePMPAdrOut(PAgePMPAdr), .PAgePMPAdrIn({PAgePMPAdr[`PMP_ENTRIES-2:0], 1'b1}),
.Match, .Active, .L, .X, .W, .R); .PAgePMPAdrOut(PAgePMPAdr),
.Match, .Active, .L, .X, .W, .R);
priorityonehot #(`PMP_ENTRIES) pmppriority(.a(Match), .y(FirstMatch)); // combine the match signal from all the adress decoders to find the first one that matches. priorityonehot #(`PMP_ENTRIES) pmppriority(.a(Match), .y(FirstMatch)); // combine the match signal from all the adress decoders to find the first one that matches.