Iris Developer Guide

Version 1.0


Table of Contents

Preface
About this book
Using this book
Glossary
Typographic conventions
Feedback
Other information
1 Iris overview
1.1 Overview
1.2 References
1.3 Terms and abbreviations
1.4 Interfaces and communication
1.5 Iris specification changelog
1.6 IrisSupportLib changelog
2 Iris examples
2.1 C++ client examples
2.2 DummyModel example
2.3 Plug-in examples
2.4 Python examples
3 Generic function call interface
3.1 JSON data types
3.2 JSON-RPC 2.0 function call format
3.3 Synchronous and asynchronous behavior
3.4 Sending a request, a notification, and a response
3.5 U64JSON
3.5.1 U64JSON format
3.5.2 Container length
3.5.3 Endianness
3.5.4 Signedness and integer representation
3.5.5 Numbers with arbitrary size and precision
3.5.6 Optimizations and normalized form
3.5.7 U64JSON examples
3.6 Function call optimizations
3.6.1 Fast argument parsing using sorted arguments
3.6.2 String comparison and hashing
3.7 IrisC interface
3.7.1 Memory and interface ownership
3.7.2 IrisCore lifecycle functions
3.7.3 IrisClient lifecycle functions
3.7.4 General IrisC functions
3.7.5 Plug-in API
3.8 IrisRpc (RPC transport layer)
3.8.1 IrisRpc connection handshake
3.8.2 Rejecting a connection request
3.8.3 Supported formats
3.8.4 IrisRpc message format
3.8.5 TCP considerations
3.9 JSON-RPC 2.0 over HTTP
3.9.1 Recognizing a session as JSON-RPC HTTP
3.9.2 Persistent connections
3.10 Threading model and ordering
3.10.1 Asynchronous functions
3.10.2 Reentrancy
3.10.3 Ordering rules for requests, notifications, and responses
4 Object model
4.1 Object model overview
4.2 Instances
5 Iris APIs
5.1 Iris API documentation
5.2 Naming conventions
5.3 instId argument
5.4 Compatibility rules for function callers and callees
5.5 Iris-text-format
5.5.1 Format strings
5.5.2 References to variables
5.5.3 Conditional formatting
5.6 Resources API
5.6.1 Parameters and registers
5.6.2 Resource groups
5.6.3 Registers with fields
5.6.4 Resource names
5.6.5 Reading a resource
5.6.6 Writing a resource
5.6.7 ElfDwarf scheme for canonical register numbers
5.6.8 ElfDwarf canonical register numbers
5.6.9 Comparison of resource types
5.6.10 Exposure of parameters
5.6.11 resource_getList()
5.6.12 resource_getListOfResourceGroups()
5.6.13 resource_read()
5.6.14 resource_write()
5.6.15 ParameterInfo
5.6.16 RegisterInfo
5.6.17 ResourceGroupInfo
5.6.18 ResourceInfo
5.6.19 ResourceReadResult
5.6.20 ResourceTags
5.6.21 ResourceWriteResult
5.7 Memory API
5.7.1 Memory accesses
5.7.2 Errors
5.7.3 Endianness
5.7.4 Memory spaces
5.7.5 Side effects
5.7.6 Canonical memory space number scheme
5.7.7 Memory access attributes
5.7.8 Reading and writing memory
5.7.9 Reading and writing through caches and buffers
5.7.10 Address translation
5.7.11 Memory sideband information
5.7.12 memory_getMemorySpaces()
5.7.13 memory_getSidebandInfo()
5.7.14 memory_getUsefulAddressTranslations()
5.7.15 memory_read()
5.7.16 memory_translateAddress()
5.7.17 memory_write()
5.7.18 MemoryAddressTranslationResult
5.7.19 MemoryReadResult
5.7.20 MemorySpaceInfo
5.7.21 MemorySupportedAddressTranslationResult
5.7.22 MemoryWriteResult
5.8 Disassembly API
5.8.1 Disassembling chunks of memory
5.8.2 Disassembling opcodes
5.8.3 disassembler_disassembleOpcode()
5.8.4 disassembler_getCurrentMode()
5.8.5 disassembler_getDisassembly()
5.8.6 disassembler_getModes()
5.8.7 DisassemblyLine
5.8.8 DisassemblyMode
5.9 Tables API
5.9.1 Table cell types
5.9.2 table_getList()
5.9.3 table_read()
5.9.4 table_write()
5.9.5 TableCellError
5.9.6 TableColumnInfo
5.9.7 TableInfo
5.9.8 TableReadResult
5.9.9 TableRecord
5.9.10 TableWriteResult
5.10 Image loading and saving API
5.10.1 Loading an image
5.10.2 Saving an image
5.10.3 image_loadDataRead() callback
5.10.4 image_clearMetaInfoList()
5.10.5 image_getMetaInfoList()
5.10.6 image_loadData()
5.10.7 image_loadDataPull()
5.10.8 image_loadDataRead()
5.10.9 image_loadFile()
5.10.10 ImageMetaInfo
5.10.11 ImageReadResult
5.11 Simulation time execution control API
5.11.1 Starting and stopping simulation time
5.11.2 simulationTime_get()
5.11.3 simulationTime_run()
5.11.4 simulationTime_stop()
5.11.5 Event source IRIS_SIMULATION_TIME_EVENT
5.12 Debuggable state API
5.12.1 Debuggable state flags
5.12.2 Reaching debuggable state
5.12.3 Testing whether a model has reached debuggable state
5.12.4 Support for the debuggable state API
5.12.5 debuggableState_getAcknowledge()
5.12.6 debuggableState_setRequest()
5.12.7 simulationTime_runUntilDebuggableState()
5.13 Stepping API
5.13.1 Step units
5.13.2 Step counters
5.13.3 Examples
5.13.4 step_getRemainingSteps()
5.13.5 step_getStepCounterValue()
5.13.6 step_setup()
5.14 Per-instance execution control API
5.14.1 perInstanceExecution_getState()
5.14.2 perInstanceExecution_getStateAll()
5.14.3 perInstanceExecution_setState()
5.14.4 perInstanceExecution_setStateAll()
5.15 Breakpoints API
5.15.1 Breakpoint actions and trace points
5.15.2 Other ways to stop simulation time
5.15.3 breakpoint_delete()
5.15.4 breakpoint_getAdditionalConditions()
5.15.5 breakpoint_getList()
5.15.6 breakpoint_set()
5.15.7 BreakpointAction
5.15.8 BreakpointConditionInfo
5.15.9 BreakpointInfo
5.15.10 Event source IRIS_BREAKPOINT_HIT
5.16 Notification and discovery of state changes API
5.16.1 Event source IRIS_STATE_CHANGED
5.17 Events and trace API
5.17.1 Ring buffers
5.17.2 References in event source fields
5.17.3 Creating and destroying event streams
5.17.4 Event callback functions
5.17.5 Event counter
5.17.6 ec_FOO()
5.17.7 eventRingBuffer_clear()
5.17.8 eventRingBuffer_init()
5.17.9 eventRingBuffer_putBufferedEvents()
5.17.10 eventRingBuffer_read()
5.17.11 eventStream_create()
5.17.12 eventStream_destroy()
5.17.13 eventStream_disable()
5.17.14 eventStream_enable()
5.17.15 eventStream_getCounter()
5.17.16 eventStream_getState()
5.17.17 eventStream_setTraceRanges()
5.17.18 event_getEventSource()
5.17.19 event_getEventSources()
5.17.20 EventCounterMode
5.17.21 EventSourceFieldInfo
5.17.22 EventSourceInfo
5.17.23 EventState
5.17.24 TraceEventData
5.18 Semihosting API
5.18.1 Basic stdin, stdout, and stderr support
5.18.2 Enabling semihosting input
5.18.3 Extending or replacing the semihosting implementation
5.18.4 semihosting_notImplemented()
5.18.5 semihosting_provideInputData()
5.18.6 semihosting_return()
5.18.7 Event source IRIS_SEMIHOSTING_OUTPUT
5.18.8 Event source IRIS_SEMIHOSTING_INPUT_REQUEST
5.18.9 Event source IRIS_SEMIHOSTING_INPUT_UNBLOCKED
5.18.10 Event source IRIS_SEMIHOSTING_CALL
5.18.11 Event source IRIS_SEMIHOSTING_CALL_EXTENSION
5.19 Simulation accuracy (sync levels) API
5.19.1 Sync points
5.19.2 syncLevel_get()
5.19.3 syncLevel_release()
5.19.4 syncLevel_request()
5.19.5 SyncLevelState
5.20 Instance registry, instance discovery, and interface discovery API
5.20.1 Hierarchical instance names and instance classes
5.20.2 Registering instances
5.20.3 Unregistering instances
5.20.4 Instance properties
5.20.5 Interface discovery
5.20.6 Use cases for instance_ping()
5.20.7 Interface versioning
5.20.8 Naming conventions for new functions
5.20.9 instanceRegistry_getInstanceInfoByInstId()
5.20.10 instanceRegistry_getInstanceInfoByName()
5.20.11 instanceRegistry_getList()
5.20.12 instanceRegistry_registerInstance()
5.20.13 instanceRegistry_unregisterInstance()
5.20.14 instance_checkFunctionSupport()
5.20.15 instance_getCppInterfaceIrisInstance()
5.20.16 instance_getFunctionInfo()
5.20.17 instance_getProperties()
5.20.18 instance_ping()
5.20.19 AttributeInfo
5.20.20 CppInterfacePointer
5.20.21 EnumElementInfo
5.20.22 FunctionInfo
5.20.23 FunctionSupportRequest
5.20.24 InstanceInfo
5.20.25 Event source IRIS_INSTANCE_REGISTRY_CHANGED
5.21 Simulation instantiation and discovery API
5.21.1 Connecting to a running simulation using IPC
5.21.2 Instantiating a new simulation, in-process
5.21.3 Instantiation parameters
5.21.4 Setting instantiation parameter values
5.21.5 simulation_getInstantiationParameterInfo()
5.21.6 simulation_instantiate()
5.21.7 simulation_requestShutdown()
5.21.8 simulation_reset()
5.21.9 simulation_setInstantiationParameterValues()
5.21.10 simulation_waitForInstantiation()
5.21.11 InstantiationError
5.21.12 InstantiationParameterValue
5.21.13 InstantiationResult
5.21.14 SimulationTimeObject
5.21.15 Event source IRIS_SIMULATION_SHUTDOWN_ENTER
5.21.16 Event source IRIS_SIMULATION_SHUTDOWN_LEAVE
5.22 Plug-in loading and instantiation API
5.22.1 plugin_getInstantiationParameterInfo()
5.22.2 plugin_instantiate()
5.22.3 plugin_load()
5.23 TCP server management API
5.23.1 tcpServer_getPort()
5.23.2 tcpServer_start()
5.23.3 tcpServer_stop()
5.23.4 service_connect()
5.23.5 service_disconnect()
6 Response error codes
6.1 Function-specific error codes
6.2 Function-independent error codes

