Code Monkey home page Code Monkey logo

clic's Issues

Memory Layout

According to the RISC-V CLIC spec, the memory layout of the memory mapped registers should be as follows:

  0x1000+4*i 1B/input R or RW clicintip[i]
  0x1001+4*i 1B/input RW clicintie[i]
  0x1002+4*i 1B/input RW clicintattr[i]
  0x1003+4*i 1B/input RW clicintctl[i]
  ...
  0x4FFC 1B/input R or RW clicintip[4095]
  0x4FFD 1B/input RW clicintie[4095]
  0x4FFE 1B/input RW clicintattr[4095]
  0x4FFF 1B/input RW clicintctl[4095]

The clicint[ip/ie/attr/clt] registers have a width of 1 byte. See https://github.com/riscv/riscv-fast-interrupt/blob/master/clic.adoc#clic-memory-map

However, in the current implementation they are 4 bytes wide.

Not standardized yet

Great to see this appearing and thanks for the contribution to open-source hardware, but the blurb is misleading.
The CLIC is still under development and is not standardized yet. Please be clear in the writeup that this is an implementation of an intermediate development version and spec will change in substantial software-visible ways before ratification. Thanks.

Parameterization of number of IRQ levels

I do not see a top level parameter to specify the number of interrupt levels. This would be important, as most designs will only need a few, not 256. I would expect between 3 and 5 level bits to be used, with the rest fixed to one.
The CLIC specification defines a standard parameter, but that definition is currently being reworked. Thus, I would suggest waiting on riscv/riscv-fast-interrupt#331 to complete

Lint error when setting INTCTLBITS to non-default value

Hi,
I am linting the clic_apb module with Verilator using verilator --lint-only --top-module clic_apb $(bender script verilator).
There are a few warnings, but no errors.

However, when I change the parameter INTCTLBITS of clic_apb to a non-default value (e.g. 4), I get the following error:

%Error: [...]/clic/src/clic.sv:114:19: SEL unexpected in assignment to unpacked array
  114 |     .prio_i      (intctl),
      |                   ^~~~~~

This happens because signal intctl has a hardcoded width of 8 and not INTCTLBITS bits (same for signal irq_max).
The error can likely be fixed by changing the width of these signals, but I am not sure if any other logic needs to be changed also.

Add mask to define implemented interrupt sources

Most interrupt lists have gaps. Usually because a chip is available in many configuration with different peripherals. Sometimes sources are reserved to ensure you can grow in the future without reshuffling the interrupt map. Even the RISC-V definition of interrupts has this. Therefore, a top level parameter is needed to mask out certain sources.

parameter [N_SOURCE-1:0] MASK = {N_SOURCE{1'b1}}

Add parameter to hardwire clicintattr.trig values

clicintattr.trig allows run-time configurability of edge vs level and active high vs low.

CLIC states:

Some implementations may want to save these bits so only certain trigger types are supported. In this case, these bits become hard-wired to fixed values (WARL).

This makes a lot of sense, as this is something that doesn't change at run-time. Will need a new eloboration time parameter.

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.