|Home > Iris APIs > Resources > Register fields, sub-registers, and register hierarchy|
You can represent register fields, sub-registers, and register hierarchies by using a dot as a hierarchy level separator, for example
Registers can be organized into groups. Group names are separated from register names by a dot, for example
MainGroup.CPSR.Z. The group name is not part of the register name. If a register
foo.bar exists in group
g, a register
foo should also be exposed in group
g. Clients must handle the case where
foo does not exist in
g gracefully, by treating
foo.bar as a top-level register, without a group. The hierarchy created using this notation should not have more than three levels, that is, with two dots in the name.
Organizing registers into groups and hierarchically within groups is different from organizing registers into a single hierarchy using hierarchical register names. Registers can be in more than one group, and groups are usually presented differently by the client.
As a guideline, a register hierarchy, using the resource name, should be used when registers are physically part of a parent register, while groups should be used when a set of registers belong semantically together.
Clients can display register groups as a linear non-hierarchical list to choose from. Clients should sort this list alphabetically.