Forum Discussion
Altera_Forum
Honored Contributor
16 years agofancy conversion from real to unsigned
Hi Experts, could someone give me a hint to make conversion: having a float number: CALIBRATION_CURRENT_LOGAIN : real:= 0.89552238805970152; i wanted to convert it to unsigned(15 downto...
Altera_Forum
Honored Contributor
16 years agoNope. cant see any problems there.
But may I suggest you look into the new IEEE float_fix_pkg. It means you can start using things like: constant CALIBRATION_CONSTANT_LOGAIN : ufixed(-1 downto -16); Meaning you dont need to keep putting in annoying Bias multiplies in.