Visible to Intel only — GUID: GUID-1655B481-7549-4493-98EA-D240CFC78FB4
Why is FPGA Compilation Different?
Types of SYCL* FPGA Compilation
FPGA Compilation Flags
Emulate and Debug Your Design
Evaluate Your Kernel Through Simulation
Device Selectors for FPGA
FPGA IP Authoring Flow
Fast Recompile for FPGA
Generate Multiple FPGA Images (Linux only)
FPGA BSPs and Boards
Targeting Multiple Homogeneous FPGA Devices
Targeting Multiple Platforms
FPGA-CPU Interaction
FPGA Performance Optimization
Use of RTL Libraries for FPGA
Use SYCL Shared Library With Third-Party Applications
FPGA Workflows in IDEs
Intel oneAPI DPC++ Library (oneDPL)
Intel oneAPI Math Kernel Library (oneMKL)
Intel oneAPI Threading Building Blocks (oneTBB)
Intel oneAPI Data Analytics Library (oneDAL)
Intel oneAPI Collective Communications Library (oneCCL)
Intel oneAPI Deep Neural Network Library (oneDNN)
Intel oneAPI Video Processing Library (oneVPL)
Other Libraries
Visible to Intel only — GUID: GUID-1655B481-7549-4493-98EA-D240CFC78FB4
Device Selectors for FPGA
Depending on whether you are targeting the FPGA emulator or FPGA hardware, you must use the correct SYCL* device selector in the host code. You can use the FPGA hardware device selector for simulation also. The following host code snippet demonstrates how you can use a selector to specify the target device at compile time:
// FPGA device selectors are defined in this utility header, along with // all FPGA extensions such as pipes and fpga_reg #include <sycl/ext/intel/fpga_extensions.hpp> int main() { // Select either: // - the FPGA emulator device (CPU emulation of the FPGA) // - the FPGA simulator // - the FPGA device (a real FPGA) #if FPGA_SIMULATOR auto selector = sycl::ext::intel::fpga_simulator_selector_v; #elif FPGA_HARDWARE auto selector = sycl::ext::intel::fpga_selector_v; #else // #if FPGA_EMULATOR auto selector = sycl::ext::intel::fpga_emulator_selector_v; #endif queue q(selector); ... }
NOTE:
- The FPGA emulator and the FPGA are different target devices. Intel® recommends using a preprocessor define to choose between the emulator and FPGA selectors. This makes it easy to switch between targets using only command-line flags. For example, you can compile the above code snippet for the FPGA emulator by passing the flag -DFPGA_EMULATOR to the icpx command.
Since FPGAs support only the ahead-of-time compilation method, dynamic selectors (such as the default_selector) are less useful that explicit selectors when targeting FPGAs.
CAUTION:
When targeting the FPGA emulator or FPGA hardware, you must pass correct compiler flags and use the correct device selector in the host code. Otherwise, you might experience runtime failures. Refer to the fpga_compile tutorial in the Intel® oneAPI Samples Browser to get started with compiling SYCL code for FPGA.