Altera_Forum
Honored Contributor
15 years agofloating point CI
Hello there,
i´ve included the "floating point ci" in the Design, and tried to use it in the software. Current Code :
volatile float f, f1, f2, f3;
f1 = 1.9f;
f2 = 0.5f;
f = f1 * f2;
f = f1 + f2;
f = f1 - f2;
f = f1 / f2;
f3 = f;
Assembly code for f = f1 + f2:
0x00000290 <main+144>: ldw r2,276(sp)
0x00000294 <main+148>: ldw r3,280(sp)
0x00000298 <main+152>: custom 253,r2,r2,r3
0x0000029c <main+156>: stw r2,272(sp)
Problem : the result in f or f3 is always the same and wrong. When i debug the assembly code then i see that the custom code is used but i can´t unterstand what´s wrong. I hope somebody can help me. Thanks Tobias Informations : Service Pack Installed: 3 Help Version: Quartus II Help Version 7.2