# US 2015/0149859 A1 · Method and apparatus for encoding and decoding data in memory system

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2015/0149859 A1
- Document ID: US20150149859A1
- Status: Published application
- Kind: A1
- Application number: 14/542,828
- Filed: 2014-11-17
- Published: 2015-05-28
- Earliest claimed: 2013-11-25
- Assignees: Samsung Electronics Co., Ltd.
- Applicants: Samsung Electronics Co., Ltd.
- Inventors: Moshe TWITTO; Avner DOR; Jun Jin KONG; Jung Soo CHUNG
- Web page: https://patentgrep.com/patent/US20150149859A1

## CPC

- G06F 11/1012: {using codes or arrangements adapted for a specific type of error (G06F11/1048 takes precedence)}
- H03M 13/036: {Heuristic code construction methods, i.e. code construction or code search based on using trial-and-error}
- H03M 13/1157: {Low-density generator matrices [LDGM]}
- H03M 13/118: {Parity check matrix structured for simplifying encoding, e.g. by having a triangular or an approximate triangular structure (H03M13/1165 takes precedence)}
- H03M 13/373: {with erasure correction and erasure determination, e.g. for packet loss recovery or setting of erasures for the decoding of Reed-Solomon codes}
- H03M 13/3746: {with iterative decoding}
- H03M 13/611: {Specific encoding aspects, e.g. encoding by means of decoding}
- G06F 11/108: {Parity data distribution in semiconductor storages, e.g. in SSD}
- G06F 2211/109: Sector level checksum or ECC, i.e. sector or stripe level checksum or ECC in addition to the RAID parity calculation
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- H03M: CODING; DECODING; CODE CONVERSION IN GENERAL (using fluidic means F15C4/00; optical analogue/digital converters G02F7/00; coding, decoding or code conversion, specially adapted for particular applications, see the relevant subclasses, e.g. G01D, G01R, G06F, G06T, G09G, G10L, G11B, G11C, H04B, H04L, H04M, H04N; ciphering or deciphering for cryptography or other purposes involving the need for secrecy G09C)

## Abstract

Example embodiments disclose methods and apparatuses for encoding and decoding data in a memory system. In an encoding method according to an example embodiment of inventive concepts, a codeword is generated based on a combination of data to be stored and auxiliary data according to stuck cells and an encoding matrix based on information, regarding coordinates of the stuck cells and values of the stuck cells. The generated codeword includes data corresponding to the values of the stuck cells at addresses corresponding to the coordinates of the stuck cells, in a decoding method according to an example embodiment of inventive concepts, data may be generated by multiplying an inverse matrix of the encoding matrix used for encoding by the codeword.

## Claims

### Claim 1

An encoder comprising:
a first vector generator configured to generate a vector u corresponding to data to be stored in a plurality of memory cells including t stuck cells, the vector having n−s entries n, s and t are integers, n is greater than or equal to s, s is greater than or equal to t and t is greater than or equal to zero;
a matrix generator configured to generate an encoding matrix G;
a second vector generator configured to receive information α and information μ and generate a vector w having s entries based on the information α, the information μ, and the encoding matrix G the information α including coordinates of the stuck cells, and the information μ including values of the stuck cells; and
a third vector generator configured to generate a vector v having n entries based on the encoding matrix G and a vector x, the vector x being a concatenation of the vector w and the vector u, and entries of the vector v correspond to the information α and include the values of the stuck cells according to the information μ.

### Claim 2 (depends on 1)

The encoder of claim 1, further comprising:
a header generator configured to generate a header including a label of the encoding matrix G and s.

### Claim 3 (depends on 1)

The encoder of claim 1, wherein
α={α(1), . . . , α(t)}, 1≦α(1)< . . . <α(t)≦n,
μ={μ(1), . . . , μ(t)},
u=[u1 . . . un−s]T,
w=[w1 . . . ws]T,
x=[w1 . . . ws u1 . . . un−s]T, and
v=[v1 . . . vn]T, vα(j)=μ(j), I≦j≦t where j is an integer,
the matrix generator is configured to generate the encoding matrix G such that.
G=[G1, G2]=[G11, 0n×(n−s); G21, I(n−s)×(n−s)],
where G1 is a n×s first encoding matrix, G2 is a n×(n−s) second encoding matrix, G11 is a s×s invertible matrix, G21 is a (n−s)×s matrix, 0s×(n−s) is a zero matrix, and I(n−s)×(n−s) is a unit matrix,
the second vector generator is configured to generate the vector w such that,
[G1·w]α(j)=μ(j)−[G2·u]α(j)(1≦j≦t), and
the third vector generator is configured to determine a vector y such that
y=[y1 . . . yn]T=G1·w, and
v=[v1 . . . vn]T=y+[0 . . . 0 ui . . . un−s]T.

### Claim 4 (depends on 3)

The encoder of claim 3, wherein the s×s invertible matrix G11 is a unit matrix and the (n−s)×s matrix G21 includes independently and identically distributed (i.i.d.) entries having values 0 or 1, each of the i.i.d. entries having with a ½ probability of being 1.

### Claim 5 (depends on 3)

The encoder of claim 3, wherein, the matrix generator is configured to generate rows of the first encoding matrix G1 based on sampled row vectors that are independently and identically distributed.

### Claim 6 (depends on 3)

The encoder of claim 3, wherein the matrix generator is configured to generate the first encoding matrix G1 as a transposed matrix HT of a check matrix H for binary erasure channel (BEC) codes.

### Claim 7

A method for encoding data, the method comprising:
generating a vector u corresponding to data to be stored in n memory cells including t stuck cells, the vector u having n−s entries, where n, s, and t are integers, n is greater than or equal to s, s is greater than or equal to t and t is greater than or equal to zero;
generating a vector w having s entries based on information α and information μ, the information α including coordinates of the stuck cells and the information μ including values of the stuck cells,
generating an n×n encoding matrix G; and
generating a vector v having n entries based on the encoding matrix G and a vector x, the vector x being a concatenation of the vector w and the vector u, and entries of the vector v correspond to the information α and include the values of the stuck cells according to the information μ.

### Claim 8 (depends on 7)

The method of claim 7, wherein the encoding matrix G includes a n×s first encoding matrix G1 and a n×(n−s) second encoding matrix G2,
the generating of the vector w includes determining t linear equations and using s roots as entries of the vector w, coefficients of the t linear equations are entries included in rows of the first encoding matrix G1 corresponding to the information α, and
determining constant terms of the t linear equations based on calculations of entries in rows of the second encoding matrix G2.

### Claim 9 (depends on 8)

The method of claim 8, wherein the generating the vector v adds a product of the first encoding matrix G1 and the vector w to a product of the second encoding matrix G2 and the vector u.

### Claim 10 (depends on 8)

The method of claim 8, wherein the generating the vector w replaces the encoding matrix G with another encoding matrix G, if s roots do not exist, the method further comprising:
generating a header including a label of the encoding matrix G used for generating the vector w and s.

### Claim 11 (depends on 8)

The method of claim 8, further comprising:
generating the encoding matrix G using at least one matrix that is randomly or pseudo-randomly sampled.

### Claim 12 (depends on 11)

The method of claim 11, wherein the generating of the encoding matrix G comprises:
generating a first encoding matrix G1, the first encoding matrix G1 including a s×s invertible matrix G11 and a (n−s)×s matrix G21; and
generating a second encoding matrix G2 by combining a zero matrix and a unit matrix I(n−s)×(n−s).

### Claim 13 (depends on 12)

The method of claim 12, wherein the generating of the first encoding matrix G1 comprises:
configuring the s×s invertible matrix G11 as a s×s unit matrix Is×s; and
configuring the (n−s)×s matrix G21 such that the (n−s)×s matrix G21 includes independently and identically distributed (i.i.d.) entries having values 0 or 1, each of the i.i.d. entries having a ½ probability of being 1.

### Claim 14 (depends on 12)

The method of claim 12, wherein the generating of the first encoding matrix G1 comprises:
generating a row vector including s entries having values of 0 or 1, each of the s entries having a corresponding index, only one of the s entries having a corresponding index between 1 and s′/2 is 1, only one of the s entries having a corresponding index between from (s′/2)+1 through s′ is 1, and the probability that a value of each of entries of the row vector of which indexes are from s′+1 through s becomes 1 is ½; and
generating the first encoding matrix G1 based on the generated row vector,
wherein s′ is an even number and s+≦s≦t.

### Claim 15 (depends on 12)

The method of claim 12, wherein the generating of the first encoding matrix G1 is a transposed matrix HT of a check matrix H for binary erasure channel (BEC) codes.

### Claim 16

A method of processing data to be stored in a plurality of memory cells including a plurality of stuck cells, each of the stuck cells storing a value, the method comprising:
obtaining input data and stuck cell information, the stuck cell information indicating locations of the plurality of stuck cells in the plurality of memory cells and the values of the plurality of stuck cells;
generating a first vector based on the input data;
generating an encoding matrix;
generating a second vector based on the stuck cell information and the encoding matrix, a number of entries of the second vector being greater than or equal to a number of the plurality of stuck cells; and
generating encoded data based on the first vector, the encoding matrix and the second vector, the encoded data including values corresponding to the locations of the plurality of stuck cells in the plurality of memory cells and the values of the plurality of stuck cells.

### Claim 17 (depends on 16)

The method of claim 16, further comprising:
generating label information, the label information identifying the encoding matrix and the number of entries of the second vector.

### Claim 18 (depends on 17)

The method of claim 17, further comprising:
decoding the encoded data using the label information.

### Claim 19 (depends on 16)

The method of claim 16, wherein the encoding matrix includes a first encoding matrix part and a second encoding matrix part, the second encoding matrix part including a zero matrix and a unit matrix.

### Claim 20 (depends on 19)

The method of claim 19, further comprising:
storing the first encoding matrix part and an inverse of a portion of the first encoding matrix part.
