Intel® High Level Design
Support for Intel® High Level Synthesis Compiler, DSP Builder, OneAPI for Intel® FPGAs, Intel® FPGA SDK for OpenCL™
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.
504 Discussions

Host Pipes not working as documented in Programming Guide

New Contributor I

Section of the OpenCL FPGA Programming Guide has in the host code example a direct call to clReadPipeIntelFPGA() and clWritePipeIntelFPGA(), while the only downloadable code example (that I know of) that shows host pipes, "loopback_hostpipe", does the following:

map_pipe_fn = (void * (*) (cl_mem, cl_map_flags, size_t, size_t *, cl_int *)) clGetExtensionFunctionAddress("clMapHostPipeIntelFPGA"); unmap_pipe_fn = (cl_int (*) (cl_mem, void *, size_t, size_t *)) clGetExtensionFunctionAddress("clUnmapHostPipeIntelFPGA");

So I tried modifying my host pipe code to use the same clGetExtensionFunctionAddress to access the clReadPipeIntelFPGA and clWritePipeIntelFPGA and that worked -- well, sort of -- at least it didn't hang like when I was calling clWritePipeIntelFPGA directly.


Is it a requirement to use clGetExtensionFunctionAddress to fetch those functions? Or should I be able to call clWritePipeIntelFPGA directly? Also, clGetExtensionFunctionAddress is marked as deprecated in cl.h, so obviously there's a better way to do it.



0 Kudos
2 Replies



I am checking it internally.





I had reviewed the problem stated.

According to in chapter 6.4 stated: " when you link your host application to the FPGA Client Driver (FCD), you cannot directly reference these Custom Platformspecific functions. To reference Custom Platform-specific user-accessible functions while linking to the FCD, include the clGetBoardExtensionFunctionAddressIntelFPGA extension in your host application".


It seems like the function " clGetBoardExtensionFunctionAddressIntelFPGA" is used to point the function which is not specified in OpenCL Specification 2.0: in chapter 5.4. Since the function eg:  clReadPipeIntelFPGA, clWritePipeIntelFPGA, clMapHostPipeIntelFPGA, and clUnmapHostPipeIntelFPGA is not specified in OpenCL Specification, thus it need the function " clGetBoardExtensionFunctionAddressIntelFPGA" to point out the function.


Also, I had reviewed the cl.h file. Since clGetBoardExtensionFunctionAddress is deprecated, it should be replace by another function with different name. I am not sure whether it is replaced "clGetBoardExtensionFunctionAddressIntelFPGA". But there is no " clGetBoardExtensionFunctionAddressIntelFPGA" is stated in the file. I have to check internally with the developer again. I will reply here once the developer reply to me.