Data Model

RegFab has a builtin hierarchical Data Model, each model represents a unit in register definition. This hierarchy information also complies with those in XML file.

Component
+-- Parameter
+-- Constant
+-- Interface
+-- RegSet
    +-- Register
        +-- Reset
        +-- BitField
            +-- Access
            +-- Enum

These model instances are also accessible from mako templates, user can directly reference instance’s property value like: object.attribute.

See also

Please refer to Template for the usage of Variable Context.

Component

Component represents a module. Normally one design file has one component, and it’s the top container of other data models.

Parameter

Parameter make a design more flexible, attribute of other models can reference parameter like $para. Parameter type can be string type or integer type in various radix. Parameter can be overridden by command line argument.

Constant

Constant is similar with Parameter, but not changable.

Interface

Interface.

RegSet

RegSet is register group, it’s a container of a group of registers which are used for same function. Its offset is the base offset of all its registers, and a register offset is relative to RegSet.

Register

Register is the main data model of a design.

Reset

Reset is an attribute of a register.

BitField

BitField represents a bit-field of a register.

Access

Access represents the access from internal and extenal, hardware and software.

Enum

Enum is the enumeration of a bit-field values, differnet value has different meaning.