# Patent

## Title
Database of memory read thresholds

## Abstract

A method for data storage includes storing multiple sets each including one or more read thresholds for use in reading data from a plurality of analog memory cells. The memory cells are arranged in multiple erasure blocks each including multiple pages, and each set of read thresholds is associated with a respective page in one of the erasure blocks. A first page, which belongs to a given erasure block and is not associated with any of the stored sets of read thresholds, is read by retrieving a stored set of read thresholds that is associated with a second page in the given erasure block, adapting the retrieved set of read thresholds to match the first page, and reading the first page using the adapted set of read thresholds.

## Background
CROSS-REFERENCE TO RELATED APPLICATIONS
This application claims the benefit of U.S. Provisional Patent Application 61/163,138, filed Mar. 25, 2009, whose disclosure is incorporated herein by reference. This application also claims the benefit of U.S. Provisional Patent Application 61/234,695, filed Aug. 18, 2009.


FIELD OF THE INVENTION
The present invention relates generally to memory devices, and particularly to storing and using memory readout parameters.
BACKGROUND OF THE INVENTION
Several types of memory devices, such as Flash memories, use arrays of analog memory cells for storing data. Each analog memory cell stores a quantity of an analog value, also referred to as a storage value, such as an electrical charge or voltage. This analog value represents the information stored in the cell. In Flash memories, for example, each analog memory cell holds a certain amount of electrical charge. The range of possible analog values is typically divided into intervals, each interval corresponding to one or more data bit values. Data is written to an analog memory cell by writing a nominal analog value that corresponds to the desired bit or bits.
Some memory devices, commonly referred to as Single-Level Cell (SLC) devices, store a single bit of information in each memory cell, i.e., each memory cell can be programmed to assume two possible programming levels. Higher-density devices, often referred to as Multi-Level Cell (MLC) devices, store two or more bits per memory cell, i.e., can be programmed to assume more than two possible programming levels.
Flash memory devices are described, for example, by Bez et al., in “Introduction to Flash Memory,” Proceedings of the IEEE, volume 91, number 4, April, 2003, pages 489-502, which is incorporated herein by reference. Multi-level Flash cells and devices are described, for example, by Eitan et al., in “Multilevel Flash Cells and their Trade-Offs,” Proceedings of the 1996 IEEE International Electron Devices Meeting (IEDM), New York, N.Y., pages 169-172, which is incorporated herein by reference. The paper compares several kinds of multilevel Flash cells, such as common ground, DINOR, AND, NOR and NAND cells.
Eitan et al., describe another type of analog memory cell called Nitride Read Only Memory (NROM) in “Can NROM, a 2-bit, Trapping Storage NVM Cell, Give a Real Challenge to Floating Gate Cells?” Proceedings of the 1999 International Conference on Solid State Devices and Materials (SSDM), Tokyo, Japan, Sep. 21-24, 1999, pages 522-524, which is incorporated herein by reference. NROM cells are also described by Maayan et al., in “A 512 Mb NROM Flash Data Storage Memory with 8 MB/s Data Rate”, Proceedings of the 2002 IEEE International Solid-State Circuits Conference (ISSCC 2002), San Francisco, Calif., Feb. 3-7, 2002, pages 100-101, which is incorporated herein by reference. Other exemplary types of analog memory cells are Floating Gate (FG) cells, Ferroelectric RAM (FRAM) cells, magnetic RAM (MRAM) cells, Charge Trap Flash (CTF) and phase change RAM (PRAM, also referred to as Phase Change Memory—PCM) cells. FRAM, MRAM and PRAM cells are described, for example, by Kim and Koh in “Future Memory Technology including Emerging New Memories,” Proceedings of the 24th International Conference on Microelectronics (MIEL), Nis, Serbia and Montenegro, May 16-19, 2004, volume 1, pages 377-384, which is incorporated herein by reference.
Data readout from analog memory cells typically involves comparing the cells' storage values to certain read thresholds. Several methods for managing read thresholds are known in the art. For example, U.S. Patent Application Publication 2007/0091677, whose disclosure is incorporated herein by reference, describes techniques for reading data from Flash memory cells and for recovering from read errors. In some embodiments, in the event of an error correction failure by an error detection and correction module, the Flash memory cells are re-read at least once using one or more modified reference voltages, for example, until a successful error correction may be carried out. In some embodiments, reference voltages associated with a reading where errors are corrected may be stored in memory, and retrieved when responding to a subsequent read request.
PCT International Publication WO 2009/072102, whose disclosure is incorporated herein by reference, describes a method for reading at least one page within an erase sector of a Flash memory device. The method computes at least one mock reading threshold. The mock reading threshold is used to perform at least one mock read operation of at least a portion of at least one page within the erase sector, thereby generating a plurality of logical values. A set of reading thresholds based at least partly on the plurality of logical values is defined, and at least one page is read using the set of reading thresholds.
SUMMARY OF THE INVENTION
An embodiment of the present invention provides a method for data storage, including:
storing multiple sets each including one or more read thresholds for use in reading data from a plurality of analog memory cells, which are arranged in multiple erasure blocks each including multiple pages, such that each set of read thresholds is associated with a respective page in one of the erasure blocks; and
reading a first page, which belongs to a given erasure block and is not associated with any of the stored sets of read thresholds, by:
retrieving a stored set of read thresholds that is associated with a second page in the given erasure block;
adapting the retrieved set of read thresholds to match the first page; and
reading the first page using the adapted set of read thresholds.
In some embodiments, the first page is located in a first row of the given erasure block, the second page is located in a second row of the given erasure block, different from the first row, and adapting the retrieved set of read thresholds includes adjusting at least one of the read thresholds in the retrieved set as a function of the first and second rows. In another embodiment, each of the analog memory cells stores two or more respective bits, the first page is stored in respective first bits of a given group of the analog memory cells, the second page is stored in respective second bits of the given group, and adapting the retrieved set of read thresholds includes setting the read thresholds for reading the first page as a function of at least one of the read thresholds in the retrieved set.
In a disclosed embodiment, storing the sets includes selecting an erasure block irrespective of accepting any read command from a host, performing a read operation that reads at least a given page from the selected erasure block, and storing a set of read thresholds that was successful in reading the given page. Automatically selecting the erasure block may include running a background task that periodically selects the erasure block.
In an embodiment, the method includes storing at least one read parameter pertaining to the given erasure block, and adapting the retrieved set of read thresholds includes retrieving the read parameter and adjusting at least one of the read thresholds in the retrieved set based on the retrieved read parameter. In some embodiments, the at least one read parameter includes a number of programming and erasure cycles applied to the given erasure block, a time that elapsed since a last programming operation applied to the given erasure block, a time-temperature integral estimated for the given erasure block, and/or an index of a last page written to the given erasure block. In some embodiments, the at least one read parameter includes a first temperature of the analog memory cells at a first time at which the given erasure block was programmed, and adjusting the read thresholds includes modifying the read thresholds based on a difference between the first temperature and a second temperature of the analog memory cells at a second time at which the given erasure block is read.
In some embodiments, the method includes updating the stored sets with the adapted set of read thresholds upon successfully reading the first page. In an embodiment, storing the sets includes storing no more than a single respective set of read thresholds for each erasure block. In another embodiment, reading the first page includes accepting a read command from a host system, reading the first page in response to the read command, and sending the read first page to the host system. In yet another embodiment, storing the sets includes storing the sets in a memory of the host system. In still another embodiment, the multiple sets are drawn from a predefined list of sets, and storing the sets includes storing respective indices of the sets in the list.
In a disclosed embodiment, the multiple sets are stored in a volatile memory, the analog memory cells include non-volatile memory cells, and the method includes copying the multiple sets to the analog memory cells in response to an imminent disruption of electrical power, and recovering the multiple sets from the analog memory cells to the volatile memory following reapplication of the electrical power.
In some embodiments, storing the multiple sets includes storing an indication of a successful readout scheme that previously succeeded in reading at least one page of the given erasure block, and reading the first page includes retrieving the indication and reading the first page using the respective successful readout scheme. The successful readout scheme may specify an Error Correction Code (ECC) decoding scheme that succeeded in decoding the at least one page, a number of re-read operations that succeeded in reading the at least one page, and/or a notification of whether interference cancellation was used in order to successfully read the at least one page.
In an embodiment, the indication is indicative of a number of errors that were encountered in the given erasure block. In a disclosed embodiment, reading the first page includes selecting a readout scheme for reading the first page responsively to the stored set of read thresholds. In another embodiment, the method includes assessing a quality of the given erasure block based on the stored set that is associated with the given erasure block. In an alternative embodiment, the method includes storing a quality of the given erasure block in the stored set that is associated with the given erasure block.
There is additionally provided, in accordance with an embodiment of the present invention, apparatus for data storage, including:
a threshold memory; and
a processor, which is configured to store in the threshold memory multiple sets each including one or more read thresholds for use in reading data from a plurality of analog memory cells, which are arranged in multiple erasure blocks each including multiple pages, such that each set of read thresholds is associated with a respective page in one of the erasure blocks, to read a first page, which belongs to a given erasure block and is not associated with any of the sets of read thresholds stored in the threshold memory, by retrieving from the threshold memory a stored set of read thresholds that is associated with a second page in the given erasure block, adapting the retrieved set of read thresholds to match the first page, and reading the first page using the adapted set of read thresholds.
There is also provided, in accordance with an embodiment of the present invention, apparatus for data storage, including:
a non-volatile memory, which includes a plurality of analog memory cells that are arranged in multiple erasure blocks each including multiple pages;
a threshold memory; and
a processor, which is configured to store multiple sets each including one or more read thresholds for use in reading data from the analog memory cells, such that each set of read thresholds is associated with a respective page in one of the erasure blocks, to read a first page, which belongs to a given erasure block and is not associated with any of the sets of read thresholds stored in the threshold memory, by retrieving from the threshold memory a stored set of read thresholds that is associated with a second page in the given erasure block, adapting the retrieved set of read thresholds to match the first page, and reading the first page using the adapted set of read thresholds.
The present invention will be more fully understood from the following detailed description of the embodiments thereof, taken together with the drawings in which:



