Forum Discussion
Altera_Forum
Honored Contributor
10 years agothank you very much!
when i change the system.h file, the objdump file becomes: c=a*b; 1082c0: e13ffd17 ldw r4,-12(fp) 1082c4: e17ffe17 ldw r5,-8(fp) 1082c8: 01083c00 call 1083c0 <__mulsf3> 1082cc: 1007883a mov r3,r2 1082d0: e0ffff15 stw r3,-4(fp) c=ALT_CI_NIOS_CUSTOM_INSTR_FLOATING_POINT_0(0,b,a); //* 10832c: e0bffe17 ldw r2,-8(fp) 108330: e0fffd17 ldw r3,-12(fp) 108334: 10c5ff32 custom 252,r2,r2,r3 108338: e0bfff15 stw r2,-4(fp) and the c=ALT_CI_NIOS_CUSTOM_INSTR_FLOATING_POINT_0(0,b,a); return the right result, and the calc time is much lesss than the c=a*b how do you know to change the inii to fnff in system.h file? i am new to altera and nios, i want to learn more. it seems like my project still has some problems, but at least i know how to use the floating point hardware in nios II custom instructions but i still do not understand why the system.h in my project have to change manually? and why i can not use c=a*b. may be i can try floating point hardware2. thanks again!