Previous - Up - Next

12.1   Introduction

This chapter describes how to design and write new components. The reader is assumed to be familiar with Simics components and how they are used, as well as configuration classes, objects and attributes. The Configuration and Checkpointing chapter in the Simics User Guide contains relevant documentation.

12.1.1   Component Basics

Components are implemented in Python and are handled like any other Simics objects. While a component object represents a hardware unit such as a processor board, or PCI card, there are one or more configuration objects associated with it that implement the actual functionality.

Components can be created, deleted, and connected to and disconnected from each other. Each component defines a number of connectors that define how it can be connected to other components. Connectors have direction, up or down. As a result, the connected components form a tree-like hierarchy with a single top-level component. There are also special connectors that are neither up nor down: these connectors, called "any", can be used to connect component hierarchies together.

12.1.2   Designing Components

Before writing new components it is important to define the system component hierarchy. This includes deciding: what should the components contain; what connectors are needed between them; if any new connector types are needed; and in a large system, what component is the top-level one. A component should typically have connectors that correspond to real-world connections that are accessible to users. There is no point in having a connector between the processor and the motherboard if, for example, the processor is soldered to it and cannot be replaced. Connections on such a low level are handled by the configuration objects that actually model the hardware.

Previous - Up - Next