pmpaddr62
PMP Address 62
PMP entry address
Attributes
Defining Extension |
|
---|---|
CSR Address |
0x3ee |
Length |
32 when CSR[misa].MXL == 0 64 when CSR[misa].MXL == 1 |
Privilege Mode |
M |
Format
This CSR format changes dynamically.
Figure 1. pmpaddr62 Format when CSR[misa].MXL == 0
Figure 2. pmpaddr62 Format when CSR[misa].MXL == 1
Field Summary
Name | Location | Type | Reset Value |
---|---|---|---|
* 31:0 when CSR[misa].MXL == 0 * 63:0 when CSR[misa].MXL == 1 |
[when,"(NUM_PMP_ENTRIES > 62)"] RW [when,"(NUM_PMP_ENTRIES ⇐ 62)"] RO |
[when,"(NUM_PMP_ENTRIES > 62)"] UNDEFINED_LEGAL [when,"(NUM_PMP_ENTRIES ⇐ 62)"] 0 |
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 > 62) { 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[pmpcfg15].pmp62cfg[4] == 1)) {
return CSR[pmpaddr62].ADDR | {PMP_GRANULARITY - 3{1'b1}};
} else if ((PMP_GRANULARITY >= 8) && (CSR[pmpcfg15].pmp62cfg[4] == 0)) {
Bits<PHYS_ADDR_WIDTH - 2> mask = {PMP_GRANULARITY - 2{1'b1}};
return CSR[pmpaddr62].ADDR & ~mask;
} else {
return CSR[pmpaddr62].ADDR;
}
} else {
if ((PMP_GRANULARITY >= 16) && (CSR[pmpcfg14].pmp62cfg[4] == 1)) {
return CSR[pmpaddr62].ADDR | {PMP_GRANULARITY - 3{1'b1}};
} else if ((PMP_GRANULARITY >= 8) && (CSR[pmpcfg14].pmp62cfg[4] == 0)) {
Bits<PHYS_ADDR_WIDTH - 2> mask = {PMP_GRANULARITY - 2{1'b1}};
return CSR[pmpaddr62].ADDR & ~mask;
} else {
return CSR[pmpaddr62].ADDR;
}
}