cornell-zhang / heterocl

HeteroCL: A Multi-Paradigm Programming Infrastructure for Software-Defined Heterogeneous Computing
https://cornell-zhang.github.io/heterocl/
Apache License 2.0
322 stars 92 forks source link

Double closing angle brackets (>>) generate syntax error in Vivado HLS #217

Closed chhzh123 closed 4 years ago

chhzh123 commented 4 years ago

The current vhls codegen generates the following kernel function signature

void test(hls::stream<ap_uint<8>>& A_channel, hls::stream<ap_uint<8>>& B_channel)

leading to the following error.

In file included from kernel.cpp:8:
./kernel.h:10:38: error: use of undeclared identifier 'A_channel'
  void test(hls::stream<ap_uint<8>>& A_channel, hls::stream<ap_uint<8>>& B_channel);
                                     ^
./kernel.h:10:83: error: type name requires a specifier or qualifier
  void test(hls::stream<ap_uint<8>>& A_channel, hls::stream<ap_uint<8>>& B_channel);

It seems Vivado HLS (v2018) uses a legacy C/C++ compiler that still cannot distinguish the meaning of >>.

Since it only needs to add a space after the variable type, I'll fix it in #215 .