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 Streaming Data Transfers between Kernels (K2K), and also specified during the kernel
build process.
Note: This also
supports streaming connections to/from free running kernels as described in Free-Running Kernel.
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.
To connect the streaming output port of a producer kernel to the streaming input
port of a consumer kernel, setup 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 theconnectivity.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 as described in Streaming Kernel Coding Guidelines, or as described in Coding Guidelines for Free-Running Kernels. -
[:<fifo_depth>]
inserts a FIFO of the specified depth between the two streaming ports to prevent stalls. The value is specified as an integer.