# Low-Complexity Multi-Size Circular-Shift Network for 5G New Radio LDPC Decoders
## 2 Multi-Size Circular-Shift Network for 5G NR LDPC Decoder
### Multi-Size Circular-Shift Network  
In addition to computation units, the switch network is an essential element which occupies significant portion of the LDPC decoder area. In QC-LDPC codes, the parity-check matrix is composed of cyclic permutation submatrixes that determine the interconnection network between the CNUs and VNUs. Accordingly, the decoder needs to circularly shift an array of \(Z\) messages where \(Z\) being the size of the submatrix, also referred to as block size. QC-LDPC codes simplify the switch network by a great deal as the requirement of all random shifting (or permutation) is eliminated and only cyclic shifting is required. In many modern communication standards, the LDPC codes are defined for different codeword lengths and block sizes \(Z_{k}\), with \(0\leq k\leq K\), where \(K\) is the number of admissible sizes. Therefore, an MSCS network, which is capable of circular shift over an arbitrary number of data, is mandatory. An MSCS network block rotates a specified amount of data. If \(P\)\(w\)-bit data \((d_{0},d_{1},d_{2},\ldots,d_{P-1})\) are inputted with a shift size \(Z\) and circular-shift amount \(c\), the first \(Z\) input data are rotated by \(c\) to produce the output \((d_{c},d_{c+1},\ldots,d_{Z-1},d_{0},d_{1},\ldots,d_{c-1})\). The output data beyond the specified size of \(Z\) are redundant. The sizes and shift amounts are determined by the adopted QC-LDPC codes. Generally, the Benes network is a very well-known non-blocking multistage interconnection network. A \(P\times P\) Benes network is capable of performing any desired permutation over \(P\) data units, where the input size \(P\) of the Benes network is a power of 2. The network comprises of \((2 log_{2}P-1)\) stages of \(2\times 2\) switches. Each switch element consists of two 2-input MUXs and can operate either in the BAR or in the CROSS state, as depicted in Figure 1a. An example of a Benes network with \(P=8\) is shown in Figure 1b. The switch network designed for QC-LDPC decoders is generally optimized for a given size of permutation matrix with the Benes network. To properly control all the switch units and realize the desired permutation result, the control signals for all \(2\times 2\) switches must be provided. Those control signals are pre-computed and stored in a dedicated LUT. However, as the submatrix size increases, the required size of LUT becomes a dominant area consuming factor. Therefore, the Benes network with a large size of submatrix is inefficient as it suffers from significant hardware overhead. Furthermore, Benes network offers a limited application, as the number of inputs should be a power of 2. For the QC-LDPC decoders, switch networks are only required to implement the circular shifts. It was shown that only the first or last \(log_{2}P\) stages of the \(P\) input Benes network are needed to perform all cyclic shifts for \(P\) inputs [21]. Therefore, the implementation of the half or reduced Benes network referred to as Banyan network [22] in Figure 1c, is a preferable switching network structure. When the submatrix size is not a power of 2, it is possible to use an \(P^{\prime}\times P^{\prime}\) Banyan network where \(P^{\prime}=2^{[log_{2}P]}\). However, an additional multiplexing stage must be carried out either at the switch network input or output. In recent years, many techniques were proposed to modify the Benes network to make it more efficient for the reconfigurable QC-LDPC decoders [15]. The MSCS network structures can be implemented with typical barrel rotators. The structures exploit two barrel rotators which can be placed in parallel [23] or in series [17], as shown in Figure 2a,b, respectively. The output data of the MSCS network are combined from the outputs of two barrel rotators. In the Rotator-In-Parallel (RIP) structure [23], the left rotator performs the left shift by \(c\) to the input data, and the right rotator performs the right shift by \(P-c\) to the input data. After that, the obtained results from the barrel rotators are combined by MUXs to become the output data.