Nonvolatile Memory System Compression
Data to be stored in a nonvolatile memory array may be compressed in a manner that provides variable sized portions of compressed data, which is then padded to a predetermined uniform size and then stripped of padding. The encoded compressed data is sent to the memory array where it is stored in a uniform sized area that is exclusive to the encoded compressed data.
Latest SANDISK TECHNOLOGIES INC. Patents:
- Data storage device and method for performance-dependent storage of parity information
- Memory device with reinforcement learning with Q-learning acceleration
- Data storage device and method for improving asynchronous independent plane read (AIPR) utilization
- Apparatus and methods for smart verify with adaptive voltage offset
- Non-volatile memory with layout adaptive problematic word line detection
This invention relates generally to nonvolatile semiconductor memories, their formation, structure and use, and specifically to methods of operating nonvolatile memory systems in efficient ways.
There are many commercially successful non-volatile memory products being used today, particularly in the form of small form factor cards, which use an array of flash EEPROM cells. An example of a flash memory system is shown in
One popular flash EEPROM architecture utilizes a NAND array, wherein a large number of strings of memory cells are connected through one or more select transistors between individual bit lines and a reference potential. A portion of such an array is shown in plan view in
Nonvolatile memory devices are also manufactured from memory cells with a dielectric layer for storing charge. Instead of the conductive floating gate elements described earlier, a dielectric layer is used. Such memory devices utilizing dielectric storage element have been described by Eitan et al., “NROM: A Novel Localized Trapping, 2-Bit Nonvolatile Memory Cell,” IEEE Electron Device Letters, vol. 21, no. 11, November 2000, pp. 543-545. An ONO dielectric layer extends across the channel between source and drain diffusions. The charge for one data bit is localized in the dielectric layer adjacent to the drain, and the charge for the other data bit is localized in the dielectric layer adjacent to the source. For example, U.S. Pat. Nos. 5,768,192 and 6,011,725 disclose a nonvolatile memory cell having a trapping dielectric sandwiched between two silicon dioxide layers. Multi-state data storage is implemented by separately reading the binary states of the spatially separated charge storage regions within the dielectric.
In addition to charge storage memory, other forms of nonvolatile memory may be used in nonvolatile memory systems. For example Ferroelectric RAM (FeRAM, or FRAM) uses a ferroelectric layer to record data bits by applying an electric field that orients the atoms in a particular area with an orientation that indicates whether a “1” or a “0” is stored. Magnetoresistive RAM (MRAM) uses magnetic storage elements to store data bits. Phase-Change memory (PCME, or PRAM) such as Ovonic Unified Memory (OUM) uses phase changes in certain materials to record data bits. Various other nonvolatile memories are also in use or proposed for use in nonvolatile memory systems.
SUMMARY OF THE INVENTIONData to be stored in a nonvolatile memory may be compressed and encoded prior to storage. Compression of units of data may be used to generate compressed data of variable length that is then padded with dummy data to restore it to the original size regardless of the length of the compressed data. Error Correction Code (ECC) encoding may then be performed on uniform sized units to generate redundancy data. Dummy data is then stripped, leaving compressed data and redundancy data, which are sent to a nonvolatile memory array, for example over a memory bus. In the memory array, a physical area with capacity to store an uncompressed unit of data (with redundancy data) is allocated exclusively for the compressed unit of data (with redundancy data) leaving some unused capacity. A system of incremented offsets may vary locations for storing such data in a physical area. Other schemes may be used to intersperse used and unused portions within a given physical area. In some cases, rather than leave the unused capacity unwritten, with memory cells in the erased state, some dummy data is written. When data is read, the scheme may be reversed, with compressed data being padded with dummy data, then decoded, then stripped of dummy data, and then decompressed. Thus, relatively little data is transferred over a memory bus, which is often a bottle neck in a nonvolatile memory system. Latency may be reduced, less power may be needed, and wear on cells caused by repeated write-erase cycles is reduced.
An example of a method of operating a nonvolatile memory system includes: receiving a portion of data; compressing the portion of data to obtain compressed data; padding the compressed data with dummy data so that the compressed data plus the dummy data forms a predetermined sized unit; encoding the predetermined sized unit to obtain redundancy data; subsequently stripping the dummy data and appending the redundancy data to obtain encoded compressed data; and sending the encoded compressed data to a nonvolatile memory die.
The method may further include: receiving the encoded compressed data in the nonvolatile memory die; and subsequently writing the encoded compressed data in nonvolatile memory cells of the nonvolatile memory die. The method may also include: reading the encoded compressed data from the nonvolatile memory; and sending the encoded compressed data from the nonvolatile memory die. The method may further include: receiving the encoded compressed data from the nonvolatile memory die; padding the encoded compressed data to form a predetermined sized unit; decoding the predetermined sized unit to obtain decoded data; stripping padding data from the decoded data to obtain decoded compressed data; and decompressing the decoded compressed data. The compressing, padding, encoding, stripping and appending may be performed in a memory controller that is connected to the nonvolatile memory die by a bus that carries the encoded compressed data. The portion of data may be a 4 KB portion, the predetermined sized unit may be a 4 KB sized unit, and the redundancy data may be approximately 512 Bytes. The encoded compressed data may be exclusively assigned to an area of the nonvolatile memory die that has a capacity equal to the predetermined sized unit plus the redundancy data. The nonvolatile memory die may include a plurality of areas that individually have capacity equal to the predetermined sized unit plus the redundancy data. The method may also include varying physical locations of encoded compressed data within individual areas of the plurality of areas. The varying of physical locations of encoded compressed data may include applying different offsets for starting locations of encoded compressed data in different areas.
An example of a nonvolatile memory controller may include: a data compression circuit that receives a portion of data of a predetermined size and generates compressed data; a data padding circuit that pads the compressed data with dummy data to generate padded compressed data having the predetermined size; a data encoder that encodes the padded compressed data to generate redundancy data; and a memory interface circuit that sends the compressed data and the redundancy data, without the dummy data, to a memory bus.
The memory bus may connect to at least one nonvolatile memory array and the compressed data and redundancy data may be exclusively assigned to an area of the nonvolatile memory array that is equal in size to the predetermined size plus the size of the redundancy data. The data compression circuit may apply lossless quantized compression to generate compressed data that consists of an integer number of multi-byte units of data. The data encoder may be a Low Density Parity Check (LDPC) encoder. The controller may also include: a data decoding circuit that receives compressed data and redundancy data from the memory interface circuit, adds dummy data, and performs decoding to obtain decoded data; a data stripping circuit configured to remove the dummy data from the decoded data; and a decompressing circuit configured to decompress the decoded compressed data.
Additional aspects, advantages and features of the present invention are included in the following description of examples thereof, which description should be taken in conjunction with the accompanying drawings. All patents, patent applications, articles, technical papers and other publications referenced herein are hereby incorporated herein in their entirety by this reference.
An example of a prior art memory system, which may be modified to include various aspects of the present invention, is illustrated by the block diagram of
The data stored in the memory cells (M) are read out by the column control circuit 2 and are output to external I/O lines via an I/O line and a data input/output buffer 6. Program data to be stored in the memory cells are input to the data input/output buffer 6 via the external I/O lines, and transferred to the column control circuit 2. The external I/O lines are connected to a controller 9. The controller 9 includes various types of registers and other memory including a volatile random-access-memory (RAM) 10.
The memory system of
In addition to planar memories, such as shown in
Some memory systems perform Error Correction Code (ECC) encoding of data prior to storage of data in nonvolatile memory and then perform ECC decoding of the data after it is read from the nonvolatile memory. In this way, errors in the read data may be identified and corrected before the data is sent to a host. ECC encoding and decoding are often performed on a uniform sized unit of data (an ECC “word”) in a block encoding scheme. Redundancy data may be appended to the ECC word, in what may be considered a “system encoding” scheme.
In some memory systems, data may be compressed prior to storage, and decompressed when it is read from storage so that data occupies less space in the nonvolatile memory array. Examples of such compression are described in U.S. Pat. No. 7,529,905. Compression generally changes the size of a unit of data being handled, and may generate compressed data of variable size from fixed sized units of input data. Handling such variable sized data presents certain challenges.
One feature of many nonvolatile memories is that a page (the unit of reading and writing) has a fixed size that is determined by the physical design of the memory array. The size of a physical page may be chosen to hold an integer number of host units of data. When host units of data are compressed, the number of host units of data that can be stored in a page may be variable and may not be an integer number. Encoding variable sized units of data also requires an encoder that can handle such variable sized units. Thus, a simple block encoder is not compatible with such units.
According to an aspect of the present invention, compression is used to initially compress data that is received from a host. The compressed data is then padded with some dummy data (a predetermined pattern of data, which may be all Is, or all Os, or some other pattern). The padding is sufficient so that the size of the padded data is equal to an ECC word and can be encoded according to an ECC encoding scheme that uses a fixed-sized word. The size of the ECC word is generally the same as the unit sent by the host. ECC encoding is then performed to calculate redundancy data from the padded data. Subsequently, the dummy data is stripped from the encoded data, leaving just the compressed data and redundancy data. This encoded compressed data is then sent to a memory array for storage. This sequence may be reversed when the data is read from the memory array, with the data being padded with dummy data to a predetermined size for ECC decoding, then the decoded data being stripped of dummy data and decompressed.
There are several advantages to such a system. ECC encoding and decoding may be performed on uniform sized units so that the complexity of encoding variable sized units is avoided. Stripping of dummy data prior to sending the data to a memory array means that the amount of data being sent to the memory array is small. In many memory systems, a communication channel to a memory array is a bottle neck that impacts performance. For example, a memory bus between a memory controller, or Application Specific Integrated Circuit (ASIC), and one or more memory dies may limit performance of a memory system because of the large amount of data being transferred on such a bus. Reducing the data sent over such a bus may significantly reduce latency and improve performance.
In addition to reducing the amount of data sent to and from the memory array, there is less data to store in the memory array. This may reduce time required to store the data, power required to store the data, and reduce wear on memory cells.
A 4 KB unit of data 301 is received and is subject to compression by a compression circuit 303. The 4 KB portion of data is represented as eight boxes in
Compressed data 305 is sent to a padding circuit 307 where the data is padded by adding dummy data bits 309 so that the padded compressed data 311 has a predetermined size, in this case 4 KB. Thus, the size of the data unit is restored to the same size as the original uncompressed data 301. Padding may append a predetermined pattern of dummy bits. For simplicity, dummy data bits may be all logic 1, or all logic 0, or may be some pattern of logic 1 and logic 0. In this example, six sectors of dummy data are used to pad the two sectors of compressed data to generate eight sectors of padded compressed data. In other cases, a different number of sectors of dummy data may be added. For example, where five sectors of compressed data were generated, three sectors of dummy data would be needed. The amount of compressed data generated, or the amount of dummy data added, is recorded for later use (e.g. in a set of latches). The padded compressed data is then transferred to an encoding circuit.
The padded compressed data 311 is received by an encoding circuit 313, which may be an ECC encoding circuit using an ECC encoding scheme such as a Low Density Parity Check (LDPC) scheme, Reed-Solomon (RS) scheme, BCH scheme, Turbo code scheme, or other block encoding scheme. Because the padded compressed data 311 has been padded to be the size of an ECC word, the encoding circuit 313 can easily encode it according to any well-known block encoding scheme. Encoding generates some redundancy data, which in this example is one sector of redundancy data 315. In general, the more redundancy data generated the greater the number of errors that can be corrected. However, this comes at the expense of additional overhead. Aspects of the present invention are not limited to any particular level of redundancy and the example of one sector of redundancy data is for simplicity of illustration. The ECC scheme uses system encoding to simply append the redundancy data 315 to the padded compressed data 311 (as opposed to transforming the data in some way during encoding). Thus, the compressed data 305 and dummy data 309 remain the same after encoding, with redundancy data 315 simply appended as an additional sector. The padded compressed data 311 including the redundancy data 315 is then sent to a stripping circuit 317.
The stripping circuit 317 strips dummy data 309 to leave encoded compressed data 321, which is compressed data 305 and redundancy data 315. The amount of compressed data or dummy data may be communicated over a communication channel 319 from the padding circuit 307 to the stripping circuit 317 so that the correct amount of data is stripped. Thus, in this example, six sectors of dummy data 309 are stripped away to leave just two sectors of compressed encoded data 305 and one sector of redundancy data 315. This is less than the original eight sectors received prior to compression, and less than the nine sectors output by the ECC circuit. This smaller amount of data is then sent for storage in a memory array 323. For example, this data may be sent over a memory bus, such as a NAND bus in a NAND flash memory system such as a memory card, USB thumb drive, or SSD. Clearly, sending three sectors over a congested bus is generally preferable to sending nine sectors and may significantly reduce latency.
While
The encoded compressed data 321 may be stored in the memory array 323 in various ways.
By maintaining a uniform sized physical area for storage of each unit of data from the host, additional complexity of managing variable sized units in physical memory is avoided. Maintaining a uniform sized physical area allows for variable compression (including zero compression) and makes tracking of units of data easier (one eight-sector unit from a host maps to one nine-sector physical area in the memory array so there is a one-to-one mapping).
While the physical space allocated to a given unit, such as the eight sector unit described, may not be reduced in this example, the power consumed in programming may be significantly reduced. In some cases, the power needed to program memory cells increases directly with the number of memory cells. Thus, programming three sectors would take approximately one third of the power required to program nine sectors, a significant power saving.
A further benefit of this compression is reduced wear on any individual memory cell. For example, where three of nine sectors are written as above, this means that two out of three memory cells in the physical area are not programmed and do not need to be erased in a subsequent erase operation prior to reuse (i.e. they remain in the erased state throughout). Thus, where compressed data is stored in this manner, and wear is distributed across memory cells, individual memory cells are subject to fewer potentially-damaging operations and may show greater endurance. Thus, for a block with a given write-erase cycle count (“hot-count”), memory cells are less worn if data was compressed prior to storage than if it was not. Blocks may continue to operate at higher hot-counts in a memory system using compression than in a memory system that does not use compression because wear on individual cells may be less for a given hot-count.
After data is stored in a memory array, the data may be requested, for example, when a read command is received from a host.
The decoding circuit 327 receives the nine sectors of data and applies a decoding scheme to reverse the earlier encoding. However, decoding may not be uniformly applied across all received data. According to an aspect of the present invention, the decoding circuit may apply a decoding scheme that assumes all dummy bits are correct, i.e. when looking for bad bits, the encoder concentrates on the compressed data 305 and the redundancy data 315, not the dummy data 309. This focuses decoding on the data that was stored in the memory array (and may have become corrupted) instead of the dummy data, which is simply a predetermined pattern of bits that is unlikely to include bad bits. A form of soft-input decoding may be used, with dummy bits having a high likelihood (which may be certainty, or near certainty) of being correct and with compressed data and redundancy data having a lower likelihood of being correct. Thus, in trying to find a solution, the decoder circuit looks primarily at bits that were stored in memory array 323 to see which bits to flip. Such focused ECC may allow correction of stored data with a relatively high Bit Error Rate (BER) for a given scheme (or allow use of less redundancy data, and thus less overhead, for a given BER). Information regarding the amount of dummy data is received from padding circuit 325 over a communication channel 329 so that the encoder can assign different likelihoods (e.g. Log Likelihood Ratios) to dummy data and stored data. After decoding, the decoded compressed data 305 and dummy data 309 is sent to a stripping circuit 333.
The stripping circuit 333 removes dummy data 309, thus reversing earlier padding by the padding circuit 325, to leave only the decoded compressed data 305. Information regarding the amount of dummy data to strip is provided over communication channel 329. The decoded compressed data 305 is then sent to a decompression circuit 335.
The decompression circuit 335 reverses the compression performed by the compression circuit 303 to generate decompressed data from compressed data 305. Thus, two sectors of decoded compressed data 305 are transformed into eight sectors of decompressed data 301. This is the same as the original data 301 that may be returned to a host or otherwise used.
While
Data that is compressed and encoded for efficient transmission and storage may be stored in a number of ways. The example described above maintains dedicated uniform-sized areas of physical memory for each unit received, with each such physical area capable of storing an uncompressed unit of data. In one example, compressed data is simply written starting at the first location in a physical area. Thus, sectors of compressed data would generally be stored starting at the same physical locations each time an area is written. Some cells within such an area would experience high wear with others experiencing low wear.
According to an aspect of the present invention, compressed data (and redundancy data) is stored using offsets to change the starting locations of stored data within allocated physical areas in which they are stored.
Subsequently, when a second portion of data 445 is stored in the physical area 443, an offset d1 is used so that it starts at a different location as shown in
An alternative to a simple offset is shown in
While
In an example, where data is compressed prior to storage in a uniformly sized physical area, and the compressed data does not occupy the entire area assigned to it, portions of the physical area that do not store compressed data may be programmed so that their memory cells have at least some charge. For example, some dummy data may be written in such areas.
Although the various aspects of the present invention have been described with respect to exemplary embodiments thereof, it will be understood that the present invention is entitled to protection within the full scope of the appended claims. Furthermore, although the present invention teaches the method for implementation with respect to particular prior art structures, it will be understood that the present invention is entitled to protection when implemented in memory arrays with architectures than those described.
Claims
1. A method of operating a nonvolatile memory system comprising:
- receiving a portion of data;
- compressing the portion of data to obtain compressed data;
- padding the compressed data with dummy data so that the compressed data plus the dummy data forms a predetermined sized unit;
- encoding the predetermined sized unit to obtain redundancy data;
- subsequently stripping the dummy data and appending the redundancy data to obtain encoded compressed data; and
- sending the encoded compressed data to a nonvolatile memory die.
2. The method of claim 1 further comprising:
- receiving the encoded compressed data in the nonvolatile memory die; and
- subsequently writing the encoded compressed data in nonvolatile memory cells of the nonvolatile memory die.
3. The method of claim 2 further comprising:
- reading the encoded compressed data from the nonvolatile memory; and
- sending the encoded compressed data from the nonvolatile memory die.
4. The method of claim 3 further comprising:
- receiving the encoded compressed data from the nonvolatile memory die;
- padding the encoded compressed data to form a predetermined sized unit;
- decoding the predetermined sized unit to obtain decoded data;
- stripping padding data from the decoded data to obtain decoded compressed data; and
- decompressing the decoded compressed data.
5. The method of claim 1 wherein the compressing, padding, encoding, stripping and appending are performed in a memory controller that is connected to the nonvolatile memory die by a bus that carries the encoded compressed data.
6. The method of claim 1 wherein the portion of data is a 4 KB portion, the predetermined sized unit is a 4 KB sized unit, and the redundancy data is approximately 512 Bytes.
7. The method of claim 2 wherein the encoded compressed data is exclusively assigned to an area of the nonvolatile memory die that has a capacity equal to the predetermined sized unit plus the redundancy data.
8. The method of claim 7 wherein the nonvolatile memory die comprises a plurality of areas that individually have capacity equal to the predetermined sized unit plus the redundancy data.
9. The method of claim 8 further comprising varying physical locations of encoded compressed data within individual areas of the plurality of areas.
10. The method of claim 9 wherein the varying of physical locations of encoded compressed data comprises applying different offsets for starting locations of encoded compressed data in different areas.
11. A nonvolatile memory controller comprising:
- a data compression circuit that receives a portion of data of a predetermined size and generates compressed data;
- a data padding circuit that pads the compressed data with dummy data to generate padded compressed data having the predetermined size;
- a data encoder that encodes the padded compressed data to generate redundancy data; and
- a memory interface circuit that sends the compressed data and the redundancy data, without the dummy data, to a memory bus.
12. The nonvolatile memory controller of claim 11 wherein the memory bus connects to at least one nonvolatile memory array wherein the compressed data and redundancy data is exclusively assigned to an area of the nonvolatile memory array that is equal in size to the predetermined size plus the size of the redundancy data.
13. The nonvolatile memory controller of claim 11 wherein the data compression circuit applies lossless quantized compression to generate compressed data that consists of an integer number of multi-byte units of data.
14. The nonvolatile memory controller of claim 11 wherein the data encoder is a Low Density Parity Check (LDPC) encoder.
15. The nonvolatile memory controller of claim 11 further comprising:
- a data decoding circuit that receives compressed data and redundancy data from the memory interface circuit, adds dummy data, and performs decoding to obtain decoded data;
- a data stripping circuit configured to remove the dummy data from the decoded data; and
- a decompressing circuit configured to decompress the decoded compressed data.
Type: Application
Filed: Sep 3, 2013
Publication Date: Mar 5, 2015
Applicant: SANDISK TECHNOLOGIES INC. (PLANO, TX)
Inventors: Xinde Hu (SAN JOSE, CA), LEE M. GAVENS (MILPITAS, CA)
Application Number: 14/016,954
International Classification: G06F 11/10 (20060101); G06F 12/02 (20060101);