Skip to content

lukasx999/riscv-emu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

349 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

riscv-emu

Linux Userspace emulator for RV64I ELF binaries.

  • Written in modern C++23.
  • Standard-Compliant RV64I instruction set
  • Tested using the official RISCV test suite.
  • Support for GDB Remote Debugging via GDB RSP
  • Interactive REPL

Build Instructions

Requirements

  • C++23 Toolchain (tested on gcc/clang)
  • CMake
  • Ninja (optional, for faster builds)
  • Just (optional, for more convenient running of builds/tests)
  • Python (optional, for testing with RISCOF)

Build

cmake -B build && cmake --build build

Faster builds with Ninja

cmake -B build -GNinja && cmake --build build

Running the Test Suite

ctest --test-dir ./build

With Just:

just build
just test

Running The Official Test Suite

cd test/
python -m venv venv
. ./venv/bin/activate
pip install riscof
./run.sh

Developer Resources

Building a Crosscompiler for RV64I

git clone --depth 1 https://github.com/riscv-collab/riscv-gnu-toolchain.git
./configure --prefix=<your_prefix> --with-arch=rv64i --with-abi=lp64
make -j$(nproc)

About

RV64I userspace emulator

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors