DFRegisterField

DFRegisterField represents a single field within a DFRegister and inherits from DFCommandField and has exactly the same attributes. It only exists as a distinct entity so that it can be extended in later versions of the specification with new attributes.

As with every tag, DFRegisterField inherits from DFBase, so has support for all of the core attributes (id, description, and attributes).

{
    "id": "my_register_field",
    "description": "Free-form description",
    "attributes": { },
    "lsb": 4,
    "size": 2,
    "reset": 0,
    "signed": false,
    "enum": { }
}
Property Usage
lsb Least significant bit position within the field
size Width of the field in bits
reset Default value, or the value taken at reset
signed Whether the field's value should be treated as a signed integer
enum A dictionary mapping names to dumps of DFDefine values

Python API

class designformat.register.DFRegisterField(id=None, lsb=None, size=None, reset=None, signed=False, description=None)

DesignFormat representation of a register field. This is treated as a special case of a DFCommandField. Currently no extra parameters are necessary, but the class is created for future extensibility.

Javascript API

class DFRegisterField(id, lsb, size, reset, signed, description)

DesignFormat representation of a register field. This is treated as a special case of a DFCommandField. Currently no extra parameters are necessary, but the class is created for future extensibility.

Constructor for the register field object

Arguments
  • id (string) – The name of the register field

  • lsb (integer) – Least significant bit position within the command

  • size (integer) – Width of the field in bits

  • reset (integer) – Value taken at reset (or default value)

  • signed (boolean) – Whether the value is signed

  • description (string) – Human-readable description