0% found this document useful (0 votes)
249 views11 pages

Error Correction in NAND Flash Memory

The document is a project report on implementing error correction for NAND flash memory in solid state drives using LDPC (Low Density Parity Check) codes. It describes a system using an LDPC encoder and decoder, with a noise adder in between to simulate errors during transmission. The encoder uses a regular parity check matrix to generate codewords. The decoder implements a bit flipping algorithm to iteratively detect and correct errors by passing messages between variable and check nodes in the Tanner graph. The project involves developing VHDL modules for the LDPC encoder, noise adder and decoder, and integrating them in a top-level module to perform error correction on 8-bit inputs.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
249 views11 pages

Error Correction in NAND Flash Memory

The document is a project report on implementing error correction for NAND flash memory in solid state drives using LDPC (Low Density Parity Check) codes. It describes a system using an LDPC encoder and decoder, with a noise adder in between to simulate errors during transmission. The encoder uses a regular parity check matrix to generate codewords. The decoder implements a bit flipping algorithm to iteratively detect and correct errors by passing messages between variable and check nodes in the Tanner graph. The project involves developing VHDL modules for the LDPC encoder, noise adder and decoder, and integrating them in a top-level module to perform error correction on 8-bit inputs.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Department of Electrical Engineering, IIT Bombay

EE 705 - VLSI Design Lab

Project Report

Error Correction for NAND Flash


Memory in Solid State Drives

Prepared by:
Aayush Shrivastava (19D070002)
Jay Vijay Sonawane (19D070026)
Kimaya Shikarkhane (19D070053)
Siddhant Shingade (19D070057)
Instructor: Prof. Sachin Patkar
Date: August 16, 2023
Contents
1 Introduction 1

2 System Design 1
2.1 LDPC Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
2.2 Encoder Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
2.3 Decoder Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

3 Implementation 3

4 Decoding Algorithm Used 4

5 Simulation and Results 5

6 Openlane Implementation 7

7 Static Time Analysis 9

8 Video Links 9

9 References 9

I
1 Introduction
LDPC (Low Density Parity Check) codes are a type of error-correcting code that
can be used to detect and correct errors in digital communication systems. One of the
most popular decoding algorithms for LDPC codes is the bit flipping algorithm, which
is an iterative algorithm that passes binary messages between variable nodes and check
nodes in the Tanner graph representation of the code.

In the bit flipping algorithm, the received codeword is initially assumed to be error-
free, and the algorithm starts by calculating the parity of the received word using the
parity check matrix of the LDPC code. If the parity check fails, the algorithm attempts to
flip some of the bits in the received codeword to correct the error. The algorithm continues
iterating until either the maximum number of iterations is reached or the parity check
passes.

In each iteration, the algorithm selects a variable node and flips the value of its
corresponding bit if it reduces the number of unsatisfied parity checks. The algorithm
then updates the parity check equations to reflect the changes made to the variable nodes.
This process is repeated for all variable nodes until the maximum number of iterations is
reached, or the parity check passes.

The bit flipping algorithm has a lower computational complexity compared to other
decoding algorithms for LDPC codes such as belief propagation, and it can achieve a
good balance between performance and complexity. However, the performance of the
bit flipping algorithm is sensitive to the initial assumption of the received word, and the
convergence rate can be slow for certain codes.

2 System Design
The system consists of an encoder and decoder. We will be using a AWGN channel,
to mimic the generation of errors in the encoded word. The decoder on the other end
should be able to decode correctly even in the presence of errors.

Figure 2.1: System Design Flowchart (from reference paper)

2.1 LDPC Algorithm


A word is encoded in the following way:-

C = UG

1
Where U is the block of information bits and G is the generator matrix. A valid codeword
can be verified using
HCT = 0
Where H is the parity check matrix. If the result is nonzero, the codeword C is invalid
and an error correction procedure should be used in this case.

2.2 Encoder Design


The encoder uses a regular matrix to create the generator matrix. Regular matrix
is one in which column weight Wc is same for all columns and row weight is given by
Wr = Wc (n/m). In this project, regular parity matrix size of 8x16 for coding 8-bit
message blocks has been used. The we use the following H matrix in it’s standard form
 
1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0
 
0 1 0 1 1 1 1 0 0 1 0 0 0 0 0 0
 
 
 
1 0 1 1 1 0 1 1 0 0 1 0 0 0 0 0
 
 
 
0 1 0 1 1 1 1 1 0 0 0 1 0 0 0 0
H= 



0 0 1 0 1 0 0 0 0 0 0 0 1 0 0 0
 
 
 
0 0 1 1 1 0 1 0 0 0 0 0 0 1 0 0
 
 
0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0
 
 
 
0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 1

