RISC-V Instruction Set Manual - with Sail code!

June 30, 2026 ยท View on GitHub

This is a modified version of the RISC-V ISA manual that has been updated to include Sail code from the official riscv-sail model. It is kept up-to-date with the upstream ISA manual by automatically pulling main every night.

View the manual here.

To help adding more Sail snippets:

  1. Find a place in the manual to add a Sail snippet or replace a hard-coded one.
  2. Delete the hard-coded version e.g.
Operation::
[source,sail]
--
function clause execute (SM3P0(rs1, rd)) = {
  let r1     : bits(32) = X(rs1)[31..0];
  let result : bits(32) =  r1 ^ rol32(r1,  9) ^ rol32(r1, 17);
  X(rd) = EXTS(result);
  RETIRE_SUCCESS
}
--
  1. Change it to something like this:
Operation::
+
sail::execute[clause="SM3P0(_, _)",part=body,unindent]
  1. Build the manual make build-html and check it looks good.

  2. Make a merge request to this repo (not the upstream one!) targetting the sail branch.

Original README follows.


RISC-V Instruction Set Manual

RISC-V ISA Build

This repository contains the source files for the RISC-V Instruction Set Manual.

This work is licensed under a Creative Commons Attribution 4.0 International License. See the LICENSE file for details.

The RISC-V Instruction Set Manual is organized into the following volumes:

  • Volume I: Unprivileged Architecture
  • Volume II: Privileged Architecture
  • Volume III: Profiles

The preface of each volume indicates the version of each standard that has been formally ratified by RISC-V International.

Official and Draft Versions

The canonical list of open-source RISC-V implementations' marchid CSR values is available in the marchid.md file.

Contributing

See CONTRIBUTING.md for setup, build instructions, and contribution guidelines. If you would like to contribute to this documentation, please refer to the Documentation Developer's Guide.

The recommended method for building the PDF files is to use the Docker Image, as described in the RISC-V Docs Base Container Image repository.

Alternative build methods, such as local builds and GitHub Action builds, are also available and described in the Documentation Developer's Guide.

Images not rendered for EPUB files

If the eBook reader does not support embedded images, uncomment :data-uri: line in src/riscv-spec.adoc.

Known devices that cannot handle embedded images

  • PocketBook InkPad 3

Repo Activity

Alt