riscv-isa-manual
riscv-isa-manual copied to clipboard
Spec does not define "should"
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.
It might be worth adopting RFC 2119 plus the RFC 8174 updates, requiring that those words appear in capitals to have the intended effect.