riscv-isa-manual icon indicating copy to clipboard operation
riscv-isa-manual copied to clipboard

Spec does not define "should"

Open Timmmm opened this issue 2 years ago • 1 comments

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.

Timmmm avatar Oct 09 '23 14:10 Timmmm

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

ethindp avatar Dec 02 '23 07:12 ethindp