Cade Andgreg's Risc-V Emulator
CARVE (Cade Andgreg’s Risc-V Emulator, carve.cade.site) is a project developed under Dr. Marz. CARVE is deployable as a web application, and is hosted at carve.cade.site. It has been tested with many platforms, and relies only on a modern web browser with a modern JavaScript engine and WASM support.
This section is not relevant for most people — it doesn’t need to be built by end users. But, if you want to build a custom version, or you’re writing the project, this is for you.
You should install the Emscripten SDK. Before you run any commands below, you’ll probably have to activate it:
$ source "/path/to/emsdk/emsdk_env.sh"
(replacing /path/to
with the path to your Emscripten SDK)
Now, to build everything, run:
$ make
You’ll need Jekyll/Ruby installed. You can google how to do that.
To serve, run bundle exec jekyll serve
(in the docs
folder)
Inside the docs
folder, run bundle exec jekyll build
, which will populate _site
with the full static site
To add an instruction, you need to do these steps:
tools/riscvdata.py
, within one of the extensions (for example, RV32I
). This should be a tuple containing (name, kind, opcode, f3, f7)
, modify it to match the new instructionsrc/impl
, for example, src/impl/RV32I.cc
), as well as in the main header (src/carve.hh
)make update
(or whatever make
command you wish). The relevant files will be updated if the data changes, or their generator scripts changeIf you want to add an instruction of a new type, you will have to implement that type on your own