BRIEF DESCRIPTION OF THE DRAWINGS
FIG. 1 is a block diagram that schematically illustrates a data storage system, in accordance with an embodiment of the present invention;
FIG. 2 is a graph showing threshold voltage distributions and associated read thresholds in a group of analog memory cells, in accordance with an embodiment of the present invention;
FIG. 3 is a diagram showing a read threshold database, in accordance with an embodiment of the present invention; and
FIG. 4 is a flow chart that schematically illustrates a method for managing and using read thresholds, in accordance with an embodiment of the present invention.



DETAILED DESCRIPTION OF EMBODIMENTS
Overview
Analog memory cells are typically read by comparing the memory cells' analog values (e.g., threshold voltages) to one or more read thresholds. In most cases, a readout operation of this sort is applied to an entire memory page, i.e., a data unit that is stored in a given group of memory cells and is read and written simultaneously. The read thresholds are usually positioned between adjacent analog value regions that correspond to different programming states, so as to achieve low error probability. In many practical cases, however, the distribution of analog values varies from one page to another. As a result, the optimal read threshold values often differ from page to page.
Embodiments of the present invention provide improved methods and systems for managing and using read thresholds. In some embodiments, a memory controller stores data in a memory comprising multiple analog memory cells. The analog memory cells are arranged in erasure blocks, each erasure block comprising multiple pages. The memory controller maintains a read threshold database, which holds multiple sets of read thresholds. Each set of read thresholds is associated with a respective page in one of the erasure blocks. Typically, each set of read thresholds is stored in the database after having proven successful in reading the respective page.
When intending to read a certain page, the memory controller attempts to find a set of read thresholds that is associated with that page in the database. If a matching set of read thresholds is found, the memory controller reads the page using this set. Otherwise, the memory controller retrieves from the database a set of read thresholds that is associated with another page in the same erasure block. The memory controller adapts the retrieved set of read thresholds so as to match the page to be read, and then reads the page using the adapted set of read thresholds. In many cases, the retrieved set of read thresholds will perform well as-is in reading the page in question, even though the thresholds originated from another page. In other cases, some additional adaptation will still be needed to achieve successful readout. In either case, initiating the readout process with read thresholds that performed well in another page of the same block provides considerable reduction in the overall readout time, since it reduces the trial-and-error that might otherwise be required in order to find the correct read thresholds to use for each page.
Several methods for adjusting read thresholds that are associated with one page to match another page are described herein. For example, the variation of read thresholds between different rows in the erasure block may be known. Some of the disclosed methods use this information to determine the appropriate adjustment. In some Multi-Level Cell (MLC) memory devices, a group of memory cells stores two or more pages. Some disclosed methods adjust the read thresholds of a given page based on the read thresholds of a different page stored in the same group of memory cells. Additionally or alternatively, the memory controller may adjust the read thresholds based on the estimated endurance and/or retention period of the page to be read. In some embodiments, the memory controller continually refreshes and enriches the read threshold database, such as by running a background task that performs page read operations and updates the database with the successful read thresholds.
The methods and systems described herein estimate the read thresholds for a given page based on other read thresholds that performed well on another page in the same erasure block. This feature provides a kind of data compression, in that it enables the memory controller to compute read thresholds for any desired page in a given erasure block while physically storing read thresholds for only a small number of pages in the block. As a result, the memory controller can perform read operations with high speed and reliability using only modest-size data structures.
System Description
FIG. 1 is a block diagram that schematically illustrates a data storage system 20, in accordance with an embodiment of the present invention. System 20 comprises a memory system 22 and a host system 24. Memory system 22 accepts data for storage from host system 24 and stores it in memory, and retrieves data from memory and provides it to the host system. In the present example, system 22 comprises a Solid-State Disk (SSD) that stores data for a host computer. In alternative embodiments, however, system 22 may be used in any other suitable application and with any other suitable host system, such as in computing devices, cellular phones, WiFi terminals or other communication terminals, Global Positioning System (GPS) units, removable memory modules such as Disk-On-Key (DOK) devices, Secure Digital (SD) cards, Multi-Media Cards (MMC) and embedded MMC (eMMC), digital cameras, music and other media players such as Portable Media Players (PMP), and/or any other system or device in which data is stored and retrieved.
Memory system 22 comprises multiple memory devices 28, each comprising multiple analog memory cells. In the present example, devices 28 comprise non-volatile NAND Flash devices, although any other suitable memory type, such as NOR and Charge Trap Flash (CTF) Flash cells, phase change RAM (PRAM, also referred to as Phase Change Memory—PCM), Nitride Read Only Memory (NROM), Ferroelectric RAM (FRAM), magnetic RAM (MRAM) and/or Dynamic RAM (DRAM) cells, can also be used.
In the context of the present patent application and in the claims, the term “analog memory cell” is used to describe any memory cell that holds a continuous, analog value of a physical parameter, such as an electrical voltage or charge. Any suitable type of analog memory cells, such as the types listed above, can be used. In the present example, each memory device 28 comprises a non-volatile memory of NAND Flash cells. The charge levels stored in the cells and/or the analog voltages or currents written into and read out of the cells are referred to herein collectively as analog values or storage values. Although the embodiments described herein mainly address threshold voltages, the methods and systems described herein may be used with any other suitable kind of storage values.
System 22 stores data in the analog memory cells by programming the memory cells to assume respective memory states, which are also referred to as programming levels. The programming levels are selected from a finite set of possible levels, and each level corresponds to a certain nominal storage value. For example, a 2 bit/cell MLC can be programmed to assume one of four possible programming levels by writing one of four possible nominal storage values into the cell.
Typically, each memory device comprises multiple erasure blocks (also referred to as memory blocks, or simply blocks for brevity), i.e., groups of memory cells that are erased together. The memory cells in each erasure block are typically arranged in rows and columns. Each column is connected to a respective bit line, and each row is connected to a respective Word Line (WL). Each row (word line) in a given block typically stores one or more memory pages. Within a given row, different pages may be stored in different memory cells, e.g., one page in even-order cells and another cell in odd-order cells. Additionally or alternatively, when using MLC, different pages can be stored in different MLC bits of the same group of memory cells.
Each memory device 28 may comprise a packaged device or an unpackaged semiconductor chip or die. A typical SSD may comprise a number of 4 GB devices. Generally, however, memory system 22 may comprise any suitable number of memory devices of any desired type and size. Although the system configuration of FIG. 1 comprises multiple memory devices, some of the methods and systems described herein can also be used in systems having only a single memory device.
Memory system 22 comprises a memory controller 32, which accepts data from host system 24 and stores it in memory devices 28, and retrieves data from the memory devices and provides it to the host system. Memory controller 32 comprises a host interface 36 for communicating with host system 24, a memory interface 40 for communicating with memory devices 28, and a processor 44 that processes the stored and retrieved data. For example, processor 44 may encode the data for storage with an Error Correction Code (ECC) and decode the ECC of data read from memory. The functions of processor 44 can be implemented, for example, using software running on a suitable Central Processing Unit (CPU), using hardware (e.g., state machine or other logic), or using a combination of software and hardware elements.
In some embodiments, memory controller 32 comprises a read threshold database 46, also referred to as a threshold memory, which holds read threshold values that proved successful in reading data from respective pages. Database 46 may be stored in an internal memory of controller 32, in an external volatile or non-volatile memory device, or in any other suitable memory. Memory controller reads data from memory devices 28 by processing the read thresholds stored in database 46, using methods that are described in detail below. In some embodiments, database 46 holds additional information that is used by controller 32 in the readout process.
Host system 24 comprises a host processor 48 and a memory 52, e.g., a Dynamic Random Access Memory (DRAM). In some embodiments, database 46 is stored in memory 52 of the host system. In these embodiments, memory controller 32 may access database 46 by communicating with host processor 48, or using a dedicated interface with memory 52.
Memory controller 32, and in particular processor 44, may be implemented in hardware. Alternatively, the memory controller may comprise a microprocessor that runs suitable software, or a combination of hardware and software elements. In some embodiments, processor 44 comprises a general-purpose processor, which is programmed in software to carry out the functions described herein. The software may be downloaded to the processor in electronic form, over a network, for example, or it may, alternatively or additionally, be provided and/or stored on non-transitory tangible media, such as magnetic, optical, or electronic memory.
The system configuration of FIG. 1 is an example configuration, which is shown purely for the sake of conceptual clarity. Any other suitable memory system configuration can also be used. For example, in some embodiments two or more memory controllers 32 may be connected to the same host processor. Elements that are not necessary for understanding the principles of the present invention, such as various interfaces, addressing circuits, timing and sequencing circuits and debugging circuits, have been omitted from the figure for clarity.
In the exemplary system configuration shown in FIG. 1, memory devices 28 and memory controller 32 are implemented as separate Integrated Circuits (ICs). In alternative embodiments, however, the memory devices and the memory controller may be integrated on separate semiconductor dies in a single Multi-Chip Package (MCP) or System on Chip (SoC), and may be interconnected by an internal bus. Further alternatively, some or all of the memory controller circuitry may reside on the same die on which one or more of the memory devices are disposed. Further alternatively, some or all of the functionality of memory controller 32 can be implemented in software and carried out by host processor 48 or other element of host system 24, or by any other type of memory controller. In some embodiments, host processor 48 and Memory controller 32 may be fabricated on the same die, or on separate dies in the same device package.
FIG. 2 is a graph showing threshold voltage distributions and associated read thresholds in a group of analog memory cells, in accordance with an embodiment of the present invention. The example of FIG. 2 refers to a group of four-level MLC, each storing two data bits. Four programming levels 60A . . . 60D represent the bit value combinations “11”, “10”, “00” and “01”, respectively. As can be seen in the figure, the threshold voltages of the memory cells in each programming level have a certain statistical distribution.
In the present example, the group of memory cells holds two memory pages, referred to as a Least Significant Bit (LSB) page and a Most Significant Bit (MSB) page. The LSB page is stored in the LSBs of the memory cells (the left-hand-side bits in the notation used in FIG. 2), and the MSB page is stored in the MSBs of the memory cells (the right-hand-side bits in the notation used in the figure). In order to read the data from this group of memory cells, the memory controller compares the cells' threshold voltages to three read thresholds. The LSB page is read by comparing the cells' threshold voltages to an LSB threshold 64. The MSB page is read by comparing the cells' threshold voltages to two MSB thresholds 68A and 68B. Although the example of FIG. 2 refers to four-level memory cells that store two pages, the techniques described herein can be used with any other type of memory cells, such as Single-Level Cells (SLC) that store a single page, eight-level MLC that store three pages, or any other suitable configuration.
Memory Readout Using Read Threshold Database
The example of FIG. 2 above demonstrates the threshold voltage distribution in a certain group of memory cells. In practice, the threshold voltage distributions often differ from one group of memory cells to another within the same erasure block. Different memory cells groups may have threshold voltage distributions that differ in mean, variance or any other property. The differences may be caused, for example, by manufacturing process variations, interference from neighboring cells, retention or endurance effects, or for any other reason. Consequently, the optimal positions of the read thresholds may differ from one cell group to another, as well.
When reading data from a given page, it is advantageous to initially attempt a set of read thresholds that is at or near the optimal positions for that page. When using read thresholds that are optimal or nearly optimal, readout is likely to succeed with high probability. Even if the initial attempt fails, minor adjustment of the read thresholds is likely to achieve successful readout. If, on the other hand, initial readout is attempted using read thresholds that are far from the optimal positions, multiple adaptation iterations may be needed.
The process of adapting read thresholds starting from unknown or considerably non-optimal initial values is sometimes referred to as “acquisition.” The process of adapting read thresholds from values that are near the optimal positions is sometimes referred to as “tracking.” Example techniques for read threshold tracking and acquisition are described in PCT International Publications WO 2007/132457, WO 2008/053472 and WO 2008/111058, whose disclosures are incorporated herein by reference.
As can be appreciated, initiating the readout process with optimal or nearly optimal read thresholds increases the likelihood of success without reverting to acquisition. Even in cases where acquisition is still required, the length and complexity of the acquisition process is considerably reduced. In summary, the ability to begin the readout process with nearly optimal read thresholds shortens the overall readout time significantly. The performance improvement is particularly significant in random read operations (readout of relatively short data items from sporadic page addresses), although it is useful in sequential read operations (readout of large data items stored in sequential page addresses), as well.
In some embodiments, memory controller 32 stores multiple sets of read thresholds, which have proven to perform well, in read threshold database 46. The memory controller uses the stored sets of read thresholds when attempting to read data from memory devices 28. Each set of read thresholds may comprise one or more thresholds. For example, a set of read thresholds for an SLC device (or a set of read thresholds for a LSB page in a MLC device) typically comprises a single threshold. A set of read thresholds for an MSB page in a four-level (2 bits/cell) device typically comprises two thresholds (e.g., thresholds 68A and 68B in FIG. 2). Each set of read thresholds in database 46 is associated with a specific page in a specific erasure block in one of memory devices 28. Typically, the set of read thresholds associated with a given page is a set that succeeded in reading that page without errors.
When preparing to read a given page, e.g., in response to a read command from the host system, memory controller 32 tries to find a set of read thresholds that is associated with the requested page in database 46. If a matching set is found in the database, the memory controller reads the page using that set. Otherwise, the memory controller retrieves a set of read thresholds that is associated with another page in the same erasure block, and adapts this set to match the requested page. The memory controller then reads the requested page using the adapted set of read thresholds. In some cases, the adaptation process adjusts one or more of the thresholds in the retrieved set in order to match the requested page. In other cases, the retrieved set of thresholds matches the requested page as-is, even though it originates from another page in the erasure block. In this case, the adaptation process does not adjust any of the thresholds. In the present context, the term “adapting the thresholds” means verifying that the set of read thresholds matches the requested page, and possibly adjusting one or more of the thresholds for this purpose.
Memory controller 32 may use any suitable technique for adapting the retrieved set of read thresholds to match the page to be read. For example, in some cases the variation of the read thresholds between different rows (Word Lines—WLs) in the erasure block is known in advance. The memory controller may use this known relationship to produce read thresholds that are suitable for a given WL from a set of read threshold that was successful in another WL in the same block. For example, if the optimal read thresholds for WL #23 are stored in database 46 from a previous successful read operation, these thresholds can be adapted to produce read thresholds for reading WL #95 in the same erasure block.
In an example embodiment, the memory controller calculates a correction factor as a function of the WL index of the retrieved threshold set and the WL index of the page to be read. The memory controller then applies this correction to the retrieved threshold set, so as to produce a set of read thresholds that matches the page to be read. In alternative embodiments, the memory controller may calculate and apply more than one correction factor, e.g., apply different correction factors to different thresholds in the set.
Any known relationship between WLs can be used by the memory controller. For example, the optimal read threshold positions may vary from one WL to the next at a known rate or according to a known function (e.g., a linear or polynomial function). As another example, the optimal read threshold positions of certain WLs (e.g., the first and/or last WLs in the block) may have a known offset with respect to other WLs. In some embodiments, the WL-to-WL relationship and/or correction factors is stored in database 46. In these embodiments, memory controller 32 retrieves this relationship from the database, and applies it to the retrieved set of read thresholds. The relationships between WLs can be characterized or calibrated during production and/or during normal operation of system 20. In some embodiments, one or more of these relationships can be adaptive, i.e., adjusted automatically by the memory controller. The characterization or calibration may be performed for each individual memory device, or over a collection of memory devices.
As another example, the memory controller may use the read thresholds of a given page to adapt the read thresholds of another page that is stored in the same group of memory cells. As explained above, a given group of memory cells (e.g., a WL) in an MLC device can store two or more pages in different bits (e.g., one page in the cell LSBs and another page in the cell MSBs, as in the example of FIG. 2). In practice, the variation of the optimal read threshold positions is often correlative between the thresholds of different pages in the same group of memory cells. With reference to FIG. 2, for example, the optimal position of LSB threshold 64 is often indicative of the optimal positions of MSB thresholds 68A and 68B, and vice versa. Similar correlations often exist between pages of other kinds of MLC, e.g., three or four bits/cell devices.
In some embodiments, the memory controller finds in database 46 a set of read thresholds that is associated with another page in the same cell group as the page to be read. The memory controller then adapts the retrieved thresholds to produce a set of read thresholds for reading the requested page. Any suitable relationship or correction factor can be used. For example, the memory controller may set the thresholds of the page to be read at known fixed offsets with respect to the read thresholds of the retrieved page. In some embodiments, page-to-page offsets or other correction factors are stored in database 46, and the memory controller retrieves and applies these correction factors. The relationships between pages can be estimated by characterization or calibration, during production and/or during normal system operation. In some embodiments, one or more of these relationships can be adaptive, i.e., adjusted automatically by the memory controller.
In some embodiments, multiple pages can be stored in different cell groups in the same WL. For example, one page can be stored in the even-order memory cells of the WL, and another page in the odd-order memory cells. The read thresholds of these pages may be correlated, and the memory controller may use this correlation. In an example embodiment, the memory controller finds in database 46 a set of read thresholds that is associated with another page in the same WL as the page to be read, although in different memory cells. The memory controller adapts the retrieved thresholds to produce a set of read thresholds for reading the requested page. In an example embodiment, even-order memory cells in a given WL suffer from horizontal cross-coupling interference caused by the odd-order memory cells of that WL. The odd-order memory cells, on the other hand, do not suffer from horizontal cross-coupling interference. Thus, the read thresholds for reading the even-order memory cells are expected to be higher than those of the odd-order memory cells. The memory controller may use this fact to deduce the read thresholds for the odd-order memory cells from the read thresholds of the even-order memory cells, or vice versa.
In some embodiments, memory controller 32 stores in database 46 additional parameters, which assist in adapting the read thresholds of the page to be read. For example, the memory controller may store parameters such as the number of Programming and Erasure (P/E) cycles that each block has gone through, the time that elapsed since the last write operation to each block (retention time), and/or the index of the last page that was written to each block. As another example, the memory controller may estimate and store a time-temperature integral of each block, i.e., an integral of the operating temperature of the block over time. (The memory controller may store and use the time that elapsed since the last write operation, for example, if temperature measurements of the memory device are not available.) Any of these read parameters can be indicative of the adaptation to be applied to a set of read thresholds retrieved from database 46 when preparing to read a page from the same block.
As yet another example, the read threshold adjustment may depend on the difference between the temperature of the memory device at programming time and the temperature at reading time. In some embodiments, the memory controller stores in database 46 the temperature of the memory device when a given block was programmed. When reading data from this block, the memory controller reads the programming-time temperature from database 46, compares it with the current temperature (reading-time temperature), and adjusts the read thresholds based on the difference between the two temperatures. Additionally or alternatively, the memory controller may store in database 46 any other suitable read parameter.
In some embodiments, when memory controller 32 intends to read a given page from a given block, it retrieves a set of read thresholds that proved successful in reading a certain page in this block. In addition, the memory controller retrieves one or more read parameters pertaining to this block. The memory controller adapts the retrieved threshold set based on the retrieved read parameters, and reads the requested page using the adapted thresholds. Note that adapting read thresholds using read parameters is advantageous regardless of whether the retrieved threshold set is associated with the requested page or with another page in the block.
In an example embodiment, when the memory controller prepares to read a page from a given block, it retrieves (1) a set of read thresholds associated with this block, and (2) the time that elapsed since the last write operation to this block (retention time). The memory controller adapts the retrieved read thresholds based on the retrieved retention time, and reads the page using the adapted read thresholds. In an embodiment, assuming readout is successful, the memory controller updates database 46 with the newly adapted read thresholds, and re-initializes the stored retention time.
FIG. 3 is a diagram showing an example data structure 70, which can be used to implement threshold database 46, in accordance with an embodiment of the present invention. Memory system 22 is assumed to comprise multiple memory arrays (e.g., memory dies, planes or devices), with each array comprising multiple erasure blocks. In the present example, database 46 comprises a respective entry 74 for each erasure block.
Each database entry comprises a representative set of read thresholds, which has proven successful in reading a certain page in this block. In addition, each entry 74 may comprise WL-to-WL and/or page-to-page correction factors, which are used by the memory controller as explained above. Additionally or alternatively, each database entry 74 comprises one or more read parameters. In the present example, database 46 contains no more than a single set of read thresholds for each erasure block. Some erasure blocks (e.g., blocks from which no data was read yet) may have no valid entries in the database.
The threshold database configuration of FIG. 3 is an example configuration, which is shown purely for the sake of conceptual clarity. In alternative embodiments, any other suitable configuration can also be used. For example, the database entry of a given block may comprise more than a single set of read thresholds, e.g., two or more sets of read thresholds that are associated with respective pages or groups of pages in the block. Additionally or alternatively, the database entry of a given block may comprise multiple sets of correction factors and/or read parameters, e.g., sets corresponding to different pages or groups of pages in the block.
In some embodiments, the sets of read thresholds in database 46 are drawn from a finite predefined list of threshold sets. In these embodiments, the memory controller may store in database 46 only the indices of the threshold sets, rather than the actual threshold values. In other words, the database entry of a given block in database 46 may comprise the indices of the threshold sets in the list, rather than the threshold values. This representation further reduces the database size.
FIG. 4 is a flow chart that schematically illustrates a method for managing and using read thresholds, in accordance with an embodiment of the present invention. The method begins with memory controller 32 initializing threshold database 46, at an initialization step 80. In some embodiments, the database is initially empty before any successful readout operations are performed. In alternative embodiments, the memory controller may initialize the database with certain default read threshold values. The correction factors and read parameters are initialized to their appropriate initial values, as well.
The memory controller receives from host system 24 a read command, at a command input step 84. The read command requests the memory controller to read a certain memory page, referred to below as a target page. The target page belongs to a certain erasure block in one of memory devices 28. (Typically, the read command does not specify the actual physical page to be read. The command typically requests readout of a certain data item, which may comprise multiple pages, from a specified logical address. Logical-to-physical address translation is typically performed by the memory controller.)
The memory controller attempts to find in database 46 a set of read thresholds that matches the target page, a match checking step 88. For example, the memory controller may locate a database entry 74 corresponding to the block of the target page, and check whether this database entry contains a set of read thresholds associated with the target page. If a matching set of thresholds is found, the memory controller reads the target page using this threshold set, at a match readout step 92. The memory controller sends the read data of the target page to the host system, at an output step 96. The method then loops back to step 84 above, where the memory controller is ready to receive a subsequent read command.
If, on the other hand, memory controller 32 is unable to find a set of read thresholds that is associated with the target page, the memory controller retrieves a set of read thresholds that is associated with another page in the same erasure block, at a retrieval step 100. The memory controller adapts the retrieved set of thresholds to match the target page, at an adaptation step 104. As explained above, adaptation may involve adjusting the values of one or more of the thresholds, or it may involve using the retrieved set of thresholds as-is. The memory controller may use any suitable adaptation scheme, such as the above-described schemes using correction factors and/or read parameters.
After adapting the retrieved read thresholds, the memory controller reads the target page using the adapted thresholds, at an adapted readout step 108. Assuming readout is successful, the memory controller updates database 46 with the adapted values of the read thresholds, at a database updating step 112. One or more of the read parameters may also be updated, as appropriate. The memory controller sends the read data of the target page to the host system, at step 96, and the method loops back to step 84 above.
In some embodiments, memory controller 32 refreshes database 46 automatically, by performing read operations irrespective of read commands from the host system. The automatic refresh operations may be performed to update existing database entries (i.e., to update the read thresholds of blocks that already exist in database 46), or to create new database entries of blocks that are not yet represented in the database.
For example, the memory controller may run a background task that periodically reads pages from certain erasure blocks, but does not necessarily decode or transfer the read data to the host system. The purpose of these read operations is to keep database 46 up-to-date with valid read threshold values, so that the database is more likely to contain threshold sets that match pages that are requested in host-initiated read commands. In an example embodiment, the background task reads a single representative page from each selected block, and updates database 46 with the read thresholds that were successful in reading this page. In an embodiment, the memory controller selects a page from which it is easy to predict the read thresholds of the other pages in the block. For example, a page in the middle of the block may be preferable for this purpose.
In some embodiments, the memory controller performs these database refresh operations during idle periods in which little or no memory access operations are requested by the host system. In some embodiments, the memory controller gives preference to refreshing of thresholds in erasure blocks that have not been read recently. Therefore, many of these read operations will typically involve threshold acquisition. The memory controller may use any suitable scheduling or selection criteria in order to select when and/or which blocks to refresh in threshold database 46.
As noted above, threshold database 46 is typically stored in volatile memory. In these embodiments, the threshold database may be lost if the electrical power of system 22 is disrupted. For example, when system 22 comprises an SSD installed in a host computer, the host computer may go into hibernation, in which case the SSD power supply is disrupted. In some embodiments, memory controller 32 prevents this information loss by copying the content of database 46 to non-volatile memory devices 28 when electrical power disruption is imminent. When power is reapplied, the memory controller retrieves the database content from the non-volatile memory devices and recovers database 46. In alternative embodiments, database 46 is erased at power-down and re-built after power-up. In the latter case, read operations during the initial period after power-up may be slower, since they will typically involve threshold acquisition.
In some embodiments, processor 44 is able to read pages from memory devices 28 using several different readout schemes. Different readout schemes typically provide different trade-offs between robustness, latency, power consumption or other performance figures. When preparing to read a given page from a given block, processor 44 selects one of the readout schemes, and reads the page using the selected scheme.
For example, the readout scheme may specify an ECC decoding scheme to be used in decoding the ECC of the page. In an example embodiment, one decoding scheme may comprise a hard decoding scheme, while another decoding scheme may comprise a soft decoding scheme. As another example, processor 44 may select between two or more soft decoding schemes that differ from one another in the quantization level of the soft metrics on which they operate.
Additionally or alternatively, the readout scheme may specify whether or not to re-read the page one or more times, either with different read thresholds or with the same read thresholds, in order to refine the readout resolution. The readout scheme may specify the number of re-read operations to be applied. Further additionally or alternatively, the readout scheme may specify whether or not to perform an interference cancellation process when reading the page. The interference cancellation process typically involves reading one or more neighboring pages and canceling the interference they cause. Further additionally or alternatively, each readout scheme may specify any other suitable attribute or property of the readout process.
In some embodiments, processor 44 stores in database indications of readout schemes that were proven successful in reading pages from memory devices 28. For each erasure block, processor 44 stores indications of one or more readout schemes, which were used successfully in reading pages from that block. When preparing to read a given page from a given block, processor 44 retrieves the readout scheme indications pertaining to that block from database 46, and reads the given page using one of these schemes. In some embodiments, processor 44 stores an indication of a single readout scheme per block. In alternative embodiments, processor 44 stores indications of multiple readout schemes per block, and selects one of the schemes using a suitable selection criterion.
When using the above-described technique, processor initially attempts to read a given page using a readout scheme that was previously successful in the same block. This initial selection increases the likelihood that the initial readout attempt will succeed. Even if the initial attempt fails, the correct readout scheme can be found in a small number of attempts. As a result, readout time can be reduced considerably.
Processor 44 may store in database 46 any suitable indication, which enables the processor to select the appropriate scheme. In some embodiments, the processor stores respective indices or other identifiers of the readout schemes. In alternative embodiments, the processor stores attributes of the block that enable choosing the appropriate readout scheme.
For example, the processor may store, for each erasure block, the average or maximum number of errors per block (or per page) that were encountered in that block. When preparing to read a given page from a given block, the processor retrieves the number of errors pertaining to that block. If the number of errors is relatively small, the processor may choose a modest-robustness readout scheme that is typically fast and power-efficient. If the number of errors is relatively large, the processor may choose a more robust readout scheme, at the possible expense of higher latency or power consumption.
In an alternative embodiment, processor 44 can determine the appropriate readout scheme from the set of read thresholds that are associated with the block, without explicitly storing indications of previously-successful readout schemes.
In some embodiments, processor 44 can estimate the quality of a given erasure block based on the information pertaining to that block in database 46. The block quality can be estimated, for example, based on the readout scheme indications, and/or based on the read threshold values associated with the block. In an embodiment, processor 44 may store a quality indication for each erasure block in database 46.
It will be appreciated that the embodiments described above are cited by way of example, and that the present invention is not limited to what has been particularly shown and described hereinabove. Rather, the scope of the present invention includes both combinations and sub-combinations of the various features described hereinabove, as well as variations and modifications thereof which would occur to persons skilled in the art upon reading the foregoing description and which are not disclosed in the prior art.

