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.
14947 Discussions

HLS Compiler (Prime 17.1): change GCC version in use

MathiasB
Novice
390 Views

Hi everyone,

I am trying to compile a C-written component to RTL with HLS Compiler Prime Standard in version 17.1.0.

I can call g++ directly to compile the C file for simulation (this works fine), but I must use i++ itself to compile it for my target architecture (MAX10 in this case).

I tried: $ i++ -march="MAX 10" calibration_hls.c

The problem is that i++ includes files from gcc/g++ 4.8.5 and the build fails. As 4.8.5 as not a supported version, I am trying to use 4.4.7 which is also installed on my workstation.

However I cannot have i++ to refer to the correct GCC version. I have tried aliases and setting CC and CXX variables at the beginning of my command, but none worked. The only thing that made a difference was the following:

$ i++ -I /usr/include/c++/4.4.7 -march="MAX 10" calibration_hls.c

This, however, also fails, but in a different way.

Does anyone know a solution to this?

Please consider that I am using Prime Standard so I do not have access to the switch --gcc-toolchain and that I do not have root rights on the workstation (which runs CentOS 7).

I attached two files to this message. i++Cmdresult.txt is the output of my first command, the other file is the output of the second command.

Thank you very much!

0 Kudos
1 Solution
MathiasB
Novice
357 Views

Hi,

Thank you for your answer.

I am afraid I can't do as you suggest, because this version of gcc is useful for other people on the workstation.

However, this gave me an idea that I think is successful. At least I can obtain a "a.prj" directory, seemingly populated. Since I am a complete beginner in HLS, I can't say if everything worked fine.

What I did is the following :

I copied gcc and g++ executables from /usr/bin to ~/bin/ (a new, personal directory). I then added this directory to the beginning of my $PATH variable.

Then I wrote a small TCL script to find what are the necessary include directories for gcc/g++ 4.4.7.

I can then run :

$ i++ `./includes.tcl` -march="MAX 10" --fpga-only calibration_hls.c

This does the trick.

I will continue with this for a bit to see if no new problem emerge, so I leave the topic opened until then.

Regards.

PS: .tcl files are not supported, so I zipped it before attaching it.

View solution in original post

3 Replies
AnilErinch_A_Intel
366 Views

Hi,

can you uninstall the 4.8.5 version of gcc and try to follow the instructions mentioned in the link to work with 4.4.7 version of gcc.

https://www.intel.com/content/dam/www/programmable/us/en/pdfs/literature/hb/hls/archives/ug-hls-gett...

Thanks and Regards

Anil


MathiasB
Novice
358 Views

Hi,

Thank you for your answer.

I am afraid I can't do as you suggest, because this version of gcc is useful for other people on the workstation.

However, this gave me an idea that I think is successful. At least I can obtain a "a.prj" directory, seemingly populated. Since I am a complete beginner in HLS, I can't say if everything worked fine.

What I did is the following :

I copied gcc and g++ executables from /usr/bin to ~/bin/ (a new, personal directory). I then added this directory to the beginning of my $PATH variable.

Then I wrote a small TCL script to find what are the necessary include directories for gcc/g++ 4.4.7.

I can then run :

$ i++ `./includes.tcl` -march="MAX 10" --fpga-only calibration_hls.c

This does the trick.

I will continue with this for a bit to see if no new problem emerge, so I leave the topic opened until then.

Regards.

PS: .tcl files are not supported, so I zipped it before attaching it.

View solution in original post

AnilErinch_A_Intel
299 Views

Hi ,

Glad to know that you found a work around.

Thanks for sharing the same with the community.

Thanks and Regards

Anil


Reply