Method for operating memory device
By using a refresh mapping table in the memory device to map risky memory block addresses to backup blocks, the problem of data loss caused by memory block wear and power loss is solved, and high reliability and long-term retention of data are achieved.
Patent Information
- Application Number
- CN202410997442.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2020-07-24
- Filing Date
- 2020-11-17
- Publication Date
- 2024-10-15
AI Technical Summary
Existing memory technology has limited data retention capabilities in the face of tighter margins and memory cell interference. In particular, the wear and tear of memory blocks over time causes the ECC logic to be unable to fully correct errors, resulting in data loss.
Using a memory device and method, the risky memory block address is mapped to the backup block by refreshing the mapping table, and data backup and copy operations are performed to ensure that the data can be restored after the memory block is worn out or power is lost.
It effectively solves the problem of data loss caused by memory block wear and power loss, ensures data integrity and reliability, and extends the service life of the memory.
Smart Images

Figure CN118778903A_ABST
Abstract
Description
[0001] This application is a divisional application, parent application number: 202011289115.9, application date: November 17, 2020, invention name: memory device and method for operating a memory device. Technical Field
[0002] The present invention belongs to the field of storage technology, and relates to a memory device and a method for operating the memory device, in particular to a memory device including memory refresh and memory management in a system. Background Art
[0003] Memory technologies for integrated circuit memories are developed at smaller and smaller technology nodes and deployed on larger and larger memory arrays on a single integrated circuit. As the technology of memory cells advances, the margins for sensing data can become tighter / smaller. In addition, the ability of a memory cell to retain data values is limited by tighter margins in the case of high-speed and high-volume access to the memory cell and to neighboring memory cells that results in disturbances to the memory cell state.
[0004] To address these issues, such as those caused by tighter margins and memory cell disturbances, the use of error correcting codes (ECC) embedded in integrated circuit memories has become increasingly common as these technologies scale in size and density. In addition to correcting erroneous memory bits in a memory device, the ECC information that may be generated during the correction process may be used for memory management functions.
[0005] Another problem that arises in various memory technologies is the tendency of data stored in memory cells to be disturbed over time due to exposure to heat, exposure to electric fields caused by operations on adjacent memory cells, and other environmental and operating conditions. Data errors caused by disturbances of memory cells can be managed by error correction logic in many cases. However, for some memory technologies, the tendency to lose data increases over time as memory blocks wear. Ultimately, ECC logic may not be able to correct all errors that accumulate as memory blocks wear.
[0006] Complex wear leveling procedures have been developed to manage this problem, adding logical to physical address mappings and changing the mapping of logical addresses with active high to new physical blocks when the wear limit of the physical blocks is reached.
[0007] It would be desirable to provide a solution that is usable in systems that are not capable of using complex wear leveling procedures. Summary of the invention
[0008] A memory device includes: a memory including a plurality of memory blocks on an integrated circuit or a multi-chip module; a controller located on the integrated circuit or the multi-chip module and coupled to the memory to execute a command having an address to access an addressed memory block among the plurality of memory blocks; and a refresh mapping table located in a non-volatile memory on the integrated circuit or the multi-chip module and accessible by the controller. The refresh mapping table has one or more entries, and the entries in the refresh mapping table map addresses identifying the addressed memory blocks set for refresh to backup block addresses.
[0009] The controller responds to a refresh command sequence with a refresh block address to perform a refresh operation. The refresh operation includes storing a backup copy of data from an addressed memory block with the refresh block address to a backup block, setting an entry in a refresh mapping table to map the refresh block address to the backup block, refreshing the addressed memory block with the refresh block address using the data from the backup block, and resetting the entry after the refresh operation of the addressed memory block is completed.
[0010] The controller is configured to: execute a program for restoring the mapping of refresh block addresses to backup block addresses after the memory device is powered on, scan a refresh mapping table for a setting entry that maps the refresh block address to the backup block address, and register the setting entry in the refresh mapping table. The refresh mapping table includes a refresh mapping memory area storing one or more entries, and a refresh mapping circuit that registers the setting entry that maps the refresh block address to the backup block.
[0011] A method for operating a memory device through a controller of the memory device is provided. By scanning a refresh mapping table for a setting entry that maps a refresh block address to a backup block address, and logging the setting entry in the refresh mapping table, the controller can execute a program for restoring the mapping of the refresh block address to the backup block address after the memory device is powered on. The refresh mapping table includes a refresh mapping memory area storing one or more entries and a refresh mapping circuit. The method includes scanning a refresh mapping memory area in the refresh mapping table for the setting entry, and logging the setting entry that maps the refresh block address to the backup block in the refresh mapping circuit in the refresh mapping table.
[0012] A method for operating a memory device by an external host coupled to the memory device is provided. The method includes performing a refresh operation by issuing a refresh command sequence with a refresh block address to the memory device. The refresh operation includes: storing a backup copy of data from an addressed memory block at the refresh block address in a backup block; setting a mapping entry in a refresh mapping table to map the refresh block address to the address of the backup block; refreshing the addressed memory block at the refresh block address using the data from the backup block; and resetting the mapping entry after the refresh operation of the addressed memory block is completed.
[0013] The refreshing of the addressed memory block may include: erasing the addressed memory block at the refresh block address; and subsequently copying the backup copy from the backup block to the addressed memory block. The refreshing operation may include erasing the backup block before the storing the backup copy in the backup block.
[0014] In one embodiment, refreshing a mapping table comprises a log format table, wherein setting a mapping entry comprises writing a valid entry in the log format table, and resetting an entry comprises marking the entry as invalid.
[0015] In an alternative embodiment, refreshing the mapping table includes registering a backup block list of a set of backup blocks, wherein the entries are stored within corresponding backup blocks in the set of backup blocks. The setting entries may include writing a valid flag to an available block in the set of backup blocks. The resetting entries may include erasing at least a valid flag or writing an invalid flag in a block.
[0016] The refresh operation may include: determining the status of a copy operation started before the interruption; erasing the addressed memory block and copying a backup copy from the backup block to the addressed memory block if the status indicates that the copy operation is unrecoverable; and resetting the mapping entry after the refresh operation of the addressed memory block is completed if the status indicates that the copy operation is recoverable.
[0017] The method may include issuing a command sequence prior to performing a refresh operation for: retrieving data from a memory device at an input block address; checking an ECC status of the retrieved data at the input block address; and if the ECC status indicates that the block at the input block address needs to be refreshed, logging a refresh command sequence with the input block address in a host includes logging the input block address as a refresh block address in the host.
[0018] Other embodiments and advantages of the present invention will become apparent after reviewing the following drawings, detailed description, and appended claims. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1Ais a schematic diagram of an example of a circuit suitable for performing a read operation on a selected memory cell in a NAND string.
[0020] Figure 1B An example distribution of threshold voltages Vt of memory cells is shown.
[0021] Figure 2A is a simplified system diagram of a system including a memory device including a refresh map and a host coupled to the memory device.
[0022] Figure 2B For Figure 2A An enlarged view of the refresh map shown in FIG.
[0023] Figure 3A An example flow diagram for reading a memory device by a host external to the memory device is shown.
[0024] Figure 3B An example flow chart is shown for performing a refresh-in-place operation by a host external to a memory device that includes a refresh map.
[0025] Figure 3C An example flow chart for performing a post-power loss recovery procedure in a memory device including a refresh map is shown.
[0026] Figure 3D An example flow diagram for reading a memory device including a refresh mapping table is shown.
[0027] Figure 3E An example flow chart for a power-on procedure by a controller in a memory device is shown.
[0028] FIG. 4A to FIG. 4G An embodiment of a refresh mapping table including a log format table is shown.
[0029] Figure 5A An alternative embodiment of a refresh map storing a list of backup blocks that registers a set of backup blocks and their enabled status is shown.
[0030] Figure 5B Shown for by including such Figure 5A 00146] FIG . 10 is an example flow chart of a power-on procedure performed by a controller in a memory device of an alternative embodiment of a refresh map shown in FIG.
[0031] Figure 5C Shows the initialization of a backup block list that logs in a set of backup blocks.
[0032] Figure 5D The data configuration in the backup area in the first embodiment is shown.
[0033] Fig. 6AThe operation shown includes Figure 5A An example flow chart of a memory device of an alternative embodiment of a refresh mapping table in FIG.
[0034] FIG. 6B to FIG. 6C It shows that the old backup blocks are cancelled and the new backup blocks are registered in the backup block list stored in the refresh mapping table.
[0035] Fig. 7A The operation shown includes Figure 5A An alternative flow chart of a memory device of an alternative embodiment of a refresh map table in FIG.
[0036] Figure 7B The data configuration in the backup area in the second embodiment is shown.
[0037] Fig. 8A , Figure 8B as well as Figure 8C A first embodiment of a backup block list is shown, wherein the backup block list can simultaneously register multiple valid backup blocks.
[0038] Fig. 9A , Fig. 9B as well as Fig. 9C A second embodiment of the backup block list is shown, in which the backup block list can only record a single valid backup block at a time.
[0039] Fig. 10A and Fig. 10B A third embodiment of the backup block list is shown, in which the backup block list can only record valid backup blocks.
[0040] Fig.11 is a simplified block diagram of a memory device including a memory array and a controller for performing refresh operations as described herein.
[0041]
Explanation of symbols
[0042] 100: Circuit
[0043] 101: String selection transistor
[0044] 102, 103, 104, 105, 106: Storage unit
[0045] 107: Ground selection transistor
[0046] 110: Local bit line
[0047] 120: Global bit line
[0048] 130: Sensing circuit
[0049] 135: Clamping Circuit
[0050] 141: First Distribution
[0051] 142: Second Distribution
[0052] 143: Sensing Window
[0053] 200: System
[0054] 210: Host
[0055] 211: Microcontroller Unit
[0056] 212: Storage Subsystem
[0057] 213: Flash Memory Interface
[0058] 214: Other circuits
[0059] 215: Bus Subsystem
[0060] 220, 1100: Memory device
[0061] 221: Bias configuration supply voltage
[0062] 222, 1105: ECC logic
[0063] 223: Input / output terminal
[0064] 224, 1112: Address counter
[0065] 230: Controller
[0066] 235, 1128: Refresh the mapping table
[0067] 235C: Refresh Mapping Circuit
[0068] 235M: Refresh mapped memory area
[0069] 240, 1101: Memory array
[0070] 250: Bus
[0071] 311, 312, 313, 314, 315, 316, 317, 318, 321, 322, 323, 324, 325, 326, 327, 328, 330, 331, 332, 333, 334, 335, 336, 337, 338, 341, 342, 343, 344, 345, 351, 352, 353, 551, 552, 553, 554, 621, 622, 623, 624, 625, 626, 627, 628, 751, 752, 753, 754, 755, 756, 757, 758, 759, 927: Steps 410, 416, 417, 420, 430: Item
[0072] 501A, 523, 533, 542A, 851: Address
[0073] 501F, 524, 542F, 842, 852: Enable flag
[0074] 520, 530: backup blocks
[0075] 521, 531: Data area
[0076] 522, 532: Reserved area
[0077] 534, 541F, 843: Deactivate flag
[0078] 541A, 841: backup block address
[0079] 800, 900, 1000: backup block list
[0080] 1100: Integrated Circuits
[0081] 1102: ECC array
[0082] 1103: Memory Array Sense Amplifier
[0083] 1104: ECC sense amplifier
[0084] 1106: Calibration of multiplexer
[0085] 1107: Output data multiplexer
[0086] 1109: Data path
[0087] 1110, 1130: Input / output interface
[0088] 1120: Page Buffer
[0089] 1121: word line driver
[0090] 1122: Line
[0091] 1125: Controller
[0092] 1126: Command Logic
[0093] BLC: bit line clamp signal
[0094] CPWEL: Common P Well
[0095] CSRC: Common Source Line
[0096] D: Drain terminal
[0097] Icell: cell current
[0098] S: source terminal
[0099] SGD: string select line
[0100] SGS: Ground Selection Line
[0101] VCLAMP: Clamp bias
[0102] Vpass: pass voltage
[0103] Vread: read voltage
[0104] Vt: threshold voltage
[0105] Vsg: voltage
[0106] WLn, WLn+1, WLn-1, WLn+2, WLn-2: word lines DETAILED DESCRIPTION
[0107] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with specific embodiments and with reference to the accompanying drawings.
[0108] The following description will generally refer to specific structural embodiments and methods. It should be understood that there is no intention to limit the technology to the specific disclosed embodiments and methods, and other features, elements, methods and embodiments can be used to practice the technology. The preferred embodiments are described to illustrate the technology of the present invention, but not to limit its scope, which is defined by the application claims. A person skilled in the art with common knowledge in the art will recognize various equivalent variations described below. A detailed description of embodiments of the present invention is provided with reference to the accompanying drawings.
[0109] Figure 1A1 is an example schematic diagram of a circuit 100 suitable for performing a read operation on a selected memory cell in a NAND string. In the example shown, the memory includes a flash memory, such as a high-density NAND flash memory. Other types of memory technologies may also be utilized, including phase change memory (PCM), programmable resistance memory known as ReRAM or RRAM, NOR flash memory, magnetoresistive memory, and the like.
[0110] exist Figure 1A , the selected memory cell 104 is part of a NAND string formed by a local bit line BL 110 in a block of memory cells. The NAND string also includes memory cell 102, memory cell 103, memory cell 105, and memory cell 106. String select transistor 101 selectively couples bit line BL 110 to global bit line GBL 120 at one end of the NAND string. The gate of string select transistor 101 is connected to string select line SGD. Ground select transistor 107 selectively couples a second end of the NAND string to a common source line CSRC. The gate of ground select transistor 107 is connected to ground select line SGS. The selected memory cell 104 includes a drain terminal (D) coupled to local bit line BL 110, a source terminal (S) coupled to common source line CSRC, and a gate terminal coupled to word line WLn. Gate terminals of the unselected memory cell 102 , the unselected memory cell 103 , the unselected memory cell 105 , and the unselected memory cell 106 are coupled to the word line WLn+2, the word line WLn+1, the word line WLn−1, and the word line WLn−2, respectively.
[0111] The global bit line 120 is coupled to the page buffer (1120, Fig.11 ) in the sensing circuit 130. The clamp circuit 135 is coupled to the global bit line 120 and the sensing circuit 130. The bit line clamp signal BLC is coupled to the gate of the clamp circuit 135 and can be controlled by the controller (1125, Fig.11 ) is provided to control the timing of the read operation.
[0112] During a read operation, a read voltage Vread is applied to the gate of the selected memory cell 104; a pass voltage Vpass is applied to the gates of the unselected memory cells 102, 103, 105, and 106; and a voltage Vsg is applied to the gates of the string select transistor 101 and the ground select transistor 107. A clamp bias VCLAMP may be applied at the gate of the clamp circuit 135, which has a threshold voltage of Vt. The common source line CSRC and the common P-well CPWEL may be at a ground voltage level, such as 0 volts. A cell current Icell may flow through the local bit line BL 110.
[0113] Figure 1B An example distribution of threshold voltages Vt of memory cells as may occur in, for example, a NAND flash memory is shown. Figure 1B A first distribution 141 of threshold voltages Vt of memory cells with data "1" and a second distribution 142 of threshold voltages Vt of memory cells with data "0" are shown. A sensing window 143 separates the first distribution 141 from the second distribution 142. When a pass voltage Vpass is applied to the gate of an unselected memory cell, read interference may be induced by weak Fowler-Nordheim (FN) tunneling. The read interference may widen the first and second distributions of the threshold voltages Vt of the memory cells, resulting in errors when reading the memory cells. For example, the read interference may cause the threshold voltage Vt of the memory cell with data "1" to erroneously increase to a voltage level higher than the first distribution 141, so the threshold voltage Vt may be read as data "0". For example, the read interference may cause the threshold voltage Vt of the memory cell with data "0" to erroneously decrease to a voltage level lower than the second distribution 142, so the threshold voltage Vt may be read as data "1".
[0114] A memory block in a memory device may have a number of error bits, that is, a number of memory cells having a threshold voltage that is disturbed, thereby erroneously reading the data stored in the memory cells. Error correction code (ECC) embedded in the memory device may be used by on-chip or off-chip ECC logic to correct the error bits as data is transferred off the chip, up to a maximum number of correctable error bits in the memory block. The on-chip or off-chip ECC logic may also generate an ECC status and provide the ECC status to a host (210, Figure 2A ). The ECC status may include information such as a count of the number of corrected error bits in the captured data. The host may use the ECC status to determine whether the number of correctable error bits in the memory block is close to the maximum number of correctable error bits, and to determine whether to issue a refresh command sequence. A refresh critical number of correctable error bits that is less than the maximum number of correctable error bits may be predetermined. If the number of correctable error bits in a particular memory block is greater than or equal to the refresh critical number of correctable error bits, the particular memory block is defined by the host as a risky memory block that needs to be refreshed. The memory block may include multiple ECC units, and if the number of correctable error bits in at least one of the multiple ECC units in the memory block is greater than or equal to the refresh critical number of correctable error bits, the memory block may be defined as a risky memory block. For example, if the ECC logic (222, Figure 2A) can correct 8 error bits in the memory block (that is, the maximum number of correctable error bits is 8), and the refresh critical number of correctable error bits is 6, then when the number of correctable error bits of the specific memory block or the number of correctable error bits in at least one of the multiple ECC units in the specific memory block is greater than or equal to 6, the specific memory block is defined as a risky memory block and needs to be refreshed.
[0115] As used herein, a risky memory block refers to a memory block that satisfies the parameter settings in the control logic, such as a memory block in which all error bits are still correctable by ECC but the number of correctable error bits is close to the refresh critical number of correctable error bits. If a refresh operation is not performed on the risky memory block, the data in the risky memory block may be lost. If a refresh operation is performed on the risky memory block, the data in the risky memory block may be saved.
[0116] Figure 2A 2 is a simplified system diagram of a system 200 including a memory device including a refresh map table and a host coupled to the memory device. For example, the memory device 220 may be a flash memory, which is a non-volatile memory chip. The memory device 220 may be a single integrated circuit, or may include a multi-chip module, wherein more than one chip is packaged in the multi-chip module.
[0117] like Figure 2A , the host 210 external to the memory device 220 may include a microcontroller unit MCU 211, which may include one or more processor cores, a central processing unit (CPU). The MCU may communicate with multiple devices via a bus subsystem 215. The multiple devices may include a storage subsystem 212, a flash memory interface 213, and other circuits 214. The flash memory interface 213 provides a connection between the host and the memory device 220 via a bus 250, which connects the host and the memory device. For example, a command sequence for a read operation or a refresh operation may be transmitted from the host 210 to the memory device 220 via the bus 250, and ECC correction data and the ECC status of the data may be transmitted from the memory device 220 to the host 210 via the bus 250.
[0118] like Figure 2A In the example shown in FIG. 1 , the memory device 220 includes a memory array 240 on an integrated circuit or a multi-chip module including a plurality of memory blocks (block 0, block 1, block 2, ..., block n, block n+1). A controller 230 on the integrated circuit or the multi-chip module is coupled to the memory array 240 to execute a command with an address to access an addressed memory block among the plurality of memory blocks.
[0119] A refresh mapping table 235 in a non-volatile memory on an integrated circuit or multi-chip module can be accessed by the controller 230. The refresh mapping table can have one or more entries, and the entries in the refresh mapping table map addresses identifying the addressed memory blocks set for refresh to backup block addresses. The addressed memory blocks can be risky memory blocks, such as those described in reference to FIG. Figure 1B In one example, entries mapping addresses identifying addressed memory blocks may be stored in a refresh map memory area (235M, Figure 2B In an alternative example, entries mapping addresses identifying the addressed memory blocks may be stored at addressable locations in nonvolatile memory outside the refresh map memory area. In an alternative example, after the integrated circuit or multi-chip module is powered on, entries outside the refresh map memory area may be retrieved from the addressable locations and subsequently stored in the refresh map memory area in the nonvolatile memory.
[0120] The controller 230 responds to a refresh command sequence, for example, from the host 210, wherein a refresh block address is used to perform a refresh operation, such as an in-place refresh operation. The refresh operation may include: storing a backup copy of data from an addressed memory block having a refresh block address to a backup block, setting an entry in a refresh mapping table to map the refresh block address to the backup block, refreshing the addressed memory block having the refresh block address using the data from the backup block, and resetting the entry after the refresh operation of the addressed memory block is completed. For example, the addressed memory block may include a plurality of pages having respective page addresses. The refresh command sequence may include a sequence of commands for performing the refresh operation, the sequence of commands including page read and page program commands for respective pages in the addressed memory block to copy the backup copy of data from the page in the addressed memory block to the respective pages in the backup block page by page. The page read and page program commands in the refresh command sequence may include entering the page address of the respective page in the addressed memory block. For example, the refresh command sequence may include as described in reference Figure 3B The commands described include commands for setting a mapping entry in a refresh mapping table (step 325) and for resetting a mapping entry in a refresh mapping table (step 328).
[0121] As used herein, an in-place refresh operation is a memory refresh operation on an addressed memory block in a memory device that uses a logical address to physical address mapping table (L2P) that remaps the addressed memory block to a backup block to write data from the addressed memory block to the same addressed memory block. It is possible that the refresh operation may be interrupted before completion, in which case the validity of the data in the addressed block may be compromised.
[0122] The controller 230 is configured to: execute a program to recover from interruption after the memory device is powered on to scan the refresh mapping table 235 for the setting entry, complete the refresh operation for the addressed memory block identified in the setting entry, and reset the setting entry after the refresh operation is completed. The host can read the data at the calibration address mapped by the setting entry. The controller 230 can use the bias configuration state machine to control the application of the bias configuration supply voltage 221, such as read, erase and program voltages.
[0123] Error correction code (ECC) logic 222 on the memory device 220 or external to the memory device can correct error bits and check the ECC status of the data retrieved from the input block address. Depending on the result of checking the ECC status, it can be determined whether to log a refresh command sequence for a refresh operation at the input block address in the memory device, as shown in FIG. Figure 3A Further description. The ECC status may be provided to the host (210, Figure 2A ), and in response, the host may issue a refresh command sequence.
[0124] The input / output terminal 223 may receive commands from the external host 210 and may be coupled to the controller 230. The commands from the external host may be decoded and applied to the controller 230 on the memory device.
[0125] The memory device 220 includes an address counter 224 or other address logic for providing addresses to the memory array 240. The address counter 224 may be controlled by an on-chip controller 230.
[0126] Figure 2B For Figure 2A An enlarged view of the refresh map shown in FIG. Figure 2B As shown in FIG. 1 , the refresh mapping table may include a refresh mapping circuit 235C and a refresh mapping memory area 235M. The refresh mapping circuit 235C may include a mapping function circuit and a logger to log the refresh mapping memory area 235M for the memory device (1100, Fig.11 ) in the memory array (1101, Fig.11) for performing read operations, programming operations, and erase operations. The refresh mapping memory area 235M can store information including the addresses of the addressed memory blocks and the addresses of the backup blocks for reading and programming, as shown in FIG. FIG. 4A to FIG. 4G Further description.
[0127] The information logged by the refresh map circuit 235C may be volatile. The information stored in the refresh map memory area 235M may be non-volatile. In one embodiment, the refresh map memory area 235M may be stored in the controller (1125, Fig.11 ) can be accessed by a non-volatile memory (1101, Fig.11 ) is implemented in an addressable area in the . In an alternative embodiment, the refresh map memory area of the refresh map table can be implemented off-chip.
[0128] Figure 3A An example flow chart for reading a memory device by a host external to the memory device is shown. At step 311, the host (210, Figure 2A ) can be performed, for example, as in reference Figure 3B The described in-place refresh operation is preceded by issuing a read command sequence with an input block address to retrieve data from the memory device at the input block address. At step 312, the data at the input block address is retrieved from the memory device to the host. At this step, the on-chip or off-chip error correction code (ECC) logic (222, Figure 2A ) can correct error bits as data is captured, and provide an ECC status to the host along with the corrected data. The ECC status may include information such as a count of the number of corrected error bits in the captured data or which bits have been corrected. At step 313, the host checks the ECC status as provided at step 312 for the captured data at the input block address. At step 314, a hardware interrupt may occur on the memory device. For example, a hardware interrupt may be a power interrupt that may interrupt a read operation before completion, in which case the validity of the data in the addressed block may be compromised. Depending on the result of checking the ECC status or whether a hardware interrupt occurs, at step 315, a determination is made as to whether a refresh command sequence for a refresh operation is logged at the input block address in the memory device.
[0129] If it is determined that the refresh command sequence is not registered (step 315, no), the read operation may continue without registering the refresh command sequence (step 318). If it is determined that the refresh command sequence is registered (step 315, yes), then at step 316, the host may continue to register the refresh command sequence with the input block address in the host, including registering the input block address as the refresh block address in the host. At step 317, the host may perform an in-place refresh operation at the input block address in the memory device, as described in reference to FIG. Figure 3B For example, the host (210, Figure 2A ) can log the refresh command sequence and the input block address logged as the refresh block address in the storage subsystem (212, Figure 2A ). By logging in a refresh command sequence, a refresh operation can be delayed until at least the current read operation is completed so as not to affect the current read operation. When there is no ongoing read operation, the host can issue a logged refresh command sequence to the memory device.
[0130] Figure 3B An example flow chart for performing an in-place refresh operation by a host external to and coupled to a memory device including a refresh mapping table is shown. The flow chart includes example commands in a refresh command sequence that the host can issue to the memory device to perform the in-place refresh operation. The memory device includes a memory including a plurality of memory blocks on an integrated circuit or a multi-chip module, and a refresh mapping table in a non-volatile memory on the integrated circuit or the multi-chip module. The refresh mapping table has one or more entries, and the entries in the refresh mapping table map addresses identifying an addressed memory block set for refresh to a backup block address. The addressed memory block can be a risky memory block, such as a reference Figure 1B described.
[0131] like Figure 3B In the example shown in FIG. 3 , at step 321, the host (210, Figure 2A ) starts an in-place refresh operation. At step 322, the host identifies a backup block among a plurality of memory blocks on the integrated circuit or multi-chip module. At step 323, the host may issue a command to the memory device (220, Figure 2A ) to erase the backup block as identified at step 322. At step 324, the host may issue a command with an input address to the memory device to store a backup copy of the data from the addressed memory block at the refresh block address. The command at step 323 to erase the backup block is issued by the host before the command at step 324 to store the backup copy in the backup block.
[0132] At step 325, the host may issue a command with a refresh block address to the memory device to set a mapping entry in the refresh mapping table to map the refresh block address to the address of the backup block. In response to this command, the controller in the memory device may store the mapping entry in the refresh mapping memory area (235M, Figure 2B ) and in the refresh mapping circuit (235C, Figure 2B ) in the refresh mapping table. At step 326, the host may issue a command to the memory device to erase the addressed memory block at the refresh block address. At step 327, the host may issue a command to the memory device to copy the backup copy from the backup block to the addressed memory block at the refresh block address. At step 328, the host may issue a command to the memory device to reset the mapping entry in the refresh mapping table after the refresh operation of the addressed memory block at the refresh block address is completed. In response to this command, the controller in the memory device may update the refresh mapping memory area (235M, Figure 2B ) and refresh mapping circuit (235C, Figure 2B ) to reset the map entry.
[0133] At step 330, the host may issue a command to the memory device to initiate recovery from an interruption, such as recovery from a power loss. The interruption may occur during the erasure of the addressed memory block (step 326) or during the copying of the backup copy from the backup block to the addressed memory block (step 327). Figure 3C Interrupt recovery is further described.
[0134] Figure 3C An example flow chart is shown for a host to perform a recovery procedure after power loss in a memory device including a refresh mapping table. After the memory device is successfully powered on, the host can perform the recovery procedure. Figure 3C In the example of FIG. 3, at step 331, a host in a memory device may start a process for recovering from an interruption such as a power loss after the memory device is powered on. The interruption may occur while erasing an addressed memory block (step 326, Figure 3B ; Step 624, Fig. 6A ) or during the copying of the backup copy from the backup block to the addressed memory block (step 327, Figure 3B ; Step 625, Fig. 6A )period.
[0135] At step 332, the host may issue a command to the memory device to self-refresh the mapping table (235, Figure 2A ) in the refresh mapping circuit (235C, Figure 2B) checks the valid mapping entry status. If there is no valid mapping entry logged in using the refresh mapping circuit, the recovery procedure ends (step 332, no). If there is a valid mapping entry logged in using the refresh mapping circuit (step 332, yes), the recovery procedure can continue to step 333. At step 333, for the copy operation started before the interruption (such as the reference Figure 3B The host may scan the memory (eg, the storage subsystem (212, Figure 2A )). The host writes the metadata in the memory to log the progress of the refresh process. Based on the status of the copy operation, at step 334, it is determined whether the copy operation is recoverable. If (334, yes), then at step 335, for the addressed memory block identified in the set entry, the copy operation can continue and the refresh operation can be completed. At step 336, after the refresh operation of the addressed memory block is completed, the entry in the refresh mapping table is reset.
[0136] If the copy operation is not recoverable (334, No), then at step 337, the host may issue a command to the memory device to erase the addressed memory block, and at step 338, the host may issue a command to the memory device to copy the backup copy from the backup block to the addressed memory block. At step 336, the host may issue a command to the memory device to reset the entry in the refresh mapping table after the refresh operation of the addressed memory block is completed.
[0137] Figure 3D An example flow chart for reading a memory device including a refresh mapping table is shown. At step 341, a controller in the memory device may receive a read command with an input block address. At step 342, the controller determines whether a valid mapping entry is generated by a refresh mapping circuit (235C, Figure 2B ) is registered. If a valid mapping entry is registered (step 342, yes), then at step 344, the controller determines whether the input block address matches the refresh block address in the valid mapping entry. If the input block address matches the refresh block address, then at step 345, the controller may retrieve data from the backup block according to the valid mapping entry corresponding to the input block address. If no valid mapping entry is registered (step 342, no) or if the input block address does not match the refresh block address (step 344, no), then at step 343, the controller may retrieve data from the addressed block at the input block address.
[0138] Figure 3E An example flow chart for a power-on procedure performed by a controller in a memory device is shown. A controller in a memory device (1125, Fig.11) is configured to execute a power-on procedure to restore the mapping of refresh block addresses to backup block addresses after an interruption after the memory device is powered on. At step 351, the power-on procedure begins on the memory device. At step 352, the controller may scan the refresh mapping table for set entries, which are also referred to as valid mapping entries. In one embodiment where the refresh mapping table includes a log format table ( FIG. 4A to FIG. 4G ), the controller may scan the log format table for valid mapping entries. In an alternative embodiment where refreshing the mapping table includes logging a list of backup blocks for a set of backup blocks ( Figure 5A , Figure 5B , Figure 5C , Figure 5D ), can scan and refresh the mapped memory area (235M, Figure 2B ) Find the backup block in use, and then scan whether there is a valid mapping entry in the backup block in use.
[0139] At step 353, the controller may log the set entry in the refresh mapping table. Refresh mapping table (235, Figure 2B ) contains the refresh map memory area (235M, Figure 2B ), and a refresh mapping circuit (235C, which registers the set entry and maps the refresh block address to the backup block. Figure 2B ). Scanning the refresh mapping table includes scanning a refresh mapping memory area in the refresh mapping table to find a set entry. Logging the set entry in the refresh mapping table includes logging the set entry in a refresh mapping circuit in the refresh mapping table.
[0140] After the power-on procedure is executed, the entries that have been set or the valid mapping entries are already in the refresh mapping table (235, Figure 2A ), so the host can directly access the valid mapping entry using the same refresh block address. For example, if the boot code block of the memory device needs to be refreshed and there is a sudden power loss during the refresh period, the next time the memory device is powered on, the power-on procedure is performed and the host can still use the same refresh block address of the boot code block to boot the memory device. Without the technology described herein including the power-on procedure, if the boot code block of the memory device needs to be refreshed and there is a sudden power loss during the refresh period, the memory system cannot be booted the next time the memory device is powered on because there is no correction boot code in the initial boot code block.
[0141] FIG. 4A to FIG. 4GAn embodiment of a refresh map table including a log format table is shown. In this embodiment, the host maintains a list of backup blocks. To set an entry in the refresh map table, the host needs to issue a command sequence with both the address of the backup block and the address of the addressed block. During the power-on period of the memory device, the controller (1125, Fig.11 ) can scan the refresh map memory area (235M, Figure 2B ), and the valid mapping entries are updated in the refresh mapping circuit. After power-on, the valid mapping entries are already in the refresh mapping table (235, Figure 2A ), so the host can directly access the valid mapping entries. In this embodiment, refreshing the mapping table (235, Figure 2A ) in the refresh map memory area (235M, Figure 2B ) includes a log format table. Setting an entry includes writing a valid entry or a valid flag into the log format table. Resetting an entry includes marking an entry as invalid or writing an invalid flag into the log format table. Setting an entry may also include writing the address of the addressing memory block and the address of the backup block into the refresh mapping memory area (235M, Figure 2B ) and update the refresh mapping circuit (235C, Figure 2B ) to, for example, register the address of the addressing memory block and the address of the backup block. The reset entry may also include updating the refresh mapping circuit (235C, Figure 2B ), for example to cancel the address of the registered addressed memory block and the address of the backup block.
[0142] like FIG. 4A to FIG. 4G , the refresh map region may include a first memory region ("Region 1") and a second memory region ("Region 2"). For example, a memory region such as the first memory region or the second memory region may be a block of memory cells in a NAND flash memory, which is a type of non-volatile memory technology that does not require power to retain data. NAND flash memory is erased in blocks of memory cells, so it is not possible to erase one memory cell in a block of memory cells without erasing all of the memory cells in the block.
[0143] like FIG. 4A to FIG. 4G As shown in the example of , only one entry in the refresh map memory area can be set or marked as valid at the same time, as indicated by "S". Alternatively, two or more entries in the refresh map memory area can be set or marked as valid at the same time. Figure 4A As shown in FIG. 5 , five entries 410 are reset or marked as invalid, or have an invalid flag in the first memory area in the refresh map area, as indicated by a “C”. Figure 4BAs shown in FIG. 4 , the new entry 416 is set or marked as valid, or has a valid flag in the first memory area, as indicated by “S.” Setting the new entry 416 may also include writing the address of the addressed memory block and the address of the backup block in the first memory area.
[0144] like Figure 4C As shown in FIG. 1 , the first memory region is full and all entries in the first memory region except the last entry 417 in the first memory region have been reset or marked as invalid, as indicated by “C”. A memory region in which entries can be set is referred to as a valid region. During operation, one of two or more memory regions in the refresh map region is valid, while the other memory regions in the refresh map region are invalid. Figure 4D As shown in FIG. 1 , as indicated by the identifier “E” in the last entry in the first memory area, Figure 4C The full first memory area shown in FIG. 1 is closed.
[0145] like Figure 4E As shown in FIG. 4 , the second memory region has become a valid memory region, and in the second memory region of the refresh mapping table, a new entry 420 is set or marked as valid. Setting the new entry 420 may also include writing the address of the addressed memory block and the address of the backup block into the second memory region. Figure 4F As shown in FIG. 1 , the closed first memory area in the refresh map area is erased, so when the second memory area is full, the closed first memory area can be used as a valid memory area. Figure 4G As shown in FIG. 4 , in the second memory area in the refresh map area, a new entry 430 is set or marked as valid.
[0146] When the second memory region is full (ie, all entries therein have been reset or marked invalid), the second memory region may be closed, the first memory region may become valid, and new entries may be set or marked valid in the first memory region.
[0147] Figure 5A An alternative embodiment of a refresh map table storing a backup block list that records a group of backup blocks (e.g., backup block 0, backup block 1, backup block 2) and the enabled state (e.g., disabled, enabled) of the backup blocks in the group of backup blocks is shown, wherein the entries are stored inside the corresponding backup blocks in the group of backup blocks. In this alternative embodiment, the refresh map memory area (235M, Figure 2B) may include corresponding backup blocks in the set of backup blocks (e.g., backup block 0, backup block 1, backup block 2), wherein entries are stored inside each backup block in use. In this embodiment, each backup block in the set of backup blocks (e.g., backup block 0) has an area for storing data copied from the addressed block and a reserved area for writing the address and valid identification of the addressed block. Figure 5C Describes the initialization of the backup block list stored in the refresh map. Setting the entry may include writing the address and valid flag of the addressed block to an available block in the set of backup blocks, as described in reference to Figure 5D The reset entry may include erasing the backup block, as described in Figure 5D Further description. Resetting the entry may include erasing at least a valid flag or writing an invalid flag in the block, as shown in FIG. Figure 7B Further description.
[0148] The available blocks in the group of backup blocks (e.g., backup block 0, backup block 1, backup block 2) refer to blocks that can be used to store backup copies of data from the addressed memory block. Available blocks can also be referred to as blocks in use. For example, the available backup block in the group of backup blocks may be the last backup block in the group of backup blocks (e.g., backup block 2). When an entry is set in an available block in the group of backup blocks, a valid identifier and an address of an addressed block may be written into the available block. When an entry is reset in a block in the group of backup blocks, a valid identifier in the block may be erased or an invalid identifier may be written into the block. The backup block list includes a plurality of slots, and each of the plurality of slots contains information of a backup block. The slots in the backup block list of the cancelled block are in Figure 5A The slot in the backup block list for the available block is in Figure 5A Unused slots are indicated as "empty" in the backup block list.
[0149] Figure 5B Shown for by including such Figure 5A 1. The power-on procedure is performed by a controller in a memory device of an alternative embodiment of the refresh mapping table shown in FIG. 1. At step 551, the power-on procedure begins on the memory device. At step 552, the controller (1125, Fig.11 ) can scan and refresh the mapping table (235, Figure 2A ) in the refresh map memory area (235M, Figure 2B) to find the backup blocks in use (also called available backup blocks). At step 553, the controller may scan the backup blocks in use for valid mapping entries (also called set mapping entries). At step 554, the controller may update the refresh mapping circuit (235C, Figure 2B ). Subsequently, the data stored in the backup block in use can be retrieved and copied to the addressed memory block according to the valid mapping entry.
[0150] The available backup block may be used multiple times until it is worn out, and then another backup block in the set of backup blocks may be used as the available backup block.
[0151] Figure 5C 1 shows the initialization of a backup block list for a group of backup blocks, wherein the backup block list is stored in a refresh map table and includes the enabled status of the backup blocks in the group. Figure 2B ) includes the set of backup blocks registered by the backup block list, as referenced Figure 5A To initialize the backup block list, the host issues a command sequence with the address 501A of the backup block (backup block 0) to the memory device to register the backup block in the refresh map memory area. Registering the backup block may include writing the address 501A of the backup block (backup block 0) in the backup block list and updating the refresh map circuit (235C, Figure 2B ). The activation flag 501F may also be written into the backup block list in the refresh mapping table.
[0152] Figure 5D 1 shows the data configuration in the backup block in the first embodiment. In this embodiment, the backup block 520 in the set of backup blocks has a data area 521 for storing data copied from the addressed block and a reserved area 522 for writing an address 523 and a valid flag 524 of the addressed block. In order to set an entry in the refresh mapping table, the host issues a command sequence with the address of the addressed block. During the power-on period of the memory device, the controller (1125, Fig.11 ) can be used to retrieve and refresh the mapped memory area (235M, Figure 2B ), checking the enable identification information (valid or invalid) in the backup block in use for the valid mapping entry, and updating the refresh mapping circuit (235C, Figure 2B After power on, the valid mapping entries are already in the refresh mapping table (235, Figure 2A), so the host can directly access the valid mapping entry. In this embodiment, setting the entry may include writing the address of the addressed block and the valid flag into a reserved area in the available backup block in the set of backup blocks. Resetting the entry may include erasing the backup block, including erasing the reserved area to a blank pattern. Erasing the backup block can be performed when the host issues a block erase command to the memory device, so a specific reset command sequence for resetting the entry is not required. Resetting the entry may include updating the refresh mapping circuit (235C, Figure 2B ), for example to unregister the address of an addressed memory block that was logged during a set entry operation.
[0153] Fig. 6A The operation shown includes Figure 5A An example flow chart of a memory device of an alternative embodiment of a refresh mapping table in FIG. Figure 5A As described, in this alternative embodiment of the refresh mapping table, the backup block list records a group of backup blocks and the enabled status of the backup blocks in the group of backup blocks. Figure 2B ) includes the set of backup blocks, wherein entries are stored inside corresponding backup blocks in the set of backup blocks. Setting entries may include writing an address of an addressed block and a valid flag in an available block in the set of backup blocks. Resetting entries may include erasing a valid flag in a block. Resetting entries may include erasing a backup block.
[0154] like Fig. 6A In the example shown in FIG. 6 , at step 621, the host (210, Figure 2A ) starts an in-place refresh operation. At step 622, the host may issue a command with a refresh block address to the memory device (220, Figure 2A ) to store a backup copy of the data from the addressed memory block at the refresh block address to a backup block in the set of backup blocks, such as an available backup block ("backup block 2", Figure 5A ). The addressed memory block may be a risky memory block, as shown in FIG. Figure 1B described.
[0155] At step 623, the host may issue a command to the memory device to set the mapping entry in the refresh mapping table. In response to this command, the controller may write a valid flag in the in-use block and write the address of the addressed memory block in the in-use block.
[0156] The addressed memory block at the refresh block address may be refreshed using data from the available backup block at steps 624 and 625. At step 624, the host may issue a command to the memory device to erase the addressed memory block at the refresh block address. At step 625, the host may issue a command to the memory device to copy a backup copy from the backup block to the addressed memory block at the refresh block address.
[0157] At step 626, the host may issue a block erase command to the memory device to erase the refresh mapping memory area (235M, Figure 2B ), thereby resetting and refreshing the mapping entries in the mapping memory area. In response to the command, the controller can erase the backup block containing the valid identifier.
[0158] When the backup block is erased (step 626), or after failing to store a backup copy of the data from the addressed memory block to the backup block (step 622), or after failing to set the mapping entry in the refresh mapping table (step 623), at step 627, the host may issue a command to the memory device to deregister the old backup block and register the new backup block. The failure at step 622 or step 623 may be caused by the old backup block being worn out. FIG. 6B to FIG. 6C Step 627 is further described.
[0159] Step 628 refers to interrupt recovery, such as recovery from a power loss, where the interruption may occur during erasing of the addressed memory block (step 624) or during copying of a backup copy of data from a backup block to the addressed memory block (step 625). After the memory device is powered on, a controller in the memory device may scan for backup blocks in use in the list of backup blocks and for valid mapping entries in a reserved area of valid mapping entries. The valid mapping entries may be stored in a refresh mapping circuit (235C, Figure 2B ), so it is ready to use the block mapping operation as shown in reference Figure 3D The refresh map described is used.
[0160] FIG. 6B to FIG. 6C It is shown that the refresh map (235, Figure 2A ) in the backup block list and register the new backup block. Figure 6B The result of canceling the old backup block (backup block 0) with the backup block address 541A is shown. The host may issue a command to the memory device to cancel the old backup block, for example, when the old backup block is worn out. Cancelling the old backup block may include writing the deactivation flag 541F of the old backup block (backup block 0) in the backup block list and updating the refresh mapping circuit (235C, Figure 2B) to disable the old backup blocks.
[0161] Figure 6C The result of registering a new backup block is shown. The host may issue a command to the memory device to register a new backup block at the same time as the old backup block is cancelled. Registering the new backup block (backup block 1) may include writing the address 542A and the enable flag 542F of the backup block to the backup block list, and updating the refresh mapping circuit (235C, Figure 2B ) to enable the new backup block. The enable flag can also be written to the refresh map memory area (235M, Figure 2B ) in the new backup block. Figure 6B and Figure 6C Together, it is shown that the old backup block (Backup Block 0) is replaced by the new backup block (Backup Block 1).
[0162] Fig. 7A The operation shown includes Figure 5A An alternative flow chart of a memory device of an alternative embodiment of a refresh mapping table in FIG. Figure 5A As described, in this alternative embodiment of the refresh map table, the backup block list records a group of backup blocks and the enabled status of the backup blocks in the group of backup blocks. Figure 2B ) includes the set of backup blocks, wherein the entry is stored inside the corresponding backup block in the set of backup blocks. Setting the entry may include writing the address of the addressed block and the valid flag into the available block in the set of backup blocks. Resetting the entry may include erasing the valid flag in the block or writing the invalid flag into the block.
[0163] like Fig. 7A In the example shown in FIG. 7 , at step 751, the host (210, Figure 2A ) starts an in-place refresh operation. At step 752, the host may issue a block erase command to the memory device to erase the refresh mapped memory area (235M, Figure 2B ) in the backup block. In response to the command, the controller may erase the backup block. At step 753, the host may issue a command with a refresh block address to the memory device (220, Figure 2A ) to store a backup copy of the data from the addressed memory block at the refresh block address to a backup block in the set of backup blocks, such as an available backup block ("backup block 2", Figure 5A ).
[0164] At step 754, the host may issue a command to the memory device to set the mapping entry in the refresh mapping table. In response to this command, the controller may write a valid flag in the backup block in use and write the address of the addressed memory block in the backup block in use.
[0165] The addressed memory block at the refresh block address may be refreshed using data from the available backup block at steps 755 and 756. At step 755, the host may issue a command to the memory device to erase the addressed memory block at the refresh block address. At step 756, the host may issue a command to the memory device to copy a backup copy from the backup block to the addressed memory block at the refresh block address.
[0166] At step 757, a controller in the memory device may reset the entry of the addressed memory block, as described in reference to Figure 7B Further description.
[0167] Upon failure of entry reset (step 757), or after failure to erase the backup block (step 752), or after failure to store a backup copy of data from the addressed memory block to the backup block (step 753), or after failure to set the mapping entry in the refresh mapping table (step 754), at step 758, the host may issue a command to the memory device to deregister the old backup block and register the new backup block. The failure at step 752, step 753, or step 754 may be caused by the old backup block being worn out. 7B to 9C Step 758 is further described.
[0168] Step 759 refers to interrupt recovery, such as recovery from power loss, where the interruption may occur during erasing of the addressed memory block (step 755) or during copying of a backup copy of data from the backup block to the addressed memory block (step 756). After the memory device is powered on, a controller in the memory device may scan for backup blocks in use in the backup block list and for valid mapping entries in the reserved area for valid mapping entries. The valid mapping entries may be stored in the refresh mapping circuit (235C, Figure 2B ), so it is ready to use the block mapping operation as shown in reference Figure 3D The refresh map described is used.
[0169] Figure 7B 2 shows the data configuration in the backup block in the second embodiment. In this embodiment, the backup block 530 in the backup block group has a data area 531 for storing data copied from the address block and a reserved area 532 for writing the address 533, the valid flag 524 and the invalid flag 534 of the address block. Figure 5D The description of the first embodiment regarding data configuration in the backup block is generally applicable to this embodiment, including the description regarding setting entries in the refresh mapping table.
[0170] This second embodiment of data configuration in the backup block is similar to the reference Figure 5DOne difference between the first embodiment described is resetting the entries in the refresh mapping table. In this embodiment, resetting the entries may include erasing the valid flag 524 or writing the invalid flag 534 to the reserved area 532 in the backup block 530, and updating the refresh mapping circuit (235C, Figure 2B ) to cancel the address of the addressed memory block registered during the operation of setting the entry.
[0171] Fig. 8A , Figure 8B as well as Figure 8C A first embodiment of a backup block list is shown, wherein the backup block list can simultaneously register multiple (greater than one) valid backup blocks. FIG. 8A to FIG. 8C It is shown that the refresh map table (235, Figure 2A ) in the backup block list 800, cancel the old backup block and register the new backup block. Fig. 8A The backup block list initially has a plurality of valid backup blocks (backup block 0, backup block 1, backup block 2). The backup block "backup block 1" is registered with the backup block address 841 and the activation flag 842. Figure 8B 8 shows the result of canceling the backup block (backup block 1) by setting the deactivation flag 843. The host may issue a command to the memory device to cancel the old backup block, for example, when the old backup block is worn out. Cancelling the old backup block may include writing the deactivation flag 843 of the old backup block (backup block 1) into the backup block list and updating the refresh mapping circuit (235C, Figure 2B ) to disable the old backup blocks.
[0172] Figure 8C The result of registering a new backup block is shown. The host may issue a command to the memory device to register a new backup block, for example, when the old backup block is cancelled. Registering the new backup block (backup block 3) may include writing the address 851 and the enable flag 852 of the backup block to the backup block list, and updating the refresh mapping circuit (235C, Figure 2B ) to enable the new backup block. The enable flag can also be written to the refresh map memory area (235M, Figure 2B ) in the new backup block.
[0173] Fig. 9A , Fig. 9B as well as Fig. 9CA second embodiment of a backup block list is shown, in which the backup block list can only register single-in-use backup blocks at the same time. In this embodiment, when a single backup block is registered to become a new single-in-use backup block, the old single-in-use backup block is automatically deregistered. In this embodiment, the last backup block in the backup block list 900 is a single-in-use backup block. The host can issue a command to the memory device to register a new backup block when the memory device only supports single-in-use backup blocks at the same time. Fig. 9A The backup block list 900 is shown initially having a single backup block in use (backup block 0).
[0174] Fig. 9B The result of registering a new backup block (backup block 1) is shown. Registering a new backup block may include writing the address of the new backup block to the backup block list 900, and updating the refresh mapping circuit to enable the new backup block. An enable flag may also be written for the new backup block in the backup block list. In this example, the new backup block (backup block 1) will become the new single-use backup block, and the old single-use backup block (backup block 0) is automatically deregistered (disabled) without the need for a specific deregistration operation to deregister the old single-use backup block (backup block 0).
[0175] Fig. 9C A backup block list for operation including only logging in a single backup block in use at the same time (as shown in reference Fig. 9A and Fig. 9B An example flow chart of a memory device of a second embodiment of the invention is shown in FIG. Fig. 9C Similar to Fig. 6A , among which Fig. 6A The description of steps 621 to 626 and step 628 in FIG. 621 is applicable to Fig. 9C One difference is that in Fig. 9C In step 927, the host can issue a command to the memory device to register the new backup block without issuing a specific deregistration operation to deregister the old single-use backup block. Fig. 6A In step 627, the host may issue a command to the memory device to deregister the old in-use backup blocks and register the new in-use backup blocks.
[0176] Fig. 10A and Fig. 10B A third embodiment of the backup block list is shown, wherein the refresh mapping table (235, Figure 2A ) can only log in the backup blocks in use (backup block 0, backup block 1, backup block 2, Fig. 10A ) without logging into any disabled backup blocks.
[0177] Fig. 10B The host can issue a command to the memory device to erase the backup block list so as to cancel the backup blocks in use registered in the backup block list. Fig. 10A As shown in FIG. 1 , multiple backup blocks are simultaneously registered in the backup block list, such as for Fig. 10A Each of the multiple valid backup blocks shown in FIG. 1 is indicated by “empty”.
[0178] Fig.11 1 is a simplified block diagram of a memory device including a memory array and a controller for performing refresh operations as described herein. The memory array 1101 may include a plurality of memory blocks on an integrated circuit or a multi-chip module. The controller is coupled to the memory array to execute a command having an address to access an addressed memory block of the plurality of memory blocks. The memory device includes a refresh mapping table 1128 accessible by the controller 1125. The refresh mapping table has one or more entries, and the entries in the refresh mapping table map addresses identifying the addressed memory blocks set for refresh to backup block addresses. The addressed memory blocks may be at-risk memory blocks, such as those described in reference 1125. Figure 1B described.
[0179] In this example, memory device 1100 includes a flash memory including a first portion characterized as a normal array 1101 and a second portion characterized as an ECC array 1102. Normal array 1101 stores data blocks, while ECC array 1102 stores ECCs for corresponding data blocks in normal array 1101. During programming, ECCs are calculated and stored with data blocks so that the ECCs accurately reflect the contents of the corresponding data blocks.
[0180] A set of memory array sense amplifiers (memory array SA) 1103 are operatively coupled to the memory array 1101 via line 1122, and a set of ECC sense amplifiers (ECC SA) 1104 are operatively coupled to the ECC array 1102 via line 1122. In this example, the page buffer 1120 is operatively coupled to the memory array, i.e., data is moved through the page buffer and utilized during sensing and programming of data into the memory array 1101 and the ECC array 1102. Likewise, the ECC sense amplifier 1104 is operatively coupled to the memory array 1101 and the ECC array 1102, i.e., it is used to sense data stored in the array. In addition, a word line driver 1121 is associated with the memory array 1101 and the ECC array 1102. The configuration of the sense amplifiers and page buffers shown is similar to that in some NAND architecture devices. The configuration is different in different embodiments, including embodiments configured for use in NOR architecture devices and for other memory technologies.
[0181] Integrated circuit 1100 includes an address counter 1112 or other address logic for providing the address on line 1110 to word line driver 1121, to page buffer 1120 or other type of row decoder, and to output data multiplexer 1107. Address counter 1112 may be controlled by on-chip controller 1125. In addition, address counter 1112 may be used by output data multiplexer 1107 to control data blocks to an external host (210, Figure 2A ) output.
[0182] The memory device also includes circuits for providing the necessary bias voltages for programming, erasing, and reading in the case of flash memory or for setting, resetting, and reading in the case of other types of non-volatile memory. The circuits for providing the bias voltages may include charge pumps, voltage dividers, current sources, voltage regulators, and other circuit elements suitable for implementation on an integrated circuit.
[0183] The memory array sense amplifier 1103 and the ECC sense amplifier 1104 are configured to provide a block of data (which may be, for example, 128 bits) and a corresponding ECC (which may be, for example, 11 bits) to the ECC logic 1105. In addition, the memory array sense amplifier 1103, which is coupled to the memory array, is configured to provide its output data to the correction multiplexer 1106, which may be in the form of a cache, for example. The ECC logic 1105 generates an output that identifies the location of an error bit in the corresponding block and provides the location to the correction multiplexer 1106, where the error bit is corrected. The output of the correction multiplexer 1106 is a block of corrected data applied to the output data multiplexer 1107, where the block may be provided to the input / output interface 1110 as a sequence of, for example, 11-bit words. The input / output interface 1110 may provide data to an external host using a bus protocol specified for a particular embodiment.
[0184] The input / output interface 1110 may also receive data from an external host for writing into the memory array. Thus, in the block diagram, a data path 1109 is shown from the data multiplexer 1107 to the memory array sense amplifier 1103, the ECC sense amplifier 1104, and the page buffer 1120. During a write operation, the page buffer 1120 may be loaded with a data pattern including a block of data and a corresponding ECC, which may be programmed and verified according to a program appropriate for the type of memory technology. In some embodiments, the page buffer may store one block and one corresponding ECC. In other embodiments, the page buffer may store more than one block and more than one corresponding ECC. The size of the page buffer 1120 may be designed to be appropriate for a particular implementation of the technology, taking into account the type of ECC logic utilized along with other features of the memory device.
[0185] In this example, the input / output interface 1130 is also coupled to the command logic 1126, where commands from an external host can be decoded and applied to the controller 1125 on the integrated circuit. Here, the commands from the external host can include a refresh command sequence as described herein. The command logic 1126 can generate internal control signals applied to the controller 1125.
[0186] According to embodiments of the techniques described herein, the controller 1125 may respond to a sequence of refresh commands with a refresh block address to perform a refresh operation. The refresh operation may include storing a backup copy of data from an addressed memory block with the refresh block address to a backup block, setting an entry in a refresh mapping table to map the refresh block address to the backup block, refreshing the addressed memory block with the refresh block address using data from the backup block, and resetting the entry after the refresh operation of the addressed memory block is completed.
[0187] The controller 1125 may be configured to: execute a self-interrupt recovery procedure to scan the refresh map for set entries, complete a refresh operation for the addressed memory block identified in the set entry, and reset the set entry after the refresh operation is completed.
[0188] The controller 1125 may include one or more state machines or other logic structures by which control signals are generated and applied to components of the memory for the purpose of executing embedded operating procedures, including a write procedure and a read procedure. For flash memory, the write procedure may include a programming procedure and an erase procedure.
[0189] The controller 1125 may be implemented using dedicated logic circuits, programmable logic circuits, general purpose processors with control code stored on an integrated circuit that is executed to implement the controller 1125, and combinations of these elements. One or more state machines in the controller 1125 may be configured to execute embedded operating procedures by applying appropriate timing and control signals to the various circuit components of the device.
[0190] In one example, the memory includes flash memory, such as high-density NAND flash memory. Other types of memory technologies may also be utilized, including phase change memory (PCM), programmable resistive memory known as ReRAM or RRAM, NOR flash memory, magnetoresistive memory, etc. In addition, other types of memory technologies may be utilized, including volatile memory, such as DRAM or SRAM.
[0191] Described herein are multiple flow charts showing logic executed by a memory controller or by a memory device. The logic can be implemented by a processor programmed with a computer program stored in a computer system accessible memory, and can be executed by a processor, dedicated logic hardware (including a field programmable gate array FPGA), and a combination of dedicated logic hardware and computer programs. As with all flow charts herein, it should be understood that many steps can be combined, executed in parallel, or executed in different sequences without affecting the functions achieved. In some cases, as the reader will understand, the reconfiguration steps will achieve the same results as long as certain other changes are also made. In other cases, as the reader will understand, the reconfiguration steps will achieve the same results as long as certain conditions are met. In addition, it will be understood that the flow charts herein only illustrate steps related to understanding the present invention, and it will be understood that many additional steps for implementing other functions can be performed before, after, and between the illustrated steps.
[0192] Although the present invention is disclosed with reference to the preferred embodiments and examples described in detail above, it should be understood that these examples are intended to be illustrative rather than restrictive. It is expected that various modifications and combinations will be easily conceived by those skilled in the art, and the modifications and combinations will be within the spirit of the present invention and the scope of the following application claims.
[0193] The specific embodiments described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for operating a memory device, It is characterized in that The memory device comprises: a memory including a plurality of memory blocks on an integrated circuit; a refresh mapping table located in a non-volatile memory on the integrated circuit, having one or more entries, wherein the entries in the refresh mapping table map refresh block addresses to backup block addresses; and a controller located on the integrated circuit, coupled to the memory to execute a command having an address to access an addressed memory block among the plurality of memory blocks, The method comprises performing, by the controller of the memory device, the following operations: A procedure for restoring the mapping of the refresh block address to the backup block address after the memory device is powered on is performed by: scanning the refresh mapping table for set entries that map the refresh block address to the backup block address, and The setting entry is registered in the refresh map.
2. The method for operating a memory device according to claim 1, It is characterized in that The refresh mapping table includes a refresh mapping memory area storing the one or more entries and a refresh mapping circuit, and the method includes: scanning the refresh map memory area in the refresh map table for the set entries; and The setting entry for mapping the refresh block address to the backup block is registered in the refresh mapping circuit in the refresh mapping table.
3. The method for operating a memory device according to claim 1, It is characterized in that The controller responds to a refresh command sequence having a refresh block address to perform a refresh operation, the refresh operation comprising: storing a backup copy of data from the addressed memory block having the refresh block address to a backup block, setting an entry in the refresh mapping table to map the refresh block address to the backup block, refreshing the addressed memory block having the refresh block address using data from the backup block, and resetting the entry after the refresh operation of the addressed memory block is completed.
4. The method for operating a memory device according to claim 3, It is characterized in that In the refresh operation, refreshing the addressed memory block includes erasing the addressed memory block and subsequently copying the backup copy from the backup block to the addressed memory block.
5. The method for operating a memory device according to claim 3, It is characterized in that The refresh operation includes erasing the backup block before storing the backup copy in the backup block.
6. The method for operating a memory device according to claim 1, It is characterized in that The refresh map table includes a refresh map memory area storing the one or more entries, and a refresh map circuit registering the set entry mapping the refresh block address to the backup block.
7. The method for operating a memory device according to claim 1, It is characterized in that The refresh map includes a log format table, wherein setting the entry includes writing a valid entry in the log format table, and resetting the entry includes marking the entry as invalid.
8. The method for operating a memory device according to claim 1, It is characterized in that The refresh mapping table includes a backup block list that records a group of backup blocks, wherein the entries are stored inside corresponding backup blocks in the group of backup blocks, wherein setting the entries includes writing a valid flag in an available block in the group of backup blocks, and resetting the entries includes erasing at least the valid flag in the block or writing an invalid flag.
