Memory and method for checking reading errors thereof
First Claim
1. A method for checking reading errors of a memory, comprising:
- receiving a first data fragment;
generating a first error correction code (ECC) and a first count index according to the first data fragment, wherein the first count index is corresponding to a quantity of one kind of binary value in the first data fragment;
writing the first data fragment, the first error correction code and the first count index into a memory;
reading the first data fragment from the memory as a second data fragment;
generating a second error correction code and a second count index according to the second data fragment;
determining whether the first count index and the second count index are equal;
determine whether the first error correction code and the second error correction code are equal; and
outputting the second data fragment when the first count index and the second count index are equal, and the first error correction code and the second error correction code are equal.
1 Assignment
0 Petitions
Accused Products
Abstract
A method for checking reading errors of a memory includes receiving a first data fragment and accordingly generating a first ECC and a first count index; writing the first data fragment, the first ECC and the first count index into a memory; reading the first data fragment from the memory as a second data fragment, generating a second ECC and second count index according to the second data fragment; determining whether the first count index and second count index are equal; determining whether the first ECC and the second ECC are equal; and outputting the second data fragment when the first count index is equal to the second count index and the first ECC is equal to the second ECC.
107 Citations
26 Claims
-
1. A method for checking reading errors of a memory, comprising:
-
receiving a first data fragment; generating a first error correction code (ECC) and a first count index according to the first data fragment, wherein the first count index is corresponding to a quantity of one kind of binary value in the first data fragment; writing the first data fragment, the first error correction code and the first count index into a memory; reading the first data fragment from the memory as a second data fragment; generating a second error correction code and a second count index according to the second data fragment; determining whether the first count index and the second count index are equal; determine whether the first error correction code and the second error correction code are equal; and outputting the second data fragment when the first count index and the second count index are equal, and the first error correction code and the second error correction code are equal. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)
-
-
16. A memory, comprising:
-
a memory-cell array, for receiving and storing a first data fragment, reading the first data fragment from the memory-cell array to be a second data fragment; an error correction circuit, for generating a first error correction code (ECC) according to the first data fragment and generating a second error correction code according to the second data fragment; and an n-bit counter, for generating a first count index and a second count index, wherein the first count index and the second count index are respectively corresponding to a quantity of one kind of binary value occurred in the first data fragment and a quantity of one kind of binary value occurred in the second data fragment, and n is a positive integer; wherein the memory determines whether the second data fragment is equal to the first data fragment according to the first count index, the second count index, the first error correction code and the second error correction code; wherein when the second data fragment has y bit errors as compared to the first data fragment, the memory corrects the second data fragment to be the first data fragment and outputs the second data fragment, and y is a positive integer smaller or equal to n. - View Dependent Claims (17, 18, 19, 20, 21, 22, 23, 24, 25, 26)
-
Specification