jingpu / Halide-HLS

HLS branch of Halide
Other
77 stars 22 forks source link

'HalideRuntime.h' file not found #14

Closed chingyi071 closed 7 years ago

chingyi071 commented 7 years ago

I have built hls_prj successfully. However, I can't run C synthesis in Vivado HLS Is there any wrong in my setting? image

xuanyoya commented 7 years ago

How is your include order being specified in the Vivado HLS project? Maybe changing the include order could help.

chingyi071 commented 7 years ago

I just follow the steps of Wiki, and use the project generated by Halide-HLS directly. https://github.com/jingpu/Halide-HLS/wiki/Generating-Hardware-IP-%28Verilog%29

stevenbell commented 7 years ago

I'm actually getting the same error, just doing a git pull and trying to build the demosaic_hls and demosaic_harris_hls example projects. I haven't had time to look into it further.

This is on Vivado 2015.4. @xuanyoya @jingpu send me an email if you want to discuss specifics of the server/software setup.

user@server:/nobackup/user/work/Halide-HLS/apps/hls_examples/demosaic_hls$ make run_hls 
RUN_PATH=/nobackup/user/work/Halide-HLS/apps/hls_examples/demosaic_hls \
    RUN_ARGS= \
    vivado_hls -f ../hls_support/run_hls.tcl -l vivado_hls.log
================================================================
  Vivado(TM) HLS - High-Level Synthesis from C, C++ and SystemC
  Version 2015.4
  Build 1412921 on Wed Nov 18 09:58:55 AM 2015
  Copyright (C) 2015 Xilinx Inc. All rights reserved.
================================================================
@I [HLS-10] Running '/cad/xilinx/vivado/2015.4/Vivado_HLS/2015.4/bin/unwrapped/lnx64.o/vivado_hls'
            for user 'user' on host 'kiwi.Stanford.EDU' (Linux_x86_64 version 3.13.0-91-generic) on Sun Sep 17 21:55:19 PDT 2017
            in directory '/nobackup/user/work/Halide-HLS/apps/hls_examples/demosaic_hls'
@I [HLS-10] Creating and opening project '/nobackup/user/work/Halide-HLS/apps/hls_examples/demosaic_hls/hls_prj'.
@I [HLS-10] Adding design file 'hls_target.cpp' to the project
@I [HLS-10] Adding test bench file 'pipeline_hls.cpp' to the project
@I [HLS-10] Adding test bench file 'run.cpp' to the project
@I [HLS-10] Creating and opening solution '/nobackup/user/work/Halide-HLS/apps/hls_examples/demosaic_hls/hls_prj/solution1'.
@I [HLS-10] Setting target device to 'xc7z020clg484-1'
@I [SYN-201] Setting up clock 'default' with a period of 10ns.
@I [HLS-10] Analyzing design file 'hls_target.cpp' ... 
@E [HLS-70] Compilation errors found:
In file included from hls_target.cpp:1:
In file included from ./hls_target.h:8:
../hls_support/Stencil.h:211:10: fatal error: 'HalideRuntime.h' file not found
#include "HalideRuntime.h"
jingpu commented 7 years ago

@chingyi071 @stevenbell How did you build Halide? The current Vivado project setup script assumes that the Halide headers are in /include, which should be the result of running make under folder.

https://github.com/jingpu/Halide-HLS/blob/HLS/apps/hls_examples/hls_support/run_hls.tcl#L2

xuanyoya commented 7 years ago

@stevenbell Could you try changing the following line https://github.com/jingpu/Halide-HLS/blob/HLS/apps/hls_examples/hls_support/run_hls.tcl#L8 to add_files hls_target.cpp -cflags "-std=c++0x -I/path_Halide_HLS/Halide-HLS/include -I../hls_support" ?

Let me know if that doesn't help.

chingyi071 commented 7 years ago

@jingpu Here is my build command

106 15:11 source /tools/linux/xilinx/Vivado/2015.4/settings64.csh 107 15:11 source /tools/linux/xilinx/SDK/2015.4/settings64.csh 108 15:11 make clean 109 15:11 make pipeline_hls.cpp 110 15:12 make run_hls 113 15:14 make out.png 114 15:14 make run_hls

jingpu commented 7 years ago

@chingyi071 Could you try the fix mentioned by @xuanyoya ?

chingyi071 commented 7 years ago

@jingpu Yes, I have tried this. However, "HalideRuntime.h" is visible in Vivado project. But the compilation cannot include the path. screenshot from 2017-09-19 15-17-48

xuanyoya commented 7 years ago

@chingyi071 Could you go to the "Project Settings"? Under the "Synthesis" tab, could you give a screenshot of you CFLAGS?

chingyi071 commented 7 years ago

@xuanyoya Here is the flags of synthesis, thanks screenshot from 2017-09-20 09-12-20

jingpu commented 7 years ago

@chingyi071 I think you want to change the "path_Halide_HLS" string to the path of the project repo on your computer. I also pushed a fix to the repo, so you could also try the new version.

chingyi071 commented 7 years ago

I have tried new version, and the bug if fixed, thanks.

jingpu commented 7 years ago

@chingyi071 Thanks for reporting the issue and verifying the fix.