3.2 Object Types
The following is an overview of the available object
types (the built-in classes):
- Each DML program defines a subclass of the device
class, which can be instantiated as a configuration object in
- An arbitrary Simics configuration-object attribute of the
device. Many attributes are created automatically from
the declaration of device members such as registers and connects, but it
is possible to manually add other attributes as well. This can be used
to provide synthetic information about the device for inspection, or as
a simple programming interface. Attributes are typically saved
automatically when a Simics checkpoint is created.
- A register bank. Banks make sets of registers accessible by placing
them in an address space. Register banks can be
individually mapped into Simics memory spaces by using a separate
function number for each bank. The
bank class is a subclass of group.
- A register holds an integer value, and is generally
used to model a hardware register. The width of a register is a nonzero
number of bytes (a register may not be wider than 8 bytes). Registers
may only occur within a bank (directly or indirectly).
Registers divide the address space of a bank into discrete elements with
non-overlapping addresses. Registers are used for communication via
memory-mapped I/O, and also for storing device state in natural way.
Sometimes it is useful to have registers that belong to a bank but are
not mapped into its address space.
- array of register
- Register arrays are used for compact representation of related
registers within the same bank.
- A register can be further divided into
fields on the bit level. Each such field can be
accessed separately, both for reading and for writing. The fields of a
register may not overlap.
- Groups are generic container objects, and are mainly used to define
logical groups of registers. See also bank.
- array of group
- Arrays of groups are useful for modeling repeated groups of
- A connect object holds a reference to a Simics
configuration object. (Typically, the connected object is expected to
implement some particular Simics-interface.) An attribute with the same
name is added to the device; thus, a
connect is similar to a simple attribute
object. Usually, initialization is done from outside the device, e.g., in
a Simics configuration file.
- array of connect
- Connect-arrays make it easy to connect a whole array of
- An interface object may only occur within a
connect. It is used to declare a Simics-interface assumed
to be implemented by the connected object. In many cases, the name of
the interface is sufficient, and the body of the object can be left
- An implement object is used to define a
Simics-interface that the device implements. The methods
defined within the implement must correspond to the
functions of the interface.
- An event object is an encapsulation of a Simics event
that can be posted on a time or step queue. Almost all objects can have
event members, except events themselves, and objects of type
field and implement.