Running/Debugging the AI Engine Component - 2023.1 English

Vitis Unified IDE and Common Command-Line Reference Manual (UG1553)

Document ID
UG1553
Release Date
2023-07-17
Version
2023.1 English

In the Flow Navigator, after the AI Engine component has been successfully built, you can run or debug the component under the X86 simulation or AI Engine Simulator/Hardware build targets as shown below.

Figure 1. Debug AI Engine
Tip: If multiple components are listed in the Flow Navigator drop-down, you must select the AI Engine component to make it active in the tool.

In the figure above, the Open Settings button can be used to open a launch configuration for running or debugging the AI Engine component. This button only appears when hovering above the Run or Debug commands in Flow Navigator. Clicking Open Settings opens the launch.json containing the different launch configurations for the component as described below. You can also choose to run or debug a build target without opening the launch.json file by simply selecting Run or Debug and using the default launch configuration.

Important: You can only debug AI Engine components compiled with debug option (-g).

Launch configurations are shown in the launch.json image below:

  • aie_component_x86: Supports running or debugging the x86 Simulation build
  • aie_component_aiesim: Supports running or debugging the AI Engine Simulator/Hardware build. This is the launch configuration currently selected and displayed
Tip: You can create new launch configurations by selecting the Duplicate command next to an existing launch configuration, and delete existing configurations by selecting the Delete command.
Figure 2. AI Engine Launch Configuration

The image above displays the details of the currently selected launch configuration with the following options:

  • Launch config name: Specifies the name. Select the Edit command to change the name.
  • Target: Specifies the name of the build target used by the launch configuration. The target cannot be changed.
  • Enable Pipeline View: Generates the Pipeline view of the AI Engine array during run or debug.
  • Package directory: Specifies the directory to use when packaging the AI Engine component. The default directory is the ./Work directory, but might need to be changed if a different work directory (-workdir) was specified during the build.
  • Input directory: Specifies the location of any input data used by the component during run or debug.
  • Additional arguments: Specifies any additional command line arguments needed by the AI Engine component during run or debug.
  • Trace Options: Enables trace capture during run or debug, and specifies options for trace. Refer to Enabling AI Engine Trace for additional information.
  • Profile Options: Enables profiling during run or debug, and specifies options for profile. Refer to Enabling AI Engine Profile for details on the options.

After setting up the launch configuration, you can launch run or debug by selecting the Run or Debug commands in the launch.json, or by selecting Run or Debug from the Flow Navigator and specifying a launch configuration if more than one is available for the build target.

Tip: If there are unsaved changes to the launch configuration the tool will prompt you to save prior to running.

During the run process the output of x86simulator or aiesimulator is reported to the console. You can review the transcript in real time, or refer to the log file generated after the run is complete. You can open the log file for the simulator by navigating to the component Output/hw or Output/x86sim folders in the Component Explorer view.

During the debug process, the tool opens the Debug view as explained in Debugging an AI Engine Component.

After successfully running or debugging the AI Engine component, the Flow Navigator will display a series of reports generated during the process. The available reports will vary depending on the build target of x86 or hw. You can select any of the available reports to view, or switch to the Analysis view to complete a review of the reports. Refer to Working with the Analysis View (Vitis Analyzer) for details of the Analysis view and a review of the available reports.