## Claims

1. A method for data storage, comprising:
storing multiple sets each comprising one or more read thresholds for use in reading data from a plurality of analog memory cells, which are arranged in multiple erasure blocks each comprising multiple pages, such that each set of read thresholds is associated with a respective page in one of the erasure blocks; and
reading a first page, which belongs to a given erasure block and is not associated with any of the stored sets of read thresholds, by:
retrieving a stored set of read thresholds that is associated with a second page in the given erasure block;
adapting the retrieved set of read thresholds to match the first page; and
reading the first page using the adapted set of read thresholds.

2. The method according to claim 1, wherein the first page is located in a first row of the given erasure block, wherein the second page is located in a second row of the given erasure block, different from the first row, and wherein adapting the retrieved set of read thresholds comprises adjusting at least one of the read thresholds in the retrieved set as a function of the first and second rows.

3. The method according to claim 1, wherein each of the analog memory cells stores two or more respective bits, wherein the first page is stored in respective first bits of a given group of the analog memory cells, wherein the second page is stored in respective second bits of the given group, and wherein adapting the retrieved set of read thresholds comprises setting the read thresholds for reading the first page as a function of at least one of the read thresholds in the retrieved set.

4. The method according to claim 1, wherein storing the sets comprises selecting an erasure block irrespective of accepting any read command from a host, performing a read operation that reads at least a given page from the selected erasure block, and storing a set of read thresholds that was successful in reading the given page.

5. The method according to claim 4, wherein automatically selecting the erasure block comprises running a background task that periodically selects the erasure block.

6. The method according to claim 1, and comprising storing at least one read parameter pertaining to the given erasure block, wherein adapting the retrieved set of read thresholds comprises retrieving the read parameter and adjusting at least one of the read thresholds in the retrieved set based on the retrieved read parameter.

7. The method according to claim 6, wherein the at least one read parameter comprises at least one parameter type selected from a group of types consisting of a number of programming and erasure cycles applied to the given erasure block, a time that elapsed since a last programming operation applied to the given erasure block, a time-temperature integral estimated for the given erasure block, and an index of a last page written to the given erasure block.

8. The method according to claim 6, wherein the at least one read parameter comprises a first temperature of the analog memory cells at a first time at which the given erasure block was programmed, and wherein adjusting the read thresholds comprises modifying the read thresholds based on a difference between the first temperature and a second temperature of the analog memory cells at a second time at which the given erasure block is read.

9. The method according to claim 1, and comprising, upon successfully reading the first page, updating the stored sets with the adapted set of read thresholds.

10. The method according to claim 1, wherein storing the sets comprises storing no more than a single respective set of read thresholds for each erasure block.

11. The method according to claim 1, wherein reading the first page comprises accepting a read command from a host system, reading the first page in response to the read command, and sending the read first page to the host system.

