mirror of
https://github.com/stnolting/neorv32.git
synced 2025-04-24 06:07:52 -04:00
[docs] add new PMP configuration generics
This commit is contained in:
parent
c46151ac28
commit
769799f1be
3 changed files with 14 additions and 7 deletions
|
@ -784,13 +784,19 @@ The NEORV32 PMP is fully compatible to the RISC-V Privileged Architecture Specif
|
|||
**grant permissions to user mode**, which by default has none, and can **revoke permissions from M-mode**, which
|
||||
by default has full permissions. The PMP is configured via the <<_machine_physical_memory_protection_csrs>>.
|
||||
|
||||
Several <<_processor_top_entity_generics>> are provided to fine-tune the CPU's PMP capabilities:
|
||||
* `PMP_NUM_REGIONS` defines the number of implemented PMP region
|
||||
* `PMP_MIN_GRANULARITY` defines the minimal granularity of each region
|
||||
* `PMP_TOR_MODE_EN` controls the implementation of the top-of-region (TOR) mode
|
||||
* `PMP_NAP_MODE_EN` controls the implementation of the naturally-aligned-power-of-two (NA4 and NAPOT) modes
|
||||
|
||||
.PMP Rules when in Debug Mode
|
||||
[NOTE]
|
||||
When in debug-mode all PMP rules are ignored making the debugger have maximum access rights.
|
||||
|
||||
[IMPORTANT]
|
||||
Instruction fetches are also triggered when denied by a certain PMP rule. However, the fetched instruction(s)
|
||||
will not be executed and will not change CPU core state to preserve memory access protection.
|
||||
will not be executed and will not change CPU core state.
|
||||
|
||||
|
||||
==== `Smcntrpmf` - ISA Extension
|
||||
|
|
|
@ -561,6 +561,11 @@ See section <<_pmp_isa_extension>> for more information.
|
|||
| 7 | `PMPCFG_L` | r/w | **L**: Lock bit, prevents further write accesses, also enforces access rights in machine-mode, can only be cleared by CPU reset
|
||||
|=======================
|
||||
|
||||
.Implemented Modes
|
||||
[NOTE]
|
||||
In order to reduce the CPU size certain PMP modes (`A` bits) can be excluded from synthesis.
|
||||
Use the `PMP_TOR_MODE_EN` and `PMP_NAP_MODE_EN` <<_processor_top_entity_generics>> to control
|
||||
implementation of the according modes.
|
||||
|
||||
{empty} +
|
||||
[discrete]
|
||||
|
@ -593,12 +598,6 @@ The `pmpaddr*` CSRs are used to configure the region's address boundaries.
|
|||
| Description | Region address configuration. The two MSBs of each CSR are hardwired to zero (= bits 33:32 of the physical address).
|
||||
|=======================
|
||||
|
||||
.Address Register Update Latency
|
||||
[IMPORTANT]
|
||||
After writing a `pmpaddr` CSR the hardware requires up to 32 clock cycles to compute the according
|
||||
address masks. Make sure to wait for this time before completing the PMP region configuration
|
||||
(only relevant for `NA4` and `NAPOT` modes).
|
||||
|
||||
|
||||
<<<
|
||||
// ####################################################################################################################
|
||||
|
|
|
@ -228,6 +228,8 @@ The generic type "`suv(x:y)`" is an abbreviation for "`std_ulogic_vector(x downt
|
|||
4+^| **Physical Memory Protection (<<_pmp_isa_extension>>)**
|
||||
| `PMP_NUM_REGIONS` | natural | 0 | Number of implemented PMP regions (0..16).
|
||||
| `PMP_MIN_GRANULARITY` | natural | 4 | Minimal region granularity in bytes. Has to be a power of two, min 4.
|
||||
| `PMP_TOR_MODE_EN` | boolean | true | Implement support for top-of-region (TOR) mode.
|
||||
| `PMP_NAP_MODE_EN` | boolean | true | Implement support for naturally-aligned power-of-two (NAPOT & NA4) modes.
|
||||
4+^| **Hardware Performance Monitors (<<_zihpm_isa_extension>>)**
|
||||
| `HPM_NUM_CNTS` | natural | 0 | Number of implemented hardware performance monitor counters (0..13).
|
||||
| `HPM_CNT_WIDTH` | natural | 40 | Total LSB-aligned size of each HPM counter. Min 0, max 64.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue