An attribute object in DML represents a Simics configuration object attribute of the device. An attribute is basically a name with an associated pair of get and set functions; see Section 5.2.3. The type of the value read and written through the get/set functions is controlled by the type parameter; see Section 5.1.4. More information about configuration object attributes can be found in the Simics Programming Guide.
Attributes can be used to provide synthetic information about the device for inspection, or as a simple programming interface. By default, attributes are saved automatically when a Simics checkpoint is created; this is controlled by the the configuration parameter.
Note that an attribute is not required to save the written value; this is entirely dependent on the intended semantics of the attribute. For example, a very simple attribute could do nothing in the set function, and always return zero from the get function.
By defining the allocate_type parameter, the get and set functions and the type parameter can be created automatically, for simple attribute types that store the written value.
For attributes defined using allocate_type, the value of the attribute can be accessed within DML by referencing the object directly, e.g.:
log "info": "the value of attribute a is %d", $dev.a;