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

Spec does not define "should" #1144

Open
Timmmm opened this issue Oct 9, 2023 · 1 comment
Open

Spec does not define "should" #1144

Timmmm opened this issue Oct 9, 2023 · 1 comment

Comments

@Timmmm
Copy link
Contributor

Timmmm commented Oct 9, 2023

Most formal specs I've read define words like "should", "must", "may", up front, but the RISC-V spec does not appear to. Despite that "should" appears dozens of times, often in places where it looks like they really meant "must", e.g.

In systems without S-mode, the medeleg and mideleg registers should not exist.

An Exception Code of 0 is reserved to mean "unknown cause" and implementations that do not distinguish sources of NMIs via the mcause register should return 0 in the Exception Code.

I think it would be helpful to audit those and probably change them to must.

Ideally adopt RFC2119 definitions and use them.

@ethindp
Copy link

ethindp commented Dec 2, 2023

It might be worth adopting RFC 2119 plus the RFC 8174 updates, requiring that those words appear in capitals to have the intended effect.

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

2 participants