The goal of the RISC-V Unified Database (UnifiedDB/UDB) is to hold all the information needed to describe RISC-V, including a list of extensions, instruction specifications, CSR specifications, and documentation prose. The vision is that anything one would need for RISC-V can be generated from the information in this repository.
In addition to storing the data, UnifiedDB also provides many tools that use the data to generate artifacts such as specification documents, toolchain inputs, and simulators.
UnifiedDB is an open-source, worldwide project. Contributors do not need to be members of RISC-V International (RVI), though maintainers discuss strategic direction and coordinate with the RISC-V standard through the UnifiedDB Special Interest Group (UDB SIG) at RVI.
The following directories contain information relevant to most users of UnifiedDB
-
arch
: The RISC-V standard -
arch_overlay
: Non-standard RISC-V extensions -
cfgs
: Configurations used by backends to customize generated outputs -
schemas
: Data schemas for the content inarch
Additionally, developers will be interested in the following:
-
backends
: Tools to generate artifacts (documents, simulators, etc.) from UDB data -
bin
: Wrapper scripts to run commands within the container environment -
lib
: Scripts (mostly Ruby) to read/interact with UDB data
UnifiedDB tools are set up to run in a container. Both Docker (any version) and Singularity/Apptainer (Singularity CE >= 3.3
or Apptainer >= 1.0
) are supported.
You can also leverage devcontainers to run the RISC-V Unified Database.
This is especially useful when using Visual Studio Code or GitHub codespaces, as it will setup up your IDE environment for you.
To run the devcontainer locally, you will need to have Docker installed.
With Docker installed, install the Dev Containers extension in VS Code.
You can then run Dev Containers: Open Folder in Container…
from the Command Palette (Ctrl+Shift+P) and select the folder with this repository.
UnifiedDB uses Rake, a Ruby-based Makefile alternative, to manage tasks.
For convenience, running Rake inside the container is encapsulated in do
. For example:
./do --tasks # list all documented tasks
./do --desc gen:html_manual # describe the 'gen:html_manual' task in more detail
./do test:smoke # run smoke tests
# generate all versions of ISA manual, as an Antora static website
./do gen:html_manual MANUAL_NAME=isa VERSIONS=all
# generate an implementation-specific spec for the 'example_rv64_with_overlay' config
./do gen:arch[example_rv64_with_overlay]