Visible to Intel only — GUID: GUID-473FCBA2-8A62-4E2A-AD2C-22933DEFAD8F
Visible to Intel only — GUID: GUID-473FCBA2-8A62-4E2A-AD2C-22933DEFAD8F
FPGA Compilation Flags
FPGA compilation flags control the FPGA image type the Intel® oneAPI DPC++/C++ Compiler targets.
The following table explains the most commonly-used compiler flags:
Flag |
Description |
---|---|
-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 FPGA emulator.
NOTE:
Using the prefix -Xs causes an argument to be passed to the FPGA backend.
|
-Xsemulator |
Generates an emulator device image. This is the default behavior. |
-Xssimulation |
Generates a simulator device image. |
-fsycl-link=early |
Instructs the compiler to stop after creating the FPGA Optimization Report and RTL IP core. |
-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 this case, a full compilation is not supported as only a partial BSP is provided. |
The following examples show Intel® oneAPI DPC++/C++ Compiler commands and common compilation flags used for various output targets:
FPGA Optimization Report
- FPGA device family
icpx -fsycl -fintelfpga fpga_compile.cpp -Xshardware -fsycl-link=early ‑Xstarget=Stratix10 ‑o fpga_compile_report.a
- FPGA part number
icpx -fsycl -fintelfpga fpga_compile.cpp -Xshardware -fsycl-link=early ‑Xstarget=1SG280LU3FS0E3VG ‑o fpga_compile_report.a
- Explicit board
icpx -fsycl -fintelfpga fpga_compile.cpp -Xshardware -fsycl-link=early ‑Xstarget=intel_s10sx_pac:pac_s10 ‑o fpga_compile_report.a
- Default board
icpx -fsycl -fintelfpga fpga_compile.cpp -Xshardware -fsycl-link=early ‑o fpga_compile_report.a
FPGA Emulator Image
icpx -fsycl ‑fintelfpga fpga_compile.cpp ‑o fpga_compile.fpga_emu
FPGA Simulator Image
- FPGA device family
Intel Agilex® 7 Information:You can target Intel Agilex® 7 devices in any of the following formats: -Xstarget=Agilex, -Xstarget=Agilex7, -Xstarget="Agilex 7", -Xstarget=agilex7, -Xstarget="agilex 7"
icpx -fsycl -fintelfpga fpga_compile.cpp -Xssimulation ‑Xstarget=Agilex7 ‑Xsghdl ‑o fpga_compile.fpga_sim
- FPGA part number
icpx -fsycl -fintelfpga fpga_compile.cpp -Xssimulation ‑Xstarget=AGFB014R24A3EV ‑Xsghdl ‑o fpga_compile.fpga_sim
- Explicit board
icpx -fsycl -fintelfpga fpga_compile.cpp -Xssimulation ‑Xstarget=intel_s10sx_pac:pac_s10 ‑o fpga_compile.fpga_sim
FPGA Hardware Image
- FPGA device family
icpx -fsycl -fintelfpga fpga_compile.cpp -Xshardware ‑Xstarget=Arria10 ‑o fpga_compile.fpga
- FPGA part number
icpx -fsycl -fintelfpga fpga_compile.cpp -Xshardware ‑Xstarget=10AX115S2F45I1SG ‑o fpga_compile.fpga
- Explicit board
icpx -fsycl -fintelfpga fpga_compile.cpp -Xshardware ‑Xstarget=intel_s10sx_pac:pac_s10 ‑o fpga_compile.fpga
- Default board
icpx -fsycl -fintelfpga fpga_compile.cpp -Xshardware ‑o fpga_compile.fpga
In addition to the compiler flags demonstrated by the example commands, there are flags to provide additional compilation controls. 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:
Flag | Description |
---|---|
-fsycl-help=fpga |
Prints out FPGA-specific options for the icpx command. |
-fsycl-link=early -fsycl-link=image |
|
‑fsycl‑device‑code‑split[=value] | The -fsycl-device-code-split[=value] option informs the compiler how to separate your design into device code modules. This option supports the following modes:
ATTENTION:
Each split must not share device resources, such as memory, across it. Furthermore, kernel pipes must have their source and sink within the same split.
For additional information about this option, refer to the fsycl-device-code-split topic in Intel® oneAPI DPC++/C++ Compiler Developer Guide and Reference. |
-reuse-exe=<exe_file> |
Instructs the compiler to extract the compiled FPGA hardware or simulation image from the existing executable if the kernel has not changed and package it into the new executable, saving the device or simulation compilation time. This option is not applicable when compiling for emulation. Refer to the Fast Recompile for FPGA section for additional information. |
-Xsv |
FPGA backend generates a verbose output describing the progress of the compilation. |
-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 sets the Intel Quartus Prime Pro Edition 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 Optimization Flags.