Nios® V Processor Reference Manual

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

3.3.6.1.6. Machine Trap Value Register (mtval)

The mtval register is a 32-bits wide read/write register. When a trap is taken in M-mode, it is either set to zero or set to an exception specific value.

Table 34.   mtval value After Exception
Exception Code Exception Type mtval value mepc value
0 Instruction Address Misaligned Faulting instruction physical address Faulting instruction physical address
1 Instruction Access Fault
4 Load Address Misaligned Faulting load physical address Interrupted instruction physical address
5 Load Access Fault
6 Store Address Misaligned Faulting store physical address Interrupted instruction physical address
7 Store Access Fault
3 Breakpoint Interrupted instruction physical address Interrupted instruction physical address
2 Illegal Instruction Faulting instruction Faulting instruction physical address
- Others Set to 0 Interrupted instruction physical address