cancel
Showing results for 
Search instead for 
Did you mean: 

FPU exceptions on SPC56EL60L3

Bruno Dalvit
Associate
Posted on September 27, 2017 at 12:03

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

2 REPLIES 2
Erwan YVIN
ST Employee
Posted on September 28, 2017 at 11:12

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

Posted on September 29, 2017 at 09:24

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 High

The FDBZH bit is set to 1 when a floating-point divide instruction executed with a high

element divisor of 0, and the high element dividend is a finite non-zero number. FDBZH is

cleared by a scalar floating point instruction. ?

         Best regards  

                   Erwan