Git Product home page Git Product logo

iob-clint's Introduction

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.

How to build the core w/ python-setup

The python-setup workflow allows to automatically generate verilog components used by the projects core Verilog. It allows to create bus interfaces with ease and use existing Verilog modules. To use python-setup the project should have a project_setup.py file in the root directory. The main commands to use the python-setup workflow are:

  • make setup: creates a build directory in the projects parent directory.
  • make clean: removes the build directory.

An example of cleaning a previous build, creating a new build and simulating the project is:

  • make clean && make setup && make -C ../iob_clint_V0.10 sim-run

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

iob-clint's People

Contributors

pedroantunes178 avatar jjts avatar arturum1 avatar jdlopes avatar dfigueir avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.