Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)

OpenCL Emulation

efe373
New Contributor I
1,423 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 

Labels (1)
0 Kudos
1 Reply
AnilErinch_A_Intel
1,262 Views

Hi ,

Could you try the step by step guide as given below and let us know where the failure is occurring.

https://software.intel.com/content/www/us/en/develop/articles/sdk-for-opencl-2020-gsg-windows-os.html

Thanks and Regards

Anil



0 Kudos
Reply