Creating an 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

There are a number of ways to create an AI Engine component in the new Vitis Unified IDE. The following steps describe the recommended approach. For a description of the views and pages mentioned in the steps below, see Using the Vitis Unified IDE in Vitis Unified Software Platform Documentation: Application Acceleration Development (UG1393).

  1. With the Vitis Unified IDE opened, from the main menu select File > New Component > AI Engine.
    Tip: You can also select the New Component command from the Welcome page, or from the right-click menu in the Explorer view.

    This opens the Choose Name and Location page of the Create AI Engine Component wizard as shown below.

    Figure 1. Create AI Engine Component - Name and Location

    Tip: The images shown here are taken from the light theme of the Vitis Unified IDE. The default theme is the dark theme so your screens might appear different. You can change the color theme using the File > Preferences > Color Theme menu command.
  2. Enter a Component name and Component location and click Next. This opens the Add Sources page of the wizard as shown below.
    Figure 2. Create AI Engine Component - Source Files

  3. Select Import Sources to import by file or by folder. Adding a folder will include all of the current files in the folder, as well as sub-directories of the folder.
    Tip: You can also skip this step for now, and add the source files after the AI Engine component is created using the Import command on the component Sources folder in the Component Explorer view as described in Importing Files.
  4. Select the top-level file from the files you have added to the component. The top-level file defines the graph application for the AI Engine component as described in Introduction to Graph Programming in the AI Engine Kernel and Graph Programming Guide (UG1079). The Vitis Unified IDE will automatically identify the top-level file containing the main() function of the graph application, though you should validate its selection before moving on.
  5. Click Next and the Select Part page of the wizard opens.
  6. Select Part, or Platform, or XSA.
  7. Click Next to display the Summary page of the wizard. The Summary page reflects the choices you have made on the prior pages.
  8. Review the summary and click Finish to create the component, or click Back to return to earlier pages and change your selections.

The AI Engine component is created after clicking Finish. The component is opened in the Vitis Unified IDE as shown in the image below. The new component is listed in the Component Explorer view on the left of the screen, and the vitis-comp.json file is opened in the central editor window to the right.

Figure 3. AI Engine Component - vitis-comp.json

The vitis-comp.json is the file that stores the component configuration. It contains the component name, the platform or part the components is built against, the location, compiler settings, top-level file, and config file that define the AI Engine component.

  • Compiler Settings provides access to the CMakeLists.txt file that lets you configure the compilation process.
  • Top-level file provides access to the source code which controls the graph.
  • Config File provides access to the configuration file that defines options for the compilation process used by the v++ --mode aie command to build the AI Engine component. When you create the component the configuration file is populated with default values for many of the options. The next section describes the config file in greater detail.