Component Architecture Debug Interface Developer Guide

Version 2.0

Table of Contents

About this book
Using this book
Typographic conventions
Feedback on this product
Feedback on content
1 Introduction
1.1 About the Component Architecture Debug Interface
1.2 Class hierarchy
1.3 CADI classes used to connect to a simulation
1.3.1 About the CADI classes used to connect to a simulation
1.3.2 CADI classes used to control the simulation target
1.3.3 Optional implementation
2 Target Connection Mechanism
2.1 About the target connection mechanism
2.2 Requirements for the target connection mechanism
2.2.1 CADIBroker
2.2.2 CADISimulationFactory
2.2.3 CADISimulation
2.2.4 ObtainInterface()
2.2.5 Callback objects
2.3 Connecting to a simulation
2.3.1 Opening the model library
2.3.2 Creating the CADIBroker
2.4 Using GetSimulationFactories()
2.5 Getting existing CADI simulations
2.6 Getting a target interface
2.7 Disconnecting from a target
2.7.1 About disconnecting from a target
2.7.2 Deleting pointers to registered callbacks
2.7.3 Releasing the objects of the target connection mechanism
2.7.4 Typical shutdown scenarios
3 Using the CADI Interface Methods from a Debugger
3.1 CADI accesses from a debugger
3.1.1 About CADI accesses from a debugger
3.1.2 CADI and threads
3.2 CADIReturn_t return values
3.3 Target connection and configuration
3.3.1 Connecting to targets
3.3.2 Obtaining an interface pointer to the target
3.3.3 Target interface setup
3.3.4 Setting runtime parameters
3.3.5 CADI target characteristics
3.3.6 Querying the hardware resource for register information
3.3.7 Querying the hardware resource for memory information
3.4 Register access
3.4.1 About accessing registers
3.4.2 Reading from string registers
3.4.3 Writing to string registers
3.5 Memory access
3.6 Execution control
3.6.1 Breakpoints
3.6.2 Execution mode control
3.7 Application loading
3.8 CADI Disassembler
3.8.1 About the CADI Disassembler
3.8.2 Obtaining a CADI Disassembler
3.8.3 CADI Disassembler callbacks
3.8.4 Disassembly modes
3.8.5 CADIDisassemblerStatus
3.8.6 Disassembly acquisition
3.9 Using the semihosting API
3.10 Profiling
4 CADI Extension Mechanism
4.1 Overview of the extension mechanism
4.2 Extending the target side
4.3 Obtaining a custom interface
A Class Reference
A.1 CAInterface class
A.1.1 About the CAInterface class
A.1.2 CAInterface class declaration
A.1.3 CAInterface::IFNAME()
A.1.4 CAInterface::IFREVISION()
A.1.5 CAInterface::ObtainInterface()
A.2 CADIBroker class
A.2.1 CADIBroker class definition
A.2.2 Creating the CADIBroker
A.2.3 CADIBroker::GetSimulationFactories()
A.2.4 CADIBroker::GetSimulationInfos()
A.2.5 CADIBroker::SelectSimulation()
A.2.6 CADIBroker::Release()
A.3 CADISimulationFactory class
A.3.1 CADISimulationFactory class definition
A.3.2 CADISimulationFactory::Release()
A.3.3 CADISimulationFactory::GetName()
A.3.4 CADISimulationFactory::GetDescription()
A.3.5 CADISimulationFactory::GetParameterInfos()
A.3.6 CADISimulationFactory::Instantiate()
A.4 CADIErrorCallback class
A.4.1 CADIErrorCallback class definition
A.4.2 CADIErrorCallback::Error()
A.5 CADISimulationCallback class
A.5.1 CADISimulationCallback class definition
A.5.2 CADISimulationCallback::simMessage()
A.5.3 CADISimulationCallback::simShutdown()
A.5.4 CADISimulationCallback::simKilled()
A.6 CADISimulation class
A.6.1 CADISimulation class definition
A.6.2 CADISimulation::IFNAME()
A.6.3 CADISimulation::IFREVISION()
A.6.4 CADISimulation::Release()
A.6.5 CADISimulation::AddCallbackObject()
A.6.6 CADISimulation::RemoveCallbackObject()
A.6.7 CADISimulation::GetTargetInfos()
A.6.8 CADISimulation::GetTarget()
A.7 CADICallbackObj class
A.7.1 CADICallbackObj class declaration
A.7.2 CADICallbackObj::appliOpen()
A.7.3 CsADICallbackObj::appliInput()
A.7.4 CADICallbackObj::appliOutput()
A.7.5 CADICallbackObj::appliClose()
A.7.6 CADICallbackObj::doString()
A.7.7 CADICallbackObj::modeChange()
A.7.8 CADICallbackObj::reset()
A.7.9 CADICallbackObj::cycleTick()
A.7.10 CADICallbackObj::killInterface()
A.7.11 CADICallbackObj::bypass()
A.7.12 CADICallbackObj::lookupSymbol()
A.7.13 CADICallbackObj::refresh()
A.8 CADI class
A.8.1 Methods in the CADI class
A.8.2 Component CADI class declaration
A.8.3 The CADI class constructor
A.8.4 CADI::CADIXfaceGetFeatures()
A.8.5 CADI::CADIXfaceGetError()
A.8.6 CADI::CADIGetDisassembler()
A.8.7 CADI::CADIXfaceAddCallback()
A.8.8 CADI::CADIXfaceRemoveCallback()
A.8.9 CADI::CADIXfaceBypass()
A.8.10 CADI::CADIGetTargetInfo()
A.8.11 CADI::CADIGetParameterInfo()
A.8.12 CADI::CADIGetParameterValues()
A.8.13 CADI::CADIGetParameters()
A.8.14 CADI::CADISetParameters()
A.8.15 CADI::CADIRegGetGroups()
A.8.16 CADI::CADIRegGetMap()
A.8.17 CADI::CADIRegGetCompound()
A.8.18 CADI::CADIRegWrite()
A.8.19 CADI::CADIRegRead()
A.8.20 CADI::CADIGetPC()
A.8.21 CADI::CADIGetCommittedPCs()
A.8.22 CADI::CADIMemGetSpaces()
A.8.23 CADI::CADIMemGetBlocks()
A.8.24 CADI::CADIMemRead()
A.8.25 CADI::CADIMemWrite()
A.8.26 CADI::CADIMemGetOverlays()
A.8.27 CADI::VirtualToPhysical()
A.8.28 CADI::PhysicalToVirtual()
A.8.29 CADI::CADIGetCacheInfo()
A.8.30 CADI::CADICacheRead()
A.8.31 CADI::CADICacheWrite()
A.8.32 About the CADI execution modes
A.8.33 CADI::CADIExecGetModes()
A.8.34 CADI::CADIExecGetResetLevels()
A.8.35 CADI::CADIExecSetMode()
A.8.36 CADI::CADIExecGetMode()
A.8.37 CADI::CADIExecSingleStep()
A.8.38 CADI::CADIExecReset()
A.8.39 CADI::CADIExecContinue()
A.8.40 CADI::CADIExecStop()
A.8.41 CADI::CADIExecGetExceptions()
A.8.42 CADI::CADIExecAssertException()
A.8.43 CADI::CADIExecGetPipeStages()
A.8.44 CADI::CADIExecGetPipeStageFields()
A.8.45 CADI::CADIExecLoadApplication()
A.8.46 CADI::CADIExecUnLoadApplication()
A.8.47 CADI::CADIExecGetLoadedApplication()
A.8.48 CADI::CADIGetInstructionCount()
A.8.49 CADI::CADIGetCycleCount()
A.8.50 CADI::CADIBptGetList()
A.8.51 Special purpose registers with permanent breakpoints for vector catching with CADIBptGetList()
A.8.52 CADI::CADIBptRead()
A.8.53 CADI::CADIBptSet()
A.8.54 CADI::CADIBptClear()
A.8.55 CADI::CADIBptConfigure()
A.9 CADIDisassemblerCB class
A.9.1 CADIDisassemblerCB class definition
A.9.2 CADIDisassemblerCB::IFNAME()
A.9.3 CADIDisassemblerCB::IFREVISION()
A.9.4 CADIDisassemblerCB::ReceiveModeName()
A.9.5 CADIDisassemblerCB::ReceiveSourceReference()
A.9.6 CADIDisassemblerCB::ReceiveDissassembly()
A.10 CADIDisassembler class
A.10.1 CADIDisassembler class definition
A.10.2 CADIDisassembler::GetType()
A.10.3 CADIDisassembler::GetModeCount()
A.10.4 CADIDisassembler::GetModeNames()
A.10.5 CADIDisassembler::GetCurrentMode()
A.10.6 CADIDisassembler::GetSourceReferenceForAddress()
A.10.7 CADIDisassembler::GetAddressForSourceReference()
A.10.8 CADIDisassembler::GetDisassembly()
A.10.9 CADIDisassembler::GetInstructionType()
A.10.10 CADIDisassembler::ObtainInterface()
A.11 CADIProfilingCallbacks class
A.11.1 CADIProfilingCallbacks class definition
A.11.2 CADIProfilingCallbacks::profileResourceAccess()
A.11.3 CADIProfilingCallbacks::profileRegisterHazard()
A.12 CADIProfiling class
A.12.1 CADIProfiling class definition
A.12.2 CADIProfiling::CADIProfileSetup()
A.12.3 CADIProfiling::CADIProfileControl()
A.12.4 CADIProfiling::CADIProfileTraceControl()
A.12.5 CADIProfiling::CADIProfileGetExecution()
A.12.6 CADIProfiling::CADIProfileGetMemory()
A.12.7 CADIProfiling::CADIProfileGetTrace()
A.12.8 CADIProfiling::CADIProfileGetRegAccesses()
A.12.9 CADIProfiling::CADIProfileSetRegAccesses()
A.12.10 CADIProfiling::CADIProfileGetMemAccesses()
A.12.11 CADIProfiling::CADIProfileSetMemAccesses()
A.12.12 CADIProfiling::CADIProfileGetAddrExecutionFrequency()
A.12.13 CADIProfiling::CADIProfileSetAddrExecutionFrequency()
A.12.14 CADIProfiling::CADIGetNumberOfInstructions()
A.12.15 CADIProfiling::CADIProfileInitInstructionResultArray()
A.12.16 CADIProfiling::CADIProfileGetInstructionExecutionFrequency()
A.12.17 CADIProfiling::CADIProfileSetInstructionExecutionFrequency()
A.12.18 CADIProfiling::CADIRegisterProfileResourceAccess()
A.12.19 CADIProfiling::CADIUnregisterProfileResourceAccess()
A.12.20 CADIProfiling::CADIProfileRegisterCallBack()
A.12.21 CADIProfiling::CADIProfileUnregisterCallBack()
B Data Structure Reference
B.1 Factory simulation startup and configuration
B.1.1 CADIReturn_t
B.1.2 CADIFactoryErrorCode_t
B.1.3 CADIFactorySeverityCode_t
B.1.4 CADISimulationInfo_t
B.1.5 CADIParameterInfo_t
B.1.6 CADIParameterValue_t
B.1.7 CADITargetFeatures_t
B.1.8 CADICallbackType_t
B.1.9 CADIRefreshReason_t
B.2 Registers and memory
B.2.1 CADIReg_t
B.2.2 CADIRegInfo_t
B.2.3 CADIRegDisplay_t
B.2.4 CADIRegSymbols_t
B.2.5 CADIRegAccessAttribute_t
B.2.6 CADIRegType_t
B.2.7 CADIRegDetails_t
B.2.8 CADIRegGroup_t
B.2.9 CADIMemSpaceInfo_t
B.2.10 CADIMemBlockInfo_t
B.2.11 CADIAddr_t
B.2.12 CADIMemReadWrite_t
B.2.13 CADIAddrComplete_t
B.2.14 CADICacheInfo_t
B.3 Breakpoints and execution control
B.3.1 CADIBptRequest_t
B.3.2 CADIBptCondition_t and CADIBptConditionOperator_t
B.3.3 Thread-aware breakpoints using CONTEXTIDR
B.3.4 CADIBptDescription_t
B.3.5 CADIBptConfigure_t
B.3.6 CADIExecMode_t
B.3.8 CADIResetLevel_t
B.3.9 CADIException_t
B.3.10 CADIExceptionAction_t
B.4 Pipelines
B.4.1 CADIPipeStage_t
B.4.2 CADIPipeStageContentInfo_t
B.5 Disassembly
B.5.1 CADIDisassemblerStatus
B.5.2 CADIDisassemblerType
B.5.3 CADIDisassemblerInstructionType
B.6 Semihosting and message output
B.6.1 CADISemiHostingInputChannelType_t
B.6.2 CADISemiHostingInputChannel_t
B.6.3 CADIConsoleChannel_t
B.6.4 CADIStreamId
B.7 Profiling and tracing
B.7.1 CADIProfileResultType_t
B.7.2 CADIProfileResults_t
B.7.3 CADIProfileRegion_t
B.7.4 CADIProfileType_t
B.7.5 CADIProfileControl_t
B.7.6 CADIRegProfileResults_t
B.7.7 CADIMemProfileResults_t
B.7.8 CADIInstructionProfileResults_t
B.7.9 CADIProfileResourceAccessType_t
B.7.10 CADIProfileHazardTypes_t
B.7.11 CADIProfileHazardDescription_t
B.7.12 CADITraceControl_t
B.7.13 CADITraceBufferControl_t
B.7.14 CADITraceOverlayControl_t
B.7.15 CADITraceBlockType_t
B.7.16 CADITraceBlock_t

