- May 14, 2014 at 11:11 am #31709
I’m developing on a a board with 6 MIPS32 24KE cores. I’m trying to measure the time between certain actions which start on one core and end on a different core. My problem is now to synchronize the time between the cores.
What I tried is the following:
I use the Count register for counting. One core sets a flag for each core and makes a writeback to load it in the cache. The other cores wait until the flag is set and then all the cores reset their time to 0. But although the flags seem to work, the time is different on the cores.
My questions is now if you have any better possibility to synchronize the time between several cores or any idea why my soultion doesn’t work. And is it usefull to use the Count register or should I better use e.g. the Perf register in the cycle mode?
Thanks and best regards,
HannahMay 14, 2014 at 8:24 pm #38730
The clocks are independent so they would never be the same but I would think they would be close. How off are the clocks?May 15, 2014 at 9:19 am #38731
Well the problem is that I have to stop one of the cores with a debugger to read out data (I can’t process the data on the board but I can read through the debugger from the memory and then process the data on my local pc) so the time on the other cores goes further but not on this core.
That is why I have to synchronize them and I tried to do that with a flag like I descriped it in my question.
But I’m still not sure if there is a better possibility to get the time then by the Count register or the PerfCnt register (and I don’t know if there is a difference which one I should use better?).
And do you know any possible reason why the times on the cores are like 100 ticks different even though my synchronization actually seems to work? Are there any things like interrupts or something else which could change the times on the cores, so that this could be the reason for the strange times?