cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
drjack
Visitor
Visitor
372 Views
Registered: ‎09-12-2020

how to use functions from HLS math libraries in SDSoC

Hi,

I am having trouble using functions from HLS Math library in my hardware accellerated functions in SDSoC in 2018.2 (on Windows 10).

I am including the header file for the HLS Math library as:

 

 

#include <hls_math.h>

 

 

And, I am trying to call the functions in my hardware accelerated function as:

 

 

float umag = hls::sqrt(umagsq);
float c  = cos(theta);

 

 

However, the getting the following error during build:

 

 

undefined reference to `hls::sqrt(float)' 
undefined reference to `hls::cos(float)' 

 

 

I am probably missing something.  Any help will be appreciated.

Thanks...

0 Kudos
1 Reply
wenchen
Moderator
Moderator
261 Views
Registered: ‎05-27-2018

Hi @drjack 

Can you find the hls::math library in your project include dictionary?

From the user guide, hls::sqrt(float) and hls::cos(float) are supported in the hls math library. 

https://www.xilinx.com/support/documentation/sw_manuals/xilinx2018_2/ug902-vivado-high-level-synthesis.pdf

Wen

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.


**~ Got a minute? Answer our Vitis HLS survey here! ~**


-------------------------------------------------------------------------
如果提供的信息能解决您的问题,请标记为“接受为解决方案”。
如果您认为帖子有帮助,请点击“奖励”。谢谢!
-------------------------------------------------------------------------------------------------
0 Kudos