SYSTEMS AND METHODS FOR PROVIDING ERROR CODE DETECTION USING NON-POWER-OF-TWO FLASH CELL MAPPING
Systems, methods, and computer programs are disclosed for providing error detection or correction with flash cell mapping. One embodiment is a method comprising generating raw page data for a physical page in a main array of a flash memory device. The raw page data comprises less than a capacity of the physical page generated using a non-power-of-two flash cell mapping. One or more parity bits are generated for the raw page data using an error detection or correction scheme. The method stores the raw page data and the one or more parity bits in the physical page in the main array.
Non-volatile storage, such as flash storage, is incorporated in various types of computing devices, including portable communication devices (e.g., cellular telephones, smart phones, tablet computers, portable digital assistants (PDAs), portable game consoles, wearable devices, and other battery-powered devices). Flash memory, such as NAND flash, may comprise multi-level cell (MLC) storage comprising memory elements capable of storing more than a single bit of information. For example, MLC NAND flash is a flash memory technology using multiple levels per cell to allow more bits to be stored using the same number of transistors. Current MLC NAND flash typically uses two bits per cell and a paired-page scheme, which maps exactly two bits from two separate pages onto one cell transistor. In this manner, two logical pages of data may be stored in one physical page in flash memory.
Such systems may include error detection and/or correction techniques to enable reliable delivery of data to, and retrieval from, the NAND flash. Error detection and/or correction may add redundancy to NAND flash raw page data for the purpose of checking the consistency of data stored in the physical pages and/or recovering data determined to be corrupted. Existing techniques, however, are limited to power-of-two flash cell mapping schemes. Accordingly, there is a need for improved systems and methods for providing error code detection and/or correction mapping using flash cell mapping.
SUMMARY OF THE DISCLOSURESystems, methods, and computer programs are disclosed for providing error detection or correction with flash cell mapping. One embodiment is a method comprising generating raw page data for a physical page in a main array of a flash memory device. The raw page data comprises less than a capacity of the physical page generated using a non-power-of-two flash cell mapping. One or more parity bits are generated for the raw page data using an error detection or correction scheme. The method stores the raw page data and the one or more parity bits in the physical page in the main array.
Another embodiment is a system for providing error detection or correction with flash cell mapping. The system comprises a system on chip (SoC) coupled to a flash memory device. The SoC comprises a flash controller configured to generate raw page data for a physical page in a main array of the flash memory device. The raw page data comprises less than a capacity of the physical page generated using a non-power-of-two flash cell mapping. The flash controller generates one or more parity bits for the raw page data using an error detection or correction scheme. The raw page data is stored in the physical page with the one or more parity bits.
In the Figures, like reference numerals refer to like parts throughout the various views unless otherwise indicated. For reference numerals with letter character designations such as “102A” or “102B”, the letter character designations may differentiate two like parts or elements present in the same Figure. Letter character designations for reference numerals may be omitted when it is intended that a reference numeral to encompass all parts having the same reference numeral in all Figures.
The word “exemplary” is used herein to mean “serving as an example, instance, or illustration.” Any aspect described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other aspects.
In this description, the term “application” may also include files having executable content, such as: object code, scripts, byte code, markup language files, and patches. In addition, an “application” referred to herein, may also include files that are not executable in nature, such as documents that may need to be opened or other data files that need to be accessed.
The term “content” may also include files having executable content, such as: object code, scripts, byte code, markup language files, and patches. In addition, “content” referred to herein, may also include files that are not executable in nature, such as documents that may need to be opened or other data files that need to be accessed.
As used in this description, the terms “component,” “database,” “module,” “system,” and the like are intended to refer to a computer-related entity, either hardware, firmware, a combination of hardware and software, software, or software in execution. For example, a component may be, but is not limited to being, a process running on a processor, a processor, an object, an executable, a thread of execution, a program, and/or a computer. By way of illustration, both an application running on a computing device and the computing device may be a component. One or more components may reside within a process and/or thread of execution, and a component may be localized on one computer and/or distributed between two or more computers. In addition, these components may execute from various computer readable media having various data structures stored thereon. The components may communicate by way of local and/or remote processes such as in accordance with a signal having one or more data packets (e.g., data from one component interacting with another component in a local system, distributed system, and/or across a network such as the Internet with other systems by way of the signal).
In this description, the terms “communication device,” “wireless device,” “wireless telephone”, “wireless communication device,” and “wireless handset” are used interchangeably. With the advent of third generation (“3G”) wireless technology and four generation (“4G”), greater bandwidth availability has enabled more portable computing devices with a greater variety of wireless capabilities. Therefore, a portable computing device may include a cellular telephone, a pager, a PDA, a smartphone, a navigation device, or a hand-held computer with a wireless connection or link.
The system 100 comprises a system on chip (SoC) 102 electrically coupled to a flash memory device (e.g., NAND flash 104) and a volatile random access memory (VRAM), such as, a dynamic random access memory (DRAM) 106. The SoC 102 may be electrically coupled to the NAND flash 104 via a control bus 148 and a data bus 150. The SoC 102 may be electrically coupled to the DRAM 106 via a bus 152. The system 100 may be implemented in any computing device, including a personal computer, a workstation, a server, a portable computing device (PCD), such as a cellular telephone, a smartphone, a portable digital assistant (PDA), a portable game console, a navigation device, a tablet computer, a wearable device, such as a sports watch, a fitness tracking device, etc., or other battery-powered, web-enabled devices.
The SoC 102 comprises various on-chip components, including a central processing unit (CPU) 110 that executes an operating system (O/S) 126, a DRAM controller 112, static random access memory (SRAM) 116, read only memory (ROM) 114, a data compression component 118, and a flash controller 108 interconnected via a SoC bus 120. The SoC 102 may include one or more memory clients that request memory resources from the DRAM 106 and the NAND flash 104. The memory clients may comprise one or more processing units (e.g., central processing unit (CPU) 110, a graphics processing unit (GPU), a digital signal processor (DSP), etc.), a video encoder, or other clients requesting read/write access to the NAND flash 104 and the DRAM 106.
In the embodiment illustrated in
The NAND flash 104 comprises a controller 130 and a main array 122 for storing the physical pages 124. As described below in more detail, the CPU 110 residing on the SoC 102 reads and/or writes data in units of logical pages to the NAND flash 104 via the flash controller. The data is stored and retrieved from the physical pages 124 of the main array 122 along with error correction bit(s) generated/checked by error correcting code (ECC) module 136 (or other error detection and/or detection algorithms, as described below in connection with
ECC module 136 is configured to detect and/or correct multiple-bit errors during flash memory operations. For example, during a write operation to the NAND flash 104, the ECC module 136 may use the write data as input and then generate redundant parity check bits. The combined write data and parity check bits together form a unit known as a codeword and may be stored either separated (in spare array 128) or together in the main array 122. During a read operation, the ECC module 136 may use the retrieved data portion of the codeword to recompute the parity check bits and then compare these against the parity check bits portion of the codeword that was stored during the write operation. A mismatch between the read recomputed parity and the stored parity indicates a detected error. In addition, the parity check bits may be sufficient to provide multiple error correction within the codeword. In an embodiment for NAND flash memory, an error correcting block code may be employed that can correct up to 16 or more errors within a 4 KB page.
A logical-to-physical (L2P) page map module 138 performs the mapping of the logical pages to the physical pages 124. The O/S 126 is only aware of logical page addresses, and the L2P page map module 138 handles the logical-to-physical page mapping by keeping track of pages 124 in the main array 122. A wear leveling module 134 may interface with the L2P page map module 138 so that the number of program and erase cycles experienced by any page 124 is uniform across the main array 122. The flash controller 108 further comprises I/O device(s) 140 for communicating with the NAND flash 104.
Referring to
In operation, the data compression component 118 compresses data and sends one or more compressed logical pages to the flash controller 108. The compressed logical pages may be variable in size depending on the strength of the compression algorithms and the compressibility of the data. Compression metadata may be generated from the data compression 118, the L2P page map module 138, and the concatenate module 146 and added to a header associated with each compressed page. Compression metadata may comprise, for example, the type of compression algorithm, a logical address, a physical address, a size, and a last pointer which is an index to quickly locate compressed pages within the physical page. In an exemplary embodiment, a single physical page may concatenate and fit five compressed pages. The last pointer for the first compressed page may point to the second compressed page. The last pointer for the second compressed page may point to the third compressed page, and so forth. The last pointer for the final, fifth compressed may be null, which may be used to indicate that there are no more compressed pages. It should be appreciated that this is merely one possible implementation, and alternative embodiments may be used to rapidly seek any of the multiple compressed pages that may be packed into a single physical page. The logical address may specify an address the CPU 110 is accessing. The physical address may specify the actual location in the NAND flash 105 as determined by the L2P page map module. The size may specify the size (e.g., in bytes) of the data after compression as determined by the compression component 118. The last pointer may specify the position of the compressed page within the physical page and whether the compressed page is the last of multiple compressed pages within a current physical page as determined by the concatenate module 146.
The compression metadata may also indicate whether a logical page has been compressed. It should be appreciated that the data may comprise pre-compressed data (e.g., MOV, MP4, AVI, AAC, and JPG containers). The data compression component 118 may attempt to compress these or other types of containers but terminate early if it is determined that the logical block is incompressible. In this case, the logical page data may remain the original logical page size.
The concatenate module 146 may inspect the incoming logical page headers which include compression and size metadata, and perform a best-effort concatenation of multiple compressed logical pages. In an embodiment, the concatenation may result in no fewer than two logical pages for each physical page 124, which is equivalent to conventional MLC capacity. It should be appreciated, however, that depending on the data compression and the effectiveness of the concatenation process more than two logical pages may be mapped to a single physical page 124. During the concatenation step, the last pointer metadata may be produced by concatenate module 146 and inserted into the header for the respective logical page.
After the compression and concatenation of the logical pages, the transformation module 142 may temporarily store the pages in RAM 144, and then transform the binary bits to a quinary representation.
For each physical page 124 that is concatenated and transformed, the binary representation of the quinary bits are transmitted conventionally over the data bus 150. For example, quinary 5 may be transmitted using binary 101, either in parallel or serially. Within the NAND flash 104, the binary representation of each quinary bit (e.g., 101 in the case of quinary 5) is then converted to a true quinary voltage (e.g., 5 V) via D/A converter 132.
When retrieving data from the NAND flash 104, the above steps may be reversed. For instance, the quinary voltage on the cell within a physical page 124 may be sensed and then converted by A/D converter 132. The 3-bit representation for each quinary bit returns over the data bus 150, where it may be reverse transformed by transformation module 142 and split by concatenate module 146.
It should be appreciated that the quinary flash cell mapping described above may significantly improve data capacity compared to existing 2-bit MLC techniques. For example, referring to
As mentioned above, the quinary flash cell mapping provided by the system 100 increases the capacity of the NAND flash 104 relative to conventional 4-level MLC without the voltage margin problems encountered in existing 8-level implementations.
It should be appreciated that the error correction and/or detection component(s) 704 may support any desirable schemes for adding redundancy to the raw page data 702 for the purpose of checking the consistency of the data stored in the physical pages 124 and/or recovering data determined to be corrupted. The error detection and/or correction schemes may be systematic or non-systematic. In a systematic scheme, the flash controller 108 may send the original data and append a fixed number of check bits (or parity data), forming a codeword, which are derived by multiplying the data bits by the codeword generator matrix. Upon reading back the codeword, a syndrome is calculated by taking the product of the codeword (which may have errors in it) and the parity check matrix. If the syndrome contains non-zero elements, an error has occurred at some point during the storage of data, and the position of the non-zero elements within the syndrome can be used to identify and correct the errors. If the system 100 uses a non-systematic code, the codewords are generated using a different generator matrix, resulting in a codeword that is not a simple concatenation of the original data and the parity check bits. However, it should be appreciated that functionally they may be processed similarly using the generator matrix to create the codeword and using the parity check matrix to correct any errors. The error detection and/or correction schemes may be binary or non-binary. In a binary scheme, the original data, generator matrix and parity check matrix may operate using binary values. In a non-binary scheme, the original data may be converted into symbols and the generator matrix and parity check matrix operations may use higher order field arithmetic based on the symbol size. For example, a binary scheme may use order 2 arithmetic whereas non-binary schemes may use higher order (e.g., order 3, 4, 5, or greater). The error detection/or correction schemes may further be unshortened, shortened, lengthened, augmented, or punctured, referring to the use of codewords that may be shortened or lengthened for the purpose of fitting into the space available without significantly compromising error correction performance. The error detection/or correction schemes may be multi-staged or concatenated, where two or more independent error correction schemes are successively applied to the data.
It should be further appreciated that various types and categories of error correction and/or detection techniques may be implemented in the system 700. In an embodiment, the error correction and/detection component(s) 704 may comprise block codes (e.g., linear codes, system codes, or non-systematic codes, as described above) or convolutional codes (e.g., Viterbi, Reed-Solomon, Tornado, etc.). In further embodiments, error correcting codes may comprise any of the following, or other codes: Bose-Chaudhuri-Hocquenghem codes, cyclical codes, Hamming codes, Reddy codes, finite field-based codes, etc. It should be further appreciated that codes may be concatenated forming an inner and an outer code. Inner and outer convolutional codes may be concatenated, as well as inner and outer block codes (e.g., Hamming code using varying parameterization). Concatenating such codes may form an inner ECC and an outer ECC. One of ordinary skill in the art will appreciate that concatenating different forms of codes and/or parameterizations of like codes together may improve ECC performance for various system implementations.
As further illustrated in
An outer ECC is generated by outer ECC module 902. Because there is no free space in Page A, Page B, spare array A, or spare array B, the outer ECC parity bits for Page A (i.e., outer ECC 1002) are stored in a Page X. Outer ECC 1002 may only use a portion of the space in the Page X and, therefore, the outer ECC 1004 for other pages, such as a Page N, may be consolidated in Page X. In total, there may be multiple pages for storing the outer ECCs. The outer ECC pages, such as Page X, also have an inner ECC (not shown) that is stored in a spare array X (not shown). The flash cell voltages for binary bits a0 and bo in Page A and Page B, respectively, are shown in columns 1010, 1012, and 1014. In the “base 2” mode illustrated in
It should be appreciated that, with the additional capacity afforded by quinary flash cell mapping, the inner ECC may reside with the raw page data in the main array 122. As illustrated in the example of
As mentioned above, the system 100 may be incorporated into any desirable computing system.
A display controller 328 and a touch screen controller 330 may be coupled to the CPU 1302. In turn, the touch screen display 1406 external to the on-chip system 322 may be coupled to the display controller 328 and the touch screen controller 330.
Further, as shown in
As further illustrated in
As depicted in
It should be appreciated that one or more of the method steps described herein may be stored in the memory as computer program instructions, such as the modules described above. These instructions may be executed by any suitable processor in combination or in concert with the corresponding module to perform the methods described herein.
Certain steps in the processes or process flows described in this specification naturally precede others for the invention to function as described. However, the invention is not limited to the order of the steps described if such order or sequence does not alter the functionality of the invention. That is, it is recognized that some steps may performed before, after, or parallel (substantially simultaneously with) other steps without departing from the scope and spirit of the invention. In some instances, certain steps may be omitted or not performed without departing from the invention. Further, words such as “thereafter”, “then”, “next”, etc. are not intended to limit the order of the steps. These words are simply used to guide the reader through the description of the exemplary method.
Additionally, one of ordinary skill in programming is able to write computer code or identify appropriate hardware and/or circuits to implement the disclosed invention without difficulty based on the flow charts and associated description in this specification, for example.
Therefore, disclosure of a particular set of program code instructions or detailed hardware devices is not considered necessary for an adequate understanding of how to make and use the invention. The inventive functionality of the claimed computer implemented processes is explained in more detail in the above description and in conjunction with the Figures which may illustrate various process flows.
In one or more exemplary aspects, the functions described may be implemented in hardware, software, firmware, or any combination thereof If implemented in software, the functions may be stored on or transmitted as one or more instructions or code on a computer-readable medium. Computer-readable media include both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that may be accessed by a computer. By way of example, and not limitation, such computer-readable media may comprise RAM, ROM, EEPROM, NAND flash, NOR flash, M-RAM, P-RAM, R-RAM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium that may be used to carry or store desired program code in the form of instructions or data structures and that may be accessed by a computer.
Also, any connection is properly termed a computer-readable medium. For example, if the software is transmitted from a website, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (“DSL”), or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium.
Disk and disc, as used herein, includes compact disc (“CD”), laser disc, optical disc, digital versatile disc (“DVD”), floppy disk and blu-ray disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.
Alternative embodiments will become apparent to one of ordinary skill in the art to which the invention pertains without departing from its spirit and scope. Therefore, although selected aspects have been illustrated and described in detail, it will be understood that various substitutions and alterations may be made therein without departing from the spirit and scope of the present invention, as defined by the following claims.
Claims
1. A method providing error detection or correction with flash cell mapping, the method comprising:
- a flash controller transforming logical page data from a binary representation to a non-power-of-two representation defining raw page data for a physical page in a main array of a flash memory device, the raw page data comprising less than a capacity of the physical page using a non-power-of-two flash cell mapping;
- generating one or more parity bits for the raw page data using an error detection or correction scheme; and
- storing the raw page data and the one or more parity bits in the physical page in the main array.
2. The method of claim 1, wherein the error detection or correction scheme comprises an error code correction (ECC) algorithm.
3. The method of claim 2, wherein the one or more parity bits generated by the ECC algorithm comprises an inner ECC generated for the raw page data and an outer ECC generated for a combination of the raw page data and the inner ECC.
4. The method of claim 3, wherein the inner ECC is stored in the physical page with the raw page data, and the outer ECC is stored in a spare array associated with the physical page.
5. The method of claim 2, further comprising concatenating a plurality of ECC codes generated by the ECC algorithm.
6. The method of claim 1, wherein the non-power-of-two flash cell mapping comprises a quinary mapping scheme for transforming binary data in one or more logical pages to a plurality of quinary bits.
7. The method of claim 6, wherein the quinary mapping scheme transforms a 9-tuple of binary bits to a 4-tuple of quinary bits.
8. A system for providing error detection or correction with flash cell mapping, the system comprising:
- means for transforming logical page data from a binary representation to a non-power-of-two representation defining raw page data for a physical page in a main array of a flash memory device, the raw page data comprising less than a capacity of the physical page using a non-power-of-two flash cell mapping;
- means for generating one or more parity bits for the raw page data using an error detection or correction scheme; and
- means for storing the raw page data and the one or more parity bits in the physical page in the main array.
9. The system of claim 8, wherein the means for generating the one or more parity bits for the raw page data comprises an error code correction (ECC) algorithm.
10. The system of claim 9, wherein the ECC algorithm generates an inner ECC for the raw page data and an outer ECC for a combination of the raw page data and the inner ECC.
11. The system of claim 10, wherein the inner ECC is stored in the physical page with the raw page data, and the outer ECC is stored in a spare array associated with the physical page.
12. The system of claim 9, further comprising: means for concatenating a plurality of ECC codes generated by the ECC algorithm.
13. The system of claim 8, wherein the non-power-of-two flash cell mapping comprises: means for transforming binary data in one or more logical pages to a plurality of quinary bits.
14. The system of claim 13, wherein the means for transforming the binary data to the plurality o quinary bits comprises: means for transforming a 9-tuple of binary bits to a 4-tuple of quinary bits.
15. A computer program embodied in a memory and executable by a processor for providing error detection or correction with flash cell mapping, the computer program comprising logic configured to:
- transform logical page data from a binary representation to a non-power-of-two representation defining raw page data for a physical page in a main array of a flash memory device, the raw page data comprising less than a capacity of the physical page using a non-power-of-two flash cell mapping;
- generate one or more parity bits for the raw page data using an error detection or correction scheme; and
- store the raw page data and the one or more parity bits in the physical page in the main array.
16. The computer program of claim 15, wherein the error detection or correction scheme comprises an error code correction (ECC) algorithm.
17. The computer program of claim 16, wherein the one or more parity bits generated by the ECC algorithm comprises an inner ECC generated for the raw page data and an outer ECC generated for a combination of the raw page data and the inner ECC.
18. The computer program of claim 17, wherein the inner ECC is stored in the physical page with the raw page data, and the outer ECC is stored in a spare array associated with the physical page.
19. The computer program of claim 16, further comprising logic configured to concatenate a plurality of ECC codes generated by the ECC algorithm.
20. The computer program of claim 15, wherein the non-power-of-two flash cell mapping comprises a quinary mapping scheme for transforming binary data in one or more logical pages to a plurality of quinary bits.
21. The computer program of claim 20, wherein the quinary mapping scheme transforms a 9-tuple of binary bits to a 4-tuple of quinary bits.
22. A system for providing error detection or correction with flash cell mapping, the system comprising:
- a system on chip (SoC) coupled to a flash memory device; and
- a flash controller residing on the SoC configured to: transform logical page data from a binary representation to a non-power-of-two representation defining raw page data for a physical page in a main array of the flash memory device, the raw page data comprising less than a capacity of the physical page using a non-power-of-two flash cell mapping; generate one or more parity bits for the raw page data using an error detection or correction scheme; and store the raw page data and the one or more parity bits in the physical page in the main array.
23. The system of claim 22, wherein the error detection or correction scheme comprises an error code correction (ECC) algorithm.
24. The system of claim 23, wherein the one or more error bits generated by the ECC algorithm comprises an inner ECC generated for the raw page data and an outer ECC generated for a combination of the raw page data and the inner ECC.
25. The system of claim 24, wherein the inner ECC is stored in the physical page with the raw page data, and the outer ECC is stored in a spare array associated with the physical page.
26. The system of claim 23, wherein the flash controller is further configured to concatenate a plurality of ECC codes generated by the ECC algorithm.
27. The system of claim 22, wherein the non-power-of-two flash cell mapping comprises a quinary mapping scheme for transforming binary data in one or more logical pages to a plurality of quinary bits.
28. The system of claim 27, wherein the quinary mapping scheme transforms a 9-tuple of binary bits to a 4-tuple of quinary bits.
29. The system of claim 27, wherein the SoC and the flash memory device are incorporated in a portable communication device.
30. The system of claim 29, wherein the portable communication device comprises one of a smartphone, a tablet computer, and a portable gaming device.
Type: Application
Filed: Apr 17, 2017
Publication Date: Aug 3, 2017
Patent Grant number: 10055284
Inventors: RICHARD ALAN STEWART (SAN DIEGO, CA), DEXTER TAMIO CHUN (SAN DIEGO, CA)
Application Number: 15/489,621