The present disclosure relates to systems and methods for sending data stored in non-volatile solid state devices and particularly sending data before completion of error correction.
Non-volatile solid state devices (SSDs) are widely used for primary and secondary storage in computer systems. Some non-volatile memories, such as Phase Change Memory (PCM), Resistive RAM (ReRAM), and Magnetic RAM (MRAM), have bit error rates that can be higher than bit error rates in Dynamic Read Access Memories (DRAMs), but can be much lower than bit error rates in NAND flash memories. Therefore, these intermediate bit error rates require better error correction than the short Hamming codes used in DRAMs. This can result in long latencies when running the error correction algorithm. For example, implementing an error correcting code (ECC), such as a full BCH code (from the acronym of the code inventors, Raj Bose, D. K. Ray-Chaudhuri, and Alexis Hocquenghem), e.g., on a 512 B block, can take about half as much time as reading the bits from the storage medium.
Moreover, the probability of error in any block, e.g., a 4 kB, can be low enough such that most blocks will have no error. Accordingly, on most reads the latency due to the error correction algorithm is wasted. In addition, conventional systems implement a non-pipelined flow, which normally read from the storage medium all the bits for reconstructing a single 512 B block, then they run the ECC algorithm, and can start sending the data to the host after the ECC algorithm has completed. Therefore, transmitting the block is delayed until the ECC algorithm completes.
The present disclosure relates to methods and systems for performing operations according to a communications protocol.
One embodiment can include a method for performing operations in a communications protocol. The method can include the steps of providing a target in communication with a host and a memory and receiving, by the target, a first command from the host comprising a request for a plurality of data packets from the memory. The method can also include the steps of retrieving, by the target, the plurality of data packets from the memory and sending, by the target, each retrieved data packet to the host, as each data packet is retrieved. The method can further include the steps of retrieving, by the target, an error correcting code (ECC) packet corresponding to the retrieved plurality of data packets and executing, by the target, an ECC algorithm to identify and correct potential errors in the retrieved plurality of data packets. The method can also include the steps of sending, by the target, corrected data packets to the host if any of the retrieved data packets had errors and sending, by the target, a completion packet to the host.
One alternative embodiment can include a method for performing operations in a communications protocol. The method can include the steps of providing a target in communication with a host and a memory and receiving, by the target, a first command from the host comprising a request for a plurality of data packets from the memory. The method can also include the steps of retrieving, by the target, the plurality of data packets from the memory and sending, by the target, each retrieved data packet to the host, as each data packet is retrieved, except the last retrieved data packet. The method can also include the steps of retrieving, by the target, an error correcting code (ECC) packet corresponding to the retrieved plurality of data packets and executing, by the target, an ECC algorithm to identify and correct potential errors in the retrieved plurality of data packets. The method can further include the steps of sending, by the target, corrected data packets to the host if any of the retrieved data packets had errors and sending, by the target, the last retrieved data packet.
One alternative embodiment can include a memory controller for performing operations in a communications protocol. The memory controller can comprise an interface controller in communication with a host and a memory configured to receive a first command from the host comprising a request for a plurality of data packets from the memory and a storage controller. The storage controller can be configured to retrieve the plurality of data packets from the memory and instruct the interface controller to send each retrieved data packet to the host, as each data packet is retrieved, except the last retrieved data packet. The storage controller can be further configured to retrieve an error correcting code (ECC) packet corresponding to the retrieved plurality of data packets and execute an ECC algorithm to identify and correct potential errors in the retrieved plurality of data packets. The storage controller can be further configured to instruct the interface controller to send corrected data packets to the host if any of the retrieved data packets had errors and instruct the interface controller to send the last retrieved data packet.
One alternative embodiment can include a memory controller for performing operations in a communications protocol. The memory controller can comprise an interface controller in communication with a host and a memory configured to receive a first command from the host comprising a request for a plurality of data packets from the memory and a storage controller. The storage controller can be configured to retrieve the plurality of data packets from the memory and perform an error detection algorithm, on each retrieved data packet to identify whether the retrieved data packet contains an error. The storage controller can be further configured to instruct the interface controller to send each retrieved data packet to the host, as each data packet is retrieved, except the last retrieved data packet and retrieve an error correcting code packet corresponding to the retrieved plurality of data packets and execute an ECC algorithm to identify and correct potential errors in the retrieved plurality of data packets. The storage controller can be further configured to instruct the interface controller to send corrected data packets to the host if any of the retrieved data packets had errors and instruct the interface controller to send the last retrieved data packet.
Various objects, features, and advantages of the present disclosure can be more fully appreciated with reference to the following detailed description when considered in connection with the following drawings, in which like reference numerals identify like elements. The following drawings are for the purpose of illustration only and are not intended to be limiting of the invention, the scope of which is set forth in the claims that follow.
Systems and methods for sending data stored in non-volatile memories are provided. Data packets can be sent to a host once they are retrieved from the non-volatile memory before performing error correction. Once all the data packets of a block have been retrieved from the non-volatile memory, error correction can be performed. If any data packet was retrieved with errors, it can be corrected and re-sent to the host.
Host 102 can run user-level applications 106 on operating system 108. Operating system 108 can run driver 110 that interfaces with host memory 112. In some embodiments, memory 112 can be a DRAM. Host memory 112 can use queues 118a to store commands from host 102 for target 104 to process. Examples of stored or enqueued commands can include read or write operations from host 102. Communication protocol 114a can allow host 102 to communicate with target device 104 using interface controller 117.
Target device 104 can communicate with host 102 using interface controller 117 and communication protocol 114b. Communication protocol 114b can provide queues 118 to access storage 122 via storage controller 120. For example, user-level applications 106 can generate storage memory 122 access requests for data. Target device 104 can implement error correction codes to correct errors when memory blocks are retrieved from storage 122.
As discussed above, running an error correction code, such as a full BCH code, for example on a 512 B block, can consume about half as much time as reading the data from storage 122. Conventional systems, e.g., systems that implement a non-pipelined flow, normally read from the storage medium all the bits for reconstructing one block, then they can run the ECC algorithm, and can start sending the corrected data to the host after the ECC algorithm has completed. This is illustrated in
According to aspects of the disclosure, the data packets from the storage medium are transmitted to the host before the error correction algorithm is implemented. This is illustrated in
The disclosed systems and methods can result in latency savings, even in the case where the retrieved data from the storage medium contain errors.
According to alternative aspects of the disclosure, the data packets 302 from the storage medium can be transmitted to the host before the error correction algorithm is implemented, without a transmission of a completion packet. This is illustrated in
According to alternative aspects of the disclosure, after an error is detected, only a subset of the erroneously retrieved packet is re-transmitted to the host, e.g., only the subset that contained the errors. When the subset is received at the host, it can overwrite the appropriate portion of the packet.
According to alternative aspects of the disclosure, when a data packet is retrieved from the storage medium, an error detection algorithm is performed, e.g., a syndrome check (calculation of the polynomial that returns a value indicating how many bits are in error), to identify whether any errors in the retrieved data packet. If none of the retrieved packets have any errors, then no further ECC algorithm is implemented.
Those of skill in the art would appreciate that the various illustrations in the specification and drawings described herein can be implemented as electronic hardware, computer software, or combinations of both. To illustrate this interchangeability of hardware and software, various illustrative blocks, modules, elements, components, methods, and algorithms have been described above generally in terms of their functionality. Whether such functionality is implemented as hardware, software, or a combination depends upon the particular application and design constraints imposed on the overall system. Skilled artisans can implement the described functionality in varying ways for each particular application. Various components and blocks can be arranged differently (for example, arranged in a different order, or partitioned in a different way) all without departing from the scope of the subject technology.
Furthermore, an implementation of the communication protocol can be realized in a centralized fashion in one computer system, or in a distributed fashion where different elements are spread across several interconnected computer systems. Any kind of computer system, or other apparatus adapted for carrying out the methods described herein, is suited to perform the functions described herein.
A typical combination of hardware and software could be a general purpose computer system with a computer program that, when being loaded and executed, controls the computer system such that it carries out the methods described herein. The methods for the communications protocol can also be embedded in a computer program product, which comprises all the features enabling the implementation of the methods described herein, and which, when loaded in a computer system is able to carry out these methods.
Computer program or application in the present context means any expression, in any language, code or notation, of a set of instructions intended to cause a system having an information processing capability to perform a particular function either directly or after either or both of the following a) conversion to another language, code or notation; b) reproduction in a different material form. Significantly, this communications protocol can be embodied in other specific forms without departing from the spirit or essential attributes thereof, and accordingly, reference should be had to the following claims, rather than to the foregoing specification, as indicating the scope of the invention.
The communications protocol has been described in detail with specific reference to these illustrated embodiments. It will be apparent, however, that various modifications and changes can be made within the spirit and scope of the disclosure as described in the foregoing specification, and such modifications and changes are to be considered equivalents and part of this disclosure.