You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|1 = | Interrupt delivery from the interrupt file is enabled
274
-
|0x20000000 = | Interrupt delivery from an ACLIC (new)
275
-
|0x40000000 = | Interrupt delivery from a PLIC or APLIC is enabled
276
-
|===
252
+
To achieve this, ACLIC builds upon the Advanced Platform-Level Interrupt Controller (APLIC).
253
+
The ACLIC is a tailored APLIC, optimized for resource efficiency and tightly integrated with a single hart. It utilizes APLIC direct delivery mode.
277
254
278
-
If Smaclic or Ssaclic extensions are present, reset initializes {eidelivery} to 0x20000000.
255
+
=== Interface
279
256
280
-
When interrupts are delivered from an ACLIC, the following behavior is valid:
257
+
ACLIC implements subset of AIA APLIC configuration and control interface defined by RISC-V AIA.
258
+
ACLIC allows maximum of two domains for Machine and Supervisor modes respectively. Each domain may include:
281
259
282
-
The IMSIC registers {eithreshold}, {eipk} and {eiek} serve the same functionality as with {eidelivery} = 1.
260
+
- 1 domain configuration register.
261
+
- Up to 1023 source configuration registers.
262
+
- 4 interrupt pending and enable control registers.
263
+
- 4 interrupt delivery control registers.
283
264
284
-
The `eip` array and `eie` array act as an alias of the pending and enable bits of the connected APLIC domain.
265
+
NOTE: Entire ACLIC interface is optimized for access by interrupt identity number (IID) to avoid unnecessary calculation of fields positions for the specific interrupt.
285
266
286
-
The {eithreshold} CSR is an alias of the {ithreshold}.
287
-
For the interrupt enable and interrupt pending bits {eipk} and {eiek},
288
-
a write with the value 1 performs a write access with the value 1 to the corresponding {setip} or {setie} register,
289
-
while a write with the value 0 performs a write access with value 1 to the corresponding {in_clrip} or {clrie} register.
290
-
On read of {eipk} or {eiek}, these CSRs are an alias of {setip}[_k_] and {setie}[_k_], respectively.
267
+
==== Interrupt Domain Configuration (domaincfg)
291
268
292
-
For XLEN=32, {eipk} and {eiek} access {setip}[_k_]/{in_clrip}[_k_] and {setie}[_k_]/{clrie}[_k_], respectively.
293
-
For XLEN=64, {eipk} and {eiek} only exist for even numbered indices of _k_. In this case,
294
-
{eipk} and {eiek} access {setip}[_k_]/{in_clrip}[_k_] and {setie}[_k_]/{clrie}[_k_] in the lower half of the CSR,
295
-
and {setip}[_k+1_]/{in_clrip}[_k_] and {setie}[_k+1_]/{clrie}[_k_] in the upper half of the CSR, respectively.
296
-
297
-
NOTE: Mirroring these APLIC registers at a core level has several advantages.
298
-
* It removes unnecessary resource duplication between IMSIC and APLIC when integrated with a single hart.
299
-
* It simplifies the address decoding logic within the interrupt controller by using CSR access over memory mapped ones.
300
-
* It simplifies the handling of level-sensitive interrupts, avoiding additional checking of the pending flag in the APLIC in a handler of a level sensitive interrupt.
301
-
* It provides a unified interface for all harts from a SW point of view, without the need to know a platform defined start address.
302
-
* It simplifies the register interface, as CSR instructions have single bit operations
303
-
304
-
The {xtopei} registers work analogous to the IMSIC operation,
305
-
but map to the current highest-priority pending-and-enabled interrupt of the connected APLIC domain.
306
-
In this delivery mode, the {xtopei} CSR reflect both the interrupt identity and the interrupt priority.
| IP | 30 | RO | Read-only (rectified) interrupt-pending
301
+
| IPRIO | 23:16 | RW | Interrupt priority
302
+
| D = 0 | 10 | RW | M-domain interrupt source delegation, read-only zero in S-domain
303
+
| SM | 2:0 | RW | Source mode
352
304
|===
353
305
354
-
Indirect access to `xaclicsourcecfg[k]` mirrors `sourcecfg[k*2][15:0]` up to `sourcecfg[k*2+1][15:0]`.
355
-
356
-
When XLEN = 64, only the even-numbered registers exist and the `xireg2` and `xireg3` registers combined control the source configuration of eight interrupts.
357
-
Indirect access to `xaclicsourcecfg[k]` mirrors `sourcecfg[k*4][15:0]` up to `sourcecfg[k*4+3][15:0]`.
306
+
The IE and IP fields are specific to ACLIC (reserved in case of APLIC) and provide read-only view
307
+
of the interrupt-pending and interrupt-enable bits replacing the pending and enable arrays used by APLIC.
358
308
359
-
=== APLIC configured for ACLIC operation
309
+
To reduce registers addresses reservation the IPRIO field is moved from APLIC targetK[1..1023] registers.
360
310
361
-
The APLIC contains a per-domain configuration register,
362
-
which, among other things, allows selecting the delivery mode.
363
-
The `DM` field is extended to two bits,
364
-
which allows encoding a new mode for ACLIC delivery.
311
+
The effective value of the non-delegated source configuration in S-domain is read-only zero.
==== Interrupt-Enable and Interrupt-Pending Control Registers
372
314
373
-
If Smaclic and/or Ssaclic are implemented,
374
-
the reset value of the delivery mode for the respective domains shall be 'ACLIC delivery mode'.
315
+
ACLIC implements subset of interrupt-pending and interrupt-enable APLIC control interface. In addition to set / clear bit by number there are read-only interrupt-pending and interrupt-enable bits mirrored in the sourcecfgK register.
375
316
376
-
The extended `domaincfg` register has this format:
0 commit comments