AARCHMRS Schema 2.5.3

↚ Home

Types.RegisterType object

The Types.RegisterType schema provides a mechanism to reference a register. If you wish to reference a Field within a register, you should instead use Types.Field.

definition

Definitions Type Description
instance
oneOf [
string
null
]

The instance of the register being referred to. If it is null then the instance is the same as the register name.

oneOf string

Pattern
^[A-Za-z][A-Za-z0-9_]*(?:<[^>]+>)?[A-Za-z0-9_]*$

oneOf null

Examples
"REG0"
"REG<n>_EL1"
null
name
  • string

The name of the register being referred to.

Pattern
/^[A-Za-z][A-Za-z0-9_\s]*(?:<[^>]+>)?[A-Za-z0-9_]*$/
Examples
"REG0"
"REG<n>_EL1"
state

The register-state in which the register being referred will be accessed.

Enum
AArch32 AArch64 ext

object

Properties Type Description
_meta Meta
See Meta for more information.
_type
Enum
Types.RegisterType
value
  • object

This object holds a dictionary, defining the state, name and (optionally) instance, (optionally) slice properties, Where:

  • The state can be set to AArch32, AArch64 or ext (short for external).
  • The name is the register that is being referenced.
  • The instance (where applicable) is the instance of the register being referenced.
  • The slices (when not null) provides the bitstring slice of the full register reference.
Examples
{
    "state": "AArch64", 
    "name": "REG0"
}
{
    "state": "AArch32", 
    "name": "REG0", 
    "instance": "REG0_S", 
    "slices": [
        {
            "_type": "Range", 
            "start": 4, 
            "width": 1
        }
    ]
}
Additional Properties
Not Allowed
◊ Required
Properties marked with ◊ are required properties.
Examples
{
    "_type": "Types.RegisterType", 
    "value": {
        "state": "AArch64", 
        "name": "REG0"
    }
}
{
    "_type": "Types.RegisterType", 
    "value": {
        "state": "AArch32", 
        "name": "REGISTER", 
        "instance": "INSTANCE", 
        "slices": [
            {
                "_type": "Range", 
                "start": 4, 
                "width": 1
            }
        ]
    }
}

Schema http://json-schema.org/draft-04/schema#

{
  "title": "Types.RegisterType",
  "$schema": "http://json-schema.org/draft-04/schema#",
  "info": [
    [
      "The $(Types.RegisterType) schema provides a mechanism to reference a register.",
      "If you wish to reference a Field within a register, you should instead use $(Types.Field)."
    ]
  ],
  "definitions": {
    "state": {
      "info": [
        "The register-state in which the register being referred will be accessed."
      ],
      "enum": [
        "AArch32",
        "AArch64",
        "ext"
      ]
    },
    "name": {
      "info": [
        "The name of the register being referred to."
      ],
      "type": "string",
      "pattern": "^[A-Za-z][A-Za-z0-9_\\s]*(?:<[^>]+>)?[A-Za-z0-9_]*$",
      "examples": [
        "REG0",
        "REG_EL1"
      ]
    },
    "instance": {
      "oneOf": [
        {
          "type": "string",
          "pattern": "^[A-Za-z][A-Za-z0-9_]*(?:<[^>]+>)?[A-Za-z0-9_]*$"
        },
        {
          "type": "null"
        }
      ],
      "info": [
        "The instance of the register being referred to. If it is `null` then the instance is the same as the register name."
      ],
      "examples": [
        "REG0",
        "REG_EL1",
        null
      ]
    }
  },
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "_meta": {
      "$ref": "../Meta.json"
    },
    "_type": {
      "enum": [
        "Types.RegisterType"
      ]
    },
    "value": {
      "type": "object",
      "info": [
        [
          "This object holds a dictionary, defining the `state`, `name` and ",
          "(optionally) `instance`, (optionally) `slice` properties, Where:"
        ],
        [
          "  - The `state` can be set to `AArch32`, `AArch64` or `ext` (short for external).",
          "  - The `name` is the register that is being referenced.",
          "  - The `instance` (where applicable) is the instance of the register being referenced.",
          "  - The `slices` (when not `null`) provides the bitstring slice of the full register reference."
        ]
      ],
      "properties": {
        "name": {
          "$ref": "#/definitions/name"
        },
        "instance": {
          "$ref": "#/definitions/instance"
        },
        "state": {
          "$ref": "#/definitions/state"
        },
        "slices": {
          "oneOf": [
            {
              "$ref": "../Rangeset.json"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "state",
        "name"
      ],
      "examples": [
        {
          "state": "AArch64",
          "name": "REG0"
        },
        {
          "state": "AArch32",
          "name": "REG0",
          "instance": "REG0_S",
          "slices": [
            {
              "_type": "Range",
              "start": 4,
              "width": 1
            }
          ]
        }
      ]
    }
  },
  "required": [
    "value"
  ],
  "examples": [
    {
      "_type": "Types.RegisterType",
      "value": {
        "state": "AArch64",
        "name": "REG0"
      }
    },
    {
      "_type": "Types.RegisterType",
      "value": {
        "state": "AArch32",
        "name": "REGISTER",
        "instance": "INSTANCE",
        "slices": [
          {
            "_type": "Range",
            "start": 4,
            "width": 1
          }
        ]
      }
    }
  ]
}