# Efficient Layered Parallel Architecture and Application for Large Matrix LDPC Decoder
## 2 Materials and Methods  
### Decoding Algorithm  
LDPC codes are defined by a \((M,N)\)-dimensional parity matrix \(\mathbf{H}\). The \(N\) columns of the check matrix correspond to the coded code elements, and the \(M\) rows correspond to the check equation. For a code word \(\mathbf{x}=(x_{0},x_{1},\ldots,x_{n-1})\), \(\mathbf{x}\) is a valid code word when and only when \(\mathbf{H}\mathbf{x}^{T}=0\), and the decoding result may correspond to the original encoded code word, thus obtaining the reduced sequence of information code elements. The meanings and algorithm parameters represented by subsequent symbols are given below: (1) \(c_{n}\) represents the symbol information of the \(n\)th code element in the encoded code word; (2) \(y_{n}\) represents received signal; (3) \(I_{n}\) represents the channel information; (4) \(C_{m}\) represents the \(m\)th check node; \(N(m)\backslash n\) represents the set of VNs connected to the check node \(C_{m}\), except the variable node \(V_{n}\); and \(R_{mn}\) represents CN information passed from the check node \(C_{m}\) to the variable node \(V_{n}\); (5) \(V_{n}\) represents the \(n\)th variable node; (6) \(Q_{mn}\) represents VN information passed from the variable node \(V_{n}\) to the check node \(C_{m}\); (7) Posterior probability information: \(\Lambda_{n}\) represents the pseudoposterior probability information of the \(n\)th code word in the computed code word, whose decoding result \(c_{n}\) can be obtained after a hard judgment. Different from tradition layered algorithms, the update order rearrangement technique used in [PERSON] et al. (2015) by [PERSON] et al. does not require the use of FIFO (First in First out). It updates VN information \(Q_{mn}\) instead of the posterior probability information \(\Lambda_{mn}\) in the iteration. Its algorithm flow is shown below. Step 1: Initialization of channel information:  
The initial external information of the VN is initialized by the following formula, where \(\sigma^{2}\) is the channel noise variance estimate. \[Q_{n}=I_{n}=-\frac{2y_{n}}{\sigma^{2}} \tag{1}\]  
where the number of iterations \(i=0\), and the initial CN also needs to be initialized. \[R_{mn}=0 \tag{2}\]  
Step 2: Iteration:  
Prepare the subiterations of the row block in the \(i\)th iteration; the number of subiterations layers \(m\) increases. Step 3: Row block subiterations:  
Computation of the posterior probability information, where \(m^{\prime}\) is the check node label of the most recently updated \(V_{n}\);  
\[\Lambda_{n}=Q_{n}+R_{m^{\prime}n} \tag{3}\]  
The current row block VN is updated and written back to memory;  
\[Q^{{}^{\prime}}_{n}=\Lambda_{n}-R_{mn} \tag{4}\]  
the current row block CN is updated after searching the array by the minimum value;  
\[R_{mn}=\alpha\times\prod_{n^{{}^{\prime}}\in N(m)\setminus n}sign\big{(}Q_{ n^{{}^{\prime}}}\big{)}\times\min_{u^{{}^{\prime}}\in N(m)\setminus n}\big{|}Q_{ n^{{}^{\prime}}}\big{|} \tag{5}\]  
Step 4: Hard decision:  
Generate the updated code word, if it passes the check to satisfy \(\mathbf{Hx}^{T}=0\), then terminate the decoding; otherwise, \(m\) plus one and return to the third step for the next layer of subiterations. If all line blocks are updated, then \(i\) plus one and return to the second step for the next iteration. \[c_{n}=\left\{ \begin{array}{ll}0&\Lambda_{n}\geq 0\\ 1&\text{otherwise}\end{array} \right. \tag{6}\]  
Table 1 compares the differences between the normal TDMP and the reordered decoding flow. Because the decoder hardware takes multiple cycles to find the magnitude minimum of VN, the part of calculating CN is highlighted. The computation of CN in the ordinary decoding flow is between the read and write cycles of the \(\Lambda_{n}\) being updated; the computation of \(\Lambda_{n}\) depends on the new CN and \(Q_{mn}\), the intermediate variable \(Q_{mn}\) needs to be stored in FIFO.