Field of the Invention
The present invention relates to data storage devices with flash memory and flash memory control methods.
Description of the Related Art
Flash memory, a data storage medium, is common in today's data storage devices. For example, flash memory is typically used in memory cards, USB flash devices, solid-state drives, and so on. In another application with multi-chip package technology, a NAND flash chip and a controller chip are combined in one package as an embedded multi-media card (eMMC).
A flash memory device provides storage space which is divided into blocks, and each block includes a plurality of physical pages. An erase operation designed for flash memory is performed on a block-by-block basis, to release space one block at a time. When updating data, the new data is written into a spare space rather than being overwritten on the old data. Thus, it is more complex to manage a flash memory rather than other conventional storage mediums, especially if the flash memory architecture is more complex (comprising multi-level cells and single-level cells).
A data storage device with flash memory and a flash memory control method are disclosed, in which the flash memory includes multi-level cells and single-level cells. The ways to separate the random data and the sequential data when writing data into the flash memory are shown.
A data storage device in accordance with an exemplary embodiment of the disclosure comprises a flash memory and a control unit. The flash memory includes multi-level cells and single-level cells and is divided into a plurality of blocks with each block comprising a plurality of physical pages. The control unit couples the flash memory to a host and comprises a microcontroller and a random access memory. The microcontroller is configured to use the random access memory to cache data issued from the host before writing the data into the flash memory. The microcontroller is further configured to allocate the blocks of the flash memory to provide a first run-time write block containing multi-level cells and a second run-time write block containing single-level cells. Under control of the microcontroller, each physical page of data uploaded from the random access memory to the first run-time write block contains sequential data, and random data cached in the random access memory to form one physical page is written into the second run-time write block.
A flash memory control method in accordance with an exemplary embodiment of the disclosure comprises the following steps: providing a random access memory for a flash memory including multi-level cells and single-level cells and divided into a plurality of blocks with each block comprising a plurality of physical pages; using the random access memory to cache data issued from a host before writing the data into the flash memory; and allocating the blocks of the flash memory to provide a first run-time write block containing multi-level cells and a second run-time write block containing single-level cells. Note that each physical page of data uploaded from the random access memory to the first run-time write block contains sequential data, and random data cached in the random access memory to form one physical page is written into the second run-time write block.
A detailed description is given in the following embodiments with reference to the accompanying drawings.
The present invention can be more fully understood by reading the subsequent detailed description and examples with references made to the accompanying drawings, wherein:
The following description is of the best-contemplated mode of carrying out the invention. This description is made for the purpose of illustrating the general principles of the invention and should not be taken in a limiting sense. The scope of the invention is best determined by reference to the appended claims.
In the flash memory 304, the blocks are allocated for several purposes. Blocks 308 store in-system programs (ISPs). Blocks 310 are spare blocks containing MLCs. Blocks 312 are spare blocks containing SLCs. Two run-time write blocks R_MLC and R_SLC are allocated from the spare blocks 310 (containing MLCs) and the spare blocks 312 (containing SLCs), respectively, for reception of write data, which will be pushed into the data pool 314 as data blocks. The flash memory 304 may further contain free blocks not shown in the figure.
The control unit 306 coupling the flash memory 304 to the host 302 comprises a microcontroller 320, a random access memory 322 and a read-only memory 324. A ROM code is stored in the read-only memory 324. The microcontroller 320 is configured to operate the flash memory 304 by executing the ROM code stored in the read-only memory 324 or/and by executing the ISPs stored in the blocks 308 of the flash memory 304. The control and management of the flash memory 304 are discussed in the following paragraphs.
The microcontroller 320 is configured to perform the block allocation of the flash memory 304 (e.g. allocating the flash memory 304 to provide the two run-time write blocks R_MLC and R_SLC). The microcontroller 320 is further configured to use the random access memory 322 to collect data issued from the host 302 before writing the data into the flash memory 304. As shown, four host pages HA, HB, HC and HD cached in the random access memory 322 are combined together as one physical page of data Cached_Data to be written into one physical page of the flash memory 304. According to the microcontroller 320, each physical page of data uploaded from the random access memory 322 to the run-time write block R_MLC contains sequential data, and random data cached in the random access memory 322 to form one physical page is written into the run-time write block R_SLC.
According to the flowchart of
Any technique using the aforementioned concept to control a flash memory is within the scope of the invention. The invention further involves flash memory control methods, which are not limited to any specific controller architecture.
While the invention has been described by way of example and in terms of the preferred embodiments, it is to be understood that the invention is not limited to the disclosed embodiments. On the contrary, it is intended to cover various modifications and similar arrangements (as would be apparent to those skilled in the art). Therefore, the scope of the appended claims should be accorded the broadest interpretation so as to encompass all such modifications and similar arrangements.
This application claims the benefit of U.S. Provisional Application No. 61/920,830, filed Dec. 26, 2013, the entirety of which is incorporated by reference herein.
Number | Name | Date | Kind |
---|---|---|---|
6895490 | Moore et al. | May 2005 | B1 |
6970890 | Bruce et al. | Nov 2005 | B1 |
6988175 | Lasser | Jan 2006 | B2 |
7603525 | Lasser | Oct 2009 | B2 |
7886108 | Lee et al. | Feb 2011 | B2 |
7904635 | Deng et al. | Mar 2011 | B2 |
8078794 | Lee et al. | Dec 2011 | B2 |
8352706 | Yano et al. | Jan 2013 | B2 |
8688894 | Kuehne | Apr 2014 | B2 |
9311006 | Moshayedi | Apr 2016 | B2 |
9355028 | Cheng | May 2016 | B2 |
20030163630 | Aasheim et al. | Aug 2003 | A1 |
20040268063 | Lasser | Dec 2004 | A1 |
20060282644 | Wong | Dec 2006 | A1 |
20070021963 | Deng et al. | Jan 2007 | A1 |
20080104309 | Cheon | May 2008 | A1 |
20080126680 | Lee et al. | May 2008 | A1 |
20080215800 | Lee et al. | Sep 2008 | A1 |
20090144501 | Yim et al. | Jun 2009 | A2 |
20090172262 | Olbrich et al. | Jul 2009 | A1 |
20090240871 | Yano et al. | Sep 2009 | A1 |
20090240873 | Yu et al. | Sep 2009 | A1 |
20090327589 | Moshayedi | Dec 2009 | A1 |
20090327591 | Moshayedi | Dec 2009 | A1 |
20090327840 | Moshayedi | Dec 2009 | A1 |
20100082883 | Chen et al. | Apr 2010 | A1 |
20100169551 | Yano et al. | Jul 2010 | A1 |
20100174851 | Leibowitz et al. | Jul 2010 | A1 |
20100257308 | Hsu | Oct 2010 | A1 |
20100306451 | Johnson | Dec 2010 | A1 |
20110055458 | Kuehne | Mar 2011 | A1 |
20110289255 | Wang et al. | Nov 2011 | A1 |
20120239862 | Seo et al. | Sep 2012 | A1 |
20120297121 | Gorobets et al. | Nov 2012 | A1 |
20120311245 | Yano et al. | Dec 2012 | A1 |
20130304975 | Wang et al. | Nov 2013 | A1 |
20130326120 | Cheng | Dec 2013 | A1 |
20130326169 | Shaharabany | Dec 2013 | A1 |
20140006898 | Sharon | Jan 2014 | A1 |
20140101369 | Tomlin et al. | Apr 2014 | A1 |
20140122776 | El Maghraoui | May 2014 | A1 |
20140136753 | Tomlin et al. | May 2014 | A1 |
20150261444 | Yoshii | Sep 2015 | A1 |
Number | Date | Country |
---|---|---|
201142589 | Dec 2011 | TW |
201305817 | Feb 2013 | TW |
201348958 | Dec 2013 | TW |
201348959 | Dec 2013 | TW |
WO 2012158514 | Nov 2012 | WO |
Entry |
---|
Non-Final Office Action mailed Apr. 18, 2016, issued in U.S. Appl. No. 14/534,488. |
Non-Final Office Action issued Jun. 30, 2016, in U.S. Appl. No. 14/534,633. |
Office Action dated May 26, 2016, issued in U.S. Appl. No. 14/534,686. |
Office Action dated Jun. 21, 2016, issued in U.S. Appl. No. 14/534,535. |
Number | Date | Country | |
---|---|---|---|
20150186262 A1 | Jul 2015 | US |
Number | Date | Country | |
---|---|---|---|
61920830 | Dec 2013 | US |