Nios® V Processor Reference Manual

ID 683632
Date 1/27/2025
Public
Document Table of Contents

4.3.9.2. Direct Mode

Direct Mode is a simple and efficient approach for trap controllers to manage interrupts and exceptions in embedded systems. In this method, each trap is assigned a fixed, specified memory address where the trap handling code is stored. When a trap occurs, the trap controller jumps to this address and executes the trap handling code.

The trap handling code:

  • Switches to the separate exception stack (if enabled).
  • Stores register values onto the stack.
  • Determines the type of exception.
  • Passes control to the exception dispatcher or the interrupt dispatcher, providing a quick and direct response to the event.

The Direct Mode supports interrupt pre-emption based on privilege mode, i.e., Machine, Supervisor, and User mode. Since the Nios® V processor only supports Machine mode (M-mode), Direct Mode does not support interrupt pre-emption based on privilege mode.