- Writing a RISC-V Emulator in Rust
- HackerNews - Writing a RISC-V Emulator from Scratch
- The Adventures of OS: Making a RISC-V Operating System using Rust
- RISC-V ELF psABI
- riscv-emu (Go)
- RISC-V Instruction Formats
- github.com/johnwinans/rvalp - RISC-V Assemly Language Programming
- Writing a simple RISC-V emulator in plain C
- Japanese
- macOS should install using homebrew.
RISC-V has been defined 6-type instructions
- R-format
- instructions using 3 register inputs
- add, xor, mul - arithmetic/logical ops
- I-format
- instructions with immediates, loads
- addi, lw, jalr, slli
- S-format
- store instructions
- sw, sb
- U-format
- instructions with upper immediates
- lui, auipc - upper immediate is 20-bits
- SB-format
- branch instructions
- beq, bge
- UJ-format
- jump instructions
- jal