This application claims the benefit of Korean Patent Application No. 10-2013-0143913, filed on Nov. 25, 2013, in the Korean Intellectual Property Office, the disclosure of which is incorporated herein in its entirety by reference.
Inventive concepts relate to methods and apparatuses for encoding and decoding data in a memory system.
An error-correcting code (ECC) used in a memory system may be used for detecting errors, correcting the errors, and restoring data. The errors may include random errors that may not be predicted in advance and errors that may be predicted in advance. For example, if a portion of a memory is no longer functional due to a structural defect of the memory, errors may always occur in data stored in the corresponding portion of the memory. A location of the portion of the memory may be determined through a test.
If large resources of a memory system are dedicated to performing a particular ECC, the ECC may deteriorate the performance of the memory system.
Provided are methods and apparatuses for encoding and decoding data in a memory system based on information regarding coordinates and values of stuck cells.
Additional aspects will be set forth in part in the description which follows and, in part, will be apparent from the description, or may be learned by practice of the presented embodiments.
According to an aspect of the inventive concept, an encoder includes a first vector generating unit configured to generate a vector u corresponding to data to be stored in a plurality of memory cells including t stuck cells, the vector a 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 generating unit, configured to generate an encoding matrix G, a second vector generating unit 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 coordinated of the stuck cells, and the information μ including values of the stuck cells, and a third vector generating unit 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 μ.
In an example embodiment, α={α(1), . . . , α(t)}, 1≦α(1)< . . . <α(t)≦n, μ={μ(1), . . . , μ(t)}, u=[u1 . . . un−s]T, w=[w1 . . . ws]T, x=[w1 . . . ws u1 . . . un−s]T, an v=[v1 . . . vn]T, vα(j)=μ(j), 1≦j≦t where j is an integer, the matrix generating unit configured to generate the encoding matrix G such that G=[G1, G2]=G11, 0s×(n−s); G21, I(n−s)×(n−s)], G1 is a n×s first encoding matrix, G2 is a n×(n−s) a 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 generating unit is configured to generate the vector w such that [G1·w]α(j)=μ(j)−[G2·u]α(j)(1≦j≦t), which are t linear equations, and the third vector generating unit is configured to determine a vector y such that y=[y1 . . . yn]T=G1·w and v=[v1 . . . vn]T=y+[0 . . . 0 u1 . . . un−s]T.
The encoder further includes a header generating unit configured to generate a header including a label of the encoding matrix G and s.
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. values having a ½ probability of being 1.
The matrix generating unit is configured to generate rows of the first encoding matrix G1 based on sample row vectors that are independently and identically distribution.
The matrix generating unit 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.
According to another aspect of the inventive concept, a method for encoding data, the method includes 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 μ.
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 employing 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.
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.
The generating the vector w further includes, replacing the encoding matrix G with another encoding matrix G, if s roots do not exist. The method includes generating a header including a label of the encoding matrix G.
The method further includes generating the encoding matrix G by using at least one matrix that is randomly or pseudo-randomly sampled.
The generating of the encoding matrix G includes 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 0s×(n−s) and a unit matrix I(n−s)×(n−s).
The generating of the first encoding matrix G1 includes 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.
The generating of the first encoding matrix G1 includes 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, s′ is an even number and s′≦s≦t.
The generating of the first encoding matrix G1 is a transposed matrix HT of a check matrix H for binary erasure channel (BEC) codes.
At least one example embodiment discloses 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 includes obtaining input data and stock 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.
In an example embodiment, the method includes generating label information, the label information identifying the encoding matrix and the number of entries of the second vector.
In an example embodiment, the method includes decoding the encoded data using the label information.
In an example embodiment, 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.
In an example embodiment, the method includes storing the first encoding matrix part and an inverse of a portion of the first encoding matrix part.
Example embodiments of inventive concepts will be more clearly understood from the following detailed description taken in conjunction with the accompanying drawings in which:
Example embodiments will now be described more fully with reference to the accompanying drawings. Many alternate forms may be embodied and example embodiments should not be construed as limited to example embodiments set forth herein. In the drawings, like reference numerals refer to like elements.
It will be understood that, although the terms first, second, etc. may be used herein to describe various elements, these elements should not be limited by these terms. These terms are only used to distinguish one element from another. For example, a first element could be termed a second element, and, similarly, a second element could be termed a first element, without departing from the scope of example embodiments. As used herein, the term “and/or” includes any and all combinations of one or more of the associated listed items.
It will be understood that when an element is referred to as being “connected” or “coupled” to another element, it can be directly connected or coupled to the other element or intervening elements may be present. In contrast, when an element is referred to as being “directly connected” or “directly coupled” to another element, there are no intervening elements present. Other words used to describe the relationship between elements should be interpreted in a like fashion (e.g., “between” versus “directly between,” “adjacent” versus “directly adjacent,” etc.).
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of example embodiments. As used herein, the singular forms “a,” “an” and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood, that the terms “comprises,” “comprising,” “includes” and/or “including,” when used herein, specify the presence of stated features, integers, steps, operations, elements and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and/or groups thereof.
Unless specifically stated otherwise, or as is apparent from the discussion, terms such as “processing” or “computing” or “calculating” or “determining” or “displaying” or the like, refer to the action and processes of a computer system, or similar electronic computing device, that manipulates and transforms data represented as physical, electronic quantities within the computer system's registers and memories into other data similarly represented as physical quantities within the computer system memories or registers or other such information storage, transmission or display devices.
Specific details are provided in the following description to provide a thorough understanding of example embodiments. However, it will be understood by one of ordinary skill in the art that example embodiments may be practiced without these specific details. For example, systems may be shown in block diagrams so as not to obscure the example embodiments in unnecessary detail. In other instances, well-known processes, structures and techniques may be shown without unnecessary detail in order to avoid obscuring example embodiments.
In the following description, illustrative embodiments will be described with reference to acts and symbolic representations of operations (e.g., in the form of flow charts, flow diagrams, data flow diagrams, structure diagrams, block diagrams, etc.) that may be implemented as program modules or functional processes include routines, programs, objects, components, data structures, etc., that perform particular tasks or implement particular abstract data types and may be implemented using existing hardware in existing electronic systems (e.g., nonvolatile memories universal flash memories, universal flash memory controllers, nonvolatile memories and memory controllers, digital point-and-shoot cameras, personal digital assistants (PDAs), smartphones, tablet personal computers (PCs), laptop computers, etc.). Such existing hardware may include one or more Central Processing Units (CPUs), digital signal processors (DSPs), application-specific-integrated-circuits (ASICs), field programmable gate arrays (FPGAs) computers or the like.
Although a flow chart may describe the operations as a sequential process, many of the operations may be performed in parallel, concurrently or simultaneously. In addition, the order of the operations may be re-arranged. A process may be terminated when its operations are completed, but may also have additional steps not included in the figure. A process may correspond to a method, function, procedure, subroutine, subprogram, etc. When a process corresponds to a function, its termination may correspond to a return of the function to the calling function or the main function.
As disclosed herein, the term “storage medium”, “computer readable storage medium” or “non-transitory computer readable storage medium” may represent one or more devices for storing data, including read only memory (ROM), random access memory (RAM), magnetic RAM, core memory, magnetic disk storage mediums, optical storage mediums, flash memory devices and/or other tangible machine readable mediums for storing information. The term “computer-readable medium” may include, but is not limited to, portable or fixed storage devices, optical storage devices, and various other mediums capable of storing, containing or carrying instruction(s) and/or data.
Furthermore, example embodiments may be implemented by hardware, software, firmware, middleware, microcode, hardware description languages, or any combination thereof. When implemented in software, firmware, middleware or microcode, the program code or code segments to perform the necessary tasks may be stored in a machine or computer readable medium such as a computer readable storage medium. When implemented in software, a processor or processors may be programmed to perform the necessary tasks, thereby being transformed into special purpose processor(s) or computer(s).
A code segment may represent a procedure, function, subprogram, program, routine, subroutine, module, software package, class, or any combination of instructions, data structures or program statements. A code segment may be coupled to another code segment or a hardware circuit by passing and/or receiving information, data, arguments, parameters or memory contents. Information, arguments, parameters, data, etc. may be passed, forwarded, or transmitted via any suitable means including memory sharing, message passing, token passing, network transmission, etc.
Hereinafter, the term entry refers to an element of a matrix or a vector, where an element and an entry of a matrix or a vector have the identical meaning. Furthermore, when A∈FN×N, B∈FN×M, C∈FM×N, and D∈FM×M, the following equation may be established:
As shown in
As shown in
The memory cell 2110 is capable of storing the smallest unit of data stored in the memory device 2000 and may have different states according to data stored therein. The memory device 2000 may write data by changing a state of the memory cell 2110 and may output data according to the state of the memory cell 2110. Data corresponding to the state of the memory cell 2110 is referred to as a value of the memory cell 2110. Although not shown in
Each of the memory cells 2110 may have two or more different states, and the number of bits of data that may be stored in each of the memory cells 2110 may be determined based on the number of states each of the memory cells 2110 may have. For example, in case of a flash memory, the memory cell 2110 may include a single level cell (SLC) capable of storing 1-bit data or a multi level cell (MLC) capable of storing 2-bit data or more data, according to a distribution of threshold voltages of a transistor included in the memory cell 2110. Hereinafter, it is assumed that the memory cell 2110 may have a value of 0 or 1 and is capable of storing 1-bit data. However, example embodiments of inventive concepts are not limited thereto.
Meanwhile, as shown in
As shown in
The encoder 1100 may receive stuck cell information from the stuck cell information storing unit 1300 and may generate a codeword by encoding data based on the received stuck cell information. The encoder 1100 and the decoder 1200 may share encoding information (e.g., encoding matrix G) used for encoding data. In other words, the encoder 1100 may add encoding information to the header of a codeword, and the decoder 1200 may decode the codeword by using the encoding information added to the header.
The encoder 1100 and the decoder 1200 may be embodied hardware, firmware, hardware executing software or any combination thereof included in the memory controller 1000.
When the encoder 1100 and the decoder 1200 are hardware, such hardware may include one or more Central Processing Units (CPUs), digital signal processors (DSPs), application-specific-integrated-circuits (ASICs), field programmable gate arrays (FPGAs) computers or the like configured as special purpose machines to perform the functions of the encoder 1100 and the decoder 1200. CPUs, DSPs, ASICs and FPGAs may generally be referred to as processors and/or microprocessors.
In the event that the encoder 1100 and the decoder 1200 are processors executing software, the processors are configured as special purpose machine to execute the software to perform the functions of the encoder 1100 and the decoder 1200. In such an embodiment, the controller 1000 may include one or more Central Processing Units (CPUs), digital signal processors (DSPs), application-specified-integrated-circuits (ASICs), field programmable gate arrays (FPGAs) computers.
Furthermore, although
As shown in
According to an example embodiment of inventive concepts, the stuck cell information storing unit 1300 may store information α regarding coordinates of stuck cells included in the cell array 2100 and information μ regarding values of the stuck cells. For example, in case of the cell array 2100 shown to
Referring to
v=[v
1
. . . v
n]T ∈ Fn(F=GF(2))
α={α(1), . . . , α(1)< . . . <α(t))
μ={μ(1), . . . , μ(t)}
v
α(j)=μ(j)(1≦j≦t)
where G is an encoding matrix generated by the encoder 1100.
The encoder 1100 may receive input data DATA_IN and stuck cell information SC_INFO and may generate and output codeword DATA_CW and header DATA_HD. The input data DATA_IN may include data the host 800 requested the memory system 900 to write, that is, user data and metadata generated by the memory controller 1000 to manage the memory device 2000. Furthermore, the stuck cell information SC_INFO received by the encoder 1100 from the stuck cell information storing unit 1300 may include the information α regarding coordinates of stuck cells and information μ regarding values of the stuck cells.
The encoder 1100 may generate the codeword DATA_CW, and the codeword DATA_CW may include values of stuck cells at addresses corresponding to coordinates of the stuck cells. Furthermore, the encoder 1100 may generate the header DATA_HD including encoding information regarding the codeword DATA_CW, and the header DATA_HD may be stored in the memory controller 1000 or the memory device 2000 separately from the codeword DATA_CW.
According to an example embodiment of inventive concepts as shown in
The G generating unit 1113 may generate the encoding matrix G. The encoding matrix G is an n×n matrix including n rows and n columns and may be used for generating a column vector v. The G generating unit 1113 may receive signals from the w generating unit 1112, generate a new encoding matrix G based on the signals, and output the new encoding matrix G. The G generating unit 1113 may generate an encoding matrix G randomly or pseudo-randomly. For example, the G generating unit 1113 may generate an encoding matrix G by combining at least one from among matrixes stored in a memory randomly or pseudo-randomly. Detailed descriptions thereof will be given below.
The w generating unit 1112 may receive the stuck cell information SC_INFO from the stuck cell information storing unit 1300, may receive the column vector u from the u generating unit 1111, and may receive the encoding matrix G from the G generating unit 1113. A column vector w generated by the w generating unit 1112 is auxiliary data based on stuck cells included in the cell array 2100, where the column vector w may be added to the column vector u generated by the u generating unit 1111 and may be used for generating the column vector v. The column vector w generated by the w generating unit 1112 may be expressed as w=[w1 . . . ws]T. The s entries w1 through ws included in the column vector w may be determined based on the column vector u, the information α, the information μ, and the encoding matrix G that are received by the w generating unit 1112. If the w generating unit 1112 is unable to determine s entries w1 through ws based on the column vector u, the information α, the information μ, and the encoding matrix G, the w generating unit 1112 may receive a new encoding matrix G from the G generating unit 1113 and determine s entries w1 through ws by using the new encoding matrix G. Furthermore, the w generating unit 1112 may generate and output a label for the encoding matrix G used for generating the column vector w. The label is for the decoder 1200 to recognize the encoding matrix G used by the encoder 1100.
The v generating unit 1114 may receive the column vector u from the u generating unit 1111 and may receive the column vector w from the w generating unit 1112. Furthermore, the v generating unit 1114 may receive the encoding matrix G used by the w generating unit 1112 to generate the column vector w from the w generating unit 1112. The v generating unit 1114 may generate the codeword DATA_CW by using the column vectors u and w and the encoding matrix G, where the codeword DATA_CW may be expressed as a column vector v=[v1 . . . vn]T. In detail, the v generating unit 1114 may generate a column vector x by concatenating the column vector w with the column vector u and may generate the column vector v by multiplying the encoding matrix G by the column vector x.
The header generating unit 1115 may receive the label of the encoding matrix G and s from the w generating unit 1112 and may generate the header DATA_HD. The header DATA_HD generated by the header generating unit 1115 may include information required for the decoder 1200 to decode the codeword DATA_CW, and the decoder 1200 may decode the codeword DATA_CW by using the information included in the header DATA_HD. For example, the decoder 1200 may recognize the encoding matrix G used for encoding the codeword DATA_CW based on the label of the encoding matrix G included in the header DATA_HD and may generate a column vector x′ by multiplying the codeword DATA_CW by an inverse matrix of the encoding matrix G. Furthermore, the decoder 1200 may extract a column vector u′ included in the column vector x′ by using s and may restore data based on the column vector u′. The header DATA_HD generated by the header generating unit 1115 may be stored in a storage space accessible by the encoder 1100 and the decoder 1200 separately from the codeword DATA_CW. For example, the header DATA_HD may be stored in a storage space included in the memory controller 1000 or a cell array included in the memory device 2000.
As shown in
According to an example embodiment of inventive concepts, a linear equation including entries w1 through ws of the column vector w as variables may be induced from the entries included in rows of the encoding matrix G corresponding to coordinates of stuck cells and entries of the column vector x. Since there are t stuck cells, t linear equations may be induced. For example, as shown in
According to an example embodiment of inventive concepts, the w generating unit 1112 may calculate s roots satisfying t linear equations and generate a column vector w by employing the roots as entries of the column vector w. Therefore, the column vector w may include information regarding stuck cells in relation to the column vector n generated by the u generating unit 1111. Meanwhile, if the w generating unit 1112 is unable to calculate s roots satisfying t linear equations or s roots satisfying t linear equations do not exist, the w generating unit 1112 may receive a new encoding matrix G from the G generating unit 1113.
Referring to
When the encoder 1100 and the decoder 1200 perform the operations described above with reference to
Referring to
Lemma 1.
Proof. (i) Let (v1, . . . , vt) be V's rows. The event U that V's row are linearly dependent is a non-disjoint union of the events Uα, α⊂[t], α≠Ø, that v=Σi∈αvi=0. Note that each component of V has a ½ probability of being 1 and that the components are independent. It follows that Pr(v=0)=2−s. Since there are 2t−1 events Uα, α⊂[t], a≠Ø, the probability that they all occur is bounded from above by the union bound by: (2t−1)·2−s<2t−s.
(ii) In this case the event U that V's row are linearly dependent is a non-disjoint union of the events Uα that vα=Σi∈αvi=0, where α⊂[t], and a is not a subset of [k]. Here too each component of vα(α⊂[t], α⊂[k]) has a ½ probability of being 1 where the components are independent, which implies Pr(vα=0)=2−s. Since there are 2t−2k events Uα, α⊂[t], α⊂[k], the probability that they all occur is bounded from above by 2t−s.
1≦t≦s′<s≦n/2(s′:even)
d=s−s′
e
i=[0 1i 0s](0<i<s)
q=[01≠s′ qs′+1 . . . qs]
r=e
i
+e
j
+q(1≦i≦s′/2 and ((s′/2)+1)≦j≦s′)
where e is a row vector, q is a row vector and r is a row vector at uniform probability
In other words, according to an example embodiment of inventive concepts, a row of the first encoding matrix G1 generated by the G generating unit 1113, may include a row vector in which value of only one entry from among entries of which indexes are from 1 to s′/2 is 1 and value of only one entry from among entries of which indexes are from s′/2+1 to s′ is 1. In other words, as shown in
Meanwhile, the G generating unit 1113 may generate the row vector r at a uniform probability in the probability space. In other words, the probability that a value of each of entries of the row vector r of which indexes are from 1 through s′/2 becomes 1 may be 1/(s′/2), whereas the probability that a value of each of entries of the row vector r of which indexes are from s′/2+1 through s′ becomes 1 may be 1/(s′/2), independent from the probability regarding the entries of the row vector r of which indexes are from 1 through x′/2. Furthermore, the probability that a value of each of entries of the row vector r of which indexes are from s′+1 through s becomes 1 may be ½, independent from one another. The row vector r in the probability space (Ω, P) may be expressed as shown below, where the first encoding matrix G1 may include the row vector r sampled to be independent and identically distributed from the probability space (Ω, P).
Ω={r=ei+ej+q: 1≦i≦s′/2 and ((s′/2)+1)≦j≦s′}
From among n row's of the first encoding matrix G1, if t rows corresponding to coordinates of stuck cells are not linearly dependent on one another, a column vector w may be generated from an encoding matrix G based on the first encoding matrix G1. In other words, since entries included in the t rows of the first encoding matrix G1 are coefficients regarding s variables in t linear equation, there may be s roots satisfying the t linear equations if the t rows are not linearly dependent on one another. Therefore, when a t×s matrix including a row vector r sampled to be independent and identically distributed from the probability space (Ω, P) is referred to as a matrix V, the possibility that rows of the matrix V become linearly dependent on one another may be adjusted as desired based on the Lemmas below,
Lemma 2. Let M,K≧1. Denote the M dimensional unit vectors by: ei=[0, . . . i−1 times . . . , 1,0, . . . , ]T and EM={ei: i∈[M]}
Define:
It then holds that:
Pr(u1+ . . . +uK=0)≦M−K/2·(K−1)·(K−3)·, . . . , ·1=f(M,K)
For example
Proof of lemma 2: I. (i) & (ii) are trivial. To prove (iii) note firstly that it holds for K=1, let K>1 be odd and suppose inductively that for all odd K′, 1≦K′<K and all [u1, . . . , uK′]∈VK′: u1+ . . . +uK′≠0. Take [u1, . . . , uK]∈VK′ and suppose to get a contradiction that [u1+ . . . +uK=0. Note that there must be some k>1 such that u1=uk, which implies that u1+uk=0 and hence u2+ . . . +uk−1+uk+1+ . . . +uk−1=0 which contradicts the induction assumption.
To prove (iv) we would construct for every element u=[u1, . . . , uK]∈UK a 1:1 mapping φ=φa:[K]→[K] defined inductively, which has the following properties, for all a∈[K]:
Such mapping is called pairing, for obvious reason, φ is defined inductively as follows. For k=1 let φ(1) be the minimal index in {2, . . . , K} such that u1=uφ(1). Define φ(φ(1))=1 and let b1=1. Suppose inductively that after the r step, r<K/2 there is subset Ar⊂[K], with |Ar|=2r on which we defined a 1:1 mapping φ:Ar→Ar such that for all a∈A the above 3 properties holds
Note that Σa∈Arub=0 and hence for B=[K]\Ar:
For the r+1 step let b=br be the minimal element in B and let b′ be the minimal element in B\{b} such that ub=ub′ and define φ(b)=b′ and φ(b′)=b. Set Ar+1=Ar∪{b,b′}, it is clear that the induction assumption carries to r+1 and hence the final φ satisfies the requirements (a)-(c). We will now be interested in the mapping u→φu where u=[u1, . . . , uK]∈UK.
Let F={φu:u∈UK}. The number of such pairings—|F|—is found via the following combinatorial observation: K−1 possibilities for φ(b1) and independent K−3 possibilities for φ(b2) and independent K−5 possibilities for φ(b3), . . . . It follows that:
|F|=(K−1)·(K−3)·(K−5)· . . . ·1
For each φ∈F define
U
K,φ
={:u∈U
K:φu=φ}.
Note that UK is a disjoint union of UK,φ, φ∈F. There are at most MK/2 elements in UK,φ which is all the possible ways to choose b1, . . . , br and hence |UK|≦MK/2·(K−1)·(K−3)· , . . . , ·1♦
Lemma 3: For k≧1 if u1, . . . , uk are sampled independently from (Ω,P) and u=u1+ . . . +uk than
Define: qk=(2/s′)k·[(k=1)·(k−3)·, . . . , ·1]2, note that
Proof: Let Ti:Fs→Fs′/2 i=1,2 and be projections, defined for w=[w1, . . . , ws]T ∈Fs by:
Take u1, . . . , uK which are sampled independently from (Ω,P) and let u=u1+ . . . +uK than the above mention independency of the three sector and the symmetry of the first 2 sectors yields that:
Pr(T1(u)=0)=Pr(T2(u)=0)
Pr(T3(u)=0)=0)=2−d
Pr(u=0)=Pr(T1(u)=0)·Pr(T2(u)=0)·Pr(T3(u)=0)=Pr(T1(u)=0)2·2−d.
To assess the probability of the event (T1(u)=0) we go back to lemma a2 that says: if we sample K unit vectors [u1, . . . , uK] of FM independently and identically distribute (i.i.d.) with uniform probability then
Pr(u1+ . . . +uK=0)≦M−K/2·(K−1)·(K−3)· , . . . , ·1 and
Pr(u1+ . . . +uK=0)≧M−K·M(M−1)·, . . . , ·(M−K/2+1)·(K−1)·(K−3)·, . . . , ·1
It follows that:
And hence
Pr(u=0)=Pr(T1(u)=0)2·2−d≦(2/s′)k·((k−1)·(k−3)·, . . . , ·1)2·2−d.♦
Lemma 4. Recall that Set 1≦t≦s′≦s≦n/2 and s′+d=s. Let V be a t×s random matrix whose rows are sampled independently and identically distribute (i.i.d.) from (Ω,P). It then holds that:
P
0≦(2−d)/γ.
Thus the failure probability can be arbitrarily small for s=(2+δ)·t with δ>0 as small as we wish.
Proof. I. Let (v1, . . . , vt) be V's rows, vi=(vij)1≦j≦s i=1, . . . , t. The event U that V's row are linearly dependent is a non-disjoint union of the events Uα, α⊂[t], α≠Ø, that Σi∈αvi=0.
By lemma 2 above for k≧1 and α⊂[t]|α|=k:
Since U=∪α⊂[t], α≠ØUα it holds by the union bound that:
Define
It then holds that ak+1/ak=(t−k)·2/s′<2t/s′=1−γ. So
Therefore, the possibility that it is unable to calculate s roots satisfying t linear equations may be reduced as desired by adjusting the δ>0.
According to an example embodiment of inventive concepts, an ε-failure-probability depends on a small header and the complexity of having to solve again t equations with, s unknowns in ε-probability. Reducing the computational complexity of both encoder and decoder for higher stucking probability p is accomplished by specially designed ensembles of sparse random G1-matrices. A sparse matrix is a matrix which has a small number of nonzero elements at each row. More precisely the mean number of non-zero elements per row b bounded by a positive constant. It turns out, that the complexity of the decoder and the encoder (the linear system solver) are reduced.
There are several algorithms in this specification which allow a solution of a sparse linear system of t×s with O(t·s) operations. A well-known family of codes which are based on sparse matrices is referred to as low-density parity-cheek (LDPC) codes. It is known that those codes can achieve the capacity of many discrete memoryless channels (DMC) under maximum likelihood (ML) decoding.
In BEC, there are 3 symbols at the output of the channel: 0, 1 and erasure (E). The BEC is characterized by its erasure probability p>0, and it is denoted by BEC(p). For this channel, it is known that there exist codes which approach the BEC capacity: 1−p with linear decoding complexity.
SC capacity is also 1−p. There is another resemblance: the BEC decoder also tries to solve a linear system of t×s equations.
There is a fundamental difference between BEC and SC. The former requires an overdetermined full ranked system of linear equations (more equations than unknowns) to guarantee decoding, while the latter requires an underdetermined full ranked set of linear equations to guarantee encoding. Nevertheless, both share a common property: a failure occurs if the associated matrix is not full ranked. This led the inventors to investigate the possibility of some relation between the parity-check matrix of a BEC code and G1 of the generator matrix of SC.
We proved that encoding and decoding BEC(p) algorithms with s-failure-probability can be translated into dual, encoding and decoding SC(p) algorithms with the same complexity and rate and same ε-failure-probability. The proof is presented in the sequel. The significance of this duality result is that the 1−p capacity of the SC(p) channel can be approached with, linear complexity encoding and decoding algorithms. In other words the above s and t (t the number of stuck cells s is the SC redundancy, s>t) can be chosen (in long enough codeword) with s/t close to 1.
Consider now BEC and a linear code C with code words of length n, where C has the ability to correct t erasures in probability 1−ε. The code C can be represent by an s×n parity check matrix, H, s>t. Let now y=A·x depict a linear system that is needed to be solved in a BEC decoding scheme with t erasures. Thus A is an s×t sub-matrix is of H composed of the t H-columns which correspond to the positions of the erased bits.
In BEC decoding, the iterative algorithm searches for a row with a single one (the jth row, where the ith position is 1, for example), solve its associated unknown immediately (xi), and then substitute the solution in all the equations which involve xi. This is equivalent to removing the jth row and ith column.
This process is continued until the entire matrix is diminished. If in some stage of the decoding no row with a single one was found—a decoding failure is declared. Good BEC codes has the property that for almost any set of t erasures, the above process succeeds, that is in any stage, until the linear system is solved, there is at least one row with a single 1 in it. It is known from the vast literature on BEC codes, that there exist codes that can achieve capacity using this simple, low linear complexity, algorithm. Unfortunately, we cannot apply this algorithm straightforwardly to our SC case, since there we deal with a transposed version of A. It is easy to prove that the probability to find a row with a single 1 in AT (a column with a single 1 In A) approaches 0 for good codes. We propose instead a decoding algorithm for SC, based on BEC-SC duality, which is composed of 2 steps. In the first step we use an iterative algorithm to turn AT into an upper triangular matrix. Then, in a second step, we solve the linear system using back-substitution method. In the first step only row and column permutations are done, hence the number of ones in AT stays the same. Thus, the number of operations in the second step is linear in t.
In order to take advantage of the large number of zero elements, special storage schemes are required to store sparse matrixes. Example of simple and efficient scheme to store an n×n sparse matrix which has at most r ones in a row, is to store an n×r matrix, where each row contains the column indices of the 1 elements in the original matrix row. For rows with less than, r nonzero elements, repetition of the last nonzero index should be filled in. Another version that can save storage space is to store the delta of the indexes.
The first decoding stage requires at most 2·(t−1) swap operations. The swap operation can be done without any change in the original matrix storage, by using two auxiliary memories of n elements each, one for column ordering and one for rows ordering. The content of the i-th memory element contains the index of the swapped (permuted) row (column).
The second decoding stage needs only a linear (in t) number of XOR operations, since the first stage do not change the number of ones in the matrix. To conclude, the suggested decoding algorithm is very simple and easy to implement in HW/SW.
According to an example embodiment of inventive concepts, when each row of the first encoding matrix G1 include 3 nonzero elements, the encoding matrix G may satisfy the equation below (third combination). An encoding code according to the encoding matrix G satisfying the below equation enables transmission at rate of 1−1.21p (channel capacity is 1−p).
G=[G
1
,G
2
]=[G
11, 0s×(n−s):G21, I(n−s)×(n−s)] ∈Fn×n
The storage and manipulation of such a code is highly efficient due to the regularity of the code (no fill-ins are needed since any row contains exactly 3 ones). The second decoding stage requires only 3·t XOR operations.
As shown in
An encoder may generate an encoding matrix G, which is a n×n matrix, by combining at least one matrix that is generated randomly or pseudo-randomly (operation E50). For example, the encoder may generate the encoding matrix G as shown in
The encoder may generate the column vector w having s entries based on the information α regarding coordinates of stuck cells, information μ regarding values of the stuck cells, the column vector u, and the encoding matrix G (operation E30). As described above with reference to
The encoder may determine that the encoder is unable to generate the column vector w based on the information α, the information μ, the column vector u, and the encoding matrix G (operation E40). For example, if the encoder is unable to calculate s roots satisfying the t linear equations, the encoder may determine that there is no column vector w corresponding to the information α, the information μ, the column vector u, and the encoding matrix G. If the encoder determines that there is no column vector w, the encoder may generate a new encoding matrix G by combining at least one matrix that is randomly or pseudo-randomly sampled (the operation E20).
If the encoder generates the column vector w, the encoder may generate a column vector x by concatenating the column vector w with the column vector u and may generate a column vector v having n entries by multiplying the encoding matrix G by the column vector x (operation E20). The encoding matrix G used for generating the column vector x may be identical to the encoding matrix G used for generating the column vector w in the operation E30. The column vector v generated by the encoder corresponds to data to be stored in a cell array including n memory cells, and entries of the column vector v respectively corresponding to t stuck cells may have values of the corresponding stuck cells, respectively.
If the column vector w is successfully generated, the encoder may generate a header including the label of the encoding matrix G used for generating the column vector w (or used for generating the column vector v) and s, which is the number of entries of the column vector w (operation E60). The header generated by the encoder may be stored in a storage space separate from a storage space in which data corresponding to the column vector v is stored, and a decoder may later access the storage space and determine the encoding matrix G of a column vector v′ and s corresponding to data received from memory cells based on the header.
The encoder may calculate s roots satisfying t linear equations and generate a column vector w by employing the roots as entries of the column vector w (operation E32). Based on the encoding matrix G according to example embodiments of inventive concepts as described above, the encoder may calculate the s roots and generate the column vector w at low complexity.
According to example embodiments of inventive concepts, the multiplication of the second encoding matrix G2 and the column vector u may have low complexity. For example, if the second encoding matrix G2 is a combination of a zero matrix and a unit matrix as shown in
As shown in
The header may include the label of an encoding matrix G used by an encoder to generate the column vector v′ and may include s, which is the number of entries of the column vector w (operation D20). The decoder may obtain an inverse matrix G-1 of the encoding matrix G based on the label of the encoding matrix G included in the header (operation D30). For example, the decoder may access a memory in which the inverse matrix G-1 is stored based on the label of the encoding matrix G and read out the inverse matrix G-1. According, to the structure of the encoding matrix G, the inverse matrix G-1 may be identical or similar to the encoding matrix G.
The decoder may generate a column vector x′ including n entries by multiplying the inverse matrix G-1 by the column vector v′ and may generate a column vector u′ by extracting (n−s) entries from the column vector x′ (operation D40). The decoder or a component, following the decoder may restore data prior to being encoded by the encoder from the column vector u′.
The first ECC encoder 1120 may receive raw data DATA_RAW from outside the encoder 1100a. The raw data DATA_RAW may include user data to be written to the memory system 900 by the host 800 of
According to an example embodiment of inventive concepts, the SC encoder 1110 may include the components shown in
The second ECC encoder 1130 may receive the codeword DATA_CW from the SC encoder 1110 and encode the codeword DATA_CW. Data encoded by the second ECC encoder 1130 may be transmitted to the decoder 1200a via a noise channel 2000a. The noise channel 2000a is a channel in which errors may occur between received data and transmitted data and may include a memory device and a cell array, for example. The second ECC decoder 1230 may receive data from the noise channel 2000a and output codeword DATA_CW by decoding the received data.
The second ECC encoder 1130 and the second ECC decoder 1230 may perform an encoding operation and a decoding operation, respectively, for correcting possible errors in the noise channel 2000a. According to an example embodiment of inventive concepts, the second ECC encoder 1130 and the second ECC decoder 1230 may perform an encoding operation and a decoding operation while information regarding stuck cells is maintained, so that errors regarding the stuck cells may be corrected.
According to an example embodiment of inventive concepts, the SC decoder 1210 may perform the operation shown in
The first ECC encoder 1120 and the first ECC decoder 1220 may perform an encoding operation and a decoding operation in correspondence to each other, whereas the second ECC encoder 1130 and the second ECC decoder 1230 may also perform an encoding operation and a decoding operation in correspondence to each other. For example, the ECC encoders 1120, 1130 and the ECC decoders 1220, 1230 may use LDPC.
Although
FIG, 14 is a block diagram showing a computer system 3000 including a memory system according to an example embodiment of inventive concepts. The computer system 3000, such as a mobile device, a desktop computer, and a server, may employ a memory system 3400 according to an example embodiment of inventive concepts.
The computer system 3000 may include a central processing unit 3100, a RAM 3200, a user interface 3300, and the memory system 3400, are electrically connected to buses 3500. The host as described above may include the central processing unit 3100, the RAM 3200, and the user interface 3300 in the computer system 3000. The central processing unit 3100 may control the entire computer system 3000 and may perform calculations corresponding to user commands input via the user interface 3300. The RAM 3200 may function as a data memory for the central processing unit 3100, and the central processing unit 3100 may write/read, data to/from the memory system 3400.
As in example embodiments of Inventive concepts described above, the memory system 3400 may include a memory controller 3410 and a memory device 3420. The memory controller 3410 may include an encoder, a decoder, and a stuck cell information storing unit, the memory device 3420 may include a cell array including a plurality of memory cells, and the cell array may include stuck cells. The encoder may receive information regarding stuck cells from the stuck cell information storing unit, encode data to be stored in the cell array, generate codeword, and generate a header corresponding to the codeword. The codeword generated by the encoder may include values of the stuck cells included in the cell array. The decoder may extract encoding information from the header and decode the data stored in the cell array based on the encoding information.
The memory controller 4100 may include an encoder, a decoder, and a stuck cell information storing unit according to example embodiments of inventive concepts as described above. The encoder and the decoder may perform an encoding method and a decoding method according to example embodiments of inventive concepts, whereas the stock cell information storing unit may store information regarding stuck cells included in the non-volatile memory 4200. The memory controller 4100 may communicate with an external host via the port region 4300 in compliance with a pre-set protocol. The protocol may be eMMC protocol, SD protocol, SATA protocol, SAS protocol, or USB protocol. The non-volatile memory 4200 may include memory cells which retain data stored therein even if power supplied thereto is blocked. For example, the non-volatile memory 4200 may include a flash memory, a magnetic random access memory (MRAM), a resistance RAM (RRAM), a ferroelectric RAM (FRAM), or a phase change memory (PCM).
Meanwhile, a memory system according to example embodiments of inventive concepts may be mounted via any of various packages. For example, a memory system according to an example embodiment of inventive concepts may be mounted via any of packages including package on package (PoP), ball grid arrays (BGAs), chip scale packages (CSPs), plastic leaded chip Carrier (PLCC), plastic dual in-line package (PDIP), die in waffle pack, die in wafer form, chip on board (COB), ceramic dual in-line package (CERDIP), plastic metricquad flat pack (MQFP), thin quad flatpack (TQFP), small outline (SOIC), shrink small outline package (SSOP), thin small outline (TSOP), thin quad flatpack (TQFP), system. In package (SIP), multi chip package (MCP), wafer-level fabricated package (WFP), wafer-level processed stack package (WSP), etc.
It should be understood that example embodiments described herein should be considered in a descriptive sense only and not for purposes of limitation. Descriptions of features or aspects within each embodiment should typically be considered as available for other similar features or aspects in other example embodiments.
Let F be any field and m,n≧1. A matrix A∈Fn×m is called here C-sparse for some C>0 if the number of non-zero entries in A is upper bounded by C·n (though the reference to C will usually be omitted here). The goal of this section is low complexity algorithms that solves the set of linear equations A·x=y where A∈Fn×m is a sparse matrix, x∈Fm, y∈Fn where x, y are column vectors. This goal is achieved by an algorithm that first diagonal be A and then (or simultaneously) it solves the set of linear equations.
Define for i,j∈[n], E′i,j,n∈Fn×n to be the matrix whose entries are all zeros except for the (i,j) entry which is 1. Elementary matrix are matrix of the type (In×n+x·E′p,q,n) and also simple permutation matrix whose product swaps 2 coordinates such as the matrix
This section reminds that every matrix A∈Fn×m can be diagonalized that is, decomposed (as is done in SVD with Householder matrix) as follows:
A=E
1
−1
· . . . , ·E
N−1
−1
·E
N
−1
·I
k,n×m
·E′
M
−1
·E′
M−1
−1
· . . . ·E′
1
−1.
Where Ik,n×m is diagonal with (1,1, . . . , 1,0, . . . 0) on the diagonal. It proposes a greedy algorithm that at each subroutine minimizes (in some sense) the field operations done by the algorithm. Each subroutine reduces the remaining matrix by one column and one row, that is reduces n and m by one. It is—at this point—hubristic procedure aimed at reducing (& nearly minimizing) field (F) operations for general sparse matrix
Define:
M
t,d,n,m
={A=(ai,j)i∈[n],j∈[m]∈Fn×m: for all 1≦i≦n: |{j∈[m−d]: aij≠0}|≦r}.
This type of matrix with constant d correspond to our random coding and hence they are our main focus in the effort of developing fast algorithms that solves A·x=y. At this point will show that that for r=2 there is an O(n)-complexity solution.
Left Product by Matrix of the Type (In×n+x·E′p,q,n) is Equivalent to Adding a Scalar Product of a Row to Another Row
Lemma 1: For A=(ai,j)i∈[n],j∈[m]∈Fn×m, x∈F and p,q∈[n],
That is, B is the matrix whose rows are all zeros except for the p row that is equal to the q row of A.
That is, C is the matrix whose rows are ail equal to A's row except for the p row that is equal to the p row of A plus x multiplied by the q row of A.
Right Product by Matrix of the Type (Im×m+x·E′p,q,m) is Equivalent to Adding a Scalar Product of a Column to Another Column
Lemma 2: For A=(aa,j)i∈[n],j∈[m]∈Fn×m, x∈F and p,q∈[m],
That is, B is the matrix whose columns are all zeros except for the q column that is equal to the p row of A.
That is, C is the matrix whose columns are all equal to A's columns except for q column that is equal to the q column of A plus x multiplied by the p row of A.
Denote as usual the set of all permutations on [n] by:
Let π∈Sn and denote Ord(π)=min {k≧1: πk=1}.
note the equivalence (1) (2) (3) (4)
That is w=Pσ,n·Pπ,n·v. Then for i∈[n] ui=vπ(i) and hence for k∈[n] wk=uσ(k)=vπ(σ(k)). Thus Pσ,n·Pπ,n=Pπoσ,n.
It follows from proposition 1 that:
That is π-permutation of each column.
That is π permutation of each row.
Definition: for p,q∈[n] define the swap permutation πp,q=π[p,q]∈Sn by:
And define the swap permutation matrix by
When p=q Pp,q,n=I∈×n. Obviously the interesting case is when p≠q, Right product with Pp,q,n switches the p and q rows. Left product with Pp,q,n switches the p and q columns.
Define for p,q∈[n], p≠q and x∈F:
E
p,q,n,x
=I
n×n+x·E′p,q,n
Recall that right product with this matrix amounts to adding x multiplied by the q row to the p row. Left product with this matrix amounts to adding x multiplied by the p column to the q column. Define for p∈[n] and x∈F:
E
p,n,x
=I
n×n+(x−1)·E′p,p,n
Note that tight product with this matrix amounts to multiplying the p row multiplied by x, while leaving all other rows unchanged. Left product with this matrix amounts to multiplying the p column multiplied by x, while leaving all other columns unchanged. This type of elementary matrix is not relevant to our Z2 applications, but they are relevant to other applications.
E*
0,n
={E
p,n,x
:p∈[n], x∈F\{0}}
E*
1,n
={E
p,q,n,x
:p,q∈[n], p≠q x∈F\{0}}
E*
2,n
={P
p,q,n
:p,q∈[n], p≠q}
E*
n
=E*
0,n
∪E*
1,n
∪E*
2,n.
E*n is called here the set of elementary matrix in Fn×n.
(In×n+x·E′p,q,n)·(In×n−x·E′p,q,n)=In×n+x·E′p,q,n−x2·E′p,q,n·E′p,q,n=In×n.
For k≦min(n,m) define the k unit diagonal matrix of Fn×m, Ik,n×m, by:
Let A∈Fn×m. The sequences of matrix E1, . . . , EN∈E*n and E′1, . . . , E′M∈E*m are said to diagonalize A if for some k≦min(n,m):
Note that this is equivalent to the following (SVD-like) decomposition of A:
To every A∈Fn×m there exists E1, . . . , EN∈E*n and E′1, . . . , E′M∈E*m and unique k such that:
Observe that k=rank(A) and hence k is unique. We will prove this well known proposition via a constructive proof that provides a greedy-minimization of the number of arithmetic operations and N+M. To this end we must first define associated complexity norm.
Diagonalization with Given Bracket
For K≧1 θ=(θ1, . . . , θK) is called here brackets sequence if θ1∈{0,1} and for all i∈{2, . . . , K}θi−θi−1∈{0,1}. Let A∈Fn×m and suppose E1, . . . , EN∈E*n and E′1, . . . , E′M∈E*m diagonalize A for some k≦min(n,m), that is
Let θ=(θ1, . . . , θM+N) be brackets sequence that satisfies θM+N=N. We define θ-ordered diagonalization process—that is, diagonalization process with the elementary matrix E1, . . . , EN∈E*n and E′1, . . . , E′M∈E*m whose brackets are determined by the sequence θ—to be the sequence
Where for k∈[M+N]:
Which implies that for k∈[M+N], when θk−θk−1=1:
and when θk−θk−1=0:
Let A=(ai,j)i∈[n],j∈[m]∈Fn×m, define for i∈[n], j∈[m]:
Let p,q∈[n], p≠qx∈F\{0}, we define the complexity of the product Ep,q,n,x·A by:
where c1>0 is a constant that reflects the complexity of one scalar product and one scalar addition. Recall that right product with Ep,q,n,x amounts to adding to the p row x multiplied by the q row, in the case F=Z2 the product is not relevant so c1 depends (of course) on F. The reason for defining this complexity as c1·(X(A,p)−1) and not c1·X(A,p) is because in our algorithms when we add a scalar product of one row to another where at the “leading 1” column we get cancelation without a need for computation. Likewise we define the complexity of the product A·Ep,q,n,x by:
Recall that left product with this matrix amounts to adding x multiplied by the p column to the q column. Let p∈[n], x∈F\{0}, we define the complexity of the product Ep,n,x·A by:
where c0>0 is a constant that reflects the complexity of one scalar product. Likewise we define the complexity of the product A·Ep,n,x by:
Let p,q∈[n], p≠q we define the complexity of the products Pp,q,n·A and A·Pp,q,n by:
where c0>0 is a constant.
Let A∈Fn×m and suppose E1, . . . , EN∈E*n and E′1, . . . , E′M∈E*m diagonalize A for some k≦min(n,m), that is
Let θ=(θ1, . . . , θM+N) be brackets sequence that satisfies θM+N=N. We define the complexity of the diagonalization process that corresponds to E1, . . . , EN∈E*n and E′1, . . . , E′M∈E*m and θ to be:
where C1, . . . , CM+N are defined as follows. For k∈[M+N], set as before:
For k∈[M+N], if θk−θk−1=1 then Ak=Eθ(k)·Ak−1, and we define Ck=C(Eθ(k),Ak−1)
and if θk−θk−1=0, then Ak=Ak−1·E′k−θ(k), and we define Ck=C(Ak−1, Eθ(k)).
k-Unit Matrix
Definition. Let A∈Fn×m and min(m,n)≧k≧1. A is called k-unit matrix if [A]i,j=δij for all (i,j)∈[n]×[m] such that i≦k or j≦k. It means that the Erst k rows and the first k columns are zero except for the diagonal which is all ones.
The following algorithm is effective for sparse matrix. A variant of this matrix that will later be described seem to be particularly effective for our ensembles of matrix. This target algorithm, which is designed for our ensembles will evolve from this generic algorithm. Let A∈Fn×m be non-zero matrix, A is the input of the following algorithm. Its output is E1, . . . , EN∈E*n and E′1, . . . , E′M∈E*m that diagonalize A for some K≦min(n,m), that is
A bi-product of the algorithm is θ=(θ1, . . . , θM+N) a brackets sequence that satisfies θM+N=N and which correspond to the diagonalization process executed by the algorithm.
The algorithm is executed by K≦min(n,m) subroutines. It Is supposed inductively that the input of the k-subroutine (1≦k≦min(n,m)) of the algorithm is a matrix Bk such that B1=A and for k>1 Bk is (k−1)-unit matrix and an addition the input of the k-subroutine includes E1, . . . , EN(k)∈E*n and E′1, . . . , E′M(k)∈E*m such that:
If Bk=Ik−1,n×m then the algorithm terminates and its output is the input of the k-subroutine. Otherwise the k-subroutine computes the matrix Bk+1 which, is k-unit matrix and the input of the next subroutine). It is also supposed inductively that the input of the k-subroutine of the algorithm includes for all i∈[n], j∈[m] the values
and when [Bk]i,j≠0 then also the value Z(A,i,j). This additional memory required for this storage is M(Bk), which is defined by:
Note that the memory size required to store M(Bk) is proportional to the memory size required to store the nonzero entries of Bk. The k-subroutine of the algorithm starts by listing the coordinates (i,j), i,≧k for which [Bk]i,j≠0 and Z(A,i,j) is minimal that is obtaining min(M2(Bk)) and forming the set
Next the k-subroutine selects the (i*,j*)∈M3(Bk) for which X(Bk,i)+Y(Bk,j) is maximal. The permutation swap elementary matrix will now be utilized to “move” (i*,j*) to (k,k). This is done by computing (where required):
(Note that if k=i* then Pk,i*,n=In×n—so this product is not required and if k=j* then Pk,j*,n=In×n and again this product is not required). Observe that now (k,k) took the place of (i*,j*): (k,k)∈M3(Bk,1) and X(Bk,1,k)+Y(Bk,1,k) is the maximal value of X(Bk,1,i)+Y(Bk,1,j) for (i,j)∈M3(Bk,1). At this point the algorithm updates X(,), Y(,), Z(,). Observe that:
And hence Z is updated accordingly by a swap on its definitions in the rows i* and k and the columns j* and k.
Let x=([B′k]k,k)−1. If x=1 (which is always the case when F=Z2) set Bk,2=Bk,1. Otherwise multiply the k row by x, i.e., compute the corresponding product with elementary matrix:
Note again that X(Bk,2,k)=X(Bk,i*) and Y(Bk,2,k)=Y(Bk,j*). Now [Bk,2]k,k=1. If X(Bk,2,k)=Y(Bk,2,k)=1, then the k-step ends here and Bk+1=Bk,2. Suppose now that this is not the case, and assume for example that X(Bk,2,k)≧Y(Bk,2,k) which implies that X(Bk,2,k)>1. To simplify notation write B=(bij=b(i,j)i∈[n],j∈[m]=Bk,2. d=X(B,k)−1=X(Bk,i*)−1 is the number of nonzero elements in the k B-row, except for bkk and that B is k-unit matrix. That is, there are k<j(1)<j(2) . . . <j(d)≦m such that: bk,j(1)≠0 for l∈[d] all the rest of the k-row—except for bkk—is zeros. It is also provided that the first k−1 elements of the k-column are zeros. If The k-subroutine will now apply left product with d elementary matrix of the type E*l,n={Ep,q,n,x} to zero the k row, that is, the entries bk,i(1)≠0 for l∈[d]. Thus it computes Bk,3 as follows:
Recall that, left product with Ep,q,n,x amounts to adding x multiplied by the q row to the p row and right product with this matrix amounts to adding x multiplied by the p column to the q column.
Each products with Ek,j(2),n,−b(k,j(2)), l∈[d] is equivalent to adding scalar product of the k column of B to the each one of the d B-columns that intersects with the k row with non-zero entry. This is done in such way that cancels the k element in these columns. Following this procedure the only non-zero element in the k row of Bk,3 is [Bk,3]k,k. Note also that each product with Ek,j(1),n,−b(k,j(1)) implies adding a column whose first (k−1)-entries are zero to another column of this type. The result Is that the first (k−1)-entries of each column of are zero. Since k<j(1)≦j(2) . . . <j(d)≦m also the first (k−1)-entries of each row of Bk,3 are zero. Thus Bk,3 is k-unit matrix whose k-row is all zeros except for [Bk,3]k,k which is one. At this point the algorithm updates
At this point Y(Bk,3,k)=Y(Bk,j*) and X(Bk,j,k)=1. If Y(Bk,3,k)=1, then the k-step ends here and Bk+1=Bk,3. Suppose now that this is not the case, and Y(Bk,3,k)>1. For notational simplicity set C=(cij=c(i,j))i∈[n],j∈[m]=Bk,3. There are exactly d′=Y(C,k)−1 nonzero elements in the k column of C, except for ckk. That is, there are k<i(1)<i(2) . . . <i(d′)≦n such that: ck,i(1)≠0 for l∈[d′] all the rest of the k-column—except for ckk—is zeros. The k-subroutine applies now right product with d′ elementary matrix of the type E*l,n to nil the k column (off the (k,k) entry) in the following way:
Note that no arithmetic field operations are involved here, in fact the relative complexity of (ii) is marginal. Set Bk+1=Bk,4. A key point w.r.t. complexity is that the almost all the complexity of the k-subroutine is in (i). Now Z(Bk,i*,j*)=Z(Bk,2,k,k) multiplications and additions were involved in (i). This is so since we added the k-column to another column in (i) X(Bk,2,k)−1 times, performing Y(Bk,2,k)−1 products and additions at each of these times. Thus the motivation in choosing (i*,j*) is greedy minimization of the bulk complexity of the k-subroutine. Also Z(Bk,i*,j*)−X(Bk,1k)−Y(Bk,1,k)+2 is an upper bound to the number of non-zero entries that were added to Bk via (i) and (ii). At this stage the algorithm updates X(,), Y(,), Z(,), as follows: j(1)≠0 for l∈[d]
And Z(,) is updated accordingly. Note that the supposition X(Bk,2,k)≧Y(Bk,2,k) led us to start the k subroutine by an elimination of the k-line in (i). Likewise if we had X(Bk,2,k)≦Y(Bk,2,k) we would start the k subroutine by an elimination of the k-column in (i) and then eliminate the k row.
The algorithm terminates at k if Bk=Ik−1,n×m for some k<min(n,m). Otherwise it terminates at k=min(n,m).
An Algorithm that Solves A·x=y when Diagonalization is Provided
Let A∈Fn×m\{0} and y∈Fn and suppose that we want to solve the system of linear equations A·x=y for x∈Fm. Our first step will be to find E1, . . . , EN∈E*n and E′1, . . . , E′M∈E*m that diagonalize A for some k≦min(n,m), that is
The case k<min(n,m) our algorithm declares failure. But we note that in some uncommon cases a solution might exit to the original equation A·x=y, and even if not there are alternatives to failure-declaration such as small ad-hoc correction to A when min(n,m)−k is small. We would thus assume henceforth, that k=min(n,m) which is equivalent to A being full ranked. It follows from (1) that
And hence it is desired to solve:
Which is equivalent to:
write
So solving A·x=y is equivalent to solving
Note that z is computed from y via N successive coordinates switch/products/additions and products in the field F. This can be done simultaneously with the diagonalization of A. In the equal-dimensional and under determined case, where m≧n,
solves the equation z=Ik,n×m·u. In the over determined case, where m<n, u∈Fm solves the equation z=Ik,n×m·u if zi=0 for all n≧i<m and ui=zi for all i∈[m]. Finally, whenever the equation z=Ik,n×m·u has a solution the original equation A·x=y has solution. This follows from the fact that it follows from (5) that in this case:
Note again that in the under determined case, where m≧n solution exists when A is full ranked and In the over determined case, where m<n solution exists when A is full ranked and if y is in the subspace spanned by A's columns.
To demonstrate the concept let, at first, A=(aij)i∈[n],j∈[m]∈Fn×m be a matrix with no more than 2 ones per row, that is A∈M2,d,n,m where d=0. It would be assumed without loss of generality that m≧n. The proposed algorithm is a slight variation on the above greedy algorithm. It is characterized by the fact that in the above generic algorithm if at the k-subroutine X(Bk,2,k)≦Y(Bk,2,k) we would carry out the k subroutine by first eliminating the k-column in (i) and then eliminate the k row.
Fix now d≧0. The passage to the general case where A∈M2,d in the next section, will imply a rather straightforward d scaling of the complexity, i.e. O(n·(d+1))-complexity. Observe that every matrix in M2,d,n,m, can be formed by taking matrix A∈M2,0 and adding to it d random columns (that is, with independently and identically distribute (i.i.d.). Bernoulli with 1/|F| probability to each F-scalar per entry). We now add a stopping rule to our algorithm: if at some point in the process it is found that the rank of A is below n−d the algorithm halts.
A key observation is that when we deduct product of a row from another row with the same position of leading non-zero entry—then if each of these 2 rows has at most 2 non-zero entries—the result is also row of at most 2 non-zero entries. Let ei be the i unit row of Fm and take two such rows:
and note that;
Before describing the algorithm's steps, we state an inductive assumption that at the beginning of the k subroutine each row of Bk (see generic algorithm above) has no more than 2 non-zero entries. It will be shown that this assumption carry on to k+1. At the beginning of each subroutine we go to a non-zero column with index j*∈ {k,k+1, . . . , m} that have minimal number of non-zero elements. (It is noted in brackets that with high probability (w.r.t. our ensembles) there will be a single one in the j* column). Let i* be a row having a minimal number of nonzero entries under the constraint [Bk]i*,j*≠0. Set:
Let x=([B′k]k,k)−1 and compute (when required):
As a result row i* was swapped with row k and column j* was swapped with column k. Next, if Y(Bk,2,k)=Y(Bk,j*)=1 them the k subroutine starts by eliminating the k row as in (i). Otherwise, if Y(Bk,2,k)=Y(Bk,j*)>1 the k subroutine starts by eliminating the k column as in (ii). In both cases after (i) & (ii) are performed there is one nonzero entry in the k row (in fact 1 in the (k,k) entry) and one non-zero entry in the k column. In addition the resulting matrix, Bk+1, has no more than 2 non-zero entries at each row. Also, the total number of non-zero entries cannot increase at such subroutine. Note that Y(Bk,j*)−1 is an upper bound to the number of field operations in the k-subroutine. This is so since X(Bk,i*)−1≦1 and hence Y(Bk,j*)−1≧(Y(Bk,j*)−1)·(X(Bk,i*)−1)=Z(Bk,i*,j*). Recall that Z(Bk,i*j*) is the number of field operations in the k-subroutine. Note also that Y(Bk,j*)+3 is an upper bound to the number of products with elementary matrix in the k-subroutine.
Define Ck=([Bk]i,j)k≦i≦n,k≦j≦m. It follows from the above stopping rule that if the number of non-zero columns in Ck is below n−k−d+1 then the algorithm comes to halt. Observe also that by the above, Ck has no more than 2 nonzero entries at each row. It follows that Ck has at most 2(n−k+1) non-zero entries. Consider the set of relevant indexes of non-zero columns:
Note that
Now, if the algorithm did not halt until the k-subroutine started,
It follows that for j*∈Jk that minimizes Y(Bk,j),
Thus when n−k≧2d (equivalent to n−2d≧k, recall that there are n subroutines) Y(Bk,j*)≦4.
When n=2d≦k≦n we are left with diagonalization of the last 2d rows. Note that (n−2d<k≦n) has no more than 2 non-zero entries and that Y(Bk,j*)−1≦2d is an upper bound to the number of field operations in the k-subroutine and also that Y(Bk,j*)+3≦2d+3 is an upper bound to the number of products with elementary matrix in the k-subroutine.
It follows that the number of field operation is upper-bounded by 3·n+4d2 and at the end of the diagonalization process.
Note that when we find E1, . . . , EN∈E*n and E′M∈E*m which satisfy the diagonalization requirement:
It holds that N+M≦6·n+4d2+6d. Note that the upper bounds here are very far from tight.
(Appendix: . . . (A+Ek,n,x)−1=(A·(I+A−1·Ek,n,x))−1 . . . )
The general case, when d>0:
Fix d>0. For B=(bi,j)i∈[n],j∈[m]∈Fn×m, and i∈[n] and j∈[m] define:
Take A∈M2,d,n,m. It would be assumed without toss of generality that m≧n. The proposed algorithm is a variation of the above greedy algorithms. The stopping rule here is that if at some point in the process it is found that the rank of A is not full ranked the algorithm, halts.
Set W={w[w1, . . . , wm]∈Fm: wi=0 for i∈[m−d]}. A key observation is that when we deduct product of a row from another row with the same position of leading non-zero entry—then if each of these 2 rows has at most 2 non-zero entries in the first m−d components—the result is also row of at most 2 non-zero entries in the first m−d components. Let ei be the i unit row vector of Fm. Take two such rows:
and note that;
Here too before describing the algorithm's steps, we state an inductive assumption that at the beginning of the k subroutine each row of Bk (see generic algorithm above) has no more than 2 non-zero entries in the first m−d coordinates. It will be shown that this assumption carry on to k+1. At the beginning of each subroutine we go to a non-zero column with index j*∈{k,k+1, . . . , m−d} that have minimal number of non-zero entries. Let i* be a row having a minimal number of nonzero entries in the first m−d coordinates under the constraint [Bk]i*j*≠0. Set:
Let x=([B′k]k,k)−1 and compute (when required):
As a result row i* was swapped with row k and column j* was swapped with column k. Next, if Yd(Bk,2,k)=Yd(Bk,j*)=1 them the k subroutine starts by eliminating the k row as in (i) [an alternative: do the same when Yd(Bk,2,k)=Yd(Bk,j*)≦2]. Otherwise, if Yd(Bk,2,k)=Yd(k,j*)>1 the k subroutine starts by eliminating the k column as in (ii). In both cases after (i) & (ii) are performed there is one nonzero entry in the k row (1 in the (k,k) entry) and one non-zero entry in the k column. In addition the resulting matrix, Bk+1, has no more than 2 nonzero entries at each row. Also, the total number of non-zero entries cannot increase at such subroutine, it is not hard to compute that d·Y(Bk,j*) is an upper bound to the number of field operations in the k-subroutine and that d·Yd(Bk,j*)+4 is an upper bound to the number of products with elementary matrix in the k-subroutine.
Note the difference from the above definition in the case d=0. It follows from the above stopping rule that if the number of non-zero columns in Ck is below n−k−d+1 then the algorithm comes to halt. Observe also that by the above Ck has no more than 2 nonzero entries at each row. It follows that Ck has at most 2(n−k+1) non-zero entries. Thereby, consider the set of relevant indexes of non-zero columns:
Note again that
Now, if the algorithm did not hah until the k-subroutine started,
It follows that for j*∈Jk that minimizes Y(Bk,j),
Thus when n−k≧2d (equivalent to n−2d≧k, recall that there are n subroutines) Y(Bk,j*)≦4.
When n−2d<k≦n we are left with diagonalization of the last 2d rows. Recall that Bk (n−2d<k≦n) has no more than 2 non-zero entries in the first m−d coordinates. Also note that by the above d·2d is an upper bound to the number of field operations in the k-subroutine and that d·2d+4 is an upper bound to the number of products with elementary matrix in the k-subroutine.
It follows that the number of field operation is upper-bounded by 4·d·n+4·d3 and at the end of the diagonalization process.
Finally when we find elementary matrix E1, . . . , EN∈E*n and E′1, . . . , E′M∈E*m which satisfy the diagonalization requirement:
It holds that N+M≦(4·d+4)·n+4·d3+8d.
Note that the bounds are very far from being tight.
Take matrix A∈Fn×m and suppose that the sequences of matrix E1, . . . , EN∈E*n and E′1, . . . , E′M∈E*m diagonalize A, where for some k<min(n,m)=L, that is:
Or equivalently
Let B∈Fn×q and consider the following set of n equations with m+q unknowns: z=[A,B]·[x,y]T
Let n>s>t>0. This section proves that every SC linear code with code block of length n encompassing n−s information bits and having the ability to accommodate t stack bits with success probability 1−δ, has dual BEC code with equivalent properties: code block of length n encompassing n−s information bits and ability to fix t erasures with success probability 1−δ.
For α⊂[n] we denote the complement of α w.r.t. [n] by: αc=[n]\α. For n≧s,k≧1 define:
For G∈Fn×m and α∈Ω(n,k) define: Gα,s=(gα(i),j)i∈[k],j∈[s].
For G∈Fn×n and α∈Ω(n,k) define: vα=[vσ(1), . . . , vσ(k)].
Fix F=Z2, fix n>s>t≧1, and small δ>0. Define first:
Next define SC(n,s,t,δ), the set SC encoder matrix that are capable of processing t stack bits with δ error probability and redundancy (t,s). Take G=[G1,G2]∈Fn×n such that G1∈Fn×s and G2∈Fn×(n−s) than SC(n,s,t,δ) is the set of matrix G∈SC(n,s) such that when we sample α∈Ω(n,t) with uniform probability the probability that Gα,s is not full ranked is <δ.
The parameters of the binary erasure channel includes ε>0, the independent-probability of erasure per coordinate. We fix block length n, then for transmit vector u=[u1, . . . , un]T∈Fn every ui has independent ε probability of being erased, and consequently for t∈[n] there is δ(t,ε)>0 probability that more than t coordinates of u were erased. (Let t0, a positive integer, be such that the probability for more than t0 erased coordinated when v=[v1, . . . , vn]T∈Fn is transmitted, is smaller than δ′).
Let now,
For invertible G∈Fn×n define: UG,s={v·G−1: v∈Vs}.
Take G=[G1,G2]∈Fn×n invertible matrix such that G1∈Fn×s and G2∈Fn×(n−s). Note that for u∈Fn: u∈ UG,sv=u·G∈Vsu·G1=01×s. Thus G1 is the parity check matrix of the code UG,s.
Take G∈SC(n,s,t,δ), G=[G11, 0s×(n−s): G21, I(n−s)×(n−s)]∈Fn×n it than holds that:
While (i) is proved in [ ] the proof of (ii) will be presented here with the complexity cost.
Let u=[u1, . . . , un]∈U and y=[y1, . . . , yn∈U. If α⊂[n] satisfies |α|≦s and Gα,s is full ranked and
than y=u.
Proof. Since u,y∈U than y·G1=u·G1=01×s. It follows that:
Now since Gα,s is full ranked and |α|≦s it yields (y−u)α=0. Hence yi=ui for all i∈α. Thus y=u.
The Erasure Channel Decoder Scheme which Yields a Systematic Code
The input is the above G21∈F(n−s)×s, and G11−1∈Fs×s, which is computed once offline and v′=[vs+1, . . . , vn]∈F1×(n−s), which is the un-coded information vector. Set v=[01×s,v′]∈V
This is doable in a low complexity mode, and it yields a systematic code. The steps are:
The input. One part of the input is the received vector x=[x1, . . . , xn]∈Fn which was obtained from the transmit vector u=[u1, . . . , un]∈Fn via the erasure channel. Another part of the input is the above G=[G1,G2]∈Fn×n.
By the above lemma if y∈Vx∩U than, since Gα,s is full ranked: y=α. We are thus looking for y∈Vx such that y=[y1, . . . , yn]∈Vx∩U which implies
01×s=y·G1=yα
The solution can be found via the algorithm of section 6 below that solves such set of equations once the respective matrix was diagonalized. The solution to this set of linear equations is uα which yields that the receiver knows u.
Let F=Z2, and let the algorithm's dimensions be, n>s>t. The scheme is based on a code represented by a matrix G
Where G11∈Fs×s is invertible, and in some schemes G11=Is×s. The inverse is given by;
Note that when G11=Is×s, G−1=G.
In the channel under consideration a noise is introduced to the received data vector after its storage in the HAND flash. This will be dealt by the above outlined suboptimal scheme of SC solution merged with ECC solution. The post storage noisy channel is a binary symmetric channel (BSC) with probability δ>0 of an error and independent coordinates. The problem's parameters include small ε1ε2>0 that bounds the block error probabilities (e.g. ε1=10−15 ε2=10−20).
Suppose that for k∈[n], i=1,2 the encoder and decoder are provided with systematic linear codes which corresponds to G′k,i∈Fd(k,i)+k and has rate k/(d(k,i)+k), such that for all w∈Fk, if we store gi(w)=[w,G′k(w)]t(notation implies one column vector on top of another) the block error probability of decoding is bounded by εi. The channel when i=1 is the BSC(δ) channel and the channel when i=2 is the combination of BSC(δ) with the SC channel when no preceding is done. In practice we would utilize G′k,1 only for k=n−s and G′k,2 only for k=s, so the index k is not essential and is required only for the sake of current presentation. Thus the code can be represented by the subspace Vk={(w, G′k(w)): w∈Fk}.
Accordingly we formulate the SC noisy channel problem in the following way: we would like to convey (i.e. transmit) information via the vector v=[v1, . . . , vN]∈FN under the constraint that for some set of N>t≧0 indexes α={α(1), . . . , α(t)}⊂[N], α(1)< . . . <α(t), it holds that (vα(1),vα(2), . . . , vα(n)) are prescribed.
The input is N>s>t≧1, (s is chosen w.r.t. N), and with the δ>0 of the BSC, & d(s), & n=N−d(s), & d(n−s), & G′n−,1 & G′s,2. The transmitter's input also includes the matrix G1=(gi,j)1≦i≦n,i≦j≦s∈Fn×s, and α={α(1), . . . , α(t)}⊂[n], α(1)< . . . <α(t), and (v′α(1),v′α(2), . . . , v′α(t))∈Ft, the vector of stock cells.
The output is: v=[yecc,y]T
Compute with high success probability (ε2 failure probability):
y1=DecoderBSC(δ)(y1+y1e, y1ecc+y1ecc,e). As a result the processor now “knows” [y1,y2+y2e] (that is with ε2 failure probability):
Following the decoding of (1), compute
The main steps are:
Note the substantial complexity reduction when G11=Is×s.
Number | Date | Country | Kind |
---|---|---|---|
10-2013-0143913 | Nov 2013 | KR | national |