Forum Discussion
Altera_Forum
Honored Contributor
14 years agoThat's correct, I looked around as well and couldn't find a clean way to disable having constants treated as single precision.
One way is to use the suffix of 'l' for doubles and 'f' for floats but that can be a pain if you have a lot of constants scattered around in the code. The way I would probably do it would be to generate the FPU, feed the HDL component editor, then pass the appropriate flags to the compiler for +, -, *, / without using the 60-1 or 60-2 flags. I have never done this since I typically use "YAFPU" that I posted over in the alterawiki since it has more operators in it. Aprado I have not use the configurable FPU before but I think I know which one it is, so when using that one if you have to pass in compiler flags for each floating point operator then you probably don't need to worry about constants being treated as single precision values.