In this example, HLS kernels bridge between memory and the AXI4-Stream interface to input and output data from memory.
The
mm2skernel reads data from memory and inputs it to the AI Engine array.The
s2mmkernel receives output data from the AI Engine array and writes it to memory.
In the Vitis Unified IDE click File > New Component > HLS
Name the first component mm2s and click Next.
In the Configuration File page, keep the default settings (Empty File) and click Next
In the Add Source Files page, add the file mm2s.cpp from the
srcfolder.In the same page, set the mm2s function as the top function (click Browse and select mm2s).
In the Select Platform Page, select Hardware Design select the XSA file generated from the platform creation step (custom_platform_vck190.xsa).
Click Next.
In the Edit Settings page, xo under package.output_format and click Next.
Open the hls_config.cfg file under settings and change to source editor view. Add the following line under hls:
[hls] flow_target=vitis
Click Finish.
Repeat steps 1 to 8 to create another HLS component called s2mm with the s2mm.cpp source file.