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/TMS320C28346: greater execution time in CCS V8.3 compared to CCS V5.1

Part Number: TMS320C28346
Other Parts Discussed in Thread: CONTROLSUITE

Tool/software: Code Composer Studio

When a code developed in CCS V5.1 is imported to CCS V8.3, different functions (user defined and in-built functions like 'memcpy') shows greater execution time in CCSV8.3? How can this be managed to reduce the execution time?

  • Pick one function that runs slower.  Is it in the same kind of memory?  That is, was it in RAM before and now it is in FLASH?  Do similar analysis for all the functions which run slower.

    If that doesn't explain it ... For one source file that contains one or more functions which run slower, please follow the directions in the article How to Submit a Compiler Test Case.  Use CCSv8.3 when preparing this test case.  Be sure to indicate the name of the function(s) which run slower.  Also indicate the version of the compiler you used under CCSv5.1.

    Thanks and regards,

    -George

  • Please reply to the requests in my previous message.

    Thanks and regards,

    -George

  • RPWDProcessApi.pp.txt.txt

    Code tried out in CCSV8.3 and CCV5.5 ( currently tested using CCS5.5 instead of CCS5.1):  

    while(1)

        {

             GpioDataRegs.GPBTOGGLE.bit.IO4 = 1;

            memcpy(&TempCh1P1[0],&CH1WrArr1[0],4096);

        }

    Time taken (by toggling GPIO46):

     The function takes 144 micro seconds in CCSV8.3

    The function takes 98 micro seconds in CCSV5.5

    Compiler version for CCS5.5:

    TI v6.2.0

     

    Build string :

    "C:/ti/ccsv8/tools/compiler/ti-cgt-c2000_18.1.4.LTS/bin/cl2000" -v28 -ml -mt --float_support=fpu32 --include_path="C:/ti/ccsv8/tools/compiler/ti-cgt-c2000_18.1.4.LTS/include" --include_path="/packages/ti/xdais" --include_path="C:/ti/controlSUITE/libs/math/IQmath/v15c/include" --include_path="C:/ti/controlSUITE/libs/math/FPUfastRTS/V100/include" --define=_DEBUG --define=LARGE_MODEL -g --preproc_with_comment --preproc_with_compile --diag_warning=225 --issue_remarks --verbose_diagnostics --quiet --output_all_syms  "../RPWDProcessApi.c"

  • Even though there is a while(1), I presume your comparison considers an equivalent number of iterations of that loop.

    Since you build with no optimization, the execution time for this code is mostly in the memcpy function.  I compared the memcpy code from release 18.1.4.LTS to the same code from release 6.2.0.  They are not identical, but they are close.  I would not expect a large difference in execution time.

    The arrays TempCh1P1 and CH1WrArr1, are they consistently in the same kind of memory?  Particularly with regard to internal or external memory.  

    Thanks and regards,

    -George

  • Are the arrays in the same kind of memory?

    Thanks and regards,

    -George

  • Hi,

    The program acquires data from an external ADC (in XINTF zone 7) via DMA.

    'CH1WrArr1' is the destination of DMA buffer. This is copied to 'TempCh1P1'

     

    CH1WrArr1 is mapped to L0 SARAM

     RAML0_1                  :origin = 0x008000, length = 0x01000 

    TempCh1P1  is mapped to H0  SARAM

    RAMH0_1_Part1        : origin = 0x300000, length = 0x001000 

    The mapping of arrays and program codes are the same, only the CCS versions are different.

    Thanks and regards,

    Nimmy

  • You shared the build command for the CCSv8 compilation--can you share the CCSv5 one as well?

    This difference is between the .outs built in each environment, right? For example, if you build the .out in CCSv5 and load and run the same .out file in both v5 and v8 without rebuilding, is the timing the same?

    Thanks,

    Whitney

  • Hi, 

    Please see the details below:

    1. You shared the build command for the CCSv8 compilation--can you share the CCSv5 one as well?

    "C:/ti/ccsv5/tools/compiler/c2000_6.2.0/bin/cl2000" -v28 -ml -mt --float_support=fpu32 --include_path="E:/AGDS/WorkSpace_AGDS/TestCodeCCSV5p5" -g --define="_DEBUG" --define="LARGE_MODEL" --quiet --verbose_diagnostics --diag_warning=225 --issue_remarks --output_all_syms --cdebug_asm_data --preproc_with_compile --preproc_dependency="AVSSProcessApi.pp" "../AVSSProcessApi.c"

     

    2. This difference is between the .outs built in each environment, right?

    Yes.

     

    3. For example, if you build the .out in CCSv5 and load and run the same .out file in both v5 and v8 without rebuilding, is the timing the same?

    Tried loading the same .out file in CCSv5 and CCSv8. When loading the program, developed in CCS v5, in CCV8, it requires compiler editing and rebuilding.

     

    Currently I have not loaded the program in any external flash memory, and is running the program in processor RAM. Can this have any effect on the difference in timing for v8 and v5?

     

    Thanks and regards,

    Nimmy

  • Running from flash vs running from RAM can affect the timing of your code, but as long as you're running from RAM  in both the CCSv5 and CCSv8 projects, it isn't likely to be the cause of the timing difference.

    Have you verified the clocks are still running at the expected speed? You could setup XCLKOUT or an EPWM and measure its frequency.

    If you compare the generated .map files, do you see any significant difference in code size?

    Whitney