With the various domain application projects added to the top-level system project, only the connections between the AI Engine graph and the PL kernels need to be defined using the hw_link project. This project was automatically generated during the creation of the AI Engine graph project.
- Open the hw_link
project by double-clicking on the project in the Explorer view. Right-click on the binary_container in the Hardware Functions, and select the
Edit V++ Options command.
Note: For third-party simulators see Enabling Third-Party Simulators.
- Edit the V++
Options field. It is important to add the correct path
to the config file because the
v++command needs it for the Vitis IDE workspace.
- Finally, import the specified config
file into the hw_link project
Tip: The system configuration file is added to the hw_link project folder and not to a src folder.
As explained in Linking the System, for AI Engine graph applications the Vitis compiler needs some instruction on how to connect PL kernels outside of the graph to the graph. The config file defines two key features of the top-level system project, how many PL kernels to instantiate into the design and how to connect those kernels to the graph.Important: This applies to PL kernels that are not included in the AI Engine graph, because those kernels are specified in the graph code.
For the Vitis IDE the following is an example configuration file:
[connectivity] stream_connect=mm2s_1.s:ai_engine_0.DataIn1 stream_connect=ai_engine_0.DataOut1:s2mm_1.s [advanced] param=compiler.addOutputTypes=hw_export
sc option defines
connections between the ports of the AI Engine graph and streaming ports of PL kernels that are not
included in the graph. Connections can be defined as the streaming output of one
kernel connecting to the streaming input of a second kernel, or to a streaming input
port on an IP implemented in the target platform.
The system.cfg file has some
differences between the Vitis IDE and the
command-line flow as described in Linking the System. The primary difference is that the IDE provides the connectivitiy
nk options of the config file, instantiating a specified number of compute units (CUs)
per kernels, as specified in the build settings. In addition, the IDE uses a naming
convention for CUs in the form <kernel>_#, where # indicates the CU instance.
In the case where there is only one CU instance, it has the
_1 extension. This means that for the Vitis IDE, the system.cfg
should not specify the
nk option, and the
sc option should use the CU instance name from the