This section describes the CADI class interface.
- This guide distinguishes references to the Component Architecture Debug
Interface (CADI) as a whole from references to the individual
CADIclass by using a monospace font for the
- A CADI simulation is the simulation of a platform
that can be accessed by using an implementation of the CADI interface.
Typically at least one platform component exposes an implementation
CADI. This component can be referred to as a CADI target.
- The methods in the top-level classes are pure virtual. The methods of the lowest-level user classes implement the component-specific behavior.
Figure 1-1 CADI class hierarchy overview
Most of the CADI functionality is exposed through these classes:
CADIobject handles the requests from the outside world into the target.
The models implement
A pointer to the
CADIobject can be obtained from the
GetTarget()method of the
CADICallbackObjhandles the calls from the target to the debugger to, for example, indicate state changes in the model.
The debugger must implement
CADICallbackObjobjects. Register them with the target.
CADICallbackObjis also used for semihosting requests. Instead of requiring the simulation of a full operating system, CADI provides the option to forward the console operations from the target to the host operating system.
You could poll the state of the target model each cycle through the regular
CADI interface. It is more efficient however to have the target use the
CADICallbackObj callbacks as required. Using callbacks eliminates
the large overhead that results from frequent polling calls.
The model can call the callback methods at any time during simulation. ARM recommends, however, that the callback handlers do as little processing as possible and, for example, only set flags for later processing. The debugger can do the remaining processing without delaying the simulation.
There are several conceptually distinct parts of the CADI interface:
- CAInterface class
- This class is the base class for all CADI classes and enables creation and use of software models that are built around components and interfaces.
- Simulation and factory classes
These classes provide the mechanism for creating and running simulations:
- CADI class
The methods in this class provide the main interfaces for configuring and running the target. Use these methods to:
- Set up the target.
- Control target execution.
- Set breakpoints.
- extent the standard interface.
- Access registers.
- Access memory.
- Access cache.
- CADICallbackObj class
The methods in this callback class enable the target to communicate with the debugger and:
- Provide semihosting I/O.
- Notify the debugger of a change in execution mode in the target.
- Support extensions to the standard interface.
- CADI disassembler classes
If the component supports disassembly, the disassembly interface can obtain the disassembly during a simulation.
- CADI profiling classes
The profiler class enables you to record and monitor profile information about the debugging session.
NoteThe Fast Models processor components do not support the CADI profiling classes. This guide, therefore, contains only a high-level overview of the profiling classes.