Forum Discussion
Altera_Forum
Honored Contributor
19 years agoAccess to the Floating Point Costum Instruction
I Have simply add a floating point custom Instruction (named fpoint) to my nios II processor core under the SOPC Builder with Quartus II 6.1.
The generation was successful and now a want access the part of hardware under NIOS II IDE. I will use the following function call to use the hardware: --------------------- float a = 3.14 float b = 5.66 float result result = fpoint(2,a,b); // 2 is the prefix ---------------------- How can i reach this? Have i made changes in the "system.h"-file? Can you explain step by step the work under the NIOS II IDE to get access to the CI? Thanx. PS: I habe read all altera pdf about the issue...2 Replies
- Altera_Forum
Honored Contributor
--- Quote Start --- originally posted by tux.2000@Feb 9 2007, 03:49 AM ps: i habe read all altera pdf about the issue...<div align='right'><{post_snapback}> (index.php?act=findpost&pid=21400)
--- quote end ---
--- Quote End --- Yes, but did you download the source code that goes along with the floating point tutorial? I just looked through it, and it's quite clear what you need to do. After looking through the sample code, you don't have to do anything to enable floating point. All floating point operations will automatically use the custom instruction. If you want to use SW floating point, you have to use# pragma's to disable the custom instruction. - slacker
- Altera_Forum
Honored Contributor
Okay, i understand. I didn´t know, that the custom instruction is already in use. I Think, i have to set up a define-statement or my own macro., but this was a mistake...
Thanx. Now, i get the following result. Floatingpoint addition: with Custom instruction --> 5 times faster floatingpoint multiplikation: with custom instruction --> 17 times faster I think these are realistic values...