E5FB
Skip to content

Timmmm/riscv-isa-manual

 
 

Repository files navigation

RISC-V Instruction Set Manual - with Sail code!

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, which consists of the Unprivileged and Privileged volumes. The preface of each document indicates the version of each standard that has been formally ratified by RISC-V International.

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

Official and Draft Versions

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

Contributing

If you would like to contribute to this documentation, please refer to the Documentation 771C 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: lines in src/riscv-privileged.adoc and src/riscv-unprivileged.adoc.

Known devices that cannot handle embedded images

  • PocketBook InkPad 3

Repo Activity

Alt

About

RISC-V Instruction Set Manual - With Sail

Resources

License

Stars

Watchers

Forks

Contributors

Languages

  • TeX 62.5%
  • Assembly 12.9%
  • CSS 11.9%
  • Makefile 8.9%
  • HTML 3.8%
0