PLIC Peripheral Interface

Use the SYSTEM_PLIC_CTRL parameter to reference the interface PLIC interface.

Table 1. RISC-V PLIC Operation Parameters
Defines Description
Interrupt priorities registers The interrupt priority for each interrupt source.
Interrupt pending bits registers The interrupt pending status of each interrupt source.
Interrupt enables registers Enables the interrupt source of each context.
Priority thresholds registers The interrupt priority threshold of each context.
Interrupt claim registers The register to acquire interrupt source ID of each context.
Interrupt completion registers The register to send interrupt completion message to the associated gateway.

The soc.h file contains a number of PLIC parameters to specify the interrupt ID for the various peripherals.

Table 2. PLIC Interrupt ID ParametersWhere n is the peripheral number and m is the interrupt ID.
Parameter Refer to
SYSTEM_PLIC_SYSTEM_I2C_n_IO_INTERRUPT m Interrupt Register: 0x0000_0020
SYSTEM_PLIC_SYSTEM_GPIO_n_IO_INTERRUPTS_0 m Interrupt Low Enable Register: 0x0000_002C
SYSTEM_PLIC_SYSTEM_AXI_A_INTERRUPT Interrupts
SYSTEM_PLIC_SYSTEM_SPI_n_IO_INTERRUPT m Interrupt Register: 0x0000_000C
SYSTEM_PLIC_SYSTEM_UART_n_IO_INTERRUPT m Status Register: 0x0000_0004
SYSTEM_PLIC_USER_INTERRUPT_A_INTERRUPT
SYSTEM_PLIC_USER_INTERRUPT_B_INTERRUPT
SYSTEM_PLIC_USER_INTERRUPT_C_INTERRUPT
SYSTEM_PLIC_USER_INTERRUPT_D_INTERRUPT
SYSTEM_PLIC_USER_INTERRUPT_E_INTERRUPT
SYSTEM_PLIC_USER_INTERRUPT_F_INTERRUPT
SYSTEM_PLIC_USER_INTERRUPT_G_INTERRUPT
SYSTEM_PLIC_USER_INTERRUPT_H_INTERRUPT
Interrupts
SYSTEM_PLIC_SYSTEM_USER_TIMER_n_INTERRUPTS_m Timer Limit Register: 0x0000_00044