10-24-2019 09:09 AM - edited 10-24-2019 09:11 AM
Hi, I'm new to SDAccel (2019.1) on Ubuntu 18.04.
I am developing some applications using lgamma() function.
I created application by modifying vadd example project.
In C++ Kernel, I want to use lgamma() function, so I include "hls_math.h".
SW-Emulation build was successfully completed, but when running, application stops and show the following error message.
Software emulation of compute unit(s) exited unexpectedly
When I remove lgamma() function, SW-Emulation works successfully.
I thought this problem was related to loading libraries, so I tested lgamma() function in host code.
I also included "hls_math.h" in host code, and wrote lgamma() function in main(). Compile works successfully.
But SW-Emulation also failed with the following error.
/home/nittax/Desktop/dp_sdx/Emulation-SW/dp_sdx.exe: error while loading shared libraries: libIp_floating_point_v7_0_bitacc_cmodel.so: cannot open shared object file: No such file or directory
I looked for "libIp_floating_point_v7_0_bitacc_cmodel.so". I found the file in "/tools/Xilinx/Vivado/2019.1/lnx64/tools/fpo_v7_0/libIp_floating_point_v7_0_bitacc_cmodel.so". I added this directory to PATH, but the problem was not solved.
Any ideas?? Thanks in advance.
10-24-2019 03:36 PM
Hi @nittax
> I looked for "libIp_floating_point_v7_0_bitacc_cmodel.so". I found the file in "/tools/Xilinx/Vivado/2019.1/lnx64/tools/fpo_v7_0/libIp_floating_point_v7_0_bitacc_cmodel.so". I added this directory to PATH, but the problem was not solved.
I'm not familiar with SDAccel.
But I ask you how do you add this directory.
In his case, at least you add this directory into LD_LIBRARY_PATH. Not PATH.
Have you already added it into LD_LIBRARY_PATH ?
Best regards,
10-24-2019 05:56 PM
@watari Thanks for your reply.
Oh, I misunderstand the LD_LIBRARY_PATH... So I add "/tools/Xilinx/Vivado/2019.1/lnx64/tools/fpo_v7_0" to LD_LIBRARY_PATH.
export LD_LIBRARY_PATH=/tools/Xilinx/Vivado/2019.1/lnx64/tools/fpo_v7_0:$LD_LIBRARY_PATH
Using lgamma() function in host code works successfully by this solution. Thanks.
But in kernel code, I still can't use lgamma() function.
I will try a little more.
10-24-2019 06:27 PM
Hi @nittax
BTW, did you make sure errno ?
Also, you might change function from lgamma to lgamma_r, if it's relevant some error...
Best regards,
10-25-2019 08:21 AM
Hmm.. I found that lgamma() for specific argument value crash the kernel.
I think the implementation of lgamma() and tgamma() in hls library is wrong..
In HLS use guide (UG902 v2019.1) , the limitation for input argument is as follows.
I have tested these functions on Vivado HLS 2019.1.
Case1 and Case 3 is incorrect. only case2 is correct.
Although both ap_fixed<32,10> and ap_fixed<10.5> satisfies the input argument limitation, I can't obtain correct result..
I will post this problem as new post.
10-25-2019 08:29 AM