[go: up one dir, main page]

CN109669800B - Efficient data recovery for write path errors - Google Patents

Efficient data recovery for write path errors Download PDF

Info

Publication number
CN109669800B
CN109669800B CN201710950725.0A CN201710950725A CN109669800B CN 109669800 B CN109669800 B CN 109669800B CN 201710950725 A CN201710950725 A CN 201710950725A CN 109669800 B CN109669800 B CN 109669800B
Authority
CN
China
Prior art keywords
data
flash memory
error
data blocks
parity
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710950725.0A
Other languages
Chinese (zh)
Other versions
CN109669800A (en
Inventor
蔡宇
张帆
李尚哲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
SK Hynix Inc
Original Assignee
SK Hynix Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by SK Hynix Inc filed Critical SK Hynix Inc
Priority to CN201710950725.0A priority Critical patent/CN109669800B/en
Publication of CN109669800A publication Critical patent/CN109669800A/en
Application granted granted Critical
Publication of CN109669800B publication Critical patent/CN109669800B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/08Error detection or correction by redundancy in data representation, e.g. by using checking codes
    • G06F11/10Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's
    • G06F11/1008Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's in individual solid state devices
    • G06F11/1068Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's in individual solid state devices in sector programmable memories, e.g. flash disk
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C29/00Checking stores for correct operation ; Subsequent repair; Testing stores during standby or offline operation
    • G11C29/04Detection or location of defective memory elements, e.g. cell constructio details, timing of test signals
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C29/00Checking stores for correct operation ; Subsequent repair; Testing stores during standby or offline operation
    • G11C29/04Detection or location of defective memory elements, e.g. cell constructio details, timing of test signals
    • G11C2029/0411Online error correction

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

本发明公开了一种为闪速存储器装置提供的系统和方法,以在写入路径错误的情况下改进写入性能并隐藏写入路径错误校正延迟。一些实施例可以提供即时奇偶校验校正,以允许与具有错误的数据块共享相同条带的用户数据在出错的数据被校正之前被编程到闪速存储器中。此外,选择的停止可以允许在写入路径错误校正期间对不同的闪速存储器芯片或平面中的一些独立数据进行编程。

The present invention discloses a system and method for a flash memory device to improve write performance and hide write path error correction delays in the case of write path errors. Some embodiments may provide on-the-fly parity correction to allow user data that shares the same stripe as the data block with errors to be programmed into the flash memory before the erroneous data is corrected. Additionally, selected stops may allow some independent data in different flash memory chips or planes to be programmed during write path error correction.

Description

用于写入路径错误的高效数据恢复Efficient data recovery for write path errors

技术领域Technical field

本发明涉及一种用于闪速存储器装置的设备、方法和计算机可读指令,以便在写入路径错误的情况下通过加速写入性能和隐藏写入路径错误校正延迟来提供高效的数据恢复。The present invention relates to an apparatus, method and computer readable instructions for a flash memory device to provide efficient data recovery in the event of write path errors by accelerating write performance and hiding write path error correction delays.

背景技术Background technique

发现诸如固态驱动器(SSD)的非易失性存储器装置正是消费性电子产品中的新应用。例如,它们正替代典型地包括快速旋转盘(盘片)的硬盘驱动器(HDD)。有时被称为“闪速存储器”或“闪速存储器装置”(例如,NAND闪速存储器装置和NOR闪速存储器装置)的非易失性存储器被用于介质存储器、照相机、移动电话、移动电脑、笔记本电脑、USB闪存驱动器等。当电源关闭时,非易失性存储器可以提供相对可靠、紧凑、成本效益高且易于存取的存储数据的方法。Non-volatile memory devices such as solid-state drives (SSDs) are finding new applications in consumer electronics. For example, they are replacing hard disk drives (HDDs) which typically include fast spinning disks (platters). Non-volatile memory, sometimes referred to as "flash memory" or "flash memory devices" (eg, NAND flash memory devices and NOR flash memory devices), is used in media storage, cameras, mobile phones, mobile computers , laptops, USB flash drives, etc. Non-volatile memory can provide a relatively reliable, compact, cost-effective and easily accessible method of storing data when the power is turned off.

闪速存储器控制器用于管理存储在非易失性存储器中的数据,并用作主机系统和非易失性存储器之间的接口。从主机系统接收的数据可以存储在缓冲器中,并且在将数据写入闪速存储器之前可以对数据执行简单的错误检测和校正。通常,闪速存储器控制器内的写入路径可以提供对闪速存储器进行编程的通道。然而,在某些情况下,写入路径可能容易出错。当在从缓冲器接收到的数据块的写入路径中检测到错误时,闪速存储器控制器通常停止对具有写入路径错误的数据块之后发出的闪速存储器的所有写入操作。闪速存储器控制器必须校正写入路径中的错误,重新发送校正的数据块,然后才恢复对闪速存储器的写入操作。这在对闪速存储器的写入操作中可能引入不必要的延迟。Flash memory controllers are used to manage data stored in non-volatile memory and serve as the interface between the host system and the non-volatile memory. Data received from the host system can be stored in a buffer, and simple error detection and correction can be performed on the data before writing it to flash memory. Typically, a write path within a flash memory controller can provide access to program the flash memory. However, in some cases, the write path can be error-prone. When an error is detected in the write path of a data block received from the buffer, the flash memory controller typically stops all write operations to the flash memory issued after the data block with the write path error. The flash memory controller must correct errors in the write path, resend the corrected data blocks, and then resume writing to the flash memory. This can introduce unnecessary delays in write operations to flash memory.

在一些情况下,奇偶校验位数据可用于为写入路径提供错误检测和校正。例如,可以通过对接收到的数据块以及先前接收到的数据块执行异或运算来计算奇偶校验位数据。但是,一个数据块中的错误可能导致奇偶校验位数据计算的错误。因此,也可能需要校正奇偶校验位数据,这在数据路径中可能引入额外的延迟。In some cases, parity bit data can be used to provide error detection and correction for the write path. For example, the parity bit data can be calculated by performing an XOR operation on the received data block and the previously received data block. However, errors in a data block can cause errors in parity bit data calculations. Therefore, the parity bit data may also need to be corrected, which may introduce additional delays in the data path.

发明内容Contents of the invention

本发明的实施例涉及一种用于闪速存储器装置的系统、方法和计算机可读指令,以便在写入路径错误的情况下通过加速写入性能和隐藏写入路径错误校正延迟来提供高效的数据恢复。一些实施例可以提供即时奇偶校验校正,以允许与具有错误的数据块共享相同条带的用户数据在出错的数据被校正之前被编程到闪速存储器中。此外,选择的数据的停止可以允许在写入路径错误校正期间对不同的闪速存储器芯片或平面中的一些独立数据进行编程。Embodiments of the present invention are directed to a system, method, and computer-readable instructions for a flash memory device to provide efficient write performance by accelerating write performance and hiding write path error correction delays in the event of write path errors. Data Recovery. Some embodiments may provide on-the-fly parity correction to allow user data that shares the same stripe as the data block with errors to be programmed into the flash memory before the erroneous data is corrected. Additionally, stalling of selected data may allow some independent data in different flash memory chips or planes to be programmed during write path error correction.

根据一些实施例,设备可以包括写入路径错误检测器,其配置为检测从一组数据块接收的数据块是否具有错误。该设备进一步可以包括奇偶校验计算器,其配置为计算数据块的奇偶校验位数据。该设备进一步可以包括处理器,其配置为执行存储在存储器中的指令,其中存储在存储器中的指令使处理器对具有错误的数据块执行错误校正。该设备还可以包括写入路径管理器。写入路径管理器可以配置为停止将具有错误的数据块存储到闪速存储器缓冲器中,并且允许在对具有错误的数据块进行错误校正期间将在具有错误的数据块之后接收到的随后的没有错误的数据块存储到闪速存储器缓冲器中。奇偶校验计算器进一步可以配置为基于没有错误的数据块和错误已校正的数据块来重新计算用于该组数据块的奇偶校验位数据。该设备可以是后端闪速存储器控制器的一部分,其中后端闪速存储器控制器可以是联接到闪速存储器和主机系统的闪速存储器控制器的一部分。According to some embodiments, the device may include a write path error detector configured to detect whether data blocks received from a set of data blocks have errors. The device may further include a parity calculator configured to calculate parity bit data for the data block. The apparatus may further include a processor configured to execute instructions stored in the memory, wherein the instructions stored in the memory cause the processor to perform error correction on the data blocks having errors. The device may also include a write path manager. The write path manager can be configured to stop storing data blocks with errors into the flash memory buffer and allow subsequent data blocks received after the data block with errors to be stored during error correction of the data blocks with errors. Data blocks without errors are stored into the flash memory buffer. The parity calculator may further be configured to recalculate the parity bit data for the set of data blocks based on the error-free data blocks and the error-corrected data blocks. The device may be part of a back-end flash memory controller, where the back-end flash memory controller may be part of a flash memory controller coupled to the flash memory and the host system.

根据一些实施例,一种方法可以包括通过联接到闪速存储器的闪速存储器控制器从存储在易失性存储器中的第一组数据块中一次接收一个数据块。易失性存储器可以存储包括第一组数据块和第二组数据块的多组数据块。该方法进一步包括检测所接收的数据块中的一个数据块的错误,并且基于从第一组数据块接收到的一个或多个数据块来计算奇偶校验位数据。该方法进一步包括停止将具有错误的数据块存储到闪速存储器缓冲器中,并对具有错误的数据块进行错误校正。该方法进一步包括在对具有错误的数据块进行错误校正期间将在具有错误的数据块之后接收的随后的没有错误的数据块存储到闪速存储器缓冲器中。According to some embodiments, a method may include receiving, by a flash memory controller coupled to the flash memory, one data block at a time from a first set of data blocks stored in volatile memory. The volatile memory may store multiple sets of data blocks including a first set of data blocks and a second set of data blocks. The method further includes detecting an error in one of the received data blocks and calculating parity data based on the one or more data blocks received from the first set of data blocks. The method further includes stopping storing data blocks with errors into the flash memory buffer and performing error correction on the data blocks with errors. The method further includes storing subsequent error-free data blocks received after the data block with errors into the flash memory buffer during error correction of the data block with errors.

该方法进一步可以包括确定具有错误的数据块中的错误已经被校正,并且基于错误已校正的数据块和没有错误的数据块重新计算第一组数据块的奇偶校验位数据。该方法进一步包括将用于第一组数据块的重新计算的奇偶校验位数据和错误已校正的数据块存储在闪速存储器缓冲器中。The method may further include determining that errors in the data blocks with errors have been corrected, and recalculating parity data of the first set of data blocks based on the error-corrected data blocks and the error-free data blocks. The method further includes storing the recalculated parity data for the first set of data blocks and the error-corrected data blocks in a flash memory buffer.

一些实施例涉及一种闪速存储器控制器,其包括配置为实现各种方法的一个或多个处理器。其它实施例涉及其上存储有指令的计算机可读介质,当处理器执行指令时,该计算机可读介质执行一些进程。Some embodiments relate to a flash memory controller including one or more processors configured to implement various methods. Other embodiments relate to computer-readable media having instructions stored thereon that, when executed by a processor, perform processes.

附图说明Description of the drawings

图1是示出根据一些实施例的包括联接到闪速存储器装置的主机系统的系统的简化框图。Figure 1 is a simplified block diagram illustrating a system including a host system coupled to a flash memory device in accordance with some embodiments.

图2是闪速存储器的配置的示例图。FIG. 2 is an example diagram of a configuration of a flash memory.

图3示出了在一些实施例中在发生写入路径错误的情况下可以提供改进的写入性能的闪速存储器控制器的框图。3 illustrates a block diagram of a flash memory controller that may provide improved write performance in the event of write path errors in some embodiments.

图4示出了在一个实施例中通过闪速存储器控制器处理具有错误的数据块的示例图。Figure 4 shows an example diagram of processing a data block with errors by a flash memory controller in one embodiment.

图5示出了在一个实施例中用于处理具有错误的数据块之后的无错误数据块的示例图。Figure 5 shows an example diagram for processing an error-free data block after a data block with errors in one embodiment.

图6示出了在一个实施例中用于存储错误已校正的数据的示例图。Figure 6 shows an example diagram for storing error corrected data in one embodiment.

图7示出了在一个实施例中用于将错误已校正的数据块和无错误数据块存储在闪速存储器中的示例图。Figure 7 shows an example diagram for storing error-corrected data blocks and error-free data blocks in flash memory in one embodiment.

图8示出了在一个实施例中计算具有错误的数据块的部分奇偶校验位数据的示例图。Figure 8 shows an example diagram of calculating partial parity bit data for a data block with errors in one embodiment.

图9示出了在一个实施例中用于将用于条带(strip)的部分奇偶校验位数据存在闪速存储器中的示例图。Figure 9 shows an example diagram for storing partial parity data for a strip in flash memory in one embodiment.

图10示出了在一个实施例中在校正第一条带的数据块中的错误的同时存储第二条带的数据块的示例图。Figure 10 shows an example diagram of storing data blocks of a second stripe while correcting errors in the data blocks of a first stripe in one embodiment.

图11示出了在一个实施例中在校正第一条带的数据块中的错误的同时继续存储第二条带的数据块的示例图。Figure 11 shows an example diagram of correcting errors in the data blocks of the first stripe while continuing to store the data blocks of the second stripe in one embodiment.

图12示出了一种通过闪速存储器控制器执行的方法,该方法在写入路径错误的情况下用以改进写入性能。Figure 12 illustrates a method performed by a flash memory controller to improve write performance in the event of a write path error.

具体实施方式Detailed ways

下面提供本公开的某些方面和实施例。这些方面和实施例中的一些可被独立地应用,并且它们中的一些可以本领域技术人员显而易见的组合应用。在下面的描述中,为了说明的目的,阐述了具体细节以提供对实施例的透彻理解。然而,显而易见的是,可以在没有这些具体细节的情况下实践各种实施例。附图和描述并不是限制性的。Certain aspects and embodiments of the present disclosure are provided below. Some of these aspects and embodiments may be applied independently, and some of them may be applied in combinations that will be apparent to those skilled in the art. In the following description, for purposes of illustration, specific details are set forth in order to provide a thorough understanding of the embodiments. It may be apparent, however, that various embodiments may be practiced without these specific details. The drawings and descriptions are not limiting.

接下来的描述提供了示例,但并不旨在限制本公开的范围、适用性或配置。相反,随后对示例性实施例的描述将为本领域技术人员提供实现示例性实施例的可用描述。应当理解,在不脱离如权利要求中阐述的本发明的精神和范围的情况下,可以对元件的功能和布置进行各种改变。The following description provides examples and is not intended to limit the scope, applicability, or configuration of the disclosure. Rather, the ensuing description of the exemplary embodiments will provide those skilled in the art with a useful description for implementing the exemplary embodiments. It will be understood that various changes can be made in the function and arrangement of elements without departing from the spirit and scope of the invention as set forth in the claims.

在以下描述中给出具体细节以提供对实施例的透彻理解。然而,本领域普通技术人员将理解,可以在没有这些具体细节的情况下实践实施例。例如,电路、系统、网络、进程和其它组件可以以框图的形式被显示为组件,以便不会模糊实施例的不必要的细节。在其它情况下,可以显示公知的电路、进程、算法、结构和技术,而不需要不必要的细节,以避免模糊实施例。Specific details are given in the following description to provide a thorough understanding of the embodiments. However, one of ordinary skill in the art will understand that the embodiments may be practiced without these specific details. For example, circuits, systems, networks, processes, and other components may be shown as components in block diagram form so as not to obscure the embodiments in unnecessary detail. In other instances, well-known circuits, processes, algorithms, structures and techniques may be shown without unnecessary detail in order to avoid obscuring the embodiments.

此外,应注意,可以将各个实施例描述为被描绘为流程图、程序图表、数据流程图、结构图或框图的进程。虽然流程图可以将操作描述为顺序进程,但是许多操作可以并行或同时执行。此外,可以重新布置操作的顺序。一个进程在其操作完成后终止,但是可以在图中未包括附加的步骤。进程可以对应于方法、功能、程序、子程序、次程序等。当进程对应于功能时,其终止可以对应于功能返回到调用功能或主功能。Furthermore, it should be noted that various embodiments may be described as processes depicted as flowcharts, program diagrams, data flow diagrams, structural diagrams, or block diagrams. Although a flowchart can describe operations as a sequential process, many operations can be performed in parallel or simultaneously. Additionally, the order of operations can be rearranged. A process terminates after its operations are complete, but there may be additional steps not included in the diagram. A process can correspond to a method, function, program, subroutine, subroutine, etc. When a process corresponds to a function, its termination may correspond to a return of the function to the calling function or to the main function.

术语“计算机可读介质”包括但不限于便携式或非便携式存储装置、光学存储装置,以及能够存储、包含或携带指令和/或数据的各种其它介质。计算机可读介质可以包括其中可以存储数据并且不包括无线或通过有线连接传播的载波和/或暂时性电子信号的非暂时性介质。非暂时性介质的示例可以包括但不限于磁盘或磁带、诸如光盘(CD)或数字通用盘(DVD)的光存储介质、闪速存储器、存储器或存储器装置。计算机可读介质可以存储在其上的代码和/或机器可执行指令,该指令可以表示进程、功能、子程序、程序、例行程序、子例行程序、模块、软件包、类别或任何指令、数据结构或程序语句的组合。代码段可以通过传递和/或接收信息、数据、参数、参数或存储内容而联接到另一代码段或硬件电路。信息、自变量、参数、数据等可以通过包括存储器共享、消息传递、记号传递、网络传输等的任何合适的手段传递、转发或发送。The term "computer-readable medium" includes, but is not limited to, portable or non-portable storage devices, optical storage devices, and various other media capable of storing, containing, or carrying instructions and/or data. Computer-readable media may include non-transitory media in which data may be stored and do not include carrier waves and/or transient electronic signals that propagate wirelessly or over wired connections. Examples of non-transitory media may include, but are not limited to, magnetic disks or tapes, optical storage media such as compact disks (CDs) or digital versatile disks (DVDs), flash memory, memory or memory devices. A computer-readable medium may have code and/or machine-executable instructions stored thereon, which instructions may represent a process, function, subroutine, program, routine, subroutine, module, software package, class, or any instruction , data structure or combination of program statements. A code segment may be coupled to another code segment or hardware circuitry by passing and/or receiving information, data, parameters, parameters, or storage. Information, arguments, parameters, data, etc. may be communicated, forwarded, or sent by any suitable means including memory sharing, message passing, token passing, network transmission, and the like.

此外,实施例可以由硬件、软件、固件、中间件、微代码、硬件描述语言或其任何组合来实现。当在软件、固件、中间件或微代码中实现时,用于执行必要任务(例如,计算机程序产品)的程序代码或代码段可以存储在计算机可读介质或机器可读介质中。处理器可以执行必要的任务。Furthermore, embodiments may be implemented by hardware, software, firmware, middleware, microcode, hardware description languages, or any combination thereof. When implemented in software, firmware, middleware, or microcode, program code or code segments for performing necessary tasks (eg, a computer program product) may be stored in a computer-readable medium or a machine-readable medium. The processor can perform necessary tasks.

在以下详细的描述和附图中,相同的附图标记有时用于表示相似或相同结构的结构元件,从而更好地理解本发明的性质和优点。In the following detailed description and the accompanying drawings, the same reference numerals are sometimes used to refer to structural elements of similar or identical structure to provide a better understanding of the nature and advantages of the present invention.

本发明的实施例涉及用于从数据中的写入路径错误快速恢复数据的系统、方法和计算机可读指令。公开内容中描述的方法、系统和计算机可读介质可以用在例如NAND闪速存储器装置中。Embodiments of the present invention relate to systems, methods, and computer-readable instructions for quickly recovering data from write path errors in the data. The methods, systems, and computer-readable media described in the disclosure may be used, for example, in NAND flash memory devices.

本文公开的实施例不限于本文所述的具体实施例的范围。除了本文所描述的之外,本发明的实施例的各种修改对于本领域普通技术人员来说基于前述描述和附图将是显而易见的。此外,虽然已经在特定环境中针对特定目的的特定实现方法的上下文中描述了本发明的一些实施例,但是本领域普通技术人员将认识到其有用性不限于此,并且本发明的实施例可以在很多环境中进行有益地实施以用于许多目的。The embodiments disclosed herein are not limited in scope to the specific embodiments described herein. Various modifications to the embodiments of the invention in addition to those described herein will be apparent to those of ordinary skill in the art based on the foregoing description and accompanying drawings. Furthermore, while some embodiments of the invention have been described in the context of particular implementations in particular environments for particular purposes, those of ordinary skill in the art will recognize that their usefulness is not so limited and that embodiments of the invention may Implemented beneficially in many environments for many purposes.

本公开的某些方面提供了当存在写入路径错误时改进闪速存储器装置的写入性能的方法。当在写入路径中检测到数据块的错误时,某些实施例可以使具有错误的数据块停止存储在闪速存储器缓冲器中,并且可以对具有错误的数据块执行错误校正。实施例还可以允许在对数据块错误进行校正期间将随后接收到的没有错误的数据块编程到闪速存储器缓冲器中。Certain aspects of the present disclosure provide methods for improving write performance of flash memory devices when write path errors exist. When an error of a data block is detected in the write path, some embodiments may cause the data block with the error to stop being stored in the flash memory buffer and may perform error correction on the data block with the error. Embodiments may also allow subsequently received error-free data blocks to be programmed into the flash memory buffer during correction of data block errors.

图1是示出包括经由闪速存储器控制器联接到闪速存储器的主机系统的系统的简化框图。图2示出了根据一些实施例的闪速存储器的配置。图3示出了在一个实施例中的后端闪速存储器控制器的示例框图。图4-11示出了在一些实施例中在存在写入路径错误的情况下用于改善写入性能的不同步骤。图12示出了在一个实施例中由闪速存储器控制器执行的方法。1 is a simplified block diagram illustrating a system including a host system coupled to flash memory via a flash memory controller. Figure 2 illustrates a configuration of a flash memory in accordance with some embodiments. Figure 3 shows an example block diagram of a back-end flash memory controller in one embodiment. Figures 4-11 illustrate different steps for improving write performance in the presence of write path errors in some embodiments. Figure 12 illustrates a method performed by a flash memory controller in one embodiment.

图1是示出包括经由闪速存储器控制器106联接到闪速存储器104的主机系统102的系统100的简化框图。在一些实施方式中,闪速存储器控制器106和闪速存储器104可以是闪速存储器装置(未示出)的一部分。闪速存储器控制器106可以被实施为片上系统(SoC)、专用集成电路(ASIC)、现场可编程门阵列(FPGA)或任何合适的电路。FIG. 1 is a simplified block diagram illustrating a system 100 including a host system 102 coupled to a flash memory 104 via a flash memory controller 106 . In some implementations, flash memory controller 106 and flash memory 104 may be part of a flash memory device (not shown). Flash memory controller 106 may be implemented as a system on a chip (SoC), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or any suitable circuit.

主机系统102可以包括任何适当的硬件装置、软件应用或硬件和软件的组合。在一些实施例中,主机系统102可以包括主机侧控制器(未示出)。主机系统102可以向闪速存储器控制器106发送请求以访问闪速存储器104,例如将数据写入闪速存储器104或从闪速存储器104读取数据。Host system 102 may include any suitable hardware device, software application, or combination of hardware and software. In some embodiments, host system 102 may include a host-side controller (not shown). Host system 102 may send requests to flash memory controller 106 to access flash memory 104 , such as to write data to or read data from flash memory 104 .

闪速存储器控制器106可以被配置为从主机系统102接收各种命令,并且基于这些命令与闪速存储器104通信。闪速存储器控制器106可以基于从主机系统102接收的命令来使闪速存储器104执行各种操作。例如,主机系统102可以与闪速存储器控制器106进行通信以编程、擦除、读取或修整闪速存储器104的部分。闪速存储器控制器106可以包括易失性存储器108和后端闪速控制器112。写入路径110可以提供数据路径或通道来对闪速存储器104进行编程或者经由后端闪速控制器112将数据写入到闪速存储器104。术语“通道”可用于指两个物理组件之间的路径。应当理解,通道可以包括其它物理组件。Flash memory controller 106 may be configured to receive various commands from host system 102 and communicate with flash memory 104 based on these commands. Flash memory controller 106 may cause flash memory 104 to perform various operations based on commands received from host system 102 . For example, host system 102 may communicate with flash memory controller 106 to program, erase, read, or trim portions of flash memory 104 . Flash memory controller 106 may include volatile memory 108 and back-end flash controller 112 . Write path 110 may provide a data path or channel to program flash memory 104 or write data to flash memory 104 via back-end flash controller 112 . The term "channel" can be used to refer to the path between two physical components. It should be understood that channels may include other physical components.

易失性存储器108可以包括任何类型的静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)或可能需要电力以保持其数据的任何其它类型的存储器。易失性存储器108可以用于存储从主机系统102接收的用于通过后端闪速控制器112写入闪速存储器104的数据108a。在本说明书中,数据108a也可以被称为“用户数据”。Volatile memory 108 may include any type of static random access memory (SRAM), dynamic random access memory (DRAM), or any other type of memory that may require power to retain its data. Volatile memory 108 may be used to store data 108a received from host system 102 for writing to flash memory 104 by backend flash controller 112 . In this specification, data 108a may also be referred to as "user data."

