The disclosure of Japanese Patent Application No. 2015-140525 filed on Jul. 14, 2015 including the specification, drawings and abstract is incorporated herein by reference in its entirety.
The present disclosure relates to an error correction device, and particularly to an error correction device using an error correction code containing a parity bit.
There is known an error correction technique as a technique for correctly decoding original data at the time of reading digital information stored in a memory or the like and receiving transmitted digital information.
In the error correction technique, redundancy is provided by encoding original data, and an error of the data is detected and corrected utilizing the redundancy. For example, a Hamming code and a BCH (Bose-Chaudhuri-Hocquenghem) code are known as error correction codes (the Art of Error Correcting Coding, John Wiley & Sons, 2002, pp 103, pp 55-56 (Non-patent Document 1)).
Japanese Unexamined Patent Publication No. 2003-115197 (Patent Document 1) discloses another error correction code. More specifically, a plurality of threshold values are set for a cell resistance value in reading the resistance value of a memory cell in an MRAM (Magnetoresistive Random Access Memory), thereby providing a cell resistance value for determining an erasure state besides a cell resistance value for determining “0” or “1”. It is shown that a Reed-Solomon code is used in the encoding/decoding, thereby performing correction in consideration of not only the inversion state of data but also the erasure state.
However, the Reed-Solomon code has a high correction capability, but has high redundancy, and has complicated processing as compared to the Hamming code and the BCH code, which takes time for decoding processing. This does not enable high-speed data reading, and particularly makes it difficult to apply the Reed-Solomon code to a main memory or the like of a computer to be accessed in real time. Further, complicated decoding processing disadvantageously increases a circuit configuration for implementing error correction.
On the other hand, error correction using the Hamming code or some BCH codes enables high-speed decoding processing, but does not have a high correction capability, which cannot significantly decrease an error occurrence probability.
The present disclosure has been made to solve the above problems, and an object thereof is to provide an error correction device, a semiconductor storage device, and an error correction method with a simple configuration and a high correction capability.
The other problems and novel features will become apparent from the description of this specification and the accompanying drawings.
An error correction device according to one embodiment is an error correction device which can perform c (c<n) error corrections on n-bit encoded data containing a parity bit. The error correction device includes an assumption data setting circuit for setting a plurality of assumption data, containing c error bits and (n−c) or fewer erasure bits, by assuming data of an erasure bit, and a decoding circuit which calculates a syndrome for each of the assumption data set by the assumption data setting circuit and performs decoding based on a calculation result and the parity bit.
According to the error correction device according to the one embodiment, it is possible to improves an error correction capability using an error correction code with a simple configuration.
Hereinafter, various embodiments of the present invention will be described in detail with reference to the drawings. The same or equivalent sections in the drawings are denoted by the same reference numerals, and their description will not be repeated.
Referring to
Referring to (a) of
On the other hand, referring to (b) of
Therefore, in the error detection method using the extended Hamming code, by comparing the parity of the original encoded data with the parity of the encoded data containing the error (parity check), it is possible to check whether the encoded data containing the error contains 1-bit inversion or 2-bit inversion.
Referring to
Referring to
Next, in the error correction method according to the first embodiment, a syndrome is calculated for each set assumption data, thereby to decode the original data. At this time, since not all elements of the syndrome are 0 in each assumption data, it can be seen that inversion of one bit or more is contained.
Next, a parity check is performed on each set assumption data. Since the original encoded data is set so that the parity becomes even, it can be determined that 1-bit inversion is contained if the parity of the assumption data is odd and 2-bit inversion is contained if the parity of the assumption data is even. In this embodiment, it is determined that the assumption data of odd parity which is within the range of the error correction capability of the Hamming code is correct assumption data. Then, the result decoded using the applicable assumption data is adopted.
Further, there might be a case where inversion is not contained and 1-bit erasure or 2-bit erasure is contained in the input data. In this case, assumption data for a case where the erasure bit is “0” and assumption data for a case where the erasure bit is “1” are set, and a result decoded using the assumption data where each element of the syndrome is 0 is adopted.
According to the first embodiment, it is possible to improve the correction capability of the error correction code with a simple method.
As an example of data inputted to the error correction device 1 according to the first embodiment, n-bit data encoded using the Hamming code is used.
The input data reception circuit 10 receives and stores n-bit input data BIT0 to BITn-1 inputted to the error correction device, and outputs the input data to the state determination circuit 20. For example, the input data reception circuit 10 may be configured with a buffer or a register.
The state determination circuit 20 determines whether each bit of the input data BIT0 to BITn-1 inputted from the input data reception circuit 10 is in an erasure state. For example, if the input data BITk (k=0, 1, . . . , n-1) is in the erasure state, the state determination circuit 20 outputs erasure state determination data ERk as 1. Further, if the input data BITk is not in the erasure state (is in the normal state or the inversion state), the state determination circuit 20 outputs the erasure state determination data ERk as 0.
The erasure position decision circuit 100 decides the position of the erasure bit, based on the erasure state determination data ER0 to ERn-1 inputted from the state determination circuit 20. More specifically, if a plurality of bits indicating the erasure state are contained in the erasure state determination data ER0 to ERn-1, the erasure position decision circuit 100 outputs a predetermined number of bits as erasure bits, in accordance with predetermined priority order.
For example, if the erasure state determination data ERk indicates the erasure state and is set as the erasure bit due to high priority, the erasure position decision circuit 100 outputs erasure position decision data ERSELk as 1. If the erasure state determination data ERk does not indicate the erasure state, the erasure position decision circuit 100 outputs the erasure position decision data ERSELk as 0.
The predetermined number of bits set as erasure bits may be determined in accordance with the erasure correction capability of the error correction code.
In the case where the input data BIT0 to BITn-1 are serially inputted to the input data reception circuit 10 and the erasure bit position can be specified at the time of input, the error correction device 1 does not need to include the erasure position decision circuit 100.
Based on the erasure position decision data ERSEL0 to ERSELn-1 inputted from the erasure position decision circuit 100 and the input data BIT0 to BITn-1 inputted from the input data reception circuit 10, the assumption data setting circuit 200 sets assumption data for a case where the erasure bit is “0” and assumption data for a case where the erasure bit is “1”.
The assumption data setting circuit 200 includes assumption data setting units 200a, 200b. For example, the assumption data setting unit 200a sets the input data BITk corresponding to the erasure position decision data ERSELk “0” (not the erasure bit) to assumption data BITERLk. On the other hand, the assumption data setting unit 200a sets the input data BITk corresponding to the erasure position decision data ERSELk “1” (the erasure bit) to assumption data BITERLk (“0”). The assumption data setting unit 200b sets the input data BITk corresponding to the erasure position decision data ERSELk “0” to assumption data BITERHk. On the other hand, the assumption data setting unit 200b sets the input data BITk corresponding to the erasure position decision data ERSELk “1” to assumption data BITERHk (“1”).
In the case of setting a plurality of bits as erasure bits in the erasure position decision circuit 100, assumption data setting units whose number is a power of the number of erasure bits may be provided, and each assumption data setting unit may output different assumption data.
The decoding circuit 300 decodes the original data, based on the assumption data BITERL0 to BITERLn-1 and BITERH0 to BITERHn-1 inputted from the assumption data setting circuit 200.
The decoding circuit 300 according to this embodiment includes a decoding unit 310, a decoding unit 320, and a selection unit 330.
The decoding unit 310 includes a syndrome calculation unit 312, a code decoding unit 314, and a parity check unit 316.
The decoding unit 320 includes a syndrome calculation unit 322, a code decoding unit 324, and a parity check unit 326.
In the decoding unit 310, the syndrome calculation unit 312 calculates a syndrome SL, using the assumption data BITERL0 to BITERLn-1 set in the assumption data setting unit 200a.
The code decoding unit 314 decodes data based on the calculation result. The parity check unit 316 performs a parity check on the assumption data BITERL0 to BITERLn-1, and outputs the decoding result and parity information PL (the result of the parity check) to the selection unit 330.
The parity check unit 316 may be disposed before the syndrome calculation unit 312, or may be disposed between the syndrome calculation unit 312 and the code decoding unit 314. Alternatively, the parity check unit 316 may be arranged in parallel with the syndrome calculation unit 312 and the code decoding unit 314 for concurrent operation.
In the decoding unit 320, the syndrome calculation unit 322 calculates a syndrome SH, using the assumption data BITERH0 to BITERHn-1 set in the assumption data setting unit 200b.
The code decoding unit 324 decodes data based on the calculation result. The parity check unit 326 performs a parity check on the assumption data BITERH0 to BITERHn-1, and outputs the decoding result and parity information PH to the selection unit 330.
In the first embodiment, in the decoding circuit 300, the decoding units are provided in accordance with the number of assumption data set by the assumption data setting circuit 200. This is to parallelly operate decoding processing which takes processing time and to enable high-speed decoding. In another aspect, the decoding circuit 300, without having a plurality of decoding units, may be configured to operate with a single unit.
The selection unit 330 selects parity information corresponding to predetermined parity information from the parity information PL, PH inputted from the parity check units 316, 326, and selects the decoding result corresponding to the selected one of the parity information PL, PH. More specifically, the selection unit 330 selects parity information indicating odd parity which is within the range of the error correction capability of the Hamming code, and outputs the decoding result corresponding to the odd parity. On the other hand, the decoding result corresponding to parity information indicating even parity is beyond the range of the error correction capability of the Hamming code; accordingly, the selection unit 330 does not output the decoding result.
Thus, it is possible to achieve the error correction device that improves the original correction capability of the error correction code with a simple configuration.
The decoding circuit 360 includes syndrome calculation units 312, 322, parity check units 316, 326, an assumption data selection unit 340, and a code decoding unit 350.
The syndrome calculation unit 312 calculates the syndrome SL, using the assumption data BITERL0 to BITERLn-1 set in the assumption data setting unit 200a.
The parity check unit 316 performs a parity check on the assumption data BITERL0 to BITERLn-1, and outputs the parity information PL and the syndrome SL to the assumption data selection unit 340.
The syndrome calculation unit 322 calculates the syndrome SH, using the assumption data BITERH0 to BITERHn-1 set in the assumption data setting unit 200b.
The parity check unit 326 performs a parity check on the assumption data BITERH0 to BITERHn-1, and outputs the parity information PH and the syndrome SH to the assumption data selection unit 340.
The assumption data selection unit 340 checks the syndromes SL, SH. If there exists assumption data where either the syndrome SL or the syndrome SH is 0, the assumption data selection unit 340 determines that the assumption data is correct assumption data, and outputs the assumption data along with the syndrome calculation result to the code decoding unit 350.
The code decoding unit 350 decodes a decoding result, based on the inputted assumption data and syndrome, and outputs the result.
On the other hand, if both syndromes SL and SH are not 0, the assumption data selection unit 340 selects parity information corresponding to predetermined parity information from the parity information PL, PH, and outputs the assumption data and the syndrome corresponding to the selected one of the parity information PL, PH to the code decoding unit 350. More specifically, in this example, the assumption data selection unit 340 outputs the assumption data and the syndrome corresponding to parity information indicating odd parity which is within the range of the error correction capability of the Hamming code.
The code decoding unit 350 decodes a decoding result, based on the inputted assumption data and syndrome, and outputs the result.
In this example, by selecting correct assumption data beforehand, it is possible to omit a plurality of assumption data decoding processes. As a result, it is possible to attain space saving of a circuit configuration and implement high-speed processing.
Next, the operation of the error correction device 1 will be described using a specific example of data inputted to the input data reception circuit 10. For example, assume that an error occurs in the (8, 4) Hamming code (01010101) obtained by setting the parity bit to the original data (0101) so that the parity becomes even and the input data BIT0 to BIT7 (00*10101) is inputted to the input data reception circuit 10. In the input data, the second bit is inverted, and the third bit is erased.
The state determination circuit 20 determines that the third bit of the input data BIT0 to BIT7 (00*10101) is in the erasure state, and outputs the erasure state determination data ER0 to ER7 (00100000) to the erasure position decision circuit 100.
The erasure position decision circuit 100 decides the erasure state determination data ER2 as the erasure bit, based on the predetermined priority order, and outputs the erasure position decision data ERSEL0 to ERSEL7 (00100000) to the assumption data setting circuit 200.
The assumption data setting circuit 200 sets assumption data, based on the input data BIT0 to BIT7 received by the input data reception circuit 10 and the erasure position decision data ERSEL0 to ERSEL7.
In this example, the assumption data setting unit 200a sets the assumption data BITERL0 to BITERL7 (00010101) in which the erasure bit of the input data BIT0 to BIT7 (00*10101) is “0”. The assumption data setting unit 200b sets the assumption data BITERH0 to BITERH7 (00110101) in which the erasure bit of the input data BIT0 to BIT7 (00*10101) is “1”. Further, the assumption data setting circuit 200 outputs the set data to the decoding circuit 300.
The syndrome calculation unit 312 calculates the syndrome SL, using the assumption data BITERL0 to BITERL7 (00010101).
The code decoding unit 314 compares the syndrome SL with the check matrix, and decodes the decoding result (0101).
The parity check unit 316 determines that the parity of the assumption data BITERL0 to BITERL7 (00010101) is odd parity, and outputs the decoding result (0101) and the parity information PL indicating the odd parity to the selection unit 330.
On the other hand, the syndrome calculation unit 322 calculates the syndrome SH, using the assumption data BITERH0 to BITERH7 (00110101).
The code decoding unit 324 compares the syndrome SH with the check matrix, and decodes the decoding result (1101).
The parity check unit 326 determines that the parity of the assumption data BITERH0 to BITERH7 (00110101) is even parity, and outputs the decoding result (1101) and the parity information indicating the even parity PH to the selection unit 330.
The selection unit 330 selects the decoding result (0101) corresponding to the odd parity PL which is within the range of the error correction capability of the Hamming code from the inputted decoding results (0101), (1101), and outputs the decoding result (0101). On the other hand, the decoding result (1101) corresponding to the even parity PH is beyond the range of the error correction capability of the Hamming code; accordingly, the selection unit 330 does not output the decoding result (1101).
Next, the case of using the decoding circuit 360 in place of 300 will be described. The overlapping sections will not be described in detail.
The syndrome calculation unit 312 calculates the syndrome SL, using the assumption data BITERL0 to BITERL7 (00010101).
The parity check unit 316 determines that the parity of the assumption data BITERL0 to BITERL7 (00010101) is odd parity, and outputs the syndrome SL, the assumption data BITERL0 to BITERL7 (00010101), and the parity information PL indicating the odd parity to the assumption data selection unit 340.
The syndrome calculation unit 322 calculates the syndrome SH, using the assumption data BITERH0 to BITERH7 (00110101).
The parity check unit 326 determines that the parity of the assumption data BITERH0 to BITERH7 (00110101) is even parity, and outputs the syndrome SH, the assumption data BITERH0 to BITERH7 (00110101), and the parity information PH indicating the even parity to the assumption data selection unit 340.
The assumption data selection unit 340 checks the syndromes SL, SH. If there exists assumption data where each element of either the syndrome SL or the syndrome SH is 0, the assumption data selection unit 340 determines that the assumption data is correct assumption data, and outputs the syndrome calculation result and the assumption data to the code decoding unit 350.
The code decoding unit 350 decodes a decoding result, based on the inputted assumption data and syndrome, and outputs the result.
If not all elements of the syndrome are 0 in each syndrome SL, SH, the assumption data selection unit 340 selects the odd parity PL which is within the range of the error correction capability of the Hamming code from the parity information PL, PH. Then, the assumption data selection unit 340 outputs the assumption data BITERL0 to BITERL7 (00010101) corresponding to the parity information PL and the syndrome SL to the code decoding unit 350.
The code decoding unit 350 decodes data, based on the inputted assumption data BITERL0 to BITERL7 (00010101) and syndrome SL, and outputs the decoding result (0101).
As the assumption data selection unit 340 selects correct assumption data beforehand, it is possible to omit a decoding process. As a result, it is possible to attain the space saving of the circuit configuration and implement high-speed processing.
The NOR gate 102 receives the input of the erasure state determination data ER0 to ERn-1, and outputs a NOR logical operation result to the AND gate 104.
The AND gate 104 receives the output of the NOR gate 102 and the input of the erasure state determination data ERk, and outputs the AND logical operation result.
By way of example, assume that the priority of the erasure state determination data ER0 is the highest, the priority of ER1, ER2, . . . decreases in order, and the priority of ERn-1 is the lowest.
For example, even if the erasure state determination data ERk indicates the erasure state “1”, if the erasure state determination data ERk-1 (k≧2) indicates the erasure state “1”,the output of the NOR gate 102 is “0”. As a result, the erasure position decision data ERSELk which is the output of the AND gate 104 is “0”.
On the other hand, if the erasure state determination data ERk indicates the erasure state “1” and all erasure state determination data that has higher priority than ERk indicates the non-erasure state “0”, the output of the NOR gate 102 is “1”. As a result, the erasure position decision data ERSELk is “1”.
Since the erasure position decision circuit 100 according to the first embodiment has a configuration in which only the erasure state determination data ERk that indicates the erasure state and has the highest priority in the inputted erasure state determination data ER0 to ERn-1 is set as the erasure bit, it is possible to specify the position of the erasure bit in the input data.
In the first embodiment, only one bit of the erasure state determination data ER0 to ERn-1 is set as the erasure bit; however, in another aspect, a predetermined number of bits may be treated as erasure bits. For example, the number of bits according to the erasure correction capability of the error correction code may be set as erasure bits.
The AND gate 204 receives the input data BITk inputted from the input data reception circuit 10 and the input of the erasure position decision data ERSELk inverted through the inverter 202, and sets the AND logical operation result as the assumption data BITERLk.
The OR gate 206 receives the input data BITk inputted from the input data reception circuit 10 and the input of the erasure position decision data ERSELk, and sets the OR logical operation result as the assumption data BITERHk.
In the first embodiment, in the erasure position decision data ERSEL0 to ERSELn-1, only one bit determined beforehand by the erasure position decision circuit 100 is the erasure bit “1”, and the other (n-1) bits are the non-erasure bits “0”.
For example, if the kth erasure position decision data ERSELk is the non-erasure bit “0”, the AND gate 204 and the OR gate 206 output the input data BITk as it is; therefore, the assumption data BITERLk is equal to the assumption data BITERHk.
On the other hand, if the kth ERSELk is the erasure bit “1”, BITk does not exist; therefore, the assumption data BITERLk is 0, and the assumption data BITERHk is 1.
Thus, it is possible to set the assumption data in which the erasure bit is assumed to be “0” and the assumption data in which the erasure bit is assumed to be “1”.
The memory cell 506 may be either volatile or nonvolatile memory element, such as an SRAM (Static Random Access Memory), a DRAM (Dynamic Random Access Memory), a flash memory, an ReRAM (Resistance Random Access Memory), an MRAM, or an FeRAM (Ferroelectric Random Access Memory).
The data of the memory cell 506 can be, for example, the resistance value, voltage value, charge amount, or current amount of the memory cell 506.
The erasure determination circuit 510 is not disposed for each bit line 504, but erasure determination circuits whose number is equivalent to the number of data that the memory cell array can simultaneously output are disposed for the memory cell array 500. Thus, by sharing the erasure determination circuit 510 among a plurality of bit lines 504, it is possible to minimize variation, in determining the state of the bit stored in the memory cell 506, which occurs in the case of providing a plurality of erasure determination circuit 510.
The erasure determination circuit 510 according to the first embodiment includes comparators 512, 514, an AND gate 516, and an inverter 518. The sense amplifier 508 outputs a voltage SENS according to the data level of the memory cell 506 read from the bit line 504. The erasure determination circuit 510 compares the voltage SENS with reference voltages VrefH, VrefL inputted to the comparators 512, 514, thereby detecting the state of the bit stored in the memory cell 506. Assume that the voltage value VrefH>VrefL.
More specifically, if the voltage SENS outputted from the sense amplifier 508 is lower than the reference voltage VrefH inputted to the comparator 512 and higher than the reference voltage VrefL inputted to the comparator 514, the erasure determination circuit 510 outputs the outputs of the comparators 512, 514 as “1”. As a result, the erasure determination circuit 510 outputs a control signal ER as “1”, and outputs a control signal BIT as “0”.
If the voltage SENS is not less than the reference voltage VrefH inputted to the comparator 512, the output of the comparator 512 is “0”, and the output of the comparator 514 is “1”. As a result, the erasure determination circuit 510 outputs the control signal ER as “0”, and outputs the control signal BIT as “1”.
If the voltage SENS is not more than the reference voltage VrefL inputted to the comparator 514, the output of the comparator 512 is “1”, and the output of the comparator 514 is “0”. As a result, the erasure determination circuit 510 outputs the control signal ER as “0”, and outputs the control signal BIT as “0”.
The erasure determination circuit 510 determines the state of data stored in the memory cell, and outputs the state of data by combining the 2-bit control signals ER and BIT. For example, the erasure determination circuit 510 can output the control signals (ER, BIT)=(1, 0) as the erasure state “*” determine (0, 1) as the inversion state “1”, and output (0, 0) as the normal state “0”.
By outputting the state of the bit of the memory cell 506 determined by the erasure determination circuit 510 to the input data reception circuit 10 in the error correction device 1, it is possible to achieve the semiconductor device for performing error correction according to the first embodiment.
By setting threshold values a, b for the resistance value of the memory cell 506, the resistance value of the memory cell is read in the form of three values. More specifically, the threshold values a, b are set corresponding to the reference voltages VrefH, VrefL of the comparators 512, 514 in the erasure determination circuit 510, so that the erasure determination circuit 510 determines that the resistance value of the memory cell 506 not more than the threshold value a is in the normal state “0”, determines that the resistance value not less than the threshold value b is in the inversion state “1”, and determines that the resistance value more than the threshold value a and less than the threshold value b is in the erasure state “*”.
The erasure determination circuit 510 reads data stored in the memory cell 506 in the form of three values “*”, “1”, “0”, and outputs the result to the input data reception circuit 10 of the error correction device 1, so that the erasure determination circuit 510 can be used as the error correction device in memory data reading.
Next, an error occurrence probability using a general Hamming code and an error occurrence probability using the error correction method according to the first embodiment will be described.
Assume that Pp denotes the probability of the normal state “0”, Pf denotes the probability of the inversion state “1”, and Pe denotes the probability of the erasure state “*”. In this case, a relational expression of Pp+Pf+Pe=1 is established.
The probability Pc2 of an error in a general (n, k) Hamming code can be expressed by the following equation (1).
The symbol d denotes an inter-code distance, and in the case of the Hamming code, d=3. In the equation (1), if (Pf+Pe)<<Pp, Pc2 is proportional to the square of (Pf+Pe). For example, in the case of the (7, 4) Hamming code, Pc2 is obtained by the following equation (2).
Pc2≈9×(Pf+Pe)2 (2)
On the other hand, an error occurrence probability Pc3 using the error correction method according to the first embodiment is expressed by the following equation (3).
In the equation (3), if (Pf+Pe)<<Pp, Pc3 takes two kinds of values, depending on the relation between Pf and Pe, as shown in the following equations (4), (5).
Pc3≈12×(Pf+Pe)2 (4)
Pc3≈21×Pe3 (5)
In the case of Pf<<Pe, the error occurrence probability Pc3 is proportional to the cube of the probability Pe of the erasure state “*”. From this result, it is found that the error occurrence probability using the error correction method according to the first embodiment is lower than the error occurrence probability using the general Hamming code.
Referring to
First, in the error correction method according to this embodiment, one of the erased two bits is set to “0” or “1”. For example, in (a) of
Next, in the error correction method according to this embodiment, a syndrome is calculated for each set assumption data, thereby to decode the original data. At this time, all elements of the syndrome of the assumption data in which the erasure bit is assumed to be “1” in (a2) of
On the other hand, in the case where the erased third bit is set to “1” in (b) of
Thus, it is possible to improve the correction capability of the error correction code with a simple method.
The error correction device 2 which implements the error correction method according to this embodiment will be described. Only differences with the error correction device 1 according to the first embodiment will be described, and the overlapping contents will not be repeated.
Referring to
In this example, the erasure position decision circuit 100 is changed to an erasure position decision circuit 110. In comparison with the erasure position decision circuit 100, the erasure position decision circuit 110 decides an erasure bit position and sets setting data. More specifically, the erasure position decision circuit 110 sets the second bit as the erasure bit, based on predetermined priority order.
Further, the erasure position decision circuit 110 generates setting data for setting (fixing) to either “0” or “1” a bit in which the erasure position decision data ERSELk is set as “0” (non-erasure bit) due to low priority or the like though the erasure state determination data ERk indicates “1” (erasure state).
More specifically, if the erasure state determination data ERk indicates “0” (non-erasure state), the erasure position decision circuit 110 outputs setting data EBITk (“0”) to set the input data BITk as it is. On the other hand, if the erasure state determination data ERk indicates “1” (erasure state) and the erasure position decision data ERSELk indicates “0” (not set as the erasure bit), the erasure position decision circuit 110 outputs setting data EBITk (“1”) to set the input data BITk to either “0” or “1”.
As for whether to set the input data BITk to either “0” or “1”, either value may be determined beforehand.
In the example of
Therefore, the erasure position decision circuit 110 outputs the erasure position decision data ERSEL0 to ERSEL7 (01000000) and the setting data EBIT0 to EBIT7 (00100000) to the assumption data setting circuit 200.
Based on the input data BIT0 to BIT7 (0**10101) inputted to the input data reception circuit 10, the erasure position decision data ERSEL0 to ERSEL7 (01000000) inputted from the erasure position decision circuit 110, and the setting data EBIT0 to EBIT7 (00100000), the assumption data setting circuit 200 sets assumption data for a case where the erasure bit is “0” and assumption data for a case where the erasure bit is “1”.
More specifically, the input data BIT0 to BIT7 (0**10101) is converted into the input data BIT0 to BIT7 (0*010101), in accordance with the setting data EBIT0 to EBIT7 (00100000). The setting data EBITk (“1”) in this example fixes the corresponding bit to 0 as an example.
The AND gate 204 receives the input data BIT0 to BIT7 (0*010101) and the input of the erasure position decision data ERSEL0 to ERSEL7 (01000000) inverted through the inverter 202, and sets the AND logical operation result as the assumption data BITERL0 to BITERL7 (00010101).
On the other hand, the OR gate 206 receives the input data BIT0 to BIT7 (0*010101) and the input of the erasure position decision data ERSEL0 to ERSEL7 (01000000), and sets the OR logical operation result as the assumption data BITERH0 to BITERH7 (01010101).
Thus, it is possible to achieve the error correction device that improves the correction capability of the error correction code with a simple configuration.
In the first embodiment, as seen in the equation (5), to decrease the error occurrence probability, it is required that the probability Pe of the erasure state “*” is higher than the probability Pf of the inversion state “1”.
In this case, if the number of erasure bits in encoded data falls below the erasure correction capability of the error correction code, the error occurrence probability does not increase; however, if the number of erasure bits exceeds the erasure correction capability, the error occurrence probability increases.
In this embodiment, even in the case of extending the resistance threshold range a-b of the memory cell; due to the determination of the near-normal erasure state “0” from the normal state “0”, it is possible to prevent an increase in the error occurrence probability.
An error occurrence probability Pc4, using an error correction method in which each bit of encoded data is represented in the form of four values, is expressed by the following equation (6). Pep denotes the probability of near-normal erasure, and Pef denotes the probability of near-inversion erasure.
In the case of Pf<<Pe in the equation (6), Pc4 is expressed by the following equation (7).
c4=Pc3×Pef/Pe (7)
Therefore, in the case of extending the resistance threshold range a-b of the memory cell in the erasure state and Pf<<Pe; by representing each bit of encoded data in the form of four values, it is possible to decrease the error occurrence probability in comparison with the case of representing each bit of encoded data in the form of three values.
In the error correction method according to this embodiment, the encoded data contains three erasure bits, whereas the Hamming code has the capability of erasure correction of up to two bits; accordingly, one of the three bits indicating the erasure state is set to either “0” or “1”.
In (a) of
The case of representing each bit in the form of four values as the error correction method according to second embodiment will be described.
In (b) of
In this case, the second to fourth bits of the encoded data are indicated as the near-inversion erasure state “1*”, the near-normal erasure state “0*”, and the near-inversion erasure state “1*”.
Accordingly, by way of example, in the second embodiment, one of these bits is fixed. For example, the fourth bit in the erasure state is set (fixed) to “1” due to the near-inversion erasure state “1*”.
Further, the remaining second and third bits in the erasure state undergo decoding processing in which assumption data is set by the same method as described above.
By this processing, in the case of representing encoded data in the form of four values, the possibility of decoding increases in comparison with the case of representing each bit of encoded data in the form of three values.
By representing each bit of encoded data in the form of four values, even if the probability Pe of the erasure state (including near-normal erasure and near-inversion erasure) is increased, the error occurrence probability does not increase. Further, it is possible to improve the original correction capability of the error correction code with a simple configuration.
A semiconductor storage device according to the second embodiment will be described. Only differences with the semiconductor storage device 5 according to the first embodiment will be described, and the overlapping contents will not be described in detail.
A sense amplifier 528 outputs a voltage SENS according to the data level of the memory cell 526 read from a bit line 524. The erasure determination circuit 530 compares the voltage SENS with reference voltages VrefH, VrefM, VrefL inputted to the comparators 532, 534, 536, thereby determining the state of the bit stored in the memory cell 526. Assume that the voltage value VrefH>VrefM>VrefL.
More specifically, if the voltage SENS outputted from the sense amplifier 528 is lower than the reference voltage VrefH inputted to the comparator 532 and higher than the reference voltage VrefM inputted to the comparator 534, the erasure determination circuit 530 outputs the outputs of the comparators 532, 534, 536 as “1”. As a result, the erasure determination circuit 530 outputs a control signal ER as “1”, and outputs a control signal BIT as “1”.
If the voltage SENS outputted from the sense amplifier 528 is not more than the reference voltage VrefM inputted to the comparator 534 and higher than the reference voltage VrefL inputted to the comparator 536, the outputs of the comparators 532, 536 are. “1”, and the output of the comparator 534 is “0”. As a result, the erasure determination circuit 530 outputs the control signal ER as “1”, and outputs the control signal BIT as “0”.
If the voltage SENS is not less than the reference voltage VrefH inputted to the comparator 532, the output of the comparator 532 is “0”, and the outputs of the comparators 534, 536 are “1”. As a result, the erasure determination circuit 530 outputs the control signal ER as “0”, and outputs the control signal BIT as “1”.
If the voltage SENS is not more than the reference voltage VrefL inputted to the comparator 536, the output of the comparator 532 is “1”, and the outputs of the comparators 534, 536 are “0”. As a result, the erasure determination circuit 530 outputs the control signal ER as “0”, and outputs the control signal BIT as “0”.
The erasure determination circuit 530 determines the state of data stored in the memory cell, and can output the state of data by combining the 2-bit control signals ER and BIT. For example, the erasure determination circuit 530 can output the control signals (ER, BIT)=(1, 0) as the near-normal erasure state “0*”, output (1, 1) as the near-inversion erasure state “1*”, output (0, 0) as the normal state “0”, and output (0, 1) as the inversion state “1”.
The erasure determination circuit 530 reads data stored in the memory cell 526 in the form of four values “0*”, “1*”, “0”, “1”, and outputs the result to the input data reception circuit 10 of the error correction device 2, so that the erasure determination circuit 530 can be used as the error correction device in memory data reading.
More specifically, in the case of occurrence of 3-bit erasure in the encoded data, one of the erasure bits is fixed by determining which state the erasure is near. This leads to 2-bit erasure.
Then, the 2-bit erasure can undergo decoding processing based on the method described with
By this processing, by the error correction method according to second embodiment, even in the case of occurrence of 3-bit erasure, by setting “0” or “1” in consideration of whether the bit in the erasure state is near the normal state or near the inversion state, it is possible to achieve the error correction device having a high possibility of decoding, in comparison with the case of representing each bit of encoded data in the form of three values.
Assume that the bit length of original data is k and the bit length of encoded data is n. It is possible to generate n-bit BCH encoded data by multiplying original data by a generator matrix. The inter-code distances d of BCH codes are 3, 5, 7, and so on, depending on used generator matrices. The BCH codes whose inter-code distances are 3, 5, 7 can correct errors of 1, 2, 3 bits, respectively.
Although there exist various methods for decoding data encoded by the BCH code; by way of example, a method using a look-up table as shown in
Referring to
Referring to
Next, in the error correction method according to the third embodiment, each set assumption data is multiplied by the check matrix, thereby calculating a syndrome. The syndrome is compared with the look-up table prepared beforehand, thereby specifying the number of inversions and the position in the assumption data and decoding the original data.
Since the (15, 7) BCH code has the capability of inversion correction of up to two bits, 2-bit inversion and 3-bit inversion cannot be distinguished, and each assumption data is determined to contain 2-bit inversion.
Next, in the error correction method according to the third embodiment, a parity check is performed on each set assumption data. Since the original encoded data is set so that the parity becomes even, it is determined that 2-bit inversion is contained if the parity of the assumption data is even and 3-bit inversion is contained if the parity of the assumption data is odd. Accordingly, it is determined that the assumption data of even parity which is within the range of the error correction capability of the (15, 7) BCH code is correct assumption data, and the result decoded using the applicable assumption data is adopted.
According to the third embodiment, it is possible to improve the correction capability of the error correction code with a simple method.
The error correction device according to the third embodiment will be described. Only differences with the error correction device 1 according to the first embodiment will be described, and the overlapping contents will not be described in detail.
The code decoding unit 314 compares the syndrome SL calculated by the syndrome calculation unit 312 with the look-up table stored beforehand, thereby specifying the error position and decoding the decoding result based on the assumption data BITERL0 to BITERLn-1 set by the assumption data setting unit 200a.
The code decoding unit 324 compares the syndrome SH calculated by the syndrome calculation unit 322 with the look-up table stored beforehand, thereby specifying the error position and decoding the decoding result based on the assumption data BITERH0 to BITERHn-1 set by the assumption data setting unit 200b.
Thus, it is possible to achieve the error correction device that implements the error correction method using the BCH code according to the third embodiment.
While the invention made above by the present inventors has been described specifically based on the illustrated embodiments, the present invention is not limited thereto. It is needless to say that various changes and modifications can be made thereto without departing from the spirit and scope of the invention.
Number | Date | Country | Kind |
---|---|---|---|
2015-140525 | Jul 2015 | JP | national |