Garret Kelly | 9eebde0 | 2019-10-22 15:36:49 -0400 | [diff] [blame] | 1 | --- |
| 2 | title: "Interrupt Controller Technical Specification" |
| 3 | --- |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 4 | |
Garret Kelly | 9eebde0 | 2019-10-22 15:36:49 -0400 | [diff] [blame] | 5 | # Overview |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 6 | |
| 7 | This document specifies the Interrupt Controller (RV_PLIC) functionality. This |
| 8 | module conforms to the |
Timothy Chen | e464899 | 2019-11-02 17:58:54 -0700 | [diff] [blame] | 9 | [Comportable guideline for peripheral functionality]({{< relref "doc/rm/comportability_specification" >}}). |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 10 | See that document for integration overview within the broader top level system. |
| 11 | |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 12 | |
Garret Kelly | 9eebde0 | 2019-10-22 15:36:49 -0400 | [diff] [blame] | 13 | ## Features |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 14 | |
| 15 | - RISC-V Platform-Level Interrupt Controller (PLIC) compliant interrupt controller |
| 16 | - Support arbitrary number of interrupt vectors (up to 256) and targets |
| 17 | - Support interrupt enable, interrupt status registers |
Greg Chadwick | 828e9d1 | 2019-10-23 11:37:24 +0100 | [diff] [blame] | 18 | - Memory-mapped MSIP register per HART for software interrupt control. |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 19 | |
Garret Kelly | 9eebde0 | 2019-10-22 15:36:49 -0400 | [diff] [blame] | 20 | ## Description |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 21 | |
| 22 | The RV_PLIC module is designed to manage various interrupt sources from the |
Greg Chadwick | 828e9d1 | 2019-10-23 11:37:24 +0100 | [diff] [blame] | 23 | peripherals. It receives interrupt events as either edge or level of the |
| 24 | incoming interrupt signals (``intr_src_i``) and can notify multiple targets. |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 25 | |
Garret Kelly | 9eebde0 | 2019-10-22 15:36:49 -0400 | [diff] [blame] | 26 | ## Compatibility |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 27 | |
| 28 | The RV_PLIC is compatible with any RISC-V core implementing the RISC-V privilege specification. |
| 29 | |
Garret Kelly | 9eebde0 | 2019-10-22 15:36:49 -0400 | [diff] [blame] | 30 | # Theory of Operations |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 31 | |
Garret Kelly | 9eebde0 | 2019-10-22 15:36:49 -0400 | [diff] [blame] | 32 | ## Block Diagram |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 33 | |
| 34 |  |
| 35 | |
Timothy Chen | e464899 | 2019-11-02 17:58:54 -0700 | [diff] [blame] | 36 | ## Hardware Interfaces |
| 37 | |
Sam Elliott | d834c70 | 2020-02-12 11:18:47 +0000 | [diff] [blame^] | 38 | {{< hwcfg "hw/top_earlgrey/ip/rv_plic/data/autogen/rv_plic.hjson" >}} |
Timothy Chen | e464899 | 2019-11-02 17:58:54 -0700 | [diff] [blame] | 39 | |
| 40 | ## Design Details |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 41 | |
| 42 | ### Identifier |
| 43 | |
| 44 | Each interrupt source has a unique ID assigned based upon its bit position |
Greg Chadwick | 828e9d1 | 2019-10-23 11:37:24 +0100 | [diff] [blame] | 45 | within the input `intr_src_i`. ID ranges from 0 to N, the number of interrupt |
| 46 | sources. ID 0 is reserved and represents no interrupt. The `intr_src_i[i]` bit |
| 47 | has an ID of `i+1`. This ID is used when targets "claim" the interrupt and to |
| 48 | "complete" the interrupt event. |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 49 | |
| 50 | ### Priority and Threshold |
| 51 | |
Greg Chadwick | 828e9d1 | 2019-10-23 11:37:24 +0100 | [diff] [blame] | 52 | Interrupt sources have configurable priority values. The maximum value of the |
| 53 | priority is configurable through the localparam `MAX_PRIO` in the rv_plic |
Garret Kelly | 9eebde0 | 2019-10-22 15:36:49 -0400 | [diff] [blame] | 54 | top-level module. For each target there is a threshold value ({{< regref "THRESHOLD0" >}} for |
Greg Chadwick | 828e9d1 | 2019-10-23 11:37:24 +0100 | [diff] [blame] | 55 | target 0). RV_PLIC notifies a target of an interrupt only if it's priority is |
| 56 | strictly greater than the target's threshold. Note this means an interrupt with |
| 57 | a priority is 0 is effectively prevented from causing an interrupt at any target |
| 58 | and a target can suppress all interrupts by setting it's threshold to the max |
| 59 | priority value. |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 60 | |
| 61 | `MAX_PRIO` parameter is most area contributing option in RV_PLIC. If `MAX_PRIO` |
Timothy Chen | e464899 | 2019-11-02 17:58:54 -0700 | [diff] [blame] | 62 | is big, then finding the highest priority in Process module may consume a lot of |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 63 | logic gates. |
| 64 | |
| 65 | ### Interrupt Gateways |
| 66 | |
Greg Chadwick | 828e9d1 | 2019-10-23 11:37:24 +0100 | [diff] [blame] | 67 | The Gateway observes incoming interrupt sources and converts them to a common |
| 68 | interrupt format used internally by RV_PLIC. It can be configured to detect |
| 69 | interrupts events on an edge (when the signal changes from **0** to **1**) or |
| 70 | level basis (where the signal remains at **1**). |
| 71 | |
| 72 | When the gateway detects an interrupt event it raises the interrupt pending bit |
Garret Kelly | 9eebde0 | 2019-10-22 15:36:49 -0400 | [diff] [blame] | 73 | ({{< regref "IP" >}}) for that interrupt source. When an interrupt is claimed by a target the |
Timothy Chen | e464899 | 2019-11-02 17:58:54 -0700 | [diff] [blame] | 74 | relevant bit of {{< regref "IP" >}} is cleared. A bit in {{< regref "IP" >}} will not be reasserted until the |
Greg Chadwick | 828e9d1 | 2019-10-23 11:37:24 +0100 | [diff] [blame] | 75 | target signals completion of the interrupt. Any new interrupt event between a |
Garret Kelly | 9eebde0 | 2019-10-22 15:36:49 -0400 | [diff] [blame] | 76 | bit in {{< regref "IP" >}} asserting and completing that interrupt is ignored. In particular |
Greg Chadwick | 828e9d1 | 2019-10-23 11:37:24 +0100 | [diff] [blame] | 77 | this means that for edge triggered interrupts if a new edge is seen after the |
Timothy Chen | e464899 | 2019-11-02 17:58:54 -0700 | [diff] [blame] | 78 | source's {{< regref "IP" >}} bit is asserted but before completion, that edge will be ignored |
Greg Chadwick | 828e9d1 | 2019-10-23 11:37:24 +0100 | [diff] [blame] | 79 | (counting missed edges as discussed in the RISC-V PLIC specification is not |
| 80 | supported). |
| 81 | |
| 82 | Note that there is no ability for a level triggered interrupt to be cancelled. |
Garret Kelly | 9eebde0 | 2019-10-22 15:36:49 -0400 | [diff] [blame] | 83 | If the interrupt drops after the gateway has set a bit in {{< regref "IP" >}}, the bit will |
Greg Chadwick | 828e9d1 | 2019-10-23 11:37:24 +0100 | [diff] [blame] | 84 | remain set until the interrupt is completed. The SW handler should be conscious |
| 85 | of this and check the interrupt still requires handling in the handler if this |
| 86 | behaviour is possible. |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 87 | |
| 88 | ### Interrupt Enables |
| 89 | |
Garret Kelly | 9eebde0 | 2019-10-22 15:36:49 -0400 | [diff] [blame] | 90 | Each target has a set of Interrupt Enable ({{< regref "IE0" >}} for target 0) registers. Each |
| 91 | bit in the {{< regref "IE0" >}} registers controls the corresponding interrupt source. If an |
Greg Chadwick | 828e9d1 | 2019-10-23 11:37:24 +0100 | [diff] [blame] | 92 | interrupt source is disabled for a target, then interrupt events from that |
| 93 | source won't trigger an interrupt at the target. RV_PLIC doesn't have a global |
| 94 | interrupt disable feature. |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 95 | |
| 96 | ### Interrupt Claims |
| 97 | |
| 98 | "Claiming" an interrupt is done by a target reading the associated |
Garret Kelly | 9eebde0 | 2019-10-22 15:36:49 -0400 | [diff] [blame] | 99 | Claim/Completion register for the target ({{< regref "CC0" >}} for target 0). The return value |
| 100 | of the {{< regref "CC0" >}} read represents the ID of the pending interrupt that has the |
Greg Chadwick | 828e9d1 | 2019-10-23 11:37:24 +0100 | [diff] [blame] | 101 | highest priority. If two or more pending interrupts have the same priority, |
| 102 | RV_PLIC chooses the one with lowest ID. Only interrupts that that are enabled |
| 103 | for the target can be claimed. The target priority threshold doesn't matter |
| 104 | (this only factors into whether an interrupt is signalled to the target) so |
Garret Kelly | 9eebde0 | 2019-10-22 15:36:49 -0400 | [diff] [blame] | 105 | lower priority interrupt IDs can be returned on a read from {{< regref "CC0" >}}. If no |
Greg Chadwick | 828e9d1 | 2019-10-23 11:37:24 +0100 | [diff] [blame] | 106 | interrupt is pending (or all pending interrupts are disabled for the target) a |
Garret Kelly | 9eebde0 | 2019-10-22 15:36:49 -0400 | [diff] [blame] | 107 | read of {{< regref "CC0" >}} returns an ID of 0. |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 108 | |
| 109 | ### Interrupt Completion |
| 110 | |
Garret Kelly | 9eebde0 | 2019-10-22 15:36:49 -0400 | [diff] [blame] | 111 | After an interrupt is claimed, the relevant bit of interrupt pending ({{< regref "IP" >}}) is |
Greg Chadwick | 828e9d1 | 2019-10-23 11:37:24 +0100 | [diff] [blame] | 112 | cleared, regardless of the status of the `intr_src_i` input value. Until a |
| 113 | target "completes" the interrupt, it won't be re-asserted if a new event for the |
| 114 | interrupt occurs. A target completes the interrupt by writing the ID of the |
Garret Kelly | 9eebde0 | 2019-10-22 15:36:49 -0400 | [diff] [blame] | 115 | interrupt to the Claim/Complete register ({{< regref "CC0" >}} for target 0). The write event |
Greg Chadwick | 828e9d1 | 2019-10-23 11:37:24 +0100 | [diff] [blame] | 116 | is forwarded to the Gateway logic, which resets the interrupt status to accept a |
| 117 | new interrupt event. The assumption is that the processor has cleaned up the |
| 118 | originating interrupt event during the time between claim and complete such that |
| 119 | `intr_src_i[ID-1]` will have de-asserted (unless a new interrupt has occurred). |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 120 | |
| 121 | ~~~~wavejson |
| 122 | { signal: [ |
| 123 | { name: 'clk', wave: 'p...........' }, |
Greg Chadwick | 828e9d1 | 2019-10-23 11:37:24 +0100 | [diff] [blame] | 124 | { name: 'intr_src_i[i]', wave: '01....0.1...', node:'.a....e.f...'}, |
| 125 | { name: 'irq_o', wave: '0.1.0......1', node:'..b.d......h'}, |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 126 | { name: 'irq_id_o', wave: '=.=.=......=', |
| 127 | data: ["0","i+1","0","i+1"] }, |
Greg Chadwick | 828e9d1 | 2019-10-23 11:37:24 +0100 | [diff] [blame] | 128 | { name: 'claim', wave: '0..10.......', node:'...c........'}, |
| 129 | { name: 'complete', wave: '0.........10', node:'..........g.'}, |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 130 | ], |
| 131 | head:{ |
| 132 | text: 'Interrupt Flow', |
| 133 | tick: 0, |
| 134 | }, |
| 135 | } |
| 136 | ~~~~ |
| 137 | |
Greg Chadwick | 828e9d1 | 2019-10-23 11:37:24 +0100 | [diff] [blame] | 138 | In the example above an interrupt for source ID `i+1` is configured as a level |
| 139 | interrupt and is raised at a, this results in the target being notified of the |
| 140 | interrupt at b. The target claims the interrupt at c (reading `i+1` from it's |
| 141 | Claim/Complete register) so `irq_o` deasserts though `intr_src_i[i]` remains |
| 142 | raised. The SW handles the interrupt and it drops at e. However a new interrupt |
| 143 | quickly occurs at f. As complete hasn't been signaled yet `irq_o` isn't |
| 144 | asserted. At g the interrupt is completed (by writing `i+1` to it's |
| 145 | Claim/Complete register) so at h `irq_o` is asserted due to the new interrupt. |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 146 | |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 147 | |
Garret Kelly | 9eebde0 | 2019-10-22 15:36:49 -0400 | [diff] [blame] | 148 | # Programmers Guide |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 149 | |
Garret Kelly | 9eebde0 | 2019-10-22 15:36:49 -0400 | [diff] [blame] | 150 | ## Initialization |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 151 | |
| 152 | After reset, RV_PLIC doesn't generate any interrupts to any targets even if |
Greg Chadwick | 828e9d1 | 2019-10-23 11:37:24 +0100 | [diff] [blame] | 153 | interrupt sources are set, as all priorities and thresholds are 0 by default and |
| 154 | all ``IE`` values are 0. Software should configure the above three registers and the |
Garret Kelly | 9eebde0 | 2019-10-22 15:36:49 -0400 | [diff] [blame] | 155 | interrupt source type {{< regref "LE" >}} . |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 156 | |
Garret Kelly | 9eebde0 | 2019-10-22 15:36:49 -0400 | [diff] [blame] | 157 | {{< regref "LE" >}} and {{< regref "PRIO0" >}} .. {{< regref "PRIO31" >}} registers are unique. So, only one of the targets |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 158 | shall configure them. |
| 159 | |
Garret Kelly | 9eebde0 | 2019-10-22 15:36:49 -0400 | [diff] [blame] | 160 | ```c |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 161 | // Pseudo-code below |
| 162 | void plic_init() { |
| 163 | // Set to level-triggered for interrupt sources |
Alex Bradbury | a78ae46 | 2020-01-03 17:24:12 +0000 | [diff] [blame] | 164 | for (int i = 0; i < ceil(N_SOURCE / 32); ++i) { |
Miguel Young de la Sota | 0240b78 | 2019-12-20 09:33:23 -0600 | [diff] [blame] | 165 | *(LE + i) = 0; |
| 166 | } |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 167 | |
| 168 | // Configure priority |
Alex Bradbury | a78ae46 | 2020-01-03 17:24:12 +0000 | [diff] [blame] | 169 | for (int i = 0; i < N_SOURCE; ++i) { |
Miguel Young de la Sota | 0240b78 | 2019-12-20 09:33:23 -0600 | [diff] [blame] | 170 | *(PRIO + i) = value(i); |
| 171 | } |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 172 | } |
| 173 | |
| 174 | void plic_threshold(tid, threshold) { |
Miguel Young de la Sota | 0240b78 | 2019-12-20 09:33:23 -0600 | [diff] [blame] | 175 | *(THRESHOLD + tid) = threshold; |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 176 | } |
| 177 | |
| 178 | void plic_enable(tid, iid) { |
| 179 | // iid: 0-based ID |
Miguel Young de la Sota | 0240b78 | 2019-12-20 09:33:23 -0600 | [diff] [blame] | 180 | int offset = ceil(N_SOURCE / 32) * tid + (iid >> 5); |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 181 | |
Miguel Young de la Sota | 0240b78 | 2019-12-20 09:33:23 -0600 | [diff] [blame] | 182 | *(IE + offset) = *(IE + offset) | (1 << (iid % 32)); |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 183 | } |
Garret Kelly | 9eebde0 | 2019-10-22 15:36:49 -0400 | [diff] [blame] | 184 | ``` |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 185 | |
Garret Kelly | 9eebde0 | 2019-10-22 15:36:49 -0400 | [diff] [blame] | 186 | ## Handling Interrupt Request Events |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 187 | |
| 188 | If software receives an interrupt request, it is recommended to follow the steps |
Garret Kelly | 9eebde0 | 2019-10-22 15:36:49 -0400 | [diff] [blame] | 189 | shown below (assuming target 0 which uses {{< regref "CC0" >}} for claim/complete). |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 190 | |
Greg Chadwick | 828e9d1 | 2019-10-23 11:37:24 +0100 | [diff] [blame] | 191 | 1. Claim the interrupts right after entering to the interrupt service routine |
Garret Kelly | 9eebde0 | 2019-10-22 15:36:49 -0400 | [diff] [blame] | 192 | by reading the {{< regref "CC0" >}} register. |
Greg Chadwick | 828e9d1 | 2019-10-23 11:37:24 +0100 | [diff] [blame] | 193 | 2. Determine which interrupt should be serviced based on the values read from |
Garret Kelly | 9eebde0 | 2019-10-22 15:36:49 -0400 | [diff] [blame] | 194 | the {{< regref "CC0" >}} register. |
Greg Chadwick | 828e9d1 | 2019-10-23 11:37:24 +0100 | [diff] [blame] | 195 | 3. Execute ISR, clearing the originating peripheral interrupt. |
Garret Kelly | 9eebde0 | 2019-10-22 15:36:49 -0400 | [diff] [blame] | 196 | 4. Write Interrupt ID to {{< regref "CC0" >}} |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 197 | 5. Repeat as necessary for other pending interrupts. |
| 198 | |
| 199 | It is possible to have multiple interrupt events claimed. If software claims one |
| 200 | interrupt request, then the process module advertises any pending interrupts |
| 201 | with lower priority unless new higher priority interrupt events occur. If a |
| 202 | higher interrupt event occurs after previous interrupt is claimed, the RV_PLIC |
| 203 | IP advertises the higher priority interrupt. Software may utilize an event |
| 204 | manager inside a loop so that interrupt claiming and completion can be |
| 205 | separated. |
| 206 | |
| 207 | ~~~~c |
| 208 | void interrupt_service() { |
Miguel Young de la Sota | 0240b78 | 2019-12-20 09:33:23 -0600 | [diff] [blame] | 209 | uint32_t tid = /* ... */; |
| 210 | uint32_t iid = *(CC + tid); |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 211 | if (iid == 0) { |
Miguel Young de la Sota | 0240b78 | 2019-12-20 09:33:23 -0600 | [diff] [blame] | 212 | // Interrupt is claimed by one of other targets. |
| 213 | return; |
| 214 | } |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 215 | |
| 216 | do { |
Miguel Young de la Sota | 0240b78 | 2019-12-20 09:33:23 -0600 | [diff] [blame] | 217 | // Process interrupts... |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 218 | // ... |
| 219 | |
Miguel Young de la Sota | 0240b78 | 2019-12-20 09:33:23 -0600 | [diff] [blame] | 220 | // Finish. |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 221 | *(CC + tid) = iid; |
| 222 | iid = *(CC + tid); |
| 223 | } while (iid != 0); |
| 224 | } |
| 225 | ~~~~ |
| 226 | |
Garret Kelly | 9eebde0 | 2019-10-22 15:36:49 -0400 | [diff] [blame] | 227 | ## Registers |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 228 | |
Sam Elliott | d834c70 | 2020-02-12 11:18:47 +0000 | [diff] [blame^] | 229 | The register description below matches the instance in the [Earl Grey top level |
| 230 | design]({{< relref "hw/top_earlgrey/doc" >}}). |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 231 | |
Sam Elliott | d834c70 | 2020-02-12 11:18:47 +0000 | [diff] [blame^] | 232 | A similar register description can be generated with `reg_rv_plic.py` script. |
| 233 | The reason another script for register generation is that RV_PLIC is |
| 234 | configurable to the number of input sources and output targets. To implement it, |
| 235 | some of the registers (see below **IE**) should be double nested in register |
| 236 | description file. As of Jan. 2019, `regtool.py` supports only one nested |
| 237 | multiple register format `multireg`. |
| 238 | |
| 239 | The RV_PLIC in the top level is generated by topgen tool so that the number of |
Timothy Chen | e464899 | 2019-11-02 17:58:54 -0700 | [diff] [blame] | 240 | interrupt sources may be different. |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 241 | |
| 242 | - LE: CEILING(N_SOURCE / DW) |
| 243 | Value 1 indicates the interrupt source's behavior is edge-triggered It is |
| 244 | used in the gateways module. |
| 245 | - IE: CEILING(N_SOURCE / DW) X N_TARGET |
| 246 | Each bit enables corresponding interrupt source. Each target has IE set. |
| 247 | - PRIO: N_SOURCE |
| 248 | Universal set across all targets. Lower n bits are valid. n is determined by |
| 249 | MAX_PRIO parameter |
| 250 | - THRESHOLD: N_TARGET |
| 251 | Priority threshold per target. Only priority of the interrupt greater than |
| 252 | threshold can raise interrupt notification to the target. |
| 253 | - IP: CEILING(N_SOURCE / DW) |
| 254 | Pending bits right after the gateways. Read-only |
| 255 | - CC: N_TARGET |
| 256 | Claim by read, complete by write |
| 257 | |
Sam Elliott | d834c70 | 2020-02-12 11:18:47 +0000 | [diff] [blame^] | 258 | {{< registers "hw/top_earlgrey/ip/rv_plic/data/autogen/rv_plic.hjson" >}} |