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.

TMS320C6678: TMDXEVM6678LE Signal delay

Part Number: TMS320C6678

Hi Team,

I use the TMDXEVM6678LE Rev.3B to test our algorithm. I find that when I use evmc6678l.gel to initialize the board, the time spend on the algorithm is 66ms, while when I use the function platform_init from ti.platform.evm6678l.ae66 to initialize the board, the time will be 97ms. After analysis, I find that when six cores manipulate the DDR3 at the same time, evmc6678l.gel initialized board work much better than platform_init from ti.platform.evm6678l.ae66. So whats the differences between the gel and the platform_init from ti.platform.evm6678l.ae66.

Best Regards

James Man

TI Customer Support Center

  • Depeng,

    That's an interesting question.Let me look into it and get back with the differences.


    Regards

    Shankari G

  • Depeng,

    The same sequence of code is done in both the gel ( ontargetconnect() )  and the platform_init in ti.platform.evm6678l.ae66 ( i.e., Platform - lib ) .

    i.e., 

    PLL initialization

    PSC power domain setup

    Pll3 pass clk

     Pll2 DDR3 PLL

    DDR initialization and memory test

    Configure SGMII SERDES

    EnableEDC_OneforAll

    setCpSwConfig 

    ----

    Now, when we compare the code, the following is the difference

    =========

    In Gel : 

    =========

    1. There is no "error checking" like read back the setup-data and verify that the register settings / values are correct..

    For example, 

    /* Read back */
    status = CorePllcGetHwSetup (&pllc_hwSetupRead); // in platform_init 

    2. There is no "For loop" to try again and again until the settings are done correctly. 

    In gel, it just do only once. If error pops out that the user will again try doing the "connect target" via emulator.

    ============

    In platform_init: 

    =============

    1. There is an error checking in PLLC, DDR3PLL etc.

    2. There is a for loop trying ten times... to make sure, that the settings are retried....

    ( for (loop_count = 0; loop_count < 10; loop_count++) 

    -------------

    More over, when the same Platform_init is flashed into the SPI_NOR, it will be faster than the Gel file initialization.

    Do they, run the Platform_init through emulator with CCS or from the flash memories ?

    Regards

    Shankari G

  • Hi Shankari,

    We run the platform_init through emulator with CCS. We are confused with the different time from same code just different initialization ways, the gel file and platform_init.

    Best Regards

    James Man

    TI Customer Support Center

  • Would you tell me how to measure time taken by the code? Do you take the tscl and tsch registers to measure the time taken from function A to function B?

  • Depeng,

    Yes, it is possible by tscl registers.

    You can use the following code to measure the time taken by the code.

    ------

    Code snippet: 

    //Shankari-Start-Declaration  for time ticks

    #include "C:\ti\pdk_keystone2_3_01_04_07\packages\ti\csl\csl_tsc.h"

    //<ti/csl/csl_tsc.h>

    extern uint32_t utilReadTime32();

    //Shankari-End-Declaration  for time ticks

    ......

    /*Throughput calculation initialization */


    unsigned int StartTime = 0;
    unsigned int EndTime = 0;
    unsigned int Total_cycle_ticks = 0;

    /*Throughput calculation initialization Ends */

    .......

    //Usage 

    StartTime = utilReadTime32();

    // Please insert your code here 

    sauConnDmPktTest(tf, pat,
    100, /* Number of packets per connection */
    512, /* initial payload length */
    0, /* payload llength increment step */
    SAU_PAYLOAD_INC8 /* payload pattern */
    );


    EndTime = utilReadTime32();

    Total_cycle_ticks = EndTime-StartTime;


     System_printf("StartTime = %d \n", StartTime);
     System_printf("EndTime = %d \n", EndTime);

     System_printf("Total_cycle_ticks = %d \n", Total_cycle_ticks);


    // System_printf(" sauConnDmPktTest 2048 PacketSize, 100 packets -Total_cycle_ticks = %d \n", Total_cycle_ticks);

    ------------------

    Time tick calculation , you can use according to the number of Total_cycle_ticks, you get......

    Total no of CPU cycles =    cycles 

    DSP core frequency = 1000 MHz

     

    Time = 1 / Freq ( General formula )

              = 1 / 1000 MHz ( DSP core frequency )

              = 0.001 us ( Micro seconds) 

     

    1000000000 cycles = 1 sec

    =>32149501  cycles =  0.032 sec

    ---------------------------

    Regards

    Shankari G

  • Hi Shankari,
    In your test, is the time the same for both? I mean the same test code just different board initialization way,the gel file and platform_init.

    Best Regards

    James Man

    TI Customer Support Center

  • James,

    I havenot compared the timings of the gel vs platform_init.

    And more-over, no visible difference between them while running on EVms.

    Using the above, code snippet, you can measure easily.

    Let me know, what you observe, using TSCL  ( above) 

    Regards

    Shankari G

  • Hi Shankari,

    I use the CSL_tscRead function from pdk_C6678_1_1_2_6 to measure the time. The results have already been put into the attachment . I find that the same code with different initialization way will result in different time.

    Best Regards

    James Man

    TI Customer Support Center

  • James,

    The initialization way is same other than the two differences, I have mentioned above ( the for looop and the error chcecking) 

    ---

    Ok, Another way to test. 

    When you load the code, ( i.e., Platform_init) through CCS with emulator, first launch the gel file,  evmc6678l.gel and then load the ".out" of Platform code.

    There is a possibiity that you might be using some other gel file while launching the platform test code.

    In Platform project, Please open and check the "target configuration file"  where it links the gel file. 

    Regards

    Shankari G