You copied the Doc URL to your clipboard.

Class hierarchy

This section describes the CADI class interface.

Note

  • This guide distinguishes references to the Component Architecture Debug Interface (CADI) as a whole from references to the individual CADI class by using a monospace font for the CADI class.
  • 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 of class 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:

CADI

The CADI object handles the requests from the outside world into the target.

The models implement CADI objects.

A pointer to the CADI object can be obtained from the GetTarget() method of the CADISimulation class.

CADICallbackObj

The CADICallbackObj handles the calls from the target to the debugger to, for example, indicate state changes in the model.

The debugger must implement CADICallbackObj objects. Register them with the target.

The CADICallbackObj is 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:

  • CADIBroker class.
  • CADISimulationFactory class.
  • CADIErrorCallback class.
  • CADISimulationCallback class.
  • CADISimulation class.
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.

  • CADIDisassemblerCB class.
  • CADIDisassembler class.
CADI profiling classes

The profiler class enables you to record and monitor profile information about the debugging session.

  • CADIProfilingCallbacks class.
  • CADIProfiling class.

Note

The Fast Models processor components do not support the CADI profiling classes. This guide, therefore, contains only a high-level overview of the profiling classes.

Note

See the CADITypes.h file for definitions of enumerations and data structures that CADI uses.
Was this page helpful? Yes No