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.

Hello World Program Execution Time Measurement



Hello,

I just started to work with the TMS320C 6670 by using CCS version 5.3 in Windows 7. I need to measure the execution time of the program. I've tried to use run-clock, set it as clock cycle counter, enable it, and show it. I put breakpoint in the beginning and the end of the main procedure, but when I run and resume the program, the clock, or maybe the program, won't stop on the end of program.

Can you tell me why is it happened? I think maybe because it's due to the scheduling. So that, could you please tell me the right way to measure the clock cycle or the execution time?

Thank's for your help

  • Anugerah,

    I was not aware we have a CCSv5.3 version already. I have not even moved up to 5.2, still on 5.1. Of course, I only have WinXP, too.

    But I think your question is about how to do cycle measurements in CCS, so this question will be best answered in the Code Composer Forum. We will have your thread moved there.

    From us hardware guys, the recommendation would more likely be to use the TSC Time Stamp Counter to measure time. Look in your MCSDK for functions that will give you the TSC count, or use the following:

    #include <c6x.h>

    main()
    {
       unsigned int uStart, uEnd;

       TSCL = 0;

       uStart = TSCL;

       ... code to measure, up to 4 seconds in duration ...

       uEnd = TSCL;
    }

    The difference uEnd-uStart will be the number of clock cycles between those two points.

    Regards,
    RandyP

  • Randy - there is no 5.3. 5.2 was just released. I assume the OP is using 5.2.

    Back to the original post - your technique seems fine from what i can tell from your description. My question is if you see this issue if you do not use the profile clock. Can you confirm this? Also, are you using the 6670 simulator or actual board? And could your provide the example out file?

    Thanks

    ki