To import the HLS kernel as a block into Model composer, you need to select it from the AI Engine library.
Double-click the block symbol to display the parameters of the HLS kernel block as shown in the following figure.
The block mask parameters need to be updated in order to import the HLS kernel as a block. The following table provides details on the parameters and descriptions for each parameter.
Parameter Name | Parameter Type | Criticality | Description |
---|---|---|---|
Kernel header file | String | Mandatory | The name of the HLS kernel header file that contains
the 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 select the
file. If environment variables are used to specify the header file path, then an appropriate error is returned. |
Kernel function | String | Mandatory | The name of the kernel function in C/C++ for which the HLS kernel block is to be created. |
Kernel source file | String | Mandatory | The name of the source file that contains the kernel
function implementation (definition). The string could be just the file
name, a relative path to the file, or an absolute path of the file. If environment variables are used to specify the source file path, then an appropriate error is returned. Specifies the search path for source files (.cc, .hpp) from the MATLAB current folder. |
Kernel search paths | Vector of Strings | Optional | If the kernel header file or the kernel source file
is not found using the value provided through the Kernel header file or Kernel source file fields respectively,
then the paths provided in Kernel search
paths are used to locate 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 will be accepted (multiple
can be selected): |
After successful import, the Function tab GUI displays automatically. You can quickly review the HLS Kernel definition and ports as shown in the following figure.