Forum Discussion
Altera_Forum
Honored Contributor
14 years agoSingle Precision Floating Point
Hi All, I'm trying to outsource an equation using floating point variables to another system block within my design. In my Nios code, the two variables (say, x and y) are defined as floats...
Altera_Forum
Honored Contributor
14 years agoIf you added your code to this post that would be useful.
Also if you are just calculating square root you might find it handy to integrate it as a custom instruction instead. You can instruct the compiler that the hardware is present by compiling with the -mcustom-fsins=N flag where "N" is the custom instruction number you assigned when adding it to the system. When you call "sqrt()" from math.h it'll target your hardware instead of a software library. Here are more details: http://www.alterawiki.com/wiki/single-precision_-mcustom-*_options