Skip to content

Commit 9b33f91

Browse files
Merge pull request #674 from Silabs-ArjanB/ArjanB_priondi
Clarified relative priority of NMIs, interrupts, debug, exceptions
2 parents 35def5a + f6cd2b7 commit 9b33f91

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

docs/user_manual/source/debug.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ The following list shows the simplified overview of events that occur in the cor
1919
#. Points the PC to the location determined by the input port ``dm_haltaddr_i``
2020
#. Begins executing debug control code
2121

22-
2322
Debug Mode can be entered by one of the following conditions:
2423

2524
- External debug event using the ``debug_req_i`` signal
@@ -50,6 +49,8 @@ A trigger match will cause debug entry if ``tdata1.ACTION`` is 1.
5049

5150
The |corev| will not support the optional debug features 10, 11, & 12 listed in Section 4.1 of [RISC-V-DEBUG]_. Specifically, a control transfer instruction's destination location being in or out of the Program Buffer and instructions depending on PC value shall **not** cause an illegal instruction.
5251

52+
|corev| prioritizes debug mode entry below NMIs, but above regular interrupts and synchronous exceptions.
53+
5354
Interface
5455
---------
5556

docs/user_manual/source/exceptions_interrupts.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ Non Maskable Interrupts (NMIs) update ``mepc``, ``mcause`` and ``mstatus`` simil
6868
``mstatus`` in response to NMIs, see https://github.com/riscv/riscv-isa-manual/issues/756. If this behavior is
6969
specified at a future date, then we will reconsider our implementation.
7070

71+
NMIs have higher priority than other interrupts for both the basic interrupt architecture and the CLIC interrupt architecture.
72+
7173
If ``SMCLIC`` == 0, then the NMI vector location is as follows:
7274

7375
* Upon an NMI in non-vectored basic mode the core jumps to **mtvec[31:7]**, 5'h0, 2'b00} (i.e. index 0).
@@ -296,6 +298,8 @@ Although the [RISC-V-SMCLIC]_ specification supports up to 4096 interrupts, |cor
296298
maximum number of supported CLIC interrupts is equal to ``2^SMCLIC_ID_WIDTH``, which can range from 2 to 1024. The ``SMCLIC_ID_WIDTH`` parameter
297299
also impacts the alignment requirement for the trap vector table, see :ref:`csr-mtvt`.
298300

301+
Interrupt prioritization is mostly performed in the part of CLIC that is external to the core, with the exception that |corev| prioritizes all NMIs above interrupts received via ``clic_irq_i``.
302+
299303
Nested Interrupt Handling
300304
~~~~~~~~~~~~~~~~~~~~~~~~~
301305
|corev| offers hardware support for nested interrupt handling when ``SMCLIC`` == 1.

0 commit comments

Comments
 (0)