
GR716-DS-UM, May 2019, Version 1.29
300
www.cobham.com/gaisler
GR716
One of the ports is set as active (how the active port is selected is explained below) and the transmitter
drives the data/strobe signals of the active port with the actual output values as explained in section
33.3.2. The inactive port is driven with zero on both data and strobe.
Both receivers will always be active but only the active port’s interface signals (see figure 51) will be
propagated to the link interface FSM. Each time the active port is changed, the link will be reset so
that the new link is started in a controlled manner.
When the CTRL.NP bit is zero, the CTRL.PS bit selects the active port. When the CTRL.NP bit is set
to one, the active port is automatically selected during initialization. For the latter mode, the port on
which the first bit is received will be selected as the active port. If the initialization attempt fails on
that port the link is reset and the active port is again sected based on which port the first bit is
received.
33.3.5 Setting link-rate
The register field CLKDIV.CLKDIVSTART determines the link-rate during initialization (all states
up to and including the connecting-state). The register is also used to calculate the link interface FSM
timeouts (6.4 us and 12.8 us, as defined in the SpaceWire standard). The CLKDIV.CLKDIVSTART
field should always be set so that a 10 Mbit/s link-rate is achieved during initialization. In that case the
timeout values will also be calculated correctly.
To achieve a 10 Mbit/s link-rate, for a given transmitter input clock(
TXCLK
), the CLKDIV.CLK-
DIVSTART field should be set according to the following formula:
With single data rate (SDR) outputs:
CLKDIV.CLKDIVSTART = (<frequency in MHz of TXCLK> / 10) - 1
The link-rate in run-state is controlled with the run-state divisor, the CLKDIV.CLKDIVRUN register
field. The link-rate in run-state is calculated according to the following formula:
With SDR outputs:
<link-rate in Mbits/s> = <frequency in MHz of TXCLK> / (CLKDIV.CL1)
The value of CLKDIV.CLKDIVRUN only affects the link-rate in run-state, and does not affect the 6.4
us or 12.8 us timeouts values.
An example of clock divisor and resulting link-rate, with a TXCLK frequency of 50 MHz, is shown in
the table 365.
Table 365.
SpaceWire link-rate example with 50 MHz TXCLK
Clock divisor value
Link-rate in Mbit/s
SDR output
0
50
25
16.67
12.5
10
8.33
7.14
6.25
5.56
5
1
2
3
4
5
6
7
8
9