In this example, HLS kernels are used which bridge between memory and the AXI4-Stream interface to input and output data from memory.
The
mm2s
kernel reads data from memory and inputs it to the AI Engine array.The
s2mm
kernel receives output data from the AI Engine array and writes it to memory.
Open the Vitis IDE and select the same workspace as the AI Engine application project. Right-click the simple_application_system project and select Add Hw Kernel Project.
Name the project hw-kernels and click Finish to create the project.
Right-click the hw-kernels project and click import sources. Browse into the
src
folder and select themm2s.cpp
ands2mm.cpp
files.In the hw-kernels.prj page, click on the lightning icon (Add HW function) icon and select both functions (
mm2s
ands2mm
) as hardware functions.