在一些实例中,在将数据108a写入闪速存储器104之前,错误可能被引入写入路径110中。例如,由于易失性存储器108中的内部错误或从易失性存储器108传输数据108a期间可能会产生错误。因此,期望保护易失性存储器108和后端闪速控制器112之间的数据路径。在一些示例中,可以执行错误校正码(ECC)方法以使用简单的错误校正奇偶校验位数据保护易失性存储器108和后端闪速控制器112之间的数据路径。例如,奇偶校验位108b可以被增加到数据108b,该数据108b可在数据108b在写入路径110中损坏的情况下用于提供ECC检测和校正。In some instances, errors may be introduced into write path 110 before data 108a is written to flash memory 104 . For example, errors may occur due to internal errors in volatile memory 108 or during the transfer of data 108a from volatile memory 108. Therefore, it is desirable to protect the data path between volatile memory 108 and back-end flash controller 112. In some examples, an error correction code (ECC) approach may be implemented to protect the data path between volatile memory 108 and back-end flash controller 112 using simple error correction parity bit data. For example, parity bit 108b may be added to data 108b, which may be used to provide ECC detection and correction in the event data 108b is corrupted in write path 110.

在一些实施方式中,闪速存储器104可以是任何非易失性存储器,例如NAND闪速存储器。在一些实施方式中,闪速存储器104可以是被配置为在外部作为NAND闪速存储器进行交互的NOR闪速存储器。闪速存储器104可被设计成在没有连续或基本连续的外部电源供给的情况下存储数据。在一些示例中,闪速存储器104可以例如在诸如笔记本电脑的计算机系统中用于次要数据存储。在一些这样的示例中,闪速存储器控制器106可以与多个闪速存储器交互。在一些实施例中,可以使用其它非易失性存储器来代替闪速存储器104或除闪速存储器104之外可以使用的其它非易失性存储器。示例可以包括只读存储器(ROM)、掩模ROM(MROM)、可编程ROM(PROM)、可擦除可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)、铁电RAM(F-RAM)、磁阻RAM(RAM)、基于聚合物的有机存储器、全息存储器、相变存储器等。In some implementations, flash memory 104 may be any non-volatile memory, such as NAND flash memory. In some implementations, flash memory 104 may be a NOR flash memory configured to interact externally as NAND flash memory. Flash memory 104 may be designed to store data without a continuous or substantially continuous supply of external power. In some examples, flash memory 104 may be used for secondary data storage, such as in a computer system such as a laptop computer. In some such examples, flash memory controller 106 may interact with multiple flash memories. In some embodiments, other non-volatile memories may be used instead of or in addition to flash memory 104 . Examples may include read-only memory (ROM), masked ROM (MROM), programmable ROM (PROM), erasable programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), ferroelectric RAM (F -RAM), magnetoresistive RAM (RAM), polymer-based organic memory, holographic memory, phase change memory, etc.

