# An Efficient Multi-Lane SpaceFibre Core for Spacecraft Data-Handling Networks
## 3 Architecture of the E-ML-SpFi Core
### Key Technologies
#### 3.2.2 Modified Word Re-Ordering Block  
As presented in Section 2, \(L\) is equal to the maximum number of data-sending lanes. In addition, \(M\) is the real-time number of data-sending lanes. In case of lane failures, the bandwidth of a link decreases. For this reason, the core needs to distribute \(L\) consecutive words to \(M\) active lanes with the initial order. A block for general purpose, described in [25], has a capability of shaping the data words of a data frame from a fixed number to a real-time variable number. Nevertheless, this block appears to be lacking in some rules special for SpaceFibre. In the protocol, data words, EDF control words and RWs are interleaved over a link with the precedence, as mentioned in Section 2. Besides, PAD control words shall be introduced to a data frame, which is also mentioned in Section 2.  
In view of this, a modified word re-ordering architecture is specifically designed for SpaceFibre networks, which assigns an extended set of words to \(M\) data-sending lanes in order of appearance. The extended set of words contains data words of data frames, EDF control words, PAD control words, and RWs. Each type of word has its own rule in the assignment to data-sending lanes, which is described in Section 2.  
Figure 6 shows the architecture of the block. The block includes two re-ordering registers (RORs), a modified re-ordering FSM, and a reshape module. Words imported to the block are shifted from data_in to ROR_1 and from ROR_1 to ROR_0. The width of signal data_in is \(L\) words. Based on fixed \(L\), real-time \(M\), and the type of words, the FSM updates the value of the signal Index. According to the signal Index, the reshape module reads \(M\) words stored in RORs and changes, in real time, the width of a data-sending row. The detailed process of forming a data-sending row is described as follows.  
If \(M\) is the same as \(L\), the signal Index is always equal to zero and the words in ROR_0 are read out by the reshape module to constitute an \(L\)-word data-sending row. Additionally, the block does not affect the shift between data_in and RORs. When \(M<L\), the following different situations are presented.  
If the row of ROR_0 is made up of data words from a data frame and the class of the words in ROR_1 is an RR, mentioned in Section 2, the value of the signal Index shall be maintained. In this case, words in ROR_0 are maintained, and words in ROR_1 are read and are mapped on the data-sending lanes. Afterwards, the modified re-ordering FSM allows the shift between data_in and ROR_1.  
When ROR_0 has data words from a data frame and the words in ROR_1 are EDF control words, the signal Index is maintained and the reshape module calculates the number  
Figure 5: Circuit design of the RCU for data frames.  
of PAD control words to make the length of the data frame a multiple of \(M\). Subsequently, the signal Index is cleared.  
If the words in RORs are data words from data frames, the value of the signal Index varies depending on (1), where \(i\) is the current value of the signal Index and \(i^{\prime}\) is the latest value.  
\[i^{\prime}=(i+M)\text{mod}L \tag{1}\]  
Due to the updates in the signal Index, the modified word re-ordering architecture accomplishes adaptive bandwidth. By solving the problem of random insertion of RWs into data frames and filling data frames with PAD control words, the architecture is compatible with the whole ruleset of SpaceFibre, so that it can be better applied to various complex and changeable environments.