The encoder finds the generator matrix (G) using this code and then the information
message bits are coded by multiplying message blocks with generator matrix to obtain
the codeword’s, i.e. C= [U][G]

2.3 Decoder Design


The LDPC architecture is designed to use the Bit Flipping decoding technique for
error correction. When a codeword is received, it is checked for errors, and if any errors
are found, they are corrected using the Bit Flipping algorithm. The messages passed
along the edges of the Tanner graph in this algorithm are binary. At first, a bit node
sends a message declaring whether it is a one or a zero, and each check node sends a
message to each connected bit node, declaring what value the bit should be based on the
information available to the check node. The check node determines if its parity-check
equation is satisfied if the modulo 2 sum of the incoming bit values is zero. If a bit node
receives a majority of messages that differ from its current value, the bit node flips its
value.

2
Figure 2.2: Decoder block diagram (from reference paper)

3 Implementation

Figure 3.1: Blocks to be implemented

Input : An 8 bit input is used here. It is encoded and then noise is added to the
input. A decoder is then used to decode and apply noise correction algorithm. We expect
the output to be the same as the input.

LDPC encoder module: This module performs the LDPC encoding algorithm to
the data.

Noise Adder: This module mimics the noise added during transmission.

LDPC decoder module: This module performs the LDPC decoding of the encoded
data. It includes input and output ports for the encoded input and decoded output
signals, as well as the parity-check matrix and encoding of the FIR filter output. It
includes input and output ports for the input and encoded output signals, as well as
the parity-check matrix and the encoding algorithm. The VHDL code performs the
encoding calculations, which involve generating a parity-check matrix based on the filter
output and applying the LDPC encodithe decoding algorithm. The VHDL code performs

3
the decoding calculations, which involve applying the LDPC decoding algorithm to the
encoded data and generating the decoded output.

Top-level module: This module integrates the FIR filter moduleNoise adder with
the LDPC encoder and decoder modules. It includes input and output ports for the filter
input and output signals, as well as the filter coefficientsnoise, the parity-check matrix,
and the LmDPC encoding and decoding algorithms. The VHDL code coordinates the
operation of the filternoise, encoder, and decoder modules to perform the desired signal
processing operations.

4 Decoding Algorithm Used


1. We Use a version of Bit Flipping Algorithm.

2. We receive the 16 bit encoded input that has some noise added to it.

3. We assign the received message to the 16 variable nodes of the tanner graph.

4. We compute the check node values from the variable node values. The parity
matrix or the tanner graph exactly tells us how the check nodes are connected to
the variable nodes. In this project, each check node is connected to 4 variable nodes
and each variable node is connected to two check nodes.

5. Once we have computed all the check node values, we check if all values are 0. If all
of them are 0, then we don’t have any error. We directly provide the [Link]
output is the first 8 MSB bits of the received message.

6. If the values are not zero, then we compute the maximum occurrence value. Since
each variable node is connected to two check node we all together have 3 values or
bits; 2 from the connected check nodes and one stored in the variable node. If out
of these 3 bits, two are 0 then variable node is assigned 0; if two of them are 1 then
variable node is assigned 0.

7. Doing this for each variable node flips the variable node bit if there is an error
i.e. when the check node values are equal are different from that stored in variable
node.

8. After correction we provide the [Link] output is the first 8 MSB bits of the
received message.

9. Hence, 6.66 % error in the received bit stream can be corrected easily with this
method.

4
5 Simulation and Results

Figure 5.1: Encoder Netlist

Figure 5.2: Decoder Netlist

5
Figure 5.3: Combining the modules

Figure 5.4: Top module netlist

6
Figure 5.5: Encoder Simulation

Figure 5.6: Decoder for error message

Figure 5.7: Decoder for message with no error

6 Openlane Implementation
Since our code is in VHDL, we had to use vhdl to verilog convertor to implement on
OpenLane. Thus we have synthesised the Encoder block over here.

7
Figure 6.1: Successful synthesis in Openlane

Figure 6.2: Encoder Layout

8
7 Static Time Analysis

Figure 7.1: STA Report

8 Video Links
1. Simulation

2. Xen10 Board Implementation

3. OpenLane Colab Code

9 References
1. FPGA Implementation of LDPC Encoder and Decoder using Bit Flipping Algorithm:B.
Sai Reddy1 , V. Seetha Rama Rao2

2. LDPC — low density parity check code | by EventHelix | 5G NR | Medium

3. .Low-Density Parity-Check Codes: Construction and Implementation

4. Low-Density Parity Check (LDPC)

Common questions

Powered by AI

