| <!-- Copyright (c) 2010-2025 Arm Limited or its affiliates. All rights reserved. --> |
| <!-- This document is Non-confidential and licensed under the BSD 3-clause license. --> |
| <!DOCTYPE html> |
| <html> |
| <head> |
| <meta charset="utf-8" /> |
| <meta name="viewport" content="width=device-width, initial-scale=1"> |
| <meta http-equiv="x-ua-compatible" content="ie=edge"> |
| |
| <!--FAVICON.ico--> |
| <meta name="msapplication-TileColor" content="#2b5797"> |
| <meta name="msapplication-TileImage" content="../img/mstile-144x144.png"> |
| <link rel="icon" href="../img/favicon.ico"> |
| |
| <title>RegisterMapping - ARM Machine Readable Schema - 2.7.4</title> |
| |
| <!--CSS--> |
| <link rel="stylesheet" type="text/css" href="../css/bootstrap.min.css"> |
| <link rel="stylesheet" type="text/css" href="../css/schema.css"> |
| <link rel="stylesheet" type="text/css" href="../css/hljs-github.css"> |
| </head> |
| <body> |
| <div class="container"> |
| <div class="row heading"> |
| <div class="col-md-6 pull-left"><a href="../index.html"><img src="../img/arm.svg" class="logo" /></a></div> |
| <div class="col-md-6 pull-left"><h1>AARCHMRS Schema <small>2.7.4</small></h1></div> |
| |
| <!--Show the home button--> |
| <a href="../index.html"><div class="back-to-home">↚ Home</div></a> |
| </div> |
| </div> |
| |
| <div class="container"> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <div class="row"> |
| |
| |
| |
| |
| <h2> |
| <span class="title-namespace">Mapping.</span><span class=" title-type">RegisterMapping</span> |
| |
| <!-- if oneOf is set, then type is ignored --> |
| <span class="type">object</span> |
| </h2> |
| |
| |
| |
| |
| <div class="static-markdown"><p><code>RegisterMapping</code> maps bits of the current register to other register(s).</p> |
| <p>This mapping represents a uni-directional mapping. To define a bi-directional mapping |
| you must specify a reverse mapping in the destination register(s).</p> |
| <p>For example, in order to specify that <code>AArch64-REG0:NS[63:32]</code> is mapped to <code>AArch32-REG0[31:0]</code> and <code>ext-REG0[31:0]</code> bi-directionally you would write the following:</p> |
| <p><strong>In AArch64-REG0's mapset</strong></p> |
| <pre><code>{ |
| "_type": "Mapping.RegisterMapping", |
| "condition": "HaveAnyAArch32()", |
| "slices": "63:32", |
| "instance": "NS", |
| "mapping_type": "Architectural", |
| "maps": [ |
| "AArch32-REG0[31:0]", |
| "ext-REG0[31:0]" |
| ] |
| } |
| </code></pre> |
| <p><strong>In AArch32-REG0's mapset</strong></p> |
| <pre><code>{ |
| "_type": "Mapping.RegisterMapping", |
| "condition": "HaveAnyAArch32()", |
| "slices": "31:0", |
| "mapping_type": "Architectural", |
| "maps": [ |
| "AArch64-REG0:NS[63:32]", |
| "ext-REG0[31:0]" |
| ] |
| } |
| </code></pre> |
| <p><strong>In ext-REG0's mapset</strong></p> |
| <pre><code>{ |
| "_type": "Mapping.RegisterMapping", |
| "condition": "HaveAnyAArch32()", |
| "slices": "31:0", |
| "mapping_type": "Architectural", |
| "maps": [ |
| "AArch64-REG0:NS[63:32]", |
| "AArch32-REG0[31:0]" |
| ] |
| } |
| </code></pre></div> |
| </div> |
| |
| <!-- definitions --> |
| <div class="row"> |
| <h3><span class="type Xof">definition</span></h3> |
| <table class="table table-hover definitions"> |
| <thead> |
| <tr> |
| <th class="col-md-4">Definitions</th> |
| <th class="col-md-4">Type</th> |
| <th class="col-md-4">Description</th> |
| </tr> |
| </thead> |
| <tbody> |
| |
| |
| <tr id="/definitions/instance" class="property"> |
| <th class="col-md-4"> |
| <a href="#/definitions/instance">instance</a> |
| </th> |
| <td class="col-md-4"> |
| <div><span class="type Xof">oneOf</span> [</div> |
| |
| |
| |
| |
| <div class="items-oneOf"> |
| string |
| </div> |
| <div class="items-oneOf"> |
| null |
| </div> |
| |
| |
| <div>]</div> |
| </td> |
| <td class="col-md-4"> |
| <div><p>When specified this represents the instance of the current register. <code>AArch64-REG0:NS</code> points to the non-secure instance of AArch64-REG0.</p></div> |
| |
| <div> |
| |
| <!-- Can be one of following objects --> |
| |
| |
| <div class="item-type"> |
| <!-- type is a string --> |
| <span class="type"><span class="Xof">oneOf</span> string</span> |
| |
| |
| |
| |
| |
| |
| |
| </div> |
| <div class="item-type"> |
| <!-- type is a null --> |
| <span class="type"><span class="Xof">oneOf</span> null</span> |
| |
| |
| |
| |
| |
| </div> |
| |
| </div> |
| |
| |
| |
| |
| |
| |
| </td> |
| </tr> |
| |
| <tr id="/definitions/mapping_type" class="property"> |
| <th class="col-md-4"> |
| <a href="#/definitions/mapping_type">mapping_type</a> |
| </th> |
| <td class="col-md-4"> |
| </td> |
| <td class="col-md-4"> |
| <div><p>mapping_type should always be Architectural for mappings between Registers that have states, and Functional for those which do not.</p></div> |
| <dl> |
| <dt>Enum</dt> |
| <dd> |
| <code>Architectural</code> |
| <code>Functional</code> |
| <code>Optional</code> |
| </dd> |
| </dl> |
| |
| |
| |
| </td> |
| </tr> |
| |
| <tr id="/definitions/maps" class="property"> |
| <th class="col-md-4"> |
| <a href="#/definitions/maps">maps</a> |
| </th> |
| <td class="col-md-4"> |
| <div><span class="type">array</span> [</div> |
| |
| |
| |
| |
| <div class="items-anyOf"> |
| <a href="../Types/RegisterType_schema.html" class="schema_link">Types.RegisterType</a> |
| </div> |
| <div class="items-anyOf"> |
| <a href="../AST/Identifier_schema.html" class="schema_link">AST.Identifier</a> |
| </div> |
| <div class="items-anyOf"> |
| <a href="../AST/DotAtom_schema.html" class="schema_link">AST.DotAtom</a> |
| </div> |
| <div class="items-anyOf"> |
| <a href="../AST/SquareOp_schema.html" class="schema_link">AST.SquareOp</a> |
| </div> |
| |
| |
| <div>]</div> |
| </td> |
| <td class="col-md-4"> |
| <div><p>A list of <code>RegisterType</code> or <code>Identifier</code> which the current register maps to.</p> |
| <p>You can use the slices property in <code>RegisterType</code> or <code>Identifier</code> to specify explicit mapped bits.</p></div> |
| |
| |
| |
| </td> |
| </tr> |
| |
| <tr id="/definitions/slices" class="property"> |
| <th class="col-md-4"> |
| <a href="#/definitions/slices">slices</a> |
| </th> |
| <td class="col-md-4"> |
| <div><span class="type Xof">oneOf</span> [</div> |
| |
| |
| |
| |
| <div class="items-oneOf"> |
| <a href="../Rangeset_schema.html" class="schema_link">Rangeset</a> |
| </div> |
| <div class="items-oneOf"> |
| null |
| </div> |
| |
| |
| <div>]</div> |
| </td> |
| <td class="col-md-4"> |
| <div><p>When <code>slices</code> is specified:</p> |
| <ul> |
| <li>It represents the current registers mapped bit(s).</li> |
| <li>If no slices are specified in the destination register then the current |
| register bit(s), map to the lowest sequential bits at the destination. |
| For example: current bits <code>[10, 5:0]</code> (specified) map to the destination |
| <code>[6:0]</code> (implied).</li> |
| </ul> |
| <p>When set to <code>null</code>, the mapping represents the full size of the current register.</p></div> |
| |
| <div> |
| |
| <!-- Can be one of following objects --> |
| |
| |
| <div class="item-type"> |
| <span><span class="type Xof">oneOf</span> <a class="title-type" href="../Rangeset_schema.html">Rangeset</a></span> |
| |
| |
| </div> |
| <div class="item-type"> |
| <!-- type is a null --> |
| <span class="type"><span class="Xof">oneOf</span> null</span> |
| |
| |
| |
| |
| |
| </div> |
| |
| </div> |
| |
| |
| |
| |
| |
| |
| </td> |
| </tr> |
| |
| </tbody> |
| </table> |
| </div> |
| |
| |
| |
| |
| |
| <div class="row"> |
| |
| <div> |
| <!-- A simple object --> |
| <h3 class="type">object</h3> |
| |
| <table class="table table-hover properties"> |
| <thead> |
| <tr> |
| <th class="col-md-4">Properties</th> |
| <th class="col-md-4">Type</th> |
| <th class="col-md-4">Description</th> |
| </tr> |
| </thead> |
| <tbody> |
| |
| <!-- properties --> |
| |
| |
| <tr id="/properties/_meta" class="property"> |
| <th class="col-md-4"> |
| <a href="#/properties/_meta">_meta</a> |
| </th> |
| <td class="col-md-4"> |
| <a href="../Meta_schema.html" class="schema_link">Meta</a> |
| </td> |
| <td class="col-md-4"> |
| |
| <div> |
| See |
| <a href="../Meta_schema.html" class="schema_link">Meta</a> |
| for more information. |
| </div> |
| |
| |
| |
| |
| </td> |
| </tr> |
| |
| <tr id="/properties/_type" class="property"> |
| <th class="col-md-4"> |
| <a href="#/properties/_type">_type</a> |
| </th> |
| <td class="col-md-4"> |
| </td> |
| <td class="col-md-4"> |
| <dl> |
| <dt>Enum</dt> |
| <dd> |
| <code>Mapping.RegisterMapping</code> |
| </dd> |
| </dl> |
| |
| |
| |
| </td> |
| </tr> |
| |
| <tr id="/properties/condition" class="property"> |
| <th class="col-md-4"> |
| <a href="#/properties/condition">condition</a> |
| </th> |
| <td class="col-md-4"> |
| <a href="../Traits/HasCondition_schema.html#/definitions/condition" class="schema_link">Traits.HasCondition</a> |
| </td> |
| <td class="col-md-4"> |
| <div><p>This condition must be true for the mapping to exist.</p></div> |
| |
| <div> |
| See |
| <a href="../Traits/HasCondition_schema.html#/definitions/condition" class="schema_link">definitions.condition</a> in |
| <a href="../Traits/HasCondition_schema.html#/definitions/condition" class="schema_link">Traits.HasCondition</a> |
| for more information. |
| </div> |
| |
| |
| |
| |
| </td> |
| </tr> |
| |
| <tr id="/properties/instance" class="property"> |
| <th class="col-md-4"> |
| <a href="#/properties/instance">instance</a> |
| </th> |
| <td class="col-md-4"> |
| <a href="#/definitions/instance" class="schema_link"></a> |
| </td> |
| <td class="col-md-4"> |
| |
| <div> |
| See |
| <a href="#/definitions/instance" class="schema_link">definitions.instance</a> |
| for more information. |
| </div> |
| |
| |
| |
| |
| </td> |
| </tr> |
| |
| <tr id="/properties/mapping_type" class="property"> |
| <th class="col-md-4"> |
| <a href="#/properties/mapping_type">mapping_type</a> |
| </th> |
| <td class="col-md-4"> |
| <a href="#/definitions/mapping_type" class="schema_link"></a> |
| </td> |
| <td class="col-md-4"> |
| |
| <div> |
| See |
| <a href="#/definitions/mapping_type" class="schema_link">definitions.mapping_type</a> |
| for more information. |
| </div> |
| |
| |
| |
| |
| </td> |
| </tr> |
| |
| <tr id="/properties/maps" class="property"> |
| <th class="col-md-4"> |
| <a href="#/properties/maps">maps<sup>◊</sup></a> |
| </th> |
| <td class="col-md-4"> |
| <a href="#/definitions/maps" class="schema_link"></a> |
| </td> |
| <td class="col-md-4"> |
| |
| <div> |
| See |
| <a href="#/definitions/maps" class="schema_link">definitions.maps</a> |
| for more information. |
| </div> |
| |
| |
| |
| |
| </td> |
| </tr> |
| |
| <tr id="/properties/slices" class="property"> |
| <th class="col-md-4"> |
| <a href="#/properties/slices">slices</a> |
| </th> |
| <td class="col-md-4"> |
| <a href="#/definitions/slices" class="schema_link"></a> |
| </td> |
| <td class="col-md-4"> |
| |
| <div> |
| See |
| <a href="#/definitions/slices" class="schema_link">definitions.slices</a> |
| for more information. |
| </div> |
| |
| |
| |
| |
| </td> |
| </tr> |
| |
| |
| <!-- patternProperties --> |
| |
| <!-- object property attributes --> |
| <tr> |
| <td colspan="3"> |
| <dl> |
| <dt>Additional Properties</dt> |
| <dd>Not Allowed</dd> |
| </dl> |
| </td> |
| </tr> |
| |
| <tr> |
| <td colspan="3"> |
| <dl> |
| <dt>◊ Required</dt> |
| <dd>Properties marked with ◊ are required properties.</dd> |
| </dl> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| |
| |
| |
| |
| <!-- array, and it has described items --> |
| </div> |
| |
| |
| <h5>Examples</h5> |
| <div> |
| <pre class="schema-json"><code class="language-json">{ |
| "_type": "Mapping.RegisterMapping", |
| "condition": { |
| "_type": "AST.Function", |
| "arguments": [ |
| { |
| "_type": "AST.Identifier", |
| "value": "EL1" |
| } |
| ], |
| "name": "IsFeatureImplemented" |
| }, |
| "maps": [ |
| { |
| "_type": "AST.SquareOp", |
| "arguments": [ |
| { |
| "_type": "AST.Slice", |
| "left": { |
| "_type": "AST.Integer", |
| "value": 31 |
| }, |
| "right": { |
| "_type": "AST.Integer", |
| "value": 0 |
| } |
| } |
| ], |
| "var": { |
| "_type": "AST.Identifier", |
| "value": "REGTO_A" |
| } |
| }, |
| { |
| "_type": "AST.SquareOp", |
| "arguments": [ |
| { |
| "_type": "AST.Slice", |
| "left": { |
| "_type": "AST.Integer", |
| "value": 31 |
| }, |
| "right": { |
| "_type": "AST.Integer", |
| "value": 0 |
| } |
| } |
| ], |
| "var": { |
| "_type": "Types.RegisterType", |
| "value": { |
| "instance": null, |
| "name": "REGTO_B", |
| "slices": null, |
| "state": "AArch64" |
| } |
| } |
| } |
| ] |
| }</code></pre> |
| <pre class="schema-json"><code class="language-json">{ |
| "_type": "Mapping.RegisterMapping", |
| "condition": { |
| "_type": "AST.Function", |
| "arguments": [ |
| { |
| "_type": "AST.Identifier", |
| "value": "EL1" |
| } |
| ], |
| "name": "IsFeatureImplemented" |
| }, |
| "maps": [ |
| { |
| "_type": "AST.SquareOp", |
| "arguments": [ |
| { |
| "_type": "AST.Slice", |
| "left": { |
| "_type": "AST.Integer", |
| "value": 31 |
| }, |
| "right": { |
| "_type": "AST.Integer", |
| "value": 0 |
| } |
| } |
| ], |
| "var": { |
| "_type": "AST.Identifier", |
| "value": "REGTO" |
| } |
| } |
| ], |
| "slices": [ |
| { |
| "_type": "Range", |
| "start": 0, |
| "width": 32 |
| } |
| ], |
| "instance": "REGFROM_NS", |
| "mapping_type": "Functional" |
| }</code></pre> |
| </div> |
| |
| |
| |
| |
| </div> |
| |
| <div class="row schema"> |
| <h3>Schema <small><a href="http://json-schema.org/draft-04/schema#">http://json-schema.org/draft-04/schema#</a></small></h3> |
| <pre class="schema-json"><code class="language-json">{ |
| "type": "object", |
| "additionalProperties": false, |
| "definitions": { |
| "slices": { |
| "oneOf": [ |
| { |
| "$ref": "../Rangeset.json" |
| }, |
| { |
| "type": "null" |
| } |
| ], |
| "info": [ |
| "When `slices` is specified:", |
| [ |
| " - It represents the current registers mapped bit(s).", |
| " - If no slices are specified in the destination register then the current ", |
| " register bit(s), map to the lowest sequential bits at the destination.", |
| " For example: current bits `[10, 5:0]` (specified) map to the destination", |
| " `[6:0]` (implied)." |
| ], |
| "When set to `null`, the mapping represents the full size of the current register." |
| ] |
| }, |
| "instance": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "null" |
| } |
| ], |
| "info": [ |
| "When specified this represents the instance of the current register. `AArch64-REG0:NS` points to the non-secure instance of AArch64-REG0." |
| ] |
| }, |
| "mapping_type": { |
| "enum": [ |
| "Architectural", |
| "Functional", |
| "Optional" |
| ], |
| "info": [ |
| "mapping_type should always be Architectural for mappings between Registers that have states, and Functional for those which do not." |
| ] |
| }, |
| "maps": { |
| "info": [ |
| "A list of `RegisterType` or `Identifier` which the current register maps to.", |
| "You can use the slices property in `RegisterType` or `Identifier` to specify explicit mapped bits." |
| ], |
| "type": "array", |
| "minItems": 1, |
| "items": { |
| "anyOf": [ |
| { |
| "$ref": "../Types/RegisterType.json" |
| }, |
| { |
| "$ref": "../AST/Identifier.json" |
| }, |
| { |
| "$ref": "../AST/DotAtom.json" |
| }, |
| { |
| "$ref": "../AST/SquareOp.json" |
| } |
| ] |
| } |
| } |
| }, |
| "info": [ |
| "`RegisterMapping` maps bits of the current register to other register(s).", |
| [ |
| "This mapping represents a uni-directional mapping. To define a bi-directional mapping", |
| "you must specify a reverse mapping in the destination register(s)." |
| ], |
| "For example, in order to specify that `AArch64-REG0:NS[63:32]` is mapped to `AArch32-REG0[31:0]` and `ext-REG0[31:0]` bi-directionally you would write the following:", |
| [ |
| "**In AArch64-REG0's mapset**", |
| "```", |
| "{", |
| " \"_type\": \"Mapping.RegisterMapping\",", |
| " \"condition\": \"HaveAnyAArch32()\",", |
| " \"slices\": \"63:32\",", |
| " \"instance\": \"NS\",", |
| " \"mapping_type\": \"Architectural\",", |
| " \"maps\": [", |
| " \"AArch32-REG0[31:0]\",", |
| " \"ext-REG0[31:0]\"", |
| " ]", |
| "}", |
| "```", |
| "**In AArch32-REG0's mapset**", |
| "```", |
| "{", |
| " \"_type\": \"Mapping.RegisterMapping\",", |
| " \"condition\": \"HaveAnyAArch32()\",", |
| " \"slices\": \"31:0\",", |
| " \"mapping_type\": \"Architectural\",", |
| " \"maps\": [", |
| " \"AArch64-REG0:NS[63:32]\",", |
| " \"ext-REG0[31:0]\"", |
| " ]", |
| "}", |
| "```", |
| "**In ext-REG0's mapset**", |
| "```", |
| "{", |
| " \"_type\": \"Mapping.RegisterMapping\",", |
| " \"condition\": \"HaveAnyAArch32()\",", |
| " \"slices\": \"31:0\",", |
| " \"mapping_type\": \"Architectural\",", |
| " \"maps\": [", |
| " \"AArch64-REG0:NS[63:32]\",", |
| " \"AArch32-REG0[31:0]\"", |
| " ]", |
| "}", |
| "```" |
| ] |
| ], |
| "properties": { |
| "_type": { |
| "enum": [ |
| "Mapping.RegisterMapping" |
| ] |
| }, |
| "_meta": { |
| "$ref": "../Meta.json" |
| }, |
| "condition": { |
| "$ref": "../Traits/HasCondition.json#/definitions/condition", |
| "info": [ |
| "This condition must be true for the mapping to exist." |
| ] |
| }, |
| "slices": { |
| "$ref": "#/definitions/slices" |
| }, |
| "instance": { |
| "$ref": "#/definitions/instance" |
| }, |
| "mapping_type": { |
| "$ref": "#/definitions/mapping_type" |
| }, |
| "maps": { |
| "$ref": "#/definitions/maps" |
| } |
| }, |
| "examples": [ |
| { |
| "_type": "Mapping.RegisterMapping", |
| "condition": { |
| "_type": "AST.Function", |
| "arguments": [ |
| { |
| "_type": "AST.Identifier", |
| "value": "EL1" |
| } |
| ], |
| "name": "IsFeatureImplemented" |
| }, |
| "maps": [ |
| { |
| "_type": "AST.SquareOp", |
| "arguments": [ |
| { |
| "_type": "AST.Slice", |
| "left": { |
| "_type": "AST.Integer", |
| "value": 31 |
| }, |
| "right": { |
| "_type": "AST.Integer", |
| "value": 0 |
| } |
| } |
| ], |
| "var": { |
| "_type": "AST.Identifier", |
| "value": "REGTO_A" |
| } |
| }, |
| { |
| "_type": "AST.SquareOp", |
| "arguments": [ |
| { |
| "_type": "AST.Slice", |
| "left": { |
| "_type": "AST.Integer", |
| "value": 31 |
| }, |
| "right": { |
| "_type": "AST.Integer", |
| "value": 0 |
| } |
| } |
| ], |
| "var": { |
| "_type": "Types.RegisterType", |
| "value": { |
| "instance": null, |
| "name": "REGTO_B", |
| "slices": null, |
| "state": "AArch64" |
| } |
| } |
| } |
| ] |
| }, |
| { |
| "_type": "Mapping.RegisterMapping", |
| "condition": { |
| "_type": "AST.Function", |
| "arguments": [ |
| { |
| "_type": "AST.Identifier", |
| "value": "EL1" |
| } |
| ], |
| "name": "IsFeatureImplemented" |
| }, |
| "maps": [ |
| { |
| "_type": "AST.SquareOp", |
| "arguments": [ |
| { |
| "_type": "AST.Slice", |
| "left": { |
| "_type": "AST.Integer", |
| "value": 31 |
| }, |
| "right": { |
| "_type": "AST.Integer", |
| "value": 0 |
| } |
| } |
| ], |
| "var": { |
| "_type": "AST.Identifier", |
| "value": "REGTO" |
| } |
| } |
| ], |
| "slices": [ |
| { |
| "_type": "Range", |
| "start": 0, |
| "width": 32 |
| } |
| ], |
| "instance": "REGFROM_NS", |
| "mapping_type": "Functional" |
| } |
| ], |
| "required": [ |
| "maps" |
| ], |
| "$schema": "http://json-schema.org/draft-04/schema#", |
| "title": "RegisterMapping" |
| }</code></pre> |
| </div> |
| |
| </div> |
| |
| <div class="container"> |
| <div class="footer text-right"> |
| Copyright © 2025 ARM Limited or its affiliates. All rights reserved. |
| </div> |
| </div> |
| |
| <script src="../js/highlight/highlight.js"></script> |
| <script src="../js/highlight/languages/json.min.js"></script> |
| <script src="../js/highlight/languages/django.min.js"></script> <!-- JINJA2 --> |
| <script src="../js/highlight/languages/yaml.min.js"></script> |
| <script src="../js/highlight/languages/isa.js"></script> |
| <script type="text/javascript"> |
| window.onload = function() { |
| hljs.configure({ |
| cssSelector: ".schema-json code, .includes code, pre code", |
| noHighlightRe: /^(no-?highlight|nohl)$/i, |
| }); |
| hljs.highlightAll() |
| }; |
| </script> |
| |
| </body> |
| </html> |