UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor
Contributor
180 Views
Registered: ‎10-13-2018

WARNING: Hls::stream 'hls::stream<unsigned char>.1' is read while empty, which may result in RTL simulation hanging

Jump to solution

hi evreybody

 

I get the following warning messages in the code I wrote you

can help me with this warning

**********************************************************************************************************************************************************

warning report:

from ../../../../source/plate_recognation.h:1,
from ../../../../source/plate_recognation.cpp:1:
E:/Xilinx/Vivado/2018.3/include/floating_point_v7_0_bitacc_cmodel.h:135:0: note: this is the location of the previous definition
#define __GMP_LIBGMP_DLL 1

WARNING: Hls::stream 'hls::stream<unsigned char>.1' is read while empty, which may result in RTL simulation hanging.
WARNING: Hls::stream 'hls::stream<unsigned char>.2' is read while empty, which may result in RTL simulation hanging.
WARNING: Hls::stream 'hls::stream<unsigned char>.3' is read while empty, which may result in RTL simulation hanging.
WARNING: Hls::stream 'hls::stream<unsigned char>.1' is read while empty, which may result in RTL simulation hanging.
WARNING: Hls::stream 'hls::stream<unsigned char>.2' is read while empty, which may result in RTL simulation hanging.
WARNING: Hls::stream 'hls::stream<unsigned char>.3' is read while empty, which may result in RTL simulation hanging.
WARNING: Hls::stream 'hls::stream<unsigned char>.1' is read while empty, which may result in RTL simulation hanging.
WARNING: Hls::stream 'hls::stream<unsigned char>.2' is read while empty, which may result in RTL simulation hanging.
WARNING: Hls::stream 'hls::stream<unsigned char>.3' is read while empty, which may result in RTL simulation hanging.
WARNING: Hls::stream 'hls::stream<unsigned char>.1' is read while empty, which may result in RTL simulation hanging.
WARNING: Hls::stream 'hls::stream<unsigned char>.2' is read while empty, which may result in RTL simulation hanging.
WARNING: Hls::stream 'hls::stream<unsigned char>.3' is read while empty, which may result in RTL simulation hanging.
WARNING: Hls::stream 'hls::stream<unsigned char>.1' is read while empty, which may result in RTL simulation hanging.

*************************************************************************************************************************************

my code:

//hls::Mat-type local variables for intermediate results
//pragma stream depth tells tools that no buffering is needed
rgb_img_t img0(MAX_HEIGHT, MAX_WIDTH);
#pragma HLS STREAM variable=img0 depth=1 dim=1
rgb_img_t img1(MAX_HEIGHT, MAX_WIDTH);
#pragma HLS STREAM variable=img1 depth=1 dim=1
rgb_img_t img2(MAX_HEIGHT, MAX_WIDTH);
#pragma HLS STREAM variable=img2 depth=1 dim=1
rgb_img_t img3(MAX_HEIGHT, MAX_WIDTH);
#pragma HLS STREAM variable=img3 depth=1 dim=1
rgb_img_t img4(MAX_HEIGHT/2, MAX_WIDTH/2);
#pragma HLS STREAM variable=img4 depth=1 dim=1
rgb_img_t img5(MAX_HEIGHT/2, MAX_WIDTH/2);
#pragma HLS STREAM variable=img5 depth=1 dim=1
rgb_img_t img6(MAX_HEIGHT/2, MAX_WIDTH/2);
#pragma HLS STREAM variable=img6 depth=1 dim=1
rgb_img_t img7(MAX_HEIGHT/2, MAX_WIDTH/2);
#pragma HLS STREAM variable=img7 depth=1 dim=1
rgb_img_t img8(MAX_HEIGHT, MAX_WIDTH);
#pragma HLS STREAM variable=img8 depth=1 dim=1
///Interpret AXI-Stream interface and pull the frame from it
hls::AXIvideo2Mat(stream_in, img0);
//Convert to grayscale
hls::CvtColor<HLS_RGB2GRAY>(img0, img8);
//Run the Sobel operator on the x-axis with a 3x3 kernel
//hls::Erode(img1,img2); //goruntu cok net oldu
single_color(img0,img1);
hls::Sobel<0,1,3>(img1,img2);

resize_half(img0,img4);
resize_half(img1,img5);
resize_half(img2,img6);
resize_half(img8,img7);
goruntu_birlestirme(img4,img5,img6,img7,img3);
// hls::Resize(img0,img7);

