Skip to content

This is a simple attempt to create a RISC-V emulator in Rust with the goal of understanding the RISC-V architecture and it application in zkVM.

Notifications You must be signed in to change notification settings

developeruche/riscv-emulator

Repository files navigation

RISV-V Emulator

This is a simple attempt to create a RISC-V emulator in Rust with the goal of understanding the RISC-V architecture and it application in zkVM. The emulator is based on the RV32I base integer instruction set. The emulator is capable of running simple programs written in RISC-V assembly language.

Usage

This emualtator is desgined to be modular and easy to use. The emulator can be used as a library in other projects or as a standalone application.

As a binary

  1. Clone the repository
  2. Run cargo build
  3. Run cargo run /path/to/elf/file example: cargo run fibonacci, this will run the fibonacci program in the root directory.

Resourses

Understanding RISC-V architecture and other important components

  1. Deep dive into RISC-V architecture
  2. Focused on instruction decoding
  3. RISC-VIM32 Card
  4. RISC V wiki
  5. Executable and Linkable Format

Acknowledgements

  1. SP1: The ELF parser was obtained from the SP1 project.
  2. rrs: RRS inspired the design of the emulator.

About

This is a simple attempt to create a RISC-V emulator in Rust with the goal of understanding the RISC-V architecture and it application in zkVM.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages