Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
17098 Discussions

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

MathiasB
New Contributor I
2,085 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!

(Virus scan in progress ...)
(Virus scan in progress ...)
0 Kudos
1 Solution
MathiasB
New Contributor I
2,052 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

(Virus scan in progress ...)
0 Kudos
3 Replies
AnilErinch_A_Intel
2,061 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-getting-started-17-1.pdf

Thanks and Regards

Anil


0 Kudos
MathiasB
New Contributor I
2,053 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.

(Virus scan in progress ...)
0 Kudos
AnilErinch_A_Intel
1,994 Views

Hi ,

Glad to know that you found a work around.

Thanks for sharing the same with the community.

Thanks and Regards

Anil


0 Kudos
Reply