Release Information

Document History
Issue Date Confidentiality Change
0100-00 23 November 2018 Non-Confidential New document.
0100-01 26 February 2019 Non-Confidential Update for v11.6.
0100-02 17 May 2019 Non-Confidential Update for v11.7.
0100-03 05 September 2019 Non-Confidential Update for v11.8.
0100-04 28 November 2019 Non-Confidential Update for v11.9.

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.

TO THE EXTENT NOT PROHIBITED BY LAW, IN NO EVENT WILL ARM BE LIABLE FOR ANY DAMAGES, INCLUDING WITHOUT LIMITATION ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF ANY USE OF THIS DOCUMENT, EVEN IF ARM HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

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 click through or signed written agreement covering this document with Arm, then the click through or 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.

The Arm corporate logo and words marked with ® or ™ are registered trademarks or trademarks of Arm Limited (or its subsidiaries) in the US and/or elsewhere. All rights reserved. Other brands and names mentioned in this document may be the trademarks of their respective owners. Please follow Arm’s trademark usage guidelines at http://www.arm.com/company/policies/trademarks.

Copyright © 2018, 2019 Arm Limited (or its affiliates). All rights reserved.

Arm Limited. Company 02557590 registered in England.

110 Fulbourn Road, Cambridge, England CB1 9NJ.

LES-PRE-20349

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 version101196_0100_04_en
Copyright © 2018, 2019 Arm Limited or its affiliates. All rights reserved.