Patent ID: 11886287
Assignee: CHANGXIN MEMORY TECHNOLOGIES, INC.
Field: Computer technology (Electrical engineering)
Classification: CPC G  Y | IPC G

Claim 14:
15. 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.