# E21 CLIC Interrupt Mapping?

**URL:** <https://forums.sifive.com/t/e21-clic-interrupt-mapping/2421>\
**Category:** SiFive RISC-V Core IP Evaluation\
**Created:** [May 31, 2019, 2:36am UTC](https://forums.sifive.com/t/e21-clic-interrupt-mapping/2421 "2019-05-31T02:36:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bradjc](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.sifive.com/bradjc/32/1000_2.png) [@bradjc](https://forums.sifive.com/u/bradjc)\
**Post date:** [May 31, 2019, 2:36am UTC](https://forums.sifive.com/t/e21-clic-interrupt-mapping/2421/1 "2019-05-31T02:36:02Z")

</div>

Is there a complete list of interrupts for the E21 CLIC running on the Arty-A7 FPGA? `coreip-arty-userguide-v3p0.pdf` includes some information about the interrupt numbers, but it isn’t very clear.

This is what I’ve seen so far:

```auto
3 - msip
7 - mtip
11 - meip
12 - csip
16 - gpio[0]
17 - gpio[1]
18 - gpio[2]
19 - gpio[3]
20 - gpio[4]
21 - gpio[5]
22 - gpio[6]
23 - gpio[7]
24 - gpio[8]
25 - gpio[9]
26 - gpio[10]
27 - gpio[11]
28 - gpio[12]
29 - gpio[13]
30 - gpio[14]
31 - gpio[15]
32 - uart

```

And then maybe, I’m not really sure:

```auto
46 - button[0]

```

Does someone have a definitive list with indices that match up with the addresses in the CLIC registers?

---

<div class="post-metadata">

**Author:** ![nickolas](https://avatars.discourse-cdn.com/v4/letter/n/5e9695/32.png) [@nickolas](https://forums.sifive.com/u/nickolas)\
**Post date:** [May 31, 2019, 2:02pm UTC](https://forums.sifive.com/t/e21-clic-interrupt-mapping/2421/2 "2019-05-31T14:02:33Z")

</div>

Some related information that I remember now:

**List of Interrupts in the E21 Core**  
SiFive E21 Core Complex Manual v19.02  
Table 10: mcause Exception Codes

> **[sifive%2Ffb057b6e-ccf2-493e-8907-513ed426ee44\_e21\_core\_complex\_manual\_v19\_02.pdf](https://sifive.cdn.prismic.io/sifive%2Ffb057b6e-ccf2-493e-8907-513ed426ee44_e21_core_complex_manual_v19_02.pdf)**
>
> 442.72 KB

**How GPIO match to board elements and interrupts**  
SiFive Core IP FPGA Eval Kit User Guide v3p0  
Table 7.1: Core IP FPGA Eval Kit GPIO Offset to Board Pin Number  
Table 7.2: Core IP FPGA Eval Kit Local Interrupts Mapping

> **[sifive%2Fe44a9cd4-7d5a-4dcf-9b4f-d456887bd50b\_coreip-arty-userguide-v3p0.pdf](https://sifive.cdn.prismic.io/sifive%2Fe44a9cd4-7d5a-4dcf-9b4f-d456887bd50b_coreip-arty-userguide-v3p0.pdf)**
>
> 2.16 MB

**An example of CLIC handling button interrupts**

> <https://github.com/sifive/freedom-e-sdk/blob/dca1dfaf1cfb80ec30a7a16b899efa1040e3451d/software/clic_vectored/clic_vectored.c>

---

<div class="post-metadata">

**Author:** ![bradjc](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.sifive.com/bradjc/32/1000_2.png) [@bradjc](https://forums.sifive.com/u/bradjc)\
**Post date:** [May 31, 2019, 6:19pm UTC](https://forums.sifive.com/t/e21-clic-interrupt-mapping/2421/3 "2019-05-31T18:19:09Z")

</div>

Table 7.2 is certainly very useful (albeit confusing because those are _not_ local interrupt numbers, those are the numbers from the base of the CLIC, and the clarification about `mie` is just more confusing since the CLIC doesn’t use `mie`), but how should I use table 7.1? What is a global interrupt on the E21 core? What do those numbers correspond to?

Unfortunately tracking through the old clic-vectored code (which I’m hoping to save future developers from having to do) just shows that the button indices match table 7.2.

We really just need a simple table of how the interrupts are wired in the E21 core.
