An encoding method and apparatus for NAND flash memory
By constructing a displacement matrix and expanding the global matrix, the problem of high encoding complexity in existing NAND flash memory encoding technology is solved, and a low-complexity encoding process is achieved.
Patent Information
- Application Number
- CN202410768432.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-14
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2044-06-14
AI Technical Summary
Existing encoding technology for NAND flash memory requires the use of traditional Gaussian elimination method for encoding, resulting in extremely high encoding complexity.
By obtaining the finite field basis matrix and constructing the displacement value matrix using preset prime powers and primitive elements, the local basis matrix is expanded based on the data of the row and column indices of the previous preset matrix in the displacement value matrix to determine the local sparse parity check matrix and the local identity matrix, constructing the target local matrix, and expanding the global basis matrix through the displacement value matrix to determine the global sparse parity check matrix, finally generating the target code, avoiding the use of the traditional Gaussian elimination method.
The coding complexity is reduced, and a low-complexity coding process is achieved.
Smart Images

Figure CN118642887B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of wireless communication technology, and in particular to a coding method and device for NAND flash memory. Background Art
[0002] With the rapid development of NAND flash technology, the number of bits of information that can be stored in a NAND flash cell has increased, evolving from SLC (Single Level Cell) to MLC (Multi-Level Cell), TLC (Trinary-Level Cell), and even QLC (Quad-Level Cell). To further increase the storage density of flash memory, the manufacturing process of NAND flash memory has completely transitioned from 2D planar technology to 3D vertical stacking technology. The increase in storage density has greatly reduced the unit cost of flash memory, but it also makes flash memory cells more susceptible to various noises, which poses a major challenge to the reliability of NAND flash memory.
[0003] Error correction code (ECC) technology is an effective means of improving the reliability of stored data. Bose-Chaudhuri-Hocquenghem (BCH) codes were initially adopted in SSD (Solid State Disk) controllers, using hard-decision decoding. However, BCH codes have limited error correction capabilities and cannot address excessively high raw bit error rates (RBERs). In recent years, low-density parity-check (LDPC) codes have been widely used to ensure data reliability due to their progressive soft-decision decoding and powerful error correction capabilities. Furthermore, the globally coupled-low density parity check (GC-LDPC) code, proposed by Juane Li et al., utilizes full-element matrices to construct the modulus matrices of the GC-LDPC code's global and local matrices, and uses a finite field to construct the displacement value matrix, offering a highly flexible decoding approach.
[0004] Most existing encoding technologies for NAND flash memory apply GC-LDPC codes to flash memory channels, constructing short LDPC codes that are then linked together through a global parity check matrix. The resulting longer GC-LDPC codes complete the encoding process. However, this process requires the use of traditional Gaussian elimination, and the parity check matrix structure of GC-LDPC codes is not conducive to encoding, resulting in extremely high encoding complexity. Summary of the Invention
[0005] The present invention provides a coding method and device for NAND flash memory, which are used to solve the technical problem that the existing coding technology for NAND flash memory needs to use traditional Gaussian elimination method for coding, resulting in extremely high coding complexity.
[0006] A first aspect of the present invention provides an encoding method for a NAND flash memory, comprising:
[0007] Obtaining a finite field basis matrix, and constructing a displacement value matrix using a preset prime power, a preset primitive element, and the finite field basis matrix;
[0008] Expanding a preset local basis matrix based on matrix row and column data of the previously preset matrix row and column sequence numbers in the displacement value matrix to determine a local sparse check matrix and a local identity matrix;
[0009] Constructing a target local matrix using the local sparse check matrix, the local identity matrix and a preset all-zero matrix;
[0010] Expanding a preset global basis matrix using target matrix row and column data in the displacement value matrix to determine a global sparse check matrix;
[0011] Using the global sparse check matrix and a preset identity matrix, constructing a target global matrix;
[0012] A target code is generated according to the information bit matrix of the codeword to be encoded, the target global matrix and the target local matrix.
[0013] Optionally, the step of expanding a preset local basis matrix based on matrix row and column data of previously preset matrix row and column sequence numbers in the displacement value matrix to determine a local sparse check matrix and a local identity matrix includes:
[0014] Selecting matrix row and column data of previously preset matrix row and column sequence numbers in the displacement value matrix;
[0015] Using the matrix row and column data of the preset matrix row and column sequence numbers, perform cyclic permutation matrix expansion on the matrix column data of the preset first extended matrix column sequence numbers in the preset local base matrix to determine a local sparse check matrix;
[0016] An all-zero displacement value expansion is performed on the matrix column data of the second extended matrix column sequence number position preset after the preset local basic matrix to determine a local unit matrix.
[0017] Optionally, the preset global basis matrix includes a first global basis matrix, a second global basis matrix, a third global basis matrix, and a fourth global basis matrix; the target matrix row and column data includes first target matrix row and column data and second target matrix row and column data; and the step of extending the preset global basis matrix using the target matrix row and column data in the displacement value matrix to determine the global sparse check matrix includes:
[0018] Performing cyclic permutation matrix expansion on the first global basis matrix and the second global basis matrix using the row and column data of the first target matrix to determine a first global sparse check matrix and a second global sparse check matrix;
[0019] The third global basis matrix and the fourth global basis matrix are respectively expanded by cyclic permutation using the row and column data of the second target matrix to determine a third global sparse check matrix and a fourth global sparse check matrix.
[0020] Optionally, the step of generating a target code according to the information bit matrix of the codeword to be encoded, the target global matrix, and the target local matrix includes:
[0021] Calculating a first check bit matrix and a second check bit matrix according to the target global matrix, the target local matrix, and the information bit matrix of the codeword to be encoded using a preset check formula group;
[0022] The first check bit matrix, the second check bit matrix, and the information bit matrix of the codeword to be encoded are used to generate a target code.
[0023] Optionally, the finite field basis matrix is specifically:
[0024]
[0025] Among them, B is the finite field basis matrix; α is the primitive element; q is the power of the prime number.
[0026] Optionally, the preset verification formula group is specifically:
[0027]
[0028] Among them, P1 is the first check bit matrix; L is the first local submatrix in the target local matrix; U is the information bit matrix of the codeword to be encoded; P2 is the second check bit matrix; G is the first global submatrix in the target global matrix; G' is the second global submatrix in the target global matrix.
[0029] A second aspect of the present invention provides an encoding device for a NAND flash memory, comprising:
[0030] An acquisition module, configured to acquire a finite field basis matrix and construct a displacement value matrix using a preset prime power, a preset primitive element, and the finite field basis matrix;
[0031] A determination module, configured to expand a preset local basis matrix based on matrix row and column data of a previously preset matrix row and column sequence number position in the displacement value matrix, and determine a local sparse check matrix and a local identity matrix;
[0032] A first construction module is configured to construct a target local matrix using the local sparse check matrix, the local identity matrix, and a preset all-zero matrix;
[0033] An expansion module, configured to expand a preset global basis matrix using target matrix row and column data in the displacement value matrix to determine a global sparse check matrix;
[0034] A second construction module is configured to construct a target global matrix using the global sparse check matrix and a preset identity matrix;
[0035] The generating module is used to generate a target code according to the information bit matrix of the codeword to be encoded, the target global matrix and the target local matrix.
[0036] A third aspect of the present invention provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the encoding method for NAND flash memory as described in any one of the above items.
[0037] A fourth aspect of the present invention provides a computer-readable storage medium having a computer program / instruction stored thereon, which, when executed by a processor, implements the steps of the encoding method for NAND flash memory as described in any one of the above items.
[0038] A fifth aspect of the present invention provides a computer program product, comprising a computer program / instruction, which, when executed by a processor, implements the steps of any one of the above-described encoding methods for NAND flash memory.
[0039] It can be seen from the above technical solutions that the present invention has the following advantages:
[0040] The above technical solution of the present invention provides an encoding method for NAND flash memory, which obtains a finite field basis matrix and constructs a displacement value matrix using preset prime powers, preset primitive elements and a finite field basis matrix; based on the matrix row and column data of the row and column sequence numbers of the previous preset matrix in the displacement value matrix, the preset local basis matrix is expanded to determine the local sparse check matrix and the local unit matrix; the local sparse check matrix, the local unit matrix and the preset all-zero matrix are used to construct a target local matrix; the preset global basis matrix is expanded by the target matrix row and column data in the displacement value matrix to determine the global sparse check matrix; the target global matrix is constructed using the global sparse check matrix and the preset unit matrix; the target code is generated according to the information bit matrix of the codeword to be encoded, the target global matrix and the target local matrix; based on the above solution, the preset local basis matrix and the preset global matrix are expanded based on the displacement value matrix, and the target code is generated according to the obtained target global matrix and target local matrix. This process does not require the use of traditional Gaussian elimination method for encoding, thereby reducing the encoding complexity. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0042] Figure 1 A flowchart of a method for encoding a NAND flash memory provided by an embodiment of the present invention;
[0043] Figure 2 A schematic diagram of the structure of a preset local basis matrix provided in an embodiment of the present invention;
[0044] Figure 3 A schematic diagram of the structure of a target local matrix and a target global matrix after CPM expansion processing provided by an embodiment of the present invention;
[0045] Figure 4 Schematic diagram of the structure of the target local matrix and the target global matrix without CPM expansion processing provided by the embodiment of the present invention
[0046] Figure 5 A flowchart of another encoding method for NAND flash memory provided by an embodiment of the present invention;
[0047] Figure 6 A structural block diagram of an encoding device for NAND flash memory provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0048] The embodiments of the present invention provide a coding method and device for NAND flash memory, which are used to solve the technical problem that the existing coding technology for NAND flash memory needs to use traditional Gaussian elimination method for coding, resulting in extremely high coding complexity.
[0049] In order to make the purpose, features, and advantages of the present invention more obvious and easy to understand, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described below are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0050] See also Figure 1 , Figure 1 A flowchart of a method for encoding a NAND flash memory provided by an embodiment of the present invention.
[0051] The present invention provides a coding method for NAND flash memory, comprising:
[0052] Step 101: Obtain a finite field basis matrix, and construct a displacement value matrix using preset prime powers, preset primitive elements, and the finite field basis matrix.
[0053] It should be noted that the present invention considers the NB (nonbinary) finite field GF(q), where q is a power of a prime number, and α is the primitive element of GF(q). The power of α can be expressed as α ∞ =0,α 0 =1,α,…,α q-2 , these elements represent all elements on GF(q), and α q-1 =α 0 =1, thus the expression of the finite field basis matrix of (q-1)×(q-1) in GF(q) can be expressed as:
[0054]
[0055] Among them, B is the finite field basis matrix; α is the primitive element; q is the power of the prime number.
[0056] Based on the above foundation, the present invention uses a non-binary finite field GF(139) to construct a displacement value matrix. Specifically, the preset prime power is set to 139, the preset primitive element is set to 3, and the preset prime power is substituted into the expression of the above finite field base matrix to obtain the displacement value matrix, wherein the displacement value matrix S is specifically:
[0057]
[0058] In this embodiment, a finite field basis matrix is obtained, and a displacement value matrix is constructed using preset prime powers, preset primitive elements, and the finite field basis matrix.
[0059] Step 102: Based on the matrix row and column data of the previously preset matrix row and column sequence numbers in the displacement value matrix, the preset local basis matrix is expanded to determine a local sparse check matrix and a local identity matrix.
[0060] Please note that Figure 2 , Figure 2 The black dots in the middle indicate positions where the matrix elements in the preset local basis matrix are 1, and also indicate positions where circulant permutation matrix (CPM) expansion is required. The blank spaces indicate positions where the matrix elements are 0. Specifically, the matrix row and column data of the row and column sequence numbers of the previous preset matrix are selected in the displacement value matrix, where the matrix row and column data of the row and column sequence numbers of the previous preset matrix are the matrix data of the first 5 rows and the first 61 columns in the displacement value matrix S.
[0061] Furthermore, the matrix row and column data of the previously preset matrix row and column sequence numbers are used to perform cyclic permutation matrix expansion (CPM expansion) on the matrix column data of the previously preset first extended matrix column sequence numbers in the preset local base matrix to determine a local sparse check matrix, wherein the matrix column data of the previously preset first extended matrix column sequence numbers in the preset local base matrix are the matrix elements with a value of 1 in the 1st to 61st columns of the preset local base matrix, and the matrix data of the first 5 rows and first 61 columns of the displacement value matrix S are selected to perform CPM expansion on the matrix elements with a value of 1 in the 1st to 61st columns of the preset local base matrix to obtain a local sparse check matrix H with a matrix size of 690×8417. local The CPM expansion process is divided into two parts. First, the matrix data of the first 5 rows and first 61 columns in the displacement value matrix S are used to replace all the matrix elements with values of 1 in the 1st to 61st columns of the preset local basis matrix. Then, the displacement value unit matrix with a matrix size of 138*138 is used to replace the positions where the matrix elements in the 1st to 61st columns are 1 with all the matrix elements in the matrix data of the first 5 rows and first 61 columns. The matrix elements in the matrix data of the first 5 rows and first 61 columns represent the size of the displacement value, that is, the value of the displacement value unit matrix cyclically shifted to the right. For example, if the matrix element in the matrix data of the first 5 rows and first 61 columns is 0, the 138*138 displacement value unit matrix is directly used to replace the matrix element 0. If the matrix element in the matrix data of the first 5 rows and first 61 columns is 2, the 138*138 displacement value unit matrix is cyclically shifted by two places to the right and then the matrix element 2 is replaced.
[0062] Furthermore, the matrix column data of the preset second extended matrix column sequence number position after the preset local base matrix is expanded with all zero displacement values to determine the local unit matrix, wherein the matrix column data of the preset second extended matrix column sequence number position after the preset local base matrix is the matrix elements with a value of 1 in the 62nd to 66th columns of the preset local base matrix. The process of the all-zero displacement value expansion is specifically: using a displacement value unit matrix with a matrix size of 138*138, all the matrix elements with a value of 1 in the 62nd to 66th columns of the preset local base matrix are replaced to obtain a local unit matrix with a matrix size of 690×690.
[0063] In this embodiment, based on the matrix row and column data of the previously preset matrix row and column sequence numbers in the displacement value matrix, the preset local basis matrix is expanded to determine the local sparse check matrix and the local identity matrix.
[0064] Step 103: construct a target local matrix using the local sparse check matrix, the local identity matrix and the preset all-zero matrix.
[0065] The preset all-zero matrix is an all-zero matrix with a matrix size of 2760×1104.
[0066] It should be noted that, through four identical local sparse check matrices H local The first local submatrix L with a matrix size of 2760×33672 is obtained by arranging the four local unit matrices on the main diagonal, and the second local submatrix L' with a matrix size of 2760×2760 is obtained by arranging the four identical local unit matrices on the main diagonal. Then, the first local submatrix L, the second local submatrix L' and the preset all-zero matrix O are used to form the target local matrix.
[0067] In this embodiment, a local sparse check matrix, a local identity matrix, and a preset all-zero matrix are used to construct a target local matrix.
[0068] Step 104: Expand the preset global basis matrix using the target matrix row and column data in the displacement value matrix to determine a global sparse check matrix.
[0069] The preset global basis matrix includes a first global basis matrix, a second global basis matrix, a third global basis matrix and a fourth global basis matrix.
[0070] The target matrix row and column data includes first target matrix row and column data and second target matrix row and column data, wherein the first target matrix row and column data is the matrix data of the first 61 columns of the 6th to 9th rows in the displacement value matrix, and the second target matrix row and column data is the matrix data of the 6th to 9th rows and the 62nd to 66th columns in the displacement value matrix.
[0071] The global sparse check matrix includes a first global sparse check matrix H0, a second global sparse check matrix H1, a third global sparse check matrix H'0, and a fourth global sparse check matrix H1'.
[0072] It should be noted that the first global basis matrix and the second global basis matrix are respectively expanded by cyclic permutation matrix using the row and column data of the first target matrix to determine the first global sparse check matrix and the second global sparse check matrix. Specifically, the matrix data of the first 61 columns of the 6th to 9th rows in the displacement value matrix are used to replace all matrix elements with values of 1 in the first global basis matrix and the second global basis matrix. Then, the positions where the matrix elements are 1 in the first global basis matrix and the second global basis matrix are replaced with all matrix elements in the matrix data of the first 61 columns of the 6th to 9th rows by the displacement value unit matrix replacement, thereby obtaining a first global sparse check matrix with a matrix size of 276×8418 corresponding to the first global basis matrix and a second global sparse check matrix with a matrix size of 276×8418 corresponding to the second global basis matrix. The first row of the first global basis matrix B0 has 31 0 elements and 30 1 elements, and the second row has 30 1 elements and 31 0 elements, which is specifically:
[0073]
[0074] Furthermore, the first row of the second global basis matrix B1 has 31 1 elements and 30 0 elements, and the second row has 30 0 elements and 31 1 elements, which is specifically:
[0075]
[0076] Furthermore, the third global basis matrix and the fourth global basis matrix are respectively subjected to cyclic permutation matrix expansion using the row and column data of the second target matrix to determine a third global sparse check matrix with a matrix size of 276×690 corresponding to the third global basis matrix and a fourth global sparse check matrix with a matrix size of 276×690 corresponding to the fourth global basis matrix. The principle of the steps for performing cyclic permutation matrix expansion on the third global basis matrix and the fourth global basis matrix here is consistent with the principle of the steps for performing cyclic permutation matrix expansion on the first global basis matrix and the second global basis matrix; the first row of the third global basis matrix B2 consists of 3 0 elements and 2 1 elements, and the second row consists of 2 1 elements and 3 0 elements; the first row of the fourth global basis matrix B3 consists of 3 1 elements and 2 0 elements, and the second row consists of 2 0 elements and 3 1 elements.
[0077] In this embodiment, the preset global base matrix is expanded by using the target matrix row and column data in the displacement value matrix to determine the global sparse check matrix.
[0078] Step 105: Use the global sparse check matrix and the preset identity matrix to construct a target global matrix.
[0079] The preset unit matrix is a unit matrix with a matrix size of 1104×1104.
[0080] It should be noted that, a first global sub-matrix G with a matrix size of 1104×33672 is constructed by four identical first global sparse check matrices H0 and four identical second global sparse check matrices H1, and a second global sub-matrix G' with a matrix size of 1104×2760 is constructed by four identical third global sparse check matrices H'0 and four identical fourth global sparse check matrices H1'. The first global sub-matrix G, the second global sub-matrix G' and the preset unit matrix are used to form the target global matrix.
[0081] Further, see Figure 3 After the above CPM expansion and matrix construction steps, the target global matrix and target local matrix can be obtained. The first local submatrix L, the second local submatrix L', and the preset all-zero matrix O constitute the target local matrix, and the first global submatrix G, the second global submatrix G', and the preset identity matrix constitute the target global matrix. The size of the first local submatrix L is 2760×33672; the size of the second local submatrix L' is 2760×2760; the size of the preset all-zero matrix O is 2760×1104; the size of the first global submatrix G is 1104×33672; the size of the second global submatrix G' is 1104×2760; and the size of the preset identity matrix is 1104×1104.
[0082] Further, see Figure 4 , the local sparse check matrix H without CPM expansion local The matrix size of the local unit matrix without CPM extension is 5×5, the matrix size of the first global sparse check matrix H0 without CPM extension is 2×61, the matrix size of the second global sparse check matrix H1 is 2×61, the matrix size of the third global sparse check matrix H'0 is 2×5, and the matrix size of the fourth global sparse check matrix H1' is 2×5. Therefore, based on the local sparse check matrix H without CPM extension local and the local unit matrix, the matrix size of the first local submatrix L constructed is 20×244, and the matrix size of the second local submatrix L' is 20×20. Based on the first global sparse check matrix H0, the second global sparse check matrix H1, the third global sparse check matrix H'0 and the fourth global sparse check matrix H1' that have not been processed by CPM extension, the size of the first global submatrix G constructed is 8×244, and the size of the second global submatrix G' is 8×20.
[0083] In this embodiment, a global sparse check matrix and a preset identity matrix are used to construct a target global matrix.
[0084] Step 106: Generate a target code according to the information bit matrix of the codeword to be encoded, the target global matrix, and the target local matrix.
[0085] It should be noted that after the target global matrix and the target local matrix are constructed, the (37536, 33672) SC-GC-LDPC (spatially coupled-globally coupled-lowdensity parity check) code is constructed, which can achieve low-complexity encoding. Assume that the target encoded codeword is divided into three parts, namely [UP1P2]. According to the check relationship, the matrix equation can be obtained:
[0086]
[0087] Where H is the check matrix of SC-GC-LDPC; C T is the encoded codeword matrix; I is the local identity matrix; P1 is the first check bit matrix; L is the first local submatrix in the target local matrix; U is the information bit matrix of the codeword to be encoded; P2 is the second check bit matrix; G is the first global submatrix in the target global matrix; G' is the second global submatrix in the target global matrix.
[0088] Furthermore, based on the above equations, a preset check formula group can be obtained. The preset check formula group is used to calculate the first check bit matrix and the second check bit matrix according to the target global matrix, the target local matrix and the information bit matrix of the codeword to be encoded; the first check bit matrix, the second check bit matrix and the information bit matrix of the codeword to be encoded are used to generate the target code; wherein the preset check formula group is specifically:
[0089]
[0090] Among them, P1 is the first check bit matrix; L is the first local submatrix in the target local matrix; U is the information bit matrix of the codeword to be encoded; P2 is the second check bit matrix; G is the first global submatrix in the target global matrix; G' is the second global submatrix in the target global matrix.
[0091] In this embodiment, a target code is generated according to the information bit matrix of the codeword to be encoded, the target global matrix, and the target local matrix.
[0092] In an embodiment of the present invention, the present invention provides an encoding method for NAND flash memory, obtains a finite field basis matrix, and uses preset prime powers, preset primitive elements and a finite field basis matrix to construct a displacement value matrix; based on the matrix row and column data of the previous preset matrix row and column sequence numbers in the displacement value matrix, the preset local basis matrix is expanded to determine the local sparse check matrix and the local unit matrix; the local sparse check matrix, the local unit matrix and the preset all-zero matrix are used to construct a target local matrix; the preset global basis matrix is expanded by the target matrix row and column data in the displacement value matrix to determine the global sparse check matrix; the target global matrix is constructed using the global sparse check matrix and the preset unit matrix; the target code is generated according to the information bit matrix of the codeword to be encoded, the target global matrix and the target local matrix; based on the above scheme, the preset local basis matrix and the preset global matrix are expanded based on the displacement value matrix, and the target code is generated according to the obtained target global matrix and target local matrix. This process does not require the use of traditional Gaussian elimination method for encoding, thereby reducing the encoding complexity.
[0093] See also Figure 5 , Figure 5 A flowchart of another encoding method for NAND flash memory provided by an embodiment of the present invention.
[0094] The present invention provides a coding method for NAND flash memory, comprising:
[0095] Step 501: Obtain a finite field basis matrix, and construct a displacement value matrix using preset prime powers, preset primitive elements, and the finite field basis matrix.
[0096] It should be noted that the present invention considers the NB (nonbinary) finite field GF(q), where q is a power of a prime number, and α is the primitive element of GF(q). The power of α can be expressed as α ∞ =0,α 0 =1,α,…,α q-2 , these elements represent all elements on GF(q), and α q-1 =α 0 =1, thus the expression of the finite field basis matrix of (q-1)×(q-1) in GF(q) can be expressed as:
[0097]
[0098] Among them, B is the finite field basis matrix; α is the primitive element; q is the power of the prime number.
[0099] Furthermore, we construct a GC-LDPC (globally coupled-lowdensityparity check) code based on a finite field basis matrix B (B matrix). We label the rows and columns of B matrix as 0 to q-1. We assume that ql can be decomposed into the product of two positive integers: q-1 = lr. We divide B matrix into r l×(q-1) sub-matrices, defined as W0, W1, …, W r-1 , where 0≤i<r, then divide W0 into r l×l sub-matrices, defined as W 0,0 ,W 0,1 ,…,W 0,r-1 . Through the sub-matrix pair W1,…,W r-1 By performing cyclic shift, the B matrix can be divided into r×r sub-matrices of size l×l. The B matrix is a block cyclic structure matrix, that is, the B matrix can also be expressed as:
[0100]
[0101] Among them, W 0,0 is the submatrix of row 1 and column 1 in the finite field basis matrix; W 0,1 is the submatrix of the first row and second column in the finite field basis matrix; W 0,r-1 is the submatrix of row 1 and column r in the finite field basis matrix; W 0,r-2 is the submatrix in row 1 and column r-1 of the finite field basis matrix; W 0,2 is the submatrix at row 1 and column 3 in the finite field basis matrix.
[0102] Furthermore, for 0≤j<r and l≤m,n<l, we can extract the matrix W from each submatrix W at the same row and column position. 0,j Take an m×n submatrix R 0,j . R (m,n) It is composed of r×r m×n sub-matrices, as shown below:
[0103]
[0104] Among them, R(m,n) is the partial matrix intercepted from the B matrix; R 0,0 is the submatrix of row 1 and column 1 in R(m,n); R 0,1 is the submatrix of row 1 and column 2 in R(m,n); R 0,r-1 is the submatrix of row 1 and column r in R(m,n); R 0,r-2 is the submatrix of row 1 and column r-1 in R(m,n); R 0,2 is the submatrix of row 1 and column 3 in R(m,n); m is the number of rows of the truncated submatrix; n is the number of columns of the truncated submatrix.
[0105] Furthermore, randomly select s rows from the deleted rows in the block cyclic structure of the B matrix, and delete the last lk columns of each submatrix in the s rows as X gc (s,k). The resulting matrix constructed based on the GF(q) domain is as follows:
[0106]
[0107] Among them, Rgc(m,n,s,k) is the displacement value matrix of the constructed GC-LDPC code; m is the number of rows of the truncated submatrix; n is the number of columns of the truncated submatrix; s is the number of randomly selected rows in the untruncated part; k is the number of truncated columns in the s row of the submatrix; R0,0 is the displacement value matrix of the local matrix; Xgc(s,k) is the displacement value matrix of the global matrix.
[0108] Furthermore, in order to obtain a matrix based on GF(2), it is necessary to use a circulant permutation matrix (CPM) to expand the elements in the matrix and finally obtain a check matrix.
[0109] Furthermore, the present invention proposes a new (37536, 33672) SC-GC-LDPC code based on this, and uses a non-binary finite field GF(139) to construct a displacement value matrix. Specifically, the preset prime power is set to 139, the preset primitive element is set to 3, and the preset primitive element is substituted into the expression of the finite field basis matrix to obtain the displacement value matrix, wherein the displacement value matrix S is specifically:
[0110]
[0111] In this embodiment, a finite field basis matrix is obtained, and a displacement value matrix is constructed using preset prime powers, preset primitive elements, and the finite field basis matrix.
[0112] Step 502: Select the matrix row and column data of the previously preset matrix row and column sequence numbers in the displacement value matrix.
[0113] In this embodiment, the matrix row and column data of the previously preset matrix row and column sequence numbers are selected in the displacement value matrix.
[0114] Step 503: Using the matrix row and column data of the previously preset matrix row and column sequence numbers, perform cyclic permutation matrix expansion on the matrix column data of the previously preset first extended matrix column sequence numbers in the preset local base matrix to determine a local sparse check matrix.
[0115] It should be noted that the diagonal elements of the displacement value matrix S obtained through the above steps are 0, and the matrix column data of the preset first extended matrix column number position in the preset local base matrix are subjected to cyclic permutation matrix expansion. In fact, a full-element matrix of size 5×61 is processed, and a certain value of each column in the full-element matrix is set to 0, and the position of 0 is set to a diagonal structure. A unit matrix of size 5×5 is spliced at the end of the base matrix, that is, the matrix column data of the preset second extended matrix column number position is obtained to obtain the preset local base matrix; the matrix data located in the first 5 rows and first 61 columns of the displacement value matrix S are taken to perform CPM expansion on the 1st to 61th columns of the preset local base matrix, and the diagonal part behind the preset local base matrix is expanded with all-0 displacement values, that is, all matrix elements with values of 1 in the 62nd to 66th columns of the preset local base matrix are expanded with all-0 displacement values, and the local sparse check matrix H can be obtained. local The preset local basis matrix is composed of 4 local codes. In order to separate the check bits, the diagonal matrix behind each local code is placed at the end.
[0116] For example, if the parity check matrix of an LDPC code is an array composed of cyclic matrices, then the LDPC code is a quasi-cyclic LDPC (QC-LDPC) code; for the cyclic shift value matrix P, it can be expressed as:
[0117]
[0118] Furthermore, the cyclic shift value matrix P can be expanded into the following QC-LDPC code check matrix H by CPM:
[0119]
[0120] Here, 0 corresponds to the 3×3 identity matrix, 1 and 2 correspond to cyclic permutation matrices with cyclic shifts of 1 and 2, respectively, and -1 represents an all-zero matrix. (The element value n in the matrix P corresponds to the cyclic permutation matrix with a cyclic shift of n bits, which is the identity matrix cyclically shifted to the right by n bits.)
[0121] Furthermore, for the SC-GC-LDPC code proposed in the present invention, a cyclic permutation matrix (displacement value unit matrix) of size 138×138 is used in the CPM expansion process, and the elements in the matrix S are the displacement values of the cyclic permutation matrix.
[0122] In this embodiment, the matrix row and column data of the previously preset matrix row and column sequence numbers are used to perform cyclic permutation matrix expansion on the matrix column data of the previously preset first extended matrix column sequence numbers in the preset local base matrix to determine a local sparse check matrix.
[0123] Step 504: Perform all-zero shift value expansion on the matrix column data of the second extended matrix column sequence number position after the preset local base matrix to determine the local unit matrix.
[0124] In this embodiment, matrix column data of the second extended matrix column sequence number position preset after the preset local base matrix is expanded by all-zero shift values to determine the local unit matrix.
[0125] Step 505: construct a target local matrix using the local sparse check matrix, the local identity matrix and the preset all-zero matrix.
[0126] In this embodiment, a local sparse check matrix, a local identity matrix, and a preset all-zero matrix are used to construct a target local matrix.
[0127] Step 506: Expand the preset global basis matrix using the target matrix row and column data in the displacement value matrix to determine a global sparse check matrix.
[0128] The preset global basis matrix includes a first global basis matrix, a second global basis matrix, a third global basis matrix and a fourth global basis matrix.
[0129] The target matrix row-column data includes first target matrix row-column data and second target matrix row-column data.
[0130] Furthermore, step 506 may include the following sub-steps:
[0131] S61, using the first target matrix row and column data to perform cyclic permutation matrix expansion on the first global basis matrix and the second global basis matrix respectively, to determine a first global sparse check matrix and a second global sparse check matrix;
[0132] It should be noted that the first global basis matrix B0 and the second global basis matrix B1 with a matrix size of 2×61 can be merged into a basis matrix with a size of 8×244 And take the matrix data pairs of the first 61 columns of the 6th to 9th rows of the displacement value matrix S The B0 and B1 in the CPM expansion are performed to obtain the third global sparse check matrix and the fourth global sparse check matrix; wherein the basis matrix It can be expressed as:
[0133]
[0134] in, is the basis matrix; B0 is the first global basis matrix; B1 is the second global basis matrix.
[0135] S62 , using the row and column data of the second target matrix to perform cyclic permutation matrix expansion on the third global basis matrix and the fourth global basis matrix respectively, to determine a third global sparse check matrix and a fourth global sparse check matrix.
[0136] It should be noted that the sizes of the third global basis matrix and the fourth global basis matrix are set to 2×5, and finally a tail-biting basis matrix of size 8×20 is obtained. The matrix data of the 6th to 9th rows and the 62nd to 66th columns of the displacement value matrix S are used to perform CPM expansion on the third global basis matrix B2 and the fourth global basis matrix B3 in the tail-biting basis matrix to obtain the third global sparse check matrix and the fourth global sparse check matrix; the preset global basis matrix consists of three parts, the first part is a tail-biting basis matrix of size 8×244, the second part is a tail-biting basis matrix of size 8×20, and the third part is a unit matrix of size 8×8.
[0137] In this embodiment, the preset global base matrix is expanded by using the target matrix row and column data in the displacement value matrix to determine the global sparse check matrix.
[0138] Step 507: Use the global sparse check matrix and the preset identity matrix to construct a target global matrix.
[0139] In this embodiment, a global sparse check matrix and a preset identity matrix are used to construct a target global matrix.
[0140] Step 508: Generate a target code according to the information bit matrix of the codeword to be encoded, the target global matrix, and the target local matrix.
[0141] Furthermore, step 508 may include the following sub-steps:
[0142] S81, using a preset check formula group to calculate a first check bit matrix and a second check bit matrix according to a target global matrix, a target local matrix, and an information bit matrix of a codeword to be encoded;
[0143] S82. Generate a target code using the first check bit matrix, the second check bit matrix, and the information bit matrix of the codeword to be encoded.
[0144] In this embodiment, a target code is generated according to the information bit matrix of the codeword to be encoded, the target global matrix, and the target local matrix.
[0145] For a comparison of technical performance, we can refer to existing technologies. Existing LDPC codes use a unique iterative decoding algorithm that first obtains log-likelihood ratio (LLR) information for each bit and then iteratively updates it to correct bit errors. However, with increasing storage density, the error correction capability of 2KB LDPC codes cannot meet the data reliability requirements of enterprise-level SSDs, making 4KB LDPC codes the mainstream choice. Furthermore, as the flash memory channel's lifespan increases, the RBER decreases, and the RBER varies significantly between different pages. This places higher demands on the dynamic error correction capabilities of ECC. In 2016, Juane Li et al. first proposed GC-LDPC codes. They used full-element matrices to construct the modulus matrices of the GC-LDPC code's global and local matrices, and used finite fields to construct the shift value matrix. Due to the GC-LDPC code's highly flexible decoding method, it was quickly applied to flash memory channels by relevant researchers. In 2019, Yen-Chin Liao et al. constructed a new (21150, 19050) GC-LDPC code for NAND Flash applications. This code requires first constructing short LDPC codes and then connecting them through a global check matrix to obtain a GC-LDPC code with a longer code length. However, the check matrix structure of the GC-LDPC code is not conducive to encoding. If the traditional Gaussian elimination method is used for encoding, the coding complexity is extremely high. At the same time, the error correction performance of the existing 2KB GC-LDPC encoding and decoding technology cannot meet the growing encoding and decoding technology requirements of NAND flash memory. This GC-LDPC code cannot meet the requirements of flash memory ECC for GC-LDPC code length, high throughput, and dynamic error correction.
[0146] To address the above issues, the present invention proposes an encoding method for NAND flash memory. By constructing a (37536, 33672) SC-GC-LDPC (spatially-coupled-globally coupled-lowdensity parity check) code and encoding based on it, a diagonal structure is introduced into the original full-element matrix. This eliminates the need for Gaussian elimination during encoding, significantly reducing encoding complexity. Furthermore, a spatially coupled structure is employed when constructing the global matrix, reducing the number of short loops. This allows each short LDPC code to better transmit information through the global matrix, improving the error correction capability of the LDPC code. Finally, since the code can reuse the same check matrix, the storage of the check nodes can be reduced compared with the original GC-LDPC code, thereby greatly improving the hardware utilization. Therefore, the present invention introduces a diagonal structure in the check matrix and constructs a global check matrix through a spatial coupling structure, thereby reducing the coding complexity, improving the error correction capability, and reducing hardware implementation resources. The (37536, 33672) SC-GC-LDPC code in the present invention has a special check matrix structure, which enables it to expand the LDPC code suitable for NAND flash memory based on the original GC-LDPC code, while improving the error correction capability and reducing the coding complexity and hardware implementation resources.
[0147] In summary, the present invention eliminates the need for traditional Gaussian elimination for encoding, and its parity check matrix structure facilitates encoding. The parity check matrix of the present invention has fewer short cycles and stronger error correction capabilities. By reusing the same parity check matrix, the present invention can reduce the storage requirements of check nodes, significantly improving hardware utilization.
[0148] In an embodiment of the present invention, the present invention provides an encoding method for NAND flash memory, obtains a finite field basis matrix, and uses preset prime powers, preset primitive elements and a finite field basis matrix to construct a displacement value matrix; based on the matrix row and column data of the previous preset matrix row and column sequence numbers in the displacement value matrix, the preset local basis matrix is expanded to determine the local sparse check matrix and the local unit matrix; the local sparse check matrix, the local unit matrix and the preset all-zero matrix are used to construct a target local matrix; the preset global basis matrix is expanded by the target matrix row and column data in the displacement value matrix to determine the global sparse check matrix; the target global matrix is constructed using the global sparse check matrix and the preset unit matrix; the target code is generated according to the information bit matrix of the codeword to be encoded, the target global matrix and the target local matrix; based on the above scheme, the preset local basis matrix and the preset global matrix are expanded based on the displacement value matrix, and the target code is generated according to the obtained target global matrix and target local matrix. This process does not require the use of traditional Gaussian elimination method for encoding, thereby reducing the encoding complexity.
[0149] See also Figure 6 , Figure 6 A structural block diagram of an encoding device for NAND flash memory provided by an embodiment of the present invention.
[0150] The present invention provides a NAND flash memory encoding device, comprising:
[0151] An acquisition module 601 is used to acquire a finite field basis matrix and construct a displacement value matrix using a preset prime power, a preset primitive element and the finite field basis matrix;
[0152] A determination module 602 is configured to expand a preset local basis matrix based on matrix row and column data of a previously preset matrix row and column sequence number position in the displacement value matrix to determine a local sparse check matrix and a local identity matrix;
[0153] A first construction module 603 is configured to construct a target local matrix using a local sparse check matrix, a local identity matrix, and a preset all-zero matrix;
[0154] An expansion module 604 is configured to expand a preset global basis matrix using target matrix row and column data in the displacement value matrix to determine a global sparse check matrix;
[0155] The second construction module 605 is used to construct a target global matrix using a global sparse check matrix and a preset identity matrix;
[0156] The generating module 606 is configured to generate a target code according to the information bit matrix of the codeword to be encoded, the target global matrix and the target local matrix.
[0157] Furthermore, the determination module 602 is specifically configured to:
[0158] Selecting the matrix row and column data of the previously preset matrix row and column sequence numbers in the displacement value matrix;
[0159] Using the matrix row and column data of the previously preset matrix row and column sequence number positions, performing cyclic permutation matrix expansion on the matrix column data of the previously preset first extended matrix column sequence number positions in the preset local base matrix, to determine a local sparse check matrix;
[0160] An all-zero displacement value expansion is performed on the matrix column data of the second extended matrix column sequence number position preset after the preset local basic matrix to determine the local unit matrix.
[0161] Furthermore, the preset global basis matrix includes a first global basis matrix, a second global basis matrix, a third global basis matrix, and a fourth global basis matrix; the target matrix row and column data includes first target matrix row and column data and second target matrix row and column data; the expansion module 604 is specifically used to:
[0162] Performing cyclic permutation matrix expansion on the first global basis matrix and the second global basis matrix using row and column data of the first target matrix to determine a first global sparse check matrix and a second global sparse check matrix;
[0163] The third global basis matrix and the fourth global basis matrix are respectively expanded by cyclic permutation matrices using the row and column data of the second target matrix to determine the third global sparse check matrix and the fourth global sparse check matrix.
[0164] Furthermore, the generating module 606 is specifically configured to:
[0165] Calculating a first check bit matrix and a second check bit matrix based on a target global matrix, a target local matrix, and an information bit matrix of a codeword to be encoded using a preset check formula group;
[0166] A target code is generated using a first check bit matrix, a second check bit matrix, and an information bit matrix of a codeword to be encoded.
[0167] Optionally, the finite field basis matrix is:
[0168]
[0169] Among them, B is the finite field basis matrix; α is the primitive element; q is the power of the prime number.
[0170] Optionally, a verification formula group is preset, specifically:
[0171]
[0172] Among them, P1 is the first check bit matrix; L is the first local submatrix in the target local matrix; U is the information bit matrix of the codeword to be encoded; P2 is the second check bit matrix; G is the first global submatrix in the target global matrix; G' is the second global submatrix in the target global matrix.
[0173] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and modules can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0174] An embodiment of the present invention further provides a computer device including a memory and a processor, wherein a computer program is stored in the memory; when the computer program is executed by the processor, the processor executes the steps of the encoding method for NAND flash memory as described in any of the above embodiments.
[0175] An embodiment of the present invention further provides a computer-readable storage medium having a computer program / instruction stored thereon. When the computer program / instruction is executed by a processor, the steps of the encoding method for NAND flash memory as described in any of the above embodiments are implemented.
[0176] An embodiment of the present invention further provides a computer program product, including a computer program / instruction, which implements the steps of the encoding method for NAND flash memory as described in any of the above embodiments when the computer program / instruction is executed by a processor.
[0177] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0178] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0179] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that the technical solutions described in the above embodiments can still be modified, or some of the technical features thereof can be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A coding method for NAND flash memory, characterized in that: include: Obtaining a finite field basis matrix, and constructing a displacement value matrix using a preset prime power, a preset primitive element, and the finite field basis matrix; Expanding a preset local basis matrix based on matrix row and column data of the previously preset matrix row and column sequence numbers in the displacement value matrix to determine a local sparse check matrix and a local identity matrix; Constructing a target local matrix using the local sparse check matrix, the local identity matrix and a preset all-zero matrix; Expanding a preset global basis matrix using target matrix row and column data in the displacement value matrix to determine a global sparse check matrix; Using the global sparse check matrix and a preset identity matrix, constructing a target global matrix; Generate a target code according to the information bit matrix of the codeword to be encoded, the target global matrix and the target local matrix; The step of expanding a preset local basis matrix based on the matrix row and column data of the previously preset matrix row and column sequence number bits in the displacement value matrix to determine a local sparse check matrix and a local identity matrix includes: Selecting matrix row and column data of previously preset matrix row and column sequence numbers in the displacement value matrix; Using the matrix row and column data of the preset matrix row and column sequence numbers, perform cyclic permutation matrix expansion on the matrix column data of the preset first extended matrix column sequence numbers in the preset local base matrix to determine a local sparse check matrix; Performing all-zero displacement value expansion on the matrix column data of the second extended matrix column sequence number position preset after the preset local base matrix to determine a local unit matrix; The step of generating a target code according to the information bit matrix of the codeword to be encoded, the target global matrix and the target local matrix comprises: Calculating a first check bit matrix and a second check bit matrix according to the target global matrix, the target local matrix, and the information bit matrix of the codeword to be encoded using a preset check formula group; The first check bit matrix, the second check bit matrix, and the information bit matrix of the codeword to be encoded are used to generate a target code.
2. The encoding method for NAND flash memory according to claim 1, wherein: The preset global base matrix includes a first global base matrix, a second global base matrix, a third global base matrix and a fourth global base matrix; the target matrix row and column data includes first target matrix row and column data and second target matrix row and column data; The step of expanding a preset global basis matrix by using the target matrix row and column data in the displacement value matrix to determine a global sparse check matrix includes: Performing cyclic permutation matrix expansion on the first global basis matrix and the second global basis matrix using the row and column data of the first target matrix to determine a first global sparse check matrix and a second global sparse check matrix; The third global basis matrix and the fourth global basis matrix are respectively expanded by cyclic permutation using the row and column data of the second target matrix to determine a third global sparse check matrix and a fourth global sparse check matrix.
3. The encoding method for NAND flash memory according to claim 1, wherein: The finite field basis matrix is specifically: ; Among them, B is the finite field basis matrix; α is the primitive element; q is the power of the prime number.
4. The encoding method for NAND flash memory according to claim 1, wherein: The preset verification formula group is specifically: ; in, is the first check bit matrix; L is the first local submatrix in the target local matrix; U is the information bit matrix of the codeword to be encoded; is the second check bit matrix; G is the first global submatrix in the target global matrix; is the second global submatrix in the target global matrix.
5. A coding device for NAND flash memory, applied to the coding method for NAND flash memory according to claim 1, characterized in that: include: An acquisition module, configured to acquire a finite field basis matrix and construct a displacement value matrix using a preset prime power, a preset primitive element, and the finite field basis matrix; A determination module, configured to expand a preset local basis matrix based on matrix row and column data of a previously preset matrix row and column sequence number position in the displacement value matrix, and determine a local sparse check matrix and a local identity matrix; A first construction module is configured to construct a target local matrix using the local sparse check matrix, the local identity matrix, and a preset all-zero matrix; An expansion module, configured to expand a preset global basis matrix using target matrix row and column data in the displacement value matrix to determine a global sparse check matrix; A second construction module is configured to construct a target global matrix using the global sparse check matrix and a preset identity matrix; The generating module is used to generate a target code according to the information bit matrix of the codeword to be encoded, the target global matrix and the target local matrix.
6. A computer device, characterized in that: The invention comprises a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor executes the steps of the encoding method for NAND flash memory according to any one of claims 1 to 4.
7. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: When the computer program / instructions are executed by a processor, the steps of the encoding method for NAND flash memory according to any one of claims 1 to 4 are implemented.
8. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the encoding method for NAND flash memory according to any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Encoding method of global coupling low-density parity check code
CN114285417A
Coding method, decoding method, communication device and computer readable storage medium
CN117749315A