A Field object represents a field in an Encodeset. The range property
states how many bits wide the field is and where it is in the Encodeset.
| Properties | Type | Description |
|---|---|---|
| _meta | FieldAbstract |
See
definitions._meta in
FieldAbstract
for more information.
|
| _type |
|
|
| name◊ | AST.Identifier |
The name of this field.
See
definitions.c_identifier_regex in
AST.Identifier
for more information.
|
| range◊ | FieldAbstract |
See
definitions.range in
FieldAbstract
for more information.
|
| should_be_mask◊ | FieldAbstract |
See
definitions.should_be_mask in
FieldAbstract
for more information.
|
| value◊ | FieldAbstract |
Represents the value that the Field takes, based on the conditions that constrain the Field. An
See
definitions.value in
FieldAbstract
for more information.
|
|
||
|
||
{
"_type": "Instruction.Encodeset.Field",
"range": {
"_type": "Range",
"start": 0,
"width": 4
},
"name": "alice",
"value": {
"_type": "Values.Value",
"value": "'0x11'"
},
"should_be_mask": {
"_type": "Values.Value",
"value": "'0000'"
}
}
{
"type": "object",
"info": [
[
"A `Field` object represents a field in an `Encodeset`. The `range` property",
"states how many bits wide the field is and where it is in the `Encodeset`."
]
],
"examples": [
{
"_type": "Instruction.Encodeset.Field",
"range": {
"_type": "Range",
"start": 0,
"width": 4
},
"name": "alice",
"value": {
"_type": "Values.Value",
"value": "'0x11'"
},
"should_be_mask": {
"_type": "Values.Value",
"value": "'0000'"
}
}
],
"properties": {
"_meta": {
"$ref": "FieldAbstract.json#/definitions/_meta"
},
"_type": {
"enum": [
"Instruction.Encodeset.Field"
]
},
"name": {
"info": [
"The name of this field."
],
"$ref": "../../AST/Identifier.json#/definitions/c_identifier_regex"
},
"range": {
"$ref": "FieldAbstract.json#/definitions/range"
},
"value": {
"info": [
"Represents the value that the Field takes, based on the conditions that constrain the Field.",
"An `x` indicates that this bit can be `0` or `1`. All bits in a Field are set to `x` if the value is unconstrained."
],
"$ref": "FieldAbstract.json#/definitions/value"
},
"should_be_mask": {
"$ref": "FieldAbstract.json#/definitions/should_be_mask"
}
},
"additionalProperties": false,
"required": [
"name",
"range",
"value",
"should_be_mask"
],
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Instruction.Encodeset.Field"
}