ST意法半导体
直播中

王玉宁

8年用户 245经验值
私信 关注
[问答]

SPC56EL60L3上的FPU异常

大家好,
我正在开发一个SPC56EL60L3设备,使用SPC5 Studio,我有两个关于FPU的问题:
1.执行浮点数除以0.0FI将得到无限结果(这意味着0bS111 1111 1xxx .... xxxx值,根据IEEE 754标准),将0.0F除以0.0FI将预期NaN结果( 0bS111 1111 10xx ... xxxx value);在两种情况下,结果都是0bS111 1111 0111 1111 .... 1111,这是一个有效数字(3.40 ... e + 038)。
您能否确认SPC56是否符合IEEE 754标准?我的测试有什么问题?
2.而且我希望FPU生成一个异常(IVOR33),它实际上不是由设备管理的。您能否发一个解释如何启用和管理该中断的代码?
提前致谢
最好
布鲁诺

以上来自于谷歌翻译


以下为原文




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)

刘鑫

2018-10-26 14:28:54
你好布鲁诺,
SPC56EL60有2个e200z4
根据e200z4 booke e200z4 Power Architecture™核心参考手册
它似乎符合IEEE 754,有一个FPU(浮动处理单元)
你用-mspe = yes编译了吗?
 最好的祝福
 二万

以上来自于谷歌翻译


以下为原文




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
举报

刘鑫

2018-10-26 14:46:05
你好布鲁诺,
你启用了注册表吗?
信号处理扩展/嵌入式浮点状态和
 
控制寄存器(SPEFSCR)5
 
(37)
FDBZH嵌入式浮点除以零高
当浮点除法指令以高电平执行时,FDBZH位设置为1
元素除数为0,高元素除数是有限的非零数。 FDBZH是
由标量浮点指令清除。 ?最好的祝福
 二万

以上来自于谷歌翻译


以下为原文




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
举报

更多回帖

发帖
×
20
完善资料,
赚取积分