Previous - Up - Next
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.
- connectors
-
Dictionary with all connectors. Same as the connectors data member.
- object_list
-
List of all configuration objects that are part of the component. This
corresponds to all objects in the o namespace.
- object_prefix
-
Object name prefix, set by the set-component-prefix command when the
component was created.
- connections
-
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.
- top_level
-
Boolean value that is TRUE if the component is a top-level one.
- instantiated
-
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:
- components
-
A list of all components below the top-level one in the component hierarchy.
- cpu_list
-
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.
- create-<component>
-
Creates a non-instantiated component.
- new-<component>
-
Creates an instantiated component. This command is only applicable to
standalone components.
- connect-components
-
Same as <component>.connect, the <component>. version is preferred.
- instantiate-components
-
Instantiate all, or a hierarchy of, non-instantiated components.
- list-components
-
Prints a list of all existing components.
- set-component-prefix
-
Set a name prefix used for all components and their configuration objects.
- get-component-prefix
-
Return the component name prefix.
- import-<component-collection>
-
Enable CLI commands for a collection of components.
- <component>.get-component-object
-
Return the instance name of a specified configuration object in a component.
- <component>.connect
-
Connect component to another component.
- <component>.disconnect
-
Disconnect component from another component.
- <component>.info
-
Print static configuration information about the component.
- <component>.status
-
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.
Previous - Up - Next