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.

PMP23338: PFC control PID use DCL lib assembly function. Seems that not use CLA.

Part Number: PMP23338

Tool/software:

PFC control PID use DCL lib assembly function directly.

extern float32_t DCL_runPI_C4(DCL_PI *p, float32_t rk, float32_t yk);

Seems that it does not use CLA.

Would you please confirm whether the ASM DCL_runPI_C4  function are using the CLA.    If not, why don't use CLA task.  what's the concern?

if want to use CLA, the code executes time is longer than CPU when run same code.  Is it normal?  (code:  i++;)

Thank you.

  • Hello Sheldon

    I can confirm DCL_runPI_C4 is not executed on CLA in this design. 

    We use CLA if we face/anticipate MIPS issue while using only CPU. In this design, we did not face such challenge.

    if want to use CLA, the code executes time is longer than CPU when run same code.  Is it normal?  (code:  i++;)

    For above question, I am adding a CLA expert.

    Thank you

    Amir Hussain

  • Hi Amir,  Thank you for your fast reply.       Currently we have the MIPS issue.  So we want to use CLA which work parallel with CPU.    Could you please share some advice about how to use the CLA effectively?         If use structure to define variable in CLA, is it OK? will it decrease the CLA performance?   

  • Hi Sheldon,

    Since the CLA instruction set is different than the c28x instruction set, certain lines of code may require more CLA instructions than c28x instructions, which would mean a longer execution time. So, a different execution time is expected. If you are seeing a significant difference, that would not be expected. There are few factors that can cause a significant performance difference, like the following:

    •  The CLA is very good at floating-point but not so great at non-floating-point (fixed point math, string manipulations, general code, moving things around etc).  The CLA doesn't have an integer multiply. The c28x includes instructions which make it better at performing fixed-point math and other general code. 
    • If the code requires a lot of pointers, then the CLA may become overburdened.  The c28x has more pointers available. 
    • The CLA is great for straight line computation, not so good for branching code (if-elseif-else, switch, ()?():()).
    • CLA does not have a repeat block (RPTB) if you have a loop this will impact performance from c28x to CLA.
    • Is the code on the c28x making use of the TMU? The TMU enables very fast floating-point sin, cos, and other floating-point computations on the C28x. The CLA does not have equivalent TMU instructions.

    Best Regards,

    Delaney

  • Please also see the CLA software development guide FAQ (linked here) for information about which data types can be used on the CLA.

    Best Regards,

    Delaney

  • Hi Delaney,   It is clear.  Thanks a lot.

  • Thank you.  Have gotten the information.

  • Hi Sheldon,

    Glad to hear. I will close this thread then, but feel free to open another one if you have any more questions.

    Best Regards,

    Delaney