I believe that either output-mapping or input-mapping works.
When a CSR write of some other CSR causes this CSR field to have an illegal value), then
- if output mapped the value of the CSR field is mapped to a legal value when used, either when explicitly read, or implicitly read by HW.
- else a write of a CSR with output dependencies on WARL fields will cause *all* dependent CSR fields to be written with a legal value at the same time.
As mentioned, they are not equivalent and when a field with an output dependency is changed to make what originally had been legal to be legal again,
(I hope that can be parsed) then either
- the original explicitly written value appears (if output mapped),
- the current value is unchanged (if input mapped)(assumes the current value is legal regardless of the written field) ,
- some other nondeterministic value appears on a read (e.g. if the entire register disappears, like when MISA.S is cleared and then set).
In order to test this for compatibility, we need to know - for *every* WARL field with a dependency, which of these options is implemented, along with the illegal->legal mappings qre implemented for each and every WARL field for each value of the dependency field.
The arch-test SIG knew that we can't test for any arbitrary mapping (since it isn't architectural),
so it has defined a set of mappings that can be configured in the YAML, and will only test those.
Any vendor that fails a test because they implement something different will need a waiver from TSC to be able to claim compatibility.
(and, in general, recommend output mapping for dependencies, and ignore write for non-dependent mappings.)