Understanding the Iris Debug Interface and Its Support Library
The Iris debug interface is a powerful tool for debugging ARM-based System-on-Chip (SoC) designs, offering a robust framework for connecting debuggers, clients, and plugins to simulation models or real hardware. The Iris Support Library (libIrisSupport.a or libIrisSupport.lib) is a critical component that facilitates this interaction. It provides the necessary APIs and infrastructure to develop custom debug tools, plugins, or clients that can interface with the Iris protocol. However, accessing and utilizing this library requires a clear understanding of its integration within the ARM ecosystem, particularly with tools like Fast Models.
The Iris Support Library is typically delivered as part of the ARM Fast Models product, which is a suite of simulation models for ARM processors and subsystems. Fast Models enable developers to simulate ARM-based systems at a high level of abstraction, making it an ideal environment for early software development, hardware/software co-design, and debugging. The Iris interface, integrated into Fast Models, allows users to connect external debuggers or custom tools to the simulation, enabling real-time debugging and analysis.
To begin using the Iris Support Library, developers must first ensure they have access to the Fast Models product. This involves obtaining the appropriate license and downloading the Fast Models package from the ARM developer website. Once installed, the Iris Support Library can be found in the $IRIS_HOME directory, which is part of the Fast Models installation. The library is provided in both precompiled binary form (libIrisSupport.a for Unix-like systems and libIrisSupport.lib for Windows) and as source code, allowing for customization if needed.
Requirements and Prerequisites for Accessing the Iris Support Library
Accessing the Iris Support Library is contingent upon several prerequisites, primarily revolving around the acquisition and setup of the ARM Fast Models product. The Fast Models package is a commercial product, and as such, it requires a valid license for access. Developers interested in using the Iris Support Library must first obtain this license, which can be done through ARM’s official website or by contacting ARM’s sales and support teams.
Once the Fast Models product is licensed and installed, the Iris Support Library becomes accessible within the installation directory. Specifically, the library is located in the $IRIS_HOME/<OS_Compiler>/ directory, where <OS_Compiler> corresponds to the operating system and compiler combination being used (e.g., Linux-GCC, Windows-MSVC). The library is provided in both binary and source forms, with the binary form being precompiled and ready for immediate use, while the source form allows for customization and adaptation to specific needs.
In addition to the Fast Models product, developers must also ensure that their development environment is properly configured to use the Iris Support Library. This includes setting up the necessary environment variables, such as $IRIS_HOME, which points to the root directory of the Iris installation. Furthermore, developers must have the appropriate compiler and build tools installed, as the library may need to be rebuilt if modifications are made to the source code.
For those looking to develop custom tools or plugins using the Iris Support Library, familiarity with C++ or Python is essential. The library provides examples and templates for both languages, located in the $IRIS_HOME/Examples/Client and $IRIS_HOME/Python/Examples directories, respectively. These examples serve as starting points for developing custom debuggers, clients, or plugins that can interface with the Iris protocol.
Steps to Develop and Integrate Custom Tools with the Iris Support Library
Developing custom tools or plugins using the Iris Support Library involves several steps, from setting up the development environment to writing and integrating the custom code. The process begins with the installation and configuration of the Fast Models product, as outlined in the previous section. Once the environment is set up, developers can proceed with the following steps to create and integrate their custom tools.
The first step is to familiarize oneself with the Iris protocol and the APIs provided by the Iris Support Library. The library’s documentation, available in the Fast Models installation directory, provides detailed information on the available functions, data structures, and usage patterns. Developers should start by reviewing the examples provided in the $IRIS_HOME/Examples/Client and $IRIS_HOME/Python/Examples directories, as these demonstrate the basic usage of the library and serve as templates for custom development.
For C++ developers, the process typically involves creating a new project or modifying an existing one to include the Iris Support Library. This requires linking against the precompiled library (libIrisSupport.a or libIrisSupport.lib) and including the necessary header files. The Makefile provided in the examples directory can be used as a reference for setting up the build configuration. Developers should ensure that their project is correctly configured to use the same compiler and build tools as the library, as mismatches can lead to compatibility issues.
Python developers, on the other hand, can take advantage of the Python bindings provided by the Iris Support Library. These bindings allow for the development of custom tools and plugins using Python, which can be particularly useful for rapid prototyping and scripting. The Python examples in the $IRIS_HOME/Python/Examples directory demonstrate how to use these bindings to interact with the Iris protocol. Developers should ensure that their Python environment is correctly configured to include the Iris Support Library, which may involve setting the PYTHONPATH environment variable to include the appropriate directories.
Once the development environment is set up and the basic usage of the library is understood, developers can proceed with writing their custom code. This typically involves implementing the necessary logic to connect to the Iris interface, send commands, and receive responses. The Iris Support Library provides a range of functions for these purposes, including functions for establishing connections, sending and receiving messages, and handling errors. Developers should refer to the library’s documentation for detailed information on these functions and their usage.
After the custom code is written, it must be integrated with the Fast Models simulation environment. This involves configuring the simulation model to use the custom tool or plugin, which may require modifying the model’s configuration files or command-line arguments. The exact steps for this integration depend on the specific use case and the nature of the custom tool. Developers should refer to the Fast Models documentation for guidance on integrating external tools and plugins.
Finally, the custom tool or plugin must be tested to ensure that it functions correctly and interacts with the Iris interface as expected. This involves running the simulation with the custom tool or plugin enabled and verifying that the desired behavior is achieved. Developers should pay close attention to any error messages or warnings generated by the Iris Support Library, as these can provide valuable insights into potential issues. If problems are encountered, the library’s documentation and examples can be used as references for troubleshooting and resolving the issues.
In summary, developing and integrating custom tools with the Iris Support Library involves a series of steps, from setting up the development environment to writing and testing the custom code. By following these steps and leveraging the resources provided by the Fast Models product, developers can create powerful and flexible tools for debugging and analyzing ARM-based SoC designs.