Coder Social home page Coder Social logo

barv's Introduction

barv

A rv32i virtual machine, implemented in Bash.

Dependency

Bash and coreutils. I did this mess on Alpine Linux edge with busybox and bash 5.2.26 and everything worked well.

Usage

 $ barv.sh BINARY

Memory Map and Boot Up

The binary specified as argument will be loaded into memory, starting from 0x00000000. PC is set to 0 when the virtual machine starts.

Environment Call

Some functionalities are provided through ecall. a0 contains ecall number.

ecall Number

  • 0: system shutdown (exit the VM)
  • 1: register dump (dump out a1)
  • 2: ASCII putchar (character is stored in a1)

ebreak could be used to print a snapshot of registers.

Tests

barv has passed a port of riscv-tests. But there are still bugs I think.

barv's People

Contributors

ziyao233 avatar

Stargazers

Peerin avatar SZTK avatar Sora Shu avatar Eason Wang avatar Damien avatar Vanilla avatar Jiongjia Lu avatar Yip Coekjan avatar ValK avatar Yiming Liu avatar Eric Long avatar purofle avatar  avatar cubercsl avatar Yangyu Chen avatar Cheng Li avatar Apachiww 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.