This Application claims the benefit of priority to Taiwan Patent Application No. 99146318, filed on Dec. 28, 2010, the entirety of which is incorporated by reference herein.
1. Field of the Invention
The invention relates to memories, and more particularly to flash memories.
2. Description of the Related Art
An ordinary data storage device comprises a controller and a flash memory and stores data for a host. When the host wants to store data to the data storage device, the host sends a write command to the data storage device, and the controller then writes data to the flash memory according to the write command. When the host wants to read data from the data storage device, the host sends a read command to the data storage device, and the controller then reads data from the flash memory and sends the data back to the host.
Flash memories are divided into single-level-cell (SLC) flash memories, multiple-level-cell (MLC) flash memories, and triple-level-cell (TLC) flash memories. A memory cell of an SLC flash memory can only store a single data bit. The SLC flash memory therefore has small data capacity, fast data access speeds, and long data retention periods. A memory cell of an MLC flash memory stores two data bits. A memory cell of a TLC flash memory can store three data bits. The TLC flash memory therefore has large data capacity, slow data access speeds, and short data retention periods.
To lower manufacturing costs of flash storage devices, MLC flash memories and TLC flash memories are preferred by manufacturers of the data storage devices, thereby increasing the data capacity of the data storage devices with limited costs. Because data retention periods of MLC flash memories and TLC flash memories are shorter than those of SLC flash memories, the data stored to the MLC flash memories and the TLC flash memories must be processed with a data shaping process. The data shaping process may be a scrambling process or a data interleaving process. A new-version controller is equipped with the function of the data shaping process to process the data to be written to the MLC flash memories and the TLC flash memories and to decode the data read from the MLC flash memories and the TLC flash memories.
An old-version controller, however, is not equipped with the data shaping function to process data to be written to the MLC flash memories and the TLC flash memories. The old-version controller therefore can only be used to control SLC flash memories. The old-version controller therefore cannot be used to control the MLC flash memories and the TLC flash memories. Data capacity of the data storage devices comprising the old-version controllers is therefore low. To increase data capacity of data storage devices comprising old-version controllers, a method for making a data storage device comprising an old-version controller, usable, to control a MLC flash memory or a TLC flash memory is therefore required.
The invention provides a data storage device. In one embodiment, the data storage device comprises a first flash memory, a second flash memory, and a controller. The first flash memory stores a first data shaping driver, wherein the first data shaping driver performs a data shaping function. The second flash memory stores user data. The controller enables the first flash memory and disables the second flash memory after the data storage device is turned on, detects whether a second data shaping driver has been installed on a host when the host is connected to the data storage device, installs the first data shaping driver to the host as the second data shaping driver if the second data shaping driver has not been installed on the host, and disables the first flash memory and enables the second flash memory after the first data shaping driver has been installed to the host.
The invention provides an operation method of a data storage device. In one embodiment, the data storage device comprises a first flash memory storing a first data shaping driver and a second flash memory storing user data, and the first data shaping driver performs a data shaping function. After the data storage device is turned on, the first flash memory is enabled and the second flash memory is disabled. When the host is connected to the data storage device, whether a second data shaping driver has been installed on a host is detected. If the second data shaping driver has not been installed on the host, the first data shaping driver is installed to the host as the second data shaping driver. After the first data shaping driver has been installed to the host, the first flash memory is disabled and the second flash memory is enabled.
A detailed description is given in the following embodiments with reference to the accompanying drawings.
The 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.
Referring to
When the host 102 wants to read third read-out data from the data storage device 104, the controller 112 first reads first read-out data from the flash memory 114. The error correction code encoder 128 then decodes the first read-out data to obtain second read-out data. The data shaping module 126 then converts the second read-out data to the third read-out data according to an inverse data shaping process. The controller 112 then sends the third read-out data to the host 102.
Referring to
Although the controller 212 of the data storage device 204 does not have a data shaping function, and the second flash memory 214 storing user data is an MLC flash memory or a TLC flash memory, the controller 212 can still write data obtained from the host into the second flash memory 214. When the data storage device 204 is connected to the host 202, the controller 212 detects whether a data shaping driver 256 has been installed on the host 202. If there is no data shaping driver 256 installed on the host 202, the controller 212 of the data storage device 204 automatically installs the data shaping driver 232 stored in the first flash memory 232 to the host 202 as the data shaping driver 256. After the data shaping driver 256 has been installed on the host 202, when the host 202 wants to write original data to the data storage device 204, the data shaping driver 256 processes the original data according to the data shaping function to obtain processed data, and sends the processed data to the data storage device 204. The controller 212 then writes the processed data to the second flash memory 214, and the processed data stored in the second flash memory 214 therefore has a long data retention period due to the data shaping processing. When the host 202 wants to read the processed data from the data storage device 204, after the host 202 receives the processed data from the data storage device 204, the data shaping driver 256 recovers the original data from the processed data according to am inverse data shaping function. The host 202 can then use the recovered original data.
Referring to
If the data shaping driver 256 has not been installed on the host 202, the controller 212 reads the data shaping driver 232 from the first flash memory 216, and installs the data shaping driver 232 to the host 202 as the data shaping driver 256 (step 310). If the data shaping driver 256 has been installed on the host 202, the controller 212 does not install the data shaping driver 232 to the host 202. The controller 212 then disables the first flash memory 216 (step 312), and enables the second flash memory 214 (step 314). The host 202 can only detect the second flash memory 214 for user data storage in the data storage device 204, and therefore takes the device 204 as a data storage device.
Referring to
Referring to
While the invention has been described by way of example and in terms of preferred embodiment, it is to be understood that the invention is not limited thereto. To 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.
Number | Date | Country | Kind |
---|---|---|---|
99146318 | Dec 2010 | TW | national |