Machine Trap Value Register (mtval) - 2024.1 English - UG1629

MicroBlaze V Processor Reference Guide (UG1629)

Document ID
UG1629
Release Date
2024-05-30
Version
2024.1 English

The mtval register is a read/write register. When a trap is taken into M-mode, mtval is either set to zero or written with exception-specific information to assist software in handling the trap.

Table 1. Machine Trap Value Register Exception-specific Information
Code Exception Description
0 Instruction address misaligned Set to the program counter of the misaligned access
2 Illegal instruction Set to the instruction causing the exception
3 Breakpoint trap Set to the program counter of the breakpoint
4 Load address misaligned Set to the misaligned load address
5 Load access fault Set to the address causing the access fault
6 Store/AMO address misaligned Set to the misaligned store address
7 Store/AMO access fault Set to the address causing the access fault
Other Other events Set to 0x00000000