The system designed for error correction in NAND flash memory consists of an encoder, decoder, and a noise adder. The encoder uses a regular matrix to create the generator matrix, and message blocks are encoded by multiplying them with this generator matrix . The noise adder mimics noise typically encountered during data transmission. The LDPC decoder uses the Bit Flipping algorithm, where binary messages are passed between variable and check nodes in a Tanner graph representation. This algorithm attempts to correct any errors by flipping bits based on certain criteria until the parity check passes or the maximum number of iterations is reached . Together, these components ensure that errors introduced during transmission are corrected effectively, maintaining data integrity .

The transition from VHDL to OpenLane involves several integration challenges. First, VHDL to Verilog conversion is required since OpenLane is based on Verilog. This requires careful handling of differences between the two hardware description languages. Next, synthesizing the Encoder block involves ensuring that the design constraints are respected and that the resultant Verilog code maintains functional equivalency with the original VHDL design. This process must consider the practical constraints of OpenLane's synthesis tools and the target technology library, which may impose additional constraints and optimizations .

The encoder and decoder simulations validate the design process by demonstrating that the encoded output matches the expected codeword after being subjected to simulated noise and that the decoder can effectively correct errors. Simulation tests, such as those shown in figures for the encoder and decoder netlists and simulations for error-free and error-containing messages, ensure that the implementation behaves correctly under expected conditions. These simulations also help identify potential design flaws and verify that design specifications are met, providing confidence in the system's robustness and reliability .

Tanner graphs are crucial to the Bit Flipping algorithm in LDPC systems as they represent the relationship between variable nodes (bits) and check nodes (parity checks). Each variable node is connected to multiple check nodes, and messages are passed along these edges. During decoding, each bit node sends its current belief (0 or 1) to connected check nodes, which respond with parity information based on their connected variable nodes. If a majority of messages received by a variable node differ from its current state, its bit value is flipped. This iterative process continues until all parity check equations are satisfied or maximum iterations are reached, effectively correcting errors indicated by the graph structure .

In the LDPC algorithm, a valid codeword is verified by checking if its product with the transposed parity-check matrix (HCT) equals zero (HCT = 0). If this check results in a non-zero value, the codeword is deemed invalid, indicating errors. In such cases, an error correction procedure is initiated, which could involve algorithms like Bit Flipping, where the algorithm iteratively adjusts the bits to satisfy the parity checks until the correct codeword is obtained or the maximum iterations are reached .

The LDPC encoder in this system uses a regular matrix to create the generator matrix, ensuring that each column has the same weight (Wc), with row weight given by Wr = Wc(n/m). This creates a balanced regular structure that simplifies encoding. For an 8-bit message block, a regular parity check matrix of size 8x16 is employed. The valid codeword is generated by multiplying the message block with this generator matrix (C = UG). This approach ensures efficient encoding by leveraging the structured properties of the regular matrix, leading to streamlined operations without compromising data integrity .

The Bit Flipping algorithm, despite its computational efficiency, has several limitations. Its performance is highly sensitive to the initial assumption of the received codeword being error-free. If this assumption is incorrect, the algorithm may take more iterations to converge, or might not converge at all, particularly for certain LDPC codes where the error patterns are not easily correctable by simple bit flips. Additionally, the convergence rate can be slow, which affects the decoding speed, making it less suitable for real-time applications that require rapid data processing .

Static Time Analysis (STA) is pivotal for design verification in VLSI implementations of LDPC systems as it ensures that the design meets timing constraints, which are critical for high-speed operations. STA checks if all paths in the design can propagate signals within the specified clock period, helping detect and rectify any timing violations early in the design process. This analysis facilitates optimizations in the design architecture, such as load balancing and clock tree synthesis adjustments, ensuring that the decoder and encoder operations are efficiently synchronized and can handle the data rates demanded by applications like NAND flash memory .

The Bit Flipping algorithm is an iterative process used in LDPC codes for error correction. Initially, an assumption is made that the received codeword is error-free. The parity of the word is checked, and if the check fails, the algorithm tries to flip certain bits to correct the errors. In each iteration, it selects a variable node and flips its bit if this reduces the number of unsatisfied parity checks. This process continues for all variable nodes until a parity check passes or the maximum iterations are reached . The algorithm is more computationally efficient than belief propagation but is sensitive to initial conditions and can have slow convergence for some codes .

Implementing LDPC codes on real hardware may require synthesizing into different formats or systems due to compatibility and optimization considerations. Hardware description languages have different features and support across platforms, necessitating conversion, as seen when transitioning from VHDL to Verilog for use with tools like OpenLane. Each format or system, including FPGA or ASIC implementations, may demand specific optimizations or adaptations to meet timing, area, and power constraints, ensuring the design aligns with hardware capabilities. This synthesis process is essential for achieving efficient, reliable, and economical real-world deployments .

You might also like