In the AI Engine application development flow, it is common to build and simulate the AI Engine graph application using the command line (with a Makefile or config file-based approach). However, to debug and analyze the results, it is recommended that you use the AMD Vitis™ Unified IDE. The Vitis IDE provides a user-managed flow that uses the pre-compiled results from the command-line in the IDE for debug and analysis. This section provides a methodology to migrate your AI Engine graph application from the command line interface to the Vitis Unified IDE.
To migrate your command-line project to the Vitis Unified IDE:
- Launch the Vitis tool and select Set Workspace from the Welcome page.
- Navigate to and select the directory where the command-line based
AI Engine graph
application is built.
The IDE recognizes that there are no managed components in the directory and switches to the user-managed flow.
Analyzing Results
In a user-managed flow in the Vitis IDE, you can analyze project results as follows:
- In
the Vitis Unified IDE, note the following two
views:
- Vitis Component Explorer
- In this view, the directory opens, displaying
several output directories that are generated after compiling and/or
simulating the AI Engine graph.
The AI Engine compile output from the command-line flow is located in the
Work/
directory available in the Vitis IDE. A LST file and a mapping file available in the Work/ directory was generated by the AI Engine compiler for each active AI Engine core. - Flow Navigator
- In this view, you can access options for building, running, and debugging the design.
- From the toolbar to the left of the screen, click the
Graph button to
open the Analysis
View to examine the results.
In the Analysis view, you can view and analyze all summary files in the current workspace.
Debugging the AI Engine Code
You can debug the AI Engine code in the user-managed flow in the Vitis IDE as follows:
- First, create and add a launch configuration. To do so:
- In the Component Explorer or Flow Navigator view, right-click and select Edit launch configuration.
- Select New launch configuration.
- In the Create Launch Configuration dialog box, specify the build directory with the AI Engine compile summary files, and click Submit.
- Enter a name for the launch configuration, and enable trace and profile settings as needed. For more information about trace and profile options, see Profiling and Debugging the Application in the Data Center Acceleration using Vitis (UG1700).
- In the Flow Navigator, select Debug, and set breakpoints in the source code. Using the
breakpoints, step through the code and observe the contents of registers and memory in
the Register
Inspector
and Memory
Inspector
views,
respectively.
- You can recompile the AI Engine graph application in the user-managed flow with
the steps below:
- In the Explorer view, right-click and select Edit Build Configurations.
- Select New Build Configuration.
- Optionally, edit the default configuration name, and
add a build command.
The build command you enter in the Build command field is the build command from your Makefile, for example
make aie TARGET=x86sim
, as shown below.