A RISC-V interrupt subsystem that turns wired sources into per-hart message-signalled interrupts
The Zen AIA (Advanced Interrupt Architecture) is a RISC-V AIA-1.0 interrupt subsystem a client drops into their SoC in place of a classic PLIC. An APLIC aggregates and rectifies wired interrupt sources; an IMSIC receives message-signalled interrupts (MSIs) as per-hart interrupt files and drives each hart's external-interrupt line. The two are pre-composed so a wired source becomes a hart interrupt with no external glue. Product / integrator view; every number is sourced from the as-built RTL or marked TBC with an owner.
1. AIA in one paragraph
The AIA replaces per-hart wired interrupt lines with message-signalled delivery. The APLIC rectifies each raw wired source per its configured mode — edge-rising, edge-falling, level-high, level-low, or inactive/detached — into a pending/enable bitmap. It then delivers either direct (asserts a wired irq_o to the highest-priority pending-enabled source) or by MSI (emits one outbound bus write carrying the source's interrupt identity to a per-hart MSI address). The IMSIC receives that MSI as a literal bus write of an identity to a per-hart seteipnum offset, maintains per-hart pending/enable state, priority-encodes the top eligible interrupt (topei), and asserts ext_irq_o to that hart. The subsystem wrapper routes APLIC's MSI output straight into IMSIC, so the full source → hart path needs no external plumbing.
- Zen AIA (APLIC + IMSIC)
- sources / harts / host
- timing TBC
eip → topei → ext_irq_o, and the identity the hart reads equals the identity the source carried — verified end-to-end.2. What it is, at a glance
| Element | Detail | Default | Status |
|---|---|---|---|
| APLIC wired sources | identities 1..N-1; id 0 reserved | 32 | exists |
| APLIC source modes | inactive · detached · edge-rising / -falling · level-high / -low | — | exists |
| APLIC delivery | direct (wired irq_o, IPRIO priority + claim) and MSI (outbound write of EIID) | — | exists |
| SW-generated MSI | genmsi emits a SW MSI (no source pending touched) | — | exists |
| IMSIC identities per hart file | pending/enable (eip/eie) bitmaps | 64 | exists |
| IMSIC delivery controls | eidelivery enable + eithreshold eligibility, per hart | — | exists |
IMSIC topei | priority-encode, lowest identity wins; claim-on-read advances | — | exists |
| Target harts | shared by APLIC + IMSIC; per-hart MMIO page isolation | 1 | exists |
| Bus | 32-bit struct-typed peripheral bus; region-decoded (APLIC vs IMSIC) | — | exists |
| Multi-domain / supervisor / guest files | single machine-level domain in v1; phased extension | — | TBC |
| Sustained MSI rate / end-to-end latency / fmax | functional sign-off shipped; timing downstream | TBC | TBC |
Sources: Zen AIA product datasheet; as-built RTL.
3. How a client uses it
- Instantiate the pre-composed subsystem (APLIC + IMSIC + wrapper) and attach the config bus; region decode selects the APLIC config region or an IMSIC page.
- Configure sources — set each source's mode (
sourcecfg) and target hart, program the pending/enable bitmaps, and choose the domain delivery mode (direct or MSI). - Deliver — in direct mode the hart reads a per-hart window to claim the highest-priority source; in MSI mode APLIC writes the identity to the hart's IMSIC page, which the hart services by reading
topei. - Scale or steer — raise
NUM_SOURCES/NUM_IDS/NUM_HARTSfor large interrupt populations, and steer each source to a hart;eithresholdmasks low-priority identities at the receiver.
4. Verification & provenance
- Assertion-based, exact: 17 / 17 tests pass — APLIC 7 (rectifier modes, ip/ie, direct priority + claim, MSI with exact EIID/address/order,
genmsi, IE-gate), IMSIC 7 (seteipnum/clreipnum, eip/eie,topeipriority + preempt + claim, threshold masking, delivery gate, multi-hart isolation), and 3 end-to-end tests that check the full source → APLIC-MSI → IMSIC →ext_irq_opath with the hart's identity matching the source's. - Gates: functional DV clean; synthesis checked latch-free on APLIC, IMSIC, and the subsystem wrapper. Shared verification IP provides the bus codecs and an MSI-capture monitor.
- Positioning: the advanced upgrade over a classic PLIC/CLINT interrupt kit — for SoCs that need MSI-based interrupts, large interrupt counts, or a virtualization-ready interrupt-file model. Re-expressed from in-place RTL and specs; no third-party source reproduced.
Sources read
Sources: Zen AIA product datasheet; as-built RTL.