What is IOMath for floating-point to fixed-point operations? dsp, iomathdsp
[Post Source: blog.csdn.net/lanmanck]
I did not find it suitable for searching on the Internet. I will share it with you.
We all know that there are few CPUs in the embedded system with floating-point operation instructions, and TI's DSP is also cheap. So what should we do if we want to increase the floating point speed during operations? Someone thought of it. You can convert a floating point to a fixed point. Okay, IQmath does this.
For example, if the number is 0.2 and can be directly used in C language, how can IQMath be used?
For example, if we call an IQ16 (0.2), it means to return a 32bit number, which = IQ16 (0.2) = 2 ^ 16*0.2 = 65536*0.2 = 13107. That is to say, IQ16 is the 16 power of 2 and then multiplied by the floating point number, throwing away the decimal point. 13107 is the number of IQ operations. Other floating point numbers are also wrapped up with IQ16. We use this IQ number for calculation, which improves the speed!
Point out what's wrong ~~~
How much efficiency is the floating point calculation using a fixed-point dsp?
1. If you must use floating point computing, it is better to use floating point DSP, but the cost is high.
2. If you can convert floating-point operations to fixed-point computing through calibration and use the Q format calculation provided by DSP, the accuracy is generally guaranteed and there is no need to worry about real-time performance.
Definition or difference between a fixed-point DSP and a floating-point DSP
The floating-point DSP can directly perform a floating-point operation, which is completed at one time using hardware.
The fixed-point DSP cannot directly complete floating-point operations, so it needs to use a program to assist in floating-point operations.