A.8.1 Methods in the CADI class

This section describes the methods in the CADI class that provide the main interfaces for configuring and running the target.

About the methods in the CADI class

This section describes common aspects of the methods in the CADI class.

For more details of the structs, enums, and defines that the CADI interface uses, see also the CADITypes.h file.
If called, unsupported methods must return CADI_STATUS_CmdNotSupported.

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 various types of breakpoint in the target model.

The types of breakpoint:
  • 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

This section describes what the execution API enables a debugger to do.

  • 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 processor models, the memory exposed through the API is not memory contained in the model, but rather memory accessed by the model.
Some processor 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 processors might require up to three memory spaces.
  • There also exist processors 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

This section describes what the parameters API enables.

  • Getting information on runtime parameters.
  • Retrieving the current values for runtime parameters.
  • Setting runtime parameters to new values.
Non-ConfidentialPDF file icon PDF versionARM DUI0842F
Copyright © 2014, 2015 ARM. All rights reserved.