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.

TMS320F28377D: CLA: Assembly code

Part Number: TMS320F28377D
Other Parts Discussed in Thread: C2000WARE

Hello Experts,

I have a few questions about the assembly language programming of the CLA:

1.) I noticed in the C2000ware examples on DCL and CLAmath that each ".asm" file contains only a single function.
Was this done just for a better overview or is this approach generally recommended by you?

2.) At the beginning of the DCL ".asm" files different symbols are defined to specify the ".scratchpad" section for the asm function (see e.g. "DCL_clamp_L1.asm").
Can you explain the procedure in more detail?
What does the term "LFRAME" stand for?

3.) TI used to have the "DPlib" library for power supplies. In it assembler macros were defined, which could be inserted several times in the assembler source code, e.g. to address different HW modules with the same source snippet.
The advantage of this approach was among other things that the use of the macros represented no additional function call but it was only a text substitution in the code.
Is such a programming approach also conceivable with CLA?
Do you have any examples available?

Regards,
Jan

  • Hi Jan,

    Sorry for the delay in replying back. Let me reach out to the experts and get back to you.

    Thanks,

    Ashwini

  • Hi Jan,

    Sorry for the delay. Here are some inputs from the team:

    I noticed in the C2000ware examples on DCL and CLAmath that each ".asm" file contains only a single function.
    Was this done just for a better overview or is this approach generally recommended by you?

    It was done for  simplicity/granularity, to have each example illustrate one specific DCL function. Also, putting them in separate files allows the tools (linker) to eliminate unused functions at link time.  If more than one function is in an object file but not all are used they will all get pulled in. There are techniques which can be used to eliminate functions that are not called however putting them in a separate files just makes the approach easier.

    t the beginning of the DCL ".asm" files different symbols are defined to specify the ".scratchpad" section for the asm function (see e.g. "DCL_clamp_L1.asm").
    Can you explain the procedure in more detail?
    What does the term "LFRAME" stand for?

    Please search the C28x compiler manual for the sub-chapter titled: Memory Model - Sections.

    This is a coding convention used in these assembly files.  It probably stands for local frame, or the total size of all the local variables for that function.

    TI used to have the "DPlib" library for power supplies. In it assembler macros were defined, which could be inserted several times in the assembler source code, e.g. to address different HW modules with the same source snippet.
    The advantage of this approach was among other things that the use of the macros represented no additional function call but it was only a text substitution in the code.
    Is such a programming approach also conceivable with CLA?
    Do you have any examples available?

    The same macro capability is available.  I’m not aware of any examples that specifically demonstrate using macros in CLA assembly.

    Please do let me know if there are additional questions.

    Thanks,

    Ashwini

  • Hi Ashwini,

    thank you for your answers.

    Regards,

    Jan