pmpaddr7
PMP Address 7
PMP entry address
Attributes
Defining Extension |
|
||||
---|---|---|---|---|---|
CSR Address |
0x3b7 |
||||
Length |
|
||||
Privilege Mode |
M |
Software write
This CSR may store a value that is different from what software attempts to write.
When a software write occurs (e.g., through csrrw), the following determines the written value:
ADDR = if (csr_value.ADDR >= (PHYS_ADDR_WIDTH >> 2)) { return UNDEFINED_LEGAL_DETERMINISTIC; } else if (NUM_PMP_ENTRIES > 7) { return UNDEFINED_LEGAL_DETERMINISTIC; } else { return csr_value.ADDR; }
Software read
This CSR may return a value that is different from what is stored in hardware.
if (XLEN == 32) {
if ((PMP_GRANULARITY >= 16) && (CSR[pmpcfg1].pmp7cfg[4] == 1)) {
return CSR[pmpaddr7].ADDR | {PMP_GRANULARITY - 3{1'b1}};
} else if ((PMP_GRANULARITY >= 8) && (CSR[pmpcfg1].pmp7cfg[4] == 0)) {
Bits<PHYS_ADDR_WIDTH - 2> mask = {PMP_GRANULARITY - 2{1'b1}};
return CSR[pmpaddr7].ADDR & ~mask;
} else {
return CSR[pmpaddr7].ADDR;
}
} else {
if ((PMP_GRANULARITY >= 16) && (CSR[pmpcfg0].pmp7cfg[4] == 1)) {
return CSR[pmpaddr7].ADDR | {PMP_GRANULARITY - 3{1'b1}};
} else if ((PMP_GRANULARITY >= 8) && (CSR[pmpcfg0].pmp7cfg[4] == 0)) {
Bits<PHYS_ADDR_WIDTH - 2> mask = {PMP_GRANULARITY - 2{1'b1}};
return CSR[pmpaddr7].ADDR & ~mask;
} else {
return CSR[pmpaddr7].ADDR;
}
}