Visible to Intel only — GUID: GUID-53AF7626-1677-4300-86D8-C518D8B1ED30
Visible to Intel only — GUID: GUID-53AF7626-1677-4300-86D8-C518D8B1ED30
FPGA Compilation Flags
FPGA compilation flags control the FPGA image type the Intel® oneAPI DPC++/C++ Compiler targets.
The following are examples of Intel® oneAPI DPC++/C++ Compiler commands that target the FPGA image types:
# FPGA emulator image icpx -fsycl -fintelfpga fpga_compile.cpp -o fpga_compile.fpga_emu # FPGA simulator image: FPGA device family icpx -fsycl -fintelfpga fpga_design.cpp -Xssimulation -Xstarget=Agilex -Xsghdl # FPGA simulator image: FPGA part number icpx -fsycl -fintelfpga fpga_design.cpp -Xssimulation -Xstarget=AGFB014R24A3EV -Xsghdl # FPGA simulator image: explicit board icpx -fsycl -fintelfpga fpga_compile.cpp -Xssimulation -Xstarget=intel_s10sx_pac:pac_s10 # FPGA early image (with optimization report): FPGA device family icpx -fsycl -fintelfpga -Xshardware -fsycl-link=early -Xstarget=Stratix10 fpga_design.cpp -o fpga_design_report.a # FPGA early image (with optimization report): FPGA part number icpx -fsycl -fintelfpga -Xshardware -fsycl-link=early -Xstarget=1SG280LU3FS0E3VG fpga_design.cpp -o fpga_design_report.a # FPGA early image (with optimization report): default board icpx -fsycl -fintelfpga -Xshardware -fsycl-link=early fpga_compile.cpp -o fpga_compile_report.a # FPGA early image (with optimization report): explicit board icpx -fsycl -fintelfpga -Xshardware -fsycl-link=early -Xstarget=intel_s10sx_pac:pac_s10 fpga_compile.cpp -o fpga_compile_report.a # FPGA hardware image: FPGA device family icpx -fsycl -fintelfpga -Xshardware -Xstarget=Arria10 fpga_design.cpp -o fpga_design.fpga # FPGA hardware image: FPGA part number icpx -fsycl -fintelfpga -Xshardware -Xstarget=10AX115S2F45I1SG fpga_design.cpp -o fpga_design.fpga # FPGA hardware image: default board icpx -fsycl -fintelfpga -Xshardware fpga_compile.cpp -o fpga_compile.fpga # FPGA hardware image: explicit board icpx -fsycl -fintelfpga -Xshardware -Xstarget=intel_s10sx_pac:pac_s10 fpga_compile.cpp -o fpga_compile.fpga
The following table explains the compiler flags used in the above example commands:
Flag |
Explanation |
---|---|
-fintelfpga |
Performs ahead-of-time (offline) compilation for FPGA. |
-Xshardware |
Instructs the compiler to target FPGA hardware. If you omit this flag, the compiler targets the default FPGA target, which is the FPGA emulator.
NOTE:
Using the prefix -Xs causes an argument to be passed to the FPGA backend.
|
-fsycl-link=early |
Instructs the compiler to stop after creating the FPGA early image (and associated optimization report). |
-Xstarget=<FPGA device family> -Xstarget=<FPGA part number> -Xstarget=<bsp:variant> |
[Optional] Instructs the compiler to target an FPGA device family, an FPGA part number, or an FPGA board as follows:
If you omit the -Xstarget flag, the compiler chooses the default FPGA board variant pac_a10 from the intel_a10gx_pac BSP (equivalent to -Xstarget=intel_a10gx_pac:pac_a10). |
In addition to the compiler flags demonstrated by the commands above, there are flags to control the verbosity of the icpx command’s output, the number of parallel threads to use during compilation, and so on. The following section briefly describes those flags.
Other SYCL* FPGA Flags Supported by the Compiler
The Intel® oneAPI DPC++/C++ Compiler offers several options that allow you to customize the kernel compilation process. The following table summarizes other options supported by the compiler:
Option name |
Description |
---|---|
-fsycl-help=fpga |
Prints out FPGA-specific options for the icpx command. |
-fsycl-link=early -fsycl-link=image |
|
-reuse-exe=<exe_file> |
Instructs the compiler to extract the compiled FPGA hardware image from the existing executable and package it into the new executable, saving the device compilation time. This option is applicable only when compiling for hardware. Refer to the Fast Recompile for FPGA section for additional information. |
-Xsv |
FPGA backend generates a verbose output describing the progress of the compilation. |
-Xsemulator |
Generates an emulator device image. This is the default behavior. |
-Xssimulation |
Generates a simulator device image. |
-Xsghdl[=<depth>] |
Causes the simulation flow to log signals to Siemens EDA (formerly Mentor Graphics) Questa* waveform files. Use the optional <depth> attribute to specify how many levels of hierarchy are logged. If you do not specify a value for the <depth> attribute, a depth of 1 is used by default. |
-Xsparallel=<num_threads> |
Sets the degree of parallelism used in the FPGA bitstream compilation. The <num_threads> value specifies the number of parallel threads you want to use. The maximum recommended value is the number of available cores. Setting this flag is optional. The default behavior is for the Intel® Quartus® Prime software to compile in parallel on all available cores. |
-Xsseed=<value> |
Sets the seed used by Intel® Quartus® Prime software when generating the FPGA bitstream. The value must be an unsigned integer, and by default, the value is 1. |
-Xsfast-compile |
Runs FPGA bitstream compilation with reduced effort. This option allows faster compile time but at the cost of reduced performance of the compiled FPGA hardware image. Use this flag only for faster development time. It is not intended for production-quality results. The -Xsfast-compile flag is equivalent to setting the QSF setting FAST_OPENCL_COMPILE to ON. This QSF setting mainly sets the Intel Quartus Prime software into the compile mode that is dominated by the Fast Functional Test.
WARNING:
When compiling your SYCL kernel using the -Xsfast-compile flag, you might see functional failures due to timing violations in your design. In such cases, either avoid using the -Xsfast-compile flag or try compiling your kernel with different seeds.
|
For more information about FPGA optimization flags, refer to the Optimization Flags section in the FPGA Optimization Guide for Intel® oneAPI Toolkits.