CPC G06F 3/0659 (2013.01) [G06F 3/0604 (2013.01); G06F 3/0679 (2013.01)] | 10 Claims |
1. A method for reading and writing, comprising:
applying a read command to a memory device, the read command pointing to address information;
reading data to be read out from a memory cell corresponding to the address information pointed to by the read command; and
storing the address information pointed to by the read command into a memory bit of a preset memory space if an error occurs in the data to be read out, wherein the preset memory space is provided with a plurality of memory bits, and each of the plurality of memory bits being associated with a spare memory cell;
applying a write command to the memory device, and comparing address information pointed to by the write command with the address information stored in the preset memory space;
performing a write operation on the memory cell corresponding to the address information pointed to by the write command if the address information pointed to by the write command is different from the address information stored in the preset memory space; and
stopping performing the write operation on the memory cell corresponding to the address information pointed to by the write command, and performing a write operation on the spare memory cell corresponding to a first memory bit where the address information is stored in the preset memory space if the address information pointed to by the write command is identical to the address information stored in the preset memory space.
|