Code Monkey home page Code Monkey logo

terminus's Introduction

terminus

A RISC-V instruction set simulator in Rust.

Rust Version Requirement

>= 1.56(edition2021)

2018 edition is move to 'eidtion2018' branch

Boot Linux in 20s

Boot Linux in 20s

Getting Started

  git clone https://github.com/shady831213/terminus
  cd terminus
  cargo update -p terminus-spaceport
  cargo update -p terminus-vault
  cargo install --path .
  terminus examples/linux/image/br-5-4
  //or
  cd examples/linux/image
  tar -zxvf rootfs.ext4.gz
  cd -
  terminus examples/linux/image/br-5-4.disk --image=examples/linux/image/rootfs.ext4

Multi-core Support

Specify the -p option to configure the number of RISC-V HARTs (HARdware Threads):

  terminus examples/linux/image/br-5-4 -p 4
  //booting...
  //booting...
  //booting...
  //...
  buildroot login: root
  //password is terminus
  Password:
  # cat /proc/cpuinfo

  processor	: 0
  hart		: 0
  mmu		: sv48

  processor	: 1
  hart		: 1
  mmu		: sv48

  processor	: 2
  hart		: 2
  mmu		: sv48

  processor	: 3
  hart		: 3
  mmu		: sv48

Networking Support

Run the setup_tuntap.sh script to create a simulated network interface and networking bridge.

  terminus examples/linux/image/br-5-4.disk --image=examples/linux/image/rootfs.ext4 --net=tap0
  //booting...
  //booting...
  //booting...
  //...
  buildroot login: root
  //password is terminus
  Password:
  //config guset according to help message.
  # ping -c 1 www.baidu.com

then you will see:

PING www.baidu.com (103.235.47.103): 56 data bytes
64 bytes from 103.235.47.103: seq=0 ttl=46 time=17.685 ms

--- www.baidu.com ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max = 17.685/17.685/17.685 ms

Display Support

Terminus with display supported needs the "sdl" operating system packages and related dependencies.

  // Example for  Ubuntu
  sudo apt-get install libsdl2-dev
  git clone https://github.com/shady831213/terminus
  cd terminus
  cargo update -p terminus-spaceport
  cargo install --features="sdl" --path .

  cd examples/linux/image
  tar -zxvf rootfs.ext4.gz
  cd -
  terminus examples/linux/image/br-5-4.disk --image=examples/linux/image/rootfs.ext4 --boot_args="root=/dev/vda console=tty0 earlycon=sbi" --display

Cosimulation with HDL

Please refer to terminus_cosim.

RoadMap

  • RV32/64I
  • MADFC
  • M/S/U privilege
  • Pass all riscv_tests
  • CLINT and Timer
  • HTIF console
  • FDT generation
  • Multi Cores
  • Boot Linux
  • Emu mode binary
  • Boot Linux(smp)
  • Publish to crate.io
  • PLIC
  • VirtIO console
  • VirtIO disk
  • VirtIO network
  • framebuffer
  • VirtIO keyboard
  • VirtIO mouse
  • Cosimulation with HDL
  • debug mode
  • other extensions(b, v ...)

terminus's People

Contributors

dependabot[bot] avatar jamesgraves avatar shady831213 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

terminus's Issues

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.