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

Plans for SAIL code integration? #1369

Open
camel-cdr opened this issue Apr 28, 2024 · 3 comments
Open

Plans for SAIL code integration? #1369

camel-cdr opened this issue Apr 28, 2024 · 3 comments

Comments

@camel-cdr
Copy link

camel-cdr commented Apr 28, 2024

A recent article raised the issue that the manual would benefit a lot from having the relevant SAIL code included with the definition of instructions: https://alastairreid.github.io/riscv-spec-issues/

This is already the case for part of the latest draft release, e.g. the bitmanip code and zicond have relevant SAIL definitions.

Notably the R32I/RV64I base instruction sets currently don't have SAIL definitions, I would've expected those to be added first, is this still planned in the future?

Additionally, I'd like to point out a naming discrepancy. Chapter 29 (bitmanip) titles the SAIL code "Operation", while Chapter 12 (zicond) titles it "SAIL code".

I personally much prefer the "SAIL code" title, because it's a lot easier to search for.

Are there plans to keep the SAIL code in the manual synchronised with the SAIL model?

@wmat
Copy link
Collaborator

wmat commented Apr 29, 2024

This would be best addressed on a branch with a Pull Request. That way the relevant folks can review the change and accept it or not.

And yes, there are plans to synchronize the SAIL code in the spec with the SAIL model. It's a work in progress.

@sequencer
Copy link

I wonder how to define those undefined behavior in sail for the ISA Manual? SAIL is more like to an implementation to the RISC-V ISA, is there any plan to metaprogramming it to adapt some different uArch?

@Timmmm
Copy link
Contributor

Timmmm commented Jan 11, 2025

We are now doing this for the CHERI spec. Search for RETIRE_SUCCESS here:

https://riscv.github.io/riscv-cheri/

It doesn't have the latest sail-asciidoctor so no syntax highlighting or hyperlinks to the actual code. The CHERI code is quite complex so some of the definitions are kind of useless without hyperlinks because they just call a function that does all of the work, but some are useful. I think that issue is less common in the base RISC-V code.

It works by curling the JSON file from GitHub Releases in the Makefile, which seems to work pretty well and avoids any extra dependencies.

I will make a PR to add the same system here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants