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.

How does hardware FPU performance compare with IQmath library?

Other Parts Discussed in Thread: TMS320F28069, MOTORWARE, CONTROLSUITE

I have some code running on TMS320F28069 processor with hardware FPU. The code is derived from "Motorware" code that is designed to run with or without hardware FPU. It extensively uses the IQmath library. I posted a query to the Instaspin forum - and they suggested I post here.

Is it clearly the case that the hardware FPU will outperform the IQmath library - or is this not necessarily the case? If it is on a case by case basis - here is a snippet that illustrates the performance question. Is it better to do most of the math using the FPU as below - or to do most of it with IQmath functions?:

dc_power_filt -= pAdcData->dc_power_filt / 1024.0;

 dc_power_filt += pAdcData->dc_current * _IQtoF(pAdcData->dcBus) * USER_IQ_FULL_SCALE_VOLTAGE_V / 1024.0;

If there is no clear performance preference - where would I find a document to allow me to determine the optimum approach?

Thanks

 

 

  • Hi Ric,

    Richard Chapman said:
    Is it clearly the case that the hardware FPU will outperform the IQmath library - or is this not necessarily the case?

    Exactly, its not not simple. In few cases IQMath is more effective than H/W FPU. But if generalized H/W FPU will have an upper hand. I did perform few test cases to compare IQMath, fastRTS & H/W FPU. The results varied and all of them performed well, though including additional  libraries for such calculations does bring down the mcu memory.

    Richard Chapman said:
    If there is no clear performance preference - where would I find a document to allow me to determine the optimum approach?

    You can navigate to: C:\ti\controlSUITE\libs\math

    All of them have their respective detailed documentation that you can refer. They also mention the cycle time for instructions.

    Regards,

    Gautam