1.9.2 Intended uses of CADI and SCADI

Component Architecture Debug Interface (CADI) and Synchronous CADI (SCADI) have separate design principles.

is used by debuggers and simulation controllers to control the simulation. Execution control functions are always asynchronous and are usually called from a non-simulation thread, usually the debugger GUI thread. You can also use CADI to read/write registers, memory and so on, but only from non-simulation threads, for example only from the debugger thread.

implements a specific subset of functions of CADI, that is, mainly read/write registers and memory, set and clear breakpoints, and get disassembly. You can only use SCADI from the simulation thread itself and from threads that can make sure on their own that the simulation is currently blocked, for example a debugger thread while it is sure that the simulation is in a stable state. SCADI is intended to be used from within peripheral read/write accesses while the simulation is running, or from within MTI callbacks that the simulation is running.

SCADI does not implement and execute control functions except CADIExecStop(), because only stop makes sense from within the simulation thread. Asynchronous functions such as CADIExecContinue() and CADIExecSingleStep() are not supported by SCADI, so for these you must use CADI instead. The SCADI::CADIExecStop() is the exception, because for CADI this means “stop when it is convenient for the simulation”, which is asynchronous, but CADIExecStop() is synchronous and means “stop now”, which you enable with the appropriate syncLevel > = 2.

The guidelines are:

  • Use CADI for execution control.
  • Use CADI or SCADI for read/write registers and memory, depending on the situation:

    • Use SCADI if the caller can make sure that the accesses are (potentially inherently) synchronized with the simulation.

    • Use CADI if called from a debugger thread that does not know exactly whether the simulation is running or is in a stable state.
Non-ConfidentialPDF file icon PDF version100964_1110_00_en
Copyright © 2014–2020 Arm Limited or its affiliates. All rights reserved.