stvec
Supervisor Trap Vector
Controls where traps jump.
Software write
This CSR may store a value that is different from what software attempts to write.
When a software write occurs (e.g., through csrrw), the following determines the written value:
BASE = # Base spec says that BASE must be 4-byte aligned, which will always be the case # implementations may put further constraints on BASE when MODE != Direct # If that is the case, stvec should have an override for the implementation return csr_value.BASE; MODE = if (STVEC_MODE_DIRECT && csr_value.MODE == 0) { return 0; } else if (STVEC_MODE_VECTORED && csr_value.MODE == 1) { return 1; } else { return UNDEFINED_LEGAL_DETERMINISTIC; }