A.8.1. Overview of the methods in the CADI class

The methods in the CADI class provide the main interfaces for configuring and running the target:


For details of the structures, enumerations, and defines used with the CADI interface, see the CADITypes.h file and The CADI class.

Unsupported methods must return CADI_STATUS_CmdNotSupported if called.

Setup API

The setup API controls the interaction between the host, the debugger, and the CADI target. Use this API to:

  • inspect the actual properties of a given CADI object

  • register CADICallbackObj callbacks

  • bypass specialized commands not available from CADI.

Breakpoint API

The breakpoint API enables defining the following types of breakpoints in the target model:

  • instruction execution

  • the content of a memory location

  • the content of a register

  • temporary breakpoints for run to debugger behavior

  • breakpoints on triggered exceptions.

Execution API

The execution API enables a debugger to:

  • control the execution using various asynchronous execution commands

  • control the target by, for example, starting or stopping simulation

  • obtain information about the pipeline for a cycle-accurate model

  • manage the synchronous commands of loading or resetting an application.

Register API

The register API exposes the internal state of the registers of a model for inspection and modification.

If a model has a large number of registers, the registers can be grouped to simplify navigating through the registers. The register API supports compound registers.

Models must expose their internal performance counters (for example, Instr Cache Reads, Instr Cache Misses) as registers to be accessible through this interface.

Memory API

The memory API exposes the internal state of the memory of a model for inspection and modification. Memory is exposed through address spaces (memory spaces) that represent separately addressable units.

For core models, the memory exposed through the API is not memory contained in the model, but rather memory accessed by the model.

Some core models, however, do contain their own physical memory and expose this memory as a separate memory space.

The requirement for multiple memory spaces is because of different processor models:

  • Harvard architectures can require two separate memory spaces

  • DSP cores might require up to three memory spaces.

  • There also exist cores that access different memory spaces depending on internal execution flags, for instance distinguishing between secure memory and non-secure memory.

Memory models typically expose a single memory space corresponding to their physical memory and other models typically do not expose any memory.

Data stored in a memory space is organized according to the endianness specified by the flags of that particular memory space. This can be little endian or big endian, with the invariance defining the number of bytes in an accessed unit.

Data can also be organized using a model-specific endianness. In these cases, the documentation that accompanies the model must provide specific details.

The total number of bytes in a memory word can be determined based on bitsPerMau. The bytes are divided in groups of invariance bytes. These groups are then arranged in little endian or big endian order.

For example, for invariance of 2 and bitsPerMau of 64:

  • a little endian word is represented as b0 b1 b2 b3 b4 b5 b6 b7

  • a big endian word is represented as b6 b7 b4 b5 b2 b3 b0 b1.

Each memory space can be subdivided in memory blocks. Memory blocks contain additional information pertaining to the intended usage of the memory. This information can be used as hints for memory data presentation dedicated for human consumption, but it has no effect on the actual simulation.

Cache API

These functions enable access to cache memories in the target. Use the CADIGetCacheInfo() function to return the cache information for the target. The CADICacheRead() and CADICacheWrite() functions are used to directly access the cache memory contents.

Parameters API

The parameters API enables:

  • getting information on runtime parameters

  • retrieving the current values for runtime parameters

  • setting runtime parameters to new values.

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