Release Information

Document History
Issue Date Confidentiality Change
A 31 May 2014 Non-Confidential New document for Fast Models v9.0 based on DUI0444L for v8.3.
B 30 November 2014 Non-Confidential Update for v9.1.
C 28 February 2015 Non-Confidential Update for v9.2.
D 31 May 2015 Non-Confidential Update for v9.3.

Non-Confidential Proprietary Notice

This document is protected by copyright and other related rights and the practice or implementation of the information contained in this document may be protected by one or more patents or pending patent applications. No part of this document may be reproduced in any form by any means without the express prior written permission of ARM. No license, express or implied, by estoppel or otherwise to any intellectual property rights is granted by this document unless specifically stated.
Your access to the information in this document is conditional upon your acceptance that you will not use or permit others to use the information for the purposes of determining whether implementations infringe any third party patents.
THIS DOCUMENT IS PROVIDED “AS IS”. ARM PROVIDES NO REPRESENTATIONS AND NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY, SATISFACTORY QUALITY, NON-INFRINGEMENT OR FITNESS FOR A PARTICULAR PURPOSE WITH RESPECT TO THE DOCUMENT. For the avoidance of doubt, ARM makes no representation with respect to, and has undertaken no analysis to identify or understand the scope and content of, third party patents, copyrights, trade secrets, or other rights.
This document may include technical inaccuracies or typographical errors.
This document consists solely of commercial items. You shall be responsible for ensuring that any use, duplication or disclosure of this document complies fully with any relevant export laws and regulations to assure that this document or any portion thereof is not exported, directly or indirectly, in violation of such export laws. Use of the word “partner” in reference to ARM’s customers is not intended to create or refer to any partnership relationship with any other company. ARM may make changes to this document at any time and without notice.
If any of the provisions contained in these terms conflict with any of the provisions of any signed written agreement covering this document with ARM, then the signed written agreement prevails over and supersedes the conflicting provisions of these terms. This document may be translated into other languages for convenience, and you agree that if there is any conflict between the English version of this document and any translation, the terms of the English version of the Agreement shall prevail.
Copyright © [2014, 2015], ARM Limited or its affiliates. All rights reserved.
ARM Limited. Company 02557590 registered in England.
110 Fulbourn Road, Cambridge, England CB1 9NJ.

Confidentiality Status

This document is Non-Confidential. The right to use, copy and disclose this document may be subject to license restrictions in accordance with the terms of the agreement entered into by ARM and the party that ARM delivered this document to.
Unrestricted Access is an ARM internal classification.

Product Status

The information in this document is Final, that is for a developed product.

Web Address

Non-ConfidentialPDF file icon PDF versionARM DUI0842D
Copyright © 2014, 2015 ARM. All rights reserved.