AARCHMRS Schema 2.5.3

Features

The Features model stores information about the architectural configuration using constraints, where constraints can be relationships between multiple features (FEAT_X), multiple architectural versions (v8Ap1) and register ID fields. For example, see below for a Features file that tries to express all these relationships:

Note

In this documentation for ease, we write constraints as strings A --> B. However, in the data, this is stored as AST.BinaryOp.

{
    "_type": "Features",
    "parameters": [
        {
            "_type": "Parameters.Boolean",
            "name": "v8Ap1",
            "title": "v8.1 A-Profile"
        },
        {
            "_type": "Parameters.Boolean",
            "name": "v8Ap2",
            "title": "v8.2 A-Profile"
        },
        {
            "_type": "Parameters.Boolean",
            "name": "FEAT_A",
            "title": "Feature A",
            "constraints": [
                "FEAT_A --> v8Ap2",
                "FEAT_A <-> UInt(AArch64-IDREG.A) >= 1"
            ]
        },
        {
            "_type": "Parameters.Boolean",
            "name": "FEAT_B",
            "title": "Feature B",
            "constraints": [
                "v8Ap2 --> FEAT_B",
                "FEAT_B --> v8Ap1",
                "FEAT_B --> FEAT_A"
            ]
        },
        {
            "_type": "Parameters.Integer",
            "name": "NUM_COUNTERS",
            "title": "Number of Counters",
            "values": [
                0,
                1,
                2,
                3
            ],
            "constraints": [
                "NUM_COUNTERS == UInt(AArch64-IDREG.Counters)"
            ]
        },
        {
            "_type": "Parameters.Integer",
            "name": "DEBUG_LEVEL",
            "title": "Debugger verbosity Level",
            "values": [
                0,
                1,
                2
            ],
            "constraints": [
                "DEBUG_LEVEL == UInt(Configuration.Debugger.Verbosity)"
            ]
        }
    ],
    "constraints": [
        "v8Ap2 --> v8Ap1"
    ]
}

Note

The Features model does not make any differentiation between an architecture version or a feature. They are all represented as Parameters.*, and boolean logic connects them together using <-> (if-and-only-if) and --> (if-then).

The Features model holds two main keys:

Parameters

The parameters property provides a list of Parameters types, where each parameter contains:

See Parameters for more detail around each property above and different types of parameters.

Constraints

Note

In the example above, the constraint property can be found attached to a Parameter or attached to the top Features level. This is done as an aid to help users define constraints closer to the context. However the system does not make any distinction and treats all constraints globally.

In the example above you see the following concepts expressed:

To understand complex relationships that can be expressed please see Traits.HasConstraints documentation.