riscv / riscv-aia

https://jira.riscv.org/browse/RVG-59
Creative Commons Attribution 4.0 International
81 stars 19 forks source link

'UNSPECIFIED' Value for 'hideleg[n]', During Read-Only to Writable transition. #41

Closed vithursons closed 1 year ago

vithursons commented 1 year ago

For 13 <=n <= 63, value of hideleg/h[n] may become writable from being read only zero, when mvien/h[n] or mideleg/h[n] transitions from zero to one. Should the spec include a sentence saying value of hideleg/h[n] becomes UNSPECIFIED when hideleg/h[n] becomes writable?

jhauser-us commented 1 year ago

I believe this situation is already covered by the RV Privileged ISA, Section 2.4, "CSR Field Modulation". Note the first comment in that section:

As a special case of this rule, the value written to one CSR may control whether a field of a second CSR is writable (with multiple legal values) or is read-only. When a write to the controlling CSR causes the second CSR's field to change from previously read-only to now writable, that field immediately gets an UNSPECIFIED but legal value, unless specified otherwise.

vithursons commented 1 year ago

I believe this situation is already covered by the RV Privileged ISA, Section 2.4, "CSR Field Modulation". Note the first comment in that section:

As a special case of this rule, the value written to one CSR may control whether a field of a second CSR is writable (with multiple legal values) or is read-only. When a write to the controlling CSR causes the second CSR's field to change from previously read-only to now writable, that field immediately gets an UNSPECIFIED but legal value, unless specified otherwise.

thanks, that should be okay.