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.

negative number of cycle CPU DSP C6678

hello,


I work with the C6678 DSP using CCS v5.3.0 tool and I want to calculate the number of cycle of function. I normally proceeds as follows:

unsigned long long beg, end, Ncycles;                                            // declaration

_CSL_tscEnable ();                                                                             // Enable the counter

beg _CSL_tscRead = ();                                                                     // Read the first counter value
pdtMat ((float *) A, (float *) B (float *) C, N, K, M);                           // function
_CSL_tscRead end = ();                                                                     // Read the last counter

Ncycles = end-beg;                                                                              // Subtract

The problem now is that if the size of the function arguments is large, the variable "" Ncycles "" takes negative values !!

I would like an explanation or solution for this problem.

Thanks,

Zakaria.

  • Welcome to the TI E2E forum. I hope you will find many good answers here and in the TI.com documents and in the TI Wiki Pages (for processor issues). Be sure to search those for helpful information and to browse for the questions others may have asked on similar topics (e2e.ti.com).

    Please refer below link for the usage of TSC registers,
    http://e2e.ti.com/support/dsp/c6000_multi-core_dsps/f/639/p/184564/665589#665589

    Few more threads for your reference,
    http://e2e.ti.com/support/dsp/tms320c6000_high_performance_dsps/f/112/t/11641.aspx
    http://e2e.ti.com/support/dsp/c6000_multi-core_dsps/f/639/t/275943.aspx

    Thank you.