Forum Discussion
Altera_Forum
Honored Contributor
8 years agoIntel HLS example reports
Hello, I am new to the concept of HLS. I am using Intel HLS and going to start with the examples that come with the installation of Quartus prime edition. Can anyone of you share the succe...
Altera_Forum
Honored Contributor
8 years agoDear 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; }