Expand description
The executable specification of the hart: an RV64IMAC processor with the Zicsr and Zifencei extensions, machine
and user modes and eight physical-memory-protection entries, one architectural step at a time. The hart’s RTL is
held to this model instruction by instruction, and this model is held to the RISC-V architecture tests and to
qemu-riscv64.
What the hart leaves to software, by design: there is no floating-point unit, so every F and D instruction (and
every access to fflags, frm or fcsr) is an illegal instruction the machine-mode firmware emulates; and a
misaligned load, store or atomic traps with its address in mtval rather than being split in hardware. Neither
occurs often enough in the compiler to matter: the measured floating-point share of a compile is 0.0002% of its
instructions.
Structs§
- BusError
- A physical access the bus refuses (no device at the address).
- Hart
- The architectural state of the hart.
- Region
- A range of physical addresses and what it may be used for: its physical memory attributes. An access outside every region, or one its region does not permit, is an access fault before it reaches the bus — so a device register is never fetched from, never the target of an atomic, and never read or written in part. These attributes are the only source of access faults: every access they permit, the bus completes.
- Trap
- A synchronous exception: its
mcauseand the valuemtvalreceives.
Enums§
Constants§
- CAUSE_
BREAKPOINT - CAUSE_
FETCH_ ACCESS - CAUSE_
ILLEGAL_ INSTRUCTION - CAUSE_
LOAD_ ACCESS - CAUSE_
MACHINE_ ECALL - CAUSE_
MISALIGNED_ LOAD - CAUSE_
MISALIGNED_ STORE - CAUSE_
STORE_ ACCESS - CAUSE_
USER_ ECALL - MISA
misa: RV64 with the A, C, I, M and U extensions.- PMP_
ENTRIES - The number of physical-memory-protection entries the hart implements; entries 8 to 15 read as zero.
Traits§
- Bus
- The hart’s view of the system: naturally aligned reads and writes of 1, 2, 4 or 8 bytes.