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.

C674x Cycle Accurate Simulator setup



I'm trying to use the C674x Cycle Accurate Simulator to profile/benchmark our code, but the simulator is not correctly reflecting the cycle counts I get on target H/W.

I'm using a simple routine from DSP C6000 workshop to test this.  It calculates the dot product of 2 input arrays.  I locate the input arrays into different sections in memory and the results are as follows:

Location in input arrays target H/W Cycle counts Simulator Cycle counts
L2 385 137
L3 (not cached) 8,452 137

Cycle counts is measured using breakpoints and enable+view clock from the Profile menu option.

I must be missing something in the setup?  I compile/run the same .pjt.  The only change (other than selecting the target when CCS launches) is in the .tcf file where I toggle the RTDX mode between JTAG and simulator.

thanks,

Mike

  • Hi,

    I am still waiting for someone from TI to help me with this issue.  The basic issue is setting up my simulator to accurately reflect the cycle execution on my DSP - C6747.

    Here is the source code I am using from a recent C6000 workshop:

    /* Prototype */
    int dotp(short *m, short *n, int count);

    /* Include Files */             
    #include "data.h"  

    /* Definitions */
    #define COUNT    256

    /* Declarations */
    short a[COUNT] = {A_ARRAY};
    short x[COUNT] = {X_ARRAY};
    int y = 0;     

    /* Main Code */
    main()
    {
        y = dotp(a, x, COUNT);
    }
                                    
    int dotp(short *m, short *n, int count)
    {
        int i;
         int sum = 0;
     
        for (i=0; i < count; i++)
        {
             sum = sum + m[i] * n[i];
        }

        return(sum);
    }

    In the lab, the dotp() function will take 81 cycles with the sim64P simulator.  I can't get that result when I use the C674x Cycle Accurate simulator.  Please help!

    thanks.

    Mike

  • Hi Mike,

    C674x CPU cycle accurate configuration does not model Cache, hence you are not seeing matching numbers w/ hw. You can instead use

    "C6747  Device Cycle Accurate simulator" configuration. This is cycle accurate simulator that provides close to h/w numbers but performancewise will be slower compared to CPU only simulator.

    regards,

    Sheshadri