12. The method according to claim 11, wherein storing the sets comprises storing the sets in a memory of the host system.

13. The method according to claim 1, wherein the multiple sets are drawn from a predefined list of sets, and wherein storing the sets comprises storing respective indices of the sets in the list.

14. The method according to claim 1, wherein the multiple sets are stored in a volatile memory, wherein the analog memory cells comprise non-volatile memory cells, and comprising copying the multiple sets to the analog memory cells in response to an imminent disruption of electrical power, and recovering the multiple sets from the analog memory cells to the volatile memory following reapplication of the electrical power.

15. The method according to claim 1, wherein storing the multiple sets comprises storing an indication of a successful readout scheme that previously succeeded in reading at least one page of the given erasure block, and wherein reading the first page comprises retrieving the indication and reading the first page using the respective successful readout scheme.

16. The method according to claim 15, wherein the successful readout scheme specifies at least one item selected from a group of items consisting of:
an Error Correction Code (ECC) decoding scheme that succeeded in decoding the at least one page;
a number of re-read operations that succeeded in reading the at least one page; and
a notification of whether interference cancellation was used in order to successfully read the at least one page.

17. The method according to claim 15, wherein the indication is indicative of a number of errors that were encountered in the given erasure block.

18. The method according to claim 1, wherein reading the first page comprises selecting a readout scheme for reading the first page responsively to the stored set of read thresholds.

