1.2. The class hierarchy

Figure 1.1 shows the CADI class hierarchy.

Note

In this guide, references to the Cycle Accurate Debug Interface (CADI) in total are distinguished 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 overview

To view this graphic, your browser must support the SVG format. Either install a browser with native support, or install an appropriate plugin such as Adobe SVG Viewer.


The majority of the CADI functionality is exposed through the following classes:

CADI

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

CADI objects are implemented by the models.

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

CADICallbackObj

The CADICallbackObj handles the calls made by the target towards the outside world to, for example, indicate state changes in the model.

CADICallbackObj objects must be implemented by the connecting tool and registered 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.

Most of the functionality available through CADICallbackObj could be obtained by polling the state of the target model each cycle through the regular CADI interface. It is more efficient however to have the target use the callbacks as required. Using callbacks eliminates the large overhead that results from frequent polling calls.

The callback methods can be called 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 remaining processing can be done by the debugger 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 built around components and interfaces. See The CAInterface class.

Simulation and factory classes

These classes described in the following sections provide the mechanism for creating and running simulations:

CADI class

The methods in this class (described in The CADI class) provide the main interfaces for configuring and running the target. Use these methods to:

  • setup 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 (described in The CADICallbackObj 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. These classes are described in the following sections:

CADI profiling classes

The profiler class enables you to record and monitor profile information related to the debugging session. These classes are described in the following sections:

Note

The CADI Profiling classes are not supported by the Fast Model Portfolio processor models. This guide, therefore, contains only a high-level overview of the profiling classes.

Note

For more detail on individual classes, see Appendix A Class Reference.

See Appendix B Data Structures Used by the CADI Interface and the CADITypes.h file for definitions of enumerations and data structures that are used with the CADI interface.

Copyright © 2008-2010 ARM Limited. All rights reserved.ARM DUI 0444F
Non-ConfidentialID110210