Intel® High Level Design
Support for Intel® High Level Synthesis Compiler, DSP Builder, OneAPI for Intel® FPGAs, Intel® FPGA SDK for OpenCL™
674 Discussions

oneAPI on Ubuntu 22.04: make fpga and fpga_sim erro

Petry_Carlos
Beginner
1,403 Views

Hello.

I'm testing the oneAPI ToolKit version 2024.0 over a Ubuntu 22.04 server OS.
I installed oneAPI according to the "Get the Intel® oneAPI Base Toolkit" from Intel page.
Also, I have Quartus Prime Pro 23.1 installed and I have an Intel Cyclone 10 GX FPGA device installed on the host with its BSP.
So, I got down the oneAPI-Samples applications to test the platform.
I executed the Vector Add application with both 'cpu-gpu' and 'fpga _emu' options (make cpu-gpu) successfully, but when I dfined the 'fpga_ sim' or 'fpga' options, I got the following error:
--------------------------------
$ make fpga_sim
[ 50%] Building CXX object src/CMakeFiles/vector-add-usm.fpga_sim.dir/vector-add-usm.cpp.o
[100%] Linking CXX executable ../vector-add-usm.fpga_sim
aoc: Compiling for Simulator.
Error: Simulation system generation FAILED.
Refer to vector-add-usm.fpga_sim.prj/vector_add_usm_fpga_sim.log for details.
sh: 0: getcwd() failed: No such file or directory
sh: 1: cd: getcwd() failed: No such file or directory
Error: Could not open work directory
llvm-foreach:
icpx: error: fpga compiler command failed with exit code 1 (use -v to see invocation)
--------------------------------

The vector_add_usm_fpga_sim.log file has some indications:
-------------------------------
2024.01.17.19:52:11 Warning: dpic_ZTSZ9VectorAddRN4sycl3_V15queueEPKiS4_PimEUlT_E.dpic_ZTSZ9VectorAddRN4sycl3_V15q
ueueEPKiS4_PimEUlT_E.dpi_control_stream_writes_active: Interface has no signals
2024.01.17.19:52:11 Error: dpic_ZTSZ9VectorAddRN4sycl3_V15queueEPKiS4_PimEUlT_E: deviceFamily "Agilex 7" is out of
range: "Arria 10", "Cyclone 10 GX", "None", "Unknown"
2024.01.17.19:52:11 Error: Generation failed with exit code 3: 1 Error, 1 Warning
2024.01.17.19:52:11 Info: Finished: Create simulation model
2024.01.17.19:52:11 Info: Starting: Create simulation script
2024.01.17.19:52:11 Info: sim-script-gen --system-file=/tmp/vector-add-usm-c1ec0a-4c11fe/ip/mpsim/dpic_ZTSZ9VectorAddRN4sycl3_V15queueEPKiS4_PimEUlT_E.ip --output-directory=/tmp/vector-add-usm-c1ec0a-4c11fe/ip/mpsim/dpic_ZTSZ9VectorAddRN4sycl3_V15queueEPKiS4_PimEUlT_E/sim --use-relative-paths=true
2024.01.17.19:52:11 Error: File /tmp/vector-add-usm-c1ec0a-4c11fe/ip/mpsim/dpic_ZTSZ9VectorAddRN4sycl3_V15queueEPKiS4_PimEUlT_E/dpic_ZTSZ9VectorAddRN4sycl3_V15queueEPKiS4_PimEUlT_E.spd not found. Please generate simulation files for system file /tmp/vector-add-usm-c1ec0a-4c11fe/ip/mpsim/dpic_ZTSZ9VectorAddRN4sycl3_V15queueEPKiS4_PimEUlT_E.ip before generating simulation scripts.
2024.01.17.19:52:11 Info: Finished: Create simulation script
2024.01.17.19:52:11 Info: Generation of /tmp/vector-add-usm-c1ec0a-4c11fe/ip/mpsim/dpic_ZTSZ9VectorAddRN4sycl3_V15queueEPKiS4_PimEUlT_E.ip (dpic_ZTSZ9VectorAddRN4sycl3_V15queueEPKiS4_PimEUlT_E) took 408 ms
2024.01.17.19:52:11 Info:
2024.01.17.19:52:11 Warning: Quartus project not specified. Use --quartus-project and --rev to specify a Quartus project and revision.
--------------------------------

I didn't figure out how to define de Cyclone 10 GX FPGA as a target device parameter.

I appreciate any suggestion on solve this issue.
Thanks.

0 Kudos
6 Replies
whitepau
Employee
1,189 Views

Hi Petry_Carlos, sorry for the slow reply.

 

I'm not sure which code sample you are referring to; there are multiple vector add examples in the oneAPI code samples. Generally, the code samples use CMake as a build system so you can either pass the FPGA target as an argument to cmake, or you can modify the CMakeLists.txt build scripts.

