Patent ID: 8522072

Claim:
An address remapping method for repairing memory, comprising: initializing a valid flag and an essential flag in a ternary content-addressable memory, the valid flag and the essential flag correspond to a subcube address in a spare memory; checking a main memory and providing a normal signal when no faulty cell address is detected in the main memory; executing a repairing step when at least one faulty cell address is detected in the main memory, the repairing step comprises: comparing the faulty cell address with the subcube address and calculating a Hamming distance between them; using the spare memory to replace the faulty cell address by merging the faulty cell address into the subcube address when the Hamming distance is not larger than an address-width degree of the subcube address; and setting the value of the subcube address and setting the essential flag when a merged number of the subcube address is larger than a threshold value; providing a failure signal when no more subcube address is available to cover the faulty cell address; and triggering a next subcube address by setting a next valid flag.