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: 
Observer bva_rzn
Observer
751 Views
Registered: ‎07-04-2017

Converting two streams into one

Hi,

With co \ simulation, an error occurs when merging two threads
in one thread
.

 

Message in the console HLS (Vivado HLS 2017.1):

 

ERROR!!! DEADLOCK DETECTED at 26480000 ns! SIMULATION WILL BE STOPPED! //
//////////////////////////////////////////////////////////////////////////////
/////////////////////////
// Dependence circle 1:
// (1): Process: AXI_stream.AXI_STREAM_OUT_U0
//      Channel: AXI_stream.B1_V_data_V_U, FULL
//      Channel: AXI_stream.B1_V_keep_V_U, FULL
//      Channel: AXI_stream.B1_V_strb_V_U, FULL
//      Channel: AXI_stream.B1_V_user_V_U, FULL
//      Channel: AXI_stream.B1_V_last_V_U, FULL
//      Channel: AXI_stream.B1_V_id_V_U, FULL
//      Channel: AXI_stream.B1_V_dest_V_U, FULL
// (2): Process: AXI_stream.S2S_U0
//      Channel: AXI_stream.B2_V_data_V_U, EMPTY
//      Channel: AXI_stream.B2_V_keep_V_U, EMPTY
//      Channel: AXI_stream.B2_V_strb_V_U, EMPTY
//      Channel: AXI_stream.B2_V_user_V_U, EMPTY
//      Channel: AXI_stream.B2_V_last_V_U, EMPTY
//      Channel: AXI_stream.B2_V_id_V_U, EMPTY
//      Channel: AXI_stream.B2_V_dest_V_U, EMPTY
////////////////////////////////////////////////////////////////////////
// Totally 1 circles detected!


Source

 

void AXI_stream(u256 aIn[],hls::stream<u16stream> &aOut1)
{
#pragma HLS INTERFACE s_axilite port=return
#pragma HLS INTERFACE axis  port = aOut1
#pragma HLS INTERFACE m_axi depth = 25920 port=aIn offset=slave
#pragma HLS STREAM depth = 1024 variable=aOut1

    hls::stream<u16stream> B1;
    hls::stream<u16stream> B2;

#pragma HLS DATAFLOW

    AXI_STREAM_OUT(aIn,B1,B2);
    S2S(B1,B2,aOut1);
}

 

void S2S(hls::stream<u16stream> &inStream1,
         hls::stream<u16stream> &inStream2,
         hls::stream<u16stream> &OutStream)
{
    static unsigned short Buf1[32][720];
    static unsigned short Buf2[32][720];

    xL:for(int col=0; col<22;col++)
      xL1:for(int i=0; i<32;i++)
       xL11:for(int j=0; j<32; j++){//xL11
       #pragma HLS PIPELINE
            u16stream lap1;
            u16stream lap2;
            inStream1.read(lap1);
            inStream2.read(lap2);
            Buf1[i][j+col*32] = lap1.data;
            Buf2[i][j+col*32] = lap2.data;
       }//xL11

    L12:for(int i=0;i<32;i++){//L12
       xL12:for(int k2=0;k2<720;k2++)
        {//xL12
          #pragma HLS PIPELINE
            u16stream lap;
            lap.data = Buf1[i][k2];
            OutStream.write(lap);
       }//xL12
      }//L12

    L13:for(int i=0;i<32;i++){//L12
       xL13:for(int k2=0;k2<720;k2++)
        {//xL12
          #pragma HLS PIPELINE
            u16stream lap;
            lap.data = Buf2[i][k2];
            OutStream.write(lap);
       }//xL12
      }//L12
}

 

With the co\simulation of the next function, the output of the AXI_STREAM_OUT function is correct.

 

void AXI_stream(u256 aIn[],hls::stream<u16stream> &aOut1,hls::stream<u16stream> &aOut2)
{
#pragma HLS INTERFACE s_axilite port=return
#pragma HLS INTERFACE axis  port = aOut1

#pragma HLS INTERFACE axis  port = aOut2
#pragma HLS INTERFACE m_axi depth = 25920 port=aIn offset=slave
#pragma HLS STREAM depth = 1024 variable=aOut1

#pragma HLS STREAM depth = 1024 variable=aOut2


    AXI_STREAM_OUT(aIn,aOut1,aOut2);
}

 

What could be the problem?

0 Kudos
1 Reply
Observer bva_rzn
Observer
734 Views
Registered: ‎07-04-2017

Re: Converting two streams into one

Problem solved
It is necessary to add directives
  #pragma HLS STREAM depth = ..... variable = ......
in function

0 Kudos