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.

CCS/TMS320F28377S: TMS320F28377S

Part Number: TMS320F28377S

Tool/software: Code Composer Studio

Hi, If i stop inside a task of CLA and try to change a local variable in the task i takes four steps to change from initial value of 10 to1. I noticed that some examples use such local variables. How can I make sure the variable changes at each step?

thanks vadim

  • Single stepping the CLA moves the pipeline head only one cycle.  For this reason the updates of variables require single stepping 3 times. 

    This is different from the C28x which pushes the instruction through all stages of the pipeline on each step. 

    Regards

    Lori

  • Hi Lori

    TI has a link to CLA C Compiler Training Series but it does not work on this site https://processors.wiki.ti.com/index.php/C2000_CLA_C_Compiler I see that this issue is real and not just a debugging stepping problem. so to do an assignment in c for CLA task it is not enough A = B; it will not happen until  I perform at least 3  extra steps  to make sure everything is flushed, correct? ; I tried to figure out how can I make an assignment in chapter 10 "of optimizing c compiler" but  could not find much. if I write a CLA  task in c how can I make sure that assignment happens. Is there a way to write an efficient assignment code without extra steps? Here https://processors.wiki.ti.com/index.php/C2000_CLA_C_Compiler it  recommended to use MNOP operations as extra steps, what should I do in c? From TRM

    6.6.2 CLA Pipeline Alignment
    The majority of the CLA instructions do not require any special pipeline considerations. This section lists
    the few operations that do require special consideration.

    Does it mean c or assembly commands in TRM?

    thanks vadim

  • vadim said:
    I see that this issue is real and not just a debugging stepping problem. so to do an assignment in c for CLA task it is not enough A = B; it will not happen until  I perform at least 3  extra steps  to make sure everything is flushed, correct?

    The CLA "step" and the C28x "step" have different behavior. 

    • The C28x step takes an instruction all the way from the D2 stage of the pipeline through to the Exe stage.  This is 3 CPU cycles (i.e. D2, R1, R2, Exe).  This behavior is called flushing the pipeline every step. 
    • The CLA "step" only moves the pipeline ahead one cycle.  Note that in the CLA case all instructions that are within the pipeline are moved ahead one phase each step.  There is no inefficacy; nothing is stalled.
    • Step 1: R1
    • Step 2: R2
    • Step 3: Exe

    Refer to the pipeline description in the CLA chapter of the Technical Reference Manual.

    vadim said:

    6.6.2 CLA Pipeline Alignment
    The majority of the CLA instructions do not require any special pipeline considerations. This section lists
    the few operations that do require special consideration.

    Does it mean c or assembly commands in TRM?

    The TRM is describing the assembly instructions.  The compiler will take care of this for you.  If you write in assembly the assembler will issue an error if you violate a pipeline consideration. 

    Regards

    Lori

  • Vadim,

    I have split your related question into another thread.  This will help us track and make sure new questions that are related, but not the same, are not overlooked.   In the future please use the "ask a related question" or "ask a new question" button.  

    https://e2e.ti.com/support/microcontrollers/c2000/f/171/t/969970

    Best Regards