Interrupt Pending Bits

(Ask a Question)

The current status of the interrupt source can be read from the pending bits in the PLIC. The pending bits are organized as 6 words of 32 bits, see Table 1 for the register description. The pending bit for interrupt ID N is stored in bit (N mod 32) of word (N=32). The PLIC includes 6 interrupt pending registers, see Table 1 for the first register description and Table 2 for the sixth register. Bit 0 of word 0, which represents the non-existent interrupt source 0, is hardwired to zero.

A pending bit in the PLIC can be cleared by setting the associated enable bit, then performing a claim as described in Interrupt Claim Process.

Table 1. PLIC Interrupt Pending Register 1
PLIC Interrupt Pending Register 1 (pending 1)
Base Address = 0x0C00_1000
Bits Field Name Attributes Reset Description
0 Interrupt 0 pending RO 0 Non-existent Global interrupt 0 is hardwired to zero
1 Interrupt 1 pending RO 0 Pending bit for Global interrupt 1
2 Interrupt 2 pending RO 0 Pending bit for Global interrupt 2
...
31 Interrupt 31 pending RO 0 Pending bit for Global interrupt 31
Table 2. PLIC Interrupt Pending Register 6
PLIC Interrupt Pending Register 6 (pending 6)
Base Address = 0x0C00_1014
Bits Field Name Attributes Reset Description
0 Interrupt 160 Pending RO 0 Pending bit for Global interrupt 160
...
25 Interrupt 186 Pending RO 0 Pending bit for Global interrupt 186
[31:26] Reserved WIRI X