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!

取消
显示结果 
搜索替代 
您的意思是: 
Explorer
Explorer
339 次查看
注册日期: ‎05-24-2017

how to caculate the number of DSP slices used by the kernel.

I am trying to synthesis the following code block.

The CHANNEL_WID*NUM_D_PER_512 in line132 is eual 32.

So the for loop (line 132) is completely unrolled .

The final result is this block consume 128 DSP slices.

 

I know the multiplifier in the line 34 will consume some DSP.

Since the DSP48E2 supports  27 x 18 bit operands , so two DSP slices are needed for the 32 bit x 32 bit case.

If so only 32*2=64 DSP slices are needed. 

Wy the final result is 128 DSP slices?

Does the red operators in the line 132 and 133 also cost DSP slices?

Please correct me if I am wrong.

  #define BITWIDTH 32
30 #define CHANNEL_WID 2 //hls::stream width
31 #define NUM_D_PER_512 16 //number of data per read
32 #define NUM_R_PER_SAM 60 //number read per sample
41 typedef ap_int<BITWIDTH> feature_T;
42 typedef ap_int<BITWIDTH_OUT> feature_T_B;
43 typedef int Dtype_uint;
44 typedef int Dtype_H2Ki;// 

dist_calc_or0: for(Dtype_uint i=0; i < data_size*NUM_R_PER_SAM/CHANNEL_WID; i++){ 129 #pragma HLS PIPELINE 130 feature_or = feature_or_in.read(); 131 132 for(int k=0; k<CHANNEL_WID*NUM_D_PER_512;k++){ 133 Dtype_l tmp=feature_or.x[k]-query_or->x[i%(NUM_R_PER_SAM/CHANNEL_WID)*CHANNEL_WID*NUM_D_PER_512+k]; 134 dist_temp.x[k]= tmp*tmp; 135 } 136 dist_temp_buffer << dist_temp; 139 } 140 }

 

0 项奖励
3 条回复3
Teacher xilinxacct
Teacher
324 次查看
注册日期: ‎10-24-2018

回复: how to caculate the number of DSP slices used by the kernel.

@mathmaxsean 

Can you provide a little more detail?

What are the datatypes?

Are all the named items contants or #define? If so, what are the values?

0 项奖励
Explorer
Explorer
296 次查看
注册日期: ‎05-24-2017

回复: how to caculate the number of DSP slices used by the kernel.

@xilinxacct 

Thanks for reminding me.

I update the the message.

0 项奖励
Teacher xilinxacct
Teacher
288 次查看
注册日期: ‎10-24-2018

回复: how to caculate the number of DSP slices used by the kernel.

@mathmaxsean 

Still under specified... BITWIDTH_OUT, data_size, feature_or_in, Dtype_l, query_or ...

0 项奖励