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 function declaration.
The string can be 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. 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. Register this function using the registerKernelClass method in the kernel header file. |
| Kernel source file | String | Mandatory | Name of the source file that contains where the kernel member function
definition and non-default constructor parameter values are
specified. The string can be the file name, a relative path to the
file, or an absolute path of the file. The string can 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 supports. The Block Parameters dialog box which appears after double-clicking the AI Engine class kernel block is the same. This is 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).