5. YAML Specifications¶
This section provides details of the Group spec YAML file that need to be provided by the user.
5.1. Group yaml dependencies¶
All the csrs can be grouped together in any form, as per the requirements of the user. But there are some special cases of dependencies , shadows and action methods for subfields.
CSRS |
Depends on |
---|---|
SHADOW CSRS
|
|
SUB-FIELD DEPENDENCIES
|
|
MACHINE COUNTERS |
Corresponding Machine event csr and machine countinhibit csr |
PHYSICAL MEMORY PROTECTION ADDRESS |
Corresponding Physical memory protection configuration sub-field csrs |
- NOTE
The above dependencies can be understood as follows:
It is recommended that the csr and the dependent csr are put in the same group
If not, csrbox takes care by extracting the dependent csrs using special action methods
The shadow csrs are completely dependent on their machine counterpart and are not instantiated as separate csrs themselves.
Flags like frm, fflags and fcsr depend on the machine status csr and its subfield fs bits. Make sure to keep the flags and mstatus in the same group.
The pmpaddr csrs depend on the corresponding sub-fields of the pmp configuration csrs.
5.1.1. Constraints¶
Mhpmcounter, cycle, instret all have upper 32 bit ‘h’ counterparts that have to be placed in the same group, for xlen=32. The upper and lower counterparts have to be present when invkoing the respective counter, cycle or instret.
Csrs must not be repeated in the same group
No group should be filled with NULL elements of csrs.
Make sure the csrs do not get repeated in several groups
Make sure to follow the spacing formats of yaml
Make sure to keep all the supervisor csr and their machine counterparts in the same group.