How a processor model fits into the Simics environment is the topic of this Chapter.
- Simics API
- Although the processor model does not directly expose any part of the Simics API, many API calls make use of the interfaces described in this document.
- Command Line Interface
- Some commands are bound to interfaces, and a processor model that implements a set of interfaces therefore automatically gets a set of commands defined.
See Section 4.1 for more information about such commands.
The processor model can implement additional commands beyond the pre-defined commands.
- Debug Functionality
- Low-level debug functionality that can be supported by a processor model is breakpoints (see Chapter 5) and the
context_handler interface.
The context_handler interface is used by a context switcher object to change target software context based on information from an operating system awareness module.
- Checkpointing
- Just like any other model, a processor model needs to properly save and restore all simulated state through attributes to support checkpointing.
- Snapshots (In-memory)
- In-memory snapshots have the same requirements as checkpoints written to disk.
- System Model Devices
- Device models interact with the processor model through interfaces and can be reused as is when using a new processor model.
Naturally, modifications need to be made if a different system is to be simulated.
Close interaction with the system model builder is typically needed when changing the CPU model.
For some system models, information about this is covered in the associated target guide.
- System Model Components
- Components are usually built to abstract away the low-level configuration of a model.
Components for a user defined processor model can usually be derived from a Simics-provided component with only minor changes needed to bridge low-level differences in attributes and configuration.
- Operating System Awareness
- The Simics environment provides support for application debugging and analysis through operating system awareness modules that define process tracker objects.
The operating system awareness models need to be modified to support new architectures, new revisions of operating systems, and also for completely new operating systems.
When using an existing operating system awareness module with a user defined processor model, the naming of registers in the
int_register interface needs to be consistent.
- Software Development Environment Awareness
- Software development environments such as WindRiver Workbench are supported on multiple levels, including symbolic debugging capabilities and integration with vendor IDEs.
The software development environment awareness support in Simics can be used as-is with a user defined processor model.