在一些实施方式中,闪速存储器104可以包括多个块,块包括页面。多个块可以包括可以在不同平面上的块,例如平面0或平面1上的块。平面0可以包括第一组块,平面1可以包括第二组块。每个闪速存储器管芯(die)可能具有不同数量的平面。多个这样的管芯可以被包括在诸如闪速存储器104之类的闪速存储器中。在一些实施方式中,可以使用主块来存储数据,并且可以使用扩展块来存储辅助信息,例如错误校正码或奇偶校验位。In some implementations, flash memory 104 may include multiple blocks, with blocks including pages. Multiple blocks may include blocks that may be on different planes, such as blocks on plane 0 or plane 1. Plane 0 may include the first group of blocks and plane 1 may include the second group of blocks. Each flash memory die may have a different number of planes. Multiple such dies may be included in a flash memory such as flash memory 104 . In some implementations, main blocks may be used to store data, and extension blocks may be used to store auxiliary information, such as error correction codes or parity bits.

后端闪速控制器112可以包括写入路径错误检测器114和写入路径错误校正器116。写入路径错误检测器114可以被配置为检测数据108a中的错误。例如,写入路径错误检测器114可以使用与数据108a相关联的奇偶校验位数据108b来执行ECC检测。写入路径错误校正器116可以被配置为执行ECC校正以校正具有错误的数据。可以使用任何ECC算法,例如里德-所罗门码、汉明码、博斯-查德胡里-霍昆格姆(BCH)码、低密度奇偶校验(LDPC)或任何其它合适的算法来实现待存储在闪速存储器104中的数据的数据保护。Backend flash controller 112 may include a write path error detector 114 and a write path error corrector 116 . Write path error detector 114 may be configured to detect errors in data 108a. For example, write path error detector 114 may use parity data 108b associated with data 108a to perform ECC detection. The write path error corrector 116 may be configured to perform ECC correction to correct data with errors. Any ECC algorithm such as Reed-Solomon code, Hamming code, Bose-Chadhuri-Hokungam (BCH) code, Low Density Parity Check (LDPC) or any other suitable algorithm can be used to implement Data protection of data stored in flash memory 104.

当后端闪速控制器112接收数据108a时,写入路径错误检测器114可以基于奇偶校验位108b确定数据108a中是否存在任何错误。如果数据108a中没有错误,则可以将数据写入闪速储器104中。如果写入路径错误检测器114检测到数据108a中的错误,则写入路径错误校正器116可以对数据108a执行错误校正。错误校正可由软件或固件执行。在大多数情况下,由于写入路径110中的出错率相对较低,所以可以在软件中执行错误校正以节省芯片面积和功率。然而,基于错误校正的软件可能是耗时的并且可能在数据路径中引入额外的延迟。When backend flash controller 112 receives data 108a, write path error detector 114 can determine whether there are any errors in data 108a based on parity bits 108b. If there are no errors in data 108a, the data can be written to flash memory 104. If write path error detector 114 detects an error in data 108a, write path error corrector 116 may perform error correction on data 108a. Error correction can be performed by software or firmware. In most cases, since the error rate in write path 110 is relatively low, error correction can be performed in software to save chip area and power. However, error correction-based software can be time-consuming and can introduce additional delays in the data path.

在一些实施方式中,数据保护方法,例如RAID(廉价磁盘冗余阵列)可用于在平面或管芯上的数据被损坏时恢复在闪速存储器104中存储的数据。例如,RAID可以利用镜像、数据条带化、奇偶校验或其组合来提供数据冗余和错误校正。在一些实施方式中,一组数据块可以被分割成不同的条带,使得每个条带可以表示多个管芯或平面上的用户数据,以及一个或多个管芯和平面上的奇偶校验位数据。可以通过对条带中的用户数据执行异或运算来生成奇偶校验位数据。在一些实施方式中,每个条带可以表示超级块。例如,超级块可以包括第一管芯中的第一块,第二管芯中的第二块,第三管芯中的第三块等等。当管芯或平面中的一个上的数据被损坏并且不能被校正时,可以读取不同管芯或平面上的相同条带中的其它数据。可以对读取的数据和奇偶校验位数据执行异或运算,以恢复用于不可校正的管芯或平面的数据。参照图2进一步来说明。In some implementations, data protection methods, such as RAID (Redundant Array of Inexpensive Disks), may be used to recover data stored in flash memory 104 when the data on the plane or die is corrupted. For example, RAID can provide data redundancy and error correction using mirroring, data striping, parity, or a combination thereof. In some embodiments, a set of data blocks may be segmented into different stripes such that each stripe may represent user data on multiple dies or planes, and parity on one or more dies and planes. Verification data. Parity data can be generated by performing an XOR operation on the user data in the stripe. In some implementations, each strip may represent a superblock. For example, a super block may include a first block in a first die, a second block in a second die, a third block in a third die, and so on. When data on one die or plane is corrupted and cannot be corrected, other data in the same strip on a different die or plane can be read. An XOR operation can be performed on the read data and the parity bit data to recover the data for the uncorrectable die or plane. Further explanation will be given with reference to FIG. 2 .

图2是闪速存储器104的结构的示例图。应当注意,图2所示的结构200仅用于说明目的,并且闪速存储器104的实际物理结构可以与描述实质上不同。FIG. 2 is an example diagram of the structure of the flash memory 104. It should be noted that the structure 200 shown in FIG. 2 is for illustrative purposes only and the actual physical structure of the flash memory 104 may differ materially from that described.

在一些实施方式中,闪速存储器104可以包括多个闪速存储器管芯闪存(flash)1104a、闪存2 104b、闪存3 104c、闪存4 104d、闪存5 104e……闪存N 104n。每个闪速存储器管芯闪存1 104a至闪存N 104n可以包括多个平面。每个平面可以存储多个数据块。在一些实施方式中,单独的闪速存储器管芯,例如奇偶校验位闪存206可以用于存储闪存1 104a至闪存N104n上存储的数据的奇偶校验位。In some implementations, flash memory 104 may include multiple flash memory dies flash 1104a, flash2 104b, flash3 104c, flash4 104d, flash5 104e, ... flash N 104n. Each flash memory die Flash 1 104a through Flash N 104n may include multiple planes. Each plane can store multiple data blocks. In some implementations, a separate flash memory die, such as parity flash 206, may be used to store parity for data stored on Flash 1 104a through Flash N 104n.

在一些实施方式中,第一条带202可以表示多个数据块,例如数据01、数据02、数据03、数据04、数据05……数据0n。第一条带202还可以包括用于奇偶校验的块,例如数据0。例如,数据0可以表示与第一条带202相关联的数据块的奇偶校验位数据,例如数据01-数据0n。类似地,第二条带204可以表示多个数据块,例如数据11、数据12、数据13、数据14、数据15,…数据1n。第二条带204还可以包括用于奇偶校验的块,例如数据1。数据1可以表示与第二条带204相关联的数据块(例如数据11-数据1n)的奇偶校验位数据。在一些实施方式中,来自每个条带的第一块可以存储在第一管芯上,来自每个条带的第二块可以存储在第二管芯上,等等。例如,数据01和数据11可以存储在闪存1 104a上,数据02和数据12可以存储在闪存2 104b上,数据03和数据13可以存储在闪存3 104c上,数据04和数据14可以存储在闪存4 104d上,数据05和数据15可以存储在闪存5 104e上,以及数据0n和数据1n可以存储在闪存N 104n上。在一些实施方式中,奇偶校验位数据的数据0和数据1可以存储在单独的奇偶校验位闪存206上。In some implementations, the first stripe 202 may represent multiple data blocks, such as data01, data02, data03, data04, data05...data0n. The first stripe 202 may also include blocks for parity, such as data zeros. For example, data 0 may represent the parity bit data of the data block associated with the first stripe 202, such as data 01 - data 0n. Similarly, the second stripe 204 may represent a plurality of data blocks, such as data 11, data 12, data 13, data 14, data 15, ... data 1n. The second stripe 204 may also include blocks for parity, such as Data 1. Data 1 may represent the parity bit data of the data block associated with the second stripe 204 (eg, Data 11 - Data 1n). In some implementations, a first block from each strip can be stored on a first die, a second block from each strip can be stored on a second die, and so on. For example, data 01 and data 11 can be stored on flash memory 1 104a, data 02 and data 12 can be stored on flash memory 2 104b, data 03 and data 13 can be stored on flash memory 3 104c, and data 04 and data 14 can be stored on flash memory 104c. On 4 104d, data 05 and data 15 may be stored on flash memory 5 104e, and data 0n and data 1n may be stored on flash memory N 104n. In some implementations, Data 0 and Data 1 of parity data may be stored on separate parity flash memory 206 .

在一些实施例中,数据01和数据11可以存储在闪存1 104a上的不同平面中。类似地,数据02和数据12可以存储在闪存2 104b上的不同平面中,数据03和数据13可以存储在闪存3 104c上的不同平面中,数据04和数据14可以存储在闪存4 104d的不同平面中,数据05和数据15可以存储在闪存5104e上的不同平面中,以及数据0n和数据1n可以存储在闪存N104n上的不同平面中。In some embodiments, Data 01 and Data 11 may be stored in different planes on Flash 1 104a. Similarly, Data 02 and Data 12 may be stored in different planes on Flash 2 104b, Data 03 and Data 13 may be stored in different planes on Flash 3 104c, and Data 04 and Data 14 may be stored in different planes on Flash 4 104d. Of the planes, data 05 and data 15 may be stored in different planes on flash memory 5104e, and data 0n and data 1n may be stored in different planes on flash memory N104n.

在一些情况下,条带中的所有数据可以并行地写入不同的管芯或平面中。例如,第一条带202中的每个用户数据(例如数据01-数据0n)和奇偶校验位数据(例如数据0)可以并行地写入闪速存储器104中的闪存1104a-闪存N 104n和奇偶校验位闪存206。然而,如果在从主机系统102接收的数据块中检测到写入路径错误,则后端闪速控制器112通常可能会停止将在接收的具有错误的数据块之后从主机系统102接收的任何后续的数据块写入闪速存储器104。后端闪速控制器112可以首先校正写入路径错误,重新计算奇偶校验,然后允许将从主机系统102接收的后续的数据块写入闪速存储器104。然而,在此期间,条带上的其它数据不能写入闪速存储器104,这可能在数据路径中引入额外的延迟。In some cases, all data in a stripe can be written to different dies or planes in parallel. For example, each user data (eg, data 01 - data 0n) and parity data (eg, data 0) in first stripe 202 may be written in parallel to flash memory 1104a - flash memory N 104n in flash memory 104 Parity bit flash memory 206. However, if a write path error is detected in a data block received from the host system 102, the back-end flash controller 112 may typically halt any subsequent data blocks received from the host system 102 that would follow the data block received with the error. The data blocks are written to the flash memory 104. Backend flash controller 112 may first correct the write path errors, recalculate parity, and then allow subsequent data blocks received from host system 102 to be written to flash memory 104 . However, during this time, other data on the strip cannot be written to flash memory 104, which may introduce additional delays in the data path.

作为示例,后端闪速控制器112可以一次从易失性存储器108接收一个数据块,例如数据01、数据02、数据03,…数据0n。当接收每个数据块时,可以通过对一个或多个接收到的数据块执行异或运算来来计算奇偶校验位数据。如果数据02具有错误,则后端闪速控制器112可以停止将数据03、数据04,…数据0n写入到闪速存储器104,直到数据02中的错误被校正,这可能引起额外的延迟。此外,由于数据02中的错误,通过对数据01和数据02执行异或运算而计算出的奇偶校验位数据0可能包括错误值,并且可能需要重新计算。重新计算奇偶校验位可进一步降低性能。As an example, the backend flash controller 112 may receive one data block at a time from the volatile memory 108, such as Data01, Data02, Data03, ... Data0n. As each data block is received, the parity bit data can be calculated by performing an XOR operation on one or more received data blocks. If Data 02 has an error, the backend flash controller 112 may stop writing Data 03, Data 04, ... Data On to the flash memory 104 until the error in Data 02 is corrected, which may cause additional delays. Furthermore, due to an error in Data 02, the parity bit Data 0 calculated by performing an XOR operation on Data 01 and Data 02 may include an erroneous value and may need to be recalculated. Recalculating parity bits can further reduce performance.

本发明的某些实施例可以在具有错误的数据正在被校正的同时通过允许无错误的数据写入闪速存储器来加速数据恢复。例如,当在数据块中检测到错误时,停止将具有错误的数据块和相关联的奇偶校验位数据写入闪速存储器104,直到错误被校正。虽然在具有错误的数据块中校正了错误,但可以对与不同管芯或平面相关联的其它无错误数据块进行编程。校正错误时,可以重新计算该条带的数据块的奇偶校验位。已校正的数据块和重新计算的奇偶校验位数据可以被写入闪速存储器104中。参照图3进一步进行解释。Certain embodiments of the invention may speed data recovery by allowing error-free data to be written to flash memory while data with errors is being corrected. For example, when an error is detected in a data block, writing of the data block with the error and associated parity bit data to the flash memory 104 is stopped until the error is corrected. Although errors are corrected in the block with errors, other error-free blocks associated with different dies or planes can be programmed. When errors are corrected, the parity bits for the data blocks of the stripe can be recalculated. The corrected data blocks and recalculated parity data may be written to flash memory 104 . This is further explained with reference to Figure 3 .

图3示出了在一些实施例中可以在写入路径错误的情况下提供改进的写入性能的闪速存储器控制器300的框图。Figure 3 shows a block diagram of a flash memory controller 300 that may provide improved write performance in the event of write path errors in some embodiments.

闪速存储器控制器300可以包括易失性存储器108和后端闪速控制器302。注意到,为了简单起见,闪速存储器控制器300可以包括图3中未示出的附加的或不同的组件。例如,在一些实施方式中,闪速存储器控制器300可以包括主机接口(未示出),以经由接口118与主机系统102通信。易失性存储器108可以在闪速存储器控制器300内部或外部。例如,在一些实施方式中,易失性存储器108可以是系统存储器(例如,DRAM)的一部分。Flash memory controller 300 may include volatile memory 108 and backend flash controller 302 . Note that, for simplicity, flash memory controller 300 may include additional or different components not shown in FIG. 3 . For example, in some implementations, flash memory controller 300 may include a host interface (not shown) to communicate with host system 102 via interface 118 . Volatile memory 108 may be internal or external to flash memory controller 300 . For example, in some implementations, volatile memory 108 may be part of system memory (eg, DRAM).

易失性存储器108可以存储经由接口118从主机系统102接收的多组数据块。作为示例,第一条带202可以表示包括从主机系统102接收的数据01、数据02、数据03、数据04和数据05的第一组数据块。缓冲器0可用于存储第一条带202中的数据块的奇偶校验位数据。类似地,第二条带204可以表示包括从主机系统102接收的数据11、数据12、数据13、数据14和数据15的第二组数据块。缓冲器1可用于存储第二条带204中的数据块的奇偶校验位数据。Volatile memory 108 may store sets of data blocks received from host system 102 via interface 118 . As an example, first stripe 202 may represent a first set of data blocks including Data01, Data02, Data03, Data04, and Data05 received from host system 102. Buffer 0 may be used to store parity data for the data blocks in the first stripe 202 . Similarly, second stripe 204 may represent a second set of data blocks including data 11 , data 12 , data 13 , data 14 , and data 15 received from host system 102 . Buffer 1 may be used to store parity data for the data blocks in the second stripe 204 .

在一些实施例中,第一条带202中的数据01-数据05中的每一个可以包括与其相关联的相应奇偶校验位数据,其可以类似于参照图1所讨论的奇偶校验位108b。类似地,数据11-数据15中的每一个可以包括与其相关联的可能类似于奇偶校验位108b的相应奇偶校验位数据。与每个数据块相关联的奇偶校验位数据可通过写入路径错误检测器114来检测给定数据块中的错误。例如,错误可能由于易失性存储器108中的存储错误或由于写入路径110中的传输错误而引起的错误。In some embodiments, each of Data01 - Data05 in first stripe 202 may include corresponding parity bit data associated therewith, which may be similar to parity bits 108b discussed with reference to FIG. 1 . Similarly, each of data 11 - data 15 may include corresponding parity bit data associated therewith that may be similar to parity bit 108b. The parity bit data associated with each data block may be used by write path error detector 114 to detect errors in a given data block. For example, the error may be due to a storage error in volatile memory 108 or an error due to a transmission error in write path 110 .

除了如参照图1所讨论的写入路径错误检测器114之外,后端闪速控制器302可以包括写入路径管理器304、奇偶校验计算器306、处理器308、存储器312和闪速存储器缓冲器310。注意,后端闪速控制器302的部分或全部组件可以是设备的一部分。In addition to write path error detector 114 as discussed with reference to FIG. 1 , backend flash controller 302 may include write path manager 304 , parity calculator 306 , processor 308 , memory 312 and flash Memory buffer 310. Note that some or all components of backend flash controller 302 may be part of the device.

写入路径管理器304可以被配置为经由用于写入闪速存储器104的写入路径110从易失性存储器108一次接收一个数据块。例如,写入路径管理器304可以为第一条带202接收数据01、数据02、数据03、数据04或数据05或为第二条带204接收数据11、数据12、数据13、数据14或数据15。写入路径管理器304可以向写入路径错误检测器114和奇偶校验计算器306提供接收的数据块。如果由写入路径错误检测器114在接收到的数据块中检测到错误,则写入路径管理器304进一步可以被配置为停止将具有错误的数据块存储到闪速存储器缓冲器310中。停止数据可以指示停止或不允许数据块存储在闪速存储器缓冲器310中。写入路径管理器304所选择的停止可以允许在写入路径错误校正的期间对不同闪速存储器管芯或平面中的一些独立数据进行编程。例如,写入路径管理器304还可以被配置为在具有错误的数据块的错误校正期间将在接收具有错误的数据块之后接收的随后的没有错误的数据存储到闪速存储器缓冲器310中。因此,一些实施例可以在写入路径错误的情况下通过加速写入性能和隐藏写入路径错误校正延迟来提供高效的数据恢复。Write path manager 304 may be configured to receive data one block at a time from volatile memory 108 via write path 110 for writing to flash memory 104 . For example, write path manager 304 may receive data 01, data 02, data 03, data 04, or data 05 for first stripe 202 or data 11, data 12, data 13, data 14, or data for second stripe 204. Data 15. Write path manager 304 may provide received data blocks to write path error detector 114 and parity calculator 306 . If an error is detected in a received data block by the write path error detector 114, the write path manager 304 may further be configured to stop storing the data block with the error into the flash memory buffer 310. The stop data may indicate that the data block is stopped or not allowed to be stored in flash memory buffer 310 . The stops selected by write path manager 304 may allow some independent data in different flash memory dies or planes to be programmed during write path error correction. For example, the write path manager 304 may also be configured to store subsequent error-free data received after receiving a data block with an error into the flash memory buffer 310 during error correction of the data block with an error. Therefore, some embodiments may provide efficient data recovery in the event of write path errors by accelerating write performance and hiding write path error correction delays.

