Code Monkey home page Code Monkey logo

riscv_r2vm's Introduction

R2VM

R2VM is the Rust for RISC-V Virtual Machine.

R2VM is a full-system, multi-core, cycle-level simulator, with binary translation to provide high performance. It can run RISC-V supervisor and userspace software on AMD64 Linux machines.

Citation

Some approaches of this simulator are described in our paper.

If you would like to cite this work, you may cite as

Xuan Guo and Robert Mullins. 2020. Accelerate Cycle-Level Full-System Simulation of Multi-Core RISC-V Systems with Binary Translation. In Fourth Workshop on Computer Architecture Research with RISC-V

Or use the following bibtex snippet:

@inproceedings{guo2020r2vm,
  title={Accelerate Cycle-Level Full-System Simulation of Multi-Core RISC-V Systems with Binary Translation},
  author={Guo, Xuan and Mullins, Robert},
  year={2020},
  booktitle={Fourth Workshop on Computer Architecture Research with RISC-V}
}

Installation

R2VM is written in Rust. To compile it, you will need to install Rust first, then:

git clone https://github.com/nbdd0121/r2vm.git
cd rv2m
cargo build --release

You can run R2VM with cargo run --release or locate the compiled binary at target/release/r2vm.

If you don't want to modify code, you can also use cargo install --git https://github.com/nbdd0121/r2vm.git to install it directly.

Configuration

To run userspace programs, you can simply run r2vm [name of binary]. To run kernels such as Linux, you will need to use a configuration file. Configuration must be in toml format.

Here is an example configuration file:

core = 2
memory = 1024

kernel = "linux/vmlinux"
cmdline = "console=hvc0 rw root=/dev/vda"

# Turn on RTC. You'll need to enable Xilinx MPSoC RTC driver in Linux
[rtc]

[console]
type = "virtio"

# Create a block device
[[drive]]
path = "rootfs.img"

# Create a RNG device. Important to speed up Linux booting.
[[random]]
type = "os"

# Create a 9p sharing
[[share]]
tag = "share"
path = "share"

[[network]]
# Forward port 22222 to the guest's SSH port
[[network.forward]]
protocol = "tcp"
host_port = 22222
guest_port = 22

Use r2vm config.toml to run R2VM with supervisor software. For detailed possible configuration options, check src/config.rs.

riscv_r2vm's People

Contributors

nbdd0121 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.