Forum Discussion
Altera_Forum
Honored Contributor
14 years agoproblem: to_ufixed(0.483,n1)
Hi all; I want to convert 0.483 to ufixed type. Manually, I get 0000.0111 (3 downto -4) when I calculate by hand. But, this value is not same with the value in modelsim which is 0000.1000. I...
Altera_Forum
Honored Contributor
14 years agoIts 0000.1000 if you round to nearest.
the to_ufixed function does have extra options with regards to rounding and saturation. You'll have to read the function definitions in the fixed_pkg source code or user guide to set them.