奇偶校验计算器306可以被配置为计算从一组数据块中的一个或多个接收的数据块的奇偶校验位数据。例如,该组数据块可以包括例如第一条带202或第二条带204的条带中的数据块。奇偶校验计算器306可以包括奇偶校验缓冲器306a。奇偶校验缓冲器306a可以被配置为存储通过奇偶校验计算器306计算的奇偶校验位数据。在一些实施例中,奇偶校验计算器306可以在从该组数据块接收到的数据块与存储在奇偶校验缓冲器306a中的在先奇偶校验位数据之间执行异或运算来计算新的奇偶校验位数据。来自该组数据块的数据块可以包括从易失性存储器108接收到的无错误数据块或通过错误校正器116的错误已校正的数据块。作为示例,奇偶校验缓冲器306a最初可以为全零。当接收到数据01并且在数据01中没有发现错误时,奇偶校验计算器306可以通过对数据01的值和存储在奇偶校验缓冲器306a中的数据执行异或运算来计算数据01的奇偶校验位数据(例如,全零)。所计算的奇偶校验位数据可以存储在奇偶校验缓冲器306a中,以用于计算下一数据的奇偶校验位,例如,数据02。例如,当接收到数据02并且在数据02中没有发现错误时,奇偶校验计算器306可以通过对数据02的值和先前存储在奇偶校验缓冲器306a中的奇偶校验位数据执行异或运算来计算新的奇偶校验位数据(例如,数据01的奇偶校验位数据)。Parity calculator 306 may be configured to calculate parity bit data for data blocks received from one or more of a set of data blocks. For example, the set of data blocks may include data blocks in a stripe such as first stripe 202 or second stripe 204 . Parity calculator 306 may include parity buffer 306a. Parity buffer 306a may be configured to store parity bit data calculated by parity calculator 306. In some embodiments, parity calculator 306 may calculate New parity bit data. Data blocks from the set of data blocks may include error-free data blocks received from volatile memory 108 or error corrected data blocks by error corrector 116 . As an example, parity buffer 306a may initially be all zeros. When data 01 is received and no errors are found in data 01 , the parity calculator 306 may calculate the parity of data 01 by performing an XOR operation on the value of data 01 and the data stored in the parity buffer 306 a Check digit data (e.g., all zeros). The calculated parity bit data may be stored in the parity buffer 306a for use in calculating the parity bit of the next data, for example, data 02. For example, when Data 02 is received and no errors are found in Data 02, the parity calculator 306 may perform an XOR by performing an XOR on the value of Data 02 and the parity bit data previously stored in the parity buffer 306a. Operation to calculate new parity bit data (for example, parity bit data for data 01).

如果在从易失性存储器108接收的任何数据块中发现错误,则通过奇偶校验计算器306计算的奇偶校验位数据可能不准确,因此奇偶校验缓冲器306a可以存储错误的奇偶校验位数据。在这种情况下,写入路径管理器304可以被配置为将具有错误的数据块再次读入奇偶校验缓冲器306a。这可能导致奇偶校验计算器306再次利用具有错误的相同数据执行异或运算,以校正存储在奇偶校验缓冲器306a中的错误的奇偶校验位数据。一旦奇偶校验缓冲器306a中的奇偶校验位数据已被恢复为正确的奇偶校验位数据,则奇偶校验计算器306可以继续计算从易失性存储器108接收的数据块组中的所有无错误数据块的奇偶校验位数据。一旦数据块中的错误已被校正,则奇偶校验计算器306可进一步被配置为计算错误已校正的数据块和存储在奇偶校验缓冲器306a中的无错误数据块的奇偶校验位数据。一旦已经计算了用于该组数据块的奇偶校验位数据,则奇偶校验位数据可以与待写入闪速存储器104的错误已校正的数据块一起发送到闪速存储器缓冲器310。If an error is found in any data block received from volatile memory 108, the parity bit data calculated by parity calculator 306 may not be accurate and therefore parity buffer 306a may store incorrect parity bit data. In this case, the write path manager 304 may be configured to read the data block with the error into the parity buffer 306a again. This may cause the parity calculator 306 to perform an XOR operation again with the same data with errors to correct the erroneous parity bit data stored in the parity buffer 306a. Once the parity bit data in the parity buffer 306a has been restored to the correct parity bit data, the parity calculator 306 can continue to calculate all of the data blocks received from the volatile memory 108. Parity bit data for error-free data blocks. Once the errors in the data block have been corrected, the parity calculator 306 may be further configured to calculate parity bit data for the error-corrected data block and the error-free data block stored in the parity buffer 306a . Once the parity data for the set of data blocks has been calculated, the parity data may be sent to the flash memory buffer 310 along with the error-corrected data blocks to be written to the flash memory 104 .

处理器308可以被配置为执行存储在存储器312中的指令。存储器312可以包括SRAM、DRAM、SDRAM、ROM、EEPROM或被配置为存储可由处理器308执行的指令的任何适当的存储器。在一些实施例中,存储器312可以包括非暂时性计算机可读介质,其被配置为存储用于对具有错误的数据块执行错误校正的指令。例如,错误校正器116可以实施为作为存储器312的一部分的软件。在一些实施方式中,错误校正器116可以执行ECC校正以校正具有错误的数据块中的错误。在一些实施例中,存储在存储器312中的指令进一步可以使处理器308确定数据块中的错误已被校正,并将重新计算的奇偶校验位数据和错误已校正的数据块存储到闪速存储器缓冲器310中。Processor 308 may be configured to execute instructions stored in memory 312 . Memory 312 may include SRAM, DRAM, SDRAM, ROM, EEPROM, or any suitable memory configured to store instructions executable by processor 308 . In some embodiments, memory 312 may include a non-transitory computer-readable medium configured to store instructions for performing error correction on data blocks with errors. For example, error corrector 116 may be implemented as software as part of memory 312 . In some implementations, error corrector 116 may perform ECC correction to correct errors in data blocks with errors. In some embodiments, the instructions stored in memory 312 further cause the processor 308 to determine that errors in the data block have been corrected and to store the recalculated parity bit data and the error-corrected data block to the flash. in memory buffer 310.

闪速存储器缓冲器310可以被配置为从包括用于该组数据块的奇偶校验位数据的数据块组一次接收一个数据块。一旦该数据块组的所有数据块都被闪速存储器缓冲器310接收到,则数据块可以被发送到闪速存储器104以被存储在闪速存储器104中,并且闪速存储器缓冲器310可被释放以存储下一组数据块。Flash memory buffer 310 may be configured to receive one data block at a time from a group of data blocks that includes parity data for the group of data blocks. Once all data blocks of the data block group have been received by flash memory buffer 310, the data blocks may be sent to flash memory 104 for storage in flash memory 104, and flash memory buffer 310 may be Released to store the next set of data blocks.

图4示出了在一个实施例中用于通过闪速存储器控制器302处理具有错误的数据块的示例图。注意,为了简明起见,图4仅示出后端闪速控制器302的某些组件。FIG. 4 shows an example diagram for processing data blocks with errors by flash memory controller 302 in one embodiment. Note that, for the sake of simplicity, FIG. 4 only shows certain components of the backend flash controller 302.

在一些实施方式中,后端闪速控制器302可以从易失性存储器108一次接收一个数据块。例如,在一种情况下,数据01可以由后端闪速控制器302接收。写入路径管理器304可以将数据01转发到写入路径错误检测器114和奇偶校验计算器306两者。如果写入路径错误检测器114在数据01中没有检测到错误,则无错误数据01可以存储在闪速存储器缓冲器310中。奇偶校验计算器306可以通过对数据01和奇偶校验缓冲器306a的内容执行异或运算来计算数据01的奇偶校验位数据。作为示例,在为每组数据块存储第一数据块之前,奇偶校验缓冲器306a可以被重置为全零。因此,奇偶校验缓冲器306a现在可以将数据01存储为奇偶校验位数据。所计算的奇偶校验位数据可以被写回奇偶校验缓冲器306a中。In some implementations, back-end flash controller 302 may receive data one block at a time from volatile memory 108 . For example, in one case, data 01 may be received by backend flash controller 302. Write path manager 304 may forward data 01 to both write path error detector 114 and parity calculator 306 . If the write path error detector 114 detects no errors in data 01, error-free data 01 may be stored in the flash memory buffer 310. The parity calculator 306 may calculate the parity bit data of the data 01 by performing an XOR operation on the data 01 and the contents of the parity buffer 306a. As an example, parity buffer 306a may be reset to all zeros before storing the first data block for each set of data blocks. Therefore, parity buffer 306a can now store data 01 as parity bit data. The calculated parity bit data may be written back into the parity buffer 306a.

接下来,数据02可以由后端闪速控制器302接收。写入路径管理器304可以将数据02转发到写入路径错误检测器114和奇偶校验计算器306两者。如果写入路径错误检测器114检测到数据02中的错误,则写入路径管理器304可以停止将错误的数据02存储到闪速存储器缓冲器310中。然而,奇偶校验计算器306可以通过对具有错误的数据02和作为奇偶校验位数据的先前存储的数据01执行异或运算来计算奇偶校验位数据,如下所示:Next, data 02 may be received by the backend flash controller 302. Write path manager 304 may forward data 02 to both write path error detector 114 and parity calculator 306. If write path error detector 114 detects an error in data 02, write path manager 304 may stop storing erroneous data 02 into flash memory buffer 310. However, the parity calculator 306 may calculate the parity bit data by performing an XOR operation on the data 02 with the error and the previously stored data 01 as the parity bit data, as follows:

(数据01)异或(数据02) 等式(1)(Data 01) XOR (Data 02) Equation (1)

因此,奇偶校验缓冲器306a可以存储使用等式(1)计算的不正确的奇偶校验位数据。错误校正器116可以执行ECC校正以校正数据02中的错误。在一些实施例中,具有错误的数据02可以从易失性存储器108再次读入奇偶校验缓冲器306a以执行奇偶校验以校正存储在奇偶校验缓冲器306a中的奇偶校验位数据。奇偶校验计算器306可以被配置为通过对损坏的数据02和存储在奇偶校验缓冲器306a中的不正确奇偶校验位数据执行另一异或运算来重新计算奇偶校验位数据,如下所示:Therefore, parity buffer 306a may store incorrect parity bit data calculated using equation (1). Error corrector 116 may perform ECC correction to correct errors in data 02. In some embodiments, data 02 with errors may be read again from volatile memory 108 into parity buffer 306a to perform a parity check to correct the parity bit data stored in parity buffer 306a. Parity calculator 306 may be configured to recalculate the parity bit data by performing another XOR operation on the corrupted data 02 and the incorrect parity bit data stored in parity buffer 306a, as follows Shown:

(数据01)异或(数据02)异或(数据02) 等式(2)(Data 01) XOR (Data 02) XOR (Data 02) Equation (2)

奇偶校验缓冲器306a现在可以存储使用等式(2)计算的正确奇偶校验位数据(例如,数据01)。在一些实施例中,写入路径管理器304可允许在对具有错误的数据02进行错误校正期间将随后接收的没有错误的数据存储到闪速存储器缓冲器310中。参照图5进一步来进行讨论。Parity buffer 306a can now store the correct parity bit data (eg, data 01) calculated using equation (2). In some embodiments, write path manager 304 may allow subsequently received error-free data to be stored in flash memory buffer 310 during error correction of data 02 with errors. This discussion is further discussed with reference to Figure 5 .

图5示出了在一个实施例中处理具有错误的数据块之后的无错误数据块的示例图。注意,为了简明起见,图5中仅示出后端闪速控制器302的某些组件。Figure 5 shows an example diagram of an error-free data block after processing a data block with errors in one embodiment. Note that for the sake of simplicity, only certain components of the back-end flash controller 302 are shown in FIG. 5 .

在一些实施例中,写入路径管理器304可以在对具有错误的数据块进行错误校正期间允许将随后接收到的没有错误的数据块存储到闪速存储器缓冲器310中。如参照图4所讨论的,在数据02的错误校正期间,一些实施例可以允许将在损坏的数据02之后接收的无错误数据块存储到闪速存储器缓冲器310中。In some embodiments, write path manager 304 may allow subsequently received error-free data blocks to be stored into flash memory buffer 310 during error correction of data blocks with errors. As discussed with reference to Figure 4, during error correction of Data 02, some embodiments may allow error-free data blocks received after corrupted Data 02 to be stored into the flash memory buffer 310.

当数据02中的错误通过错误校正器116被校正时,数据03可以由后端闪速控制器302接收。写入路径管理器304可以将数据03转发到写入路径错误检测器114和奇偶校验缓冲器306a两者。如果通过写入路径错误检测器114在数据03中没有检测到错误,则写入路径管理器304可以转发用于存储在闪速存储器缓冲器310中的数据03。奇偶校验计算器306可以通过对接收到的数据03和先前存储在奇偶校验缓冲器306a中的数据01执行异或运算来重新计算奇偶校验位数据,如下所示:When errors in data 02 are corrected by error corrector 116, data 03 may be received by backend flash controller 302. Write path manager 304 may forward data 03 to both write path error detector 114 and parity buffer 306a. If no errors are detected in data 03 by write path error detector 114 , write path manager 304 may forward data 03 for storage in flash memory buffer 310 . The parity calculator 306 may recalculate the parity bit data by performing an XOR operation on the received data 03 and the data 01 previously stored in the parity buffer 306a, as follows:

(数据03)异或(数据01) 等式(3)(Data 03) XOR (Data 01) Equation (3)

类似地,在处理数据03之后,后端闪速控制器302可以接收数据04。写入路径管理器304可以将数据04转发到写入路径错误检测器114和奇偶校验计算器306两者。如果写入路径错误检测器114在数据04中没有检测到错误,则写入路径管理器304可以转发用于存储在闪速存储器缓冲器310中的数据04。奇偶校验计算器306可以通过对接收的数据04和存储在奇偶校验缓冲器306a中的奇偶校验位数据执行异或运算来重新计算奇偶校验位数据,如下所示:Similarly, after processing data 03, backend flash controller 302 may receive data 04. Write path manager 304 may forward data 04 to both write path error detector 114 and parity calculator 306 . If write path error detector 114 detects no errors in data 04 , write path manager 304 may forward data 04 for storage in flash memory buffer 310 . The parity calculator 306 may recalculate the parity data by performing an XOR operation on the received data 04 and the parity data stored in the parity buffer 306a, as follows:

(数据04)异或(数据03)异或(数据01) 等式(4)(Data 04) XOR (Data 03) XOR (Data 01) Equation (4)

接下来,在处理数据04之后,后端闪速控制器302可以接收数据05。写入路径管理器304可以将数据05转发到写入路径错误检测器114和奇偶校验计算器306两者。如果写入路径错误检测器114在数据05中没有检测到错误,则写入路径管理器304可以转发用于存储在闪速存储器缓冲器310中的数据05。奇偶校验计算器306可以通过对数据05和存储在奇偶校验缓冲器306a中的奇偶校验位数据执行异或运算来重新计算奇偶校验位数据,如下所示:Next, after processing data 04, the backend flash controller 302 may receive data 05. Write path manager 304 may forward data 05 to both write path error detector 114 and parity calculator 306. If write path error detector 114 detects no errors in data 05 , write path manager 304 may forward data 05 for storage in flash memory buffer 310 . Parity calculator 306 may recalculate the parity data by performing an XOR operation on data 05 and the parity data stored in parity buffer 306a, as follows:

(数据05)异或(数据04)异或(数据03)异或(数据01) 等式(5)(Data 05) XOR (Data 04) XOR (Data 03) XOR (Data 01) Equation (5)

如果在处理数据03、数据04和数据05期间已经校正了数据02,则写入路径管理器304可以转发用于存储在闪速存储器缓冲器310中的校正的数据02,如参照图6所讨论的。If Data 02 has been corrected during processing of Data 03 , Data 04 , and Data 05 , write path manager 304 may forward corrected Data 02 for storage in flash memory buffer 310 , as discussed with reference to FIG. 6 of.

图6示出了在一个实施例中用于存储错误校正的数据的示例图。注意,为了简明起见,图6中仅示出后端闪速控制器302的某些组件。Figure 6 shows an example diagram for storing error corrected data in one embodiment. Note that for the sake of simplicity, only certain components of the back-end flash controller 302 are shown in FIG. 6 .

错误校正的数据02可以由奇偶校验计算器306接收。奇偶校验计算器306可以通过对错误校正的数据02和存储在奇偶校验缓冲器306a中的奇偶校验位数据执行异或运算来计算第一条带202的奇偶校验位数据“奇偶校验位0”,如下所示:Error corrected data 02 may be received by parity calculator 306 . The parity calculator 306 may calculate the parity bit data "parity" of the first stripe 202 by performing an XOR operation on the error-corrected data 02 and the parity bit data stored in the parity buffer 306a. Check bit 0", as shown below:

(错误已校正的数据02)异或(数据05)异或(数据04)异或(数据03)异或(数据01) 等式(6)(Error corrected data 02) XOR (data 05) XOR (data 04) XOR (data 03) XOR (data 01) Equation (6)

写入路径管理器304可以转发用于存储在闪速存储器缓冲器310中的第一条带202的奇偶校验位0与错误已校正的数据02。一旦第一条带202中的所有数据块与奇偶校验位0一起存储在闪速存储器缓冲器310中,则可以释放易失性存储器108中的对应的存储器空间。Write path manager 304 may forward parity bit 0 and error corrected data 02 for first stripe 202 stored in flash memory buffer 310 . Once all data blocks in the first stripe 202 are stored in the flash memory buffer 310 with parity bit 0, the corresponding memory space in the volatile memory 108 may be freed.

图7示出了在一个实施例中用于将错误已校正的数据块和无错误数据块存储在闪速存储器104中的示例图。注意,为了简明起见,图7中仅示出后端闪速控制器302的某些组件。FIG. 7 shows an example diagram for storing error-corrected data blocks and error-free data blocks in flash memory 104 in one embodiment. Note that for the sake of simplicity, only certain components of the back-end flash controller 302 are shown in FIG. 7 .

如图7所示,第一条带202的错误已校正的数据块数据02和无错误数据块数据01、03、04、05可以从闪速存储器缓冲器310中释放,并且可以存储在闪速存储器104中。返回参照图2,数据01可以存储在闪存1 104a中,已校正的数据02可以存储在闪存2 104b中,数据03可以存储在闪存3104c中,数据04可以存储在闪存4 104d中,数据05可以存储在闪存5104e中,以及奇偶校验位0可以存储在奇偶校验位闪存206中。如果数据02中的错误没有被校正,并且第一条带202中的所有其它数据块已经存储在闪速存储器104中,则其它条带的数据块可以被发送到闪速存储器缓冲器310,如参照图8所讨论的。As shown in FIG. 7 , the error-corrected data block data 02 and error-free data block data 01 , 03 , 04 , 05 of the first stripe 202 may be released from the flash memory buffer 310 and may be stored in the flash memory buffer 310 . in memory 104. Referring back to Figure 2, data 01 can be stored in flash memory 1 104a, corrected data 02 can be stored in flash memory 2 104b, data 03 can be stored in flash memory 3 104c, data 04 can be stored in flash memory 4 104d, and data 05 can stored in flash memory 5104e, and parity bit 0 may be stored in parity bit flash memory 206. If the error in Data 02 has not been corrected, and all other data blocks in the first stripe 202 are already stored in the flash memory 104, the data blocks of the other stripes may be sent to the flash memory buffer 310, as discussed with reference to Figure 8.

图8示出了在一个实施例中计算具有错误的数据块的部分奇偶校验位数据的示例图。注意,为了简明起见,图8中仅示出后端闪速控制器302的某些组件。Figure 8 shows an example diagram of calculating partial parity bit data for a data block with errors in one embodiment. Note that for the sake of simplicity, only certain components of the back-end flash controller 302 are shown in FIG. 8 .

如图8所示,如果数据02中的错误未被校正,并且第一条带202中的所有其它数据块已经存储在闪速存储器缓冲器310中,则实施例可以允许发送第二条带204的数据块。在一个实施例中,存储在第一条带202的奇偶校验缓冲器306a中的部分奇偶校验位数据可以存储在易失性存储器108中。例如,可以利用等式(5)使用数据01、数据03、数据04和数据05来计算部分奇偶校验位数据。这可以允许释放待用于存储第二条带204的奇偶校验位数据的奇偶校验缓冲器306a。实施例进一步可以允许将第一条带202的数据块存储在闪速存储器104中,如参照图9所讨论的。As shown in Figure 8, if the error in data 02 has not been corrected and all other data blocks in the first stripe 202 are already stored in the flash memory buffer 310, embodiments may allow the second stripe 204 to be sent data block. In one embodiment, the portion of the parity bit data stored in the parity buffer 306a of the first stripe 202 may be stored in the volatile memory 108. For example, the partial parity data can be calculated using Equation (5) using Data01, Data03, Data04, and Data05. This may allow the parity buffer 306a to be used to store the parity bit data for the second stripe 204 to be freed. Embodiments may further allow the data blocks of the first stripe 202 to be stored in the flash memory 104 as discussed with reference to FIG. 9 .

图9示出了在一个实施例中用于将条带的部分奇偶校验位数据存储在闪速存储器中的示例图。注意,为了简明起见,图9中仅示出后端闪速控制器302的某些组件。Figure 9 shows an example diagram for storing partial parity data of a stripe in flash memory in one embodiment. Note that for the sake of simplicity, only certain components of the back-end flash controller 302 are shown in FIG. 9 .

如图9所示,如果数据02中的错误尚未被校正,则可以发送第一条带202的所有其它数据(例如,数据01,数据03,数据04和数据05)以存储在闪速存储器104中,而不发送具有错误的数据02。这可以允许在易失性存储器108中释放用于部分数据的存储器空间,同时将部分奇偶校验位数据存储在易失性存储器108中,直到数据02中的错误被校正。一些实施例可以允许发送第二条带204的数据,如参照图10所讨论的。As shown in FIG. 9 , if the error in Data 02 has not been corrected, all other data of the first stripe 202 (eg, Data 01 , Data 03 , Data 04 and Data 05 ) may be sent for storage in the flash memory 104 in without sending data 02 with error. This may allow memory space for the partial data to be freed in volatile memory 108 while the partial parity data is stored in volatile memory 108 until the error in Data 02 is corrected. Some embodiments may allow data for the second stripe 204 to be sent, as discussed with reference to FIG. 10 .

