Revision history   OpenPOWER Library

 2.5. References to Registers, Fields, and Bits

 Registers are referred to by their full name or by their short name (also called the register mnemonic). Fields are referred to by their field name or by their bit position. The following table describes how registers, fields, and bit ranges are referred to in this document and provides examples.

 

Table 2.1. Register References

Type of Reference

Format

Example

 Reference to a specific register and a specific field using the register short name and the field name

 Register_Short_Name[Field_Name]

 MSR[R]

 Reference to a field using the field name

 [Field_Name]

 [R]

 Reference to a specific register and to multiple fields using the register short name and the field names

 Register_Short_Name[Field_Name1, Field_Name2]

 MSR[FE0, FE1]

 Reference to a specific register and to multiple fields using the register short name and the bit positions.

 Register_Short_Name[Bit_Number, Bit_Number]

 MSR[52, 55]

 Reference to a specific register and to a field using the register short name and the bit position or the bit range.

 Register_Short_Name[Bit_Number]

 MSR[52]

 Register_Short_Name[Starting_Bit_Number:Ending_Bit_Number]

 MSR[39:44]

 A field name followed by an equal sign (=) and a value indicates the value for that field.

 Register_Short_Name[Field_Name]= n

 MSR[FE0] = '1'

 MSR[FE] = x'1'

 Register_Short_Name[Bit_Number]= n

 MSR[52] = '0'

 MSR[52] = x'0'

 Register_Short_Name[Starting_Bit_Number:Ending_Bit_Number]= n

 MSR[39:43] = '10010'

 MSR[39:43] = x'11'

Where n is the binary or hexadecimal value for the field or bits specified in the brackets.  



loading table of contents...