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

Host Pipe example : failed set arg 0, error code -30

Honored Contributor II


All new on the forum, thanks by advance for your reading and answer. 


problem :  


I am currently trying to run the demo code for opencl host pipes on an Arria X  


And am getting an error code -30 (CL_INVALID_ARG) at the first call to clSetKernelArg, enqueuing the host pipe.  



scenario :  


Intel FPGA tools are installed into /opt/intelfpga_pro/ 


1 - > I run the script, output : 


source /opt/intelFPGA_pro/17.1/  

INTELFPGAOCLSDKROOT is set to /opt/intelFPGA_pro/17.1/hld. Using that. 


Found a Quartus directory at /opt/intelFPGA_pro/17.1/quartus. Using that. 


AOCL_BOARD_PACKAGE_ROOT is set to /opt/intelFPGA_pro/17.1/hld/board/xpressgxa10_lp1150_hpc_17.1.0_b240_ultra. Using that. 

Adding /opt/intelFPGA_pro/17.1/hld/bin to PATH 

Adding /opt/intelFPGA_pro/17.1/hld/host/linux64/lib to LD_LIBRARY_PATH 

Adding /opt/intelFPGA_pro/17.1/hld/board/xpressgxa10_lp1150_hpc_17.1.0_b240_ultra/linux64/lib to LD_LIBRARY_PATH 


2 -> I compile the host program with make, 

3 -> I compile the kernel with aoc -v -board=..._hostch , I run the host : 

4 -> I run the host after copying the .aocx file alongside it. 



Using AOCX: loopback_hostpipe.aocx 

Reprogramming device [0] with handle 1 

Creating kernel (loopback_hostpipe) 

failed set arg 0. 

Error code: -30 


additionnal informations : 


When reproducing the scenario after commenting the lines where host pipes are set args for the kernel, the two others arguments  

are properly set and the host will fail running because of the lack of kernel args, so I suppose the error comes from the host pipes. 


Thanks again for reading, and for your help ! 

0 Kudos
6 Replies
Honored Contributor II

Host pipes require support in the BSP. As far as I know, only Altera's reference BSP supports host pipes right now. Unless the BSP for your board supports host pipes, you are not going to be able to use it.

Honored Contributor II

I suppose my BSP is the right one, need to confirm this with the hardware expert...  


Is there a way for me to check if the BSP supports host pipes ?
Honored Contributor II

Check the "board_spec.xml" file in your BSP for a set of lines like the following: 


<channels> <interface name="board" port="host_to_dev" type="streamsource" width="256" chan_id="host_to_dev"/> <interface name="board" port="dev_to_host" type="streamsink" width="256" chan_id="dev_to_host"/> </channels> 


If these lines do not exist, your BSP does not support host channels (which is the most likely case).
Honored Contributor II

I checked the BSP, there is the two lines you mentionned into "board_spec.xml" file.  


Do you have an idea where the -30 error can come from in the host pipe example from Intel-Altera, except a wrong BSP ?
Honored Contributor II

Is the text exactly the same? Channels for communication through network ports also have a similar section in the BSP. 


Other than that, the example should work fine. I haven't tested it personally, though, since my board does not support those channels.
Honored Contributor II

The text is exactly the same.  


Still having this -30 error, will submit a support ticket maybe ... Thanks for your help !