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 agoUnless something very obscure goes on, it is only the -custom-fpu-cfg option that forces single precision constants.
The C functions I found are the same horrid ones an arm system I used many years ago ended up using - they are very slow at the best of times [1]. For an embedded system you might get away with: - No NaN, infinity or -0 - non-ieee rounding (maybe just truncate) It is also a shame that altera didn't think through the custom instruction interface a little further. - Separate opcode for FP - Allow an instruction to disable interrupts before the following instruction. This would allow, for example, a 64bit result to be recovered. [1] I spent a week or so writing them in arm asm - not that hard.