I want to measure DSP cycles consumed in a function.
what i am doing is as follows.
////////////////////////////////////////////////////////////////////////////
time1 = CLK_gethtime();
function()
{
//some code
}
time2 = CLK_gethtime();
DSP_Cycles = (time2- time1) * (CLK_cpuCyclesPerHtime())
////////////////////////////////////////////////////////////////////////////
When i print DSP_Cycles, it gives zero.
Then i tried printing (CLK_cpuCyclesPerHtime()) directly & found that it is
returning zero.
CLK_cpuCyclesPerHtime() returns a Float value.
I tried printing it with %f, %32.3g %ld (After type proper casting), but every
time it is prinintg zero.
I have added all header files (bios/include/log.h, bios/include/clk.h,
bios/include/gbl.h) & CLK is initialised too.
Can anyone tell where am I making mistake?
Thanks & Regards
Prasad V. Joshi
Texas Instruments
Off: 080-25099173
_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source