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.

[参考译文] LEA 进行幅度计算

Guru**** 2393725 points


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

https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/670872/magnitude-calculation-by-lea

器件型号:MSP430FR5994

尊敬的 TI:

LEA 模块是否支持以如下方式计算复杂矢量的幅度:

mag=sqrt (实数^2+img^2)

谢谢、

Alexey

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

    您好 Alexey

    我们可以执行 mag=Real^2+img^2,请参阅 MSP DSP 库 :software-dl.ti.com/.../group__dsplib__transform__real.html

    而 sqrt 可以使用 QMATH 库实现: http://www.ti.com/tool/MSP-IQMATHLIB

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

    Gary、

    感谢您的回复、但这种方法不适合此类计算。 这就是 IQMath 库具有特定函数以避免16位乘法溢出的原因。
    但是、我问这个问题是因为 LEA 有很多不是官方库实现的函数、包括 FFT 的窗口函数、LEA 存储器范围之外的长列表快速移动操作等 甚至在 LEA 代码存储器上修补命令的实现。
    最好在 LEA 库上具有完整的信号处理堆栈。

    谢谢、
    Alexey