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: 
Visitor po092000
Visitor
5,304 Views
Registered: ‎07-24-2016

how can i solve this axi-stream problem ???

HI, this is my code.

 

// Function Part

// Convoluton.h

// ============================================================

#pragma SDS data copy(src[0:28][0:28])
#pragma SDS data mem_attribute(src:NON_CACHEABLE)
#pragma SDS data copy(convolution_filer[0:20][0:25])
#pragma SDS data mem_attribute(convolution_filer:NON_CACHEABLE)
#pragma SDS data copy(dst[0:20][0:24][0:24])

 

// Convolution.c

// ============================================================

#include "Convolution.h"


void Convolution_Layer_1(float src[28][28], float convolution_filer[20][25], float dst[20][24][24]) {
#pragma array_partition variable=src complete factor = 28 dim = 2

#pragma array_partition variable=filter complete factor = 25 dim = 1
}

 

// Main Function Part

// ============================================================
int main() {
float src[28][28];
float convolution_filer[20][25];
float dst[20][24][24];

Convolution_Layer_1(src,convolution_filer,dst);

return 0;
}

 

Using SDSoC(Complie), there are a lot of erros. this is error message

 

Description Resource Path Location Type
Hardware function 'Convolution_Layer_1' appears to have an inconsistent port mapping. The axis_acc_adapter supports at most 8 BRAM or FIFO inputs (bram_in: 53, fifo_in: 0). To address this issue, change HLS fifo/bram interfaces to explicit AXI streams. You must explicitly code AXI stream sideband signals: TLAST, TKEEP, TUSER, and TDEST to comply with SDSCC datamover requirements. Lenet C/C++ Problem

 

i think this problem's solution is using axi stream port,, um i don't know hot to solve this problem.

 

0 Kudos
2 Replies
Xilinx Employee
Xilinx Employee
5,242 Views
Registered: ‎06-29-2015

Re: how can i solve this axi-stream problem ???

Hi po092000,

 

I was able to reproduce the problem with the following set of pragmas:

 

 

void Convolution_Layer_1(float src[28][28], float convolution_filer[20][25], float dst[20][24][24]) {
#pragma HLS array_partition variable=src complete dim = 2
#pragma HLS array_partition variable=convolution_filer complete dim = 1
}

 

 

However, in the GUI in 2016.2 you cannot mark the Convolution_Layer_1 for hardware if it contains array_partition pragmas:

 

partition1.png

 

After double clicking on the Convolution_Layer_1 function in the window it shows a more description explanation for why the function cannot be marked for hardware:

 

partition2.png

 

If you remove the array_partition pragmas, mark the function for hardware, and then put them back in you can skirt this check. However its not going to do you any good.

 

In SDSoC 2016.2 the error message is much more descriptive:

 

