blob: b19b1c26ce678058f58edf6a15a20c720de01c4c [file] [log] [blame]
<!-- 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>Encoding - ARM Machine Readable Schema - 2.7.1</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.1</small></h1></div>
<!--Show the home button-->
<a href="./index.html"><div class="back-to-home">&nlarr; Home</div></a>
</div>
</div>
<div class="container">
<div class="row">
<h2>
<span class=" title-type">Encoding</span>
<!-- if oneOf is set, then type is ignored -->
<span class="type">object</span>
</h2>
<div class="static-markdown"><p>This object holds one encoding for a register. For example,</p>
<blockquote>
<p><code>REG0/opc1:0b000 opc2:0b001 CRn:0b0111 coproc:0b1111 CRm:0b1000</code></p>
</blockquote>
<p><em>This shows the string representation of an encoding</em>, where the ASM name is shown as <code>ATS1CPW</code>.</p>
<hr />
<p>When used within index relative models such as <a href="RegisterArray_schema.html">RegisterArray</a>, the encoding could be represented as:</p>
<blockquote>
<p><code>REG&lt;n&gt;/opc1:0b000 opc2:0b001 CRn:0b0&lt;n:4:2&gt; coproc:0b11&lt;n:1:0&gt; CRm:0b1000</code></p>
</blockquote>
<p>Where the index value of <code>n</code> changes the canonical encoding value.</p>
<p>For example: if the value of <code>n</code> is <code>12</code> then the binary representation of
<code>12</code> will be <code>0b01100</code> making the value of <code>CRn</code> to be <code>0b0011</code>
(<code>011</code> is inserted as the bit value of <code>n[4:2]</code>) and <code>coproc</code> to be <code>0b1100</code>
(<code>00</code> is inserted as a the bit value of <code>n[1:0]</code>).</p></div>
</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><p>Metadata.</p></div>
<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>Encoding</code>
</dd>
</dl>
</td>
</tr>
<tr id="/properties/asmvalue" class="property">
<th class="col-md-4">
<a href="#/properties/asmvalue">asmvalue</a>
</th>
<td class="col-md-4">
<ul class="inline list-type">
<li class="inline type">string</li>
<li class="inline type">null</li>
</ul>
</td>
<td class="col-md-4">
<div><p>This is the aliased name for the encoding, For example for the <code>MRS</code> instruction this will be the value of <code>&lt;systemreg&gt;</code>.</p></div>
</td>
</tr>
<tr id="/properties/encodings" class="property">
<th class="col-md-4">
<a href="#/properties/encodings">encodings<sup>&loz;</sup></a>
</th>
<td class="col-md-4">
<div>
<span class="type">object</span> {
<code title="Regex">/.*/</code> :
</div>
<div class="items-oneOf">
<div><span class="type Xof">oneOf</span> [</div>
<div class="items-oneOf">
<a href="Values/Group_schema.html" class="schema_link">Values.Group</a>
</div>
<div class="items-oneOf">
<a href="Values/Value_schema.html" class="schema_link">Values.Value</a>
</div>
<div class="items-oneOf">
<a href="Values/EquationValue_schema.html" class="schema_link">Values.EquationValue</a>
</div>
<div>]</div>
</div>
<div>}</div>
</td>
<td class="col-md-4">
<div><p>The encoding object is an object where the key is the encoding name (<code>opcode</code>)
and the value is one of the value objects.</p>
<pre><code>{
&quot;_type&quot;: &quot;Encoding&quot;,
&quot;encoding&quot;: {
&quot;CRn&quot;: {
&quot;_type&quot;: &quot;Value&quot;,
&quot;value&quot;: &quot;'0111'&quot;,
&quot;meaning&quot;: &quot;The CRn value&quot;,
}
}
</code></pre></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>&loz; Required</dt>
<dd>Properties marked with &loz; are required properties.</dd>
</dl>
</td>
</tr>
</tbody>
</table>
<!-- array, and it has described items -->
</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">{
"info": [
"This object holds one encoding for a register. For example,",
"> `REG0/opc1:0b000 opc2:0b001 CRn:0b0111 coproc:0b1111 CRm:0b1000`",
"_This shows the string representation of an encoding_, where the ASM name is shown as `ATS1CPW`.",
"----",
"When used within index relative models such as [RegisterArray](RegisterArray_schema.html), the encoding could be represented as:",
"> `REG<n>/opc1:0b000 opc2:0b001 CRn:0b0<n:4:2> coproc:0b11<n:1:0> CRm:0b1000`",
"Where the index value of `n` changes the canonical encoding value.",
[
"For example: if the value of `n` is `12` then the binary representation of",
"`12` will be `0b01100` making the value of `CRn` to be `0b0011`",
"(`011` is inserted as the bit value of `n[4:2]`) and `coproc` to be `0b1100`",
"(`00` is inserted as a the bit value of `n[1:0]`)."
]
],
"properties": {
"_meta": {
"$ref": "Meta.json",
"info": [
"Metadata."
]
},
"_type": {
"enum": [
"Encoding"
]
},
"asmvalue": {
"type": [
"string",
"null"
],
"info": [
"This is the aliased name for the encoding, For example for the `MRS` instruction this will be the value of `<systemreg>`."
]
},
"encodings": {
"patternProperties": {
".*": {
"oneOf": [
{
"$ref": "Values/Group.json"
},
{
"$ref": "Values/Value.json"
},
{
"$ref": "Values/EquationValue.json"
}
],
"type": "object"
}
},
"type": "object",
"info": [
[
"The encoding object is an object where the key is the encoding name (`opcode`)",
"and the value is one of the value objects."
],
[
"```",
"{",
" \"_type\": \"Encoding\",",
" \"encoding\": {",
" \"CRn\": {",
" \"_type\": \"Value\",",
" \"value\": \"'0111'\",",
" \"meaning\": \"The CRn value\",",
" }",
"}",
"```"
]
]
}
},
"title": "Encoding",
"required": [
"encodings"
],
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false
}</code></pre>
</div>
</div>
<div class="container">
<div class="footer text-right">
Copyright &copy; 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>