Previous - Up - Next

5.1   Standard Parameters

This section describes the built-in parameters of the different object types, together with the expected data types of their values.

5.1.1   Object Parameters

The following are the standard parameters defined in all DML objects:

this [reference]
Always refers to the current object, i.e., the nearest enclosing object definition.
parent [reference | undefined]
Always refers to the parent (containing) object. This has the value undefined for the device object.
desc [string | undefined]
A short summary of the object, for documentation and debugging purposes. This is undefined by default, and is expected to be supplied by the programmer. It should preferably be only a few words. (The short-hand syntax for desc is described in Section 4.8.) See also documentation.
documentation [string | undefined]
A longer documentation string describing the object. The default value is undefined. If defined, this is used in automatically generated documentation (mainly for the device and its attributes). If undefined, the desc parameter is used instead.
name [string | undefined]
The name of the object, without any qualifiers. This may be undefined in implicitly created objects. See also qname, below.
qname [string | undefined]
The fully-qualified name of the object, such as "my_device.bank1.r0". This may be undefined in implicitly created objects.
objtype [string]
The object type name.
dev [reference]
Normally refers to the device object, i.e., the top-level object definition (regardless of the name used for the device); inherited from parent object.
bank [reference | undefined]
Normally refers to the enclosing bank object; inherited from parent object. Has the value undefined for objects not within a bank.
index [integer | undefined]
For objects that are not array elements, this has the default value undefined. For further details, see Array Parameters, below.
indexvar [string | undefined]
For objects that are not array elements, this has the default value undefined. For further details, see Array Parameters, below.

5.1.2   Array Parameters

array [list of references]
A list of object references to each of the elements of the array.
arraysize [integer]
The number of elements in the array.
index [integer]
For every object that is an array element, this parameter specifies the index of the object in the containing array. The first element of an array always has index 0.
i [integer]
Each array has an individual index parameter, to make it possible to refer to both inner and outer indexes when arrays are nested (cf. the index parameter, above). The parameter name can be specified in the array declaration, as in "register regs[j in 0..10] {...}". The default name is i, if the array is defined without an explicit index parameter, as in "register regs[10] {...}" (see also indexvar, below).
indexvar [string]
This parameter specifies the name of the individual index parameter of the containing array.

5.1.3   Device Parameters

classname [string]
The name of the Simics configuration object class defined by the device model. Defaults to the name of the device object.
banks [list of references]
A list of references to all the bank objects of the device object.
register_size [integer | undefined]
The default size (width) in bytes used for register objects; inherited by bank objects. The default value is undefined.
byte_order [string]
The default byte order used when accessing registers wider than a single byte; inherited by bank objects. Allowed values are "little-endian", "big-endian" and undefined. The default value is "little-endian".
log_group [integer | undefined]
An additional log group used by registers when logging register accesses. This may be overridded in each bank and each individual register or register group.
obj [reference]
A special built-in parameter that can be used to provide a Simics API conf_object_t* reference to the device object at the C level.
logobj [reference]
A special built-in reference that can be used to provide a Simics API log_object_t* reference to the device object at the C level.

5.1.4   Attribute Parameters

allocate_type [string | undefined]
For attributes with simple types such as bool, int32, uint32, double and string, defining allocate_type to the desired type name as a string, e.g., "uint32", will automatically cause storage to be created for the attribute value, and will generate the corresponding get/set methods for the attribute. The default value of this parameter is undefined.
type [string | undefined]
A Simics configuration-object attribute type description string, such as "i" or "[s*]", specifying the type of the attribute. (See the Simics Programming Guide for details.) This is calculated automatically from the allocate_type parameter, if that is not undefined.
configuration ["required" | "optional" | "pseudo" | "none"]
Specifies how Simics treats the attribute. The default value is "optional". A required attribute must be initialized to a value when the object is created, while an optional attribute can be left undefined. In both cases, the value is saved when a checkpoint is created. For a pseudo-attribute, the value is not saved when a checkpoint is created (and it is not required to be initialized upon object creation). Setting the value to "none" suppresses creation of the attribute; this can sometimes be useful for implicit attributes that inherit the configuration parameter from their parent, as e.g., in register objects (cf. Section 3.7.2).
persistent [bool]
If this parameter is true, the attribute will be treated as persistent, which means that its value will be saved when using the save-persistent-state command. The default value is false.
attr_type [string | undefined]
Reserved for internal use. Always has the same value as the type parameter.

5.1.5   Bank Parameters

mapped_registers [list of references]
A list of references to all register objects that are mapped into the address space of the bank, sorted by address.
unmapped_registers [list of references]
A list of references to all register objects that are not mapped into the address space of the bank, sorted by address.
function [integer | undefined]
The function number of the bank, used for mapping the bank into a Simics memory space. Defaults to undefined.
overlapping [bool]
Specifies whether this bank allows accesses that cover more than one register. (This translates to one or more possibly partial accesses to adjacent registers.) Defaults to false.
partial [bool]
Specifies whether this bank allows accesses that cover only parts of a register. In a partial access, only the addressed fields of the register are read or written. If there are no explicit fields, the whole register is accessed. Defaults to false.
signed [bool]
The default for whether register contents should be treated as signed integers; inherited by register objects. The default value is false.
allocate [bool]
The default for whether storage for register contents should be allocated in the generated C code; inherited by register objects. The default value is true.
register_size [integer | undefined]
Inherited from the device object; provides the default value for the size parameter of register objects.
byte_order [string]
Specifies the byte order used when accessing registers wider than a single byte; inherited from device objects. Allowed values are "little-endian", "big-endian" and undefined.
log_group [integer | undefined]
An additional log group used by registers when logging register accesses. This may be overriddedn in each individual register or register group. The default value is inherited from the device object.
miss_bank [reference | undefined]
Can be set to refer to another bank object, to which accesses are forwarded if they cannot be performed in the current bank. Defaults to undefined.
miss_bank_offset [integer]
The offset to be added to the address when an access is forwarded through the miss_bank parameter. The default value is 0.

