Simmerv is a RISC-V SoC emulator written in Rust and compilable to WebAssembly. It started as a fork of Takahiro’s riscv-rust emulator, but by now 98% of the code has been rewritten, making it far more complete and 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.
You can run Linux on the emulator in your browser: online demo is here
The emulator supports all instructions listed above but some (like many FP instructions) are not 100% to the spec.
Amortized decoding and instruction fusion via a instruction translation cache «
Snapshot and resume
Disk support without an in-memory copy (can WASM support this?)
$ 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
$ ./run-riscv-tests.sh
See wasm/web
See wasm/npm
Running 64-bit RISC-V Linux on QEMU