Read and write methods and memory devices
AssigneeChangxin Memory Technologies, Inc.
InventorShuliang Ning
Life of this patent
Estimating the term…
Abstract
A read and write method includes: applying a read command to a memory device, the read command indicating address information; reading data to be read from a storage unit corresponding to the address information indicated by the read command; and if an error occurs in the data to be read, associating the address information indicated by the read command with a spare storage unit, and backing up the address information indicated by the read command and association information between the address information and the spare storage unit in a non-volatile storage unit based on a preset rule.
Claims17
A read and write method, comprising:
- applying a read command to a memory device, the read command indicating address information;
- reading data to be read from a storage unit corresponding to the address information indicated by the read command;
- and if an error occurs in the data to be read, associating the address information indicated by the read command with a spare storage unit, and backing up the address information indicated by the read command and association information between the address information and the spare storage unit in a non-volatile storage unit based on a preset rule;
- wherein a lookup table is provided, the address information of the storage unit and a numerical code corresponding to the address information are recorded in the lookup table, the numerical code being composed of a first type code and a second type code, the first type code being used to mark whether the address information is valid, the second type code being used to record an identification code for identifying the spare storage unit;
- and if the error occurs in the data to be read, then in the lookup table, the first type code of the numerical code corresponding to the address information indicated by the read command is modified to an invalid mark value, and the second type code is modified to the identification code for identifying the spare storage unit;
- and
- the method further comprises:
- recording a number of times of modification of the second type code, and generating the identification code for identifying the spare storage unit according to the number of times of modification.
A memory device, comprising:
- a command receiving unit, configured to receive a read command or a write command;
- a storage unit, configured to correspond to address information indicated by the read command or the write command;
- a spare storage unit;
- an association unit, configured to record the address information and association information between the address information and the spare storage unit;
- an execution unit, configured to execute a read operation or a write operation on the storage unit or the spare storage unit;
- and
- a non-volatile storage unit, configured to back up the address information and the association information between the address information and the spare storage unit recorded by the association unit based on a preset rule;
- wherein the association unit is a lookup table, the address information of the storage unit and a numerical code corresponding to the address information are recorded in the lookup table, the numerical code being composed of a first type code and a second type code, the first type code being used to mark whether the address information is valid, the second type code being used to record an identification code for identifying the spare storage unit;
- and if an error occurs in data to be read, then in the lookup table, the first type code of the numerical code corresponding to the address information indicated by the read command is modified to an invalid mark value, and the second type code is modified to the identification code for identifying the spare storage unit;
- and
- the memory device further comprises:
- an identification code generation unit, connected to the association unit, and configured to record a number of times of modification of the second type code and generate the identification code for identifying the spare storage unit according to the number of times of modification.
Dependencies are inferred from the claim text.