Nios® V Processor Software Developer Handbook

ID 743810
Date 1/27/2025
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

9.2.2.2.2. Interrupt Service Routine

Upon an interrupt, the CLINT-Vectored passes control to the ISR according to the interrupt vector (in vector table). The interrupt vector is calculated from the addition of the vector table base address with four times the interrupt cause number.

The interrupt performs the following tasks:

  • Stores register values onto the stack
  • Execute the servicing tasks related to the interrupt

Once the ISR completes, it performs the following tasks:

  • Restores the registers from the stack
  • Exits by issuing an MRET (trap return in machine mode) instruction
Figure 20. ISR in CLINT-Vectored

For more information about registering an ISR, refer to the topic Interrupt Service Routines and Exception Handler.