5.1.6   Register Parameters

size [integer | undefined]
The default size (width) of the register, in bytes. This parameter can also be specified using the "size n" short-hand syntax for register objects. The default value is provided by the register_size parameter of the enclosing bank object.
bitsize [integer]
The size (width) of the register, in bits. This is equivalent to the value of the size parameter multiplied by 8, and cannot be overridden.
offset [integer | undefined]
The address offset of the register, in bytes relative to the start address of the bank that contains it. This parameter can also be specified using the "@ n" short-hand syntax for register objects. The default value is undefined.
signed [bool]
Specifies whether the register contents should be treated as a signed integer; inherited from bank objects.
allocate [bool]
Specifies whether storage for the register contents should be allocated in the generated C code; inherited from bank objects.
fields [list of references]
A list of references to all the field objects of a register object. There is always at least one field per register.
hard_reset_value [integer]
The value used to initialize the internal state of a register upon hard reset. Defaults to 0.
soft_reset_value [integer]
The value used to initialize the internal state of a register upon soft reset. Defaults to the value of the hard_reset_value parameter.
logging [bool]
Specifies whether accesses to the register should be logged. The default is true. See also read_logging and write_logging.
log_group [integer | undefined]
An additional log group used when logging register accesses. The default value is inherited from the device object.
read_logging [bool]
Specifies whether read accesses to the register should be logged. Defaults to the value of the logging parameter.
write_logging [bool]
Specifies whether write accesses to the register should be logged. Defaults to the value of the logging parameter.
configuration ["required" | "optional" | "pseudo"]
Specifies how Simics treats the automatically created attribute corresponding to the register. See Section 5.1.4 for details.
persistent [bool]
Specifies whether the register attribute should be persistent. See Section 5.1.4 for details.
attr_type [string | undefined]
Reserved for internal use. Always has the value "i".

5.1.7   Field Parameters

reg [reference]
Always refers to the containing register object.
explicit [bool]
The value of this parameter is true for fields explicitly declared in the DML source code, and is false for implicitly created fields.
lsb [integer]
The bit number (in little-endian bit order) of the least significant bit of the field, in the containing register; a required parameter. This is not affected by any bitorder declaration. The preferred way of defining this parameter is to use the "[highbit:lowbit]" short-hand syntax for field ranges, whose interpretation is dependent on the bitorder declaration of the file. Care must be taken when referring to this parameter in a big-endian bit numbering system - if possible, put such code in a separate file that uses little-endian bit order interpretation.
msb [integer]
The bit number (in little-endian bit order) of the most significant bit of the field, in the containing register; a required parameter. See lsb for details.
bitsize [integer]
The size (width) of the field, in bits. This is automatically set from the lsb and msb parameters and cannot be overridden.
signed [bool]
Specifies whether the field contents should be treated as a signed integer; inherited from the register object.
allocate [bool]
Specifies whether storage for the field contents should be allocated in the generated C code; inherited from the register object.
hard_reset_value [integer]
The value used to initialize the internal state of the field upon hard reset. Defaults to undefined. If the value is undefined, the corresponding bits of the value of the hard_reset_value parameter of the containing register are used instead.
soft_reset_value [integer]
The value used to initialize the internal state of the field upon soft reset. Defaults to the value of the hard_reset_value parameter. If the value is undefined, the corresponding bits of the value of the soft_reset_value parameter of the containing register are used instead.

5.1.8   Connect Parameters

interfaces [list of references]
A list of references to all the interface objects of a connect object.
configuration ["required" | "optional" | "pseudo"]
Specifies how Simics treats the automatically created attribute corresponding to the connect object. See Section 5.1.4 for details.
persistent [bool]
Specifies whether the attribute should be persistent. See Section 5.1.4 for details.
attr_type [string | undefined]
Reserved for internal use.

5.1.9   Interface Parameters

required [bool]
Specifies whether a connected object must implement the interface. If the value is true and the object does not implement the interface, a runtime error is generated. The default value is true.
c_type [string]
Specifies the C type of the interface (typically a typedef:ed name for a struct containing function pointers). Defaults to the name of the interface object with the string "_interface_t" appended.

5.1.10   Event Parameters

timebase ["steps" | "cycles" | "seconds" | "stacked"]
Specifies the unit for the time value passed to the post method. The special unit "stacked" means that the value is ignored and the event is posted on the top of the queue. Defaults to "seconds".

5.1.11   Implement Parameters

c_type [string]
Specifies the C type of the implemented interface (typically a typedef:ed name for a struct containing function pointers). Defaults to the name of the implement object with the string "_interface_t" appended.

Previous - Up - Next