RV32 SoC DS UG
High-Perf RV32 SoC DS UG
RV64 SoC DS UG API and Examples
Embedded IDE UG
Loading...
Searching...
No Matches
plic.h File Reference
#include "type.h"
#include "soc.h"
#include "riscv.h"

Go to the source code of this file.

Overview

PLIC driver API definitions.

Author
Efinix Inc

This file provides data structures and APIs for controlling the plic peripheral on the EfxSapphireSoC platform.

Definition in file plic.h.

Data Structures

struct  plic_priority_block_t
 Priority Block: 1024 sources max (Offset 0x000000). More...
struct  plic_pending_block_t
 Pending Block: 1024 sources / 32 bits = 32 words (Offset 0x001000). More...
struct  plic_enable_block_t
 Enable Block: Per Target (Hart). Stride is 0x80 bytes (Offset 0x002000). More...
struct  plic_context_block_t
 Context Block: Per Target (Hart). Stride is 0x1000 (4096) bytes (Offset 0x200000). More...
struct  plic_hwreg_t
 PLIC hardware register map. More...
struct  plic_instance_t
 PLIC instance. Holds the software registers and hardware pointer. More...

Functions

void plic_applyConfig (plic_instance_t *inst)
 Apply stored PLIC configuration to hardware.
u32 plic_claimExtIRQ_m ()
 Claim ID source from external IRQ.
void plic_releaseExtIRQ_m (u32 gateway)
 Release ID source from external IRQ.
PLIC (Get Functions)

Read values from the PLIC hardware registers.

u32 plic_getThreshold (plic_instance_t *inst)
 Read value from PLIC register.
u32 plic_getPriority (plic_instance_t *inst)
 Read value from PLIC register.
PLIC (Set Functions)

Set values to the PLIC hardware registers.

void plic_setPriority (plic_instance_t *inst)
 Set priority value to PLIC register.
void plic_setEnable (plic_instance_t *inst)
 Set enable value to PLIC register.
void plic_setThreshold (plic_instance_t *inst)
 Set threshold value to PLIC register.