121 typedef volatile struct
131 typedef volatile struct
@ MSIP_ENABLE
Enable Software Interrupt */.
@ MSIP_DISABLE
Disable Software Interrupt */.
u32 clint_getSoftInterrupt(u32 hart_id)
Obtain the current state of the software interrupt for a specific hart.
u32 clint_getTimeHigh()
Reads the high part of the current time.
void clint_setCmp(u64 cmp, u32 hart_id)
This function sets the compare value for the CLINT CMP register for a specific hardware thread.
u64 clint_getTime()
Reads the current time value from the CLINT TIME register.
double clint_getTimeDiff(u64 t0, u64 t1)
Get the time difference between t0 and t1.
u32 clint_getTimeLow()
Reads the low part of the current time.
void clint_setSoftInterrupt(clint_msip_t enable, u32 hart_id)
Sets the software interrupt state for a specific hart.
void clint_uDelay(u32 usec, u32 hz)
This function introduces a microsecond delay using the CLINT TIME register.
CLINT hardware register map.
u32 MTIME_HIGH
Offset: 0xBFFC, MTIME High.
clint_mtimecmp_hwreg_t MTIMECMP[SYSTEM_NUMBER_OF_HARTS]
Offset: 0x4000, MTIMECMP for each hart.
u32 MTIME_LOW
Offset: 0xBFF8, MTIME Low.
u32 reserved0[(0x4000 - 4 *SYSTEM_NUMBER_OF_HARTS)/4U]
Reserved Space (0x0C to 0x3FFF).
u32 MSIP[SYSTEM_NUMBER_OF_HARTS]
Offset: 0x0000, Software Interrupt Pending for each hart.
u32 reserved1[(0xBFF8U - 0x4000 - 8 *SYSTEM_NUMBER_OF_HARTS)/4U]
Reserved Space (0x4000 to 0xBFF7).
CLINT MTIMECMP hardware register map.
u32 MTIMECMP_LOW
Offset: 0x00, MTIMECMP Low */.
u32 MTIMECMP_HIGH
Offset: 0x04, MTIMECMP High */.