Nios® V Processor Software Developer Handbook

ID 743810
Date 10/06/2025
Public
Document Table of Contents

9.4. Latency and Response Time

Trap latency is the time required for the hardware to respond to a trap. Response time is the time required to execute trap handler specific to the exception cause. Response time is the sum of trap latency, trap processing time and trap termination time.

Within trap latency, the processor carries out all of the following overhead tasks:

  • Context save—Saving registers on the stack, or switch to shadow registers
  • RTOS context switch—Calling context-switch function(s) if an RTOS is implemented
  • Dispatch handler—Determining the cause of the exception, and transferring control to a specific handler or ISR
Within trap termination, the processor carries out the following overhead tasks:
  • Context restore—Restore registers from the stack, or switch back to GPRs

    RTOS context switch—Calling context-switch function(s) if an RTOS is implemented

  • Return to interrupted process
Figure 26. Trap Response Time
Note:
  • t1 ~ t2 – Trap Latency
  • t2 ~ t3 – Trap Processing Time
  • t3 ~ t4 – Trap Termination Time
  • t1 ~ t4 – Trap Response Time

If you are concerned with system performance, response time is more important than latency, because it reflects the time elapsed between the physical event and the system’s specific response to that event.