Hi,
I am using S32K14x controllers (Coretx-M4F). It has floating point math unit. I need to perform many mathematical operations as fast as possible. Which will be faster: fixed point q16 or fixed point q32 or single precision (32 bit) floating point?
Regards,
Pramod
ARM documentation says that most FPU instructions (except division) complete in 1 clock cycle. But there is an overhead of moving operands between Rx registers and the FPU registers. The DSP instructions also seem to perform most basic arithmetic on q32 numbers in single clock cycle, but the compiler can't generate DSP instructions. Which means, we must use CMSIS DSP library. In both cases, there is some overhead, but don't know which is worse. Hence the question.
Andy Neil said:why don't you run some tests to find out ?
Yes, I am planning the same right now. I am using CMSIS DSP library. It has functions to perform arithmetic on q32 as well as float32. I assume it will use the DSP and FPU instructions, respectively. Will compare performance of the _q32 and _f32 variants of the same functions. Will post the results here when done.