Coder Social home page Coder Social logo

gmh5225 / rvemu-for-book Goto Github PK

View Code? Open in Web Editor NEW

This project forked from d0iasm/rvemu-for-book

0.0 1.0 0.0 455 KB

Reference implementation for the book "Writing a RISC-V Emulator in Rust".

Home Page: http://book.rvemu.app/

License: MIT License

Shell 0.03% C 0.14% Assembly 0.53% Rust 99.09% Makefile 0.21%

rvemu-for-book's Introduction

rvemu-for-book

Reference implementation of the book, Writing a RISC-V Emulator from Scratch in 10 Steps. The goal of this code and the book is runnning xv6 in our emulator.

This is based on original RISC-V emulator rvemu in Rust.

How to run xv6

$ cd step10 // move to the step10 directory
$ cargo run ./xv6-kernel.bin ./xv6-fs.img

demo.png

Step to implement a RISC-V emulator

See https://book.rvemu.app/

  • Step 1: Setup and Implement Two Instructions
  • Step 2: RV64I Base Integer Instruction Set
  • Step 3: Control and Status Registers
  • Step 4: Privileged Instruction Set
  • Step 5: Exceptions
  • Step 6: UART (a universal asynchronous receiver-transmitter)
  • Step 7: PLIC (a platform-level interrupt controller) and CLINT (a core-local interrupter)
  • Step 8: Interrupts
  • Step 9: Virtio
  • Step 10: Virtual Memory System

Each step has a diff file generated by diff -x target -r step<previous> step<current> > diff_<previous>_<current>.

rvemu-for-book's People

Contributors

d0iasm avatar banyc 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.