jingpu / Halide-HLS

HLS branch of Halide
Other
77 stars 22 forks source link

"make run_hls" fails inside Vivado HLS #12

Closed khashpp closed 7 years ago

khashpp commented 7 years ago

Hi @jingpu,

I followed the instructions provided in the Wiki, then I tried to run an example from Halide-HLS/apps/hls_examples (in my case, I tried the conv_hls and Gaussian_hls examples). I can see that the cpp code is generated and the project is made in vivado hls, but it fails to compile when it is running c-simulation, here is the first error:

/XXXXXX/XXXXX/Halide-HLS/apps/hls_examples/conv_hls/../../../include/HalideBuffer.h:74:22: error: function definition does not declare parameters

I also tried to open the project and run it in vivado hls and the same problem was observed. In addition to that, I tried to run ¨C-synthesis¨ without doing the C-simulation and it worked. ........................................................................................................................................................... here is the information of my system and software: Linux: Ubuntu 14.04.5 LTS (Release:14.04) gcc version 4.8.4 Vivado HLS version 2015.4 ...........................................................................................................................................................

Thank you in advance!

jingpu commented 7 years ago

Does the C simulation runs with gcc 4.8 (you can do it with "make run" command in the example folder)? Looks the issue is that the C compiler that vivado_hls uses does not parse the following object initialization syntax.

struct AllocationHeader {
    void (*deallocate_fn)(void *);
    std::atomic<int> ref_count {0};
};
xuanyoya commented 7 years ago

@khashpp Please pull the latest code, and let us know if there is still any issues left.