Nios® V Processor Software Developer Handbook

ID 743810
Date 4/07/2025
Public
Document Table of Contents

9.2.3. CLIC Mode

Different from CLINT, a full-fledged CLIC trap processing logic provides the capabilities to handle interrupts as either non-vectored interrupts or vectored interrupts. It allows users to define individual interrupts as either non-vectored interrupts or vectored interrupts by encoding them as software-vectored or hardware-vectored, respectively.

  • Software-vectored interrupts and exceptions are handled by the trap handling code residing at a single location – the vector base address in mtvec register.
  • Hardware-vectored interrupts are handled differently. Each interrupt has its own dedicated vector, tied to its ISRs. Interrupt vectors are calculated from the base address of the vector table in mtvt register and the interrupt cause number.

The Nios® V CLIC trap processing logic supports software-vectored interrupt only. Hardware-vectored interrupts are not supported.

The CLIC is a configurable interrupt controller on the following aspects :

  • Pre-emption – Interrupt Level and Priority
  • Polarity – Positive or Negative
  • Trigger Type – Level or Edge
  • Selective Vectoring – Not supported in Nios® V processor. All interrupts are software-vectored.

By default, every interrupt starts at the same interrupt level (no pre-emption), positive level-triggered, and software-vectored after the processor is out of reset. You have to configure the configurable aspects thru the clicintctl and clicintattr CLIC registers.

Upon receipt of a trap request, the CLIC :

  1. Select the interrupt with the highest interrupt level.
  2. Transfer control to vector base address in mtvec register.
  3. Allow the trap handling code to handle the traps.

To complement CLIC, the trap handling code identifies the trap cause and dispatches the registered ISR. CLIC can support up to 2048 independent platform interrupt signals.

Table 42.  Supported Traps
Type of Traps List of Traps

Interrupts

(Only as software-vectored)

  • Machine software interrupt
  • Machine timer interrupt
  • 16 - 2048 Platform interrupts
Exceptions
  • Instruction address misaligned
  • Instruction access fault
  • Illegal Instruction
  • Breakpoint
  • Load address misaligned
  • Load access fault
  • Store address misaligned
  • Store access fault
  • Hardware Error