Visible to Intel only — GUID: GUID-0AEBB45C-98DF-45A1-B0F5-944DD9BEFE41
Visible to Intel only — GUID: GUID-0AEBB45C-98DF-45A1-B0F5-944DD9BEFE41
Kernel Argument Interfaces
By default, the kernel arguments are passed to your component through the same interface as the start signal (that is, either through the IP component CSR or through inputs synchronized to a ready/valid handshake). However, you can override this behavior. For example, you can select a register-mapped invocation interface with arguments passed through conduits, or you can select a streaming invocation interface with arguments passed through the register map.
The following code snippet demonstrates how to place the invocation interface in the CSR, and pass kernel arguments through conduit interfaces:
#include <sycl/sycl.hpp>
#include <sycl/ext/intel/fpga_extensions.hpp>
using namespace sycl;
using namespace ext::intel::experimental;
using namespace ext::oneapi::experimental;
struct MyIP {
annotated_arg<int*, decltype(properties{conduit})> input_a, input_b, input_c;
annotated_arg<int, decltype(properties{conduit})> n;
void operator()() const {
for (int i = 0; i < n; i++) {
input_c[i] = input_a[i] + input_b[i];
}
}
};
The following code snippet demonstrates how to configure the kernel with a handshake invocation interface, and pass kernel arguments through the CSR:
#include <sycl/sycl.hpp>
#include <sycl/ext/intel/fpga_extensions.hpp>
using namespace sycl;
using namespace ext::intel::experimental;
using namespace ext::oneapi::experimental;
struct MyIP {
annotated_arg<int*, decltype(properties{register_map})> input_a, input_b, input_c;
annotated_arg<int, decltype(properties{register_map})> n;
void operator()() const {
for (int i = 0; i < n; i++) {
input_c[i] = input_a[i] + input_b[i];
}
auto get(properties_tag) {
return properties{streaming_interface<>};
}
};