2017-09-27 03:03 AM
Hi all,
I'm developing on a SPC56EL60L3 device, using SPC5 Studio, I have two querstions about the FPU:
1. executing a division of a float number by 0.0F I would expect an infinite result (which means a 0bS111 1111 1xxx .... xxxx value, according with IEEE 754 standard), dividing 0.0F by 0.0F I would expect a NaN result (0bS111 1111 10xx ... xxxx value); in both cases the result is 0bS111 1111 0111 1111 .... 1111, which is a valid number (3.40...e+038).
Can you confirm that the SPC56 implements the IEEE 754 standard? What's wrong in my tests?
2. moreover I would expect the FPU to generate an exception (IVOR33), which is actually not managed by device. Can you please post a piece code explaining how to enable and manage that interrupt?
thanks in advance
best
Bruno
2017-09-28 02:12 AM
Hello Bruno ,
SPC56EL60 has 2 e200z4
According to the e200z4 booke e200z4 Power Architectureâ„¢ Core Reference Manual
It seems to be compliant for IEEE 754, there is a FPU (Float process Unit)
have you compiled with -mspe=yes ?
Best regards
Erwan
2017-09-29 02:24 AM
Hello Bruno ,
Did you enable the register
Signal Processing Extension/Embedded Floating-Point Status and
Control Register (SPEFSCR)5
(37)FDBZH Embedded Floating-point Divide by Zero HighThe FDBZH bit is set to 1 when a floating-point divide instruction executed with a highelement divisor of 0, and the high element dividend is a finite non-zero number. FDBZH iscleared by a scalar floating point instruction. ?Best regards
Erwan