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.

Embedded Coder: Execution Times of "Float to IQN" and "IQN to Float"

Hello,

I encountered a problem with the data type conversion from Float to IQN and from IQN to Float. I am using Matlab Embedded Coder to generate code from my Simulink Model. When I profile the code with CCS v6, I have encountered very high execution times for both data conversions. Both were around 750-850 Cycles which is a lot more then I would expect and what is stated in the IQMath user guide I found online.

The code of that Element generated by Matlab is:

/* C28x IQmath Library (stiiqmath_iq) - '<S2>/Float to IQN' */
  {
    rtb_FloattoIQN = _IQ30 (rtb_Add1);
  }

  /* C28x IQmath Library (stiiqmath_iqtrig) - '<S2>/Trig Fcn IQN' */
  {
    rtb_TrigFcnIQN = _IQ30sinPU(rtb_FloattoIQN);
  }

  /* C28x IQmath Library (stiiqmath_iqtof) - '<S2>/IQN to Float' */
  {
    rtb_Add2 = _IQ30toF (rtb_TrigFcnIQN);
  }

The execution time of _IQ30sinPU() is fine. But the whole element is around 1600-1700 Cycles. All Cycles are Meassured with the Profiler Clock of CCS v6.

Is there a known issue with the data conversion or is there something I have to be aware of when using the data conversion Blocks?