2

I was developing a C based design for someone using Vivado HLS 2015.1.
This design uses the arbitrary precision data types included in "ap_cint.h".

I wanted to know if I could compile this code in a standard gcc compiler by including the relevant header files?
Also can someone point me in the direction of related documentation? Any help or suggestion would be appreciated.

Leos313
  • 5,152
  • 6
  • 40
  • 69
Nikhil Pratap
  • 21
  • 1
  • 3
  • 1
    I'm not sure what is in `ap_cint.h` but there are probably libraries that those header files belong to. Without linking against those libraries, your project will be incomplete. The question then becomes, are you allowed (per your licensing agreement) to link against those libraries? – Jonathon Reinhart Jul 02 '15 at 17:14
  • I did some research on this. Apparently if you use a C++ based design and use the "ap_int.h" header file, we could do it. Also there is no copyright issue as mentioned in the documentation. Thanks for the help though – Nikhil Pratap Jul 06 '15 at 19:26

2 Answers2

1

In 2014.4 I just added include path in eclipse and it does work.

/opt/Xilinx/Vivado_HLS/2014.4/include

Maybe in 2015.i it is same.

(/opt/Xilinx/Vivado_HLS/2014.4/ is my vivado hls home)

Using bare gcc you need to specify include path by -I

Nic30g
  • 659
  • 6
  • 15
0

in the document UG902 of Xilinx you can find all the information that you need about this topic. In this case at the page 346 (of the link) there is the chapter High-Level Synthesis C Libraries where, inside, you can find the Arbitrary Precision Data Types Library section. Vivado uses, that i know, the gcc compiler so, if you are carefull to link the right library, I think that you will never have a problem but I haven't tried yet the same library in Visual Studio (for instance).

Leos313
  • 5,152
  • 6
  • 40
  • 69
  • 1
    From the link: http://www.xilinx.com/support/answers/60924.html "When modeling hardware with C, C++ or SystemC, one of the primary techniques for ensuring good Quality of Results (QoR) in the FPGA device is to use arbitrary precision data types." – Arturete Jul 11 '16 at 13:31