Forum Discussion
There is an additional step; with OpenCL (and indeed, earlier versions of oneAPI) we shipped some popular BSPs along with the tools, but since 2022 we stopped that to limit the installation size. You should be able to get a BSP from Terasic (indeed it should have been provided when you purchased it). Once you install the BSP, you can point the compiler to it when you compile your code. We explain how to do this in the code samples.
FYI: that BSP depends on an older version of Quartus, and unless Terasic updates the BSP, it will fall out of the support window.
Thanks for the advice. Does the BSP have to be specific to SYCL or is
a BSP for OpenCL sufficient? Anyway, I install OneAPI as described
here:
Then I source the ~/intel/oneapi/setvars.sh script to run SYCL tools
and I create the Vector Add project. Compiling it for cpu-gpu works
fine, but not when I compile it for FPGA targets:
icpx -fsycl -fintelfpga -Xshardware -Xstarget=Agilex7 -v -Wsycl-strict vector-add-buffers.cpp
I get the following error message:
llvm-foreach --out-ext=aocx --in-file-list=/tmp/icpx-003d458ab4/vector-add-buffers-bc1783.txt --in-replace=/tmp/icpx-003d458ab4/vector-add-buffers-bc1783.txt --out-file-list=/tmp/icpx-003d458ab4/vector-add-buffers-1dc7d3.aocx --out-replace=/tmp/icpx-003d458ab4/vector-add-buffers-1dc7d3.aocx --out-increment=a.prj -- /vol/opt/intelFPGA_pro/21.2/hld/bin/aoc -o /tmp/icpx-003d458ab4/vector-add-buffers-1dc7d3.aocx /tmp/icpx-003d458ab4/vector-add-buffers-bc1783.txt -sycl -dep-files=/tmp/icpx-003d458ab4/vector-add-buffers-f000eb.d -output-report-folder=a.prj -g -hardware -target=Agilex7 AOCL_TMP_DIR directory was specified at /home/bjourne/.cache/aocl. Ensure Linux and Windows compiles do not share the same directory as files may be incompatible. InvalidModule: Invalid SPIR-V module: unsupported SPIR-V version number 'unknown (66560)'. Range of supported/known SPIR-V versions is 1.0 (65536) - 1.3 (66304) Error: SPIRV to LLVM IR FAILED
I'm using the Intel(R) FPGA SDK for OpenCL(TM), 64-Bit Offline
Compiler version 21.2.0. Perhaps there is some mismatch between what
the OneAPI tools expects and what the offline compiler is capable of?
- whitepau_altera2 years ago
Contributor
It looks like you have some mismatched tools installed. You don't need the FPGA SDK for OpenCL; here is what you need (from our homepage
- oneAPI DPC++ base toolkit 2024.2
- FPGA support Package 2024.2 (the FPGA compiler is no longer distributed with the base toolkit since 2024.2)
- Quartus Prime 21.2 (with Agilex 7 Device support)
- BSP for DE10-Agilex card
For best results, use one of the FPGA code samples, as those are the ones we regression test:
- Björne22 years ago
New Contributor
Thanks for your advice. With the FPGA support package I can now
compile SYCL code for FPGA targets. It seems aoc (from the FPGA
support package) uses the correct BSP:$ aoc -list-boards Board list: B1E1_8GBx4 Board Package: /vol/opt/intelFPGA_pro/21.2/hld/board/de10_agilex B2E2_8GBx4 (default) Board Package: /vol/opt/intelFPGA_pro/21.2/hld/board/de10_agilex ...I create a pre-synthesis report from the FGPA vector_add example like this:
$ icpx -v -fsycl -fintelfpga -Xshardware -Xstarget=Agilex7 -fsycl-link=early vector_add.cpp -o reportzWhen I open the report it says "Report has invalid data. Ok to
proceed?" If I do so I get a report that is not quite right. In
particular, the global memory bandwidth estimates are wrong (see
screenshot). Is there something else I need to do? Like add something
to the icpx command to get it to use the right BSP?- whitepau_altera2 years ago
Contributor
The "Report has invalid data. Ok to proceed?" error is unrelated to the bandwidth notes you are seeing; this is a known defect in the reports that you may ignore.
The incorrect Global Memory Bandwidth estimates might be an issue with your BSP; does the board_spec.xml that you got from Terasic have any value specified for Global Memory Bandwidth?
- Feng-Y-282 years ago
New Contributor
Hi whitepau
I also use the DE10-Agilex card; the generated binary files are invalid when I upgrade the OneAPI to 24.2. I found the file: Intel® oneAPI DPC++/C++ Compiler System Requirements, which said the Quartus support version from 22.3 -24.2, not 22.1.
I want to know whether the system with such a Configuration can work on the DE10-Agilex card :- oneAPI DPC++ base toolkit 2024.2
- FPGA support Package 2024.2 (the FPGA compiler is no longer distributed with the base toolkit since 2024.2)
- Quartus Prime 21.2 (with Agilex 7 Device support)
- BSP for DE10-Agilex card
Regards
Feng
- whitepau_altera2 years ago
Contributor
I replied to your other thread.
https://www.intel.com/content/www/us/en/developer/articles/release-notes/intel-oneapi-compiler-fpga-add-on-release-notes-2024.html#release-notes-2024-2-release-notes
According to the release notes we deprecated Quartus® Prime 21.4 and earlier in 2024.2 (but only removed in 2025.0) so the DE10 Agilex™ should still work with that release.