# An Efficient Multi-Lane SpaceFibre Core for Spacecraft Data-Handling Networks
## 2 SpaceFibre Standard  
The SpaceFibre protocol stack has a Network layer, a Data-Link layer, a Multi-Lane layer, a Lane layer, a Physical layer and a management information base (MIB). An MIB is responsible for configuring and monitoring the status of each layer. The Data-Link layer is responsible for QoS, flow control and FDIR services. The QoS technology arbitrates requests for data transmission from VCs, based on bandwidth reservations, priority and scheduled QoS. The flow control service utilizes flow control token (FCT) control words to indicate the available room of the VC at the receiver side. The error recovery mechanism can be found later in the current section. In the Data-Link layer, data segments from each VC are encapsulated in data frames. Aside from data frames, multi-purpose broadcast messages with two bytes are segmented into broadcast frames, which have a similar format to data frames. Figure 1 shows the format of a data frame for a multi-lane link. A data frame contains at most \(L\)\(\times\) 64 data words, where \(L(L\in[1,16])\) is equal to the maximum number of data-sending lanes. Moreover, a data frame begins with a start-of-data frame (SDF) control word being added before the data segment and ends with an end-of-data frame (EDF) control word added afterwards. An EDF word is made up of the control character K28.0, data characters containing a 16-bit cyclic redundancy check (CRC) field, and a data character containing a sequence number. The description of the error recovery mechanism starts with sequence numbers, which are used in EDF words, FCT words, idle frames, broadcast frames, acknowledgement (ACK) control words, negative acknowledgement (NACK) control words and FULL control words. The current value of a transmit sequence number (TSN) is incremented after a transfer of data frames, broadcast frames, and FCT words. The TSN is kept when a FULL control word or an idle frame is sent. For convenience of description, the frames causing the increment of a sequence number are defined as increment frames in this study. When increment frames are transmitted for the first time, they are stored by the Data-Link layer. The stored data are held until the destination node acknowledges the correct reception through an ACK word. Similarly, a receive sequence number (RSN) is maintained on the receiver side. The receiver side adds the RSN and one, once an increment frame is received correctly, which is checked by the CRC checksum, TSN, and RSN. Meanwhile, the receiver side sends an ACK word to the transmitter. However, if the far-end of the link sends an NACK word with the current value of the RSN and the reversed polarity flag, the near-end retransmits the corresponding increment frames, which were previously saved. Before the retransmission, the RETRY control word is exploited to inform the far end that an NACK has been correctly received. Control words and frames are interleaved over a SpaceFibre link with the following precedence: RETRY > broadcast frame > ACK/NACK > FCT > FULL > data frame > idle frame. Furthermore, the precedence of retransmitted increment frames is higher than that of increment frames generated for the first time. The Multi-Lane layer sustains multiple lanes over a SpaceFibre link to provide high throughput and high reliability. The bandwidth of a link is proportional to the number of lanes. The set of data and control words passed from the Data-Link layer, one to each data-sending lane, together form a data-sending row. Similarly, a data-receiving row is formed by words from data-receiving lanes. There is a ruleset in the Multi-Lane layer for forming a data-sending row. Data words from a data frame are spread across the data-sending lanes. The first data word of the frame is distributed to the data-sending lane with the lowest number. Each control word of the Data-Link layer is replicated and goes over all data-sending lanes. However, EDF words make an exception because the CRC value of each lane is different.