SkillAgentSearch skills...

Simmerv

Feature-rich RISC-V RVA22 SoC emulator; runs Ubuntu etc. and more

Install / Use

/learn @tommythorn/Simmerv
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Rust

Simmerv

Simmerv is a RISC-V SoC emulator written in Rust and compilable to WebAssembly. It began as a fork of Takahiro's riscv-rust emulator, but has by now been extensively rewritten, making it far more complete and much faster. Ultimately, we expect it to become substantially faster, but this work is delayed until we are able to run standard benchmarks and off-the-shelf Linux distributions.

Online Demo

You can run Linux on the emulator in your browser: online demo is here

Screenshots (somewhat out of date)

animation debugger

Features

  • Emulates RISC-V RV64GC_Zba_Zbb_Zbc_Zbs_Zicond_Zfhmin_Svinval_Svade_Sstc_Zicbom_Zicbop_Zicboz_Zihpm (RVA22) processor and peripheral devices (CLINT, PLIC, NS16550A UART, virtio block device, and VirtIO ethernet)
  • Targets native and WASM
  • Snapshots
  • Speedometer

Instructions/Features support status

RVA22 profile (complete)

  • [x] RV64IMAC
  • [x] RV64FD (PARTIALLY: flags/rounding modes not complete for all insns)
  • [x] RV64Zifencei
  • [x] RV64Zicsr
  • [x] Zba, Zbb, Zbc, Zbs ("B" extension)
  • [x] Zicond
  • [x] Zfhmin (half-precision float conversions)
  • [x] Zihpm (hardware performance counters)
  • [x] Zicbom, Zicbop, Zicboz (cache block operations)
  • [x] Svinval (fine-grained TLB invalidation)
  • [x] Svade (hardware A/D fault-on-access)
  • [x] Sstc (stimecmp/menvcfg timer compare)
  • [x] Sv39, Sv48, Sv57
  • [x] Privileged Spec 1.12 (mcounteren/scounteren, senvcfg, PMP stub with 0 entries)
  • [ ] Svnapot
  • [-] PMP enforcement (0 entries implemented; all accesses permitted)

The emulator supports all instructions listed above but some (like many FP instructions) are not 100% to the spec.

  • Passes all riscof (RISC-V Architectural Tests) for RV64IMC
  • Boots Buildroot, Debian Trixie, Ubuntu
  • Linux OpenSBI and legacy BBL boot support

How to run Linux with VirtIO Block Device (/dev/vda)

VERY IMPORTANT: images are stored with git LFS. Install LFS (don't forget git lfs install also) and recheckout if needed. Otherwise the images will be small files with LFS pointers.

$ cargo r -r -- linux/fw_payload.elf -f linux/rootfs.img

or

$ cargo r -r -- -c linux/opensbi/fw_jump.elf,0x80000000 linux/vmlinux,0x80200000 -f linux/rootfs.img

How to run Linux with initramfs (/dev/ram)

Allocate 2 GiB, use a device tree with initramfs at 0xa0000000 and load the initrd2+gdb.cpio binary at that address.

$ (cd linux;cargo r -r -- -m 2048 -d with-initrd.dtb fw_payload.elf initrd2+gdb.cpio,0xa0000000)

How to run riscv-tests

$ ./run-riscv-tests.sh

How to import and use WebAssembly RISC-V emulator in a web browser

See wasm/web

How to install and use WebAssembly RISC-V emulator npm package

See wasm/npm

Links

Linux RISC-V port

Running 64-bit RISC-V Linux on QEMU

Specifications

View on GitHub
GitHub Stars10
CategoryDevelopment
Updated6d ago
Forks2

Languages

Rust

Security Score

95/100

Audited on Mar 26, 2026

No findings