At each end of a SpaceWire link is a SpaceWire link interface. A block diagram of a link interface is illustrated in Figure 36.

SpaceWire Link Interface Block Diagram

Figure 36 SpaceWire Link Interface Block Diagram

The SpaceWire link can send and receive SpaceWire packets and time-codes once it has been initialised and is running. As described in the section “SpaceWire Packets” a SpaceWire packet comprises a destination address, cargo and end of packet marker. To send a SpaceWire packet over a SpaceWire link it is passed character by character to the transmit FIFO starting with the first character of the destination address. SpaceWire packets are received into the RX FIFO and can be read out by the application. To send a time-code, it is presented to the SpaceWire interface and will be transmitted as soon as the current character has finished being transmitted. When time-codes are received they are made available via the time-code interface. Time-codes need to be validated before they are used, see the section “Time Codes”.

Before a SpaceWire link can send and receive SpaceWire packets and time-codes, it needs to be initialised. This is done under control of the link state machine. This state machine also manages recovery from any errors detected on the link, by re-initialising the link.

To prevent overflow of the receive FIFO the SpaceWire interface includes circuitry to monitor the amount of space available in the receive FIFO and to regulate the data being sent from the other end using flow-control tokens.