Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
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.
15539 Discussions

error: Unexpected use of HDL library function(s)

Altera_Forum
Honored Contributor II
884 Views

Hi,  

 

I'm using the 16.1 SDK to develop an OpenCL library. After added a second input parameter to my function, I get this error message (twice): 

 

error: Unexpected use of HDL library function(s) (possibly due to taking the address of the function)! error: Unexpected use of HDL library function(s) (possibly due to taking the address of the function)! 

 

I'm definitely not taking the address of the function. Do you have any suggestion as to what this error message could mean? If I remove the second argument to the function everything works as expected. This seems like a bug to me. (The entire setup is basically the same as in the OpenCL library example where they show a floating point division example.) 

 

Thanks, 

Hanno
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
91 Views

Upon further testing, this seems to be related to the datatype. If I use "unsigned long" in the RTL library, I get the error. If I use "unsigned long long" it works. So there seems to be a mismatch of the inferred width between the different compiler parts. (I guess the vague C standard is partly to blame here, but a better error message would have saved me a lot of time).

Reply