This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] TMS320F28379D:截断 CLA 的浮点常量

Guru**** 2611705 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/977031/tms320f28379d-truncate-float-constants-for-the-cla

器件型号:TMS320F28379D

您好!
我对 CLA 编程中的常量有疑问。

我经常使用以下操作:

ARG =_mmaxf32 (arg、0.1e-3);

要在 MRx 寄存器中的一个中加载常数,需要两个操作(0.1e-3 --> 0x38b1b717)。 通常、较低的精度就足够了。 在当前情况下,0x38b10000 --> 9.9659e-05也是可以的,常数可以一步加载。

是否可以将浮点常量截断为16位值?

非常感谢

Ralf

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    [引用 user="Ralf Bartling"]是否可以将浮点常量截断为16位值?

    不幸的是、不

    谢谢、此致、

    乔治