generated from riscv/docs-spec-template
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add initial support for Sail snippets
This updates the Makefile to download `riscv_RV64.json` and then add a couple of example Sail snippets to the document. There are some caveats: * No syntax highlighting or hyperlinking in the code. Alasdair demonstrated this recently but I don't know if he pushed the feature to asciidoctor-sail (or maybe the version in the Docker image is too old). * There's an encoding issue with the JSON. I temporarily worked around it with iconv. In future I will probably just remove the non-ASCII characters from the Sail code. * The Sail code is not really written with inclusion in documentation in mind. For example the scaddr code basically calls another function which you can't see in the docs, so it's kind of useless currently. There are a few ways I can think of to fix the last point. 1. Alasdair has some fancy system to automatically modify the Sail code that is generated. He demonstrated it before to split up `execute` clauses that switch on a union, but I think we could also do things like inlining functions. 2. The output with hyperlinks will be way more useful because you can just click on the function to see its source. 3. We could probably rewrite the code a bit to focus more on readability in a spec and less on good software development practices. For example use raw bit values instead of enums.
- Loading branch information
Showing
5 changed files
with
24 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
https://github.com/CHERI-Alliance/sail-cheri-riscv/releases/download/2024-12-19/riscv_RV64.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,6 +34,4 @@ Prerequisites:: | |
|
||
Operation:: | ||
+ | ||
-- | ||
TODO | ||
-- | ||
sail::execute[clause="SCADDR(_, _, _)",part=body,unindent] |