1. Field of the Invention
The present invention relates to non-volatile memory devices and particularly to an error detection method and apparatus using Reed Solomon coding and decoding techniques for error detection and correction in the non-volatile memory devices.
2. Description of the Prior Art
Currently, confidential data files are stored in Floppy disks or are delivered via networks that require passwords or that use encryption coding for security.
Confidential documents can be sent by adding safety seals and impressions during delivery. Nevertheless, confidential documents are exposed to the risks of undesirable intrusions, such as breaking of the passwords, encryption codes, safety seals and impressions, thereby resulting in unsecured transfer of information. Thus, the need arises for supplemental security measures.
With the advent of the popularity of flash memory, density of flash memory devices (or chips, integrated circuits or semiconductor) is increasing thereby increasing the rate of defect spots. Even more noteworthy is the increase in the rate of defect spots in Multi-Level Cell (MLC), which is a certain type of non-volatile memory, during the flash manufacturing process. Compared with a SLC process, random error bits in MLC processes occur more often due to multi-level threshold voltages (less noise margin) needed to detect logic levels.
While flash memory is becoming more popular each day, as the density of flash chips are increasing, defect rates are also increasing, especially with Multi-Level Cell (MLC) technology being introduced in flash manufacturing processes. An effective error detection and correction method is needed for operations using flash or non-volatile memory to ensure data correctness particularly with in light of a higher flash chip defect density. The need therefore arises for the use of hardware as well as software solutions for detecting errors and for even correcting errors so that the error(s) remain invisible to the end users. Additionally, manufacturing costs can be lowered.
An effective error detection results when using Reed Solomon coding techniques for detection and correction of errors in systems using flash or non-volatile memory. Therefore, an apparatus and method are needed for flash operations to improve the accuracy of information.
Normally, four procedures are involved in the Reed Solomon decoding process as follows:
The foregoing procedure (2) normally uses Berlekamp-Messay recursive method or Euclidian's matrix method, the complexity of these two methods are depend on code length, and independent of error numbers.
The foregoing procedure (3) is used to find roots of error polynomial normally adopts Chien's searching method, the calculation time also depends on code length. The above two methods do not fully utilize the characteristic of low error counts of flash memory, and require sophisticated hardware and longer calculation time.
What is needed is electronic medium or card having non-volatile (or flash) memory and Reed Solomon coding and decoding apparatus and method using advantageously reduced complexity of circuitry to reduce costs of manufacturing of the electronic medium.
One embodiment of the present includes an electronic data storage card having a Reed Solomon (RS) decoder having a syndrome calculator block responsive to a page of information, the page being organized into a plurality of data sections and the overhead being organized into a plurality of overhead sections. The syndrome calculator generates a syndrome for each of the data sections. The decoder further includes a root finder block responsive to the calculated syndrome and for generating at least two roots, a polynomial calculator block responsive to the at least two roots and operative to generate at least one error address, identifying a location in the data wherein the error lies, and an error symbol values calculator block coupled to the root finder and the polynomial calculator block and for generating a second error address, identifying a second location in the data wherein the error(s) lie.
These and other objects and advantages of the present invention will no doubt become apparent to those skilled in the art after having read the following detailed description of the preferred embodiments illustrated in the several figures of the drawing.
In one embodiment of the present invention, a Reed Solomon error detection and correction (or coding and decoding) method is used in conjunction with non-volatile memory by resolving complex roots finding of error location polynomial, which in turn simplifies the circuitry employed. In one embodiment of the present invention, the reduction in hardware results in approximately 11 exclusive OR gates, or other circuitry equivalent thereto. ROM or complex hardware is avoided for cost saving and computation delay.
Flash, which is one type of non-volatile memory, is known to, at times, have bit errors according to manufacturing defect(s) or repeated read/write/erase operation. Error correction coding (ECC) methods and techniques are commonly employed in flash applications. However, increased defect bits, in page access operations, require powerful ECC methods. An embodiment of the present invention addresses such a need and provides an effective and cost sensitive solution therefor.
According to an embodiment of the present invention, an electronic data flash card with Reed Solomon error detection and correction capability is adapted to be accessed by an external computer. The electronic data flash card is a subsystem for electronic storage medium card with fingerprint verification capability. The electronic data flash card includes a flash memory device, an input-output interface circuit, and a processing unit. The external computer includes a function key set and a display unit.
The memory device stores a data file.
The input/output interface circuit is activated so as to establish communication with the external computer. The processing unit is connected to the memory device and the input/output interface circuit. The processing unit is operable selectively in a programming mode, where the processing unit activates the input/output interface circuit to receive the data file from the external computer, and to store the data file in the memory device, and a data retrieving mode, where the processing unit access the data file stored in the memory device, and activates the input/output interface circuit to transmit the data file to the external computer. An embodiment of the present invention relates to an electronic data flash card that is particularly to a system and method for providing error recovery method on Electronic data flash card.
For more familiarity with flash systems, the reader is referred to U.S. Pat. No. 7,103,684, issued on Sep. 5, 2006, to Chen et al. and entitled “Single-Chip USB Controller Reading Power-On Boot Code from Integrated Flash Memory for User Storage”, the contents of which are incorporated by reference as though set forth in full.
Referring now to
In
The memory device 3, in one embodiment of the present invention, is a flash memory device and is mounted on the electronic data flash card 1, and is for storing one or more data file. An exemplary data file is a picture file or a text file.
The input/output interface circuit 5, such as a Universal Serial Bus (USB) or equivalent interface, is mounted on the card body, and is activated so as to establish communication a USB with the external computer 9. The input/output interface circuit 5 includes a security circuitry, and a voltage regulator system. The input/output interface circuit 5 may be MMC, SD, CF, MS, PCI-Express, IDE, SATA, etc.
The processing unit 2 is mounted on the card body 1, and is connected to the memory device 3, and the input/output interface circuit 5. The processing unit 2 includes a microprocessor, a ROM, a RAM, and a (Error detection and correction Code) (ECC), such as a Reed Solomon coding/decoding circuit, as shown in
Reed Solomon (RS) algorithm has been popularly used in the past for detection and correction of errors. A first method of such use is to find roots of an error polynomial is employing the Berlekamp-Messay and Euclidian methods, then apply Chien's method to search for error locations. However, since implementation of prior art techniques requires complex hardware and lengthy calculations, cost of ECC based on such RS algorithm is higher.
In an embodiment of the present invention using Reed Solomon coding/decoding, as the decoder 10 of
The present invention is based on the low error count characteristic, i.e. less than two error counts occurring per code word. Code words are readily used and known in ECC techniques. Embodiments of the present invention use the syndrome result, in the RS algorithm, to locate the error, which is known to be the most difficult process during RS algorithm. This advantageously simplifies the structure of the circuit/software used to the ECC, reduces hardware complexity, simplifies signal handling, increases speed of operation, and is not influenced by code length. To better understand the various embodiments of the present invention, an example will now be used.
Referring now to
In
In
Sectional organization of the data area 24 and the spare area 26 causes reduction in the code length, in turn, simplifying the RS method by parallel processing 3 sections at the same time with the total number of correctable errors being 6 bytes total per 512 bytes.
In
Z2+Z+K=0 Eq. (0)
In the interest of further clarification, an example of error count using the finder 50 is now presented. The example is intended to be used for flash or non-volatile memory error recovery and in the case where a page is 528 bytes in length. A page is 512 bytes of data and 16 bytes of spare or overhead, in the foregoing example, wherein, 12 bytes of the overhead are used for RS or ECC overhead. Each page is divided or organized into three sections, as previously discussed. Also, in this example, two bytes of errors are assumed to be present. Assume, for the sake of example, that two error counts format (RS) code are based on Galois Field GF(28), where each symbol size is 8 bits in size. RS(N, N−4) wherein ‘N’ is the code length, and 4<N≦255, N−4 is the length of message unit and it is the read out code in data area of flash memory, 4 bytes is the parity bytes generated from RS encoder, and reside in per sector (page) spare areas of flash memory. A page or sector is storage units and units in which information is transferred. In certain applications of non-volatile memory, information, such as sector information, is stored in non-volatile memory organized in sectors or pages. More specifically, non-volatile memory is organized into blocks, with each block being organized into pages or sectors.
Assuming r(x) is the receiving polynomial,
c(x) is the correct code word polynomial,
e(x) is error polynomial,
then r(x)=c(x)+e(x) Eq. (1)
Since two error bytes are assumed to be correctable by the foregoing RS code, four syndromes Si (i=0, 1, 2, 3), (Si denotes a syndrome) and also assuming that two error positions are denoted as i1, i2 with each i1 and i2 being an error position; then error symbol values are Y1, Y2;
Sj=Y1*X1j+Y2*X2j; Eq. (2)
In Eq. (2), X1=αi
σ(x)=(x−X1)*(x−X2)=x2+σ1x+σ0; Eq. (3)
σ1=X1+X2; σ0=X1*X2; Eq. (4)
Wherein σdenoting coefficients of the polynomials:
S0=Y1*X10+Y2*X20=Y1+Y2; Eq. (5)
S1=Y1*X11+Y2*X21=Y1*X1+Y2*X2; Eq. (6)
S2=Y1*X12+Y2*X22=S1*σ1+S0*σ0; Eq. (7)
S3=Y1*X13+Y2*X23=S2*σ1+S1*σ0; Eq. (8)
from the above Eqs. (5) to (8) equations, σ1 and σ0 are calculated, as follows:
σ1=(S1S2+S0S3)/(S12+S0S2); Eq. (9)
σ0=(S22+S1S3)/(S12+S0S2); Eq. (10)
and error values are obtained as follows:
Y2=(S0X1+S1)/σ1; Eq. (11)
Y1=S0+Y2; Eq. (12)
(1)
If no errors occurred, then
S0=S1=S2=S3=0; Eq. (13)
(2)
In the case of a single error occurrence, and assuming the error location to be denoted as i1, the error value is Y1, A, B, C values are calculated as below:
A=S12+S0S2; Eq. (14)
B=S1S2+S0S3; Eq. (15)
C=S22+S1S3; Eq. (16)
S0=Y1≠0; Eq. (17)
S1=Y1*X1≠0; Eq. (18)
S2=Y1*X12≠0; Eq. (19)
S2=Y1*X13≠0; Eq. (20)
all Si's not being equal to 0 (≠0) does not imply that there are four errors, but this does imply the occurrence of at least one error.
But it is known, from the foregoing equations, that Y1=S0; X1=S1/Y1=S1/S0;
σ1=(S1S2+S0S3)/(S12+S0S2)=X13Y12+X13Y12=0<=B; Eq. (21)
σ0=(S22+S1S3)/(S12+S0S2)=X14Y12+X14Y12=0<=C; Eq. (22)
A=X12Y12+X12Y12=0<=A; Eq. (23)
Thus, if A=B=C=0, this indicates that there is only one error in the codeword.
(3)
If two errors occur in the code word or the read data, and assuming i1, i2 are the error locations, Y1, Y2 are two error symbol values, then:
S0=Y1*X10+Y2*X20=Y1+Y2≠0— Eq. (24)
The reason for Eq. (24) is that two non-zero symbol values added together should not equal zero;
since any arbitrary number square, added together, must be greater than zero, if X1, X2 are not zero because two errors occurred;
B=S1S2+S0S3=(X1+X2)*(X12+X22)*Y1*Y2≠0; Eq. (29)
C=S22+S1S3=X1*X2*(X12+X22)*Y1*Y2≠0; Eq. (30)
Using cyclic characteristic of Galois Fields (GF), an assumption can be made that:
x=σ1*z Eq. (31)
in order to make σ(x)=x2+σ1x+σ0 simple, it is easier to obtain σ(z)=z2+z+K; Eq. (31A)
where K=σ0/σ12
Once the root of Eq. (31A) is found, x=σ1*z can be recovered again.
An assumption can be made that x=σ0*z, however, no benefit is realized for doing so since it cannot simplify σ(x) equation (Eq. (31A)).
The roots of σ(x) are error locations X1, X2, where the error symbols location occurs. Most of the RS decoding problems are associated with finding these two roots.
A cost effective method and apparatus, in accordance with an embodiment of the present, for finding the two roots will now be presented.
Assume Z1, and Z2 are roots of σ(z),
Z12+Z1+K=0; Eq. (32)
Z22+Z2+K=0; Eq. (33)
Subtraction of these two equations, results in:
(Z12−Z22)+(Z1−Z2)=0, Eq. (34)
in Galois field operation “−” is identical with “+”,
We get (Z12+Z22)+(Z1+Z2)=0, Eq. (35)
since 2*Z1*Z2=Z1*Z2+Z1*Z2=0; Eq. (36)
because two identical term added together equals zero under Galois operation.
We get (Z12+Z22+2Z1*Z2)+(Z1+Z2)=0, (Z1+Z2)2+(Z1+Z2)=0; Eq. (37)
(Z1+Z2)*(Z1+Z2+1)=0; Eq. (38)
It means Z1+Z2=0; or Z1+Z2+1=0; Eq. (39)
However Z1=Z2 is not possible, as two error locations should not be the same, thus, the only choice we have is
Z1=Z2+1; or Z2=Z1+1; or Z1+Z2=1; Eq. (40)
Three equations exist at the same time under Galois operation.
Also 1 in above equation means (1000 0000) if GF(28), we know Z1 and Z2 highest bit (bit position 0) should be toggle to each other.
Examples like Z1=0110 0110;
As above explained, error locations X1, X2 need only be calculated from Kj, which, in turn, comes from the syndrome value σ0/σ12 with very simple exclusive operations. It does not need either ROM-expensive silicon area that is proportional to the code size, or complex operation that requires lots of hardware for implementation.
The embodiments of the invention have various applications, among with which are memory system. On such application is in the integrated circuit card disclosed in a related application, i.e. U.S. Pat. No. 6,547,130, issued on Apr. 15, 2003, entitled “Integrated circuit card with fingerprint verification capability”, the disclosure of which is incorporated herein as though set forth in full.
Exemplary implementation of the foregoing is shown relative to
After step 102, σ0 and σ1 are calculated from the syndromes S0-S3, in accordance with the foregoing equations, for the first section, at step 106 and similarly, at step 108, after the step 126, the σ0 and σ1 are calculated from the syndromes S0-S3, in accordance with the foregoing equations, for the second section and at step 130, after step 128, the σ0 and σ1 are calculated from the syndromes S0-S3, for the third section of the page.
After the step 106, K is calculated, at step 110, based on the foregoing equations, for the first section and after the step 108, K is calculated, at step 112, for the second section of the page and after the step 130, at step 132, K is calculated for the third section of the page.
After the step 110, Z1 and Z2 are calculated, for the first section of the page, at step 114, based on the foregoing equations, for the first section and are used to calculate X1 and X2, at step 118 after which, at step 119, Y1 and Y2 are calculated, after which, at step 122, X1*Y1, is added to X2*Y2 and the sum thereof is added to R1(x). In this manner, the first data segment, is recovered. The notation “*” refers to the multiplication function or operator.
After the step 112, Z1 and Z2 are calculated, for the second section of the page, at step 116, based on the foregoing equations, and used to calculate X1 and X2, at step 120 after which, at step 123, Y1 and Y2 are calculated, after which, at step 124, X1*Y1 is added to X2*Y2 and the sum thereof is added to R2(x). In this manner, the second data segment, is recovered.
After the step 132, Z1 and Z2 are calculated, for the third section of the page, at step 134, based on the foregoing equations, and used to calculate X1 and X2, at step 136 after which, at step 138, Y1 and Y2 are calculated, after which, at step 140, X1*Y1 is added to X2*Y2 and the sum thereof is added to R3(x). In this manner, the third data segment, is recovered.
An example of a large block flash memory is one that is 2 K (two thousand) bytes per page or more than 4 K bytes per page is using GF(29) field by 2 symbol errors corrections (t=2). As we said before, each symbol will be 9 bits width and m=9. Maximum size with GF(29) with two symbol errors as suggested in this invention, code size is (29−1)=511×9=4599 bits, deduct 9×t×2=9×4=36 parity bits, message size is 4563 bits, and can cover 512 bytes without losing precision.
A 2 K byte page can be further divided into 4 sections as
As m=9, all basic equations remains except 8 bits width expands to 9 bits.
Generation polynomial G(x) of GF(29) is X9+X4+1, which Means α9=α4+1; Eq.(63A) Eq.(43)
βj is 1 or 0 only in above derivation, so equalities hold for βj*βj=βj, βj+βj=0.
(43), (44) These Two terms can be swapped without influence final result,
Multiply two terms together, we get
(β8*α16+β7*α14+β6*α12+β5*α10)+(β8+β4)*α8+β7*α7+(β6+β3)*α6+β5*α5+(β4+β2)*α4+β3*α3+(β2+β1)*α2+β1*α=K; Eq. (65)
[β8(α2+α6+α7)+β7*(1+α4+α5)+β6*(α3+α7)+β5*(α+α5)]+(β8+β4)*α8+β7*α7+(β6+β3)*α6+β5*α5+(β4+β2)*α4+β3*α3+(β2+β1)*α2+β1*α=K; Eq. (66)
(β8+β4)*α8+(β8+β6+β7)*α7+β8+β6+β3)*α6+β7*α5+(β7+β4+β2)*α4+(β6+β3)*α3+(β8+β2+β1)*α2+(β5+β1)*α+β7=K; Eq. (67)
α16=(0 0100 0110)=α2+α6+α7;
α14=(1 0001 1000)=1+α4+α5;
α12=(0 0010 0010)=α3+α7;
α10=(0 1000 1000)=α+α5;
α8=(0 0000 0001);
α7=(0 0000 0010);
α6=(0 0000 0100);
α5=(0 0000 1000);
α4=(0 0001 0000);
α3=(0 0010 0000);
α2=(0 0100 0000);
α=(0 1000 0000);
Substitute these α values into above equations, we find
Kj(j=8 . . . 0) is coefficient of 9 bit symbol value;
Comparing Eqs. (71) and (76), there is obtained
β1=K0; Eq. (76)
β7=K5; Eq. (71)
from Eq. (75), we get β5=K1+K0;
Add (69) and (70), and substitute β7 in, we get
β3=K7+K6+K5;
From Eq. (73), and substitute β3 in, we get
β6=K7+K6+K5+K3;
From Eq. (69), and substitute β7. β6 in, we get
β8=K6+K3;
From Eq. (68), and substitute β8 in, we get
β4=K8+K6+K3;
From Eq. (74), and substitute β8, b1 in, we get
β2=K8+K6+K5+K4+K3;
After all βj are found, Z1 is found, as we know from Eq. (40), Z2 can also be found by adding 1(1 0000 0000) to it.
X1, X2 values are recovered by using Eq. (31) again.
Although the present invention has been described in terms of specific embodiments, it is anticipated that alterations and modifications thereof will no doubt become apparent to those skilled in the art. It is therefore intended that the following claims be interpreted as covering all such alterations and modification as fall within the true spirit and scope of the invention.
This application is a continuation-in-part (CIP) of the co-pending U.S. patent application Ser. No. 09/478,720, entitled “Electronic Data Storage Medium with Fingerprint Verification Capability”, and filed on Jan. 6, 2000, and a continuation-in-part of the co-pending U.S. Patent Application Publication No. US 2005/0193161 A1, entitled “System and Method for Controlling Flash Memory”, filed on Feb. 26, 2004 and a continuation-in-part of the co-pending U.S. patent application Ser. No. 10/799,039, entitled “SYSTEM AND METHOD FOR MANAGING BLOCKS IN FLASH MEMORY”, and filed on Mar. 11, 2004, and is further a CIP of the co-pending U.S. patent application Ser. No. 11/657,243, entitled “Electronic Data Flash Card with Bose, Ray-Chaudhuri, Hocquenghem (BCH) Error Detection/Correction”, filed on Jan. 24, 2007, the disclosures of all of which are incorporated herein as though set forth in full.
Number | Name | Date | Kind |
---|---|---|---|
5761102 | Weng | Jun 1998 | A |
5931894 | Wei | Aug 1999 | A |
5983389 | Shimizu | Nov 1999 | A |
7407393 | Ni et al. | Aug 2008 | B2 |
7420803 | Hsueh et al. | Sep 2008 | B2 |
Number | Date | Country | |
---|---|---|---|
20070204206 A1 | Aug 2007 | US |
Number | Date | Country | |
---|---|---|---|
Parent | 11657243 | Jan 2007 | US |
Child | 11739613 | US | |
Parent | 10799039 | Mar 2004 | US |
Child | 11657243 | US | |
Parent | 10789333 | Feb 2004 | US |
Child | 10799039 | US | |
Parent | 09478720 | Jan 2000 | US |
Child | 10789333 | US |