Hi all,
I want to measure the run time of my code. Since I didn't use DSP/BIOS and EVMC6474 does not support clock()(always return 0), I used TSCL/TSCH to measure the time, But the value seems to be very weird and was not what it was supposed to be.
int main() (Core0)
{
TSCL=0;
start = TSCL; (start=1)
starth = TSCH;(start=0)
<initialize ipc interrupt>
stop = TSCL; (stop=8954)
stoph = TSCH;(stoph=0)
<ipc notify core1>
stop = TSCL; (stop=15954)
stoph = TSCH;(stoph=0)
<ipc wait core1>
stop = TSCL; (stop=1496240583) //very weird here
stoph = TSCH;(stoph=0)
return 0;
}
int main() (Core1)
{
TSCL=0;
start = TSCL; (start=1)
starth = TSCH;(start=0)
<initialize ipc interrupt>
stop = TSCL; (stop=9585)
stoph = TSCH;(stoph=0)
<ipc wait core0>
stop = TSCL; (stop=16606)
stoph = TSCH;(stoph=0)
<ipc notify core0>
stop = TSCL; (stop=23715)
stoph = TSCH;(stoph=0)
return 0;
}
What's wrong here? Is it because the counter reading was interrupted by IPC?
Thanks,
lpeng