Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
7 years ago

Intel HLS can not generate execution file

Hello,I am trying to use Intel HLS ,but it seems has some problem.

I have used windows7 and Quartus 17.1 pro.

This is my code:

# include "HLS/stdio.h"
int main() {
      printf("Hello world!!\n");
   
  return 0;
}

My command :

i++ -march=x86-64 hello.cpp

and this is output :


C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin/link.exe : fatal error LNK1107: invalid or corrupt file :cannot read at 0x2A0
HLS Link x86-64 FAILD.

I also try to run the example Counter,used command :

i++ -march=Arria10 counter.cpp

and get the same output.Unlike the above, it generates a prj folder.

I had try to add C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin to the PATH ,

reinstalled Quartus and visual studio 2010.

None of these are useful.

Any help would be appreciated.

5 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi,

    1.Have initialized the environment for HLS compiler?

    2.Do You have any other version of Quartus installed on the machine?

    Can you attach the log of command prompt?To get to know the steps followed.

    Best Regards,

    Anand Raj Shankar

    (This message was posted on behalf of Intel Corporation)
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I have uninstalled Quartus 15,DevC++ and visual studio 2015 before I installed visual studio 2010 and Quartus 17.

    There is only one version of Quartus 17 on the machine.

    I first installed visual studio 2010 Professional ,and than installed Quartus 17.1. Finally, I have installed MinGW.

    After the installation is complete, this is my command prompt:

    
    Setting environment for using Microsoft Visual Studio 2010 x64 tools.
    C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC>cd C:\intelFPGA_pro\17.1\hls
    C:\intelFPGA_pro\17.1\hls>init_hls.bat
    Assuming current directory (C:\intelFPGA_pro\17.1\hls\) is root of i++
    Will use C:\intelFPGA_pro\17.1\hls\..\quartus to find Quartus
     for internal i++ use
    INFO: Could not find files for the given pattern(s).
    Will be using Modelsim at C:\intelFPGA_pro\17.1\modelsim_ase\win32aloem
    Will be using Modelsim at C:\intelFPGA_pro\17.1\modelsim_ae\win32aloem
    Adding C:\intelFPGA_pro\17.1\hls\bin to PATH
    Adding C:\intelFPGA_pro\17.1\hls\host\windows64\bin to PATH
    C:\intelFPGA_pro\17.1\hls>H:
    H:\>cd H:\test\counter
    H:\test\counter>i++ -march=Arria10 counter.cpp
    c:/program files (x86)/microsoft visual studio 10.0/vc/bin/link.exe : fatal error LNK1107: invalid or corrupt file :cannot read at 0x2A0
    HLS Link x86-64 FAILD.
    H:\test\counter>i++ -march=x86-64 counter.cpp
    c:/program files (x86)/microsoft visual studio 10.0/vc/bin/link.exe : fatal error LNK1107: invalid or corrupt file :cannot read at 0x2A0
    HLS Link x86-64 FAILD.
    H:\test\counter>i++ --debug counter.cpp
    EmitRawText called on an MCStreamer that doesn't support it,  something must not be fully mc'ized
    aocl-clang: error: clang frontend command failed with exit code 3 (use -v to see invocation)
    HLS x86-64 compile FAILED.
    H:\test\counter>i++ -v counter.cpp
    Target FPGA part name: 10AX115U1F45I1SG
    Target FPGA family name: Arria 10
    Target FPGA speed grade: -2
    Analyzing counter.cpp
    Linking x86 objects
    c:/program files (x86)/microsoft visual studio 10.0/vc/bin/link.exe : fatal error LNK1107: invalid or corrupt file :cannot read at 0x2A0
    HLS Link x86-64 FAILD.
    H:\test\counter>
    
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi,

    To check if VS2010 installed properly.

    Can you run the example in Quartus 17.1 using a build.bat file and check?

    https://www.altera.com/content/dam/altera-www/global/en_us/pdfs/literature/hb/hls/ug-hls-getting-started.pdf

    http://www.alteraforum.com/forum/showthread.php?t=58215

    Let me know if this has helped resolve the issue you are facing or if you need any further assistance.

    Best Regards,

    Anand Raj Shankar

    (This message was posted on behalf of Intel Corporation)
  • sThei's avatar
    sThei
    Icon for New Contributor rankNew Contributor

    (-> https://forums.intel.com/s/question/0D50P00004C5jTsSAJ/)

    Hi,

    I've got a similar error. I tried to run the example "counter":

    cd C:\intelFPGA_pro\18.1\hls

    init_hls.bat (->The i++ compiler is now available at 'C:\intelFPGA_pro\18.1\hls\bin\' (through your %Path%))

    cd C:\intelFPGA_pro\18.1\hls\examples\counter

    build.bat test-x86-64

    i++  -march=x86-64 counter.cpp -o test-x86-64.exe
    c:/program files (x86)/microsoft visual studio 14.0/vc/bin/link.exe : fatal error LNK1107: invalid or corrupt file: cannot read at 0x320
    HLS Link x86-64 FAILED.
    Run test-x86-64.exe to execute the test.

    Any suggestions on how to solve that problem?

    I'm using:

    Quartus Prime 18.1.0 Patch 0.04

    VS 2015 Update 3

    Win 10 64Bit