# Efficient Layered Parallel Architecture and Application for Large Matrix LDPC Decoder
## 2 Materials and Methods
### Quantization  
Quantization is an important part of circuit hardware design. In addition, the analysis of the impact of quantization on the LDPC algorithm helps to optimize the design and implementation of the decoder circuit. For value \(k\), quantization is performed as in Equation (7), where \(k\) is multiplied by a factor \(1/\Delta_{k}\) for linear mapping, and then the fractional part is discarded to obtain an integer. In addition, since the bit width is finite, the number of symbols it can represent is limited, so it is necessary to limit the amplitude of \(k\), as in Equation (8), where \(Q_{k}\) represents the maximum amplitude that can be represented by quantization. For \(q\) bits quantization, the set of values that can be represented by the binary complement is \(\{-2^{q-1},-2^{q-1}+1,\ldots,2^{q-1}-1\}\); the set of values represented by the original binary code is \(\{-2^{q-1}+1,-2^{q-1}+2,\ldots,2^{q-1}-1\}\). Since the absolute value of CN is needed to find the minimum value, there are two representations in the circuit at the same time. In order to ensure that no error is generated when converting the two representations to each other, the maximum magnitude \(Q_{k}=2^{q-1}-1\) is taken. \[Quant(k)=\left[\frac{k}{\Delta_{k}}\right] \tag{7}\]  
\[Limit(k^{{}^{\prime}})=\left\{ \begin{array}{ll}Q_{k}\times sign\Big{(}k^{{} ^{\prime}}\Big{)}&\left|k^{{}^{\prime}}\right|\geq Q_{k}\\ k^{{}^{\prime}}&\left|k^{{}^{\prime}}\right|<Q_{k}\end{array} \right. \tag{8}\]  
Overflows in the hardware implementation also introduce errors between the algorithm and the hardware. From Equation (4), the VN read from the memory is 6 bits, but the updated VN needs to be represented by 8 bits; so, it needs to go through another overflow processing, and the actual VN update equation in hardware can be obtained as follows:  
\[Q_{n}^{{}^{\prime}}=Limit(Q_{n}+R_{m^{{}^{\prime}}n}-R_{mn}) \tag{9}\]  
Obviously, in this case, there is a gap between the value obtained in the hardware circuit and the theoretical value of the algorithm, with a theoretical maximum error of up to \(22.5=\alpha\times 2\times(2^{5-1}-1)\) for \(\alpha=0.75\). When the decoder is in the first and middle stages of the decoding iteration, most of the VN magnitudes and CN information magnitudes in the hardware are relatively small, and the introduced errors are small and almost negligible. However, at the later stages of the decoding iteration, the decoder tends to converge, and most of the VN magnitudes and CN magnitudes are already large, and the introduced errors are not negligible. If the decoder does not successfully decode in a short time, it may lead to a large increase in error bits in the decoding result. Figure 1 shows how the number of erroneous bits varies with iterations in the decoding process of the layered decoder considering quantization and overflow, where the horizontal \begin{table}
\begin{tabular}{l l l} \hline \hline  & **Normal** & **Reordered** \\ \hline  & read \(\Lambda_{n}\) & read \(Q_{n}\) \\  & calc \(Q_{m^{{}^{\prime}}n}\) & calc \(\Lambda_{n}\) \\ \(m\)th row & calc \(R_{m^{{}^{\prime}}n}\) & \(calcQ_{n}^{{}^{\prime}}\) \\  & calc \(\Lambda_{n}\) & write \(Q_{n}^{{}^{\prime}}\) \\  & write \(\Lambda_{n}^{{}^{\prime}}\) & calc \(R_{m^{{}^{\prime}}n}\) \\ \hline  & read \(\Lambda_{n}^{{}^{\prime}}\) & read \(Q_{n}\) \\  & calc \(Q_{m^{{}^{\prime}}n}\) & calc \(\Lambda_{n}\) \\ \(m^{{}^{\prime}}\)th row & calc \(R_{mn}\) & \(calcQ_{n}^{{}^{\prime\prime}}\) \\  & calc \(\Lambda_{n}^{{}^{\prime\prime}}\) & write \(Q_{n}^{{}^{\prime\prime}}\) \\  & write \(\Lambda_{n}^{{}^{\prime\prime}}\) & calc \(R_{mn}\) \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Comparison of reordered flow. coordinate is the number of subiterations, and the vertical coordinate is the bit error number remaining in hard decision. As the subiterations proceed, the number of erroneous bits in the code word decreases first, and then it remains relatively stable after decreasing to the minimum value, then increasing sharply later.