Specifying Streaming Connections between Compute Units - 2022.1 English

Vitis Unified Software Platform Documentation: Application Acceleration Development (UG1393)

Document ID
UG1393
ft:locale
English (United States)
Release Date
2022-05-25
Version
2022.1 English

The Vitis core development kit supports streaming data transfer between two kernels, allowing data to move directly from one kernel to another without having to transmit back through global memory. However, the process has to be implemented in the kernel code itself, as described in Working with Auto-Restarting Kernels, and also specified during the kernel build process.

The streaming data ports of kernels can be connected during v++ linking using the --connectivity.sc option. This option can be specified at the command line, or from a config file that is specified using the --config option, as described in Vitis Compiler Command.

Important: An error will occur if the --connectivity.sc kernel drives itself.

To connect the streaming output port of a producer kernel to the streaming input port of a consumer kernel, set up the connection in the v++ config file using the connectivity.stream_connect option as follows:

[connectivity]
#stream_connect=<cu_name>.<output_port>:<cu_name>.<input_port>:[<fifo_depth>]
stream_connect=vadd_1.stream_out:vadd_2.stream_in

Where:

  • <cu_name> is an instance name of the CU as determined by the connectivity.nk option, described in Creating Multiple Instances of a Kernel.
  • <output_port> or <input_port> is the streaming port defined in the producer or consumer kernel.
  • [:<fifo_depth>] inserts a FIFO of the specified depth between the two streaming ports to prevent stalls. The value is specified as an integer.
Tip: If the port-width of the output and input ports do not match, the Vitis compiler will automatically insert a data-width converter between the two ports as part of the build process.