Our `fpga_compile` sample includes a CMakeLists.txt build script that lets you set the target device at compile time:

On Linux*

  1. Change to the sample directory.

  2. For different parts of this tutorial, navigate to the appropriate sub-folder.

    cd <partX_XXX>
     

    where <partX_XXX> is:

    • part1_cpp
    • part2_dpcpp_functor_usm
    • part3_dpcpp_lambda_usm
    • part4_dpcpp_lambda_buffers
  3. Build the program for Intel® Agilex® 7 device family, which is the default.

    mkdir build
    cd build
    cmake ..
     

    Note: You can change the default target by using the command:

    cmake .. -DFPGA_DEVICE=<FPGA device family or FPGA part number>
     

    Alternatively, you can target an explicit FPGA board variant and BSP by using the following command:

    cmake .. -DFPGA_DEVICE=<board-support-package>:<board-variant>
     

    You will only be able to run an executable on the FPGA if you specified a BSP.



https://github.com/oneapi-src/oneAPI-samples/tree/master/DirectProgramming/C%2B%2BSYCL_FPGA/Tutorials/GettingStarted/fpga_compile#generate-the-makefiles-for-the-parts 

Furthermore, the FPGA Template code sample includes a CMakeLists.txt file that you can customize for your own designs

https://github.com/oneapi-src/oneAPI-samples/tree/master/DirectProgramming/C%2B%2BSYCL_FPGA/Tutorials/GettingStarted/fpga_template

 

0 Kudos
Petry_Carlos
Beginner
1,049 Views

Hi @BoonBengT_Intel.

About "which code sample i am referring to", I followed the instructions on this site:

https://www.intel.com/content/www/us/en/docs/oneapi-base-toolkit/get-started-guide-linux/2023-0/run-a-sample-project-using-the-command-line.html/1000.html

using the "oneapi-cli" command and choosing: "create a project->cpp->vector Add".

About the "Simulation system generation failed" message, I decided to remove and reinstall the whole oneAPI tool again, so I got rid of this problem.

Regarding the "-DFPGA_DEVICE=..." option, my question was which string I should put, finally I tested it using the part number and it seemed to work.

So, I tested it again with the "fpga" target (make fpga) and DUSM=1 option.

Furthermore, I successfully programmed the FPGA using the Quartus Prime, based on the 'prj' directory created by oneAPI.

But, when I run the executable on the host I get this error:

-----------------------------------

An exception is caught while computing on device.
terminate called after throwing an instance of 'sycl::_V1::runtime_error'
what(): No device of requested type available. Please check https://software.intel.com/content/www/us/en/develop/articles/intel-oneapi-dpcpp-system-requirements.html -1 (PI_ERROR_DEVICE_NOT_FOUND)
Aborted (core dumped)

-----------------------------------

I have access to a Cyclone FPGA (ID 10CX220YF780E5G).

Let me know if I made any mistakes or if there are any other issues to consider.

Thanks.

0 Kudos
BoonBengT_Intel
Moderator
1,084 Views

Hi @Petry_Carlos,


Greetings, just checking in to see if there is any further doubts in regards to this matter.

Hope your doubts have been clarified.


Best Wishes

BB


0 Kudos
BoonBengT_Intel
Moderator
979 Views

Hi @Petry_Carlos,


Good to know that you have managed to get rid of the simulation failure.

Suspecting it might be some mis-setup in the environment variable.


As for the compilation flag that you mention on which one to used, below is a references link which explain most of the compilation flag that can be used and with the relevant param:

- https://www.intel.com/content/www/us/en/docs/oneapi/programming-guide/2023-2/fpga-compilation-flags.html


On the last issues noted, suspecting it might be wrong param passed in for the flags.

Hence please refer to the link above specifically on the Xstarget flag.

Also perhaps would suggest to run a 'jtag config' command to check on the device setup and connection from the host.

Hope that clarify.


Best Wishes

BB


0 Kudos
BoonBengT_Intel
Moderator
904 Views

Hi @Petry_Carlos,


Greetings, just checking in to see if there is any further doubts in regards to this matter.

Hope your doubts have been clarified.


Best Wishes

BB


0 Kudos
BoonBengT_Intel
Moderator
805 Views

Hi @Petry_Carlos,


Greetings, as we do not receive any further clarification/updates on the matter, hence would assume challenge are overcome. Please login to ‘https://supporttickets.intel.com’, view details of the desire request, and post a feed/response within the next 15 days to allow me to continue to support you. After 15 days, this thread will be transitioned to community support. For new queries, please feel free to open a new thread and we will be right with you. Pleasure having you here.


Best Wishes

BB


0 Kudos
Reply