1. Introduction
Low-density parity check codes (LDPCs) [
1] have become one of the essential channel codes in many communication standards, such as DVB-S2 [
2], IEEE 802.11 (WiFi) [
3], IEEE 802.16e (WiMax) [
4], and including fifth-generation (5G) wireless technology [
5], because of their higher error correction capabilities, which are close to Shannon’s limit [
6,
7]. In 5G New Radio (NR) specifications, quasi-cyclic (QC) LDPC codes are selected as the channel coding scheme for data channels to achieve high throughput and low latency [
8]. These QC LDPC codes have adopted two base graph matrices (BGMs):
and
, and fifty-one lifting sizes or expansion factors
to support various code rates [
8].
has the dimension of 46 block rows and 68 block columns, and it supports code rates ranging from 1/3 to 8/9.
has a dimension of 42 block rows and 52 block columns and supports code rates from 1/5 to 2/3. The PCM
H is represented and constructed from its BGM
[
9]. A binary
LDPC code in 5G is characterized by the null space of parity check matrix (PCM)
H with dimension
over GF(2). The PCM is also visualized graphically as a bipartite Tanner graph [
10,
11]. A set of
M parity or check nodes of the Tanner graph represent the rows of
H, and a set of
N bit or variable nodes of the Tanner graph represent the columns of
H. The decoding of LDPC codes is done iteratively using the message-passing algorithm on its bipartite Tanner graph [
10]. For an example (6, 2) LDPC code, parity check matrix (PCM)
H and its Tanner graph are shown in
Figure 1. A Tanner graph comprises two types of nodes, one is bit or variable nodes (VNs)
,
,
,
,
,
and the other is parity or check nodes (CNs)
,
,
,
. These nodes are connected by bidirectional edges based on the number of ones in the PCM of the code.
Runtime flexibility of the decoder is desirable for decoding received messages associated with different BGMs of multiple code rates at runtime [
12]. Hence, the decoder dynamically switches between a given set of LDPC code rates with diverse BGMs. This decoder has various commercial applications, such as switching to a better-performing code rate automatically based on the channel conditions [
13] without the extra time needed to reprogram the FPGA. Another application is to eliminate the re-synthesis of the FPGA to test the performance of different code rates.
The specifications of 5G NR show that the BGM
can support a vast range of code rates from 1/3 to 8/9. In BGM, these code rates generate irregular node degrees. As a result of the irregular node degrees of BGM, complex connections are formed between the nodes of the Tanner graph of BGM. In BGM, these code rates generate irregular node degrees. As a result of the irregular node degrees of BGM, complex connections are formed between the nodes of the Tanner graph of BGM. The complex connections result in a more complicated inter-node routing network for typical fixed-point LDPC decoders, which are based on the sum-product algorithm (SPA) [
14] and the min-sum (MS) [
15] algorithm. These decoders use multiple-bit fixed-point representations of channel logarithmic-likelihood ratio (LLR) message values as inputs to decoder nodes that need multiple paths to exchange these values between the nodes. This condition aggravates an already very difficult inter-node routing network problem. This is due to the fact that the architecture of the decoder nodes necessitates the use of a large number of FPGA resources.
One alternative solution is stochastic decoding (SD) [
16]. In SD, initially, the channel LLRs are converted into equivalent channel probability values. After this conversion, these probability values are converted into an equivalent stochastic bit sequence by using a comparator, as shown in
Figure 2. This conversion helps stochastic bit sequences, which need a single path between the nodes for exchange rather than the multiple paths needed for nodes in conventional fixed-point decoders. This significantly helps to reduce the inter-node routing complexity of the decoder [
17]. The single bit-wise computations in stochastic variable node (SVN) and stochastic check node (SCN) units require simple logic units for the implementation. These stochastic LDPC decoders provide error correction capability comparable to traditional fixed-point decoders [
18]. The error correction capability of an LDPC decoder is determined by the signal-to-noise power ratio per bit
at the required bit error rate (BER), which is commonly stated in decibels. For the wireless personal area network (WPAN) [
19] standard (672, 336) LDPC code, the suggested stochastic decoder in [
18] has achieved a BER of
at an
value of 3.5 dB. This is in comparison to the normalized min–sum (NMS)-based decoder, which has achieved the same BER at an
value of 3.4 dB.
The number of node-interconnects (
I) of a decoder is calculated from (
1) to determine the routing complexity [
20].
N is codeword length, is extrinsic message length, and is column weight. For instance, 1/3-rate codeword length LDPC code having average column weight is decoded using SPA and SD. The number of node-interconnects required for SPA and SD are 138,916 and 34,729, respectively. The extrinsic message length = 1 for SD is responsible for the reduction of the number of node-interconnects in SD by a factor of four. On the other hand, the minimum value of for fixed-point LDPC decoders that use SPA is determined to be 4.
Our contributions:
This work’s main contribution is to propose a new partially parallel decoder architecture for bit-wise stochastic decoding for 5G NR standard LDPC codes. This architecture was created for the LDPC code, which has a code word length of N = 3808 and code rates of 1/3, 2/5, 1/2, 2/3, 3/4, 5/6, and 8/9 for BGM1.
Our proposed automated design flow procedure enables runtime flexibility in the design. It creates an optimal FPGA-based stochastic LDPC decoder design for any selected code rate set. This approach helps to reduce the time needed to design hand-coded interconnections in hardware description language (HDL).
This paper is structured as follows.
Section 2 introduces the basic concepts of stochastic decoding and its algorithm.
Section 3 focuses on constructing BGM of 5G NR standard QC LDPC codes suitable for stochastic decoders.
Section 4 provides architecture details. Design flow is discussed in
Section 5.
Section 6 discusses simulation results. Finally, the conclusion is noted in
Section 7.
3. Construction of BGM in 5G NR Standard
The PCM
H is represented and constructed from its BGM
[
9]. The
has dimension
, where
and
. The entries of
are expanded with a
square sub-matrix in
H, where
is known as the lifting size or expansion factor. The entry value ‘−1’ of
is replaced by a zero matrix of dimension
in
H, and the value ‘0’ is replaced by the identity matrix of dimension
, and another non-‘−1’ entry value
, also known as the shift value, is replaced by circulant permutation matrix
. The subscripts
represent the row index and column index of the entry, respectively. The sub-matrix
is obtained by each row of the identity matrix having a right-shift value of
positions. The value of
is calculated from the function (
5). The value of
is obtained from Tables 5.3.2-2 and 5.3.2-3 of 5G NR standard specification 3GPP TS 38.212 [
8] according to the selected BGM and the set index
.
In this paper, we constructed BGM of LDPC code having a message or information block length and code rate . The five steps are listed below for constructing the with as the length of the message block columns. The terms of and K of H are related, as .
From Step 5, the first entry
of
is calculated using
= mod (223, 56) = 55, where the selected
value is obtained from Table 5.3.2-2 [
8] and corresponds to row index
, column index
, and set index
. Similarly, the remaining entry values are calculated by using a function (
5) and
values obtained from Table 5.3.2-2 [
8] based on the entry’s row and column indexes.
Table 2 shows calculations of the corresponding values of a few entries of
. The constructed
has dimensions of
.
In order to achieve the desired information lengths and rate adaptation in 5G NR QC-LDPC codes, a process of shortening and puncturing is carried out. The characteristics of BGM1 are described in the
Table 3. The BGM
is shown in
Table 4.
4. Proposed Architecture
The suggested FPGA-based partially parallel stochastic decoder’s top-level design is presented in this section. It has runtime flexibility and the capability of decoding received messages corresponding to the set of seven code rates 1/3, 2/5, 1/2, 2/3, 3/4, 5/6, and 8/9 and codeword length N = 3808 for QC LDPC code compliant to the 5G NR standard. Initially, the architecture determines the maximum matrix dimensions, such as the number of block columns , the number of block rows , lifting size , column-weight , and row-weight , for this decoder from the supported code rate set. The architecture comprises various basic modules such as a stochastic variable node decoder (SVND), a stochastic check node decoder (SCND), BGM read-only memory (ROM), a controller unit, an intrinsic message memory unit (IMMU), and a routing network between modules SVND and SCND. These modules of the design are explained in the following subsections.
4.1. Layered Decoding Schedule
In partially parallel architectures, only a few SVNs and SCNs are instantiated simultaneously.
Figure 5 shows the proposed architecture that connects the SCND to the SVND. The SCND consists of
M D flip-flops, used as memory to store updated SCN messages received from SVND. Here,
M is the total number of SCNs of the Tanner graph of the decoded LDPC code. The architecture adopted shuffled iterative decoding [
26], in which the total number of block columns of the BGM is subdivided into vertical layers: each layer consists of one block column of BGM or
columns of the PCM, where
is the SVN parallelism factor; these columns are mapped as SVNs of the Tanner graph of the decoded LDPC code. Before the next vertical layer is processed, the SVNs of each layer are processed in parallel, and the results are used to update the connected SCNs. Using this scheduling, the 3808 columns of the 1/3-rate codeword length
LDPC code PCM are divided into
vertical layers: each layer consists of
columns. Accordingly, the proposed decoder has an SVND, which comprises
stochastic variable node processing units (SVNPUs), which function based on the SVN update. These units process a layer of
columns of the PCM during each clock cycle, with these updated values being written back to SCND immediately. Hence, each decoding cycle (DC) requires
clock cycles. Each DC creates one new bit in each stochastic bit sequence.
4.2. BGM ROMs
It is possible to regulate the routing and shifting of intrinsic and extrinsic messages between the routing network, SVNPUs, and SCNPUs by employing a set of ROM blocks that hold the location and shift values of non-‘−1’ entries of each BGM in a hardware-optimized form: the three ROMs, namely ROM1-location, ROM2-shift, and ROM3-weight. Firstly, the row indices of all non-‘−1’ entries within each block column of BGM are represented by the values in the ROM1-location. Second, ROM2-shift saves the shift value difference between each non-‘−1’ entry in each block column and the previous non-‘−1’ entry in the same block row. This value can be determined at design time and saved as described. Lastly, each block column of the BGM’s weight is stored in ROM3-weight. For the proposed architecture, all three ROMs contain locations, each with values: i.e., locations.
4.3. Routing Network
The routing network carries the single-bit SCN-to-SVN messages from the SCND registers to the SVNPUs in the SVND; these messages are updated and sent back to the SCND. This routing network combines separate modules called the ’multiplexer’ (MULX), ’interleaver’, ’distributor’, ’re-distributor’, and ’updater’. The functions of these blocks are explained later in this section. The maximum number of SCN-to-SVN message inputs needed for any SVNPU at any time is = 30, which is the maximum number of non-‘−1’ entries in any block column within the allowed code rate set.
4.3.1. Multiplexer
Using the row-index values kept in the ROM1-location, the MULX unit chooses
blocks of
bits from the SCND. However, instead of connecting each input to each output, this module requires fewer hardware resources by adopting the method of storing ROM1-location row-index values in ascending order [
27]. For instance, the block column of any BGM has weight
, such that
. All of the
values of ROM1-location are arranged so that the top
block row-indices of the non-‘−1’ entries in that block column are in ascending order, while the remaining
values are empty data. The multiplexer designed to support the seven LDPC BGMs of the allowed code rate set with maximum column weight
requires 210 connections. By using this method [
27], the number of connections decreased to 39% of those previously required.
4.3.2. Interleaver
The
MULX output blocks from the SCND are cyclically shifted by
parallel barrel shifters in the interleaver module based on shift values stored in ROM2-shift. Before being read by the SVND, a group of
messages of the sub-matrix must be converted from a row-centric to a column-centric representation based on the corresponding shift value in BGM
by a barrel shifter. Each barrel shifter has
inputs and outputs because the shift value can be any integer between 0 and
. The hardware description language (HDL) used for the BSs integrated with the proposed flexible decoder architecture is customised for the supported BGMs during the design phase. The choice of multiplexer input for every BGM is influenced by the expansion factor
value linked to the corresponding BGM based on the cyclic shift decomposition algorithm mentioned in [
28].
4.3.3. Distributor and Re-Distributor
The distributor takes = 30 blocks of bits from SCND and performs a rearrangement process to form blocks of = 30 bits. The pipeline registers may optionally latch these blocks before the SVND processes them. After undergoing SVND processing, the resulting blocks of = 30 bits are again subjected to a similar rearrangement process by the re-distributor to form = 30 blocks of bits.
4.3.4. Pipeline Registers
Stochastic layered decoding involves binary operations, causing each layer’s message updates to either alter or leave prior layer updates unchanged. The decoding schedule needs to store updates from each previous layer before moving on to the next. Adding a single pipeline stage to the suggested architecture can sometimes improve BER performance without negatively impacting the decoding process. In some BGMs, a column-wise permutation occurs, allowing for column-orthogonality in block columns. Adding a pipeline stage during the data path does not negatively impact decoding performance when processed in this order [
27]. If a permutation is not found, introducing a few
vacant stall layers among non-orthogonal columns can be developed. Finding the necessary minimum values of
for each BGM and adding this supplementary pipeline stage is advantageous. Decreasing the number of block rows while keeping the number of block columns constant can enhance the coding rate. Simulations show that high-rate codes require more
vacant stall layers among non-orthogonal columns compared to low-rate codes.
4.3.5. Updater
Using the values from the ROM1-location, this component transfers these = 30 blocks of bits back into the SCND at the proper location. Moreover, the ROM3-weight is utilized in this case to guarantee that only the most recent values are written, removing any potential interference from non-‘−1’ entries or “don’t care” data. As D-flip-flops are being used to implement the SCND, each layer can be written right away.
4.4. Stochastic Variable Node Decoder (SVND)
The SVND module contains parallel stochastic variable node processing units (SVNPUs). These SVNPUs can process one block column of the BGM . Hence, each SVNPU processes one column of the PCM. Each SVNPU has multiple inputs and outputs equal to , where is the highest column weight in the supported BGM code rate set. The extra input and output are utilized, respectively, for channel-intrinsic messages and the estimation of the decoded bit. It is essential to consider that the largest number of inputs and outputs must be taken into account to guarantee that each SVNPU can decode any arbitrary column-weight column in the code rate set. The SVND accepts the maximum SVN weight input bits from the connected SCNs and an intrinsic bit from the intrinsic message memory unit (IMMU). By considering such values, SVND implements the SVN update operation, and the updated extrinsic values are sent to the corresponding SCNPUs.
Stochastic Variable Node Processing Unit (SVNPU)
In this stochastic architecture, the chance of SVNPU output being in the hold state increases as inputs to SVNPU increase [
24]. The SVNPU forces the current output to continuously repeat the previous output over a certain period when the two input bits of the SVNPU are not equal, known as the hold state of the SVNPU [
25]. Due to this state, the decoder is unable to make correct decisions. It interrupts the decoder convergence, and its bit error rate (BER) performance degrades. Hence, the architecture of high-column-weight SVNPU is built using low-weight sub-nodes with memory blocks; typically,
sub-nodes are employed.
As shown in
Figure 6 [
24], the column-weight
SVNPU is constructed using two column-weight
and one
sub-nodes. The memory blocks are internal memory (IM), which has a length of
bits for each sub-node, and edge memory (EM), which has a length of
bits at the output edge. The critical role of EM and IM is to minimize the correlation produced by the hold state in a stochastic sequence and disrupt the correlation of the stochastic sequence by randomizing stochastic bits [
29]. We used a dual-tree design [
27] to build a high-column-weight SVNPU that would be flexible enough to handle any active inputs and outputs up to the maximum
, which is a power of two. For instance, column weight
of SVNPU has
inputs and outputs. As a result, the adopted SVNPU dual-tree design requires a total of
sub-nodes. Two significant components, summing and combining, each with
stages, make up the dual-tree structure.
4.5. Control Unit
The control unit of the decoder manages internal and external control signals, including commands to stop or proceed with the iterative decoding. A new group of -bit intrinsic probabilities may need to be loaded into the IMMU, and this can be indicated by the LOAD signal. The decoder must decode a new frame, and all modules must be reset to their default conditions using the RESET signal. The ability of the proposed architecture to swap the current BGM to decode the message contained in the IMMU during a single clock cycle is one of its essential characteristics. The supporting BGMs are parameterised in ROMs at compile-time to enable this flexibility level. The process of decoding is started and maintained by the START signal. As long as this signal is active, the decoder keeps doing iterative decoding; the decoding operation is stopped once if the START signal is absent.
5. Design Flow
For instance, a QC LDPC code with a codeword length of N = 3808 and a code rate of R = 1/3 that complies with the 5G NR standard has a BGM with the dimensions . This BGM has 308 non-‘−1’ entry values, which is equal to 68 × 4.52, and an average variable node degree of 4.52. The BGM forms the basis for the representation and construction of the PCM H. Therefore, the calculation for non-zero entries in the PCM is determined by multiplying 308 by 56, which equals 17,248, where = 56 is the lifting size or expansion factor. Consequently, this results in twice the 17,248 interconnections that exist between the variable and check nodes of the decoder, which makes the structure extremely complicated. Modelling these thousands of interconnections in hardware description language (HDL) takes at least thirty minutes. This modelling is extremely time-consuming when dealing with a partially parallel architecture. The process of simulating and debugging the hand-coded HDL model is both extremely challenging and time-consuming, respectively. The process of modelling the decoder with a different code length turns out to be an activity that is both unproductive and repetitive. Because of this, automating the design flow to remove repetitive and redundant tasks requires an efficient design methodology. The above-mentioned problems were solved by creating an automation tool in MATLAB using the C++ programming language; the tool takes less than a minute to generate connections between the nodes of the proposed decoder.
This section outlines the suggested design flow, which enables the automated flexibility in design and creates an optimal FPGA-based stochastic LDPC decoder for a selected set of 5G QC LDPC codes. The flowchart in
Figure 7 depicts the design flow. In the first step, the construction of the required code rate BGM set is based on the user inputs like message length, code rate, and lifting sizes of the 5G LDPC code. The second step has two tasks: The first task entails determining the decoder’s parameters, such as the maximum of the matrix dimensions and weights, namely
,
,
,
, and
, which describe the chosen set of supported BGMs. Based on lifting size
, it is possible to determine the parallelism factor
from these. For the
LDPC code rate set, the maximum values are
,
,
,
, and
. Another task is to extract the positions and shift values of the non-‘−1’ entries in each BGM and arrange them consistent with the ROMs. Considering the parameters derived in the earlier step, the design flow utilizes a high-level synthesis (HLS) tool [
30] to produce the hardware description language (HDL) SystemVerilog code for the suggested architecture written in the high-level language C++. After register transfer level (RTL) modelling of the decoder, it is synthesized using the Xilinx synthesis tool to measure the hardware requirements of the decoder. The bit error rate (BER) simulations have been implemented on the FPGA test setup.