To Import a non-class-based AI Engine kernel as a block into Model Composer, you need to use an AIE Kernel block from the AI Engine Library as shown.
Double-clicking the block symbol displays the parameters of the AI Engine kernel block as shown in the following figure.
The block mask parameters need to be updated in order 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 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
Optional preprocessor arguments for downstream compilation with specific preprocessor options.
The following two preprocessor option formats are accepted and multiple
can be selected:
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).