Dear Anand
While going through AC data types used by Intel HLS, I have written the same code in terms of ac_fixed data types below. I will be really grateful if you can run and synthesize at your end. Thanks in advance......you have been so far very helpful.....
void diff_sq_acc( ac_ufixed<11,1> a[N], ac_ufixed<11,1> b[N], ac_ufixed<28,8> *dout)
{
unsigned char i;
ac_ufixed<28,8> acc= 0;
ac_ufixed<11,1> a_reg, b_reg;
ac_fixed<12,2> sub;
ac_ufixed<21,1> sub2 ;
for(i=0; i<N; i++)
{
# pragma HLS PIPELINE II=1
a_reg = a
;
b_reg = b;
sub = a_reg - b_reg;
sub2 = sub*sub;
acc += sub2;
}
*dout = acc;
}