Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
21615 Discussions

Floating point custom instruction in nios2

Altera_Forum
Honored Contributor II
1,099 Views

To perform the floating point multiplication in the Floating Point Custom Instruction which is inbuilt, how should I pass the values from the nios code?  

Do I have to use a specific format for the numbers or use additional instructions in nios code for the floating point multiplication to be offloaded to the custom instruction hardware ?
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
361 Views

The custom instructions use the standard ieee format used by C for 'float' variables. 

If you want to use the custom instructions you need to ensure that you never use 'double' - so all constants need to be explictly marked (eg 1.5f). 

You may need to check carefully that none of the C library functions are unexpectedly called.
0 Kudos
Reply