ERROR: [SDSoC 0-0] Hardware function 'Convolution_Layer_1' appears to have an inconsistent port mapping. The axis_acc_adapter supports at most 8 BRAM or FIFO inputs (bram_in: 49, fifo_in: 0). To address this issue, change HLS fifo/bram interfaces to explicit AXI streams. You must explicitly code AXI stream sideband signals: TLAST, TKEEP, TUSER, and TDEST to comply with SDSCC datamover requirements.
ERROR: [SDSoC 0-0] Function 'Convolution_Layer_1' argument 'src8' exceeded max number of input streams
ERROR: [SDSoC 0-0] Function 'Convolution_Layer_1' argument 'src9' exceeded max number of input streams
ERROR: [SDSoC 0-0] Function 'Convolution_Layer_1' argument 'src10' exceeded max number of input streams
ERROR: [SDSoC 0-0] Function 'Convolution_Layer_1' argument 'src11' exceeded max number of input streams
ERROR: [SDSoC 0-0] Function 'Convolution_Layer_1' argument 'src12' exceeded max number of input streams
ERROR: [SDSoC 0-0] Function 'Convolution_Layer_1' argument 'src13' exceeded max number of input streams
ERROR: [SDSoC 0-0] Function 'Convolution_Layer_1' argument 'src14' exceeded max number of input streams
ERROR: [SDSoC 0-0] Function 'Convolution_Layer_1' argument 'src15' exceeded max number of input streams
ERROR: [SDSoC 0-0] Function 'Convolution_Layer_1' argument 'src16' exceeded max number of input streams
ERROR: [SDSoC 0-0] Function 'Convolution_Layer_1' argument 'src17' exceeded max number of input streams
ERROR: [SDSoC 0-0] Function 'Convolution_Layer_1' argument 'src18' exceeded max number of input streams
ERROR: [SDSoC 0-0] Function 'Convolution_Layer_1' argument 'src19' exceeded max number of input streams
ERROR: [SDSoC 0-0] Function 'Convolution_Layer_1' argument 'src20' exceeded max number of input streams
ERROR: [SDSoC 0-0] Function 'Convolution_Layer_1' argument 'src21' exceeded max number of input streams
ERROR: [SDSoC 0-0] Function 'Convolution_Layer_1' argument 'src22' exceeded max number of input streams
ERROR: [SDSoC 0-0] Function 'Convolution_Layer_1' argument 'src23' exceeded max number of input streams
ERROR: [SDSoC 0-0] Function 'Convolution_Layer_1' argument 'src24' exceeded max number of input streams
ERROR: [SDSoC 0-0] Function 'Convolution_Layer_1' argument 'src25' exceeded max number of input streams
ERROR: [SDSoC 0-0] Function 'Convolution_Layer_1' argument 'src26' exceeded max number of input streams
ERROR: [SDSoC 0-0] Function 'Convolution_Layer_1' argument 'src27' exceeded max number of input streams
ERROR: [SDSoC 0-0] Function 'Convolution_Layer_1' argument 'convolution_filer0' exceeded max number of input streams
ERROR: [SDSoC 0-0] Function 'Convolution_Layer_1' argument 'convolution_filer1' exceeded max number of input streams
ERROR: [SDSoC 0-0] Function 'Convolution_Layer_1' argument 'convolution_filer2' exceeded max number of input streams
ERROR: [SDSoC 0-0] Function 'Convolution_Layer_1' argument 'convolution_filer3' exceeded max number of input streams
ERROR: [SDSoC 0-0] Function 'Convolution_Layer_1' argument 'convolution_filer4' exceeded max number of input streams
ERROR: [SDSoC 0-0] Function 'Convolution_Layer_1' argument 'convolution_filer5' exceeded max number of input streams
ERROR: [SDSoC 0-0] Function 'Convolution_Layer_1' argument 'convolution_filer6' exceeded max number of input streams
ERROR: [SDSoC 0-0] Function 'Convolution_Layer_1' argument 'convolution_filer7' exceeded max number of input streams
ERROR: [SDSoC 0-0] Function 'Convolution_Layer_1' argument 'convolution_filer8' exceeded max number of input streams
ERROR: [SDSoC 0-0] Function 'Convolution_Layer_1' argument 'convolution_filer9' exceeded max number of input streams
ERROR: [SDSoC 0-0] Function 'Convolution_Layer_1' argument 'convolution_filer10' exceeded max number of input streams
ERROR: [SDSoC 0-0] Function 'Convolution_Layer_1' argument 'convolution_filer11' exceeded max number of input streams
ERROR: [SDSoC 0-0] Function 'Convolution_Layer_1' argument 'convolution_filer12' exceeded max number of input streams
ERROR: [SDSoC 0-0] Function 'Convolution_Layer_1' argument 'convolution_filer13' exceeded max number of input streams
ERROR: [SDSoC 0-0] Function 'Convolution_Layer_1' argument 'convolution_filer14' exceeded max number of input streams
ERROR: [SDSoC 0-0] Function 'Convolution_Layer_1' argument 'convolution_filer15' exceeded max number of input streams
ERROR: [SDSoC 0-0] Function 'Convolution_Layer_1' argument 'convolution_filer16' exceeded max number of input streams
ERROR: [SDSoC 0-0] Function 'Convolution_Layer_1' argument 'convolution_filer17' exceeded max number of input streams
ERROR: [SDSoC 0-0] Function 'Convolution_Layer_1' argument 'convolution_filer18' exceeded max number of input streams
ERROR: [SDSoC 0-0] Function 'Convolution_Layer_1' argument 'convolution_filer19' exceeded max number of input streams
ERROR: [SDSoC 0-0] Function 'Convolution_Layer_1' argument 'dst' exceeded max number of input streams

 

Your HLS array_partition pragmas divide up the array into a bunch of other arrays. Currently functions marked for hardware can only have 8 input and 8 output arguments (and 8 input, 8 output, and 8 inout scalars). And the array partitioning is breaking that limit which is why you see the message above.

 

The core problem however is that SDSoC does NOT currently support array_partition pragmas on arguments in the function interface. But it does support them for arrays inside of the function. The Matrix Multiplication template application has an example of this. Here is the relevant source code for that example:

 

 

void mmult_accel(float A[N*N], float B[N*N], float C[N*N]) 
{
     float _A[N][N], _B[N][N];
#pragma HLS array_partition variable=_A block factor=16 dim=2
#pragma HLS array_partition variable=_B block factor=16 dim=1
     
     for(int i=0; i<N; i++) {
          for(int j=0; j<N; j++) {
#pragma HLS PIPELINE
               _A[i][j] = A[i * N + j];
               _B[i][j] = B[i * N + j];
          }
     }
     
     for (int i = 0; i < N; i++) {
          for (int j = 0; j < N; j++) {
#pragma HLS PIPELINE
               float result = 0;
               for (int k = 0; k < N; k++) {
                    float term = _A[i][k] * _B[k][j];
                    result += term;
               }
               C[i * N + j] = result;
          }
     }
}

 

Notice that the input arguments are named: A, B and C and the internal arrays are prepended with an underscore: _A and _B. The internal arrays are partitioned, and there are two copy in loops that copy from the interface into the partitioned arrays. This is the supported way to partition arrays in SDSoC.

 

Sam

 

 

0 Kudos
Visitor po092000
Visitor
5,226 Views
Registered: ‎07-24-2016

Re: how can i solve this axi-stream problem ???

Thank you very much. Have a nice day
0 Kudos