The Best RISC-V Instruction Set Reference Manual
…or it will be eventually, we hope! We're building Aa modern, navigable, one-page-per-instruction reference for the RISC-V ISA — built based on on the RISC-V Unified Database (UDB)RISC-V andUnified Database (UDB). It's a static website generated automatically using Eleventy.
Overview
The RISC-V Instruction Set Reference aims to make the official RISC-V documentation easier to navigate and more approachable.
This project generates one page per instruction, showing:
- Assembly syntax
- Encoding format and diagram
- Opcode and function bits
- Instruction type (R/I/S/etc.)
- Availability (RV32, RV64)
- Short description or spec link
Project Structure
| Directory | Description |
|---|---|
src/ | Templates and data generation scripts |
riscv-unified-db/ | YAML data from the RISC-V Unified Database (UDB) |
_site/ | Generated HTML site (static and generated when you run npm run build) |
While the official RISC-V reference materials are comprehensive, they are hard to navigate. The details for each instruction are spread across multiple sections. Especially in an educational context, it can be cumbersome to find all the information you need about any specific instruction.
The idea in this reference is to generate one page per instruction, including things like the mnemonics and assembly syntax; the instruction encoding; some natural-language documentation; and so on.
Setup Instructions
This project uses Node.js and npm, so install those first.
Get the source code:
git clone [email protected]:cucapra/rvref.git cd rvref #project dependencies npm install @11ty/eleventy --save-dev npm install git submodule update --init --recursive #adds the risc-unified-db submodule npm run build #to generate static html files in _site npm run serve #see site layout w/ dev server http://localhost:8080 git submodule update --init
That last step clones the riscv-unified-db repository as a submodule. Notice that we don't use the --recursive flag; the UDB repository has some large submodules of its own that we don't need for this project.
Then, install the Node dependencies and build the static HTML files:
npm install npm run build
Or, run a development server to preview the site:
npm run serve
0 commit comments