
GR716-DS-UM, May 2019, Version 1.29
345
www.cobham.com/gaisler
GR716
The initiator transmits the SpaceWire Time-Codes out of the core only when the Transmit Enable TE
bit in Configuration 0 register is enabled. The ET counter in initiator can be initialized (to provide any
initial value). Initialization is done by writing a time value into the Command Elapsed Time registers
available in the command field, the NC bit in the Control register of command field should be enabled
to initialize the time value stored in the Command Elapsed Time registers to be the local time (Trans-
mit Enable TE bit in Configuration 0 register must be enabled). The NC bit in the Control register will
disable itself when the time is initialized. The INSYNC bit in Status 0 register will enable when ini-
tialization is performed. The MAPPING bits in Configuration 0 register determines the interval
between SpaceWire Time-Code transmissions which is explained in detail in the section below.
The target time must be configured with time values from the initiator. The targets register space must
be configured and controlled through RMAP by an initiator to achieve time synchronisation. The tar-
get time synchronisation is explained in detail under the section initialization and synchronisation of
target through RMAP.
34.3.7 SpaceWire Time-Code
SpaceWire Time-Codes are continuously transmitted from an initiator node (time master) to all slave
nodes. The transmission of the SpaceWire Time-Code is synchronized with the ET counter in the ini-
tiator node. The six bits of the Time-Code time information correspond to six bits of the local ET
counter (MAPPING bits in Configuration 0 register determines its exact mapping and interval
between SpaceWire Time-Code transmissions). Value of 0b00000 for MAPPING bits in Configura-
tion 0 register will send SpaceWire Time-Code at every Second. When the value is 0b00001 Space-
Wire Time-Codes are sent at every 0.5 Seconds interval and so on (maximum value of MAPPING can
be 0b11111
but this value cannot be more than the number of bits implemented as fine time). The ET
bits with lower weights than the size bits mapped to Time Codes time information bits are all zero at
time of SpaceWire Time-Codes transmission.
The Table below shows an example
Local ET
counter and Mapping. If the Coarse time is 32 bits and Fine time is 24 bits and mapping value is 6
then 0 to 31 is coarse(32 bits), 32 to 55 is fine time and mapped SpaceWire Time-Code is 32 to 37.
34.3.8 Initialization and synchronisation of target through RMAP
An initiator must provide the time values and set the target in order to get the time synchronized. The
below text explains how an initiator can synchronise the target.
The SPWTC in Control register of initiator core component should be configured initially with a
SpaceWire Time-Code value at which the time message needed to be transferred. When the Space-
Wire Time-Code generated internally using the ET counter matches the SPWTC in Control register a
Time Message TM interrupt will be generated (TME bit Time Message Enable should be enabled in
the Interrupt Enable register). Based on this interrupt the local time (ET counter) in initiator should be
accessed from the Datation registers and used to calculate the time message needed to be transmitted.
•
Time message generation
Table 437.
Example Local ET counter with Mapping values
0
25 26 27 28 29 30 31 32 33 34 35 36 37 38
55
Mapping Values
0
1
2
3
4
5
6
7
24
If the Mapping value is 6 then the mapped SpaceWire
Time-Codes is 32 to 37
32 33 34 35 36 37
If the Mapping value is 0 then the mapped SpaceWire
Time-Codes is 26 to 31
26 27 28 29 30 31
If the Mapping value is 5 then the mapped SpaceWire
Time-Codes is 31 to 36
31 32 33 34 35 36
If the Mapping value is 7 then the mapped SpaceWire
Time-Codes is 33 to 38
33 34 35 36 37 38