Visible to Intel only — GUID: GUID-B880F410-99CB-4796-AB28-B87F47D775D2
Visible to Intel only — GUID: GUID-B880F410-99CB-4796-AB28-B87F47D775D2
Streaming IP Component Kernels
You can also choose to have the Intel® oneAPI DPC++/C++ Compiler implement the IP component invocation interface with a “ready-valid” handshake, like in an Avalon Streaming (ST) interface.
To have the compiler implement the IP component invocation interface with a “ready-valid” handshake:
Implement the IP kernel as a functor.
Include the following header file:
sycl/ext/intel/prototype/interfaces.hpp
Add one of the following options to the compiler command (icpx -fsycl):
Linux: I/$INTELFPGAOCLSDKROOT/include
Windows: /I %INTELFPGAOCLSDKROOT%\include
Add the streaming_interface macro to the functor operator().
The following code shows an example of implementing a streaming interface:
#include <sycl/ext/intel/prototype/interfaces.hpp> using namespace sycl; struct MyIP { int *input_a, *input_b, *input_c; int n; MyIP(int *a, int *b, int *c, int N_) : input_a(a), input_b(b), input_c(c), n(N_) {} streaming_interface void operator()() const { for (int i = 0; i < n; i++) { input_c[i] = input_a[i] + input_b[i]; } } };
The resulting IP component kernel is invoked with a “ready-valid” handshake. Compiling the example code generates the start signal, the done signal, the ready_in signal, and ready_out signals as conduits. The compilation of the example code also generates conduits for the base addresses of the three pointers as well the value of N.
The streaming handshaking follows the Avalon Streaming (ST) protocol. The IP kernel consumes the arguments on the clock cycle that the start and ready_out signals are asserted. The IP component kernel invocation is finished on the clock cycle that the done and ready_in signals are asserted.
Limitations of Streaming IP Component Kernels
The following actions are not supported when using a streaming IP component kernel:
Using streaming kernels as SYCL NDRange kernels.
Profiling of streaming kernels.
Using agent kernel arguments in streaming kernels.