RISC-V emulator. Supprts rv64imc.
- RISCV
- Riscv tool install path as the following:
$ export RISCV=/opt/riscv/
$ cargo build
$ cargo test
$ git clone --recursive https://github.com/riscv/riscv-tests
$ mkdir -p riscv-tests/build
$ cd riscv-tests/build
$ ../configure --prefix=${RISCV}/target
$ make
$ make install
$ cargo run ${RISCV}/target/share/riscv-tests/isa/rv64ui-p-addi.bin
find ${RISCV}/target/share/riscv-tests/isa/ | grep -v dump | grep rv64 | xargs -I@@@ cargo run @@@
- Cross compiler and standard libraries
$ git clone --recursive https://github.com/riscv/riscv-gnu-toolchain
$ cd riscv-gnu-toolchain
$ ./configure --prefix=${RISCV}
$ make -j`getconf _NPROCESSORS_ONLN`
$ make -C test
$ cargo run test/hello.bin
$ cargo run ${RISCV}/target/share/riscv-tests/isa/rv64ui-p-addi.bin -o 0x80000000 -s -l error > rrvm.log
$ spike --isa=rv64gc -l ${RISCV}/target/share/riscv-tests/isa/rv64ui-p-addi 2>&1 | cut -d")" -f 1 > spike.log
$ diff -u spike.log rrvm.log
$ cargo doc --no-deps --open --document-private-items