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.

[参考译文] 编译器/TMS320F28035:当两个浮点数正在进行比较运算时、它将花费多少时间

Guru**** 2589245 points
Other Parts Discussed in Thread: TMS320F28035

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

https://e2e.ti.com/support/tools/code-composer-studio-group/ccs/f/code-composer-studio-forum/609601/compiler-tms320f28035-how-much-time-would-it-consume-when-two-floating-number-are-under-compare-operation

器件型号: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;

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

    由于此器件没有浮点指令、因此通过调用编译器 RTS 库中的例程来完成比较。  该例程名为 FS$$CMP。  它位于名为 fs_cmp28.asm 的文件中。  此文件位于类似...的目录中。

    C:\ti\ccsv7\tools\compiler\ti-cgt-C2000_16.9.2.LTS lib\src 

    此例程包含大约20条指令。  这样您就可以很好地了解此比较可能使用的 CPU 周期数。

    谢谢、此致、

    乔治

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

    尊敬的 Mock,

    感谢您的回复。

    从您的答复中可以看到、这种比较最好在 CLA 上进行、或者在 C28x CPU 上使用 IQMath。

    此致

    彭茂