The inventions generally relate to command completion detection in a mass storage device.
Mass storage devices may include a number of memory devices, such as NAND memory devices, phase change devices, etc. The number of chip enables (CEs) that need to be used will vary depending upon the capacity of the storage device (for example, a storage device might have any number of CEs including one or more CEs). If a READY/BUSY# pin, for example, is used to check for command completion, then one or more additional pins equal to the number of CEs would be required on the chip. This is an undesirable situation, since it significantly increases the cost of the controller ASIC (Application Specific Integrated Circuit), for example. If continuous polling of a status register internal to the memory device is used, then excessive polling results in wasted power due to excessive interface activity and inefficient channel controller operation. If the READY/BUSY# pins are shared among the memory devices, then the slowest outstanding command will determine when the controller completes the commands. For example, in a storage device with NAND memories, a 20 microsecond (20 us) READ command could wait for a 2 millisecond (2 ms) BLOCK ERASE COMMAND. Therefore, the inventors have recognized that a need exists for an improved implementation of command completion detection in a mass storage device.
The inventions will be understood more fully from the detailed description given below and from the accompanying drawings of some embodiments of the inventions which, however, should not be taken to limit the inventions to the specific embodiments described, but are for explanation and understanding only.
Some embodiments of the inventions relate to command completion detection in a mass storage device.
In some embodiments, after a hold off time following issuance of a memory command has elapsed, a status register internal to the memory device is read to determine the status of the memory command. In some embodiments, a polling interval is used to perform a status read operation after every time the polling operation has elapsed before performing a status check of completion of the memory command.
In some embodiments a controller is to wait a hold off time after a memory command is issued. After the hold off time has elapsed following the issuance of the memory command, the controller is to perform a status read operation to determine a status of the memory command. In some embodiments, the controller waits a polling interval before performing a status check of completion of the NAND command.
In some embodiments off-the-shelf NAND flash memory devices may be used for the non-volatile data storage (that is, for memory devices 110). A unique property of NAND flash memory is that a minimum of time must elapse after the issuance of the command before a certain operation can be completed. For example, on one 72 nm single level cell (SLC) NAND (SD74) it typically takes approximately 220 microseconds (220 us) to complete a program operation and approximately 1.5 milliseconds (1.5 ms) to complete a block erase operation.
The controller 102 implements functionality to control the operation of the memory devices. These controllers implement the protocol used by the memory devices including sending the various commands along with the data and reading the status back.
In some embodiments, the controller 102 is responsible for interpreting host commands from a host computer. The controller 102 typically has a Central Processing Unit (CPU) which is used in conjunction with some special hardware to perform this function.
Some mass storage devices must support several memory devices. The number of chip enables (CEs) that need to be used will vary depending upon the capacity of the storage device (for example, a mass storage device might have any number of CEs, including one CE or more CEs).
Timing diagram 202 illustrates a READY/BUSY# pin timing. Each chip enable (CE) in a mass storage device, for example, includes a READY/BUSY# pin, where the logical level of the pin provides an indication of command completion. In timing diagram 202, if a READY/BUSY# pin, for example, is used to check for command completion, then one or more additional pins would be required on the chip. The number of additional pins would be equal to, for example, the number of CEs. This is an undesirable situation, since it significantly increases the cost of the controller ASIC (Application Specific Integrated Circuit), for example. If the READY/BUSY# pins are shared within the channel, then the slowest outstanding command will determine when the controller completes the commands. For example, in a mass storage device with NAND memories, a 20 microsecond (20 us) READ command could wait for a 2 millisecond (2 ms) BLOCK ERASE COMMAND.
Timing diagram 204 illustrates a timing diagram where continuous polling is used. Timing diagram 204 illustrates how a status register inside the memory device can be periodically read until the timing diagram 204 indicates whether a command was completed successfully. The status register can be read using a specific memory protocol utilizing the data bus. Where continuous polling is used, then excessive polling results in wasted power due to excessive interface activity and inefficient channel controller operation.
In some embodiments, the host controller (for example, host controller 102) includes a set of registers that store and provide typical values of hold-off times which must elapse before polling should begin after any command. In some embodiments, the host controller (for example, host controller 102) also includes a set of registers that store and provide a polling interval for each command type. The polling interval is a time interval to be used after the hold-off time for the respective command type has elapsed. In this manner, an optimal hold-off time and optimal polling time is specified for each command type supported by the storage device.
In some embodiments the stored optimal hold-off time and/or the stored optimal polling time for each type of command may be updated. For example, a running average of completion times may be kept for different commands (and/or on different CEs) and the registers storing the hold-off times for each command and/or the registers storing the polling intervals for each command may be periodically and/or continuously updated using, for example, constantly changing average command completion times.
In some embodiments, unnecessary status polling cycles are eliminated, resulting in lower power consumption. Power is saved by delaying the status checking until the hold time has elapsed. The hold time varies depending on, for example, the type of command such as read, write, erase, etc. After the hold time has elapsed sampling occurs only at the end of every polling interval, which also varies depending on the type of command, such as read, write, erase, etc. This minimal polling arrangement saves additional power. For example, in a mass storage device with NAND memories, using traditional polling without a hold time and/or polling interval several hundred status reads might occur while waiting for a READ command to complete, and several thousand might occur while waiting for an ERASE command. In some embodiments, as few as one might occur.
In some embodiments a lower pin count is possible compared to implementations using a separate pin for each chip enable (CE) in a solid state storage device. That is, in some embodiments it is not necessary to provide a separate READY/BUSY# pin for each CE.
In some embodiments an efficient controller may be implemented. New commands, data transfers, and/or status checking can occur for different CEs sharing the same interface because cycles are not wasted performing continuous status polling. This allows the controller to be more efficient.
Although some embodiments have been described herein as being implemented using memory devices and/or in some embodiments as using a particular type of memory device, it is noted that according to some embodiments any type of memory device may be used. For example, in some embodiments, memory devices such as NAND memory devices, and/or any other type of memory devices may be used. In some embodiments, any type of memory device may be used, as long as that memory device has, for example, a status register that can be read to check the status of the memory command that was sent out.
Although some embodiments have been described in reference to particular implementations, other implementations are possible according to some embodiments. Additionally, the arrangement and/or order of circuit elements or other features illustrated in the drawings and/or described herein need not be arranged in the particular way illustrated and described. Many other arrangements are possible according to some embodiments.
In each system shown in a figure, the elements in some cases may each have a same reference number or a different reference number to suggest that the elements represented could be different and/or similar. However, an element may be flexible enough to have different implementations and work with some or all of the systems shown or described herein. The various elements shown in the figures may be the same or different. Which one is referred to as a first element and which is called a second element is arbitrary.
In the description and claims, the terms “coupled” and “connected,” along with their derivatives, may be used. It should be understood that these terms are not intended as synonyms for each other. Rather, in particular embodiments, “connected” may be used to indicate that two or more elements are in direct physical or electrical contact with each other. “Coupled” may mean that two or more elements are in direct physical or electrical contact. However, “coupled” may also mean that two or more elements are not in direct contact with each other, but yet still co-operate or interact with each other.
An algorithm is here, and generally, considered to be a self-consistent sequence of acts or operations leading to a desired result. These include physical manipulations of physical quantities. Usually, though not necessarily, these quantities take the form of electrical or magnetic signals capable of being stored, transferred, combined, compared, and otherwise manipulated. It has proven convenient at times, principally for reasons of common usage, to refer to these signals as bits, values, elements, symbols, characters, terms, numbers or the like. It should be understood, however, that all of these and similar terms are to be associated with the appropriate physical quantities and are merely convenient labels applied to these quantities.
Some embodiments may be implemented in one or a combination of hardware, firmware, and software. Some embodiments may also be implemented as instructions stored on a machine-readable medium, which may be read and executed by a computing platform to perform the operations described herein. A machine-readable medium may include any mechanism for storing or transmitting information in a form readable by a machine (e.g., a computer). For example, a machine-readable medium may include read only memory (ROM); random access memory (RAM); magnetic disk storage media; optical storage media; flash memory devices; electrical, optical, acoustical or other form of propagated signals (e.g., carrier waves, infrared signals, digital signals, the interfaces that transmit and/or receive signals, etc.), and others.
An embodiment is an implementation or example of the inventions. Reference in the specification to “an embodiment,” “one embodiment,” “some embodiments,” or “other embodiments” means that a particular feature, structure, or characteristic described in connection with the embodiments is included in at least some embodiments, but not necessarily all embodiments, of the inventions. The various appearances “an embodiment,” “one embodiment,” or “some embodiments” are not necessarily all referring to the same embodiments.
Not all components, features, structures, characteristics, etc. described and illustrated herein need be included in a particular embodiment or embodiments. If the specification states a component, feature, structure, or characteristic “may”, “might”, “can” or “could” be included, for example, that particular component, feature, structure, or characteristic is not required to be included. If the specification or claim refers to “a” or “an” element, that does not mean there is only one of the element. If the specification or claims refer to “an additional” element, that does not preclude there being more than one of the additional element.
Although flow diagrams and/or state diagrams may have been used herein to describe embodiments, the inventions are not limited to those diagrams or to corresponding descriptions herein. For example, flow need not move through each illustrated box or state or in exactly the same order as illustrated and described herein.
The inventions are not restricted to the particular details listed herein. Indeed, those skilled in the art having the benefit of this disclosure will appreciate that many other variations from the foregoing description and drawings may be made within the scope of the present inventions. Accordingly, it is the following claims including any amendments thereto that define the scope of the inventions.