Intel® High Level Design
Support for Intel® High Level Synthesis Compiler, DSP Builder, OneAPI for Intel® FPGAs, Intel® FPGA SDK for OpenCL™
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.

OpenCL Emulation

efe373
Novice
471 Views

Hello everyone,

 

I have installed Windows SDK for OpenCL succesfully. I have Quartus Prime Pro v20.4 and Microsoft Visual Studio 2019 v16.8.2. Also my machine is Windows 10, Intel x64 CPU. However, I have encountered some problems while following the Getting Started document of Intel FPGA.

 

1-First problem is occured when I tried to install Microsoft Visual Studio Plug-in. First, I enter to the directory %INTELFPGAOCLSDKROOT%/ide_plugins and I have run the batch file named plugins_install.bat as stated in the PDF. It finds VS2019 and asks me to install OpenCL SDK IDE Plugins and I pressed Y. However, it gave me an error message "The Visual Studio 2019 plugins are missing. Ensure this script is being run from the ide_plugins directory". Therefore, I have decided to run the .vsix file myself and I have entered the ide_plugins_vs/2019 directory and double-clicked the .vsix file. It succesfully installed. However, when I check the extensions from Visual Studio, I cannot see anything related to FPGA SDK. I am not sure it is really installed.

 

2-I have set the environment variables myself permanently. Should I also run the script %INTELFPGAOCLSDKROOT%/init_opencl.bat? When I run the script, it gave me an error "VisualStudio's link.exe is not on the path. Guessing its location. Cannot find VisualStudio installation by looking at the environment. If VisualStudio is installed, use VisualStudio Command Prompt to set all required environment variables.". After this error, I couldn't find how to set the all required environment variables using VisualStudio Command Prompt. However, I have added location "C:\Program Files(x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.28.29333\bin\Hostx64\x64" in order to show the location of link.exe. After that, I run the batch file again, this time I got no error. However, in the PDF it says running the batch file "Imports the Microsoft Visual Studio environment to properly set the LIB environment variable". I did not understand what is the LIB environment variable and how to set it manually. I want it to be permanent, because this batch file does not run smoothly I think.

 

3-In the 2.5 Installing an FPGA board Section I have encountered another error. I have downloaded BSP for Stratix 10 GX for Quartus Prime Pro v20.2 (mine is v20.4). When I enter the command aocl install s10_ref, it installs succesfully first but it cannot install the driver OPAE. At this stage, I did not connect my development kit to the PC. Is it required to run the emulator? When I run the aocl diagnose command, the ICD diagnostics passes with some error messages "0x1a9c: No active device interfaces found. Is the driver loaded / device alive?

0x1a9c: Error opening handles to enumeration interfaces.

0x1a9c: fpgaEnumerateIoctl failed.

MMD ERROR: failed to scan for the PCI device."

Then it founds 3 platforms, CUDA, Intel FPGA SDK for Opencl, Intel FPGA Emulation Platform for OpenCL.

However, BSP diagnostics fails. Very first warning is "No devices attached for package: D:\stratix10\s10_ref". After that there are lots of lines with "MMD ERROR: failed to scan for the PCI device.", 

"0x1ea0: No active device interfaces found. Is the driver loaded / device alive?

0x1ea0: Error opening handles to enumeration interfaces.

0x1ea0: fpgaEnumerateIoctl failed.".

What can/should I do in this situation?

 

4-I did not have Quartus Prime Pro 20.2 and I did not followed the guide to port the BSP to newer version of Quartus. Is it required? I just want to emulate the hello_world example on this machine. Later on, I will use another machine that run Linux to play with development board.

 

5-In the section 2.6 of the Getting Started PDF, there is a requirement "2. Add the path to the Microsoft compilation time libraries in Microsoft Visual Studio". I searched what is this path but I couldn't find it. Which path should I add to the LIB variable exactly?

 

6-In the section 2.6.2, I have enter the command "aoc -march=emulator -v device/hello_world.cl -o bin/hello_world.aocx". However, I get an error message " 'aocl-ioc64' is not recognized as an internal or external command, operable program of batch file. Error: OpenCL kernal compilation FAILED". After getting this error, I have added %INTELFPGAOCLSDKROOT%/llvm/aocl-bin location to the path and the problem resolved. .aocx file is succesfully compiled. What about the error I got?

 

7-For emulating the hello_world example, I have opened its solution in the MSVS. I have changed the line 60 "static bool use_emulator = false;" to "static bool use_emulator = true;" and built the solution. Everything is fine up to this step, no error no warning no anything. After that, I have followed the PDF and run the host.exe in the bin folder. However, very first thing that I got is what? Of course an error message again. "0x2ba4: No active device interfaces found. Is the driver loaded / device alive? 0x1ea0: Error opening handles to enumeration interfaces. 0x1ea0: fpgaEnumerateIoctl failed. MMD ERROR: failed to scan for the PCI device." After that error, printed out some info called "Querying device for info", however I cannot get these log here because the log is on another machine that I cannot get any files out of it. After the info lines, another error occured "ERROR: CL_DEVICE_NOT_AVAILABLE. Location:D:\OpenCL_examples\hello_world\host\src\main.cpp:160 Failed to create context.". What about these errors?

 

After that, I have stopped because the only thing I wanted is to emulate the hello_world example. Any help is welcome and appreciated. Thanks.

 

Efe 

 

0 Kudos
5 Replies
efe373
Novice
449 Views

Moderators can delete this post, I have re-opened this post in the correct section of forum.

efe373
Novice
410 Views

I think moderators are replacing my posts, this post is currently unsolved.

BoonBengT_Intel
Moderator
312 Views

Hi @efe373,

Thank you for posting in Intel community forum, hope this message find you well and apologies for the delayed in response.


Please find the clarification to your question here, 3) Hardware are not required to run the emulation, but please ensure that the command are run with a emulation stated, please do try to installed the board bsp again with the board connected to the host. 4) If just to run the emulation I think this should be good to ignore. 5) Usually it will be the path opencl are installed, in windows cases example it would be the following (i.e. C:\intelFPGA_pro\20.2\hld\windows64\lib) 6) I am suspecting there might be some missed in setup, by default the it should be added automatically. 7) Suspecting that the error are cause by some changes in the hello world example code, can you please try to recompile with the original code with emulator command.


Please do let us know if that helps to clarify you doubts.

Best Wishes
BB

BoonBengT_Intel
Moderator
278 Views

Hi @efe373,

 

Good day, just checking in to see if there is any further doubts in regards to this matter.
Please do let us know if we managed to answer your question or misunderstand the situation.

 

Best Wishes
BB

BoonBengT_Intel
Moderator
260 Views

Hi @efe373,

 

Hope this message find you well and good day, unfortunately as we do not receive any response from you to the previous clarification that we have provided. This thread will now be transitioned to community support. If you have new queries, please feel free to open a new thread to get support from Intel experts. Otherwise, the community users will further help you with doubts in this thread.

 

Best Wishes
BB

Reply