rv

command module
v0.0.0-...-981b337 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 26, 2022 License: MIT Imports: 9 Imported by: 0

README

rv

rv is a 64-bit RISC-V emulator written in Go.

Limitation

  • 32-bit, 128-bit aren't supported.
    • Only RV39 is supported as memory translation.
  • Multi-core emulation isn't supported.
  • release/acquire bits are not handled in AMO instructions.
    • rv currently emulates only one hart, so this is not really a problem.
  • fence instructions do nothing.
    • rv currently does not apply any optimizations and no out-of-order execution occurs, so it should be fine.

Installation

go install github.com/hidetatz/rv@latest

Usage

Pass an ELF program to run to rv.

rv -p ./hello

Debug log will be enabled if -d option is passed (note that this dumps all the executed instructions and some other information).

Test

rv uses riscv-tests as its E2E test. You can run that by following command:

go test -v ./...

Supported instructions

  • RV64G ISA
    • RV64I
    • RV64M
    • RV64A
    • RV64F
    • RV64D
    • Zifencei
    • Zicsr
  • RV64C ISA
  • Privileged ISA

For the full list of the implemented instructions, see instruction.go.

LICENSE

MIT

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL