Commit 6a07202
committed
tests: drivers: riscv: add AIA (APLIC + IMSIC) driver tests
Add comprehensive test suite for RISC-V Advanced Interrupt Architecture
(AIA) drivers, covering both APLIC and IMSIC components.
Test Coverage (17 tests):
APLIC Tests:
- Register offset calculations (sourcecfg, target)
- Register address constants validation
- DOMAINCFG bit definitions
- Source mode constants (inactive, edge, level)
- TARGET register field encoding (hart, MSI mode, EIID)
- GENMSI register field encoding for software-triggered MSI
- MSIADDRCFGH geometry field validation
IMSIC Tests:
- CSR address definitions (direct and indirect)
- MTOPEI register field masks (EIID, priority extraction)
- EIDELIVERY mode constants (MMSI, DMSI, DDI)
- EIE register indexing (8 registers, 32 IDs each = 256 EIIDs)
- EIE bit manipulation for enabling/disabling interrupts
- Indirect CSR addressing calculations
Integration Tests:
- Complete MSI routing encoding (APLIC TARGET + IMSIC EIE)
- EIID range boundary tests (0-2047, 11-bit)
- Hart index boundary tests (0-16383, 14-bit)
Test Pattern:
Following the existing PLIC test pattern at
tests/drivers/interrupt_controller/intc_plic/, these tests validate
constants, helper functions, and register encoding logic without
requiring actual AIA hardware.
All 17 tests pass successfully on qemu_riscv64.
Build and run:
west build -p -b qemu_riscv64 tests/drivers/interrupt_controller/intc_riscv_aia
west build -t run
Signed-off-by: Afonso Oliveira <afonsoo@synopsys.com>1 parent b7bf6d0 commit 6a07202
File tree
5 files changed
+488
-0
lines changed- tests/drivers/interrupt_controller/intc_riscv_aia
- src
5 files changed
+488
-0
lines changedLines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
Lines changed: 89 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
0 commit comments