Developer Guide

Intel® oneAPI DPC++/C++ Compiler Handbook for FPGAs

ID 785441
Date 10/24/2024
Public
Document Table of Contents

Defining a Kernel for FPGAs

In SYCL*, a queue connects a host program to a single device. Host programs submit tasks to a device via the queue and can monitor the queue for task completion.

Your kernel (that is, the code that you want to run on the FPGA device) is defined within the command that submits the task for processing. For single work-item kernels, the command is queue-name.singletask. The format changes slightly depending on the coding style you use:

  • Lambda coding style:
    queue-name.single_task<kernel_name>([=]() {
            // Kernel code goes here
         })
  • Functor coding style:
    queue-name.single_task<kernel_name>(Kernel functor object goes here)  

In the SYCL HLS flow, your kernel code is compiled to an RTL IP core and your host program is the testbench for the IP core.

For more information about SYCL queues and kernels and programming in DPC++, refer to the following publications: