The disclosure generally relates to storage devices and, more particularly, to methods and apparatuses for controlling different types of storage units.
Flash memory devices typically include NOR flash devices and NAND flash devices. NOR flash devices are random access—a host accessing a NOR flash device can provide the device any address on its address pins and immediately retrieve data stored in that address on the device's data pins. NAND flash devices, on the other hand, are not random access but serial access. It is not possible for NOR to access any random address in the way described above. Instead, the host has to write into the device a sequence of bytes which identifies both the type of command requested (e.g. read, write, erase, etc.) and the address to be used for that command. The address identifies a page (the smallest chunk of flash memory that can be written in a single operation) or a block (the smallest chunk of flash memory that can be erased in a single operation).
Storage space of a mass storage device may be practiced by NAND flash memory device including numerous Tripe Level Cells (TLCs) for storing huge data. However, the programming of TLCs consumes longer time. TLCs additionally require time to perform wear leveling operations for extending their life service. The application flexibility is not enough for a host if the storage space of the mass storage device incorporating with only TLCs, for example, unsuitable for fast retrieving cold data. Thus, it is desirable to have a method and an apparatus for controlling different types of storage units to overcome the above limitations.
In an aspect of the invention, an apparatus for controlling different types of storage units is introduced to at least include: an interface and a processing unit. The interface is connected to at least two types of storage units, which include at least a nonvolatile hybrid memory. The processing unit is configured to operably access data of the different types of storage units through the interface.
In another aspect of the invention, a method for controlling different types of storage units, performed by a processing unit when loading and executing software or firmware instructions, is introduced to include: configuring an interface in a first operating mode, wherein the interface comprises a plurality of channels, each channel is connected to a first type and a second type of storage units, and the first operating mode corresponds to the first type of storage units; driving the interface to issue a first signal to enable the first type of storage units of different channels; driving the interface to access data of the first type of storage units, and reconfiguring the interface in a second operating mode corresponding to the second type of storage units before accessing data of the second type of storage units.
In still another aspect of the invention, a method for controlling different types of storage units, performed by a processing unit when loading and executing software or firmware instructions, is introduced to include: during a system booting stage, initializing a non-volatile hybrid memory; reading a parameter for configuring a flash memory, and an In-System Programming (ISP) code from the hybrid memory; initializing the flash memory according to the parameter; and executing the ISP code to enter a normal mode and wait for a command issued by a host.
Both the foregoing general description and the following detailed description are examples and explanatory only, and are not restrictive of the invention as claimed.
Reference is made in detail to embodiments of the invention, which are illustrated in the accompanying drawings. The same reference numbers may be used throughout the drawings to refer to the same or like parts, components, or operations.
The present invention will be described with respect to particular embodiments and with reference to certain drawings, but the invention is not limited thereto and is only limited by the claims. It will be further understood that the terms “comprises,” “comprising,” “includes” and/or “including,” when used herein, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
Use of ordinal terms such as “first”, “second”, “third”, etc., in the claims to modify a claim element does not by itself connote any priority, precedence, or order of one claim element over another or the temporal order in which acts of a method are performed, but are used merely as labels to distinguish one claim element having a certain name from another element having the same name (but for use of the ordinal term) to distinguish the claim elements.
It will be understood that when an element is referred to as being “connected” or “coupled” to another element, it can be directly connected or coupled to the other element or intervening elements may be present. In contrast, when an element is referred to as being “directly connected” or “directly coupled” to another element, there are no intervening elements present. Other words used to describe the relationship between elements should be interpreted in a like fashion (e.g., “between” versus “directly between,” “adjacent” versus “directly adjacent.” etc.)
Refer to
In some embodiments for reducing hardware cost, the data storage device may be simplified to include any two or three of the DRAM 151, the DRAM-like memory 153, the flash memory 171 and the flash-like memory 173. In alternative embodiments for reducing hardware cost, the data storage device may be simplified to exclude the DRAM 151 and the DRAM-like memory 153, such that the memory controller 130 can be simplified to exclude the dual-mode memory I/F 137 or disable the functions of the dual-mode memory I/F 137.
The flash memory 171 provides huge storage space, typically in hundred gigabytes (GBs) or even terabytes (TBs), for storing huge user data, for example, high-resolution images, videos, or others. Memory units of the flash memory 171 may be Triple Level Cells (TLCs) or Quad-Level Cells (QLCs). The DRAM 151 may be used to buffer user data come from the host 110 or the flash memory 171 and also buffer a portion of or all the logical-physical address mapping (L2P) table. The DRAM 151 may store firmware and variables required by the data storage device in operation.
The memory controller 130 includes a processing unit 131 and communicates with the host 110 through the host I/F 135. The host I/F 135 may be Universal Flash Storage (UFS), Non-Volatile Memory Express (NVMe), Universal Serial Bus (USB), Advanced Technology Attachment (ATA), Serial Advanced Technology Attachment (SATA), Peripheral Component Interconnect Express (PCI-E), or others. Any of the host 110 and the processing unit 131 may be implemented in numerous ways, such as with general-purpose hardware (e.g., a single processor, a multiprocessor or graphics processing units (GPUs) capable of parallel computations, or others) that is programmed using firmware or software instructions to perform the functions recited herein. A multiprocessor is a single computing component with two or more independent processors (called cores), which read and execute program instructions.
The processing unit 131 may communicate with the flash memory 171 via the dual-mode flash I/F 139, for example, using Open NAND Flash Interface (ONFI), DDR toggle, or others. The processing unit 131 may communicate with the DRAM 151 via the dual-mode memory I/F, for example, using Double Data Rate Third Generation (DDR3), Double Data Rate Fourth Generation (DDR4), or others.
The DRAM-like memory 153 may be referred to as a hybrid memory, which can be implemented in a Phase-Change Memory (PCM) or a magnetoresistive memory. The DRAM-like memory 153 has faster data-access capability and thus can be treated as a data buffer for storing temporary data. Moreover, the DRAM-like memory 153 provides long-time data-storage capability and thus can be treated as a data storage medium. The DRAM-like memory 153 employs a similar operating I/F with the DRAM 151. The access speed of the DRAM-like memory 153 is, for example, about one tenth of that of the DRAM 151 while the data volume of the DRAM-like memory 153 is, for example, about ten times of that of the DRAM 151.
The flash-like memory 173 may be referred to as a hybrid memory, which is a NAND flash memory essentially. The memory cells of the flash-like memory 173 are SLCs. A data length of one page thereof is configured as 512 B and thus can provide long-time data-storage capability. The flash-like memory 173 employs a similar operating I/F with the flash memory 171. The access speed of the flash-like memory 173 is, for example, about ten times of that of the flash memory 171 while the data volume of the flash-like memory 173 is, for example, about one tenth of that of the flash memory 171.
The processing unit 131 communicates with the DRAM-like memory 153 and the flash-like memory 173 via a memory-like I/F and a flash-like I/F, respectively. The DRAM-like memory 153 and the flash-like memory 173 are called as hybrid memory because they have non-volatile data-storage characteristics and their access speed falls between that of the flash memory 171 and the DRAM 151.
Additionally, comparing with the flash memory 171, the hybrid memory has better capability in endurance and data retention. Therefore, unlike data stored in the flash memory 171 typically requiring Error-Correcting Code (ECC) protection with higher-correction capability, for example, Low-Density Parity Check Code (LDPC), data stored in the hybrid memory can be protected by ECC with lower-correction capability, for example, Bose-Chaudhuri-Hocquenghem (BCH) code. Taking 1 KB user data as an example, BCH code can be used to correct at most 72 error bits while LDPC can be used to correct at most 128 error bits.
Moreover, as to the latency of data retrieval, the DRAM 151 is better than the hybrid memory and the hybrid memory is better than the flash memory 171. In terms of the aforementioned characteristic differences, the hybrid memory provides wider application potentials, for example, storing information required in system booting, operating as a Level-4 cache for the host 110, or others.
Since the flash-like memory 173 employs a flash memory as a data storage medium, a flash-like I/F is similar with a flash I/F and some pin definitions of the flash-like and flash I/Fs are compatible or the same, but others are different. Thus, the dual-mode flash IF 139 is extended based on the flash I/F. Similarly, a memory-like I/F is similar with a memory I/F and some pin definitions of the memory-like and memory I/Fs are compatible or the same, but others are different. Thus, the dual-mode memory I/F 137 is extended based on the memory I/F. In other words, the dual-mode flash I/F 139 and the dual-mode memory I/F 137 are integrated I/Fs to access different types of flash memory and RAM, respectively. Additionally, the dual-mode flash I/F 139 preferably identifies a page the smallest unit that data can be programmed, and a block the smallest unit that can be erased. The dual-mode memory I/F 137 preferably identifies a bit the smallest unit that data can be written.
The dual-mode flash I/F 139 is equipped with 30 pins and Table 1 shows the pin functions of the dual-mode flash I/F:
As shown in Table 1, the dual-mode flash I/F 139 may be configured as a flash I/F, such as ONFI Sync, ONFI Async, DDR Toggle, etc., thereby enabling the processing unit 131 to communicate with the flash modules each other. In addition, the dual-mode flash I/F 139 may be configured as a flash-like I/F, thereby enabling the processing unit 131 to communicate with the flash-like modules each other. The letter “x” indicates that the corresponding pin is floating, reserved, or manufacturer-proprietary. The letter “#” indicates a negative edge-triggered. The letter “c” indicates the complement.
The dual-mode flash I/F 139 may include registers mapping to pins of the storage modules, enabling the processing unit 131 to set output parameters to designated pins of the storage modules, for example, the predefined voltage level, the triggering type (such as assertion, de-assertion or no-function), the swinging (Y/N), the clock frequency, and the like. In an example, suppose that the dual-mode flash I/F 139 is configured as ONFI Sync, ONFI Async or DDR Toggle, the processing unit 131 may set the corresponding register to adjust the predefined voltage output to the pin #8 to a high voltage. The processing unit 131 may set the triggering type and the swinging (Y/N) for the pin #8 to de-assertion and NO through the corresponding registers, respectively. Suppose that the dual-mode flash I/F 139 is configured as the flash-like I/F, the processing unit 131 may set the corresponding register to adjust the predefined voltage output to the pin #8 to a low voltage. The processing unit 131 may set the triggering type and the swinging (Y/N) for the pin #8 to assertion and NO through the corresponding registers, respectively. In another example, suppose that the dual-mode flash I/F 139 is configured as ONFI Sync, the processing unit 131 may set the corresponding registers to configure the swinging (Y/N) as YES and adjust the clock frequency to a frequency that can be supported by the flash modules for the pin #13. Suppose that the dual-mode flash I/F 139 is configured as the flash-like I/F, the processing unit 131 may set the corresponding registers to configure the swinging (Y/N) as YES and adjust the clock frequency to a frequency that can be supported by the flash-like modules for the pin #13.
Each storage module may feed-in an independent CE or Chip Select (CS) signal. The processing unit 131 may access data stored in the storage modules of different channels CH #0 to CH #3 through the dual-mode flash I/F 139 in parallel. Specifically, the processing unit 131 issues one of the CE signals CE #0 to CE #3 to enable the designated storage module of every channel, and then, access data stored in the enabled storage modules in parallel through the shared data buses Data[0:7] or Data[0:7] and Data[8:15] of the channels CH #0 to CH #3. For example, the processing unit 131 sends commands, Logical Block Addresses (LBAs) to be read, user data to be written, or others to the enabled storage modules, or receives user data, replied messages, or others from the enabled storage modules through the shared data buses. In addition, each channel can be used to exchange control signals with the enabled storage modules, such as Address Latch Enable (ALE), Command Latch Enable (CLE), Read Enable (RE), Complement RE (RE_c), Ready/Busy (R/B), Write Protect (WP), Command Address (CA), Clock, Complement Clock (Clock_c), Clock Enable (CKE), DQS, ZQ, On-Die Termination (ODT), etc.
Furthermore, the pin functions may be redefined to reduce the pin count of the dual-mode flash I/F. For example, the ODT function of the flash-like I/F may be moved to pin #15, making pin #15 is used as WP for the flash I/F and ODT for the flash-like I/F. Therefore, pin #29 of the dual-mode flash I/F 139 can be removed therefrom.
After the connection configurations have been set, the manufacturer of the memory controller 130 may program the connection configurations into the ROM, thereby enabling the processing unit 131 to drive the dual-mode flash I/F 139 according to the settings of the ROM. In alternative embodiments, while the memory controller 130 enters an initiation phase, the processing unit 131 outputs an operating command to the storage modules in a row according to the flash I/F or the flash-like I/F, for example, a data read command of the flash I/F. If any storage module can reply with correct data, then the processing unit 131 determines that the storage module is a flash memory module. Otherwise, the processing unit 131 determines that the storage module is a flash-like memory module. In alternative embodiments, the storage module of the channel CH #0 that is controlled by CE #0 is fixed to a flash memory module in system design and the connection configurations is stored in this flash memory module. While the memory controller 130 enters an initiation phase, the processing unit 131 reads the flash memory module of CE #0 of CH #0 through the flash I/F to obtain the connection configurations.
Based on the connections as shown in
In some embodiments, suppose that the processing unit 131 is a multiprocessor capable of parallel computations, each processor core may handle designated channels to access data of a portion of storage modules. For example, one core is responsible for handling the channels CH #0 and CH #1 while another core is responsible for handling the channels CH #2 and CH #3. In alternative embodiments, suppose that the connections between the processing unit 131 and the storage modules are configured as shown in
The dual-mode memory I/F 137 is equipped with 51 pings and Table 2 shows the pin functions of the dual-mode memory I/F:
As shown in Table 2, the dual-mode memory I/F 137 may be configured as DDR4, thereby enabling the processing unit 131 to communicate with the DRAM modules each other. In addition, the dual-mode memory I/F 137 may be configured as a DRAM-like I/F, thereby enabling the processing unit 131 to communicate with the DRAM-like modules each other. The dual-mode memory I/F 137 may include registers mapping to pins of the memory modules, enabling the processing unit 131 to set output parameters to designated pins of the memory modules, for example, the predefined voltage level, the triggering type (such as assertion, de-assertion or no-function), the swinging (YIN), and the like. In an example, suppose that the dual-mode memory I/F 137 is configured as DDR4, the processing unit 131 may set the corresponding register to adjust the predefined voltage output to the pin #15 to a high or low voltage. The processing unit 131 may set the triggering type and the swinging (Y/N) for the pin #15 to no-function and NO through the corresponding registers, respectively. Suppose that the dual-mode memory I/F 137 is configured as the DRAM-like I/F, the processing unit 131 may set the corresponding register to adjust the predefined voltage output to the pin #15 to a low voltage. The processing unit 131 may set the triggering type and the swinging (Y/N) for the pin #15 to assertion and NO through the corresponding registers, respectively. In another example, suppose that the dual-mode memory I/F 137 is configured as DDR4, the processing unit 131 may set the corresponding registers to configure the swinging (Y/N) as YES and adjust the clock frequency to a frequency that can be supported by the DRAM modules for the pin #11. Suppose that the dual-mode memory I/F 137 is configured as the DRAM-like I/F, the processing unit 131 may set the corresponding registers to configure the swinging (Y/N) as YES and adjust the clock frequency to a frequency that can be supported by the DRAM-like modules for the pin #11.
Each memory module may feed-in an independent CS signal. The processing unit 131 may access data stored in the memory modules of different channels CH #0 to CH #3 through the dual-mode memory I/F 137 in parallel. Specifically, the processing unit 131 issues one of the CS signals CS #0 to CS #3 to enable the designated memory module of every channel, and then, access data stored in the enabled memory modules in parallel through the shared data buses Data[0:7] of the channels CH #0 to CH #3. In addition, each channel can be used to exchange control signals with the enabled memory modules, such as Command Address (CA), Reset, Wake, Alert, Select_In, Select_Out, Chip ID, Activation Command Input (ACT), Input Data Mask (DM), Data Bus Inversion (DBI), Bank Group (BG), Bank Address, Address Input, Command and Address Parity Input (PAR), Test Mode Enable, etc.
Based on the connections as shown in
In some embodiments, suppose that the processing unit 131 is a multiprocessor capable of parallel computations, each processor core may handle designated channels to access data of a portion of memory modules. For example, one core is responsible for handling the channels CH #0 and CH #1 while another core is responsible for handling the channels CH #2 and CH #3. In alternative embodiments, suppose that the connections between the processing unit 131 and the memory modules are configured as shown in
Information and program instructions required in system booting, such as information block, the whole L2P table and In-System Programming (ISP) code etc., are usually stored in a nonvolatile storage unit. In some implementations, the necessary information and program instructions are stored in the flash memory 171. To shorten the time of system booting, the necessary information and program instructions can be stored in the hybrid memory of the system architecture 100 introduced in the embodiments of the invention. The information block may record parameters for configuring the flash memory 171, such as bad block and column locations, the superblock architecture of the flash memory 171, etc., as well as parameters for configuring the DRAM 151.
Refer to
In some embodiments, the data storage device may be equipped with the hybrid memory 153 and the flash memory 171. The whole L2P table is preferably stored in the hybrid memory 153 for accelerating the access to the L2P table. Since the hybrid memory 153 has long-time data-storage capability, the data storage device can ignore processes responding to a SPO event. The hybrid memory 153 may be used to further store a small amount of hot data, or user data come from the host 110. The flash memory 171 is main storage space for backing-up ISP codes, cold data and/or seldom used data.
Refer to
Refer to
Steps S610 to S673 of
In some embodiments of the normal mode, the SRAM 133 may be used to temporarily store data to be programmed into the flash memory 171 or the hybrid memory 153 or 173 and data read from the flash memory 171 or the hybrid memory 153 or 173. Direct Access Memory (DMA) techniques are employed to move data between these two components.
In some embodiments of the normal mode, the processing unit 131 may execute the same WL algorithm to manage the flash memory 171 and the flash-like memory 173. The SRAM 133 may store a Program/Erase (P/E) count for each physical block of the flash memory 171 and the flash-like memory 173. But, the thresholds for triggering the WL process for the physical blocks of the flash memory 171 and the flash-like memory 173, respectively, may be the same or different.
In some embodiments of the normal mode, the processing unit 131 may perform GC processes for the flash memory 171 and the flash-like memory 173. The processing unit 131 may allocate a portion of space of the hybrid memory 153 or 173 as over provision for a buffer in data movements or other operations.
In some embodiments of the normal mode, for Sudden Power Off Recovery (SPOR), the processing unit 131 may program data of the DRAM 151 or HMB into the non-volatile hybrid memory 153 or 173 or flash memory 171 periodically, or when a predefined condition has been met. The temporarily stored L2P table and user data are preferably programmed into the hybrid memory 153 or 173, thereby enabling the SPOR process to be performed more efficiently after a SPO.
In some embodiments, when available space of the hybrid memory 153 or 173 is sufficient, the processing unit 131 may not use the flash memory 171. The flash memory 171 is initialized and space of the flash memory 171 is used until the available space of the hybrid memory 153 or 173 is insufficient.
Some or all of the aforementioned embodiments of the method of the invention may be implemented in a computer program such as a driver for a dedicated hardware of a controller, or a software application program. Other types of programs may also be suitable, as previously explained. Since the implementation of the various embodiments of the present invention into a computer program can be achieved by the skilled person using his routine skills, such an implementation will not be discussed for reasons of brevity. The computer program implementing some or more embodiments of the method of the present invention may be stored on a suitable computer-readable data carrier such as a DVD, CD-ROM, USB stick, a hard disk, which may be located in a network server accessible via a network such as the Internet, or any other suitable carrier.
Although the embodiment has been described as having specific elements in
While the invention has been described by way of example and in terms of the preferred embodiments, it should 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.
Number | Date | Country | Kind |
---|---|---|---|
201910486615.2 | Jun 2019 | CN | national |
This is a Continuing patent application of and claims the benefit of priority to U.S. patent application Ser. No. 16/712,160, filed on Dec. 12, 2019, which claims the benefit of priority to U.S. Provisional Application Ser. No. 62/787,810, filed on Jan. 3, 2019; and Patent Application No. 201910486615.2, filed in China on Jun. 5, 2019; the entirety of which is incorporated herein by reference for all purposes.
Number | Name | Date | Kind |
---|---|---|---|
8135901 | Oh et al. | Mar 2012 | B2 |
8898374 | Yang | Nov 2014 | B2 |
20070288683 | Panabaker et al. | Dec 2007 | A1 |
20080104309 | Cheon | May 2008 | A1 |
20090241103 | Pennisi et al. | Sep 2009 | A1 |
20110066837 | Lee et al. | Mar 2011 | A1 |
20110119430 | Lai | May 2011 | A1 |
20120023283 | Yang | Jan 2012 | A1 |
20120131261 | Ferrari | May 2012 | A1 |
20130170293 | Sprouse | Jul 2013 | A1 |
20140164675 | Ehrlich et al. | Jun 2014 | A1 |
20170060434 | Chang et al. | Mar 2017 | A1 |
20180081543 | Muchherla et al. | Mar 2018 | A1 |
20180173441 | Cargnini et al. | Jun 2018 | A1 |
Number | Date | Country |
---|---|---|
101661473 | Mar 2010 | CN |
102346652 | Feb 2012 | CN |
104361113 | Feb 2015 | CN |
106484628 | Mar 2017 | CN |
108205499 | Jun 2018 | CN |
2008 148 129 | Jun 2010 | RU |
1442222 | Jun 2014 | TW |
Entry |
---|
English translation of the Taiwanese Search Report dated May 26, 2020 for Application No. 108119438. |
Number | Date | Country | |
---|---|---|---|
20220057957 A1 | Feb 2022 | US |
Number | Date | Country | |
---|---|---|---|
62787810 | Jan 2019 | US |
Number | Date | Country | |
---|---|---|---|
Parent | 16712160 | Dec 2019 | US |
Child | 17519685 | US |