Virtual Supervisor Indirect Register Alias
The `vsireg` CSR is one of several alias registers used to indirectly access virtual supervisor-level CSRs in VS-mode or VU-mode.
The register addressed by `vsireg` is selected by the current value of the `vsiselect` CSR.
The alias mechanism allows indirect CSR access, which helps in virtualization and future extensibility.
A virtual instruction exception is raised for attempts from VS-mode or VU-mode to directly access `vsiselect` or `vsireg`, or from VU-mode to access `siselect` or `sireg`.
The behavior of accesses to `vsireg` when `vsiselect` holds a value that is not implemented at the HS level is UNSPECIFIED.
Implementations are recommended to raise an illegal instruction exception for accesses to unimplemented targets via `vsireg`.
The width of `vsireg` is always the current `XLEN`, not `VSXLEN`. For example, if `HSXLEN = 64` and `VSXLEN = 32`, then `vsireg` is 64 bits wide when accessed from HS-mode (RV64), but 32 bits when accessed from VS-mode (RV32).
| 31:24 | 23:16 | 15:8 | 7:0 | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| VALUE | |||||||||||||||||||||||||||||||
| 63:56 | 55:48 | 47:40 | 39:32 | 31:24 | 23:16 | 15:8 | 7:0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| VALUE | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Bits | Field | Alias | Description | Type | Reset |
|---|---|---|---|---|---|
| RV32 [31:0] RV64 [63:0] | VALUE | The data read from or written to the register selected by the current value of the `vsiselect` CSR. | RW | UNDEFINED_LEGAL |
Csr handle = indirect_csr_lookup(PrivilegeMode::VS, CSR[vsiselect].VALUE, 1);
if (!handle.valid) {
unimplemented_csr($encoding);
}
return csr_sw_read(handle);Version af3eaf9+cheriot.f635218
Data from the RISC-V Unified Database, copyright RISC-V International and contributors.
CHERIoT extensions from the CHERIoT specification and Sail model, copyright Microsoft and the CHERIoT Platform contributors.
This site is provided as a community resource and is NOT affiliated with nor endorsed by RISC-V International.