Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include SAIL snippets into the specification #362

Open
andresag01 opened this issue Sep 12, 2024 · 7 comments
Open

Include SAIL snippets into the specification #362

andresag01 opened this issue Sep 12, 2024 · 7 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@andresag01
Copy link
Collaborator

andresag01 commented Sep 12, 2024

This includes the snippets into the instruction listings as well as the capability description chapter.

Currently waiting for a publicly available, up to date SAIL model being released.

@andresag01 andresag01 added documentation Improvements or additions to documentation enhancement New feature or request labels Sep 12, 2024
@francislaus
Copy link
Contributor

Can we (and should we) pick up a dependency to the Sail model for that? Would it be possible to automatically pull in the relevant lines from the Sail model? @Timmmm @PeterRugg

@wmat
Copy link
Contributor

wmat commented Dec 12, 2024 via email

@Timmmm
Copy link
Contributor

Timmmm commented Dec 13, 2024

I did set this up when the spec was in Codasip but we removed it when it was moved to GitHub since the Sail code wasn't open at the time. I'll see if I can resurrect it.

The big question is how do you get the JSON file. It's very big so I don't think you just want to add it to Git. But adding Sail compilation to the build process is also not great (although it's a lot better since we made the Sail binary release). In Codasip we had a cache on a web server which worked pretty well. How do people feel about using GitHub releases for that?

So every push (or maybe tag) in the Sail repo would generate the JSON and add it to a GitHub release, and then this repo would just point to the URL and download it.

We'll have to answer this question for riscv-isa-manual too and I think this repo could serve as a good demonstrator.

@wmat
Copy link
Contributor

wmat commented Dec 16, 2024

For my testing purposes on riscv-isa-manual I've been generating the index at the top of tree of the sail repository and adding it directly into the repo and referencing it with an AsciiDoc attribute in the document header (riscv-unprivileged.adoc) with :sail-doc: src/sail-index/riscv_RV64.json.

@Timmmm
Copy link
Contributor

Timmmm commented Dec 16, 2024

Yeah the issue is it's 4.5 MB (3.1 MB minified). Feels a bit much for a file that we'd continually update? Though I guess it probably does diff pretty well at least.

@Timmmm
Copy link
Contributor

Timmmm commented Dec 19, 2024

Ok I have update the Sail repo to have a Github workflow to generate the JSON and I have made a release of it (making a release is a manual process currently but I can automate it in future).

Next step is to update this repo to curl https://github.com/CHERI-Alliance/sail-cheri-riscv/releases/download/2024-12-19/riscv_RV64.json and add the asciidoctor-sail stuff. I'll have a go tomorrow.

@Timmmm
Copy link
Contributor

Timmmm commented Dec 20, 2024

PR here: #498
(on top of #497)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants