Movatterモバイル変換


[0]ホーム

URL:


CN120165705A - LDPC code construction method, device, terminal equipment and storage medium for flash memory - Google Patents

LDPC code construction method, device, terminal equipment and storage medium for flash memory
Download PDF

Info

Publication number
CN120165705A
CN120165705ACN202510639147.3ACN202510639147ACN120165705ACN 120165705 ACN120165705 ACN 120165705ACN 202510639147 ACN202510639147 ACN 202510639147ACN 120165705 ACN120165705 ACN 120165705A
Authority
CN
China
Prior art keywords
matrix
sub
code
mother
rate
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202510639147.3A
Other languages
Chinese (zh)
Other versions
CN120165705B (en
Inventor
孙成思
何瀚
王灿
林财成
刘洋
江新远
吴玉俊
刘璨
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Xinli Semiconductor Co ltd
Original Assignee
Hangzhou Xinli Semiconductor Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Xinli Semiconductor Co ltdfiledCriticalHangzhou Xinli Semiconductor Co ltd
Priority to CN202510639147.3ApriorityCriticalpatent/CN120165705B/en
Publication of CN120165705ApublicationCriticalpatent/CN120165705A/en
Application grantedgrantedCritical
Publication of CN120165705BpublicationCriticalpatent/CN120165705B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Classifications

Landscapes

Abstract

Translated fromChinese

本申请涉及闪存控制技术领域,尤其涉及一种闪存的LDPC码构建方法、装置、终端设备及存储介质。该方法包括:确定LDPC码的构造参数,构造参数用于构建LDPC码的母矩阵;构建各个子矩阵的原型矩阵,并简化各个子矩阵的结构,获得各个简化后的子矩阵;合并各个简化后子矩阵得到母矩阵的子码率矩阵,合并各个子码率矩阵,得到母码原型矩阵;通过等差数列方式对母码原型矩阵赋循环移位值;检测当前移位值下,母码原型矩阵中各个子矩阵是否含有4环,若含有4环,则重新执行通过等差数列法对母码原型矩阵赋循环移位值的步骤,若不含有4环则构建结束。通过简化子矩阵简化了LDPC码的构造,也简化了纠错应用时的计算难度。

The present application relates to the field of flash memory control technology, and in particular to a flash memory LDPC code construction method, device, terminal equipment and storage medium. The method includes: determining the construction parameters of the LDPC code, the construction parameters are used to construct the mother matrix of the LDPC code; constructing the prototype matrix of each sub-matrix, and simplifying the structure of each sub-matrix to obtain each simplified sub-matrix; merging each simplified sub-matrix to obtain the sub-code rate matrix of the mother matrix, merging each sub-code rate matrix to obtain the mother code prototype matrix; assigning cyclic shift values to the mother code prototype matrix by arithmetic progression; detecting whether each sub-matrix in the mother code prototype matrix contains 4 rings under the current shift value, if it contains 4 rings, then re-execute the step of assigning cyclic shift values to the mother code prototype matrix by arithmetic progression method, if it does not contain 4 rings, then the construction ends. By simplifying the sub-matrix, the construction of the LDPC code is simplified, and the calculation difficulty in error correction application is also simplified.

Description

LDPC code construction method and device for flash memory, terminal equipment and storage medium
Technical Field
The present application relates to the field of flash memory control technologies, and in particular, to a method and apparatus for constructing an LDPC code of a flash memory, a terminal device, and a storage medium.
Background
The QC-LDPC code is a low density parity check code with specific structural characteristics, and is generally described by a base matrix and a Lifting factor (LS) Z. Each element in the base matrix corresponds to a cyclic right shift value of a Z x Z identity matrix, i.e. element "0" represents a Z x Z identity matrix. Definition element "-1" represents a zero matrix of Z x Z. Other cyclic shift values are all between 1 and (Z-1).
However, the diversity of different NAND flash Page Sizes (PS) presents challenges to the construction of the LDPC matrix. For example, in MLC flash, the Size of a single page may be relatively small, while in QLC flash, the Size of a single page may be much larger, and the spark Size of different particle vendor QLC pages may be different. This requires that the error correction code design be compatible with flash memories of different page sizes, whereas existing LDPC matrix construction methods are generally optimized for specific page sizes, which makes it necessary to construct different LDPC matrices for different types of NAND flash memories during the design process, increasing design complexity and possibly affecting hardware implementation efficiency.
Disclosure of Invention
In view of this, the embodiments of the present application provide a method, an apparatus, a terminal device, and a storage medium for constructing an LDPC code of a flash memory, which can effectively solve the problems of influencing the implementation efficiency of hardware, and complicating the design.
In a first aspect, an embodiment of the present application provides a method for constructing an LDPC code of a flash memory, including:
determining construction parameters of the LDPC code, wherein the construction parameters are used for constructing a mother matrix of the LDPC code;
constructing a prototype matrix of each submatrix, simplifying the structure of each submatrix, and obtaining each simplified submatrix;
combining the simplified sub-matrices to obtain a sub-code rate matrix of the mother matrix, and combining the sub-code rate matrices to obtain a mother code prototype matrix;
Cyclic shift values are given to the mother code prototype matrix in an arithmetic progression mode;
and detecting whether each sub-matrix in the mother code prototype matrix contains 4 rings or not under the current shift value, if so, re-executing the step of endowing the mother code prototype matrix with a cyclic shift value by an arithmetic array method, and if not, finishing construction.
In some embodiments, the determining construction parameters of the LDPC code, the construction parameters being used to construct a mother matrix of the LDPC code, comprises:
calculating a lifting factor according to hardware parameters of the target flash memory, and calculating the column number of a user data matrix according to the lifting factor;
And determining the highest code rate and the lowest code rate of the target flash memory, and calculating the row number of the mother matrix and the row number of each sub-matrix according to the column number of the user data matrix, the highest code rate and the lowest code rate.
In some embodiments, the submatrices include a user data matrix, a code rate compatible matrix, a full-1 matrix, a dense matrix, and one specific structure submatrix;
The constructing a prototype matrix of each sub-matrix and simplifying the structure of each sub-matrix comprises:
setting all the first row data of the user data matrix to 0, and setting all the diagonal data of the code rate compatible matrix to 0;
Setting the dense matrix as a full matrix, and setting the column weight of each submatrix as a value in a preset interval based on a preset column weight, wherein the column weight is the number of 1 in one column of data of the matrix.
In some embodiments, the resetting the column weight of each of the submatrices to a value within a preset interval based on a preset column weight further includes:
The maximum column weight of the mother matrix is not more than the preset column weight +1;
The maximum column weight of the user data matrix is not more than a preset column weight-1;
The maximum column weight of the code rate compatible matrix is not more than a preset column weight-1;
In some embodiments, combining each of the simplified submatrices to obtain a submatrix of the mother matrix includes:
Prototype matrix construction is carried out on each sub-matrix through a progressive edge algorithm, and each simplified sub-matrix is combined according to a preset position;
And determining the number of rows and columns to be deleted, continuously deleting the rows to be deleted from the second row, and continuously deleting the columns to be deleted from the second column of the code rate compatible matrix to obtain the subcode rate matrix of the mother matrix.
In some embodiments, the merging each of the subcode rate matrices to obtain a mother code prototype matrix includes:
and carrying out logical OR on the positions of each subcode rate matrix 1 and the cumulative or temporary matrix respectively to obtain a mother code prototype matrix.
In some embodiments, the assigning cyclic shift values to the mother code prototype matrix by means of an arithmetic progression includes;
selecting any prime number between 0 and the lifting factor as an equal difference value of each row of the mother code prototype matrix;
Setting initial values of each row for a first column of the mother code prototype matrix;
and generating a cyclic shift value of each row according to the initial value of each row and the equal difference value of each row.
In some embodiments, the hardware parameters include a firmware-filled length, a cyclic redundancy check length, a minimum page capacity, a maximum page capacity, a throughput rate, and an operating frequency;
Calculating a lifting factor according to the hardware parameters of the target flash memory, and calculating the number of columns of the user data field according to the lifting factor, wherein the method comprises the following steps:
calculating the maximum codeword length according to the maximum page capacity and the number of codewords;
calculating the size of a user data field of each codeword according to the firmware-padded length and the cyclic redundancy check;
Calculating a lifting factor according to the maximum codeword length, the throughput rate, the working frequency, the size of the user data field of each codeword and the hardware parameters of the target flash memory controller;
And calculating the column number of the user data field according to the lifting factor and the size of the user data field of each codeword.
In some embodiments, the determining the compatible highest code rate and the lowest code rate, and calculating the number of rows of the mother matrix and the number of rows of each sub-matrix according to the highest code rate and the lowest code rate includes:
calculating the number of rows of the mother matrix and the number of rows of each sub matrix according to a preset inequality;
the expression of the inequality is as follows;
;
;
Wherein, R is the lowest code rate, R1 is the highest code rate, K is the number of columns of the user data field, M is the number of rows of the mother matrix, and M1 is the number of rows of the sub-matrix corresponding to the highest code rate.
In a second aspect, the present application also provides an LDPC code construction apparatus for a flash memory, including:
The first construction module is used for determining construction parameters of the LDPC code, wherein the construction parameters are used for constructing a mother matrix of the LDPC code;
The second construction module is used for constructing prototype matrixes of all the submatrices, simplifying the structures of all the submatrices and obtaining all the simplified submatrices;
the merging module is used for merging the simplified submatrices to obtain a submatrices of the mother matrix, and merging the submatrices to obtain a mother code prototype matrix;
The assignment module is used for assigning a cyclic shift value to the mother code prototype matrix in an arithmetic array mode;
And the detection module is used for detecting whether each sub-matrix in the mother code prototype matrix contains 4 rings or not under the current shift value, if so, executing the step of endowing the mother code prototype matrix with a cyclic shift value by an arithmetic array method again, and if not, finishing construction.
In a third aspect, the present application also provides a terminal device, the terminal device including a processor and a memory, the memory storing a computer program, the processor being configured to execute the computer program to implement the method for constructing an LDPC code of the flash memory.
In a fourth aspect, the present application also provides a computer readable storage medium storing a computer program which, when executed on a processor, implements the method for constructing an LDPC code of a flash memory.
The embodiment of the application has the following beneficial effects:
The LDPC code construction method of the flash memory of the application can reduce the shift calculation amount in the subsequent error correction application by simplifying the structure of each sub-matrix, simplify the design structure, endow the prototype matrix with the cyclic shift value by an arithmetic array method, reduce the random shift to be fixed shift, simplify the hardware realization complexity, simplify the storage cost of the cyclic shift value, and ensure that the finally generated LDPC code does not contain 4 rings by detecting the shift value, thereby ensuring the error correction performance of the LDPC code.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart of a method for constructing LDPC codes of flash memory according to an embodiment of the present application;
FIG. 2 is a schematic diagram showing an LDPC code structure according to an embodiment of the present application;
FIG. 3 is a schematic diagram of an LDPC code sub-matrix according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a constructed LDPC code according to an embodiment of the present application;
FIG. 5 is a diagram showing a sum product performance analysis of different half-port codes of each sub-matrix under an additive Gaussian noise channel according to an embodiment of the application;
fig. 6 shows a schematic structural diagram of an LDPC code construction apparatus for flash memory according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments.
The components of the embodiments of the present application generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the application, as presented in the figures, is not intended to limit the scope of the application, as claimed, but is merely representative of selected embodiments of the application. All other embodiments, which can be made by a person skilled in the art without making any inventive effort, are intended to be within the scope of the present application.
The terms "comprises," "comprising," "including," or any other variation thereof, are intended to cover a specific feature, number, step, operation, element, component, or combination of the foregoing, which may be used in various embodiments of the present application, and are not intended to first exclude the presence of or increase the likelihood of one or more other features, numbers, steps, operations, elements, components, or combinations of the foregoing. Furthermore, the terms "first," "second," "third," and the like are used merely to distinguish between descriptions and should not be construed as indicating or implying relative importance.
Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which various embodiments of the application belong. The terms (such as those defined in commonly used dictionaries) will be interpreted as having a meaning that is the same as the context of the relevant art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein in connection with the various embodiments of the application.
The application provides a construction method of the LDPC code of a flash memory, which is characterized in that the construction method is characterized in that each sub-matrix is obtained by simplifying operation after the sub-matrix is constructed, then each sub-matrix is spliced to obtain a mother matrix, then corresponding checking operation is carried out, rings in the mother matrix are removed, and finally the needed QC-LDPC code matrix is obtained.
The LDPC code construction method of the flash memory is described below in connection with some specific embodiments.
Fig. 1 shows a flowchart of an LDPC code construction method of a flash memory according to an embodiment of the present application. Exemplary, the LDPC code construction method of the flash memory includes the steps of:
Step S100, determining construction parameters of the LDPC code, wherein the construction parameters are used for constructing a mother matrix of the LDPC code.
The LDPC code is a QC-LDPC code matrix used for error correction and data protection in the flash memory. The LDPC code comprises a plurality of submatrices, the concrete form of which is shown in figure 2, and comprises A, B, C, D, E, F and seven parts G in total, wherein part A corresponds to a user data matrix, part B corresponds to a code rate compatible matrix, part C is a full '-1' matrix and corresponds to an expanded full 0 matrix, part D, F, G corresponds to a dense matrix, and part E corresponds to an expanded unit matrix.
The construction of the LDPC code is related to the flash memory in which the LDPC code works, the LDPC code needs to be designed according to hardware parameters of the flash memory, otherwise, the generated LDPC code cannot work normally in the flash memory.
For convenience of explanation, the hardware parameters of the target flash memory that are compatible with the QC-LDPC code are preset in this embodiment, where the hardware parameters include a minimum page capacity, a maximum page capacity, a throughput rate, and an operating frequency. For convenience of explanation and calculation, the exemplary data of each working parameter is given herein that the minimum page capacity is written as MLC 16384+1536 Bytes, corresponding to the highest code rate of the matrix, and the maximum page capacity is written as QLC 16384+2608 Bytes, corresponding to the lowest code rate of the matrix. The number of stored codewords T per logical page is 4. Design throughput rate Φ > =4G Bps, design operating frequency f is 500 MHz.
First a maximum codeword length L is calculated from said maximum page capacity. The specific calculation expression is L= (16384+2608)/T=4748 Bytes.
In the formula, T as a denominator is 4, and the above result is obtained.
And calculating the size of the user data field of each codeword according to the length of the firmware padding and the cyclic redundancy check.
The firmware fill length is a known value, preferably 12 in this embodiment, denoted OOB (Out-of-Band field), and the cyclic redundancy check is a known value, preferably 4 in this embodiment, denoted CRC (Cyclic Redundancy Check).
The size lu= (16384/T) +oob+crc=4748 Bytes of each codeword user data field.
And calculating a lifting factor according to the maximum codeword length and the size of the user data field of each codeword.
The lifting factor needs to satisfy the following inequality:
in the formula, i is the convergence iteration number, and in this embodiment, it is preferably 3. Then post-take calculations may be made:
to facilitate data transfer and conversion, Z is typically an integer power of 2, where the lifting factor Z is preferably 256.
And calculating the column number of the user data field according to the lifting factor and the size of the user data field of each codeword.
The calculation expression of the user field K is that k=ceil (Lu/Z), ceil represents an upper rounding, where k=ceil (4112/32) =129, i.e. the number of columns corresponding to the user field is 129 columns, and 16 Bytes needs to be filled in the tail of the user data during encoding to match the requirement of Z-size alignment of QC-LDPC codes.
Next, the number of mother matrix rows M and the number of sub-matrix rows M1 corresponding to the highest code rate need to be calculated, which has the following expression:
;
;
For example, the highest code rate R1= 0.9214 and R2= 0.8694 to be compatible, and the above expression can be carried out to calculate M=19 and M1 =11, thus obtaining the construction parameters of the LDPC code.
According to the above construction parameters, a mother matrix of the LDPC code shown in fig. 2, that is, a size of the maximum matrix, may be constructed, and at this time, each element in the mother matrix has no initial value, which may be a default value such as 0 or null.
In the figure, N is the number of columns of the mother matrix, and the number of columns is based on the number of columns of the child matrix, so that no calculation is performed separately, and after the mother matrix is constructed by the child matrix in the subsequent step, the number of columns N is the number of columns of the mother matrix after the construction is completed.
Step S200, a prototype matrix of each submatrix is constructed, and the structure of each submatrix is simplified.
Two of the all-1 and all-0 matrices do not require special processing and therefore primarily handle user data matrices, code rate compatible matrices, and dense matrices.
And setting the first row data of the user data matrix to 0, and setting the diagonal data of the code rate compatible matrix to 0. The complexity of the coding can be simplified, because the cyclic shift operation is not needed for all 0 rows, the cyclic shift operation of the first row is directly reduced, and the exclusive or calculation can be directly performed.
In order to ensure that the check bit part is reversible, the dense matrix G is set to be a full matrix, and the column weight of each submatrix is set to be a value in a preset interval based on a preset column weight.
From this, the mother matrix maximum column weight is determined to be g+1. In order to ensure the power consumption balance of hardware, the relative concentration of column weights is kept, the solution of the subsequent steps is convenient, the column weights of the matrix A and the matrix B are defined as g-1, and the column weight of the D+F part is defined as g.
The column weights refer to the number of 1 in the column data of the matrix, because the decoding operation is performed column by column, the size in the column determines the power consumption of the processor when the column is processed, and the column weights are distributed in the manner described above, so that the column weights of all the columns are in the range around the preset column weight g, the processor does not have larger power consumption fluctuation when processing, can work in a stable state, and is a friendly stable state for both the processor and a power supply. Thus, the construction of each sub-matrix is completed.
And step S300, merging the simplified submatrices to obtain a submatrices of the mother matrix, and merging the submatrices to obtain a mother code prototype matrix.
In order to ensure maximum local girth and reduce the number of rings in the prototype matrix as much as possible, the present embodiment may employ a gradient edge (Progressing Edge Growth, PEG) algorithm to construct the prototype matrix for each sub-matrix.
After the sub-matrices are spliced according to the construction shown in fig. 2, a prototype matrix is obtained, which meets the construction parameters in step S100.
If the current adaptation length of the size of the flash memory logical page is N-2 columns, the current N columns are larger than the size of the flash memory logical page, and 2 rows and 2 columns need to be deleted when the current adaptation length of the size of the flash memory logical page is equal to the size of the flash memory logical page.
Meanwhile, in order to ensure the maximum local girth, the number of rings in a prototype matrix is reduced as much as possible, the rings are required to be a structure in the matrix, 4 rings cannot exist in the QC-LDPC code matrix, and the rings consist of 1, so that rows and columns with 1 need to be deleted. The present embodiment will therefore perform row and column erasures based on the flash logical page size.
The ring is a closed loop formed by connecting variable nodes, check nodes and edges end to end, and the 4-ring is a ring with the edge length of 4. For QC-LDPC codes, 4 loops in the matrix can be eliminated after reasonable assignment.
For rows, there is necessarily no 1 because the first row has been set to all 0s, so when a row needs to be deleted, the first row does not have to be deleted, and thus deletion can be started from the second row. The first row may be the first check block by exclusive-or operation of the information blocks, and may be the first row of all sub-matrices.
When deleting a column, the column needs to be deleted from the second column of the code rate compatible matrix, and because each element in the code rate compatible matrix can be calculated through the first element, the subsequent element deletion has no influence as long as the first element is reserved, and the column can be deleted from the second column of the code rate compatible matrix.
Thus reflecting the entire mother matrix, such as flash memory grains with compatible page sizes 16384+2432 Bytes, corresponding to 18×147 sub-matrices, corresponding to the removal of row 2 and column 131 from the mother matrix, the final prototype matrix example is shown in fig. 4.
It should be noted that, the subcode rate matrix obtained by combining in the above manner, that is, a subcode rate matrix corresponding to one of the subcode rates supported by the device, by using the above manner, a corresponding subcode rate matrix can be obtained for each subcode rate, and in this embodiment, the subcode rate matrices are further combined together to obtain a mother code prototype matrix.
In this embodiment, each sub-code rate matrix is combined to be a mother code prototype matrix, which may be obtained by performing or logic on the position of 1 in the sub-code rate matrix and the position of 1 in the corresponding mother matrix, and traversing all the sub-matrices to be supported. The merging when the sub-matrix size is (M-1) x (N-1) is as shown in fig. 3, the cumulative or temporary matrix 1 is the matrix which is bit-pressed or before the sub-matrix (M-1) x (N-1), the cumulative or temporary matrix 2 is the matrix which is bit-pressed or after the sub-matrix (M-1) x (N-1), and when all the sub-matrices are bit-pressed or after the completion of the cumulative or temporary matrix is the mother code prototype matrix.
The cumulative or temporary matrix is a matrix which is 0 at the initial time, for example, 5 sub-code rate matrixes exist, then the five sub-code rate matrixes and the cumulative or temporary matrix are subjected to OR operation in sequence, and after 5 OR operations are finished, the final cumulative or temporary matrix is a mother code prototype matrix which is an LDPC matrix used for verification.
And step S400, cyclic shift values are assigned to the mother code prototype matrix in an arithmetic progression mode.
The arithmetic method is to assign an arithmetic value to each row of the mother code prototype matrix, set an initial value to the first column, and then calculate the value of each element in each row based on the difference and the initial value.
According to the 4-ring-free theory of QC-LDPC codes, the arithmetic difference values of each row are different. The differences may be preferentially selected from prime numbers within 0~Z as the equal differences.
Illustratively, in this embodiment, Z is 256, so for the first few rows, the requirement that the last active element be "0" requires that the initial value of the first column be obtained according to the row weight of the row. In this embodiment, the arithmetic differences of the 1 st line to the 19 th line are 0, 5, 7, 2, 3, 1, 23, 6, 10, 110, 214, 27, 167, 163, 149, 17, 223, 151, and 4 in this order. The initial values of the 1 st to 19 th rows of this embodiment are 0, 175, 150, 138, 246, 97, 206, 154, 106, 256, 126, 47, 61, 174, 197, 94, 62, 70, and 229 in this order.
In this way, the shift values to the respective positions in the matrix can be calculated.
And S500, detecting whether each sub-matrix in the mother code prototype matrix contains 4 rings or not under the current shift value, if so, re-executing the step of endowing the mother code prototype matrix with a cyclic shift value by an arithmetic array method, and if not, finishing construction.
After the calculation is completed, it is necessary to check whether each sub-matrix contains 4 rings, wherein 4 rings are 4 rings consisting of 1, and if not, the construction is ended, and if so, the above step S400 is required to be executed again until there is no 4 rings in each sub-matrix.
As shown in fig. 5, the decoding algorithm is an ideal sum product decoding algorithm, the size in the figure is the size of the submatrix, the abscissa is the original bit error rate, and the ordinate is the uncorrected bit error rate, which is the sum product performance analysis of different half-port codes of each submatrix under the additive gaussian noise channel after the 4-ring division. It can be seen that as the original bit error rate increases, the uncorrected bit error rate of each sub-matrix exhibits a convergence state, which can indicate that the uncorrected bit error rate of each sub-matrix is effectively controlled after 4-ring division.
The LDPC code construction method of the flash memory of the embodiment can reduce the shift calculation amount in the subsequent error correction application of the LDPC code by simplifying the structure of each submatrix, also simplifies the design structure, reduces random shift to fixed shift by applying a cyclic shift value to the prototype matrix by an arithmetic array method, simplifies the hardware realization complexity, simplifies the storage cost of the cyclic shift value, and only needs to store an initial value and a difference value. And then, through detecting the shift value, the LDPC code finally generated is ensured not to have a loop, so that the stability of constructing the LDPC code is improved, the construction process of the LDPC code finally constructed is simple, the stable power consumption can be ensured when the LDPC code is actually calculated and used, the calculation operation is reduced, the burden of hardware is reduced, and the working efficiency is further improved.
Fig. 6 shows an LDPC code construction apparatus of a flash memory according to an embodiment of the present application, including:
A first construction module 10, configured to determine construction parameters of an LDPC code, where the construction parameters are used to construct a mother matrix of the LDPC code;
a second construction module 20, configured to construct a prototype matrix of each sub-matrix, and simplify the structure of each sub-matrix, so as to obtain each simplified sub-matrix;
A merging module 30, configured to merge the simplified submatrices to obtain a submatrices of the mother matrix, and merge the submatrices to obtain a mother code prototype matrix;
An assignment module 40, configured to assign cyclic shift values to the mother code prototype matrix by means of an arithmetic progression;
and the detection module 50 is configured to detect whether each sub-matrix in the mother code prototype matrix contains 4 rings under the current shift value, if so, re-execute the step of applying a cyclic shift value to the mother code prototype matrix by using the arithmetic array method, and if not, finish the construction.
The application also provides a terminal device comprising a processor and a memory, wherein the memory stores a computer program, and the processor is used for executing the computer program to implement the LDPC code construction method of the flash memory.
The terminal device of the present embodiment may be an electronic device such as a computer, a mobile phone, or a tablet, in which a flash memory is loaded, and the LDPC code in the flash memory is constructed based on the LDPC code construction method of the foregoing embodiment.
The present application also provides a computer-readable storage medium storing a computer program which, when executed on a processor, implements the method of constructing an LDPC code of a flash memory.
It will be appreciated that the apparatus of this embodiment corresponds to the method of the above embodiment, and that the alternatives in the above embodiment are equally applicable to this embodiment, so that the description will not be repeated here.
The processor may be an integrated circuit chip with signal processing capabilities. The processor may be a general purpose processor including at least one of a central processing unit (Central Processing Unit, CPU), a graphics processor (Graphics Processing Unit, GPU) and a network processor (Network Processor, NP), a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like that may implement or perform the methods, steps, and logic blocks disclosed in embodiments of the present application.
The Memory may be, but is not limited to, random access Memory (Random Access Memory, RAM), read Only Memory (ROM), programmable Read Only Memory (Programmable Read-Only Memory, PROM), erasable Read Only Memory (Erasable Programmable Read-Only Memory, EPROM), electrically erasable Read Only Memory (Electric Erasable Programmable Read-Only Memory, EEPROM), etc. The memory is used for storing a computer program, and the processor can correspondingly execute the computer program after receiving the execution instruction.
The computer readable storage medium of the present application stores the computer program used in the terminal device. For example, the computer readable storage medium may include, but is not limited to, U disk, removable hard disk, read-Only Memory (ROM), random access Memory (RAM, random Access Memory), magnetic or optical disk, etc. various media that can store program code.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. The apparatus embodiments described above are merely illustrative, for example, of the flow diagrams and block diagrams in the figures, which illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, functional modules or units in various embodiments of the application may be integrated together to form a single part, or the modules may exist alone, or two or more modules may be integrated to form a single part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a smart phone, a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present application.
The foregoing is merely illustrative of the present application, and the present application is not limited thereto, and any person skilled in the art will readily recognize that variations or substitutions are within the scope of the present application.

Claims (12)

Translated fromChinese
1.一种闪存的LDPC码构建方法,其特征在于,包括:1. A method for constructing an LDPC code for a flash memory, comprising:确定LDPC码的构造参数,所述构造参数用于构建所述LDPC码的母矩阵;Determining construction parameters of an LDPC code, wherein the construction parameters are used to construct a mother matrix of the LDPC code;构建各个子矩阵的原型矩阵,并简化各个子矩阵的结构,获得各个简化后的子矩阵;Constructing prototype matrices of each submatrix, and simplifying the structure of each submatrix to obtain each simplified submatrix;合并所述各个简化后子矩阵得到所述母矩阵的子码率矩阵,合并各个所述子码率矩阵,得到母码原型矩阵;Combining the simplified sub-matrices to obtain a sub-rate matrix of the mother matrix, and combining the sub-rate matrices to obtain a mother code prototype matrix;通过等差数列方式对所述母码原型矩阵赋循环移位值;Assigning cyclic shift values to the mother code prototype matrix by means of an arithmetic progression;检测当前移位值下,所述母码原型矩阵中各个子矩阵是否含有4环,若含有4环,则重新执行所述通过等差数列法对所述母码原型矩阵赋循环移位值的步骤,若不含有4环则构建结束。Under the current shift value, it is detected whether each sub-matrix in the mother code prototype matrix contains 4 rings. If it contains 4 rings, the step of assigning a cyclic shift value to the mother code prototype matrix by the arithmetic progression method is re-executed. If it does not contain 4 rings, the construction is completed.2.根据权利要求1所述的闪存的LDPC码构建方法,其特征在于,所述确定LDPC码的构造参数,所述构造参数用于构建所述LDPC码的母矩阵,包括:2. The method for constructing an LDPC code of a flash memory according to claim 1, wherein the determining of the construction parameters of the LDPC code, wherein the construction parameters are used to construct a mother matrix of the LDPC code, comprises:根据目标闪存的硬件参数,计算提升因子,根据所述提升因子,计算用户数据矩阵的列数;Calculate a boost factor according to hardware parameters of the target flash memory, and calculate the number of columns of the user data matrix according to the boost factor;确定所述目标闪存的最高码率和最低码率,根据所述用户数据矩阵的列数、所述最高码率和所述最低码率,计算得到所述母矩阵的行数和各个子矩阵的行数。The maximum code rate and the minimum code rate of the target flash memory are determined, and the number of rows of the mother matrix and the number of rows of each sub-matrix are calculated according to the number of columns of the user data matrix, the maximum code rate and the minimum code rate.3.根据权利要求1所述的闪存的LDPC码构建方法,其特征在于,所述子矩阵包括用户数据矩阵、码率兼容矩阵、全-1矩阵、密集矩阵和一个特定结构子矩阵;3. The method for constructing an LDPC code of a flash memory according to claim 1, wherein the sub-matrix comprises a user data matrix, a rate compatibility matrix, an all-1 matrix, a dense matrix and a specific structure sub-matrix;所述构建各个子矩阵的原型矩阵,并简化各个子矩阵的结构,包括:The step of constructing a prototype matrix of each sub-matrix and simplifying the structure of each sub-matrix includes:将所述用户数据矩阵第一行数据都设置为0,将所述码率兼容矩阵的对角线数据都设置为0;The first row of the user data matrix is set to 0, and the diagonal data of the rate compatible matrix is set to 0;将所述密集矩阵设置为满矩阵,并基于预设列重,将各个所述子矩阵的列重设置为预设区间内的值;列重为是矩阵一列数据中1的个数。The dense matrix is set to a full matrix, and based on a preset column weight, the column weight of each sub-matrix is set to a value within a preset interval; the column weight is the number of 1s in a column of matrix data.4.根据权利要求3所述的闪存的LDPC码构建方法,其特征在于,所述基于预设列重,将各个所述子矩阵的列重设置为预设区间内的值还包括:4. The method for constructing an LDPC code of a flash memory according to claim 3, wherein the step of setting the column weight of each submatrix to a value within a preset interval based on the preset column weight further comprises:所述母矩阵最大列重不大于预设列重+1;The maximum column weight of the mother matrix is not greater than the preset column weight+1;所述用户数据矩阵最大列重不大于预设列重-1;The maximum column weight of the user data matrix is not greater than the preset column weight - 1;所述码率兼容矩阵最大列重不大于预设列重-1。The maximum column weight of the rate compatibility matrix is no greater than the preset column weight-1.5.根据权利要求3所述的闪存的LDPC码构建方法,其特征在于,合并各个所述简化后子矩阵得到所述母矩阵的子码率矩阵,包括:5. The method for constructing an LDPC code of a flash memory according to claim 3, characterized in that merging each of the simplified sub-matrices to obtain a sub-rate matrix of the mother matrix comprises:通过渐进边算法对各个子矩阵进行原型矩阵构造,并按照预设位置合并各个所述简化后子矩阵;Constructing a prototype matrix for each sub-matrix by a progressive edge algorithm, and merging each simplified sub-matrix according to a preset position;确定需要删除的行列数量,从第二行开始连续删除需要删除的行,从所述码率兼容矩阵的第二列开始连续删除需要删除的列,得到所述母矩阵的子码率矩阵。The number of rows and columns to be deleted is determined, the rows to be deleted are continuously deleted starting from the second row, and the columns to be deleted are continuously deleted starting from the second column of the rate compatibility matrix to obtain a sub-rate matrix of the mother matrix.6.根据权利要求1所述的闪存的LDPC码构建方法,其特征在于,所述合并各个所述子码率矩阵,得到母码原型矩阵,包括:6. The method for constructing an LDPC code of a flash memory according to claim 1, wherein the step of merging the sub-rate matrices to obtain a mother code prototype matrix comprises:将各个子码率矩阵1的位置分别和累或临时矩阵进行逻辑或,得到母码原型矩阵。The positions of the sub-coding rate matrices 1 are respectively logically ORed with the cumulative or temporary matrix to obtain the mother code prototype matrix.7.根据权利要求2所述的闪存的LDPC码构建方法,其特征在于,所述通过等差数列方式对所述母码原型矩阵赋循环移位值,包括;7. The method for constructing an LDPC code of a flash memory according to claim 2, wherein the step of assigning a cyclic shift value to the mother code prototype matrix by means of an arithmetic progression comprises:选取0至所述提升因子之间的任意素数作为所述母码原型矩阵各行的等差值;各行的等差值不同;Select any prime number between 0 and the lifting factor as the arithmetic difference value of each row of the mother code prototype matrix; the arithmetic difference value of each row is different;为所述母码原型矩阵第一列设置各个行的初始值;Setting initial values of each row for the first column of the mother code prototype matrix;根据各个行的初始值和各个行的等差值,生成各个行的循环移位值。According to the initial value of each row and the arithmetic difference value of each row, the cyclic shift value of each row is generated.8.根据权利要求2所述的闪存的LDPC码构建方法,其特征在于,所述硬件参数包括固件填充的长度、循环冗余校验长度、最小页容量、最大页容量、吞吐率和工作频率;8. The method for constructing an LDPC code of a flash memory according to claim 2, wherein the hardware parameters include a firmware padding length, a cyclic redundancy check length, a minimum page capacity, a maximum page capacity, a throughput rate, and an operating frequency;所述根据目标闪存的硬件参数,计算提升因子,根据所述提升因子,计算用户数据字段的列数,包括:The step of calculating the boost factor according to the hardware parameters of the target flash memory, and calculating the number of columns of the user data field according to the boost factor, comprises:根据所述最大页容量及码字个数计算最大码字长度;Calculate the maximum codeword length according to the maximum page capacity and the number of codewords;根据所述固件填充的长度和所述循环冗余校验计算每个码字的用户数据字段的大小;Calculate the size of the user data field of each codeword according to the length of the firmware padding and the cyclic redundancy check;根据所述最大码字长度、吞吐率、工作频率、所述每个码字的用户数据字段的大小及所述目标闪存控制器硬件参数计算提升因子;Calculating a boost factor according to the maximum codeword length, the throughput rate, the operating frequency, the size of the user data field of each codeword, and the target flash memory controller hardware parameters;根据所述提升因子和所述每个码字的用户数据字段的大小计算所述用户数据字段的列数。The number of columns of the user data field is calculated according to the lifting factor and the size of the user data field of each codeword.9.根据权利要求8所述的闪存的LDPC码构建方法,其特征在于,所述确定兼容的最高码率和最低码率,根据所述最高码率和所述最低码率,计算得到所述母矩阵的行数、各个子矩阵的行数,包括:9. The method for constructing an LDPC code for a flash memory according to claim 8, wherein the determining of the compatible highest code rate and the lowest code rate, and calculating the number of rows of the mother matrix and the number of rows of each sub-matrix according to the highest code rate and the lowest code rate, comprises:根据预设的不等式,计算所述母矩阵的行数和各个子矩阵的行数;According to a preset inequality, the number of rows of the mother matrix and the number of rows of each sub-matrix are calculated;所述不等式的表达式为;The expression of the inequality is: ; ;式中,R为所述最低码率,R1为所述最高码率,K为所述用户数据字段的列数,M为所述母矩阵的行数,M1为所述最高码率对应的子矩阵行数。Wherein, R is the minimum code rate,R1 is the maximum code rate, K is the number of columns of the user data field, M is the number of rows of the mother matrix, andM1 is the number of sub-matrix rows corresponding to the maximum code rate.10.一种闪存的LDPC码构建装置,其特征在于,包括:10. A flash memory LDPC code construction device, characterized by comprising:第一构建模块,用于确定LDPC码的构造参数,所述构造参数用于构建所述LDPC码的母矩阵;A first construction module, used to determine construction parameters of an LDPC code, wherein the construction parameters are used to construct a mother matrix of the LDPC code;第二构建模块,用于构建各个子矩阵的原型矩阵,并简化各个子矩阵的结构,获得各个简化后的子矩阵;The second construction module is used to construct a prototype matrix of each sub-matrix and simplify the structure of each sub-matrix to obtain each simplified sub-matrix;合并模块,用于合并所述各个简化后子矩阵得到所述母矩阵的子码率矩阵,合并各个所述子码率矩阵,得到母码原型矩阵;A merging module, configured to merge the simplified sub-matrices to obtain a sub-rate matrix of the mother matrix, and merge the sub-rate matrices to obtain a mother code prototype matrix;赋值模块,用于通过等差数列方式对所述母码原型矩阵赋循环移位值;An assignment module, used to assign a cyclic shift value to the mother code prototype matrix by an arithmetic progression;检测模块,用于检测当前移位值下,所述母码原型矩阵中各个子矩阵是否含有4环,若含有4环,则重新执行所述通过等差数列法对所述母码原型矩阵赋循环移位值的步骤,若不含有4环则构建结束。A detection module is used to detect whether each sub-matrix in the mother code prototype matrix contains 4 rings under the current shift value. If it contains 4 rings, the step of assigning a cyclic shift value to the mother code prototype matrix by an arithmetic progression method is re-executed; if it does not contain 4 rings, the construction is terminated.11.一种终端设备,其特征在于,所述终端设备包括处理器和存储器,所述存储器存储有计算机程序,所述处理器用于执行所述计算机程序以实施权利要求1-9中任一项所述的闪存的LDPC码构建方法。11. A terminal device, characterized in that the terminal device comprises a processor and a memory, the memory stores a computer program, and the processor is used to execute the computer program to implement the LDPC code construction method for a flash memory according to any one of claims 1 to 9.12.一种计算机可读存储介质,其特征在于,其存储有计算机程序,所述计算机程序在处理器上执行时,实施根据权利要求1-9中任一项所述的闪存的LDPC码构建方法。12. A computer-readable storage medium, characterized in that it stores a computer program, and when the computer program is executed on a processor, it implements the LDPC code construction method for a flash memory according to any one of claims 1 to 9.
CN202510639147.3A2025-05-192025-05-19 LDPC code construction method, device, terminal equipment and storage medium for flash memoryActiveCN120165705B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202510639147.3ACN120165705B (en)2025-05-192025-05-19 LDPC code construction method, device, terminal equipment and storage medium for flash memory

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202510639147.3ACN120165705B (en)2025-05-192025-05-19 LDPC code construction method, device, terminal equipment and storage medium for flash memory

Publications (2)

Publication NumberPublication Date
CN120165705Atrue CN120165705A (en)2025-06-17
CN120165705B CN120165705B (en)2025-09-16

Family

ID=96005332

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202510639147.3AActiveCN120165705B (en)2025-05-192025-05-19 LDPC code construction method, device, terminal equipment and storage medium for flash memory

Country Status (1)

CountryLink
CN (1)CN120165705B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20130179757A1 (en)*2011-03-222013-07-11Nec CorporationError correct coding device, error correct coding method, and error correct coding program
US20160173132A1 (en)*2014-12-102016-06-16Alcatel-Lucent Usa Inc.Construction of Structured LDPC Convolutional Codes
WO2018126788A1 (en)*2017-01-042018-07-12中兴通讯股份有限公司Quasi-cyclic low-density parity check encoding method and device, and storage medium
US20190349006A1 (en)*2017-06-272019-11-14Huawei Technologies Co., Ltd.Method and apparatus for low density parity check channel coding in wireless communication system
US20200220556A1 (en)*2017-07-102020-07-09Huawei Technologies Co., Ltd.Generalized low-density parity check codes in digital communication system
WO2024002171A1 (en)*2022-06-302024-01-04大唐移动通信设备有限公司Encoding method and apparatus, and storage medium
CN118642887A (en)*2024-06-142024-09-13广东工业大学 A coding method and device for NAND flash memory
CN118708400A (en)*2024-07-022024-09-27广东工业大学 A multi-rate structured QC-LDPC coding method for 3D NAND flash memory

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20130179757A1 (en)*2011-03-222013-07-11Nec CorporationError correct coding device, error correct coding method, and error correct coding program
US20160173132A1 (en)*2014-12-102016-06-16Alcatel-Lucent Usa Inc.Construction of Structured LDPC Convolutional Codes
WO2018126788A1 (en)*2017-01-042018-07-12中兴通讯股份有限公司Quasi-cyclic low-density parity check encoding method and device, and storage medium
US20190349006A1 (en)*2017-06-272019-11-14Huawei Technologies Co., Ltd.Method and apparatus for low density parity check channel coding in wireless communication system
US20200220556A1 (en)*2017-07-102020-07-09Huawei Technologies Co., Ltd.Generalized low-density parity check codes in digital communication system
WO2024002171A1 (en)*2022-06-302024-01-04大唐移动通信设备有限公司Encoding method and apparatus, and storage medium
CN118642887A (en)*2024-06-142024-09-13广东工业大学 A coding method and device for NAND flash memory
CN118708400A (en)*2024-07-022024-09-27广东工业大学 A multi-rate structured QC-LDPC coding method for 3D NAND flash memory

Also Published As

Publication numberPublication date
CN120165705B (en)2025-09-16

Similar Documents

PublicationPublication DateTitle
KR101535225B1 (en) Decoding method and memory system device using the method
US8996972B1 (en)Low-density parity-check decoder
US10707902B2 (en)Permutation network designing method, and permutation circuit of QC-LDPC decoder
JP5752317B2 (en) Method for obtaining quasi-cyclic low density parity check code and system for encoding data based on quasi-cyclic low density parity check code
KR101753498B1 (en)Updating Reliability Data
TWI626830B (en)Low-density parity check decoder and associated power saving method
TWI652908B (en)Method for determining when to end bit flipping algorithm during hard decision soft decoding
CN109120374B (en) Quasi-cyclic low-density parity-check coding design method and device
JP5631846B2 (en) Semiconductor memory device and decoding method
WO2011109084A1 (en)Quasi-cyclic ldpc encoding and decoding for non-integer multiples of circulant size
JP2011065599A (en)Memory system and method of controlling the same
KR20160150507A (en)Data storage device and operating method thereof
US10700708B2 (en)Permutation network designing method, and permutation circuit of QC-LDPC decoder
CN109921802B (en)Decoding method, module and device of QC-LDPC code
WO2016107377A1 (en)Data processing method and system based on quasi-cyclic ldpc
CN108649963B (en) QC-LDPC decoder, layered decoding method, storage device and communication module
CN110113058B (en)Coding and decoding method, device, equipment and computer readable storage medium
CN109935263B (en)Encoding and decoding method of nonvolatile memory and storage system
CN120165705B (en) LDPC code construction method, device, terminal equipment and storage medium for flash memory
US10289348B2 (en)Tapered variable node memory
CN103354101B (en)A kind of LDPC code decoding device for flash memory error correction
EP4538890A1 (en)Decoding method, chip and related apparatus
CN106849959B (en)Data processing method and decoder
CN110971240B (en)Decoder design method and memory controller
CN118642887A (en) A coding method and device for NAND flash memory

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp