ISARef Multi-ISA & Silicon Reference
45,419 ISA items · 105,907 timings · 1,823 microarchs · 16,083 chips · 105 sources
Arch:
Tier:

mtval

T1 riscv register register
Machine Trap Value
SourceRISC-V Official Unified Database (riscv-unified-db) (riscv_unified_db)
Reliability TierT1 — Official Specification
ISA / Silicon ScopeRISC-V Privileged (Sm)
RV32 / RV64 (Ratified & Standard Extensions)
License & VersionApache-2.0 / CC-BY-4.0
main
Upstreamhttps://github.com/riscv/riscv-unified-db
PrivilegeM
ExtensionsSm

Summary

Holds trap-specific information

Syntax / Encoding

CSR 0x343 (M-mode, RW)

Bitfields (1)

BitsFieldDescription
63:0VALUEWritten with trap-specific information when a trap is taken into M-mode. The values are: [separator="!"] ! Exception type ! Value ! [0] Instruction address misaligned ! The misaligned virtual PC (same as the value written to mepc). ! [1] Instruction access fault ! The <% if ext?(:C) %> portion of the <% end %> virt