Coder Social home page Coder Social logo

emulate-risc-v's Introduction

emulate-risc-v : A very simple RISC-V ISA emulator

(c) 2018 Mike Field

Currently this is a very simple emulator for the RV32I instruction set.

It is not meant to be high perfromance or anything special, just something that I can use to get to know RISC-V 32-bt instructions, and can be used to run programs binaries with GCC's RISC-V

You can see how the memory map is layed out in memorymap.c. When a ROM or RAM memory region is added to the memory map it attempts to load the contents from a file called "rom_[start_address_in_hex].img" (e.g. "rom_20400000.img"). These can be created by running objcopy on RISC-V ELF executable.

The interface uses ncurses, and currently has the following commands:

    r    Toggle the CPU running flag
    R    Reset the CPU
  SPACE  Single step  
    q    Quit

Your terminal has to have colour support, and if you use WIndows Subsystem for Linux make sure that your terminal type is set to "ansi.sys", as the WSL Terminfo database has a bug in it.

Building:

Just run 'make'. To run, type "./main"

emulate-risc-v's People

Contributors

hamsternz avatar

Stargazers

Carlos Venegas Arrabé avatar André M. avatar HAIZAKURA avatar Wenting Zhang avatar  avatar David Dias avatar  avatar Timothy avatar Ahmet ÖZGÜRSÜN avatar  avatar Furkan Tokaç avatar Benjamin Herrera avatar k-sva avatar hiromasa avatar Jeff Carpenter avatar Carlos Eduardo Parra avatar rudi ;-) avatar Ryan Chang avatar Jean-Christophe Le Lann avatar  avatar Alfonso Luna avatar Márk Bartos avatar Darío Clavijo avatar Jesús Leganés-Combarro avatar Aliaksei Chapyzhenka avatar William Cleveland avatar Christopher J Keller avatar Mia Jasmin Bautista Sanchez avatar Denis Denisov avatar Juan Gonzalez-Gomez avatar  avatar Matt avatar Colin Ian King avatar Will Green avatar Paolo Pisati avatar Arto Bendiken avatar

Watchers

Arto Bendiken avatar James Cloos avatar  avatar Paolo Pisati avatar  avatar  avatar  avatar  avatar

Forkers

colinianking

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.