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.

Don't understanding CLA Diagramming Pipeline Activity for 32-bit Floating-Point Addition with Parallel Move

Hello,

         In document : TMS320x2803x Piccolo Control Law Accelerator(CLA) Reference Guide (Page 49) as follow:

;-----------------------------------------------------------------------

; Given A, B and C are 32-bit floating-point numbers
; Calculate Y2 = (A * B)
; Y3 = (A * B) + C
;
_Cla1Task2:
MMOV32 MR0, @_A ; Load MR0 with A
MMOV32 MR1, @_B ; Load MR1 with B
MMPYF32 MR1, MR1, MR0 ; Multiply A*B
|| MMOV32 MR0, @_C ; and in parallel load MR0 with C
MADDF32 MR1, MR1, MR0 ; Add (A*B) to C
|| MMOV32 @_Y2, MR1 ; and in parallel store A*B
MMOV32 @_Y3, MR1 ; Store the A*B + C
MSTOP ; end of task

;-----------------------------------------------------------------------

I  made diagramming Pipeline Activity  for 8 instructions as following:

 

 I don't sure that _Y3 = A*B + C. Can you tell me about this matter ?

Regards

 

 

 

  • Hi,

    The parallel instructions are a single instruction. You only have 6 instructions in this case:

    If im correct, the sequence of operations are:

    OPERATION, PHASE

    MR0 = A, I1 -> E

    MR1 = B,I2 -> E , MR0 = C, I3 -> R2

    MR1 = A*B, I3 -> E

    MR1 = A*B+C, I4->E

    Y2 = MR1, I4->W

    Y3 = MR1, I5->W , MSTOP, I6->E

     

     

  • Hi,

            I don't understanding about the pipline activity for parallel instruction. Could you tell me about diagram pipline activity in this case?

    also, I want to calculate for execution interval of macros in CLA  when using parallel instruction.

    Regards,

  • I dont have a diagram handy for parallel instructions. My recommendation is to single step through this code on a device that has a CLA and to observe the CLA registers.

    The following video talks about how you can do that:

    http://focus.ti.com/general/docs/video/Portal.tsp?lang=en&entryid=0_dm3z6wz1

    Also if you wish to profile CLA code, CCS4 has a cycle clock built in. While debugging you can go to Target->Clock->Enable Clock to start the cycle count. You can reset it any point through the same menu.

     

    Hope this helps

  • Vishal_Coelho,

                 Thanks You very much!

    Regards

    Minh