Nios® V Processor Reference Manual

ID 683632
Date 5/25/2025
Public

Visible to Intel only — GUID: how1741138431287

Ixiasoft

Document Table of Contents

4.3.11.1.3.2. Machine Next Interrupt Handler Address and Interrupt Enable Register (mnxti)

The mnxti CSR improves the performance of handling back-to-back software vectored interrupts. It does this by avoiding the overhead of additional interrupt pipeline flushes and redundant context save/restores for these back-to-back software vectored interrupts. The mnxti CSR is intended to be used inside an interrupt handler after an initial interrupt has been taken and mcause and mepc registers have been updated with the interrupted context and the ID of the initial interrupt.

The value returned by a CSR read of mnxti is the non-zero address of the CLIC vector table entry when there is a suitable pending interrupt. Otherwise, zero is returned. For a pending back-to-back interrupt to be considered, it must fulfil the following conditions:

  • It is a software vectored interrupt
  • It has a level greater than the saved interrupt level (held in mcause.mpil)
  • It has a level greater than the interrupt threshold (held in mintthresh)

Based on the CSR instruction, the processor behaves differently when assessing mnxti CSR.

Table 128.  Behaviours when assessing mnxti CSR
Processor Behaviours Condition List of CSR Instructions
  1. Updates minstatus.mil to the level of new interrupt
  2. Updates mcause.excode to ID of new interrupt
  3. Clear the new interrupt clicintip bit (Only when edge-triggered)
  4. Returns a pointer to the trap handler entry
CSR instruction includes write
  • CSRRCI
  • CSRRS with zero immediate values for all bits, except bits 1 and 3
  • CSRRSI with zero immediate values for all bits, except bits 1 and 3
Returns a pointer to the trap handler entry CSR instruction does not include write CSRR
Reserved N/A
  • CSRRW
  • CSRRWI
  • CSRRC
  • CSRRSI with non-zero immediate values for bits 0, 2 and 4