Forum Discussion
Altera_Forum
Honored Contributor
15 years agoIf you want the square root integrated into the software compilation so that calls to sqrtf() map directly into the hardware you can use something similar to this: http://www.nioswiki.com/custom_floating_point_unit
The compile flag for that is "-mcustom-fsqrts=<x>" where "<x>" is the custom instruction number you map to the processor. This solution only makes sense if you are using square root all over the place in your code. If you are working on vector data you would be better off placing all the inputs for the square root into a buffer, DMAing them through a square root hardware accelerator, and writing the contents back to memory.