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.

Measure clock on C6657 Simulator

Other Parts Discussed in Thread: TMS320C6657

Hi,
My project is worked on TMDSEVM6657LS.
It spent 49,918,709 cycles on TI simulator.
Then I changed it was worked to EVM, it spent 120,996,744 cycles.

Why the XDS100v1 spent so much time?
Or the "C6657 Device Functional Simulator" doesn't consider any time on hardware.

Run 1:
Connection: Texas Instruments Simulator
Board or Device: C6657 Device Functional Simulator, Little Endian
=> Clock: 49,918,709 cycles

Run 2:
Connection: Texas Instruments XDS100v1 USB Emulator
Board or Device: TMS320C6657
=> Clock: 120,996,744 cycles

Thank you!

  • A few thoughts:
    1. Did you configure the memory correctly (L1/L2/L3 SRAM /cache, DDR) ?
    2. Did you include any overhead in your measurements (file I/O, OS, network)?
    3. Without looking at exactly how you measured the clocks, it's almost impossible to tell why there is such a big discrepancy.
  • Hi,
    As said by RobbySun, it is difficult to answer your question without knowing the project purpose and utilization.
    Is the application loaded on internal memory and how the memories are configured etc.?
    Thank you.
  • Hi RobbySun,
    Thank you for your quick and prompt response. Your contribution is appreciated. Please continue to contribute more.
  • Hi RobbySun & Rajasekaran:

    Sorry for such a late reply.

    RobbySun said:

    1. Did you configure the memory correctly (L1/L2/L3 SRAM /cache, DDR) ?


    The configuration of the memory is as my.cmd.

    RobbySun said:

    2. Did you include any overhead in your measurements (file I/O, OS, network)?


    I use a simple method to test my function.
    There is not any input/output I/O, OS and network.
    I just used a fix array for test pattern, and I can get results every 78 frames.
    It toggle the GPIO when output data is ready.

    RobbySun said:

    3. Without looking at exactly how you measured the clocks, it's almost impossible to tell why there is such a big discrepancy.


    I just changed the connection of TI simulator without changing any setting as configuration of the memory.
    I set a breakpoint and calculate the different clock between two clocks.

    I don't know that I have provided information as you need.
    Thank you for your patience to read.

    [my.cmd]

    -c
    -heap  0x41000
    -stack 0xa000
    
    /* Memory Map */
    MEMORY
    {
        L1PSRAM (RWX)  : org = 0x0E00000, len = 0x7FFF
        L1DSRAM (RWX)  : org = 0x0F00000, len = 0x7FFF
        L2SRAM (RWX)   : org = 0x0800000, len = 0x080000
        MSMCSRAM (RWX) : org = 0xc000000, len = 0x200000
        DDR3 (RWX)     : org = 0x80000000,len = 0x10000000
    }
    
    SECTIONS
    {
        .csl_vect    >       MSMCSRAM
        .text        >       MSMCSRAM
        GROUP (NEAR_DP)
        {
            .neardata
            .rodata
            .bss
        } load       >      MSMCSRAM
        .stack       >      MSMCSRAM
        .cinit       >      MSMCSRAM
        .cio         >      MSMCSRAM
        .const       >      MSMCSRAM
        .data        >      MSMCSRAM
        .switch      >      MSMCSRAM
        .sysmem      >      MSMCSRAM
        .far         >      MSMCSRAM
        .testMem     >      MSMCSRAM
        .fardata     >      MSMCSRAM
    }
    

    [main.c]

    #include <cerrno>
    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
    #include "./myfun.h"
    
    #define GPIO_BASE           0x02320000
    #define GPIO_DIR            (*(unsigned int*)(GPIO_BASE + 0x0010)) // DIR Control
    #define GPIO_SET_DATA       (*(unsigned int*)(GPIO_BASE + 0x0018)) // OUT_DATA Control
    #define GPIO_CLR_DATA       (*(unsigned int*)(GPIO_BASE + 0x001C)) // OUT_DATA Control
    
    const char inputBufs[6144]  = {...}; // test pattern
     
    void main(void) {
        void *myfunMem;
        uint8_t *outputBufs;
        int outBufSize = 21248, outputfSize;
        int frame;
        uint8_t led;
        printf("Hello World!\n");
        outputBufs = (uint8_t*) malloc(outBufSize);
        myfunMem = myfun_Open();
    
        GPIO_DIR = ~0x0000C000;
        frame = 0;
        led = 1;
        while(1) {
            myfun(myfunMem, (char*)inputBufs, (char*)outputBufs, &outputfSize);
            frame++;
            if (frame == 77) {
                led ^= 1; // set a breakpoint here!
                if (led)
                    GPIO_SET_DATA = 0x0000C000;
                else
                    GPIO_CLR_DATA = 0x0000C000;
                printf ("Done\n");
                frame = 0;
            }
        }
        myfun_Close(myfunMem);
        free(outputBufs);
    }