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

scause

T1 riscv register register
Supervisor Cause
SourceRISC-V Official Unified Database (riscv-unified-db) (riscv_unified_db)
Reliability TierT1 — Official Specification
ISA / Silicon ScopeRISC-V Privileged (S)
RV32 / RV64 (Ratified & Standard Extensions)
License & VersionApache-2.0 / CC-BY-4.0
main
Upstreamhttps://github.com/riscv/riscv-unified-db
PrivilegeS
ExtensionsS

Summary

Reports the cause of the latest exception.

Syntax / Encoding

CSR 0x142 (S-mode, RW)

Bitfields (2)

BitsFieldDescription
63INTWritten by hardware when a trap is taken into S-mode. When set, the last exception was caused by an asynchronous Interrupt. scause.INT is writable. [when,"TRAP_ON_ILLEGAL_WLRL == true"] If scause is written with an undefined cause (combination of scause.INT and scause.CODE), an Illegal Instruction exception occurs.
62:0CODEWritten by hardware when a trap is taken into S-mode. Holds the interrupt or exception code for the last taken trap. scause.CODE is writable. [when,"TRAP_ON_ILLEGAL_WLRL == true"] If scause is written with an undefined cause (combination of scause.INT and scause.CODE), an Illegal Instruction exception occurs. [when