Tool/software: Linux
how to getting the actual time consuming of the DSP algorithm?
i have use WH_time[0] = _itoll(TSCH, TSCL); to get the circles of fuctions ,but i donot know how to get the actual time!
BESTWISHES
shuai
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.
Tool/software: Linux
how to getting the actual time consuming of the DSP algorithm?
i have use WH_time[0] = _itoll(TSCH, TSCL); to get the circles of fuctions ,but i donot know how to get the actual time!
BESTWISHES
shuai
Using TSCH/TSCL we can get the DSP cycles across a function. But to get the time you will have to divide by CPU frequency
t0 = _itoll(TSCH, TSCL);
funcABC();
t1 = _itoll(TSCH, TSCL);
cycles = t1 - t0;
time = (cycles / CPU_frequency) * 1000
Eg. lets cycles = 20,000,000 and CPU freq = 600,000,000
So time - (20,000,000 / 600,000,000) * 1000 = 33ms
Regards,
Shyam