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.

[参考译文] TMS320F28P650DH:CPU 和 CLA 中的加减、乘法、除法和三角函数运算的基准测试

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

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1532761/tms320f28p650dh-benchmark-for-addition-subtraction-multiplication-division-and-trigonometric-function-operations-in-cpu-and-cla

器件型号:TMS320F28P650DH

工具/软件:

尊敬的 Champs:

此问题适用于 F28P65 和 F28P55。

现在、我的客户 需要优化他们的代码、并需要在 CPU 和 CLA 中采用以下基准测试。 他们需要知道执行指令需要多少个周期。

1.a+b.

2. a-b.

3. a×b.

4. a/b.

5. sin、cos、tan、asin、acos、 atan

请帮助提供数据、谢谢。

此致、

Julia

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

    尊敬的 Julia:

    假设您指的是浮点:

    对于 1 到 3、请参阅 https://www.ti.com/lit/spruhs1 的 1.5.2 (从该列表中,您可以转至特定的 ADD SUB MPY 指令并查看周期)。 每种模式都是 2p 周期运行。 “P"指“指流水线周期、即第二条指令可以是与此操作无关的独立指令。

    对于 4 到 5 (sin、cos、atan)、请参阅同一 doc 的 7.5.3。sin、cos、atan 每个需要 4p 个周期。 除法需要 5p 个周期。

    对于 ASIN、Acos、您将利用 ASIN = atan (x/sqrt (1-x^2)) 和 acos = atan (sqrt (1 - x^2/x)、因此它们每个需要大约 18 个周期。

    对于棕褐色,你会做 sin/cos ,所以应该是大约 9 个周期。

    请注意、以上所有内容仅涉及计算、而不涉及任何相关的加载、存储和移动。 这会增加额外的周期。

    谢谢、

    Sira