blob: 86a9acf92421d9b9f714919683fdf9d372e41dbd [file]
<!-- 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>ConstantField - 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">&nlarr; Home</div></a>
</div>
</div>
<div class="container">
<div class="row">
<h2>
<span class="title-namespace">Fields.</span><span class=" title-type">ConstantField</span>
<!-- if oneOf is set, then type is ignored -->
<span class="type">object</span>
</h2>
<div class="static-markdown"><p>This field represents a <code>RO</code> constant field with a specific value. For example a 4
bit constant field <code>'0101'</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>
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>Fields.ConstantField</code>
</dd>
</dl>
</td>
</tr>
<tr id="/properties/access" class="property">
<th class="col-md-4">
<a href="#/properties/access">access</a>
</th>
<td class="col-md-4">
<a href="../Traits/HasFieldAccess_schema.html#/definitions/access" class="schema_link">Traits.HasFieldAccess</a>
</td>
<td class="col-md-4">
<div><p>Constant fields are by nature <code>RO</code> in an implementation.
This means that once implemented, the value cannot be changed. However in some cases,
software reads may return another value.</p>
<p>For example, a constant value with the value of <code>1</code> may have a
Read-As-Zero accessor (RAZ), meaning that even though the value is set to
<code>1</code> software must interpret it as <code>0</code>.</p>
<p>Note:</p>
<ul>
<li>The write counterpart of the access must always be <code>WI</code> as
<code>ConstantFields</code> are not writable.</li>
<li>If the value of access is set to null (or omitted), then
<code>RO/WI</code> is implied.</li>
</ul></div>
<div>
See
<a href="../Traits/HasFieldAccess_schema.html#/definitions/access" class="schema_link">definitions.access</a> in
<a href="../Traits/HasFieldAccess_schema.html#/definitions/access" class="schema_link">Traits.HasFieldAccess</a>
for more information.
</div>
<div>
<b>Default</b>
<pre class="schema-json"><code class="language-json">null</code></pre>
</div>
</td>
</tr>
<tr id="/properties/description" class="property">
<th class="col-md-4">
<a href="#/properties/description">description</a>
</th>
<td class="col-md-4">
<a href="../Traits/HasDescription_schema.html#/definitions/description" class="schema_link">Traits.HasDescription</a>
</td>
<td class="col-md-4">
<div>
See
<a href="../Fields/Field_schema.html#/properties/description" class="schema_link">properties.description</a> in
<a href="../Fields/Field_schema.html#/properties/description" class="schema_link">Fields.Field</a>
for more information.
</div>
</td>
</tr>
<tr id="/properties/name" class="property">
<th class="col-md-4">
<a href="#/properties/name">name</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>
See
<a href="../Fields/Field_schema.html#/properties/name" class="schema_link">properties.name</a> in
<a href="../Fields/Field_schema.html#/properties/name" class="schema_link">Fields.Field</a>
for more information.
</div>
</td>
</tr>
<tr id="/properties/rangeset" class="property">
<th class="col-md-4">
<a href="#/properties/rangeset">rangeset<sup>&loz;</sup></a>
</th>
<td class="col-md-4">
<a href="../Rangeset_schema.html" class="schema_link">Rangeset</a>
</td>
<td class="col-md-4">
<div>
See
<a href="../Fields/Field_schema.html#/properties/rangeset" class="schema_link">properties.rangeset</a> in
<a href="../Fields/Field_schema.html#/properties/rangeset" class="schema_link">Fields.Field</a>
for more information.
</div>
</td>
</tr>
<tr id="/properties/value" class="property">
<th class="col-md-4">
<a href="#/properties/value">value<sup>&loz;</sup></a>
</th>
<td class="col-md-4">
<div><span class="type Xof">oneOf</span> [</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/ImplementationDefined_schema.html" class="schema_link">Values.ImplementationDefined</a>
</div>
<div>]</div>
</td>
<td class="col-md-4">
<div><p>The constant value of this ConstantField, which can be:</p>
<ul>
<li>A single <code>Value</code> (or string) such as <code>'0000'</code></li>
<li>An IMPLEMENTATION DEFINED value, which:<ul>
<li>can be open ended to any value that fits within the size of this field.</li>
<li>or restricted to a set of allowed constraints defined by the architecture.</li>
</ul>
</li>
</ul></div>
<div>
<!-- Can be one of following objects -->
<div class="item-type">
<span><span class="type Xof">oneOf</span> <a class="title-type" href="../Values/Value_schema.html">Values.Value</a></span>
</div>
<div class="item-type">
<span><span class="type Xof">oneOf</span> <a class="title-type" href="../Values/ImplementationDefined_schema.html">Values.ImplementationDefined</a></span>
</div>
</div>
<h5>Examples</h5>
<div>
<pre class="schema-json"><code class="language-json">{
&#34;_type&#34;: &#34;Values.Value&#34;,
&#34;value&#34;: &#34;&#39;00&#39;&#34;,
&#34;meaning&#34;: &#34;A defined constant value with a custom meaning&#34;
}</code></pre>
<pre class="schema-json"><code class="language-json">{
&#34;_type&#34;: &#34;Values.ImplementationDefined&#34;,
&#34;constraints&#34;: {
&#34;&#39;00&#39;&#34;: &#34;A possible value chosen by an implementation.&#34;,
&#34;&#39;01&#39;&#34;: &#34;A second possible value chosen by an implementation.&#34;
}
}</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>
<h5>Examples</h5>
<div>
<pre class="schema-json"><code class="language-json">{
&#34;_type&#34;: &#34;Fields.ConstantField&#34;,
&#34;name&#34;: &#34;C1&#34;,
&#34;rangeset&#34;: [
{
&#34;_type&#34;: &#34;Range&#34;,
&#34;start&#34;: 0,
&#34;width&#34;: 2
}
],
&#34;description&#34;: {
&#34;_type&#34;: &#34;Description&#34;,
&#34;after&#34;: null,
&#34;before&#34;: &#34;A constant field that does not change its value during runtime&#34;
},
&#34;value&#34;: {
&#34;_type&#34;: &#34;Values.Value&#34;,
&#34;value&#34;: &#34;&#39;00&#39;&#34;,
&#34;meaning&#34;: null
}
}</code></pre>
<pre class="schema-json"><code class="language-json">{
&#34;_type&#34;: &#34;Fields.ConstantField&#34;,
&#34;name&#34;: &#34;C2&#34;,
&#34;rangeset&#34;: [
{
&#34;_type&#34;: &#34;Range&#34;,
&#34;start&#34;: 0,
&#34;width&#34;: 2
}
],
&#34;description&#34;: {
&#34;_type&#34;: &#34;Description&#34;,
&#34;after&#34;: null,
&#34;before&#34;: &#34;Constant value with possible architecture values which must be configured during an implementation&#34;
},
&#34;value&#34;: {
&#34;_type&#34;: &#34;Values.ImplementationDefined&#34;,
&#34;constraints&#34;: {
&#34;_type&#34;: &#34;Valuesets.Values&#34;,
&#34;values&#34;: [
{
&#34;_type&#34;: &#34;Values.Value&#34;,
&#34;value&#34;: &#34;&#39;00&#39;&#34;,
&#34;meaning&#34;: &#34;A possible value chosen by an implementation.&#34;
},
{
&#34;_type&#34;: &#34;Values.Value&#34;,
&#34;value&#34;: &#34;&#39;01&#39;&#34;,
&#34;meaning&#34;: &#34;A second possible value chosen by an implementation.&#34;
}
]
}
}
}</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">{
"additionalProperties": false,
"info": [
[
"This field represents a `RO` constant field with a specific value. For example a 4",
"bit constant field `'0101'`."
]
],
"properties": {
"_meta": {
"$ref": "../Meta.json"
},
"_type": {
"enum": [
"Fields.ConstantField"
]
},
"name": {
"see": "../Fields/Field.json",
"type": [
"string",
"null"
]
},
"rangeset": {
"see": "../Fields/Field.json",
"$ref": "../Rangeset.json"
},
"value": {
"info": [
"The constant value of this ConstantField, which can be:",
[
" - A single `Value` (or string) such as `'0000'`",
" - An IMPLEMENTATION DEFINED value, which:",
" - can be open ended to any value that fits within the size of this field.",
" - or restricted to a set of allowed constraints defined by the architecture."
]
],
"oneOf": [
{
"$ref": "../Values/Value.json"
},
{
"$ref": "../Values/ImplementationDefined.json"
}
],
"examples": [
{
"_type": "Values.Value",
"value": "'00'",
"meaning": "A defined constant value with a custom meaning"
},
{
"_type": "Values.ImplementationDefined",
"constraints": {
"'00'": "A possible value chosen by an implementation.",
"'01'": "A second possible value chosen by an implementation."
}
}
]
},
"access": {
"default": null,
"$ref": "../Traits/HasFieldAccess.json#/definitions/access",
"info": [
[
"Constant fields are by nature `RO` in an implementation. ",
"This means that once implemented, the value cannot be changed. However in some cases,",
"software reads may return another value."
],
[
"For example, a constant value with the value of `1` may have a ",
"Read-As-Zero accessor (RAZ), meaning that even though the value is set to ",
"`1` software must interpret it as `0`."
],
"Note:",
[
" - The write counterpart of the access must always be `WI` as ",
" `ConstantFields` are not writable.",
" - If the value of access is set to null (or omitted), then ",
" `RO/WI` is implied."
]
]
},
"description": {
"$ref": "../Traits/HasDescription.json#/definitions/description",
"see": "../Fields/Field.json"
}
},
"required": [
"value",
"rangeset"
],
"title": "ConstantField",
"type": "object",
"examples": [
{
"_type": "Fields.ConstantField",
"name": "C1",
"rangeset": [
{
"_type": "Range",
"start": 0,
"width": 2
}
],
"description": {
"_type": "Description",
"after": null,
"before": "A constant field that does not change its value during runtime"
},
"value": {
"_type": "Values.Value",
"value": "'00'",
"meaning": null
}
},
{
"_type": "Fields.ConstantField",
"name": "C2",
"rangeset": [
{
"_type": "Range",
"start": 0,
"width": 2
}
],
"description": {
"_type": "Description",
"after": null,
"before": "Constant value with possible architecture values which must be configured during an implementation"
},
"value": {
"_type": "Values.ImplementationDefined",
"constraints": {
"_type": "Valuesets.Values",
"values": [
{
"_type": "Values.Value",
"value": "'00'",
"meaning": "A possible value chosen by an implementation."
},
{
"_type": "Values.Value",
"value": "'01'",
"meaning": "A second possible value chosen by an implementation."
}
]
}
}
}
],
"$schema": "http://json-schema.org/draft-04/schema#"
}</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>