Nios® V Processor Reference Manual

ID 683632
Date 5/25/2025
Public

Visible to Intel only — GUID: yyj1734501115730

Ixiasoft

Document Table of Contents

4.3.10.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 115.   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
19 Hardware Error
  • If ECC errors is outside of processor, faulting physical address
  • If ECC error is within processor, set to 0
Interrupted instruction physical address
- Others Set to 0 Interrupted instruction physical address