The present application claims priority of Korean Patent Application No. 10-2021-0005143, filed on Jan. 14, 2021, which is incorporated herein by reference in its entirety.
Various embodiments of the present invention relate to a memory, and more particularly, to error correction of a memory.
In the early stage of a semiconductor memory device industry, there were many originally good dies on the wafers, which means that memories were produced with no defective memory cells through a semiconductor fabrication process. However, as the capacity of memories increases, it becomes difficult to fabricate a memory that does not have any defective memory cell, and nowadays, it may be said that there are substantially no chances that a memory is fabricated without any defective memory cells. To address this issue, a repair method of replacing defective memory cells with redundant memory cells in a memory is being used.
Another method of the related art is using an error correction circuit (ECC circuit) for correcting errors in a memory in order to correct errors occurring in memory cells.
Embodiments of the present invention are directed to a method for reducing errors of error correction in a memory.
In accordance with an embodiment of the present invention, a memory includes: a data receiving circuit suitable for receiving data during a write operation; a data rotation circuit suitable for changing an order of the data transferred from the data receiving circuit and outputting the data having an order changed in response to an address during the write operation; an error correction code generation circuit suitable for generating an error correction code based on the data output from the data rotation circuit during the write operation; and a memory core suitable for storing a) the data received by the data receiving circuit and b) the error correction code based on the data output from the data rotation circuit during the write operation.
In accordance with another embodiment of the present invention, a memory includes: a memory core; and an ECC block suitable for generating an error correction code to be written to the memory core based on a data to be written to the memory core during a write operation, and during a read operation, correcting an error of the data read from the memory core based on the error correction code read from the memory core, wherein a check matrix used by the ECC block for generating the error correction code and for correcting the error of the read data read from the memory core, wherein the error is changed according to an address in the memory core storing the error correction code.
In accordance with still another embodiment of the present invention, a memory includes: a data receiving circuit suitable for receiving write data including a plurality of bits for a write operation; a data rotation circuit suitable for selectively changing the order of the plurality of bits in the write data based on an address associated with the write data to generate write output data; an error correction code generation circuit suitable for generating an error correction code based on the write output data; and a memory core suitable for storing the write output data and the error correction code.
Exemplary embodiments of the present invention will be described below in more detail with reference to the accompanying drawings. The present invention may, however, be embodied in different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the present invention to those skilled in the art. Throughout the disclosure, like reference numerals refer to like parts throughout the various figures and embodiments of the present invention. It is noted that reference to “an embodiment,” “another embodiment” or the like does not necessarily mean only one embodiment, and different references to any such phrase are not necessarily to the same embodiment(s). The term “embodiments” when used herein does not necessarily refer to all embodiments. As used herein, singular forms may include the plural forms as well and vice versa, unless the context clearly indicates otherwise. It will be further understood that the terms “comprises,” “comprising,” “includes,” and “including” when used in this specification, specify the presence of the stated elements and do not preclude the presence or addition of one or more other elements. As used herein, the term “and/or” includes any and all combinations of one or more of the associated listed items.
The error correction code generation circuit 110 may generate an error correction code ECC based on data DATA transferred from the outside of a memory (transferred for example from a memory controller which may provide the DATA shown input at the bottom of
During a write operation, the data DATA′ and the error correction code ECC may be stored in a memory core (such as memory core 850 shown in
During a read operation, the error correction circuit 120 may correct an error of the data DATA′ based on the error correction code ECC. Here, correcting an error may mean detecting an error of the data DATA′ based on the error correction code ECC and, when an error is detected, correcting the detected error. The error correction circuit 120 may include a checker 121 and a corrector 123. The checker 121 may detect whether there is an error or not and the location of the error through an operation based on the data DATA′ and the error correction code ECC. The corrector 123 may correct the error detected by the checker 121. The data DATA having an error is corrected by the error correction circuit 120 may be output to the outside of the memory. In other words, the data DATA may be transferred to the memory controller. The error correction circuit 120 may be able to correct not only the data DATA′ but also an error occurring in the error correction code ECC.
The error correction code generation circuit 110 and the error correction circuit 120 may generate an error correction code ECC by using a check matrix, which is also called an H matrix, and correct an error based on the error correction code ECC, which will be described below.
The check matrix may be a matrix of (number of bits of error correction code)×(number of bits of error correction code+number of bits of data). Herein, since the error correction code includes 4 bits and the data includes 8 bits, the check matrix may be a 4×12 matrix. Each component of the check matrix may have a value of 1 or 0.
The column vectors of the check matrix may respectively correspond to the bits D0 to D7 of the data DATA and the bits E0 to E3 of the error correction code ECC. For example, of the 12 column vectors, 8 column vectors may correspond to the bits D0 to D7 of the data DATA, and 4 column vectors may correspond to the bits E0 to E3 of the error correction code ECC, respectively. In
The error correction code generation circuit 110 may generate the error correction code ECC by multiplying the column vectors of the check matrix by the corresponding bits and then making the sum of each row become 0, which is an even number.
In one embodiment the error correction code ECC may be generated such that all the following four equations may be satisfied.
1*D0+1*D1+1*D2+0*D3+1*D4+1*D5+1*D6+1*D7+1*E0+0*E1+0*E2+0*E3=0 [Equation 1]
1*D0+1*D1+0*D2+1*D3+1*D4+0*D5+0*D6+1*D7+0*E0+1*E1+0*E2+0*E3=0 [Equation 2]
1*D0+0*D1+1*D2+1*D3+0*D4+1*D5+0*D6+1*D7+0*E0+0*E1+1*E2+0*E3=0 [Equation 3]
0*D0+1*D1+1*D2+1*D3+0*D4+0*D5+1*D6+1*D7+0*E0+0*E1+0*E2+1*E3=0 [Equation 4]
Substituting the data DATA (1,1,0,0,1,0,1,0) and the error correction code ECC (0,1,1,0) into the above four equations, it may be seen that the four equations are satisfied.
1*1+1*1+1*0+0*0+1*1+1*0+1*1+1*0+1*0+0*1+0*1+0*0=0
1*1+1*1+0*0+1*0+1*1+0*0+0*1+1*0+0*0+1*1+0*1+0*0=0
1*1+0*1+1*0+1*0+0*1+1*0+0*1+1*0+0*0+0*1+1*1+0*0=0
0*1+1*1+1*0+1*0+0*1+0*0+1*1+1*0+0*0+0*1+0*1+1*0=0
Equations 1 to 4 may also be used in a process in which the error correction circuit 120 corrects errors of the data DATA and the error correction code ECC based on the error correction code ECC. When the result values of calculating the above four equations are that Equation 1=0; Equation 2=0; Equation 3=0; and Equation 4=0, it may indicate that there is no error. Otherwise, it may indicate that there is an error.
Herein, it is assumed that an error occurs in which the value of D6 is changed from 1 to 0 (1→0) among the data DATA′ (1,1,0,0,1,0,1,0), so the data DATA′ is (1,1,0,0,1,0,0,0).
Calculating Equations 1 to 4 by substituting the erroneous data DATA′ (1,1,0,0,1,0,0,0) and the error correction code ECC (0,1,1,0) into the check matrix may give the following result.
1*1+1*1+1*0+0*0+1*1+1*0+1*0+1*0+1*0+0*1+0*1+0*0=1
1*1+1*1+0*0+1*0+1*1+0*0+0*0+1*0+0*0+1*1+0*1+0*0=0
1*1+0*1+1*0+1*0+0*1+1*0+0*0+1*0+0*0+0*1+1*1+0*0=0
0*1+1*1+1*0+1*0+0*1+0*0+1*0+1*0+0*0+0*1+0*1+1*0=1
The result (1,0,0,1) may represent the location of the error. Since the column vector having a value of (1,0,0,1) among the column vectors of the check matrix is a column vector corresponding to D6, the error correction circuit 120 may determine that there is an error in D6 and correct the error by inverting the value of D6 from 0 to 1 (0→1). In other words, errors may be corrected correctly.
Obtaining the result of (1,0,0,1) by substituting the data DATA′ and the error correction code ECC into the check matrix may be performed by the checker 121, and correcting the error of the location corresponding to (1,0,0,1) may be performed by the corrector 123.
Herein, it is assumed that errors occur in D0 and D3 among the data DATA′ (1,1,0,0,1,0,1,0), so the data DATA′ is (0,1,0,1,1,0,1,0).
Calculating Equations 1 to 4 by substituting the erroneous data DATA′ (0,1,0,1,1,0,1,0) and the error correction code ECC (0,1,1,0) into the check matrix may give the following result.
1*0+1*1+1*0+0*1+1*1+1*0+1*1+1*0+1*0+0*1+0*1+0*0=1
1*0+1*1+0*0+1*1+1*1+0*0+0*1+1*0+0*0+1*1+0*1+0*0=0
1*0+0*1+1*0+1*1+0*1+1*0+0*1+1*0+0*0+0*1+1*1+0*0=0
0*0+1*1+1*0+1*1+0*1+0*0+1*1+1*0+0*0+0*1+0*1+1*0=1
The result (1,0,0,1) may represent the location of the error. Since the column vector having a value of (1,0,0,1) among the column vectors of the check matrix is a column vector corresponding to D6, the error correction circuit 120 may determine that there is an error in D6 and correct the error by inverting the value of D6 from 1 to 0 (1→0). As a result of the error correction, the data DATA may become (0,1,0,1,1,0,0,0). As shown, when there is an error of 2 bits D0 and D3 in the data DATA′, the error correction circuit 120 may not correct the error. Rather, the error correction circuit 120 may miscorrect the D6, which is a column vector that is not erroneous, thus increasing the error of the data DATA to 3 bits. In this case, the error correction circuit 120 does not reduce the error of the memory, but rather increases the error.
Herein, it is assumed that error occur in D6 and D7 among the data DATA′ (1,1,0,0,1,0,1,0), so the data DATA becomes (1,1,0,0,1,0,0,1).
Calculating Equations 1 to 4 by substituting the erroneous data DATA′ (1,1,0,0,1,0,0,1) and the error correction code ECC (0,1,1,0) into the check matrix may give the following result.
1*1+1*1+1*0+0*0+1*1+1*0+1*0+1*1+1*0+0*1+0*1+0*0=0
1*1+1*1+0*0+1*0+1*1+0*0+0*0+1*1+0*0+1*1+0*1+0*0=1
1*1+0*1+1*0+1*0+0*1+1*0+0*0+1*1+0*0+0*1+1*1+0*0=1
0*1+1*1+1*0+1*0+0*1+0*0+1*0+1*1+0*0+0*1+0*1+1*0=0
The result (0,1,1,0) may indicate the location of the error. However, since there is no column vector having a value of (0,1,1,0) among the column vectors of the check matrix, no error may be corrected.
In this example, although there is an error in two bits in the data DATA′, no miscorrection is made. Thus, the data DATA may continue to maintain the error of two bits. In short, although the error is not reduced by the error correction operation, the error may not be at least increased.
Although the error of two bits that cannot be corrected by the error correction circuit 120 have occurred in both of the error correction processes of
Referring to
which is the sum of the column vectors
of the erroneous locations D0 and D3. For another example of
which is the sum of the column vectors
of the erroneous locations D6 and D7 should be corrected, but since the location of the column vector
does not exist, miscorrection may not occur.
Referring to
The data receiving circuit 801 may receive data DATA during a write operation. Also, the data transferring circuit 803 may transfer data DATA during a read operation.
The memory core 850 may include a cell array including a plurality of memory cells, and circuits for writing and reading data to and from the cell array.
Referring back to
The ECC block 810 may include a data rotation circuit 820, an error correction code generation circuit 830, and an error correction circuit 840.
The data rotation circuit 820 may change the order of data and output the data in response to the address ADD. During a write operation, the data rotation circuit 820 may change the order of the data DATA transferred from the data receiving circuit 801 in response to the address ADD and output it. During a read operation, the data rotation circuit 820 may change the order of data DATA′ read from the memory core 850 in response to the address ADD and output it. The address ADD may be some bits of a row address. For example, the address ADD may be a lowest-level bit of the row address. Using the address ADD, it is possible to detect which word line among the even-numbered word lines and the odd-numbered word lines in the memory core 850 is accessed. When one of set word lines (e.g., the even-numbered word lines) is accessed, the data rotation circuit 820 may output the data DATA or DATA′ as it is without changing the order of the data DATA or DATA′. When one of set word lines (e.g., the odd-numbered word lines) is accessed, the data rotation circuit 820 may change the order of the data DATA or DATA′. Herein, changing the order of the data DATA or DATA′ may mean shifting the data DATA or DATA′ by a set number of bits (e.g., 1 bit). For example, the order of 32-bit data may be changed from D0, D1, D2, D3 . . . , D30, D31 to D31, D0, D1 . . . , D29, D30.
The error correction code generation circuit 830 may generate an error correction code ECC based on the data transferred from the data rotation circuit 820 during a write operation. The error correction code generation circuit 830 may use a check matrix, e.g., the check matrix as shown in
Referring back to
The checker 841 may detect whether there is an error or not and the location of an error through an operation using the data transferred from the data rotation circuit 820 and the error correction code ECC. Since the checker 841 receives the data from the data rotation circuit 820 and performs an operation on the data, when the data rotation circuit 820 does not change the order of the data, that is, when a set word line (e.g., an even-numbered word line) is accessed, the checker 841 may detect whether there is an error or not and the location of an error by using the check matrix of
The corrector 843 may correct an error which is detected by the checker 841. In response to the address ADD, the corrector 843 may correct an error of the data DATA′ by using one between the check matrix of
and the even-numbered word lines are accessed, the corrector 843 may correct the bit D5 corresponding to
in the check matrix of
in the check matrix of
In one embodiment, the ECC block 810 may generate an error correction code ECC and correct an error by using one between the two check matrices according to the address ADD.
Hereafter, the reason why the ECC block 810 uses one between the check matrix of
Referring to
which is the sum of the column vector
corresponding to the bit D0 and the column vector
corresponding to the bit D1 should be corrected in the check matrix of
does not exist in the check matrix of
which is the sum of a column vector
corresponding to the bit D14 and a column vector
corresponding to the bit D15 should be corrected in the check matrix of
does not exist in the check matrix of
However, the check matrix of
which is the sum of a column vector
corresponding to the bit D5 and a column vector
corresponding to the bit D6 should be corrected in the check matrix of
corresponds to the bit D20, miscorrection in which the bit D20 is corrected may occur. If such miscorrection is to be prevented even when an error of two bits occurs other than the combinations of the cases (1) to (16), the number of bits of the error correction code ECC should be increased and a larger size of a check matrix should be used. To this end, the storage capacity of the memory core 850 needs to be increased and the size of the ECC block 810 needs to be increased. It may not be easy to increase the number of bits of the error correction code ECC.
As described above, when an even-numbered word line is accessed in the memory core 850, the possibility that a 2-bit error such as the combinations of the cases (1) to (16) occurs may be increased due to a storage node bridge. However, in this case, the ECC block 810 may generate the error correction code ECC and perform an error correction operation by using the check matrix of
Referring to the check matrix of
When an error occurs in bits D1 and D2 at the same time, an error of a location indicated by a column vector
which is the sum of the column vector
corresponding to the bit D1 and the column vector
corresponding to the bit D2 should be corrected in the check matrix of
does not exist in the check matrix of
However, the check matrix of
which is the sum of a column vector
corresponding to the bit D20 and a column vector
corresponding to the bit D21 should be corrected in the check matrix of
corresponds to the bit D13, miscorrection in which the bit D13 is corrected may occur.
As described above, when an odd-numbered word line is accessed in the memory core 850, the possibility that a 2-bit error such as the combinations of the cases (A) to (0) occurs may be increased due to a storage node bridge. However, in this example, the ECC block 810 may generate the error correction code ECC and perform an error correction operation by using the check matrix of
Herein, it is illustrated that the check matrix used in the ECC block 810 is changed depending on whether the word line accessed in the memory core 850 is an odd-numbered word line or an even-numbered word line, but the ECC block 810 may be designed such that the check matrix used in the ECC block 810 is changed based on the bit line accessed in the memory core 850 or based on the regions in the memory core 850.
In the above, a technique for reducing the probability of occurrence of miscorrection by changing the check matrix used by the ECC block 810 according to the address ADD is described.
Furthermore, it may be also possible to actively correct a 2-bit error that occurs frequently.
When an even-numbered word line is accessed in the memory core 850, that is, when the ECC block 810 uses the check matrix of
In this case, the corrector 843 may be designed to correct the error by inverting the bit D0 and the bit D1. Likewise, when an error occurs in bits D2 and D3, the calculation result of the checker 841 may be
In this case, the corrector 843 may be designed to correct the error by inverting the bit D2 and the bit D3. The cases where the corrector 843 corrects a 2-bit error based on the calculation result of the checker 841 are summarized in
When an odd-numbered word line is accessed in the memory core 850, that is, when the ECC block 810 uses the check matrix of
In this case, the corrector 843 may be designed to correct the error by inverting the bit D1 and the bit D2. Likewise, when an error occurs in bits D17 and D18, the calculation result of the checker 841 may be
In this case, the corrector 843 may be designed to correct the error by inverting the bit D17 and the bit D18. The cases where the corrector 843 corrects a 2-bit error based on the calculation result of the checker 841 are summarized in
According to one embodiment of the present invention, it may be possible to reduce errors in error correction in a memory.
While the present invention has been described with respect to the specific embodiments, it will be apparent to those skilled in the art that various changes and modifications may be made without departing from the spirit and scope of the invention as defined in the following claims.
Number | Date | Country | Kind |
---|---|---|---|
10-2021-0005143 | Jan 2021 | KR | national |
Number | Name | Date | Kind |
---|---|---|---|
9947412 | Hu | Apr 2018 | B1 |
20060080515 | Spiers | Apr 2006 | A1 |
Number | Date | Country |
---|---|---|
10-0927397 | Nov 2009 | KR |
Number | Date | Country | |
---|---|---|---|
20220229726 A1 | Jul 2022 | US |