US20090019336A1 - Memory and 1-bit error checking method thereof - Google Patents

Memory and 1-bit error checking method thereof Download PDF

Info

Publication number
US20090019336A1
US20090019336A1 US11/776,027 US77602707A US2009019336A1 US 20090019336 A1 US20090019336 A1 US 20090019336A1 US 77602707 A US77602707 A US 77602707A US 2009019336 A1 US2009019336 A1 US 2009019336A1
Authority
US
United States
Prior art keywords
code
piece
data fragment
new
error correction
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
US11/776,027
Other versions
US7721181B2 (en
Inventor
Chun-Yu Liao
Shih-Chang Huang
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Macronix International Co Ltd
Original Assignee
Macronix International Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Macronix International Co Ltd filed Critical Macronix International Co Ltd
Priority to US11/776,027 priority Critical patent/US7721181B2/en
Assigned to MACRONIX INTERNATIONAL CO., LTD. reassignment MACRONIX INTERNATIONAL CO., LTD. ASSIGNMENT OF ASSIGNORS INTEREST (SEE DOCUMENT FOR DETAILS). Assignors: HUANG, SHIH-CHANG, LIAO, CHUN-YU
Publication of US20090019336A1 publication Critical patent/US20090019336A1/en
Application granted granted Critical
Publication of US7721181B2 publication Critical patent/US7721181B2/en
Expired - Fee Related legal-status Critical Current
Adjusted expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/08Error detection or correction by redundancy in data representation, e.g. by using checking codes
    • G06F11/10Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's
    • G06F11/1008Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's in individual solid state devices

Definitions

  • the invention relates in general to a memory and a 1-bit error checking method thereof, and more particularly to a memory simplifying hardware configuration and saving memory space, and a 1-bit error checking method thereof.
  • ECC error correction code
  • the method begins at step 100 , at least one piece of data fragment whose size is 2 n bits is received, wherein n is an integer greater than or equal to 0.
  • the method proceeds to step 110 , an error correction code whose size is 2n bits is generated according to the at least one piece of data fragment, wherein the error correction code is generated according to an error checking and correction algorithm (ECC algorithm).
  • ECC algorithm error checking and correction algorithm
  • the error correction code further includes an error checking and correction (ECC) parity bit and its complement.
  • ECC error checking and correction
  • the error correction code is an overhead bit for the at least one piece of data fragment.
  • step 120 the at least one piece of data fragment and the error correction code are written in the memory.
  • step 130 the at least one piece of data fragment is read from the memory and used as at least one piece of read data fragment.
  • step 140 a new error correction code is generated according to the at least one piece of read data fragment by using the ECC algorithm.
  • step 150 a determination as to whether the at least one piece of read data fragment is the same with the at least one piece of data fragment is made according to the error correction code and the new error correction code.
  • step 150 according to the error checking and correction algorithm, an “exclusive or” operation is performed on the error correction code and the new error correction code, and if the result is 0, the at least one piece of read data fragment is determined to be the same with the at least one piece of data fragment.
  • the method proceeds to step 160 , the memory determines that the read operation is correct and outputs the at least one piece of read data fragment. If the at least one piece of read data fragment is different from the at least one piece of data fragment, then the method proceeds to step 170 , if the memory determines that the read operation has a 1-bit error, then the memory corrects the at least one piece of read data fragment as the at least one piece of data fragment according to the new error correction code and outputs the at least one piece of read data fragment.
  • FIG. 1B a schematic diagram of the error checking and correction algorithm is shown.
  • the 6-bit error correction code of the at least one piece of data fragment is generated according to the ECC algorithm.
  • the error correction code includes ECC parity bits P 1 , P 2 and P 4 , and the complements P 1 ′, P 2 ′ and P 4 ′.
  • the new error correction code also does.
  • the equations of ECC parity bits P 1 , P 2 and P 4 , and the complements P 1 ′, P 2 ′ and P 4 ′ are described as below, wherein ⁇ means “exclusive or”.
  • step 170 if the memory determines that the read operation has a 1-bit error, that means the result of the “exclusive or” operation performed on the error correction code and the new error correction code is not all 0.
  • the “exclusive or” result is the error location of the at least one piece of read data fragment. Then invert the error bit and the error is corrected.
  • the size of the error correction code is 2n bits, not only make the overhead bit to occupy too much memory space, but also make it difficult to simplify the hardware configuration of the memory.
  • the invention is directed to a memory and a 1-bit error checking method thereof.
  • the memory is enabled to have a simple hardware configuration, hence saving memory space considerably.
  • a memory 1-bit error checking method is provided. Firstly, at least one piece of data fragment whose side is 2 n bits is received. Next, an error correction code, a parity code and a data code are generated according to the at least one piece of data fragment and written in the memory. Then, the at least one piece of data fragment is read from the memory and used as at least one piece of read data fragment. Next, a new error correction code, a new parity code and a new data code are generated according to the at least one piece of read data fragment.
  • a determination as to whether the at least one piece of read data fragment has a 1-bit error corresponding to the at least one piece of data fragment is made according to the error correction code and the new error correction code, the parity code and the new parity code, and the data code and the new data code. After that, if the at least one piece of read data fragment does not have a 1-bit error, then the at least one piece of read data fragment is outputted.
  • a memory including a memory array and an error correction circuit.
  • the memory array receives and stores at least one piece of data fragment.
  • the at least one piece of data fragment is read from the memory array and used as at least one piece of read data fragment, wherein the size of both the at least one piece of data fragment and the at least one piece of read data fragment is 2 n bits, n is an integer greater than or equal to 0.
  • An error correction code, a parity code and a data code are generated by the error correction circuit according to the at least one piece of data fragment, wherein the data code corresponds to the error correction code.
  • a new error correction code, a new parity code and a new data code are generated according to the at least one piece of read data fragment, wherein the new data code corresponds to the new error correction code.
  • a determination as to whether the at least one piece of read data fragment has a 1-bit error corresponding to the at least one piece of data fragment is made by the memory according to the error correction code and the new error correction code, the parity code and the new parity code, and the data code and the new data code.
  • FIG. 1A (Prior Art) is a flowchart of a conventional memory 1-bit error checking method
  • FIG. 1B (Prior Art) is a schematic diagram of the error checking and correction algorithm
  • FIG. 2 is a flowchart of a memory 1-bit error checking method according to a preferred embodiment of the invention.
  • FIG. 3 is a block diagram of a memory according to a preferred embodiment of the invention.
  • the invention provides a memory and a 1-bit error checking method thereof.
  • the 1-bit error checking method checks whether a 1-bit error occurs to the data stored in the memory according to an error correction code having either an error checking and correction (ECC) parity bit or its compliment, and a 1-bit parity code and a 1-bit data code in a simpler way, so that the memory has a simple hardware configuration and saves memory space.
  • ECC error checking and correction
  • the memory 1-bit error checking method is used in a memory. Firstly, the method begins at step 200 , at least one piece of data fragment whose size is 2 n bits is received, wherein n is an integer greater than or equal to 0. Then, the method proceeds to step 210 , an error correction code, a parity code and a data code are generated according to the at least one piece of data fragment, wherein the data code corresponds to the error correction code.
  • the error correction code whose size is n bits is generated according to an error checking and correction algorithm (ECC algorithm) and is either an ECC parity bit or its compliment.
  • ECC algorithm error checking and correction algorithm
  • the parity code is generated by performing an “exclusive or” operation on all bits of the at least one piece of data fragment. That is, the parity code equals 0 if the at least one piece of data fragment has an even number of 1, and the parity code equals 1 if the at least one piece of data fragment has an odd number of 1.
  • the equation of the parity code P or P′ is described as below.
  • the data code corresponding to the error correction code is used to assure the completeness of the memory 1-bit error checking method.
  • the error correction code is an ECC parity bit
  • the data code is the lowest bit among the at least one piece of data fragment; and when the error correction code is a complement to the ECC parity bit, the data code is the highest bit among the at least one piece of data fragment.
  • the equation of the data code D or D′ is described as below.
  • step 220 the at least one piece of data fragment, the error correction code, and the parity code and the data code are written in a memory.
  • the error correction code, the parity code and the data code are used as an overhead bit of the at least one piece of data fragment and written in the memory.
  • step 230 the at least one piece of data fragment is read from the memory and used as at least one piece of read data fragment, wherein the size of the at least one piece of read data fragment is 2 n bits.
  • a new error correction code, a new parity code, and a new data code are generated according to the at least one piece of read data fragment, wherein the new data code corresponds to the new error correction code.
  • a new error correction code whose size is n bits is generated according to an error checking and correction algorithm.
  • the new error correction code is also an ECC parity bit; and when the error correction code is a complement to the ECC parity bit, the new error correction code is also a complement to the ECC parity bit.
  • the new parity code is generated by performing an “exclusive or” operation on all bits of the at least one piece of read data fragment.
  • the new error correction code when the new error correction code is an ECC parity bit, the new data code is the lowest bit among the at least one piece of read data fragment; and when the new error correction code is a complement to the ECC parity bit, the data code is the highest bit among the at least one piece of read data fragment.
  • step 250 a determination as to whether the at least one piece of read data fragment has a 1-bit error corresponding to the at least one piece of data fragment is made according to the error correction code and the new error correction code, the parity code and the new parity code, and the data code and the new data code.
  • step 260 the at least one piece of read data fragment is outputted if the at least one piece of read data fragment does not have a 1-bit error corresponding to the at least one piece of data fragment.
  • step 250 the determination as to whether at least one piece of read data fragment has a 1-bit error is made by performing an “exclusive or” operation on the error correction code and the new error correction code, the parity code and the new parity code, and the data code and the new data code, respectively.
  • Table One an inquiry table for the memory 1-bit error checking method according to the invention preferred embodiment is shown.
  • E denotes the result after the “exclusive or” operation is performed on the error correction code and the new error correction code
  • P denotes the result after the “exclusive or” operation is performed on the parity code and the new parity code
  • D denotes the result after the “exclusive or” operation is performed on the data code and the new data code
  • X denotes “don't care”
  • 1 denotes that at least one piece of read data fragment has a 1-bit error
  • 0 denotes that at least one piece of read data fragment does not have a 1-bit error.
  • the at least one piece of data fragment be (00101011) and the at least one piece of read data fragment be (00101010) for example.
  • (E, P, D) that equals (0, 1, 1) is obtained. That means the lowest bit among the at least one piece of read data fragment has a 1-bit error. Then the at least one piece of read data fragment is corrected to (00101011).
  • the memory 300 includes a memory array 310 and an error correction circuit 320 .
  • the memory array 310 receives and stores at least one piece of data fragment Data.
  • the memory 300 reads at least one piece of data fragment Data from the memory array 310 and uses the at least one piece of data fragment Data as at least one piece of read data fragment DataR.
  • the size of both the at least one piece of data fragment Data and the at least one piece of read data fragment DataR is 2 n bits, wherein n is an integer greater than or equal to 0.
  • the error correction circuit 320 generates an error correction code, a parity cod, and a data code according to the at least one piece of data fragment Data, and generates a new error correction code, a new parity code and a new data code according to the at least one piece of read data fragment DataR, wherein the data code corresponds to the error correction code, and the new data code corresponds to the new error correction code.
  • Both the error correction code and the new error correction code are an ECC parity bit or its compliment.
  • the size of both the error correction code and the new error correction code is n bits.
  • the size of both the parity code and the new parity code is 1 bit.
  • the size of both the data code and the new data code is 1 bit.
  • the memory 300 determines whether the at least one piece of read data fragment has a 1-bit error corresponding to the at least one piece of data fragment according to the error correction code and the new error correction code, the parity code and the new parity code, and the data code and the new data code.
  • the 1-bit error checking method used in the memory 300 is already disclosed in the memory 1-bit error checking method in the above embodiments of the invention, and is not repeated here.
  • the memory and the 1-bit error checking method thereof disclosed in the above embodiments of the invention check whether a 1-bit error occurs to the data stored in the memory according to an error correction code having either an error checking and correction (ECC) parity bit or its compliment, a 1-bit parity code, and a 1-bit data code in a simpler way.
  • ECC error checking and correction
  • the memory 1-bit error checking method disclosed in the invention only uses (n+2) bits of overhead bits, largely saving the memory space, and simplifying the hardware configuration for the memory.
  • the data completeness is also achieved via the use of a Hamming code conventionally.
  • Several check bits are added to the specific positions of the at least one piece of data fragment. For example, when the size of the at least one piece of data fragment is n bits, then k check bits are added to the 2 0 , 2 1 , 2 2 , . . . and 2 k-1 bit following the equation 7 described below, wherein k is an integer.
  • the check bits are used for detecting and correcting a 1-bit error of the at least one piece of data fragment.
  • all the memory bits are adjacent in the memory.
  • the Hamming code has to add some check bits to the specific positions of the at least one piece of data fragment. Hence the Hamming code is not suitable for applying to the memory.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Detection And Correction Of Errors (AREA)

Abstract

A memory 1-bit error checking method is provided. Firstly, at least one piece of data fragment whose side is 2n bits is received. Next, an error correction code, a parity code and a data code are generated and written in the memory. Then, the at least one piece of data fragment is read from the memory and used as at least one piece of read data fragment. Next, a new error correction code, a new parity code and a new data code are generated. Afterwards, a determination as to whether the at least one piece of read data fragment has a 1-bit error is made. After that, if the at least one piece of read data fragment does not have a 1-bit error, then the at least one piece of read data fragment is outputted.

Description

    BACKGROUND OF THE INVENTION
  • 1. Field of the Invention
  • The invention relates in general to a memory and a 1-bit error checking method thereof, and more particularly to a memory simplifying hardware configuration and saving memory space, and a 1-bit error checking method thereof.
  • 2. Description of the Related Art
  • Memory device has now been widely used in the storage of data. The completeness of data storage is essential in the design of memory. Conventionally, the above data completeness is achieved via the use of an error correction code (ECC). The error correction code is used in a data completeness checking method for detecting and correcting a 1-bit error.
  • Referring to FIG. 1A, a flowchart of a conventional memory 1-bit error checking method is shown. Firstly, the method begins at step 100, at least one piece of data fragment whose size is 2n bits is received, wherein n is an integer greater than or equal to 0. Next, the method proceeds to step 110, an error correction code whose size is 2n bits is generated according to the at least one piece of data fragment, wherein the error correction code is generated according to an error checking and correction algorithm (ECC algorithm). In order to avoid a 1-bit error occurring to the error correction code, the error correction code further includes an error checking and correction (ECC) parity bit and its complement. The error correction code is an overhead bit for the at least one piece of data fragment.
  • Then, the method proceeds to step 120, the at least one piece of data fragment and the error correction code are written in the memory. After that, the method proceeds to step 130, the at least one piece of data fragment is read from the memory and used as at least one piece of read data fragment. Next, the method proceeds to step 140, a new error correction code is generated according to the at least one piece of read data fragment by using the ECC algorithm. Then, the method proceeds to step 150, a determination as to whether the at least one piece of read data fragment is the same with the at least one piece of data fragment is made according to the error correction code and the new error correction code. Substantially, in step 150, according to the error checking and correction algorithm, an “exclusive or” operation is performed on the error correction code and the new error correction code, and if the result is 0, the at least one piece of read data fragment is determined to be the same with the at least one piece of data fragment.
  • If the at least one piece of read data fragment is the same with the at least one piece of data fragment, then the method proceeds to step 160, the memory determines that the read operation is correct and outputs the at least one piece of read data fragment. If the at least one piece of read data fragment is different from the at least one piece of data fragment, then the method proceeds to step 170, if the memory determines that the read operation has a 1-bit error, then the memory corrects the at least one piece of read data fragment as the at least one piece of data fragment according to the new error correction code and outputs the at least one piece of read data fragment.
  • Referring to FIG. 1B, a schematic diagram of the error checking and correction algorithm is shown. As shown in FIG. 1B, at least one piece of data fragment whose size is 8 bits (D0˜D7) is exemplified. The 6-bit error correction code of the at least one piece of data fragment is generated according to the ECC algorithm. The error correction code includes ECC parity bits P1, P2 and P4, and the complements P1′, P2′ and P4′. Likewise, the new error correction code also does. The equations of ECC parity bits P1, P2 and P4, and the complements P1′, P2′ and P4′ are described as below, wherein ⊕ means “exclusive or”.

  • P4=D7⊕D6⊕D5⊕D4  (eq. 1)

  • P2=D7⊕D6⊕D3⊕D2  (eq. 2)

  • P1=D7⊕D5⊕D3⊕D1  (eq. 3)

  • P4′=D3⊕D2⊕D1⊕D0  (eq. 4)

  • P2′=D5⊕D4⊕D1⊕D0  (eq. 5)

  • P1′=D6⊕D4⊕D2⊕D0  (eq. 6)
  • In step 170, if the memory determines that the read operation has a 1-bit error, that means the result of the “exclusive or” operation performed on the error correction code and the new error correction code is not all 0. The “exclusive or” result is the error location of the at least one piece of read data fragment. Then invert the error bit and the error is corrected.
  • According to the conventional memory error checking method, despite the ECC algorithm is able to detect and correct a 1-bit error. However, in checking the 1-bit error of a memory, the size of the error correction code is 2n bits, not only make the overhead bit to occupy too much memory space, but also make it difficult to simplify the hardware configuration of the memory.
  • SUMMARY OF THE INVENTION
  • The invention is directed to a memory and a 1-bit error checking method thereof. By using a simpler 1-bit error checking method, the memory is enabled to have a simple hardware configuration, hence saving memory space considerably.
  • According to a first aspect of the present invention, a memory 1-bit error checking method is provided. Firstly, at least one piece of data fragment whose side is 2n bits is received. Next, an error correction code, a parity code and a data code are generated according to the at least one piece of data fragment and written in the memory. Then, the at least one piece of data fragment is read from the memory and used as at least one piece of read data fragment. Next, a new error correction code, a new parity code and a new data code are generated according to the at least one piece of read data fragment. Afterwards, a determination as to whether the at least one piece of read data fragment has a 1-bit error corresponding to the at least one piece of data fragment is made according to the error correction code and the new error correction code, the parity code and the new parity code, and the data code and the new data code. After that, if the at least one piece of read data fragment does not have a 1-bit error, then the at least one piece of read data fragment is outputted.
  • According to a second aspect of the present invention, a memory including a memory array and an error correction circuit is provided. The memory array receives and stores at least one piece of data fragment. The at least one piece of data fragment is read from the memory array and used as at least one piece of read data fragment, wherein the size of both the at least one piece of data fragment and the at least one piece of read data fragment is 2n bits, n is an integer greater than or equal to 0. An error correction code, a parity code and a data code are generated by the error correction circuit according to the at least one piece of data fragment, wherein the data code corresponds to the error correction code. Furthermore, a new error correction code, a new parity code and a new data code are generated according to the at least one piece of read data fragment, wherein the new data code corresponds to the new error correction code. A determination as to whether the at least one piece of read data fragment has a 1-bit error corresponding to the at least one piece of data fragment is made by the memory according to the error correction code and the new error correction code, the parity code and the new parity code, and the data code and the new data code.
  • The invention will become apparent from the following detailed description of the preferred but non-limiting embodiments. The following description is made with reference to the accompanying drawings.
  • BRIEF DESCRIPTION OF THE DRAWINGS
  • FIG. 1A (Prior Art) is a flowchart of a conventional memory 1-bit error checking method;
  • FIG. 1B (Prior Art) is a schematic diagram of the error checking and correction algorithm;
  • FIG. 2 is a flowchart of a memory 1-bit error checking method according to a preferred embodiment of the invention; and
  • FIG. 3 is a block diagram of a memory according to a preferred embodiment of the invention.
  • DETAILED DESCRIPTION OF THE INVENTION
  • The invention provides a memory and a 1-bit error checking method thereof. The 1-bit error checking method checks whether a 1-bit error occurs to the data stored in the memory according to an error correction code having either an error checking and correction (ECC) parity bit or its compliment, and a 1-bit parity code and a 1-bit data code in a simpler way, so that the memory has a simple hardware configuration and saves memory space.
  • Referring to FIG. 2, a flowchart of a memory 1-bit error checking method according to a preferred embodiment of the invention is shown. The memory 1-bit error checking method is used in a memory. Firstly, the method begins at step 200, at least one piece of data fragment whose size is 2n bits is received, wherein n is an integer greater than or equal to 0. Then, the method proceeds to step 210, an error correction code, a parity code and a data code are generated according to the at least one piece of data fragment, wherein the data code corresponds to the error correction code. The error correction code whose size is n bits is generated according to an error checking and correction algorithm (ECC algorithm) and is either an ECC parity bit or its compliment. Take the at least one piece of data fragment whose size is 8 bits (D0˜D7) as exemplified hereinafter. The equations of ECC parity bits E1, E2 and E4, and the complements E1′, E2′ and E4′ are described as below, wherein ⊕ means “exclusive or”.

  • E4=D7⊕D6⊕D5⊕D4  (eq. 7)

  • E2=D7⊕D6⊕D3⊕D2  (eq. 8)

  • E1=D7⊕D5⊕D3⊕D1  (eq. 9)

  • E4′=D3⊕D2⊕D1⊕D0  (eq. 10)

  • E2′=D5⊕D4⊕D1⊕D0  (eq. 11)

  • E1′=D6⊕D4⊕D2⊕D0  (eq. 12)
  • The parity code is generated by performing an “exclusive or” operation on all bits of the at least one piece of data fragment. That is, the parity code equals 0 if the at least one piece of data fragment has an even number of 1, and the parity code equals 1 if the at least one piece of data fragment has an odd number of 1. The equation of the parity code P or P′ is described as below.

  • P or P′=D7⊕D6⊕D5⊕D4⊕D3⊕D2⊕D1⊕D0  (eq. 13)
  • Besides, the data code corresponding to the error correction code is used to assure the completeness of the memory 1-bit error checking method. When the error correction code is an ECC parity bit, the data code is the lowest bit among the at least one piece of data fragment; and when the error correction code is a complement to the ECC parity bit, the data code is the highest bit among the at least one piece of data fragment. The equation of the data code D or D′ is described as below.

  • D=D0  (eq. 14)

  • D′=D7  (eq. 15)
  • Then, the method proceeds to step 220, the at least one piece of data fragment, the error correction code, and the parity code and the data code are written in a memory. The error correction code, the parity code and the data code are used as an overhead bit of the at least one piece of data fragment and written in the memory. Then, the method proceeds to step 230, the at least one piece of data fragment is read from the memory and used as at least one piece of read data fragment, wherein the size of the at least one piece of read data fragment is 2n bits.
  • Afterwards, the method proceeds to step 240, a new error correction code, a new parity code, and a new data code are generated according to the at least one piece of read data fragment, wherein the new data code corresponds to the new error correction code. A new error correction code whose size is n bits is generated according to an error checking and correction algorithm. When the error correction code is an ECC parity bit, the new error correction code is also an ECC parity bit; and when the error correction code is a complement to the ECC parity bit, the new error correction code is also a complement to the ECC parity bit. The new parity code is generated by performing an “exclusive or” operation on all bits of the at least one piece of read data fragment. Besides, when the new error correction code is an ECC parity bit, the new data code is the lowest bit among the at least one piece of read data fragment; and when the new error correction code is a complement to the ECC parity bit, the data code is the highest bit among the at least one piece of read data fragment.
  • After that, the method proceeds to step 250, a determination as to whether the at least one piece of read data fragment has a 1-bit error corresponding to the at least one piece of data fragment is made according to the error correction code and the new error correction code, the parity code and the new parity code, and the data code and the new data code. After that, the method proceeds to step 260, the at least one piece of read data fragment is outputted if the at least one piece of read data fragment does not have a 1-bit error corresponding to the at least one piece of data fragment.
  • In step 250, the determination as to whether at least one piece of read data fragment has a 1-bit error is made by performing an “exclusive or” operation on the error correction code and the new error correction code, the parity code and the new parity code, and the data code and the new data code, respectively. Referring to Table One, an inquiry table for the memory 1-bit error checking method according to the invention preferred embodiment is shown.
  • TABLE ONE
    E P D
    0 0 X
    0 1 0
    0 1 1
    1 0 X
    1 1 X
  • In Table One, “E” denotes the result after the “exclusive or” operation is performed on the error correction code and the new error correction code; “P” denotes the result after the “exclusive or” operation is performed on the parity code and the new parity code; “D” denotes the result after the “exclusive or” operation is performed on the data code and the new data code; “X” denotes “don't care”, “1” denotes that at least one piece of read data fragment has a 1-bit error; and “0” denotes that at least one piece of read data fragment does not have a 1-bit error.
  • When (E, P, D) equals (0, 0, X), this implies that the at least one piece of read data fragment is determined not to have a 1-bit error both according to the error correction code and the new error correction code and according to the parity code and the new parity code, so that the at least one piece of read data fragment is the same with the at least one piece of data fragment. Meanwhile, if D is denoted by 1, this implies that an error occurs to the data code and the new data code.
  • When (E, P) equals (0, 1), this implies that the at least one piece of read data fragment is determined not to have a 1-bit error according to the error correction code and the new error correction code but is determined to have a 1-bit error according to the parity code and the new parity code. Meanwhile, the data code and the new data code are checked for further determination. When (E, P, D) equals (0, 1, 1), this implies that the at least one piece of read data fragment is determined to have a 1-bit error according to the data code and the new data code, so that the 1-bit error is corrected. The 1-bit error occurs to the bit that the data code and the new data code correspond to. When (E, P, D) equals (0, 1, 0), this implies that the at least one piece of read data fragment is determined not to have a 1-bit error according to the data code and the new data code. That is, an error occurs to the parity code and the new parity code.
  • When (E, P, D) equals (1, 0, X), this implies that the at least one piece of read data fragment is determined to have a 1-bit error according to the error correction code and the new error correction code but is determined not to have a 1-bit error according to the parity code and the new parity code. Under such circumstances, an error occurs to the error correction code and the new error correction code, and the at least one piece of read data fragment does not have a 1-bit error corresponding to the at least one piece of data fragment.
  • When (E, P, D) equals (1, 1, X), this implies that the at least one piece of read data fragment is determined to have a 1-bit error both according to the error correction code and the new error correction code and according to the parity code and the new parity code. Under such circumstances, the at least one piece of read data fragment has a 1-bit error, and the 1-bit error occurring to the at least one piece of read data fragment is corrected according to the error correction code and the new error correction code according to the error checking and correction (ECC) algorithm.
  • Take the at least one piece of data fragment be (00101011) and the at least one piece of read data fragment be (00101010) for example. According to the above memory 1-bit error checking method, the at least one piece of data fragment has an error correction code (P4 P2 P1)=(111), a parity code 0 and a data code 1. The at least one piece of read data fragment has a new error correction code (P4 P2 P1)=(111), a new parity code 1 and a new data code 0. Hence (E, P, D) that equals (0, 1, 1) is obtained. That means the lowest bit among the at least one piece of read data fragment has a 1-bit error. Then the at least one piece of read data fragment is corrected to (00101011).
  • Referring to FIG. 3, a block diagram of a memory according to a preferred embodiment of the invention is shown. The memory 300 includes a memory array 310 and an error correction circuit 320. The memory array 310 receives and stores at least one piece of data fragment Data. The memory 300 reads at least one piece of data fragment Data from the memory array 310 and uses the at least one piece of data fragment Data as at least one piece of read data fragment DataR. The size of both the at least one piece of data fragment Data and the at least one piece of read data fragment DataR is 2n bits, wherein n is an integer greater than or equal to 0.
  • The error correction circuit 320 generates an error correction code, a parity cod, and a data code according to the at least one piece of data fragment Data, and generates a new error correction code, a new parity code and a new data code according to the at least one piece of read data fragment DataR, wherein the data code corresponds to the error correction code, and the new data code corresponds to the new error correction code.
  • Both the error correction code and the new error correction code are an ECC parity bit or its compliment. The size of both the error correction code and the new error correction code is n bits. The size of both the parity code and the new parity code is 1 bit. The size of both the data code and the new data code is 1 bit. When the error correction code and the new error correction code are an ECC parity bit, the data code is the lowest bit among the at least one piece of data fragment, and the new data code is the lowest bit among the at least one piece of read data fragment. When the error correction code and the new error correction code are a complement to the ECC parity bit, the data code is the highest bit among the at least one piece of data fragment, and the new data code is the highest bit among the at least one piece of read data fragment.
  • The memory 300 determines whether the at least one piece of read data fragment has a 1-bit error corresponding to the at least one piece of data fragment according to the error correction code and the new error correction code, the parity code and the new parity code, and the data code and the new data code. Besides, the 1-bit error checking method used in the memory 300 is already disclosed in the memory 1-bit error checking method in the above embodiments of the invention, and is not repeated here.
  • The memory and the 1-bit error checking method thereof disclosed in the above embodiments of the invention check whether a 1-bit error occurs to the data stored in the memory according to an error correction code having either an error checking and correction (ECC) parity bit or its compliment, a 1-bit parity code, and a 1-bit data code in a simpler way. Compared with the conventional memory 1-bit error checking method in which the at least one piece of data fragment whose size is 2n bits uses 2n bits of overhead bits, the memory 1-bit error checking method disclosed in the invention only uses (n+2) bits of overhead bits, largely saving the memory space, and simplifying the hardware configuration for the memory.
  • Besides, the data completeness is also achieved via the use of a Hamming code conventionally. Several check bits are added to the specific positions of the at least one piece of data fragment. For example, when the size of the at least one piece of data fragment is n bits, then k check bits are added to the 20, 21, 22, . . . and 2k-1 bit following the equation 7 described below, wherein k is an integer.

  • 2k ≧=n+k+1  (eq. 7)
  • The number of 1 that the check bit and the bits corresponding to the check bit have must be even. The check bits are used for detecting and correcting a 1-bit error of the at least one piece of data fragment. However, all the memory bits are adjacent in the memory. The Hamming code has to add some check bits to the specific positions of the at least one piece of data fragment. Hence the Hamming code is not suitable for applying to the memory.
  • While the invention has been described by way of example and in terms of a preferred embodiment, it is to be understood that the invention is not limited thereto. On the contrary, it is intended to cover various modifications and similar arrangements and procedures, and the scope of the appended claims therefore should be accorded the broadest interpretation so as to encompass all such modifications and similar arrangements and procedures.

Claims (11)

1. A memory 1-bit error checking method, comprising:
receiving at least one piece of data fragment, wherein the size of the at least one piece of data fragment is 2n bits, n is an integer greater than or equal to 0;
generating an error correction code, a parity code and a data code according to the at least one piece of data fragment, wherein the data code corresponds to the error correction code;
writing the at least one piece of data fragment, the error correction code, the parity code and the data code in a memory;
reading the at least one piece of data fragment from the memory and using the at least one piece of data fragment as at least one piece of read data fragment, wherein the size of the at least one piece of read data fragment is 2n bits;
generating a new error correction code, a new parity code and a new data code according to the at least one piece of read data fragment, wherein the new data code corresponds to the new error correction code;
determining whether the at least one piece of read data fragment has a 1-bit error corresponding to the at least one piece of data fragment according to the error correction code and the new error correction code, the parity code and the new parity code, and the data code and the new data code; and
outputting the at least one piece of read data fragment if the at least one piece of read data fragment does not have a 1-bit error corresponding to the at least one piece of data fragment.
2. The memory 1-bit error checking method according to claim 1, wherein when both the error correction code and the new error correction code are an error checking and correction (ECC) parity bit, the data code is the lowest bit among the at least one piece of data fragment, and the new data code is the lowest bit among the at least one piece of read data fragment.
3. The memory 1-bit error checking method according to claim 1, wherein when both the error correction code and the new error correction code are a complement to the ECC parity bit, the data code is the highest bit among the at least one piece of data fragment, and the new data code is the highest bit among the at least one piece of read data fragment.
4. The memory 1-bit error checking method according to claim 1, wherein the step of determining whether the at least one piece of read data fragment has a 1-bit error further comprises corresponding to the at least one piece of data fragment:
correcting the 1-bit error according to the error correction code and the new error correction code if the at least one piece of read data fragment is determined to have a 1-bit error according to the error correction code and the new error correction code and if the at least one piece of read data fragment is determined to have a 1-bit error according to the parity code and the new parity code.
5. The memory 1-bit error checking method according to claim 1, wherein the step of determining whether the at least one piece of read data fragment has a 1-bit error corresponding to the at least one piece of data fragment further comprises:
determining that the at least one piece of read data fragment does not have a 1-bit error corresponding to the at least one piece of data fragment if error occurs to the error correction code and the new error correction code when the at least one piece of read data fragment is determined to have a 1-bit error according to the error correction code and the new error correction code but is determined not to have a 1-bit error according to the parity code and the new parity code.
6. The memory 1-bit error checking method according to claim 1, wherein the step of determining whether the at least one piece of read data fragment has a 1-bit error corresponding to the at least one piece of data fragment further comprises:
checking the data code and the new data code if the at least one piece of read data fragment is determined not to have a 1-bit error according to the error correction code and the new error correction code but is determined to have a 1-bit error according to the parity code and the new parity code; and
correcting the 1-bit error if the at least one piece of read data fragment is determined to have a 1-bit error according to the data code and the new data code.
7. The memory 1-bit error checking method according to claim 1, wherein the step of determining whether the at least one piece of read data fragment has a 1-bit error corresponding to the at least one piece of data fragment further comprises:
determining that the at least one piece of read data fragment does not have a 1-bit error corresponding to the at least one piece of data fragment if error occurs to the parity code and the new parity code when the at least one piece of read data fragment is determined not to have a 1-bit error both according to the error correction code and the new error correction code and according to the data code and the new data code, but is determined to have a 1-bit error according to the parity code and the new parity code.
8. The memory 1-bit error checking method according to claim 1, wherein the step of determining whether the at least one piece of read data fragment has a 1-bit error corresponding to the at least one piece of data fragment further comprises:
determining that the at least one piece of read data fragment does not have a 1-bit error corresponding to the at least one piece of data fragment if error occurs to the data code and the new data code when the at least one piece of read data fragment is determined not to have a 1-bit error both according to the error correction code and the new error correction code and according to the parity code and the new parity code but is determined to have a 1-bit error according to the data code and the new data code.
9. A memory, comprising:
a memory array used for receiving and storing at least one piece of data fragment, wherein the memory reads the at least one piece of data fragment from the memory array and uses the at least one piece of data fragment as at least one piece of read data fragment, and the size of both the at least one piece of data fragment and the at least one piece of read data fragment is 2n bits, n is an integer greater than or equal to 0; and
an error correction circuit for generating an error correction code, a parity code and a data code according to the at least one piece of data fragment, wherein the data code corresponds to the error correction code, a new error correction circuit, a new parity code and a new data code are generated according to the at least one piece of read data fragment, and the new data code corresponds to the new error correction code;
wherein the memory determines whether the at least one piece of read data fragment has a 1-bit error corresponding to the at least one piece of data fragment according to the error correction code and the new error correction code, the parity code and the new parity code, and the data code and the new data code.
10. The memory according to claim 9, wherein when both the error correction code and the new error correction code are an ECC parity bit, the data code is the lowest bit among the at least one piece of data fragment, and the new data code is the lowest bit among the at least one piece of read data fragment.
11. The memory according to claim 9, wherein when both the error correction code and the new error correction code are a complement to the ECC parity bit, the data code is the highest bit among the at least one piece of data fragment, and the new data code is the highest bit among the at least one piece of read data fragment.
US11/776,027 2007-07-11 2007-07-11 Memory and 1-bit error checking method thereof Expired - Fee Related US7721181B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US11/776,027 US7721181B2 (en) 2007-07-11 2007-07-11 Memory and 1-bit error checking method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
US11/776,027 US7721181B2 (en) 2007-07-11 2007-07-11 Memory and 1-bit error checking method thereof

Publications (2)

Publication Number Publication Date
US20090019336A1 true US20090019336A1 (en) 2009-01-15
US7721181B2 US7721181B2 (en) 2010-05-18

Family

ID=40254143

Family Applications (1)

Application Number Title Priority Date Filing Date
US11/776,027 Expired - Fee Related US7721181B2 (en) 2007-07-11 2007-07-11 Memory and 1-bit error checking method thereof

Country Status (1)

Country Link
US (1) US7721181B2 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100060660A1 (en) * 2008-09-05 2010-03-11 Cheon-Ho Bae Dithering method and apparatus
US20110069558A1 (en) * 2009-09-24 2011-03-24 Chun-Yu Liao Local word line driver of a memory
US20150278002A1 (en) * 2011-06-29 2015-10-01 Nsk Ltd. In-Vehicle Electronic Control Device
US20180373586A1 (en) * 2017-06-21 2018-12-27 SK Hynix Inc. Memory system and operating method therefor

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8413031B2 (en) * 2008-12-16 2013-04-02 Lsi Corporation Methods, apparatus, and systems for updating loglikelihood ratio information in an nT implementation of a Viterbi decoder
US9053050B2 (en) * 2011-12-02 2015-06-09 Synopsys, Inc. Determining a desirable number of segments for a multi-segment single error correcting coding scheme
US9054840B2 (en) 2011-12-15 2015-06-09 Lenovo Enterprise Solutions (Singapore) Pte. Ltd. Error detection and correction of a data transmission

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5490155A (en) * 1992-10-02 1996-02-06 Compaq Computer Corp. Error correction system for n bits using error correcting code designed for fewer than n bits
US6519735B1 (en) * 1998-12-22 2003-02-11 Intel Corporation Method and apparatus for detecting errors in data output from memory and a device failure in the memory
US6987684B1 (en) * 2003-07-15 2006-01-17 Integrated Device Technology, Inc. Content addressable memory (CAM) devices having multi-block error detection logic and entry selective error correction logic therein
US7096406B2 (en) * 2001-08-23 2006-08-22 Spansion Llc Memory controller for multilevel cell memory

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5490155A (en) * 1992-10-02 1996-02-06 Compaq Computer Corp. Error correction system for n bits using error correcting code designed for fewer than n bits
US6519735B1 (en) * 1998-12-22 2003-02-11 Intel Corporation Method and apparatus for detecting errors in data output from memory and a device failure in the memory
US7096406B2 (en) * 2001-08-23 2006-08-22 Spansion Llc Memory controller for multilevel cell memory
US6987684B1 (en) * 2003-07-15 2006-01-17 Integrated Device Technology, Inc. Content addressable memory (CAM) devices having multi-block error detection logic and entry selective error correction logic therein

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100060660A1 (en) * 2008-09-05 2010-03-11 Cheon-Ho Bae Dithering method and apparatus
US8711172B2 (en) * 2008-09-05 2014-04-29 Magnachip Semiconductor, Ltd. Dithering method and apparatus
US20110069558A1 (en) * 2009-09-24 2011-03-24 Chun-Yu Liao Local word line driver of a memory
US8270222B2 (en) 2009-09-24 2012-09-18 Macronix International Co., Ltd. Local word line driver of a memory
US20150278002A1 (en) * 2011-06-29 2015-10-01 Nsk Ltd. In-Vehicle Electronic Control Device
US9348684B2 (en) * 2011-06-29 2016-05-24 Nsk Ltd. In-vehicle electronic control device
US20180373586A1 (en) * 2017-06-21 2018-12-27 SK Hynix Inc. Memory system and operating method therefor
US10713112B2 (en) * 2017-06-21 2020-07-14 SK Hynix Inc. Memory controller having memory unit including tables, memory system having the memory unit including the tables and operating method of the memory controller

Also Published As

Publication number Publication date
US7721181B2 (en) 2010-05-18

Similar Documents

Publication Publication Date Title
US7721181B2 (en) Memory and 1-bit error checking method thereof
US8069395B2 (en) Three bit error detection using ECC codes
JP5226519B2 (en) Method and apparatus for error management
KR100645058B1 (en) Memory managing technique capable of improving data reliability
EP0989491B1 (en) Technique for partioning data to correct memory part failures
US9015554B2 (en) Management of non-valid decision patterns of a soft read retry operation
US8335976B2 (en) Memory system that provides guaranteed component-failure correction with double-error correction
US8266495B2 (en) Systems and methods for performing concatenated error correction
US9762261B2 (en) Error detection and correction in ternary content addressable memory (TCAM)
KR20080062306A (en) Error correction circuit for reducing miscorrection probability, method there-of and semiconductor memory device including the circuit
JP2005202957A (en) Data partitioning for error correction
WO2011030410A1 (en) Memory device
US20160124803A1 (en) Storage Device Data Access Method and Storage Device
US9239753B2 (en) DRAM address protection
US20080082869A1 (en) Memory control unit
US20150095740A1 (en) Error Detection and Correction in Binary Content Addressable Memory (BCAM)
US20090070655A1 (en) Method for Generating an ECC Code for a Memory Device
US20040098654A1 (en) FIFO memory with ECC function
US20210083690A1 (en) Memory system and operating method thereof
KR20230021949A (en) Memory device and operating method thereof
US8365055B2 (en) High performance cache directory error correction code
US9361180B2 (en) Storing data by an ECC memory
US8028221B2 (en) Error correction and error detection method for reading of stored information data and a storage control unit for the same
US10250279B2 (en) Circuits and methods for writing and reading data
US20090138781A1 (en) Memory module and writing and reading method thereof

Legal Events

Date Code Title Description
AS Assignment

Owner name: MACRONIX INTERNATIONAL CO., LTD., TAIWAN

Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNORS:LIAO, CHUN-YU;HUANG, SHIH-CHANG;REEL/FRAME:019542/0484

Effective date: 20070626

Owner name: MACRONIX INTERNATIONAL CO., LTD.,TAIWAN

Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNORS:LIAO, CHUN-YU;HUANG, SHIH-CHANG;REEL/FRAME:019542/0484

Effective date: 20070626

STCF Information on status: patent grant

Free format text: PATENTED CASE

FPAY Fee payment

Year of fee payment: 4

MAFP Maintenance fee payment

Free format text: PAYMENT OF MAINTENANCE FEE, 8TH YEAR, LARGE ENTITY (ORIGINAL EVENT CODE: M1552)

Year of fee payment: 8

FEPP Fee payment procedure

Free format text: MAINTENANCE FEE REMINDER MAILED (ORIGINAL EVENT CODE: REM.); ENTITY STATUS OF PATENT OWNER: LARGE ENTITY

LAPS Lapse for failure to pay maintenance fees

Free format text: PATENT EXPIRED FOR FAILURE TO PAY MAINTENANCE FEES (ORIGINAL EVENT CODE: EXP.); ENTITY STATUS OF PATENT OWNER: LARGE ENTITY

STCH Information on status: patent discontinuation

Free format text: PATENT EXPIRED DUE TO NONPAYMENT OF MAINTENANCE FEES UNDER 37 CFR 1.362

FP Lapsed due to failure to pay maintenance fee

Effective date: 20220518