UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Contributor
Contributor
8,354 Views
Registered: ‎12-29-2013

Vivado 2015.3 HLS Bug: gmp.h

There is a bug in vivado 2015.3 regarding Vivado vs. System include paths. In my case the problematic header is "gmp.h", but it is a more general problem with the way Vivado HLS calls gcc. I have to add something like the following line to the very top of my C/C++ design as work-around (before including things like "hls_math.h"):

 

 

#include "/opt/Xilinx/Vivado_HLS/2015.3/include/gmp.h"

 

otherwise I get the following error message in RTL/C Co-Simulation:

 

 

In file included from /opt/Xilinx/Vivado_HLS/2015.3/include/floating_point_v7_0_bitacc_cmodel.h:148:0,
from /opt/Xilinx/Vivado_HLS/2015.3/include/hls_half.h:40,
from /opt/Xilinx/Vivado_HLS/2015.3/include/hls/utils/x_hls_utils.h:37,
from /opt/Xilinx/Vivado_HLS/2015.3/include/hls_math.h:48,
from /home/clifford/Work/uprojects/2015/raw2cart_hls/raw2ovdv.h:7,
from /home/clifford/Work/uprojects/2015/raw2cart_hls/raw2ovdv.cc:1:
/opt/Xilinx/Vivado_HLS/2015.3/include/mpfr.h:181:9: error: ‘__gmp_const’ does not name a type

 

The problem is that gcc is looking in the system include directories before looking in /opt/Xilinx/Vivado_HLS/2015.3/include/, and I happen to have an (apperently incompatible) gmp.h in /usr/include/x86_64-linux-gnu/gmp.h. In the generated _pre.cc file it can easily be observed that this header is used instead of the one shipped with Vivado HLS.

 

[This is a bug report. I don't need support.]

4 Replies
3,164 Views
Registered: ‎04-03-2017

Re: Vivado 2015.3 HLS Bug: gmp.h

I am getting same errors while using gmp.h in my project. I added path (drive:\Xilinx\Vivado_HLS\2015.2\include\gmp.h) to solve the issue of gmp.h not found.

Newbie smosanu
Newbie
2,054 Views
Registered: ‎11-28-2017

Re: Vivado 2015.3 HLS Bug: gmp.h

Thank you! This worked for me as well. Great help! Makes sense - it's strange that I am still getting this bug in version 2017.1.

0 Kudos
Highlighted
Visitor asohangh
Visitor
1,178 Views
Registered: ‎10-13-2008

Re: Vivado 2015.3 HLS Bug: gmp.h

I can confirm this is still an issue with 2017.2 with the supposedly supported Ubuntu 16.04 platform.
0 Kudos
Moderator
Moderator
1,113 Views
Registered: ‎10-04-2011

Re: Vivado 2015.3 HLS Bug: gmp.h

This is still the accepted workaround in 2018.1. It is under investigation by our engineering team.

0 Kudos