图10示出了在一个实施例中在校正第一条带的数据块中错误的同时用于存储第二条带的数据块的示例图。注意,为了简明起见,图10中仅示出后端闪速控制器302的某些组件。Figure 10 shows an example diagram for storing data blocks of a second stripe while correcting errors in the data blocks of the first stripe in one embodiment. Note that for the sake of simplicity, only certain components of the back-end flash controller 302 are shown in FIG. 10 .

如图10所示,如果数据02中的错误尚未被校正,则一些实施例可以允许将第二条带204的无错误的数据块存储到闪速存储器缓冲器310中。例如,写入路径管理器304可将数据11转发到写入路径错误检测器114和奇偶校验计算器306两者。如果写入路径错误检测器114在数据11中没有检测到错误,则写入路径管理器304可以转发用于存储在闪速存储器缓冲器310中的数据11。奇偶校验计算器306可以计算接收的数据11的奇偶校验位数据,并将奇偶校验位数据存储在奇偶校验缓冲器306a中。As shown in Figure 10, some embodiments may allow error-free data blocks of the second stripe 204 to be stored into the flash memory buffer 310 if the errors in data 02 have not been corrected. For example, write path manager 304 may forward data 11 to both write path error detector 114 and parity calculator 306. If write path error detector 114 detects no errors in data 11 , write path manager 304 may forward data 11 for storage in flash memory buffer 310 . The parity calculator 306 may calculate the parity bit data of the received data 11 and store the parity bit data in the parity buffer 306a.

图11示出了在一个实施例中在第一条带的数据块中校正错误的同时继续存储第二条带的数据块的示例图。注意,为了简明起见,图11中仅示出后端闪速控制器302的某些组件。Figure 11 shows an example diagram of correcting errors in the data blocks of the first stripe while continuing to store the data blocks of the second stripe in one embodiment. Note that for the sake of simplicity, only certain components of the back-end flash controller 302 are shown in FIG. 11 .

如图11所示,如果数据02中的错误尚未被校正,则一些实施例可以停止从与具有用于存储在闪速存储器缓冲器310中的错误的数据02在同一平面或相同管芯上的另一组数据块中发送数据块。如图11所示,数据12可能被停止存储在闪速存储器缓冲器310中,但是实施例可以允许将数据12之后的随后的数据发送到闪速存储器缓冲器310。因此,数据13可以存储在闪速存储器缓冲器310中。在任何时候,当数据02中的错误已被校正时,数据02和数据12可以与重新计算的奇偶校验位一起存储在闪速存储器104中。在不偏离所公开技术的范围的情况下,也可以应用本发明的实施例来改进在具有多个数据块的写入路径错误的情况下的写入性能。As shown in Figure 11, if the error in data 02 has not been corrected, some embodiments may stop data from being on the same plane or on the same die as data 02 with the error for storage in flash memory buffer 310. Send data chunks in another set of data chunks. As shown in FIG. 11 , data 12 may be stopped from being stored in flash memory buffer 310 , but embodiments may allow subsequent data after data 12 to be sent to flash memory buffer 310 . Therefore, data 13 may be stored in flash memory buffer 310. At any time, when the errors in Data 02 have been corrected, Data 02 and Data 12 may be stored in flash memory 104 along with the recalculated parity bits. Without departing from the scope of the disclosed technology, embodiments of the present invention may also be applied to improve write performance in the case of write path errors with multiple data blocks.

图12示出了在一个实施例中由闪速存储器控制器300执行以改进在写入路径错误的情况下的写入性能的方法1200。Figure 12 illustrates a method 1200 performed by flash memory controller 300 to improve write performance in the event of write path errors in one embodiment.

在步骤1202中,闪速存储器控制器可以从存储在易失性存储器中的第一组数据块中一次接收一个数据块。易失性存储器可以存储包括第一组数据块和第二组数据块的多组数据块。返回参照图3,后端闪速控制器302可以从存储在易失性存储器108中的第一条带202的第一组数据块(例如,数据01-数据05)一次接收一个数据块。易失性存储器108还可以存储用于第二条带204的第二组数据块(例如,数据11-数据15)。写入路径管理器304可以将每个接收的数据块转发到写入路径错误检测器114和奇偶校验计算器306。In step 1202, the flash memory controller may receive one data block at a time from a first set of data blocks stored in volatile memory. The volatile memory may store multiple sets of data blocks including a first set of data blocks and a second set of data blocks. Referring back to FIG. 3 , backend flash controller 302 may receive one data block at a time from a first set of data blocks (eg, Data01 - Data05 ) of first stripe 202 stored in volatile memory 108 . Volatile memory 108 may also store a second set of data blocks for the second stripe 204 (eg, Data 11 - Data 15). Write path manager 304 may forward each received data block to write path error detector 114 and parity calculator 306.

在步骤1204中,后端闪速控制器302可以检测接收的数据块中的一个的错误。例如,写入路径管理器304可以接收第一数据块数据01,并且可以将数据01转发到写入路径错误检测器114和奇偶校验计算器306。如参照图4所讨论的,写入路径错误检测器114可能在接收的数据块数据01中没有检测到错误,并且数据01可以存储在闪速存储器缓冲器310中。奇偶校验计算器306可以通过对数据01和奇偶校验缓冲器306a的内容(例如,零)执行异或运算来计算奇偶校验位数据,并且可以将计算的奇偶校验位数据存储在奇偶校验缓冲器306a中。接下来,写入路径管理器304可以接收第二数据块数据02,并且可以将数据02转发到写入路径错误检测器114和奇偶校验计算器306。如参照图5所讨论的,写入路径错误检测器114可以检测接收的数据块数据02中的错误。例如,写入路径错误检测器114可以使用与数据02相关联的ECC数据来检测错误。In step 1204, the backend flash controller 302 may detect an error in one of the received data blocks. For example, write path manager 304 may receive first data block data 01 and may forward data 01 to write path error detector 114 and parity calculator 306 . As discussed with reference to FIG. 4 , write path error detector 114 may not detect an error in received data block Data 01 , and Data 01 may be stored in flash memory buffer 310 . The parity calculator 306 may calculate the parity bit data by performing an XOR operation on data 01 and the contents of the parity buffer 306a (eg, zero), and may store the calculated parity bit data in the parity in the check buffer 306a. Next, write path manager 304 may receive second data block data 02 and may forward data 02 to write path error detector 114 and parity calculator 306 . As discussed with reference to FIG. 5, write path error detector 114 may detect errors in received data block data 02. For example, write path error detector 114 may use ECC data associated with data 02 to detect errors.

在步骤1206中,后端闪速控制器302可以基于从第一组数据块接收的一个或多个数据块来计算奇偶校验位数据。奇偶校验计算器306可以基于接收的数据块数据01和数据02来计算奇偶校验位数据。例如,奇偶校验计算器306可以对接收的数据块数据02和存储在奇偶校验缓冲器306a中的奇偶校验位数据(例如,数据01)执行异或运算,如等式(1)所示。奇偶校验计算器306可以将计算的奇偶校验位数据存储在奇偶校验缓冲器306a中。在一些实施方式中,步骤1204和1206可以并行执行。In step 1206, the backend flash controller 302 may calculate parity data based on the one or more data blocks received from the first set of data blocks. The parity calculator 306 may calculate the parity bit data based on the received data blocks Data01 and Data02. For example, the parity calculator 306 may perform an XOR operation on the received data block data 02 and the parity bit data (eg, data 01) stored in the parity buffer 306a, as expressed in equation (1) Show. Parity calculator 306 may store the calculated parity bit data in parity buffer 306a. In some implementations, steps 1204 and 1206 may be performed in parallel.

在步骤1208中,后端闪速控制器302可以停止将具有错误的数据块存储在闪速存储器缓冲器中。如参照图3所讨论的,写入路径管理器304可以停止将具有错误的数据02存储在闪速存储器缓冲器310中,以避免在闪速存储器104中写入损坏的数据。In step 1208, the backend flash controller 302 may stop storing data blocks with errors in the flash memory buffer. As discussed with reference to FIG. 3 , write path manager 304 may stop storing data 02 with errors in flash memory buffer 310 to avoid writing corrupted data in flash memory 104 .

在步骤1210中,后端闪速控制器302可以对具有错误的数据块进行错误校正。如参照图3所讨论的,错误校正器116可以执行ECC校正以校正数据02中的错误。另外,可以执行奇偶校验校正,以通过将具有错误的数据02再次读入奇偶校验缓冲器306a并且使用等式(2)重新计算奇偶校验位数据来校正存储在奇偶校验缓冲器306a中的奇偶校验位数据。In step 1210, the backend flash controller 302 may perform error correction on the data blocks with errors. As discussed with reference to FIG. 3, error corrector 116 may perform ECC correction to correct errors in Data 02. Additionally, parity correction may be performed to correct the data stored in the parity buffer 306a by reading the data 02 with errors into the parity buffer 306a again and recalculating the parity bit data using Equation (2) parity bit data in .

在步骤1212中,后端闪速存储器控制器302可以在对具有错误的数据块进行错误校正期间将在具有错误的数据块之后接收的随后的数据块存储到闪速存储器缓冲器中。如参照图5所讨论的,在数据02的错误校正期间,可以从易失性存储器108接收随后的数据块数据03、数据04和数据05。如果在数据03、数据04或数据05中的任何一个数据中没有检测到错误,则数据03、数据04和数据05可以存储在闪速存储器缓冲器310中。因此,实施例可以通过仅限于停止具有错误的数据块并允许没有错误的数据块通过,而在写入路径错误的情况下使数据的停止最小化。因此,选择的停止可以改进写入路径错误时的写入性能。In step 1212, the backend flash memory controller 302 may store subsequent data blocks received after the data block with errors into the flash memory buffer during error correction of the data block with errors. As discussed with reference to FIG. 5 , during error correction of Data 02 , subsequent data blocks Data 03 , Data 04 , and Data 05 may be received from volatile memory 108 . If no error is detected in any one of Data 03, Data 04, or Data 05, Data 03, Data 04, and Data 05 may be stored in the flash memory buffer 310. Thus, embodiments may minimize stalling of data in the event of a write path error by limiting stalling to data blocks with errors and allowing data blocks without errors to pass. Therefore, selected stopping can improve write performance when write path errors occur.

如果在随后的数据03、数据04和数据05存储在闪速存储器缓冲器310中期间已经校正了数据02中的错误,则奇偶校验计算器306可以基于错误已校正的数据02、没有错误的数据03、数据04和数据05重新计算第一组数据块的奇偶校验位数据。第一组数据块的重新计算的奇偶校验位数据和错误已校正的数据块02可以存储在闪速存储器缓冲器310中。在下一步骤中,第一组数据块的重新计算的奇偶校验位数据和错误已校正的数据块02可被发送以存储在闪速存储器104中,并且闪速存储器缓冲器310可以被释放以存储下一组数据块。If the error in Data 02 has been corrected during subsequent storage of Data 03, Data 04, and Data 05 in the flash memory buffer 310, the parity calculator 306 may be based on the error-corrected Data 02, error-free Data 03, Data 04 and Data 05 recalculate the parity bit data of the first group of data blocks. The recalculated parity data and the error-corrected data block 02 of the first set of data blocks may be stored in the flash memory buffer 310 . In a next step, the recalculated parity data and error corrected data block 02 of the first set of data blocks may be sent for storage in flash memory 104 and the flash memory buffer 310 may be released to Store the next set of data blocks.

