Nios® V Processor Software Developer Handbook

ID 743810
Date 4/07/2025
Public

Visible to Intel only — GUID: erx1642817738407

Ixiasoft

Document Table of Contents

9.1.1. Trap Handling Terminology

The following list of HAL terms outlines basic trap handling concepts:
  • Application context—The status of the Nios® V processor and the HAL during normal program execution, outside of CLINT architecture.
  • Context switch—The process of saving the Nios® V processor’s registers on an exception or interrupt, and restoring them on return from the exception handling routine or ISR.
  • Trap—A transfer of control away from a program’s normal flow of execution, caused by an event, either internal or external to the processor, which requires immediate attention. Traps include exceptions and interrupts.
  • Trap context—The status of the Nios® V processor and the HAL after a trap(executing trap handling code, exception handler or ISR).
  • Traps handling system—The complete system of routines that service all traps, and pass control to software exception handlers or ISRs.
  • Traps latency—The time elapsed between the event that caused the trap (such as an unimplemented instruction or interrupt request) and the execution of the first instruction at the exception or interrupt handler address.
  • Traps response time—The time elapsed between the event that caused the trap and the execution of the exception handler or ISR.
  • Traps overhead—Additional processing required to service a trap, including HAL-specific processing and RTOS-specific processing if applicable.
  • Trap Handling code—HAL-provided code that sets up the correct processor environment before passing control to the exception handler or ISR.
  • Exception Handler—Code specific to the exception type. The exception handler is distinct from the trap handling code, which takes care of general trap overhead tasks.
  • Implementation-dependent instruction—A Nios® V processor instruction that is not supported on all implementations of the Nios® V core. For example, the mul instructions are implementation-dependent, because they are not supported on the Nios® V/m core.
  • Interrupt—Platform, software and timer interrupt.
  • Interrupt controller—Known as CLINT. It enables Nios® V processor to respond to an interrupt by transferring control to an ISR.
  • Interrupt request (IRQ)—A status signal from an external peripheral that notifies the CPU that it (the peripheral) requires servicing.
  • Interrupt service routine (ISR)—A software routine that handles an individual interrupt.
  • Invalid instruction—An instruction that is not defined for any implementation of the Nios® V processor.
  • Maskable traps—Interrupts that can be disabled with the global mtatus.mie flag, or the dedicated trap enable bits in the mie register.
  • Maximum disabled time—The maximum amount of continuous time that the system spends with maskable interrupts disabled.
  • Maximum masked time—The maximum amount of continuous time that the system spends with a single interrupt masked.
  • Miscellaneous exception—A software exception which is neither an unimplemented instruction nor an ebreak or ecall instruction.
  • Nested interrupts—The process of a high-level interrupt taking control when a lower-level ISR is already running. Not supported in CLINT.
  • Exception—An exception caused by a fatal hardware events, breakpoint or environment calls; that is, any traps other than an interrupt. Fatal hardware events includes address misaligned, access fault and illegal instruction.
  • Worst-case trap latency—The value of the exception (or interrupt) latency, including the maximum disabled time or maximum masked time. Including the maximum disabled or masked time accounts for the case when the trap occurs at the beginning of the masked or disabled time.