The AutoESL tool reports the following errors during Synthesis:
@E [AP-70] test.cpp:21: error: wrong number of template arguments (0, should be 1)
This error has been fixed in AutoESL version 2012.1.
For AutoESL 2011.4.2 and earlier, the workaround for this issue is to use the following coding style:
#include "ap_int.h"
//doesn't work
//typedef ap_uint<8> mydata;
//typedef mydata data_array[8];
//workaround:
typedef int mydata;
typedef mydata data_array[8];
//alternative workaround:
//typedef ap_uint<8> data_array[8];
void test (data_array input_array, data_array output_array)
{
for (int i=0; i<7; i++)
{
output_array[i] = input_array[i];
}
}