19. The method according to claim 1, and comprising assessing a quality of the given erasure block based on the stored set that is associated with the given erasure block.

20. The method according to claim 1, and comprising storing a quality of the given erasure block in the stored set that is associated with the given erasure block.

21. Apparatus for data storage, comprising:
a threshold memory; and
a processor, which is configured to store in the threshold memory multiple sets each comprising one or more read thresholds for use in reading data from a plurality of analog memory cells, which are arranged in multiple erasure blocks each comprising multiple pages, such that each set of read thresholds is associated with a respective page in one of the erasure blocks, to read a first page, which belongs to a given erasure block and is not associated with any of the sets of read thresholds stored in the threshold memory, by retrieving from the threshold memory a stored set of read thresholds that is associated with a second page in the given erasure block, adapting the retrieved set of read thresholds to match the first page, and reading the first page using the adapted set of read thresholds.

22. The apparatus according to claim 21, wherein the first page is located in a first row of the given erasure block, wherein the second page is located in a second row of the given erasure block, different from the first row, and wherein the processor is configured to adjust at least one of the read thresholds in the retrieved set as a function of the first and second rows.

23. The apparatus according to claim 21, wherein each of the analog memory cells stores two or more respective bits, wherein the first page is stored in respective first bits of a given group of the analog memory cells, wherein the second page is stored in respective second bits of the given group, and wherein the processor is configured to set the read thresholds for reading the first page as a function of at least one of the read thresholds in the retrieved set.

