## 2 Layered Decoding Schedule  
LDPC code is decoded based on the iterative message-passing algorithm, which means the decoding messages are exchanged frequently between the check nodes and variable nodes. The decoding messages include variable-to-check message, check-to-variable message, and a posterior probability LLR (APP-LLR). In the layered decoding schedule, LLRs are commonly updated after the update of variable-to-check messages and check-to-variable messages in a layer. For convenience of presentation, we make the following definitions. \(V_{p,c}^{it}\) denotes the variable-to-check messages that propagated from the variable node \(v\) to the check node \(c\) at the \(it\)-th iteration. \(R_{c,v}^{it}\) denotes the check-to-variable messages that propagated from the check node \(c\) to the variable node \(v\) at the \(it\)-th iteration. LLR corresponding to the variable node \(v\) in the \(it\)-th iteration is represented as \(LLR_{v}^{it}\). Before the start of decoding, APP-LLR from an additive white Gaussian noise (AWGN) channel is initialized as given by  
\[LLR_{v}^{init}=log\frac{P(x_{v}=0|y_{v})}{P(x_{v}=1|y_{v})}=\frac{2y_{v}}{ \sigma^{2}}, \tag{1}\]  
where \(P(x_{v}=0|y_{v})\) represents the probability that \(x_{v}\) is equal to 0 and \(P(x_{v}=1|y_{v})\) represents the probability that \(x_{v}\) is equal to 1. The received signal from the channel is represented as \(y_{v}\) and channel noise variance is represented as \(\sigma^{2}\). In the \(it\)-th iteration, the variable-to-check messages are generated with the check-to-variable messages from the previous iteration and LLR as given by  
\[V_{v,c}^{it}=LLR_{v}^{it}-R_{c,v}^{it-1}. \tag{2}\]  
In the hardware implementation, the min-sum algorithm (MSA) [17] is employed for the update of check-to-variable messages because of the friendly implementation. It turns the complexity computations into the simple comparison operations at the cost of decoding performance degradations. MSA only needs to select two minimum messages from check nodes. The calculation of MSA is given by  
\[R_{c,v}^{it}=\prod_{v^{\prime}\in V_{c}\backslash v}sgn\left(V_{v^{\prime},c}^ {it}\right)\cdot\underset{v^{\prime}\in V_{c}\backslash v}{min}\left(\left|V_ {v^{\prime},c}^{it}\right|\right), \tag{3}\]  
where \(V_{c}\) denotes the group of variable nodes that connected to the check node \(c\) and \(V_{c}\backslash v\) represents the same group of variable nodes except the variable node \(v\). In order to improve the decoding performance, two improved min-sum algorithms were proposed in [18]. They use a correction factor to correct the magnitude of the two minimum values in the check-to-variable update. The offset min-sum algorithm (OMSA) subtracts a correction factor \(\beta\) from the two minimum values. The normalized min-sum algorithm (NMSA) uses a correction factor \(\alpha\) to multiply the two minimum values. The OMSA and NMSA are calculated as given by the two following equations  
\[R_{c,v}^{it}=\alpha\prod_{v^{\prime}\in V_{c}\backslash v}sgn\left(V_{v^{ \prime},c}^{it}\right)\cdot\underset{v^{\prime}\in V_{c}\backslash v}{min} \left(\left|V_{v^{\prime},c}^{it}\right|\right) \tag{4}\]  
\[R_{c,v}^{it}=\prod_{v^{\prime}\in V_{c}\backslash v}sgn\left(V_{v^{\prime},c}^ {it}\right)\cdot max\left(\underset{v^{\prime}\in V_{c}\backslash v}{min} \left(\left|V_{v^{\prime},c}^{it}\right|\right)-\beta,0\right). \tag{5}\]  
The APP-LLR of the variable node \(v\) is updated as the following equation  
\[LLR_{v}^{it}=V_{v,c}^{it}+R_{c,v}^{it} \tag{6}\]  
At the end of an iteration, the codeword \(C\) is decided based on the value of APP-LLR. If the APP-LLR of variable node \(v\) is no less than zero, the bit will be decided to be 0. If the APP-LLR of variable node \(v\) is negative, the bit will be decided to be 1. The decided codeword \(C\) and the parity-check matrix \(H\) then generate the syndrome \(S=C\times H^{T}\). Suppose that the LDPC decoder considers an early termination and the number of iterations is limited in the hardware implementation.