请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
器件型号:TMS320F28035 工具/软件:TI C/C++编译器
在 C28x-定点 CPU 平台上进行两个浮点数比较操作时、它会花费多少时间。
例如、
TMS320F28035、时钟= 60MHz、
float A=36.2
float b=30.2。
unsigned int c=0;
if (a>b) c=1;
否则 c=0;
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.
工具/软件:TI C/C++编译器
在 C28x-定点 CPU 平台上进行两个浮点数比较操作时、它会花费多少时间。
例如、
TMS320F28035、时钟= 60MHz、
float A=36.2
float b=30.2。
unsigned int c=0;
if (a>b) c=1;
否则 c=0;
由于此器件没有浮点指令、因此通过调用编译器 RTS 库中的例程来完成比较。 该例程名为 FS$$CMP。 它位于名为 fs_cmp28.asm 的文件中。 此文件位于类似...的目录中。
C:\ti\ccsv7\tools\compiler\ti-cgt-C2000_16.9.2.LTS lib\src
此例程包含大约20条指令。 这样您就可以很好地了解此比较可能使用的 CPU 周期数。
谢谢、此致、
乔治