This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

DSP instruction for x*x + y*y. Does it exist?

Hello all!

I am new to ARM community and this is my first question here. I work on embedded systems where we use Cortex-M4 based MCUs (concretely STM32F3 series). I would like to ask, if there is a DSP instruction which would calculate x*x + y*y.

x and y represent sine and cosine values (signed integers, 16-bit variables are sufficient). I would like to calculate a square of amplitude (x*x + y*y).

Thanks in advance.

Parents
  • There might be further improvement that you can do to the code but additional details about your application are needed. For example, if it is possible to interleave x and y in memory (x and y to occupy 1 word) the PKHBT instruction after a load is not needed anymore. I believe though that they are results of calculations (real and imaginary components of complex quantity) and can be readily found in registers prior to the calculation of square of amplitude.

Reply
  • There might be further improvement that you can do to the code but additional details about your application are needed. For example, if it is possible to interleave x and y in memory (x and y to occupy 1 word) the PKHBT instruction after a load is not needed anymore. I believe though that they are results of calculations (real and imaginary components of complex quantity) and can be readily found in registers prior to the calculation of square of amplitude.

Children
No data