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.

TMS320C6472+ CCS4.2+Bios5 :computing the cycles number for a function using a Timer

Other Parts Discussed in Thread: TMS320C6472

Hello,

I'm working on TMS320C6472 multicore DSP using the CCS4.2 and bios5.

I want to compute the cycles number of a function using a timer. so could someone tell me what are the  appropriate instructions to use.

I tried to compute the cycles number using this method (DSP register):

start=TSCL;

func();

end=TSCL;

cycles_number=end-start;

First I want to know if my method is correct or not. Second I want to use the timer to compute the cycles number.

I did a research on internet, I found that there is a timestamp to use it but I think it's for bios6 and me I work with the bios5. So, is there another method to compute the cycles number with bios5 instead of using TSCL register?

I will be very thankfull.

david

  • David,

    Your method is correct and will work with any version of BIOS since it has nothing to do with BIOS.

    Prior to using TSCL, you must write to it once to start it running. Some versions of BIOS may do this for you prior to starting main(), but it is always safe to include

    TSCL = 0;

    at the beginning of main() to make sure the TSC is running.

    The value read from the TSCL register is the number of DSP clock cycles since the point where the TSC was started. The value in cycles_number is therefore the number of DSP clock cycles from start to end.

    Regards,
    RandyP