cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
troore
Visitor
Visitor
3,240 Views
Registered: ‎08-02-2017

HLS DATAFLOW with two input branches

Jump to solution

Hi,

 

I've got one issue when using HLS's DATAFLOW mechanism to pipeline tasks in a task graph. The graph can be seen in the attachment.

 

The inputs of the graph are arrays A[N] and B[N], and output array is D[N], represented by yellow bars. Tasks are blue circles, and channels are blue arrows. Then, for the first tasks (A and B), my code is like:

 

 

for (i=0; i<N; i++)
    ch_in_to_A << A[i];
for (i=0; i<N; i++)
    ch_in_to_B << B[i];
...
for (i=0; i<N; i++)
D[i] = ch_

The HLS processes report a WARNING: Reading dataflow channel 'B' in the middle of dataflow may stall the dataflow pipeline. So how to solve this WARNING?

 

Thanks,

troore

dataflow.png
0 Kudos
1 Solution

Accepted Solutions
troore
Visitor
Visitor
4,755 Views
Registered: ‎08-02-2017

Thanks so much for your reply. I think the reason you point out is correct.

 

In the original code, actually I do not add any interfaces for the global memory A, B and E. After I added the following interface binding code at the beginning of the top function, the WARNING disappeared:

 

#pragma HLS INTERFACE m_axi port=A offset=slave bundle=A
#pragma HLS INTERFACE m_axi port=B offset=slave bundle=B
#pragma HLS INTERFACE m_axi port=E offset=slave bundle=E

View solution in original post

0 Kudos
3 Replies
troore
Visitor
Visitor
3,236 Views
Registered: ‎08-02-2017

The last line of code is:

 

E[i] = ch_D_to_out.read();

Sorry for the inconvenient.

 

Thanks,

troore

0 Kudos
u4223374
Advisor
Advisor
3,172 Views
Registered: ‎04-26-2015

I think you can just ignore that warning. The reason for warning you is that if A and B are synchronized in some way (eg. both work in lock-step) then reading from both of them in a dataflow system may deadlock (if HLS doesn't set up the reads in just the right order to support the synchronization). The way you've done the diagram, A and B are totally independent and so it won't matter what order the reads happen in.

0 Kudos
troore
Visitor
Visitor
4,756 Views
Registered: ‎08-02-2017

Thanks so much for your reply. I think the reason you point out is correct.

 

In the original code, actually I do not add any interfaces for the global memory A, B and E. After I added the following interface binding code at the beginning of the top function, the WARNING disappeared:

 

#pragma HLS INTERFACE m_axi port=A offset=slave bundle=A
#pragma HLS INTERFACE m_axi port=B offset=slave bundle=B
#pragma HLS INTERFACE m_axi port=E offset=slave bundle=E

View solution in original post

0 Kudos