Non-Class-Based Kernels - 2024.1 English

Vitis Model Composer User Guide (UG1483)

Document ID
Release Date
2024.1 English

To Import a non-class-based AI Engine kernel as a block into Vitis Model Composer, you need to use an AI Engine Kernel block from the AI Engine Library as shown.

Figure 1. AI Engine Kernel Generated by Your Tool

Double-clicking the block symbol displays the parameters of the AI Engine kernel block as shown in the following figure.

Figure 2. Block Parameters Dialog Box: AIE Kernel

The block mask parameters need to be updated to import the kernel function as a block. The following table provides details on the parameters and description for each parameter.

Table 1. AIE Kernel: Parameters
Parameter Name Parameter Type Criticality Description
Kernel header file String Mandatory

Name of the header file that contains the kernel function declaration. The string could be just the file name, a relative path to the file, or an absolute path of the file. Use the Browse button to navigate to the file.

Kernel function String Mandatory Name of the kernel function for which the block is to be created. This function should be declared in the kernel header file.
Kernel init function String Optional Name of the initialization function used by the kernel function.
Kernel source file String Mandatory

Name of the source file that contains the kernel function definition. The string could be the file name, a relative path to the file or an absolute path of the file.

Kernel search paths Vector of Strings Optional

If the kernel header file or the kernel source file are not found using the value provided through Kernel header file or Kernel source file fields, respectively, then the paths provided through Kernel search paths are used to find the files.

This parameter allows the use of environment variables while specifying paths for the kernel header file and the kernel source file. The environment variable can be used in either ${ENV} or $ENV format.

Preprocessor options   Optional

Optional preprocessor arguments for downstream compilation with specific preprocessor options.

The following two preprocessor option formats are accepted and multiple can be selected: -D<name> and D<name>=<definition> separated by a comma. That is, the optional argument must begin with -D and if the option <definition> value is not provided, it is assumed to be 1.

The block parameter window which appears after double-clicking on the AI Engine kernel block is same irrespective of whether the kernel is Window type or Stream type. But the function configuration parameters changes for Window and Stream type. To edit the code in the MATLAB editor, click Edit (immediately after the browse button).