GR740-UM-DS, Nov 2017, Version 1.7
367
www.cobham.com/gaisler
GR740
31.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
The Time message transmitted using RMAP should be an exact mapping of the Command field
(explained under Registers section). The Time message transmitted should write the Command field
available in target. Control register available in Command field specify weather the target should be
initialized or synchronized, at which SpaceWire Time-Codes it should happen (synchronization
event) and details of coarse and fine time available in the time message. The New code NC bit avail-
able in Control register should be enabled and if the target should be initialized then Init Sync IS bit in
Control register must be enabled otherwise target will be synchronized.
The Command Elapsed Time in time message are calculated from the local time (ET counter) avail-
able in the initiator. The local time can be obtained by reading the Datation Field of initiator compo-
nent. While reading the Datation registers always the total implemented coarse time and fine time
must be read in order (from 0 till the implemented Datation Elapsed Time registers). The DPF of
Datation Preamble Field register gives the coarse and fine time implemented which gives the total
local ET counter ( fine width).
The current implementation has 32 bit coarse and 24 bit fine time then it is enough to access the first
two Datation Elapsed Time registers (0 and 1). The 32 bits of Datation Elapsed Time 0 and only the
most significant 24 bits (31 to 8) of Datation Elapsed Time 1 registers (32 + 24 =56 bits) represents
the local time. These 56 bits only be used for Command Elapsed time (time message) calculation.
The SpaceWire Time-Codes at which the Time Message interrupt generated is embedded in the local
ET counter. The Command Elapsed time which is transmitted as time message should be an incre-
mented time value of this SpaceWire Time-Code and Command Elapsed time bits with lower weights
than the size bits mapped to SpaceWire Time-Code time information bits are all must be zero.
The incremented time value is to make the initialization or synchronisation of time message in target
will happen after the reception of qualifying SpaceWire Time-Codes. The qualifying SpaceWire
Time-Code is embedded in the Command Elapsed time (part of time message) sent from initiator.
This qualifying SpaceWire Time-Code value should also be written in the SPWTC in Control section
of the time message.
•
Time qualification in target
In target, the Command field will contain the time message when it is written by the initiator through
RMAP. When the SPWTC of Control register in Command field matches with a received SpaceWire
Time-Code then initialization or synchronization will occur (according to NC bit and IS bit in the
Control register) to the local ET counter of the target SPWTDP component. The Time message quali-
fied TCQ bit in the status register will enable itself, this bit will disable itself when the conditions for
time message qualification is achieved (SPWTC of Control register matches with a received Space-
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
Table 466.
Example Local ET counter with Mapping values