Description
Is your feature request related to a problem? Please describe.
There are many cases where a CSR field is simply an alias of field in another CSR (search for "alias" in the CSR definitions). Currently, the alias field simply serves as a pointer from one bit to another, and all other attributes associated with the field must be duplicated for the alias. For example, the MBE field in
riscv-unified-db/arch/csr/mstatus.yaml
Lines 88 to 108 in 808077a
and it's alias in
riscv-unified-db/arch/csr/mstatush.yaml
Lines 52 to 58 in 808077a
Fields which are not location-specific ("type()", "reset_value()") are duplicated, and "description" is only a reference. Since these fields can be non-trivial, as seen above, duplication can be error-prone.
Describe the solution you'd like
Fields which are not location-specific (or perhaps fields which are not overridden by the alias definition) should be inherited from the aliased field.