Skip to content
This repository has been archived by the owner on Jun 14, 2022. It is now read-only.
/ MyCLINT Public archive

RISC-V Core Local Interrupt Controller (CLINT) to work as a peripheral primarally in IOb-SoC

License

Notifications You must be signed in to change notification settings

PedroAntunes178/MyCLINT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MyCLINT

RISC-V Core Local Interrupt Controller (CLINT) written in Verilog. The initial focus is for it to work as a IOb-SoC-VexRiscv peripheral.

This repository was archived since we are now working in https://github.com/IObundle/iob-clint. Please go there for further development.

Simulation

To simulate the CLINT unit the user can use both "icarus verilog" and "verilator". Simply run:

make sim-run
# or
make sim-run SIMULATOR=verilator

Before running new simulation do not forget to run make sim-clean.

Register Map

This clint unit follows the RISC-V Specification.

Register Base Address Width Privilege Level Functionality
MSIP xxxx0000 n*4 Bytes Machine Inter-processor (or software) interrupts
MTIMECMP xxxx4000 n*8 Bytes Machine Timer events
MTIME xxxxbff8 8 Bytes Machine Fixed-frequency counter

*note: n correspond to the number of HART's (hardware threads) on a system. The system has been tested to work with 1 HART.

Machine-level Timer Device (MTIMER)

The MTIMER hardware component corresponds to the MTIME and MTIMECMP registers. On reset the MTIME register is set to have all bits at 0 and the MTIMECMP register has all bits at 1. If the value in MTIME is greater than the value stored in MTIMECMP than the Machine Timer Interrupt is enabled and the clint mtip output is set to high.

Machine-level Software Interrupt Device (MSWI)

The MSWI hardware component corresponds to the MSIP register. On reset the MSIP register is set to 0. The each Machine Software Interrupt is wired to the corresponding MSIP register. In accordance the clint msip output is set to high if the less significant bit of the corresponding MSIP registers is set to 1. In the MSIP register all bits except the less significant one should be hardwired to 0.

Supervisor-level Software Interrupt Device (SSWI)

(TO DO)

References

About

RISC-V Core Local Interrupt Controller (CLINT) to work as a peripheral primarally in IOb-SoC

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published