Are timers synchronous in separate threads?

Technical questions regarding the XTC tools and programming with XMOS.
Pooh
New User
Posts: 3
Joined: Sun Nov 24, 2013 10:35 pm

Are timers synchronous in separate threads?

Post by Pooh »

I have several threads distributed over two tiles all of which are capturing some data and time stamping these captures (using timers). There is an output thread that receives all the data and sends these for display to a UART. Since there is no global timer that I can use to time stamp data is it safe to assume that all timers on the separate threads are synchronized at startup so that all captures in the separate threads are correctly stamped relative to each other?

Thanks


User avatar
segher
XCore Expert
Posts: 844
Joined: Sun Jul 11, 2010 1:31 am

Post by segher »

All timers on the same tile return the same value at all
times. The timers on different tiles are not synchronised
(they indeed _will_ drift; the clocks on each tile have their
own PLL).
Pooh
New User
Posts: 3
Joined: Sun Nov 24, 2013 10:35 pm

Post by Pooh »

Thanks. Is there documentation that talks about this?
User avatar
segher
XCore Expert
Posts: 844
Joined: Sun Jul 11, 2010 1:31 am

Post by segher »

I'm not sure; I do know I didn't figure out myself that all
timers use in fact the same counter, but I don't know if it
is in some documentation or I heard it e.g. here.

The architecture book doesn't say it.

That separate PLLs will not stay perfectly in sync is just a
fact of life ;-)