Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Valued Contributor III
1,378 Views

Compiling the OpenCL Hello World example

Hi, 

 

I am trying to compile the OpenCL Hello World program that came with Nallatech on Windows 10 with OpenCL v18.0, but I am having problems :(. I have a 395AB board and when I issue the compile command, it returns that QSYS Failed and to check the log. The command I used is what was illustrated on the Nallatech documentation: 

 

aoc -v -board=p395_hpc_ab hello_world.cl -seed=1 

 

The program, hello_world.cl, is very simple: 

 

// AOC kernel demonstrating device-side printf call 

__kernel void hello_world(int thread_id_from_which_to_print_message) { 

// Get index of the work item 

unsigned thread_id = get_global_id(0); 

 

if(thread_id == thread_id_from_which_to_print_message) { 

printf("Thread# %u: Hello from Altera's OpenCL Compiler!\n", thread_id); 

 

Here is the output from aoc

 

aoc -v -board=p395_hpc_ab hello_world.cl -seed=1 

 

aoc: Environment checks are completed successfully. 

aoc: Cached files in C:\Users\RM\AppData\Local\aocl may be used to reduce compilation time 

You are now compiling the full flow!! 

aoc: Selected target board p395_hpc_ab 

aoc: Running OpenCL parser.... 

aoc: OpenCL parser completed successfully. 

aoc: Optimizing and doing static analysis of code... 

aoc: Linking with IP library ... 

Checking if memory usage is larger than 100% 

aoc: First stage compilation completed successfully. 

Compiling for FPGA. This process may take a long time, please be patient. 

Error: Qsys-script FAILED. 

Refer to hello_world/hello_world.log for details. 

 

Checking the log reveals the following. The log is attached... 

 

... 

2018.06.01.15:49:01 Info: add_connection board.kernel_clk2x kernel_system.clock_reset2x 

2018.06.01.15:49:01 error: add_connection board.kernel_clk2x kernel_system.clock_reset2x: no interface named board.kernel_clk2x. 

2018.06.01.15:49:01 Info: add_connection board.kernel_reset kernel_system.clock_reset_reset 

2018.06.01.15:49:01 Info: add_connection kernel_system.kernel_mem0 board.kernel_mem0 

2018.06.01.15:49:01 Info: add_connection kernel_system.kernel_mem1 board.kernel_mem1 

2018.06.01.15:49:01 Info: add_connection kernel_system.kernel_mem2 board.kernel_mem2 

2018.06.01.15:49:01 Info: add_connection kernel_system.kernel_mem3 board.kernel_mem3 

2018.06.01.15:49:01 Info: add_connection board.kernel_irq kernel_system.kernel_irq 

2018.06.01.15:49:01 error: add_connection board.kernel_irq kernel_system.kernel_irq: no interface named board.kernel_irq. 

2018.06.01.15:49:01 Info: add_connection board.kernel_cra kernel_system.kernel_cra 

2018.06.01.15:49:01 error: add_connection board.kernel_cra kernel_system.kernel_cra: no interface named board.kernel_cra. 

2018.06.01.15:49:01 Info: add_connection board.acl_internal_snoop kernel_system.cc_snoop 

2018.06.01.15:49:01 error: add_connection board.acl_internal_snoop kernel_system.cc_snoop: no interface named board.acl_internal_snoop. 

2018.06.01.15:49:01 Info: add_connection board.kernel_clk kernel_system.cc_snoop_clk 

2018.06.01.15:49:01 Info: save_system  

 

Why am I getting these errors?  

 

Thanks, 

 

QG
0 Kudos
5 Replies
Highlighted
Valued Contributor III
50 Views

It is likely that Nallatech's BSP is not compatible with Quartus v18.0. Check their instructions to see what version of Quartus is compatible with your BSP.

0 Kudos
Valued Contributor III
50 Views

Once I updated the BSP to their latest and downgraded my compiler from Visual Studio 2017/2015 to VS2010, everything worked! Why hasn't Altera/Intel upgraded the compiler yet? Has anyone tried using VS2017/2015 successfully? 

 

Querying platform for info: 

========================== 

CL_PLATFORM_NAME = Intel(R) FPGA SDK for OpenCL(TM) 

CL_PLATFORM_VENDOR = Intel(R) Corporation 

CL_PLATFORM_VERSION = OpenCL 1.0 Intel(R) FPGA SDK for OpenCL(TM), Version 18.0 

 

Querying device for info: 

======================== 

CL_DEVICE_NAME = p395_mac_ab : PCIe395 

CL_DEVICE_VENDOR = Nallatech ltd 

CL_DEVICE_VENDOR_ID = 4466 

CL_DEVICE_VERSION = OpenCL 1.0 Intel(R) FPGA SDK for OpenCL(TM), Version 18.0 

CL_DRIVER_VERSION = 18.0 

CL_DEVICE_ADDRESS_BITS = 64 

CL_DEVICE_AVAILABLE = true 

CL_DEVICE_ENDIAN_LITTLE = true 

CL_DEVICE_GLOBAL_MEM_CACHE_SIZE = 32768 

CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE = 0 

CL_DEVICE_GLOBAL_MEM_SIZE = 0 

CL_DEVICE_IMAGE_SUPPORT = true 

CL_DEVICE_LOCAL_MEM_SIZE = 16384 

CL_DEVICE_MAX_CLOCK_FREQUENCY = 1000 

CL_DEVICE_MAX_COMPUTE_UNITS = 1 

CL_DEVICE_MAX_CONSTANT_ARGS = 8 

CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE = 0 

CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS = 3 

CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS = 8192 

CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE = 1024 

CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR = 4 

CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT = 2 

CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT = 1 

CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG = 1 

CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT = 1 

CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE = 0 

Command queue out of order? = false 

Command queue profiling enabled? = true 

Using AOCX: hello_world.aocx 

Reprogramming device [0] with handle 1 

 

Kernel initialization is complete. 

Launching the kernel... 

 

Thread# 2: Hello from Altera's OpenCL Compiler! 

 

Kernel execution is complete.
0 Kudos
Highlighted
Valued Contributor III
50 Views

 

--- Quote Start ---  

It is likely that Nallatech's BSP is not compatible with Quartus v18.0. Check their instructions to see what version of Quartus is compatible with your BSP. 

--- Quote End ---  

 

 

I have received reports of OpenCL kernels being compiled with Quartus/OpenCL SDK 18.0.0 using the latest Nallatech Stratix-V BSP R001.003.0003 if the environment variables are set up so both the new INTEL and the old ALTERA environment variables are all set up.  

 

The Intel tools seem to need both but it is not documented. For examples, make sure to set up both INTELFPGAOCLSDKROOT and ALTERAFPGAOCLSDKROOT, etc. 

 

Thanks, 

G
0 Kudos
Highlighted
Beginner
50 Views

I'm stucked with the same problem when I'm trying to setup the 'Mandelbrot-display example' from Rocket-board (at my De0-nano-SoC, Terasic).

Did you manage to download the .aocx to your board? and what do you use? De10-nano..? Did you changed the device_model in you BSP?

0 Kudos
Highlighted
Valued Contributor II
50 Views

@HAskd, I don't think your issue is related to this topic since you are using a completely different board. Have you tried following this guide?

 

https://rocketboards.org/foswiki/Projects/OpenCLMandelbrotDemoOnAtlasSoC

0 Kudos