LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reducing DSP48s usage in Labview FPGA

Hi, 

I am trying to optimize my code which is currently using all the DSP48s on the target. From what I know DSP48s are used for multiplication operations. And if I use bit shift operations for multiplying or dividing by 2 it would save resources. However I am curious, does Scale by power of 2 use DSP48s or Shift operations? Ideally it should use shift operations is my guess.

Also can anyone tell me how does FXP configuration affect the use of DSP48s?

 

Regards,

Linus Koli

 

 

0 Kudos
Message 1 of 3
(1,084 Views)

Hi Dan,

I am facing similar problem and I understand what you are suggesting but I have a few questions. Does Scale by power of two also use DSP48s blocks?

Also can you explain the logic behind how the multipliers decide how many DSP blocks will be used?

0 Kudos
Message 2 of 3
(1,067 Views)

Hi Linus

When 'n' is a constant, scale by power of 2 is free. When 'n' is a control, it uses LUTs proportional to the number of bits in x. As far as I know, scale by power of 2 never uses DSPs.

 

On the device we're using, a DSP has a 25 x 18 bit multiplier (might be different for other devices).

When multiplying a 25 bit (or less) number with an 18 bit (or less) number it uses 1 DSP.

When multiplying a 32 bit number with a 25 bit number this requires 2 DSPs.

When multiplying two 32 bit numbers this requires 4 DSPs.

 

Message 3 of 3
(1,006 Views)