24. The apparatus according to claim 21, wherein the processor is configured to select an erasure block irrespective of accepting any read command from a host, to perform a read operation that reads at least a given page from the selected erasure block, and to store a set of read thresholds that was successful in reading the given page.

25. The apparatus according to claim 24, wherein the processor is configured to run a background task that periodically selects the erasure block.

26. The apparatus according to claim 24, wherein the processor is configured to store in the threshold memory at least one read parameter pertaining to the given erasure block, to retrieve the read parameter and to adjust at least one of the read thresholds in the retrieved set based on the retrieved read parameter.

27. The apparatus according to claim 26, wherein the at least one read parameter comprises at least one parameter type selected from a group of types consisting of a number of programming and erasure cycles applied to the given erasure block, a time that elapsed since a last programming operation applied to the given erasure block, a time-temperature integral estimated for the given erasure block, and an index of a last page written to the given erasure block.

28. The apparatus according to claim 26, wherein the at least one read parameter comprises a first temperature of the analog memory cells at a first time at which the given erasure block was programmed, and wherein the processor is configured to modify the read thresholds based on a difference between the first temperature and a second temperature of the analog memory cells at a second time at which the given erasure block is read.

29. The apparatus according to claim 21, wherein the processor is configured to update the stored sets with the adapted set of read thresholds upon successfully reading the first page.

