pmpaddr59
PMP Address 59
PMP entry address
Attributes
Defining Extension |
|
||||
---|---|---|---|---|---|
CSR Address |
0x3eb |
||||
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 > 59) { 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[pmpcfg14].pmp59cfg[4] == 1)) {
return CSR[pmpaddr59].ADDR | {PMP_GRANULARITY - 3{1'b1}};
} else if ((PMP_GRANULARITY >= 8) && (CSR[pmpcfg14].pmp59cfg[4] == 0)) {
Bits<PHYS_ADDR_WIDTH - 2> mask = {PMP_GRANULARITY - 2{1'b1}};
return CSR[pmpaddr59].ADDR & ~mask;
} else {
return CSR[pmpaddr59].ADDR;
}
} else {
if ((PMP_GRANULARITY >= 16) && (CSR[pmpcfg14].pmp59cfg[4] == 1)) {
return CSR[pmpaddr59].ADDR | {PMP_GRANULARITY - 3{1'b1}};
} else if ((PMP_GRANULARITY >= 8) && (CSR[pmpcfg14].pmp59cfg[4] == 0)) {
Bits<PHYS_ADDR_WIDTH - 2> mask = {PMP_GRANULARITY - 2{1'b1}};
return CSR[pmpaddr59].ADDR & ~mask;
} else {
return CSR[pmpaddr59].ADDR;
}
}