cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
geunsu
Observer
Observer
776 Views
Registered: ‎07-29-2019

How to set depth of HLS_stream in BNN?

In my project, I need to convert some dnn to bnn, so I am studying about BNN-Pynq.

However, I can't understand about top.cpp.

I just added a conv_layer and a maxpool_layer at the and of convlayers with option 'depth = 128'

But in HW_Build, errors have occured.

It says "WARNING: Hls::stream 'hls::stream<ap_uint<4>>.2 is read while empty.".

Can I ask you how to set the depth of stream 'inter'in top.cpp?

For example, #pragma HLS STREAM variable=inter6 depth=81

 

0 Kudos
1 Reply
shameera
Moderator
Moderator
656 Views
Registered: ‎05-31-2017

Hi @geunsu ,

Generally if you have multiple stream data types, you can use a name along with a variable as shown below

hls::stream<TYPE_OF_STREAM> var_name("my_stream_name");

Also, I would suggest you to recode the testbench or design to check if data is present before reading with the below conditional usage

while(!my_stream.empty()) { <operations> }

 Usage of the above condition will check whether the streaming variable is empty before performing any operation, with which we can overcome the warning.