如果在随后的数据03、数据04和数据05存储在闪速存储器缓冲器310中期间尚未校正数据02中的错误,则数据03、数据04和数据05可以被发送以存储在闪速存储器104中而不发送损坏的数据02。奇偶校验计算器306可以基于数据03、数据04和数据05重新计算第一组数据块的部分奇偶校验位数据。如参照图8所讨论的,没有数据02的第一组数据块的部分奇偶校验位数据可以存储在易失性存储器108中。一些实施例可以允许在数据02的错误校正期间将不与数据02共享相同的管芯或平面的第二组数据块中的数据块存储到闪速存储器缓冲器310中。当数据02中的错误已被校正时,奇偶校验计算器306可以基于错误已校正的数据02和存储在易失性存储器108中的部分奇偶校验位数据重新计算第一组数据块的奇偶校验位数据。第一组数据块的重新计算的奇偶校验位数据和错误校正的数据02可以存储在闪速存储器缓冲器301中,以被发送到闪速存储器104。If the error in Data02 has not been corrected during subsequent storage of Data03, Data04, and Data05 in flash memory buffer 310, Data03, Data04, and Data05 may be sent for storage in flash memory 104 without sending corrupted data 02. The parity calculator 306 may recalculate the partial parity bit data of the first group of data blocks based on data 03, data 04, and data 05. As discussed with reference to FIG. 8 , partial parity data for the first set of data blocks without data 02 may be stored in volatile memory 108 . Some embodiments may allow data blocks from the second set of data blocks that do not share the same die or plane as Data 02 to be stored into the flash memory buffer 310 during error correction of Data 02. When the errors in data 02 have been corrected, the parity calculator 306 may recalculate the parity of the first set of data blocks based on the error-corrected data 02 and the partial parity bit data stored in the volatile memory 108 Check digit data. The recalculated parity data and error-corrected data 02 of the first set of data blocks may be stored in the flash memory buffer 301 to be sent to the flash memory 104 .

因此,一些实施例可以允许在对具有错误的数据块进行错误校正期间发送没有错误的数据块以存储在闪速存储器中。这可以加速用于存储在闪速存储器中的用户数据的写入性能。此外,在出错的数据被校正之前执行即时奇偶校验以允许与具有错误的数据块共享相同的条带的用户数据被编程可以隐藏写入错误校正的延迟。一些实施例可以提供选择停止数据以允许在写入路径错误校正期间对不同平面或管芯上的一些独立的数据块进行编程。Therefore, some embodiments may allow error-free data blocks to be sent for storage in flash memory during error correction of data blocks with errors. This accelerates write performance for user data stored in flash memory. Additionally, performing an on-the-fly parity check before the erroneous data is corrected to allow user data that shares the same stripe as the data block with the error to be programmed can hide the latency of write error correction. Some embodiments may provide selective stop data to allow several independent blocks of data on different planes or dies to be programmed during write path error correction.

Claims (20)

1. A flash memory device, comprising:
a write path error detector configured to detect whether a data block received from a set of data blocks has an error;
a parity calculator configured to calculate parity bit data of the data block;
a processor configured to execute instructions stored in a memory, wherein the instructions stored in the memory cause the processor to perform error correction on a block of data having an error; and
a write path manager configured to:
Stopping storing the data block with the error in a flash memory buffer; and
allowing subsequent error-free data blocks received after the error-bearing data block to be stored into the flash memory buffer during error correction of the error-bearing data block,
wherein the parity calculator is further configured to recalculate the parity bit data of the set of data blocks based on the error-free data blocks and error-corrected data blocks.
2. The flash memory device of claim 1, wherein the set of data blocks is stored in a volatile memory communicatively coupled to the flash memory device.
3. The flash memory device of claim 2, wherein the volatile memory receives the set of data blocks from a host system communicatively coupled to the volatile memory for storage in a flash memory coupled to the flash memory device.
4. The flash memory device of claim 1, wherein the parity calculator further comprises a parity buffer configured to store the parity bit data.
5. The flash memory device of claim 4, wherein the parity calculator calculates the parity bit data for the data block by performing an exclusive-or operation on the received data block and the contents of the parity buffer.
6. The flash memory device of claim 4, wherein the recalculated parity bit data is stored in the parity buffer.
7. The flash memory device of claim 1, wherein the write path manager is further configured to allow error corrected data blocks and recalculated parity data to be stored into the flash memory buffer.
8. The flash memory device of claim 1, wherein the flash memory device is communicatively coupled to a flash memory, and wherein the instructions stored in the memory further cause the processor to send error corrected data blocks, the error free data blocks, and recalculated parity bit data stored in the flash memory buffer to program the flash memory.
9. The flash memory device of claim 1, wherein the flash memory buffer and the flash memory device are part of a back-end flash memory controller.
10. A method of operating a flash memory device, comprising:
receiving, by a flash memory controller coupled to a flash memory in the flash memory device, one data block at a time from a first set of data blocks stored in a volatile memory, wherein the volatile memory stores a plurality of sets of data blocks including the first set of data blocks and a second set of data blocks;
detecting, by the flash memory controller, an error of one of the received data blocks;
calculating, by the flash memory controller, parity bit data based on one or more data blocks received from the first set of data blocks;
stopping, by the flash memory controller, storing the data block having the error in a flash memory buffer;
performing error correction on the data block with the error by the flash memory controller; and
during error correction of the data block with errors, a subsequent data block without errors received after the data block with errors is stored by the flash memory controller into the flash memory buffer.
11. The method of claim 10, the method further comprising:
Determining, by the flash memory controller, that the error in the block of data having the error has been corrected;
recalculating, by the flash memory controller and based on the error corrected data blocks and the error free data blocks, the parity bit data for the first set of data blocks; and
the recalculated parity data for the first set of data blocks and the error corrected data blocks are stored in the flash memory buffer by the flash memory controller.
12. The method of claim 11, the method further comprising:
the parity data, the error corrected data block, and the error free data block of the first set of data blocks are transmitted by the flash memory controller for storage in the flash memory.
13. The method of claim 10, the method further comprising:
determining, by the flash memory controller, that the errors in the data blocks with errors have not been corrected after all of the data blocks are received from the first set of data blocks; and
the first set of data blocks of the error-free data blocks are sent by the flash memory controller for storage in the flash memory.
14. The method of claim 13, the method further comprising:
recalculating, by the flash memory controller, the parity data for the first set of data blocks without the error corrected data block; and
the recalculated parity data for the first set of data blocks is stored by the flash memory controller into the volatile memory.
15. The method of claim 14, the method further comprising:
receiving, by the flash memory controller, a data block from the second set of data blocks of the plurality of data blocks stored in the volatile memory;
determining, by the flash memory controller, that the data block from the second set of data blocks does not include an error; and
the data blocks from the second set of data blocks are stored into the flash memory buffer by the flash memory controller.
16. The method of claim 10, wherein the flash memory comprises a plurality of flash memory dies, and wherein individual data blocks in each set of data blocks are stored in a same flash memory die or a same flash memory plane.
17. The method of claim 16, wherein the data blocks sharing the same flash memory die or the same flash memory plane and the data blocks having errors are stopped from being stored in the flash memory buffer until the errors are corrected.
18. The method of claim 10, the method further comprising:
the parity bit data is stored in a parity buffer, wherein the parity bit data is calculated by performing an exclusive-or operation on the received data block and the contents of the parity buffer.
19. A non-transitory computer-readable medium having instructions stored thereon, which when executed by a processor performs a method comprising:
determining that an error exists in a data block of a set of data blocks, wherein the set of data blocks is stored in a volatile memory communicatively coupled to the processor, wherein the data block having the error is stopped from being stored in a flash memory buffer coupled to the processor;
performing error correction on the data block with the error; and
during error correction of the data block with errors, a subsequent data block without errors received after the data block with errors is stored into the flash memory buffer.
20. The non-transitory computer-readable medium of claim 19, wherein the processor is part of a flash memory controller for a flash memory device.
CN201710950725.0A 2017-10-13 2017-10-13 Efficient data recovery for write path errors Active CN109669800B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710950725.0A CN109669800B (en) 2017-10-13 2017-10-13 Efficient data recovery for write path errors

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710950725.0A CN109669800B (en) 2017-10-13 2017-10-13 Efficient data recovery for write path errors

Publications (2)

Publication Number Publication Date
CN109669800A CN109669800A (en) 2019-04-23
CN109669800B true CN109669800B (en) 2023-10-20

Family

ID=66138675

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710950725.0A Active CN109669800B (en) 2017-10-13 2017-10-13 Efficient data recovery for write path errors

Country Status (1)

Country Link
CN (1) CN109669800B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102732383B1 (en) * 2019-10-25 2024-11-22 에스케이하이닉스 주식회사 Storage node of distributed storage system and operating method thereof
US11057060B1 (en) * 2020-03-23 2021-07-06 Sage Microelectronics Corporation Method and apparatus for matrix flipping error correction
TWI755739B (en) 2020-05-26 2022-02-21 慧榮科技股份有限公司 Memory controller and data processing method
CN112540799A (en) * 2020-12-02 2021-03-23 深圳市硅格半导体有限公司 Management method, system, terminal device and storage medium of startup data
CN117885538B (en) * 2024-03-18 2024-05-07 光克(上海)工业自动化科技有限公司 New energy vehicle power battery early warning method, system, equipment and storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8112699B2 (en) * 2008-02-14 2012-02-07 Atmel Rousset S.A.S. Error detecting/correcting scheme for memories
US20100180182A1 (en) * 2009-01-09 2010-07-15 Seagate Technology Llc Data memory device and controller with interface error detection and handling logic
US20110040924A1 (en) * 2009-08-11 2011-02-17 Selinger Robert D Controller and Method for Detecting a Transmission Error Over a NAND Interface Using Error Detection Code
CN102411548B (en) * 2011-10-27 2014-09-10 忆正存储技术(武汉)有限公司 Flash memory controller and method for transmitting data among flash memories

Also Published As

Publication number Publication date
CN109669800A (en) 2019-04-23

Similar Documents

Publication Publication Date Title
US10346268B2 (en) Efficient data recovery for write path errors
US11405058B2 (en) Stopping criteria for layered iterative error correction
CN106856103B (en) Turbo product code for NAND flash
CN109669800B (en) Efficient data recovery for write path errors
US9632863B2 (en) Track error-correcting code extension
US8726140B2 (en) Dummy data padding and error code correcting memory controller, data processing method thereof, and memory system including the same
US20170177259A1 (en) Techniques to Use Open Bit Line Information for a Memory System
KR102385138B1 (en) Raid controller device and storage device configured to recover data having uncorrectable ecc error
US20120311381A1 (en) Apparatus and methods for providing data integrity
KR101343262B1 (en) Method and apparatus to perform concurrent read and write memory operations
US20150019904A1 (en) Data processing system and operating method thereof
CN110349616A (en) For the dynamic interleaving device variation of the bit line malfunctions in nand flash memory
KR20190038964A (en) Error correction code unit and encoding and decoding methods thereof
US20170286219A1 (en) Data storage device and operating method thereof
US9286156B2 (en) Data storage device and method for processing error correction code thereof
US20180203625A1 (en) Storage system with multi-dimensional data protection mechanism and method of operation thereof
US20170345456A1 (en) Programmable error-correcting code for a host device
JP6491482B2 (en) Method and / or apparatus for interleaving code words across multiple flash surfaces
US10025652B2 (en) Error location pointers for non volatile memory
KR20140088212A (en) Apparatuses and methods for storing validity masks and operating apparatuses
US12267086B2 (en) High throughput polar codeword decoding by decoding bch sub-code in polar code structure
US12224769B2 (en) Fast polynomial division by monomial for Reed-Solomon ELP maintenance
US20250021427A1 (en) Storage controller for recovering data using bit combinations and method of operating the same
KR102696725B1 (en) Turbo product codes for nand flash

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant