You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
0 commit comments