Forum Discussion
Altera_Forum
Honored Contributor
17 years agoHow to use altfp_sqrt with the Nios II?
Hi, for the reason of data processing I need the NiosII to calculate a floating point square root many times. The calculation without extra hardware block is to slow to meet the timing requirement...
Altera_Forum
Honored Contributor
17 years agoI think you should not use the PIO functions for this purpose. The approach should be as follows:
1. Make your custom component (with register addressing) and add it in the SOPC system. Follow the steps as explained in NIOS manuals for this. 2. Instead of using PIO functions, use simple assignment functions. You know the base address for this component. Instantiate a pointer in your NIOS program with this address. Use the pointer assignments for both writing a value at this address and reading it later when your component is done with the processing (You can inform NIOS of conclusion of the processing of data through interrupts etc.).