Forum Discussion
Altera_Forum
Honored Contributor
15 years agoNIOS2 HW & DIV Instructions + FPU
Hello i am in charge of designing a system that does a lot of complex sin/cos/* instructions and i need them to be fast. I am using NIOS2-F at 100mhz in a Cyclone IV. I've enabled HW and DIV ...
Altera_Forum
Honored Contributor
15 years agoIf you are manually passing in the flags for your builds make sure you keep them in sync with the hardware implementation (i.e. don't pass in the 60-1 or 60-2 flags if you don't have the FPU added to the Nios II core).
The Taylor series I remember finding was under the POSIX implementation in newlib and it wasn't long enough to give an accurate answer. I ended up hardware accelerating it and since it only used the first 3 terms of the series I would end up with things like sqrt(1) = 0.999999.