h t t p : / / s p a c e w i r e . e s a . i n t
15-Dec-2018
Click Here for Printable View

Time-Codes

SpaceWire time-codes provide a means of distributing time information across a SpaceWire system. Time can be distributed across a large network with relatively low jitter. This time information can be provided as ticks or as an incrementing value which may be synchronized to spacecraft time. Time-codes provide a mechanism for supporting distributed system synchronization. They may also be used to implement isochronous communication channels, complementary to the asynchronous channels provided naturally with SpaceWire.

A time-code comprises the SpaceWire ESC character followed by a single 8-bit data character. The data character contains six-bits of system time (time-field) and two control flags. Each SpaceWire node or router contains a six-bit time counter. A node or router acts as the time-code master and is responsible for distributing time. The time-master interface has a ďtickĒ input, which is asserted periodically (e.g. every millisecond) by its host system. When the time-master link interface receives a tick, it increments its time counter and then immediately sends out a time-code with the 6-bit time field set to the new value of the time counter.

When the node or router at the other end of the link receives the time-code it updates its internal time counter with the new time and asserts a tick output signal. The new time should be one more than the time counterís previous time-value. This fact can be used for checking on time validity. If a node or router receives a time-code that is equal to its current time value then it does not emit a tick output signal. This prevents repeated time-code propagation in a circular network. Possible error situations are described in.

When a router receives a time-code it checks that it is one more than the routerís current time setting. It then increments the routerís time-count and emits a tick signal. This tick signal propagates to all the output ports of the router so that they all emit the time-code. This time-code is the same value as that received by the router since the router time counter has been incremented. If there is a circular connection then the router will receive a time-code with the same time value as the router time counter. When this happens the time-code is ignored. In this way time flows forward through a network reaching all nodes but is suppressed if it flows back due to a circular connection

With the provision of this basic time distribution function, application level protocols can be used to distribute specific time values at full resolution (not just 6-bits) and to issue time dependent commands etc. The two control flags that are distributed with the 6-bit time-code can be used to broadcast information to all nodes and routers on the network.

Copyright 2000 - 2017 © European Space Agency. All rights reserved.
If you have any questions or comments regarding this website, please contact the webmaster.