Signal Conditioning

cancel
Showing results for 
Search instead for 
Did you mean: 

Division by 2000 without 'Quotion & Remainder' bloc (FPGA)

Hello,
i need to divide a signal by 2000 with LabVIEW FPGA. With this software version it is said that using a 'quotient and remainder' bloc isn't good (it takes a lot of place in the FPGA). I can do division by 2^x with the 'rotate left/right' bloc, but 2000 is not a multiple of 2 🙂
 
i hope that someone has a solution to my problem ^^
 
sorry if i made mistakes.
 
Best regards,
 
Portmann J.
0 Kudos
Message 1 of 4
(5,389 Views)
I'm sorry, i've just found the vi to make a division for LV FPGA
 
 
🙂
 
all my apologizes
 
Portmann J.
0 Kudos
Message 2 of 4
(5,386 Views)

How did you implement the division on LV FPGA? Apparently one has to manually set the multiplier and bit shift. Kindly let me know.

 

Thank you.

0 Kudos
Message 3 of 4
(4,485 Views)

You almost never want to divide by a constant on the FPGA, if you're worried about efficiency, as it can be posed as a multiplication by the reciprocal of the constant. The fixed-point data type (FXPDT) makes this easy, but you can also do it with integer types and constant Scale by Power of 2 operations. For example, one integer solution might be to multiply by 2147484 (ie, 2^32/2000), then shift the result by 2^(-32).

 

FXPDT gives you more control over precision with configurable word lengths and rounding options. A reasonable solution would be to multiply by .000499994 using an unsigned type with word length 16 and integer word length -10 (<+,16,-10>).

0 Kudos
Message 4 of 4
(4,466 Views)