//Pack the frame back into AXI-Stream interface
hls::Mat2AXIvideo(img3, stream_out);

****************************************************************************************************************************************************

0 Kudos
1 Solution

Accepted Solutions
Scholar u4223374
Scholar
161 Views
Registered: ‎04-26-2015

Re: WARNING: Hls::stream 'hls::stream<unsigned char>.1' is read while empty, which may result in RTL simulation hanging

Jump to solution

If you look at where the data flows:

AXIvideo2Mat reads stream_in, writes img0
CvtColor reads img0, writes img8
single_colour reads img0 (which is empty, because it was read by CvtColor), writes img1
Sobel reads img1, writes img2
resize_half reads img0 (which is empty because it was read by CvtColor), writes img4
resize_half reads img1 (which is empty because it was read by Sobel), writes img5
resize_half reads img2, writes img6
resize_half reads img8, writes img7
gorunto_birlestirme reads img4, img5, img6, img7, writes img3
Mat2AXIvideo reads img3, writes stream_out

The big difference between "normal" OpenCV and HLS is that when an image is read in HLS, it can't be read again - that data has been consumed. To use it multiple times, you need to use hls::Duplicate to create multiple copies and use each copy exactly once.

0 Kudos
7 Replies
Scholar u4223374
Scholar
162 Views
Registered: ‎04-26-2015

Re: WARNING: Hls::stream 'hls::stream<unsigned char>.1' is read while empty, which may result in RTL simulation hanging

Jump to solution

If you look at where the data flows:

AXIvideo2Mat reads stream_in, writes img0
CvtColor reads img0, writes img8
single_colour reads img0 (which is empty, because it was read by CvtColor), writes img1
Sobel reads img1, writes img2
resize_half reads img0 (which is empty because it was read by CvtColor), writes img4
resize_half reads img1 (which is empty because it was read by Sobel), writes img5
resize_half reads img2, writes img6
resize_half reads img8, writes img7
gorunto_birlestirme reads img4, img5, img6, img7, writes img3
Mat2AXIvideo reads img3, writes stream_out

The big difference between "normal" OpenCV and HLS is that when an image is read in HLS, it can't be read again - that data has been consumed. To use it multiple times, you need to use hls::Duplicate to create multiple copies and use each copy exactly once.

0 Kudos
Contributor
Contributor
151 Views
Registered: ‎10-13-2018

Re: WARNING: Hls::stream 'hls::stream<unsigned char>.1' is read while empty, which may result in RTL simulation hanging

Jump to solution

hi

thank you very much for interested

it is solved other problem. you can help me reply

best regards

Alpaslan Sahan

warning:

WARNING: Hls::stream 'hls::stream<unsigned char>.28' is read while empty, which may result in RTL simulation hanging.
WARNING: Hls::stream 'hls::stream<unsigned char>.29' is read while empty, which may result in RTL simulation hanging.
WARNING: Hls::stream 'hls::stream<unsigned char>.30' is read while empty, which may result in RTL simulation hanging.
WARNING: Hls::stream 'hls::stream<unsigned char>.28' is read while empty, which may result in RTL simulation hanging.
WARNING: Hls::stream 'hls::stream<unsigned char>.29' is read while empty, which may result in RTL simulation hanging.

 

my code:

//hls::Mat-type local variables for intermediate results
//pragma stream depth tells tools that no buffering is needed
rgb_img_t img0(MAX_HEIGHT, MAX_WIDTH);
#pragma HLS STREAM variable=img0 depth=1 dim=1
rgb_img_t img0_1(MAX_HEIGHT, MAX_WIDTH);
#pragma HLS STREAM variable=img0_1 depth=1 dim=1
rgb_img_t img0_2(MAX_HEIGHT, MAX_WIDTH);
#pragma HLS STREAM variable=img0_2 depth=1 dim=1
rgb_img_t img1(MAX_HEIGHT, MAX_WIDTH);
#pragma HLS STREAM variable=img1 depth=1 dim=1
rgb_img_t img1_1(MAX_HEIGHT, MAX_WIDTH);
#pragma HLS STREAM variable=img1_1 depth=1 dim=1
rgb_img_t img1_2(MAX_HEIGHT, MAX_WIDTH);
#pragma HLS STREAM variable=img1_2 depth=1 dim=1
rgb_img_t img0_3(MAX_HEIGHT, MAX_WIDTH);
#pragma HLS STREAM variable=img0_3 depth=1 dim=1
rgb_img_t img0_4(MAX_HEIGHT, MAX_WIDTH);
#pragma HLS STREAM variable=img0_4 depth=1 dim=1

