Building the AI Engine Component - 2024.1 English

AI Engine Tools and Flows User Guide (UG1076)

Document ID
UG1076
Release Date
2024-06-27
Version
2024.1 English

After creating the AI Engine component, you can select the Component in the Flow Navigator to make it the active component in the tool. Then select the Build command under either the X86 Simulation flow or the AI Engine Simulator/Hardware flow as shown in the following image.

Figure 1. Build AI Engine Components

An AI Engine component in the IDE uses the new v++ --mode aie feature of the common command-line for compilation as described in v++ Mode AI Engine. The component is run in either x86simulator or aiesimulator depending on the target of the compilation process, or can be run on the actual hardware device.

The AI Engine compiler supports two build targets:

  • The x86sim target compiles the code for use in the x86 functional simulator.
  • The hw target compiles the code and produces a libadf.a for use in aiesimulator, hardware emulation, or hardware.

The Vitis IDE specifies a work directory (-work_dir) as a sub-directory of the AI Engine component in the Workspace used when launching the IDE called build/<target>/Work. For example: --work_dir ./work_space/aie-component/build/hw/Work. The build/<target> and build/<target>/Work folders are where the output of the build process can be found. The type of output and contents of the output directory depend on the target specified.

Tip: The IDE specifies the work directory and ignores any work_dir specified in a config file.

A transcript of the build process is displayed in the Output console, titled with the component name and the build target: for example aie1::x86sim. When the build is complete you can review the transcript, or the AIECompiler.log file written to the <component>/build/<target> folder. You should see Build Finished successfully in the transcript, or you could see errors reported instead. The Flow Navigator displays a green circle with a check mark in it, or a red circle with an x depending on the results of the build. If the build completes with errors, review the transcript or the log file to determine what might be the cause and rerun the build as needed.

After the build is complete, you can view the microcode produced by the AI Engine compiler as explained in Viewing AI Engine Microcode. This opens the LST (.lst) file which is microcode that corresponds to the kernel code scheduled to be executed on a specific AI Engine tile.

With a successful build the Flow Navigator will display a series of reports generated during the compilation process. You can access the reports by expanding Reports. The available reports will vary depending on the build target of x86sim 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. For details about the available reports, see Working with the Analysis View (Vitis Analyzer) in Vitis Unified Software Platform Documentation: Application Acceleration Development (UG1393).

After the build completes successfully you can choose to Run or Debug the component.