- examples/ contains human-readable examples.
- lib/ contains what you need to generate a C library that can parse the ASN.1 schema.
- schema/ contains the ASN.1 schema used that describes the configuration structure format.
- rvcs.py is a tool to convert between various human-readable formats and ASN.1 formats.
This figure explains how these various parts fit together:
- Update the submodules:
git submodule init && git submodule update
- Follow the local build instructions.
- Run
make
- Run
pip3 install -r requirements.txt
- Run
make test
./rvcs.py convert examples/example.yaml example.uper
This section describes as concisely as possible how to add information for your extension to the configuration structure. Many details will be omitted, but for simple use cases that should be fine.
- Make a list of any implementation decision your specification explicitly allows that affects what software can do.
- If the list is long, divide the decisions into primary, secondary, and complete decisions. Primary information is only discoverable by reading the configuration structure, or by running a significant amount of code. Secondary information is discoverable but not straightforward (e.g. WARL register). Anything else goes in the complete section.
- Get ready to make a pull request to https://github.com/riscv/configuration-structure, e.g. by cloning the repo.
- Write an ASN.1 description of this information. ASN.1 allows for all kinds of complexity, but for your purposes simply reading one of extension .asn files under the schema/ directory should be all you need. For a simple example, look at zjpm. For a complex example look at debug.
- Following those examples, make a new file for your extension. Then edit configuration-structure.asn, adding to the IMPORTS and adding appropriate reference in the Configuration and Harts section. (You might only need one of those.)
- Run
make test
at the top level, and make sure no errors are reported. - Make a pull request against the github repo.
If you have any questions during this process, you might find the answers in the spec. Otherwise, please contact us at [email protected].