Vitis Model Composer supports importing the C++ kernel class to have constructor parameters for specifying parameter values. You need to use an AIE Class Kernel block from the AI Engine Library as shown.
Double-clicking the block symbol displays the parameters of the AI Engine class kernel block as shown in the following figure.
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.
Parameter Name | Parameter Type | Criticality | Description |
---|---|---|---|
Kernel header file | String | Mandatory | Name of the header file that contains the kernel
class and registerKernelClass method declarations. 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 select the file. This field does not accept environmental variables. |
Kernel class | String | Mandatory | Name of the kernel class which contains member variables and kernel member function. |
Kernel function | String | Mandatory | Name of the kernel member function for which the block is to be created. This function should be registered using the registerKernelClass method in kernel header file. |
Kernel source file | String | String |
Name of the source file that contains the kernel member function definition and non-default constructor parameter values are specified. The string could be the file name, a relative path to the file or an absolute path of the file. This field does not accepts environmental variables. |
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 the 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 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 |
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: |
The AIE Class Kernel block supports all the kernel functions that a normal AI Engine kernel block can support and the Block Parameters dialog box which appears after double-clicking on the AI Engine class kernel block is the same irrespective of whether the kernel member function is Window-based or Stream-based. To edit the header file or source file, you can click the Edit button (immediately after the browse button).