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.

[参考译文] TMS320F28069:如何加快2个无符号整数的除法计算?

Guru**** 2587345 points


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

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/913410/tms320f28069-how-to-speed-up-the-division-calculation-of-2-unsigned-integer

器件型号:TMS320F28069

您好!

我的客户测试2个无符号整数的除法速度、

uint32 a、uint 32 b. c=a/b.

"/"大约需要40个周期、他们认为时间太长。

除"/"以外、还有其他方法可以更快地进行除法运算吗?

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

    您能否检查反汇编代码的外观? 它是这样吗?

    MOVB ACC、#0;零 ACC
    MOVL P、@Num32;用 Num32加载 P 寄存器
    RPT #31;重复操作32次
    |SUBCUL ACC、@Den32;条件减法为 Den32
    MOVL @Rem32、ACC;将余数存储在 Rem32中
    MOVL @Quot32、P;将商存储在 Quot32中

    谢谢、

    Sira