AN 978: Nios® V Processor Migration Guidelines

ID 773196
Date 5/22/2025
Public

Visible to Intel only — GUID: ckk1678178982026

Ixiasoft

Document Table of Contents

6.2. Interrupt

Nios® II processor offers Internal (IIC) or External Interrupt Controller (EIC) for interrupt handling, while Nios® V processor provides the Core-Local Interruptor (CLINT) and Core-Local Interrupt Controller (CLIC). The difference results from the Instruction Set Architectures (ISAs) of the processors: Nios® II and RISC-V.
Table 26.  Comparison between Each Interrupt Controller
Implementation Nios® V Processor Nios® II Processor
CLINT-Direct CLINT-Vectored CLIC IIC EIC with Vectored Interrupt Controller
Interrupt type Non-vectored Vectored Non-vectored Non-vectored Vectored
Hardware (Platform) interrupt 16 interrupts 16 to 2048 interrupts 32 interrupts Unlimited
Software interrupt 1 interrupt Not supported Tied to each hardware interrupt.
Timer interrupt 1 interrupt Implement as hardware interrupt with Interval Timer Core.
Pre-emption with interrupt level Not supported Supported Not supported Supported
Priority arbitration Not supported Supported Not supported Supported
Register Set Switching with Shadow Register Supported Not supported Supported
Configurable non-maskable interrupt Implement using the global Machine Interrupt Enable bit in Machine Status Register (mstatus.mie) Not supported Supported
Configurable trigger condition Positive level trigger only
  • Positive level trigger
  • Rising edge trigger
  • Negative level trigger
  • Falling edge trigger
Positive level trigger only
Legacy HAL Interrupt API Not supported Supported
Enhanced HAL Interrupt API Supported Supported
  • The HAL driver for hardware interrupt is compatible, but take note that the Nios® V processor accepts interrupts number up to 16 only which reflects the difference in interrupt bus width.
  • Altera provides the HAL API for software interrupt and timer interrupt for the Nios® V processor.

If you have custom device drivers, Altera recommends that you upgrade them to use the enhanced HAL interrupt API. The enhanced API maintains compatibility with the IIC. The legacy HAL interrupt API is deprecated. Upgrading your device driver is very simple, requiring only minor changes to some function calls.

Table 27.  HAL Interrupt Legacy and Enhanced API Functions
Legacy API Function Enhanced API Function
alt_irq_register() alt_ic_isr_register()
alt_irq_disable() alt_ic_irq_disable()
alt_irq_enable() alt_ic_irq_enable()