30. The apparatus according to claim 21, wherein the processor is configured to store no more than a single respective set of read thresholds for each erasure block.

31. The apparatus according to claim 21, wherein the processor is configured to accept a read command from a host system, to read the first page in response to the read command, and to send the read first page to the host system.

32. The apparatus according to claim 31, wherein the threshold memory resides in a memory of the host system.

33. The apparatus according to claim 21, wherein the multiple sets are drawn from a predefined list of sets, and wherein storing the sets comprises storing respective indices of the sets in the list.

34. The apparatus according to claim 21, wherein the threshold memory comprises a volatile memory, wherein the analog memory cells comprise non-volatile memory cells, and wherein the processor is configured to copy the multiple sets from the threshold memory to the analog memory cells in response to an imminent disruption of electrical power, and to recover the multiple sets from the analog memory cells to the threshold memory following reapplication of the electrical power.

35. The apparatus according to claim 21, wherein the processor is configured to store in the threshold memory an indication of a successful readout scheme that previously succeeded in reading at least one page of the given erasure block, and to read the first page by retrieving the indication and reading the first page using the respective successful readout scheme.

36. The apparatus according to claim 35, wherein the successful readout scheme specifies at least one item selected from a group of items consisting of:
an Error Correction Code (ECC) decoding scheme that succeeded in decoding the at least one page;
a number of re-read operations that succeeded in reading the at least one page; and
a notification of whether interference cancellation was used in order to successfully read the at least one page.

37. The apparatus according to claim 35, wherein the indication is indicative of a number of errors that were encountered in the given erasure block.

38. The apparatus according to claim 21, wherein the processor is configured to select a readout scheme for reading the first page responsively to the stored set of read thresholds.

39. The apparatus according to claim 21, wherein the processor is configured to assess a quality of the given erasure block based on the stored set that is associated with the given erasure block.

40. The apparatus according to claim 21, wherein the processor is configured to store a quality of the given erasure block in the threshold memory.

41. Apparatus for data storage, comprising:
a non-volatile memory, which comprises a plurality of analog memory cells that are arranged in multiple erasure blocks each comprising multiple pages;
a threshold memory; and
a processor, which is configured to store multiple sets each comprising one or more read thresholds for use in reading data from the analog memory cells, such that each set of read thresholds is associated with a respective page in one of the erasure blocks, to read a first page, which belongs to a given erasure block and is not associated with any of the sets of read thresholds stored in the threshold memory, by retrieving from the threshold memory a stored set of read thresholds that is associated with a second page in the given erasure block, adapting the retrieved set of read thresholds to match the first page, and reading the first page using the adapted set of read thresholds.