rgb_img_t img2(MAX_HEIGHT, MAX_WIDTH);
#pragma HLS STREAM variable=img2 depth=1 dim=1
rgb_img_t img3(MAX_HEIGHT, MAX_WIDTH);
#pragma HLS STREAM variable=img3 depth=1 dim=1
rgb_img_t img4(MAX_HEIGHT/2, MAX_WIDTH/2);
#pragma HLS STREAM variable=img4 depth=1 dim=1
rgb_img_t img5(MAX_HEIGHT/2, MAX_WIDTH/2);
#pragma HLS STREAM variable=img5 depth=1 dim=1
rgb_img_t img6(MAX_HEIGHT/2, MAX_WIDTH/2);
#pragma HLS STREAM variable=img6 depth=1 dim=1
rgb_img_t img7(MAX_HEIGHT/2, MAX_WIDTH/2);
#pragma HLS STREAM variable=img7 depth=1 dim=1
rgb_img_t img8(MAX_HEIGHT, MAX_WIDTH);
#pragma HLS STREAM variable=img8 depth=1 dim=1

#pragma HLS dataflow

///Interpret AXI-Stream interface and pull the frame from it
hls::AXIvideo2Mat(stream_in, img0);
//Convert to grayscale
hls::Duplicate(img0,img0_1,img0_2);
hls::Duplicate(img0_1,img0_3,img0_4);
hls::CvtColor<HLS_RGB2GRAY>(img0_3, img8);
//Run the Sobel operator on the x-axis with a 3x3 kernel
single_color(img0_2,img1);
//hls::Erode(img1,img2); //goruntu cok net oldu


hls::Duplicate(img1,img1_1,img1_2);
hls::Sobel<0,1,3>(img1_1,img2);

resize_half(img0_4,img4);
resize_half(img1_2,img5); //single_color
resize_half(img2,img6); //hls::Sobel
resize_half(img8,img7); //hls::CvtColor


goruntu_birlestirme(img4,img5,img6,img7,img3);
// hls::Resize(img0,img7);

//Pack the frame back into AXI-Stream interface
hls::Mat2AXIvideo(img3, stream_out);

0 Kudos
Scholar u4223374
Scholar
111 Views
Registered: ‎04-26-2015

Re: WARNING: Hls::stream 'hls::stream<unsigned char>.1' is read while empty, which may result in RTL simulation hanging

Jump to solution

@mspalpsahan Can you post an updated version of the complete code? I suspect the problem lies somewhere other than your top function.

0 Kudos
Contributor
Contributor
103 Views
Registered: ‎10-13-2018

Re: WARNING: Hls::stream 'hls::stream<unsigned char>.1' is read while empty, which may result in RTL simulation hanging

Jump to solution

hi

my code Attechment file

if you want i can send with Xilinx EZMove File Transfer Service the complete project

best regards

 

Alpaslan Sahan

0 Kudos
Scholar u4223374
Scholar
90 Views
Registered: ‎04-26-2015

Re: WARNING: Hls::stream 'hls::stream<unsigned char>.1' is read while empty, which may result in RTL simulation hanging

Jump to solution

Aha, fixed it. In the "goruntu_birlestirme" function, you've got MAX_WIDTH and MAX_HEIGHT swapped (col should depend on MAX_WIDTH, or even better on COL; row should depend on MAX_HEIGHT or ROW). Compiles and runs now with no problems.

0 Kudos
Contributor
Contributor
79 Views
Registered: ‎10-13-2018

Re: WARNING: Hls::stream 'hls::stream<unsigned char>.1' is read while empty, which may result in RTL simulation hanging

Jump to solution

hi

thank you very much for interested.

it not solve issue. pls can you send your code complate

thank you

Alpaslan sahan

0 Kudos
Contributor
Contributor
62 Views
Registered: ‎10-13-2018

Re: WARNING: Hls::stream 'hls::stream<unsigned char>.1' is read while empty, which may result in RTL simulation hanging

Jump to solution

hi

it is ok.

I found the problem as you said

Thank you very much

0 Kudos