12.4 Component Attributes and Commands
12.4.1 Common Component Attributes
All components have the following configuration attributes defined. Refer to
the Simics Reference Manual for additional documentation.
Dictionary with all connectors. Same as the connectors data member.
List of all configuration objects that are part of the component. This
corresponds to all objects in the o namespace.
Object name prefix, set by the set-component-prefix command when the
component was created.
List of all connections for the component. For each connection there is a
sub-list with the name of the connector, the name of the other component, and
the name of the connector on the other component.
Boolean value that is TRUE if the component is a top-level one.
Boolean value that is TRUE if the component has been instantiated.
12.4.2 Top-level Component Attributes
Top-level component also have the following attributes:
A list of all components below the top-level one in the component hierarchy.
A list of all processors in this top-level component, and in all components
below it in the component hierarchy.
12.4.3 User-defined Attributes
There are two kinds of attributes that can be added to a component using the
register_component_class() function. The first and most common kind
is intended for simple parameterizing of the component. These attributes are
automatically converted to command arguments for the
create-<component> and new-<component> commands.
The other kind is intended for attributes that are only providing
checkpoint support of the component-internal state, which users are not expected
to access. The format of both attribute lists described in section 12.3.1
For each attribute there has to be a pair of set and get methods defined in the
component class. The name of the set method should be
set_<attribute>(), and similarly for the get method. See the
SIM_register_typed_attribute() documentation in the Simics
Reference Manual for more information on writing attribute methods.
12.4.4 Standard Component Commands
There are several commands in Simics that are used to create, inspect and
manipulate components. The following table lists the most common ones. The
Simics Reference Manual contains their complete documentation.
Creates a non-instantiated component.
Creates an instantiated component. This command is only applicable to
Same as <component>.connect, the <component>. version is preferred.
Instantiate all, or a hierarchy of, non-instantiated components.
Prints a list of all existing components.
Set a name prefix used for all components and their configuration objects.
Return the component name prefix.
Enable CLI commands for a collection of components.
Return the instance name of a specified configuration object in a component.
Connect component to another component.
Disconnect component from another component.
Print static configuration information about the component.
Print dynamic configuration information about the component.
12.4.5 User-defined Component Commands
It is possible to add additional commands to a component. This is done in the
same way as for any other configuration class in Simics. See the
new_command() documentation for more information.