03-07-2017 04:22 AM
Hi all,
I have a problem on LabVIEW FPGA.
After a High Throughput, the result is in FXP 36,19.
I want to change this result in 18,1.
The convert function make overflow. I only want to keep high value, like shifts 36,19 to 18,1.
Can you help me.
Thanks
Solved! Go to Solution.
03-07-2017 06:24 AM
edit : it's like having U32 and keep upper parts to have U16
03-07-2017 06:48 AM
There are several options.
For full flexibility you can always use number to boolean array, then extract the bits you need (using array subset), then use boolean array to number to convert the bits back to the desired FXP type.
These are all free operations on the FPGA (when wiring constants to the array subset function).
You could also check if "Reinterpret Number" works for you (maybe followed by a To FXP to cut the obsolete bits).
03-15-2017 02:08 AM
Thanks, I do :
FXP to bollean array
bollean array to Uxx
mask AND or exclusive OR
reinterpret Number