CN109509499B - Decoding method, memory storage device and memory control circuit unit - Google Patents

Decoding method, memory storage device and memory control circuit unit Download PDF

Info

Publication number
CN109509499B
CN109509499B CN201710825756.3A CN201710825756A CN109509499B CN 109509499 B CN109509499 B CN 109509499B CN 201710825756 A CN201710825756 A CN 201710825756A CN 109509499 B CN109509499 B CN 109509499B
Authority
CN
China
Prior art keywords
data
buffer
memory
decoding
type
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
CN201710825756.3A
Other languages
Chinese (zh)
Other versions
CN109509499A (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.)
Phison Electronics Corp
Original Assignee
Phison Electronics Corp
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 Phison Electronics Corp filed Critical Phison Electronics Corp
Priority to CN201710825756.3A priority Critical patent/CN109509499B/en
Publication of CN109509499A publication Critical patent/CN109509499A/en
Application granted granted Critical
Publication of CN109509499B publication Critical patent/CN109509499B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C16/00Erasable programmable read-only memories
    • G11C16/02Erasable programmable read-only memories electrically programmable
    • G11C16/06Auxiliary circuits, e.g. for writing into memory
    • G11C16/08Address circuits; Decoders; Word-line control circuits
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C8/00Arrangements for selecting an address in a digital store
    • G11C8/10Decoders

Landscapes

  • Engineering & Computer Science (AREA)
  • Microelectronics & Electronic Packaging (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

An exemplary embodiment of the present invention provides a decoding method, a memory storage device and a memory control circuit unit, including: temporarily storing the first data into a buffer memory, wherein the buffer memory comprises a first buffer area and a second buffer area; copying the decoded data of the second buffer to the first buffer; performing, in the first buffer, a first type of decoding operation on the first data based on the copied decoded data, wherein the copied decoded data is different from original decoded data corresponding to the first data; and outputting the decoded data if the first type of decoding operation is successful. Therefore, the efficiency of the decoding operation can be improved.

Description

解码方法、存储器存储装置及存储器控制电路单元Decoding method, memory storage device and memory control circuit unit

技术领域technical field

本发明涉及一种解码方法、存储器存储装置及存储器控制电路单元。The invention relates to a decoding method, a memory storage device and a memory control circuit unit.

背景技术Background technique

数码相机、移动电话与MP3播放器在这几年来的成长十分迅速,使得消费者对存储媒体的需求也急速增加。由于可复写式非易失性存储器模块(rewritable non-volatilememory module)(例如,快闪存储器)具有数据非易失性、省电、体积小,以及无机械结构等特性,所以非常适合内建于上述所举例的各种可携式多媒体装置中。Digital cameras, mobile phones, and MP3 players have grown rapidly in recent years, making consumers' demand for storage media also increase rapidly. Since the rewritable non-volatile memory module (for example, flash memory) has the characteristics of data non-volatility, power saving, small size, and no mechanical structure, it is very suitable for built-in Among the various portable multimedia devices listed above.

一般来说,为了确保数据的正确性,数据会先被编码然后再被存入可复写式非易失性存储器模块中。在读取数据时,数据会被解码以尝试更正其中的错误。若数据中的错误皆被更正,更正的数据才会被传回给主机系统。然而,随着编/解码技术逐渐进步,编/解码过程中需要暂存的数据的数据量可能会大于所设置的缓冲存储器的容量。因此,在编/解码过程中往往需要重复从可复写式非易失性存储器模块中读取特定数据,从而增加可复写式非易失性存储器模块的损耗,并且也会降低编/解码速度。特别是,在叠代解码操作中,上述情况更加显著。Generally speaking, in order to ensure the correctness of the data, the data will be encoded first and then stored in the rewritable non-volatile memory module. As data is read, it is decoded in an attempt to correct errors in it. If the errors in the data are corrected, the corrected data will be sent back to the host system. However, as the encoding/decoding technology gradually improves, the amount of data that needs to be temporarily stored during the encoding/decoding process may be greater than the capacity of the set buffer memory. Therefore, it is often necessary to repeatedly read specific data from the rewritable non-volatile memory module during the encoding/decoding process, thereby increasing the loss of the rewritable non-volatile memory module and reducing the encoding/decoding speed. Especially, in the iterative decoding operation, the above-mentioned situation is more remarkable.

发明内容Contents of the invention

本发明的一范例实施例提供一种解码方法、存储器存储装置及存储器控制电路单元,可在缓冲存储器的容量有限的状况下提高解码操作的效率。An exemplary embodiment of the present invention provides a decoding method, a memory storage device and a memory control circuit unit, which can improve the efficiency of the decoding operation under the condition that the capacity of the buffer memory is limited.

本发明的一范例实施例提供一种解码方法,其用于可复写式非易失性存储器模块,所述可复写式非易失性存储器模块包括多个实体单元,所述解码方法包括:将第一数据暂存至缓冲存储器,其中所述缓冲存储器包括第一缓冲区与第二缓冲区;将所述第二缓冲区的解码数据复制到所述第一缓冲区;在所述第一缓冲区中,基于所复制的所述解码数据对所述第一数据执行第一类解码操作,其中所复制的所述解码数据不同于对应于所述第一数据的原始解码数据;以及若所述第一类解码操作成功,输出已解码数据。An exemplary embodiment of the present invention provides a decoding method for a rewritable non-volatile memory module, the rewritable non-volatile memory module includes a plurality of physical units, the decoding method includes: The first data is temporarily stored in a buffer memory, wherein the buffer memory includes a first buffer and a second buffer; the decoded data of the second buffer is copied to the first buffer; in the first buffer region, performing a first type of decoding operation on said first data based on said copied decoded data, wherein said copied decoded data is different from the original decoded data corresponding to said first data; and if said The first type of decode operation succeeds, outputting the decoded data.

在本发明的一范例实施例中,所述的解码方法还包括:编码原始数据以产生对应于所述第一数据的所述原始解码数据;将所述原始数据存储至所述第一实体单元;以及将对应于所述第一数据的所述原始解码数据存储于所述实体单元中的至少一第二实体单元。In an exemplary embodiment of the present invention, the decoding method further includes: encoding original data to generate the original decoded data corresponding to the first data; storing the original data in the first physical unit ; and storing the original decoded data corresponding to the first data in at least one second physical unit among the physical units.

在本发明的一范例实施例中,所述的解码方法还包括:从所述第一实体单元读取原始数据并从所述实体单元中的至少一第二实体单元读取对应于所述第一数据的所述原始解码数据;将所述原始数据与对应于所述第一数据的所述原始解码数据暂存至所述缓冲存储器;以及于所述第一缓冲区中,基于对应于所述第一数据的所述原始解码数据对所述原始数据执行所述第一类解码操作。In an exemplary embodiment of the present invention, the decoding method further includes: reading the original data from the first physical unit and reading the data corresponding to the second physical unit from at least one second physical unit among the physical units the original decoded data of a data; temporarily store the original decoded data and the original decoded data corresponding to the first data in the buffer memory; and in the first buffer, based on the corresponding performing the first type of decoding operation on the original decoded data of the first data.

在本发明的一范例实施例中,所述的解码方法还包括:在基于对应于所述第一数据的所述原始解码数据对所述原始数据执行所述第一类解码操作之前,将对应于所述第一数据的所述原始解码数据复制到所述第二缓冲区。In an exemplary embodiment of the present invention, the decoding method further includes: before performing the first type of decoding operation on the original data based on the original decoded data corresponding to the first data, the corresponding The original decoded data based on the first data is copied to the second buffer.

在本发明的一范例实施例中,所述的解码方法还包括:基于所述第二缓冲区中的所述解码数据对已更正数据执行第二类解码操作,以更新所述第二缓冲区中的所述解码数据,其中所述已更正数据是经由所述第一类解码操作更正。In an exemplary embodiment of the present invention, the decoding method further includes: performing a second type of decoding operation on the corrected data based on the decoded data in the second buffer to update the second buffer The decoded data in , wherein the corrected data is corrected via the first type of decoding operation.

在本发明的一范例实施例中,所述第一类解码操作包括正常解码模式与擦除模式,且所述解码方法还包括:根据所述第一数据中具有无法更正错误的数据单元的总数,决定将所述第一类解码操作操作于所述正常解码模式或所述擦除模式。In an exemplary embodiment of the present invention, the first type of decoding operation includes a normal decoding mode and an erasure mode, and the decoding method further includes: according to the total number of data units with uncorrectable errors in the first data , decide to operate the first type of decoding operation in the normal decoding mode or the erasing mode.

在本发明的一范例实施例中,所述第一类解码操作属于多讯框解码,且所述解码方法还包括:根据所述第一类解码操作的解码结果执行单讯框解码,以验证所述第一类解码操作对至少一错误比特的更正。In an exemplary embodiment of the present invention, the first type of decoding operation belongs to multi-frame decoding, and the decoding method further includes: performing single-frame decoding according to the decoding result of the first type of decoding operation to verify The first type of decoding operation corrects at least one erroneous bit.

本发明的另一范例实施例提供一种存储器存储装置,其包括连接接口单元、可复写式非易失性存储器模块及存储器控制电路单元。所述连接接口单元用以连接至主机系统。所述可复写式非易失性存储器模块包括多个实体单元。所述存储器控制电路单元,连接至所述连接接口单元与所述可复写式非易失性存储器模块,其中所述存储器控制电路单元用以将第一数据暂存至缓冲存储器,其中所述缓冲存储器包括第一缓冲区与第二缓冲区,其中所述存储器控制电路单元还用以将所述第二缓冲区的解码数据复制到所述第一缓冲区,其中所述存储器控制电路单元还用以于所述第一缓冲区中基于所复制的所述解码数据对所述第一数据执行第一类解码操作,其中所复制的所述解码数据不同于对应于所述第一数据的原始解码数据,其中若所述第一类解码操作成功,所述存储器控制电路单元还用以输出已解码数据。Another exemplary embodiment of the present invention provides a memory storage device, which includes a connection interface unit, a rewritable non-volatile memory module, and a memory control circuit unit. The connection interface unit is used for connecting to a host system. The rewritable non-volatile memory module includes multiple physical units. The memory control circuit unit is connected to the connection interface unit and the rewritable non-volatile memory module, wherein the memory control circuit unit is used to temporarily store the first data in a buffer memory, wherein the buffer The memory includes a first buffer and a second buffer, wherein the memory control circuit unit is also used to copy the decoded data of the second buffer to the first buffer, wherein the memory control circuit unit is also used to to perform a first type of decoding operation on the first data in the first buffer based on the copied decoded data, wherein the copied decoded data is different from the original decoded corresponding to the first data data, wherein if the first type of decoding operation is successful, the memory control circuit unit is further configured to output decoded data.

在本发明的一范例实施例中,所述存储器控制电路单元还用以编码原始数据以产生对应于所述第一数据的所述原始解码数据,其中所述存储器控制电路单元还用以将所述原始数据存储至所述第一实体单元,其中所述存储器控制电路单元还用以将对应于所述第一数据的所述原始解码数据存储于所述实体单元中的至少一第二实体单元。In an exemplary embodiment of the present invention, the memory control circuit unit is further used to encode original data to generate the original decoded data corresponding to the first data, wherein the memory control circuit unit is also used to encode the original data storing the original data in the first physical unit, wherein the memory control circuit unit is also used to store the original decoded data corresponding to the first data in at least one second physical unit in the physical unit .

在本发明的一范例实施例中,所述存储器控制电路单元还用以指示从所述第一实体单元读取所述原始数据并从所述实体单元中的至少一第二实体单元读取对应于所述第一数据的所述原始解码数据,其中所述存储器控制电路单元还用以将所述原始数据与对应于所述第一数据的所述原始解码数据暂存至所述缓冲存储器,其中所述存储器控制电路单元还用以于所述第一缓冲区中基于对应于所述第一数据的所述原始解码数据对所述原始数据执行所述第一类解码操作。In an exemplary embodiment of the present invention, the memory control circuit unit is also used to instruct to read the original data from the first physical unit and read the corresponding For the original decoded data of the first data, wherein the memory control circuit unit is further configured to temporarily store the original data and the original decoded data corresponding to the first data in the buffer memory, Wherein the memory control circuit unit is further configured to perform the first type of decoding operation on the original data in the first buffer based on the original decoded data corresponding to the first data.

在本发明的一范例实施例中,在基于对应于所述第一数据的所述原始解码数据对所述原始数据执行所述第一类解码操作之前,所述存储器控制电路单元还用以将对应于所述第一数据的所述原始解码数据复制到所述第二缓冲区。In an exemplary embodiment of the present invention, before performing the first-type decoding operation on the original data based on the original decoded data corresponding to the first data, the memory control circuit unit is further configured to The original decoded data corresponding to the first data is copied to the second buffer.

在本发明的一范例实施例中,所述存储器控制电路单元还用以基于所述第二缓冲区中的所述解码数据对已更正数据执行第二类解码操作,以更新所述第二缓冲区中的所述解码数据,其中所述已更正数据是经由所述第一类解码操作更正。In an exemplary embodiment of the present invention, the memory control circuit unit is further configured to perform a second type of decoding operation on the corrected data based on the decoded data in the second buffer, so as to update the second buffer The decoded data in a region, wherein the corrected data is corrected via the first type of decoding operation.

在本发明的一范例实施例中,所述第一类解码操作包括正常解码模式与擦除模式,而所述存储器控制电路单元还用以根据所述第一数据中具有无法更正错误的数据单元的总数,决定将所述第一类解码操作操作于所述正常解码模式或所述擦除模式。In an exemplary embodiment of the present invention, the first type of decoding operation includes a normal decoding mode and an erasing mode, and the memory control circuit unit is further configured to detect data units with uncorrectable errors in the first data The total number is determined to operate the first type of decoding operation in the normal decoding mode or the erasing mode.

在本发明的一范例实施例中,所述第一类解码操作属于多讯框解码,而所述存储器控制电路单元还用以根据所述第一类解码操作的解码结果执行单讯框解码,以验证所述第一类解码操作对至少一错误比特的更正。In an exemplary embodiment of the present invention, the first type of decoding operation belongs to multi-frame decoding, and the memory control circuit unit is further configured to perform single-frame decoding according to a decoding result of the first type of decoding operation, to verify the correction of at least one erroneous bit by the decoding operation of the first type.

本发明的另一范例实施例提供一种存储器控制电路单元,其用于控制可复写式非易失性存储器模块,其中所述可复写式非易失性存储器模块包括多个实体单元,其中所述存储器控制电路单元包括主机接口、存储器接口、缓冲存储器、错误检查与校正电路及存储器管理电路。所述主机接口用以连接至主机系统。所述存储器接口用以连接至所述可复写式非易失性存储器模块。所述存储器管理电路连接至所述主机接口、所述存储器接口、所述缓冲存储器及所述错误检查与校正电路,其中所述存储器管理电路用以将第一数据暂存至所述缓冲存储器,其中所述缓冲存储器包括第一缓冲区与第二缓冲区,其中所述存储器管理电路还用以将所述第二缓冲区的解码数据复制到所述第一缓冲区,其中所述错误检查与校正电路用以于所述第一缓冲区中基于所复制的所述解码数据对所述第一数据执行第一类解码操作,其中所复制的所述解码数据不同于对应于所述第一数据的原始解码数据,其中若所述第一类解码操作成功,所述存储器管理电路还用以输出已解码数据。Another exemplary embodiment of the present invention provides a memory control circuit unit for controlling a rewritable nonvolatile memory module, wherein the rewritable nonvolatile memory module includes a plurality of physical units, wherein the The memory control circuit unit includes a host interface, a memory interface, a buffer memory, an error checking and correction circuit and a memory management circuit. The host interface is used for connecting to a host system. The memory interface is used for connecting to the rewritable non-volatile memory module. The memory management circuit is connected to the host interface, the memory interface, the buffer memory and the error checking and correction circuit, wherein the memory management circuit is configured to temporarily store the first data in the buffer memory, Wherein the buffer memory includes a first buffer and a second buffer, wherein the memory management circuit is also used to copy the decoded data of the second buffer to the first buffer, wherein the error check and a correction circuit for performing a first type of decoding operation on the first data in the first buffer based on the copied decoded data, wherein the copied decoded data is different from The original decoded data, wherein if the first type of decoding operation is successful, the memory management circuit is also used to output the decoded data.

在本发明的一范例实施例中,所述错误检查与校正电路还用以编码原始数据以产生对应于所述第一数据的所述原始解码数据,其中所述存储器管理电路还用以将所述原始数据存储至所述第一实体单元,其中所述存储器管理电路还用以将对应于所述第一数据的所述原始解码数据存储于所述实体单元中的至少一第二实体单元。In an exemplary embodiment of the present invention, the error checking and correction circuit is further configured to encode original data to generate the original decoded data corresponding to the first data, wherein the memory management circuit is further configured to encode the original data The original data is stored in the first physical unit, wherein the memory management circuit is further configured to store the original decoded data corresponding to the first data in at least one second physical unit in the physical unit.

在本发明的一范例实施例中,所述存储器管理电路还用以指示从所述第一实体单元读取所述原始数据并从所述实体单元中的至少一第二实体单元读取对应于所述第一数据的所述原始解码数据,其中所述存储器管理电路还用以将所述原始数据与对应于所述第一数据的所述原始解码数据暂存至所述缓冲存储器,其中所述错误检查与校正电路还用以于所述第一缓冲区中基于对应于所述第一数据的所述原始解码数据对所述原始数据执行所述第一类解码操作。In an exemplary embodiment of the present invention, the memory management circuit is further used to instruct to read the original data from the first physical unit and to read the corresponding The original decoded data of the first data, wherein the memory management circuit is further configured to temporarily store the original data and the original decoded data corresponding to the first data in the buffer memory, wherein the The error checking and correction circuit is further configured to perform the first type of decoding operation on the original data in the first buffer based on the original decoded data corresponding to the first data.

在本发明的一范例实施例中,在基于对应于所述第一数据的所述原始解码数据对所述原始数据执行所述第一类解码操作之前,所述存储器管理电路还用以将对应于所述第一数据的所述原始解码数据复制到所述第二缓冲区。In an exemplary embodiment of the present invention, before performing the first type of decoding operation on the original data based on the original decoded data corresponding to the first data, the memory management circuit is further configured to The original decoded data based on the first data is copied to the second buffer.

在本发明的一范例实施例中,所述存储器控制电路单元还用以基于所述第二缓冲区中的所述解码数据对已更正数据执行第二类解码操作,以更新所述第二缓冲区中的所述解码数据,其中所述已更正数据是经由所述第一类解码操作更正。In an exemplary embodiment of the present invention, the memory control circuit unit is further configured to perform a second type of decoding operation on the corrected data based on the decoded data in the second buffer, so as to update the second buffer The decoded data in a region, wherein the corrected data is corrected via the first type of decoding operation.

在本发明的一范例实施例中,所述已更正数据不包括具有无法更正错误的数据单元。In an exemplary embodiment of the invention, the corrected data does not include data units with uncorrectable errors.

在本发明的一范例实施例中,复制到所述第一缓冲区的所述解码数据是基于对已更正数据以及对应于所述第一数据的所述原始解码数据所执行的第二类解码操作而产生。In an exemplary embodiment of the invention, said decoded data copied to said first buffer is based on a second type of decoding performed on corrected data and said original decoded data corresponding to said first data generated by the operation.

在本发明的一范例实施例中,所述第一类解码操作包括正常解码模式与擦除模式,而所述存储器管理电路还用以根据所述第一数据中具有无法更正错误的数据单元的总数,决定将所述第一类解码操作操作于所述正常解码模式或所述擦除模式。In an exemplary embodiment of the present invention, the first type of decoding operation includes a normal decoding mode and an erasing mode, and the memory management circuit is further configured to perform a data unit with an uncorrectable error in the first data according to The total number determines to operate the first type of decoding operation in the normal decoding mode or the erasing mode.

在本发明的一范例实施例中,所述第一数据是在所述第一实体单元中受独立硬盘冗余阵列错误更正码保护。In an exemplary embodiment of the present invention, the first data is protected by a Redundant Array of Independent Disks error correction code in the first physical unit.

在本发明的一范例实施例中,所述第一类解码操作属于多讯框解码,而所述存储器控制电路单元还用以根据所述第一类解码操作的解码结果执行单讯框解码,以验证所述第一类解码操作对至少一错误比特的更正。In an exemplary embodiment of the present invention, the first type of decoding operation belongs to multi-frame decoding, and the memory control circuit unit is further configured to perform single-frame decoding according to a decoding result of the first type of decoding operation, to verify the correction of at least one erroneous bit by the decoding operation of the first type.

基于上述,本发明可将解码过程中动态产生的解码数据保存在缓冲存储器中。当后续要解码第一数据时,此解码数据可即时地被使用,而不需要重复从可复写式非易失性存储器模块读取相关数据并重复计算而获得。藉此,可在缓冲存储器的容量有限的状况下提高解码操作的效率。Based on the above, the present invention can save the decoded data dynamically generated during the decoding process in the buffer memory. When the first data is to be decoded subsequently, the decoded data can be used immediately without repeatedly reading relevant data from the rewritable non-volatile memory module and obtaining it repeatedly. Thereby, the efficiency of the decoding operation can be improved under the condition that the capacity of the buffer memory is limited.

为让本发明的上述特征和优点能更明显易懂,下文特举实施例,并配合附图作详细说明如下。In order to make the above-mentioned features and advantages of the present invention more comprehensible, the following specific embodiments are described in detail with reference to the accompanying drawings.

附图说明Description of drawings

图1是根据本发明的一范例实施例所示出的主机系统、存储器存储装置及输入/输出(I/O)装置的示意图。FIG. 1 is a schematic diagram of a host system, a memory storage device and an input/output (I/O) device according to an exemplary embodiment of the present invention.

图2是根据本发明的另一范例实施例所示出的主机系统、存储器存储装置及I/O装置的示意图。FIG. 2 is a schematic diagram of a host system, a memory storage device and an I/O device according to another exemplary embodiment of the present invention.

图3是根据本发明的另一范例实施例所示出的主机系统与存储器存储装置的示意图。FIG. 3 is a schematic diagram of a host system and a memory storage device according to another exemplary embodiment of the present invention.

图4是根据本发明的一范例实施例所示出的存储器存储装置的概要方块图。FIG. 4 is a schematic block diagram of a memory storage device according to an exemplary embodiment of the present invention.

图5是根据本发明的一范例实施例所示出的存储器控制电路单元的概要方块图。FIG. 5 is a schematic block diagram of a memory control circuit unit according to an exemplary embodiment of the present invention.

图6是根据本发明的一范例实施例所示出的管理可复写式非易失性存储器模块的示意图。FIG. 6 is a schematic diagram of managing a rewritable non-volatile memory module according to an exemplary embodiment of the present invention.

图7是根据本发明的一范例实施例所示出的多讯框编码的示意图。FIG. 7 is a schematic diagram of multi-frame coding according to an exemplary embodiment of the present invention.

图8至图11是根据本发明的一范例实施例所示出的解码操作的示意图。8 to 11 are schematic diagrams showing decoding operations according to an exemplary embodiment of the present invention.

图12与图13是根据本发明的一范例实施例所示出的解码方法的流程图。FIG. 12 and FIG. 13 are flowcharts of a decoding method according to an exemplary embodiment of the present invention.

附图标号说明Explanation of reference numbers

10、30:存储器存储装置10, 30: memory storage device

11、31:主机系统11, 31: host system

110:系统总线110: System bus

111:处理器111: Processor

112:随机存取存储器112: random access memory

113:只读存储器113: ROM

114:数据传输接口114: data transmission interface

12:输入/输出(I/O)装置12: Input/Output (I/O) device

20:主机板20: Motherboard

201:U盘201: U disk

202:存储卡202: memory card

203:固态硬盘203: SSD

204:无线存储器存储装置204: Wireless memory storage device

205:全球定位系统模块205: Global Positioning System Module

206:网络接口卡206: Network interface card

207:无线传输装置207: Wireless transmission device

208:键盘208: Keyboard

209:屏幕209: screen

210:喇叭210: Horn

32:SD卡32: SD card

33:CF卡33: CF card

34:嵌入式存储装置34: Embedded storage device

341:嵌入式多媒体卡341: Embedded multimedia card

342:嵌入式多芯片封装存储装置342: Embedded multi-chip package storage device

402:连接接口单元402: Connect the interface unit

404:存储器控制电路单元404: memory control circuit unit

406:可复写式非易失性存储器模块406: Rewritable non-volatile memory module

502:存储器管理电路502: memory management circuit

504:主机接口504: host interface

506:存储器接口506: memory interface

508:错误检查与校正电路508: Error checking and correction circuit

510:缓冲存储器510: buffer memory

512:电源管理电路512: Power management circuit

601:存储区601: storage area

602:替换区602: Replacement area

610(0)~610(B)、710(0)~710(E):实体单元610(0)~610(B), 710(0)~710(E): entity unit

612(0)~612(C):逻辑单元612(0)~612(C): logic unit

701(1)~701(r):位置701(1)~701(r): Position

830、831、832、833、1001、1002:数据830, 831, 832, 833, 1001, 1002: data

720、840、841、941、942:解码数据720, 840, 841, 941, 942: decoded data

810、820:缓冲区810, 820: buffer

S1201:步骤(从可复写式非易失性存储器模块读取原始数据与原始解码数据)S1201: step (reading original data and original decoded data from the rewritable non-volatile memory module)

S1202:步骤(将原始数据与原始解码数据暂存至缓冲存储器)S1202: Step (temporarily storing the original data and the original decoded data in the buffer memory)

S1203:步骤(将原始解码数据复制到缓冲存储器的第二缓冲区)S1203: Step (copying the original decoded data to the second buffer of the buffer memory)

S1204:步骤(于缓冲存储器的第一缓冲区中,基于原始解码数据对原始数据执行第一类解码操作)S1204: Step (in the first buffer memory of the buffer memory, perform a first type of decoding operation on the original data based on the original decoded data)

S1205:步骤(判断第一类解码操作是否成功)S1205: step (judging whether the first type of decoding operation is successful)

S1206:步骤(输出解码已解码数据)S1206: Step (output decoded decoded data)

S1301:步骤(从可复写式非易失性存储器模块读取第一数据并将第一数据暂存至缓冲存储器)S1301: Step (reading the first data from the rewritable non-volatile memory module and temporarily storing the first data in the buffer memory)

S1302:步骤(将第二缓冲区中的解码数据复制到第一缓冲区中)S1302: step (copy the decoded data in the second buffer to the first buffer)

S1303:步骤(于第一缓冲区中,基于所复制的解码数据对第一数据执行第一类解码操作)S1303: Step (in the first buffer, perform a first type of decoding operation on the first data based on the copied decoded data)

S1304:步骤(判断第一类解码操作是否成功)S1304: step (judging whether the first type of decoding operation is successful)

S1305:步骤(输出已解码数据)S1305: Step (output decoded data)

S1306:步骤(判断是否有数据在第一类解码操作中被更正)S1306: step (judging whether there is data corrected in the first type of decoding operation)

S1307:步骤(基于第二缓冲区中的解码数据对所更正的数据执行第二类解码操作,以更新解码数据)S1307: Step (perform a second type of decoding operation on the corrected data based on the decoded data in the second buffer to update the decoded data)

具体实施方式Detailed ways

一般而言,存储器存储装置(也称,存储器存储系统)包括可复写式非易失性存储器模块(rewritable non-volatile memory module)与控制器(也称,控制电路)。通常存储器存储装置是与主机系统一起使用,以使主机系统可将数据写入至存储器存储装置或从存储器存储装置中读取数据。Generally speaking, a memory storage device (also called a memory storage system) includes a rewritable non-volatile memory module (rewritable non-volatile memory module) and a controller (also called a control circuit). Typically memory storage devices are used with a host system such that the host system can write data to or read data from the memory storage device.

图1是根据本发明的一范例实施例所示出的主机系统、存储器存储装置及输入/输出(I/O)装置的示意图。图2是根据本发明的另一范例实施例所示出的主机系统、存储器存储装置及I/O装置的示意图。FIG. 1 is a schematic diagram of a host system, a memory storage device and an input/output (I/O) device according to an exemplary embodiment of the present invention. FIG. 2 is a schematic diagram of a host system, a memory storage device and an I/O device according to another exemplary embodiment of the present invention.

请参照图1与图2,主机系统11一般包括处理器111、随机存取存储器(randomaccess memory,RAM)112、只读存储器(read only memory,ROM)113及数据传输接口114。处理器111、随机存取存储器112、只读存储器113及数据传输接口114皆连接至系统总线(system bus)110。Referring to FIG. 1 and FIG. 2 , the host system 11 generally includes a processor 111 , a random access memory (random access memory, RAM) 112 , a read only memory (ROM) 113 and a data transmission interface 114 . The processor 111 , random access memory 112 , ROM 113 and data transmission interface 114 are all connected to a system bus 110 .

在本范例实施例中,主机系统11是通过数据传输接口114与存储器存储装置10连接。例如,主机系统11可经由数据传输接口114将数据存储至存储器存储装置10或从存储器存储装置10中读取数据。此外,主机系统11是通过系统总线110与I/O装置12连接。例如,主机系统11可经由系统总线110将输出信号传送至I/O装置12或从I/O装置12接收输入信号。In this exemplary embodiment, the host system 11 is connected to the memory storage device 10 through the data transmission interface 114 . For example, the host system 11 can store data into the memory storage device 10 or read data from the memory storage device 10 via the data transmission interface 114 . In addition, the host system 11 is connected to the I/O device 12 through the system bus 110 . For example, host system 11 may transmit output signals to or receive input signals from I/O devices 12 via system bus 110 .

在本范例实施例中,处理器111、随机存取存储器112、只读存储器113及数据传输接口114可设置在主机系统11的主机板20上。数据传输接口114的数目可以是一或多个。通过数据传输接口114,主机板20可以经由有线或无线方式连接至存储器存储装置10。存储器存储装置10可例如是U盘201、存储卡202、固态硬盘(Solid State Drive,SSD)203或无线存储器存储装置204。无线存储器存储装置204可例如是近距离无线通讯(Near FieldCommunication,NFC)存储器存储装置、无线传真(WiFi)存储器存储装置、蓝牙(Bluetooth)存储器存储装置或低功耗蓝牙存储器存储装置(例如,iBeacon)等以各式无线通讯技术为基础的存储器存储装置。此外,主机板20也可以通过系统总线110连接至全球定位系统(Global Positioning System,GPS)模块205、网络接口卡206、无线传输装置207、键盘208、屏幕209、喇叭210等各式I/O装置。例如,在一范例实施例中,主机板20可通过无线传输装置207存取无线存储器存储装置204。In this exemplary embodiment, the processor 111 , the random access memory 112 , the read-only memory 113 and the data transmission interface 114 can be disposed on the motherboard 20 of the host system 11 . The number of data transmission interfaces 114 may be one or more. Through the data transmission interface 114 , the motherboard 20 can be connected to the memory storage device 10 via wire or wirelessly. The memory storage device 10 may be, for example, a USB flash drive 201 , a memory card 202 , a solid state drive (Solid State Drive, SSD) 203 or a wireless memory storage device 204 . The wireless memory storage device 204 may be, for example, a near field communication (Near Field Communication, NFC) memory storage device, a wireless fax (WiFi) memory storage device, a Bluetooth (Bluetooth) memory storage device or a Bluetooth low energy storage device (for example, iBeacon ) and other memory storage devices based on various wireless communication technologies. In addition, the motherboard 20 can also be connected to various I/Os such as a Global Positioning System (GPS) module 205, a network interface card 206, a wireless transmission device 207, a keyboard 208, a screen 209, and a speaker 210 through the system bus 110. device. For example, in an exemplary embodiment, the motherboard 20 can access the wireless memory storage device 204 through the wireless transmission device 207 .

在一范例实施例中,所提及的主机系统为可实质地与存储器存储装置配合以存储数据的任意系统。虽然在上述范例实施例中,主机系统是以电脑系统来作说明,然而,图3是根据本发明的另一范例实施例所示出的主机系统与存储器存储装置的示意图。请参照图3,在另一范例实施例中,主机系统31也可以是数码相机、摄影机、通讯装置、音频播放器、视频播放器或平板电脑等系统,而存储器存储装置30可为其所使用的安全数字(SecureDigital,SD)卡32、小型快闪(Compact Flash,CF)卡33或嵌入式存储装置34等各式非易失性存储器存储装置。嵌入式存储装置34包括嵌入式多媒体卡(embedded Multi MediaCard,eMMC)341和/或嵌入式多芯片封装(embedded Multi Chip Package,eMCP)存储装置342等各类型将存储器模块直接连接于主机系统的基板上的嵌入式存储装置。In an example embodiment, reference to a host system is substantially any system that can cooperate with a memory storage device to store data. Although in the above exemplary embodiments, the host system is described as a computer system, however, FIG. 3 is a schematic diagram of a host system and a memory storage device according to another exemplary embodiment of the present invention. Please refer to FIG. 3 , in another exemplary embodiment, the host system 31 can also be a system such as a digital camera, a video camera, a communication device, an audio player, a video player, or a tablet computer, and the memory storage device 30 can be used for it. Various non-volatile memory storage devices such as a secure digital (Secure Digital, SD) card 32 , a compact flash (Compact Flash, CF) card 33 or an embedded storage device 34 . The embedded storage device 34 includes various types such as an embedded multimedia card (embedded Multi MediaCard, eMMC) 341 and/or an embedded multi-chip package (embedded Multi Chip Package, eMCP) storage device 342, etc., which directly connect the memory module to the substrate of the host system on the embedded storage device.

图4是根据本发明的一范例实施例所示出的存储器存储装置的概要方块图。FIG. 4 is a schematic block diagram of a memory storage device according to an exemplary embodiment of the present invention.

请参照图4,存储器存储装置10包括连接接口单元402、存储器控制电路单元404与可复写式非易失性存储器模块406。Referring to FIG. 4 , the memory storage device 10 includes a connection interface unit 402 , a memory control circuit unit 404 and a rewritable non-volatile memory module 406 .

连接接口单元402用以将存储器存储装置10连接至主机系统11。在本范例实施例中,连接接口单元402是相容于串行高级技术附件(Serial Advanced TechnologyAttachment,SATA)标准。然而,必须了解的是,本发明不限于此,连接接口单元402也可以是符合并行高级技术附件(Parallel Advanced Technology Attachment,PATA)标准、电气和电子工程师协会(Institute of Electrical and Electronic Engineers,IEEE)1394标准、高速周边零件连接接口(Peripheral Component Interconnect Express,PCIExpress)标准、通用序列总线(Universal Serial Bus,USB)标准、SD接口标准、超高速一代(Ultra High Speed-I,UHS-I)接口标准、超高速二代(Ultra High Speed-II,UHS-II)接口标准、存储棒(Memory Stick,MS)接口标准、MCP接口标准、MMC接口标准、eMMC接口标准、通用快闪存储器(Universal Flash Storage,UFS)接口标准、eMCP接口标准、CF接口标准、整合式驱动电子接口(Integrated Device Electronics,IDE)标准或其他适合的标准。连接接口单元402可与存储器控制电路单元404封装在一个芯片中,或者连接接口单元402是布设于一包含存储器控制电路单元404的芯片外。The connection interface unit 402 is used to connect the memory storage device 10 to the host system 11 . In this exemplary embodiment, the connection interface unit 402 is compatible with the Serial Advanced Technology Attachment (SATA) standard. However, it must be understood that the present invention is not limited thereto, and the connection interface unit 402 may also be a device conforming to the Parallel Advanced Technology Attachment (PATA) standard, the Institute of Electrical and Electronic Engineers (Institute of Electrical and Electronic Engineers, IEEE) 1394 standard, Peripheral Component Interconnect Express (PCIExpress) standard, Universal Serial Bus (USB) standard, SD interface standard, Ultra High Speed-I (UHS-I) interface standard , Ultra High Speed-II (UHS-II) interface standard, Memory Stick (Memory Stick, MS) interface standard, MCP interface standard, MMC interface standard, eMMC interface standard, Universal Flash Storage (Universal Flash Storage , UFS) interface standard, eMCP interface standard, CF interface standard, Integrated Device Electronics (IDE) standard or other suitable standards. The connection interface unit 402 can be packaged with the memory control circuit unit 404 in one chip, or the connection interface unit 402 can be arranged outside a chip including the memory control circuit unit 404 .

存储器控制电路单元404用以执行以硬体型式或固体型式实作的多个逻辑门或控制指令并且根据主机系统11的指令在可复写式非易失性存储器模块406中进行数据的写入、读取与抹除等运作。The memory control circuit unit 404 is used to execute a plurality of logic gates or control instructions implemented in hardware or solid state and write data in the rewritable non-volatile memory module 406 according to the instructions of the host system 11, Operations such as reading and erasing.

可复写式非易失性存储器模块406是连接至存储器控制电路单元404并且用以存储主机系统11所写入的数据。可复写式非易失性存储器模块406可以是单阶存储单元(Single Level Cell,SLC)NAND型快闪存储器模块(即,一个存储单元中可存储1个比特的快闪存储器模块)、多阶存储单元(Multi Level Cell,MLC)NAND型快闪存储器模块(即,一个存储单元中可存储2个比特的快闪存储器模块)、复数阶存储单元(Triple Level Cell,TLC)NAND型快闪存储器模块(即,一个存储单元中可存储3个比特的快闪存储器模块)、其他快闪存储器模块或其他具有相同特性的存储器模块。The rewritable non-volatile memory module 406 is connected to the memory control circuit unit 404 and used for storing data written by the host system 11 . The rewritable non-volatile memory module 406 can be a single-level storage unit (Single Level Cell, SLC) NAND flash memory module (that is, a flash memory module that can store 1 bit in a storage unit), a multi-level Storage unit (Multi Level Cell, MLC) NAND flash memory module (that is, a flash memory module that can store 2 bits in a storage unit), complex level storage unit (Triple Level Cell, TLC) NAND flash memory module (ie, a flash memory module that can store 3 bits in one storage unit), other flash memory modules, or other memory modules with the same characteristics.

可复写式非易失性存储器模块406中的每一个存储单元是以电压(以下也称为临界电压)的改变来存储一或多个比特。具体来说,每一个存储单元的控制栅极(controlgate)与通道之间有一个电荷捕捉层。通过施予一写入电压至控制栅极,可以改变电荷补捉层的电子量,进而改变存储单元的临界电压。此改变存储单元的临界电压的操作也称为“把数据写入至存储单元”或“程序化(programming)存储单元”。随着临界电压的改变,可复写式非易失性存储器模块406中的每一个存储单元具有多个存储状态。通过施予读取电压可以判断一个存储单元是属于哪一个存储状态,藉此取得此存储单元所存储的一或多个比特。Each memory cell in the rewritable non-volatile memory module 406 stores one or more bits by changing a voltage (also referred to as threshold voltage hereinafter). Specifically, there is a charge trapping layer between the control gate and the channel of each memory cell. By applying a writing voltage to the control gate, the amount of electrons in the charge trapping layer can be changed, thereby changing the threshold voltage of the memory cell. The operation of changing the threshold voltage of the memory cell is also called "writing data into the memory cell" or "programming the memory cell". As the threshold voltage changes, each memory cell in the rewritable nonvolatile memory module 406 has multiple storage states. Which storage state a memory cell belongs to can be determined by applying a read voltage, thereby obtaining one or more bits stored in the memory cell.

在本范例实施例中,可复写式非易失性存储器模块406的存储单元会构成多个实体程序化单元,并且此些实体程序化单元会构成多个实体抹除单元。具体来说,同一条字元线上的存储单元会组成一或多个实体程序化单元。若每一个存储单元可存储2个以上的比特,则同一条字元线上的实体程序化单元至少可被分类为下实体程序化单元与上实体程序化单元。例如,一存储单元的最低有效比特(Least Significant Bit,LSB)是属于下实体程序化单元,并且一存储单元的最高有效比特(Most Significant Bit,MSB)是属于上实体程序化单元。一般来说,在MLC NAND型快闪存储器中,下实体程序化单元的写入速度会大于上实体程序化单元的写入速度,和/或下实体程序化单元的可靠度是高于上实体程序化单元的可靠度。In this exemplary embodiment, the storage units of the rewritable non-volatile memory module 406 constitute a plurality of physical programming units, and these physical programming units constitute a plurality of physical erasing units. Specifically, the storage units on the same word line form one or more physical programming units. If each storage unit can store more than 2 bits, the physical programming units on the same word line can be classified into at least lower physical programming units and upper physical programming units. For example, the Least Significant Bit (LSB) of a storage unit belongs to the lower physical programming unit, and the Most Significant Bit (MSB) of a storage unit belongs to the upper physical programming unit. Generally speaking, in MLC NAND flash memory, the writing speed of the lower physical programming unit will be greater than the writing speed of the upper physical programming unit, and/or the reliability of the lower physical programming unit is higher than that of the upper physical programming unit. The reliability of the programmatic unit.

在本范例实施例中,实体程序化单元为程序化的最小单元。即,实体程序化单元为写入数据的最小单元。例如,实体程序化单元为实体页面(page)或是实体扇(sector)。若实体程序化单元为实体页面,则此些实体程序化单元通常包括数据比特区与冗余(redundancy)比特区。数据比特区包含多个实体扇,用以存储使用者数据,而冗余比特区用以存储系统数据(例如,错误更正码等管理数据)。在本范例实施例中,数据比特区包含32个实体扇,且一个实体扇的大小为512比特组(byte,B)。然而,在其他范例实施例中,数据比特区中也可包含8个、16个或数目更多或更少的实体扇,并且每一个实体扇的大小也可以是更大或更小。另一方面,实体抹除单元为抹除的最小单位。也即,每一实体抹除单元含有最小数目之一并被抹除的存储单元。例如,实体抹除单元为实体区块(block)。In this exemplary embodiment, the entity programming unit is the smallest unit of programming. That is, the entity programming unit is the smallest unit for writing data. For example, the entity programming unit is an entity page (page) or an entity sector (sector). If the physical programming units are physical pages, these physical programming units usually include data bit areas and redundancy (redundancy) bit areas. The data bit area includes a plurality of physical sectors for storing user data, and the redundant bit area is used for storing system data (eg, management data such as error correction codes). In this exemplary embodiment, the data bit area includes 32 physical sectors, and the size of one physical sector is 512 bits (byte, B). However, in other exemplary embodiments, the data bit area may also include 8, 16 or more or less physical sectors, and the size of each physical sector may also be larger or smaller. On the other hand, the entity erasing unit is the smallest unit of erasing. That is, each physical erase unit contains a minimum number of memory cells that are erased. For example, the physical erasing unit is a physical block.

图5是根据本发明的一范例实施例所示出的存储器控制电路单元的概要方块图。FIG. 5 is a schematic block diagram of a memory control circuit unit according to an exemplary embodiment of the present invention.

请参照图5,存储器控制电路单元404包括存储器管理电路502、主机接口504、存储器接口506、错误检查与校正电路508及缓冲存储器510。Referring to FIG. 5 , the memory control circuit unit 404 includes a memory management circuit 502 , a host interface 504 , a memory interface 506 , an error checking and correction circuit 508 and a buffer memory 510 .

存储器管理电路502用以控制存储器控制电路单元404的整体运作。具体来说,存储器管理电路502具有多个控制指令,并且在存储器存储装置10运作时,此些控制指令会被执行以进行数据的写入、读取与抹除等运作。以下说明存储器管理电路502的操作时,等同于说明存储器控制电路单元404的操作。The memory management circuit 502 is used to control the overall operation of the memory control circuit unit 404 . Specifically, the memory management circuit 502 has a plurality of control instructions, and when the memory storage device 10 is operating, these control instructions are executed to perform operations such as writing, reading, and erasing data. When describing the operation of the memory management circuit 502 below, it is equivalent to describing the operation of the memory control circuit unit 404 .

在本范例实施例中,存储器管理电路502的控制指令是以固体型式来实作。例如,存储器管理电路502具有微处理器单元(未示出)与只读存储器(未示出),并且此些控制指令是被烧录至此只读存储器中。当存储器存储装置10运作时,此些控制指令会由微处理器单元来执行以进行数据的写入、读取与抹除等运作。In this exemplary embodiment, the control commands of the memory management circuit 502 are implemented in solid form. For example, the memory management circuit 502 has a microprocessor unit (not shown) and a read-only memory (not shown), and these control instructions are burned into the read-only memory. When the memory storage device 10 is in operation, these control instructions are executed by the microprocessor unit to perform operations such as writing, reading, and erasing data.

在另一范例实施例中,存储器管理电路502的控制指令也可以程序码型式存储于可复写式非易失性存储器模块406的特定区域(例如,存储器模块中专用于存放系统数据的系统区)中。此外,存储器管理电路502具有微处理器单元(未示出)、只读存储器(未示出)及随机存取存储器(未示出)。特别是,此只读存储器具有开机码(boot code),并且当存储器控制电路单元404被致能时,微处理器单元会先执行此开机码来将存储于可复写式非易失性存储器模块406中的控制指令载入至存储器管理电路502的随机存取存储器中。之后,微处理器单元会运转此些控制指令以进行数据的写入、读取与抹除等运作。In another exemplary embodiment, the control instructions of the memory management circuit 502 may also be stored in a specific area of the rewritable non-volatile memory module 406 (for example, a system area dedicated to storing system data in the memory module) in the form of program codes. middle. In addition, the memory management circuit 502 has a microprocessor unit (not shown), a read only memory (not shown), and a random access memory (not shown). In particular, the ROM has a boot code (boot code), and when the memory control circuit unit 404 is enabled, the microprocessor unit will first execute the boot code to store in the rewritable non-volatile memory module The control instructions in 406 are loaded into the random access memory of the memory management circuit 502 . Afterwards, the microprocessor unit will execute these control instructions to perform operations such as writing, reading and erasing data.

此外,在另一范例实施例中,存储器管理电路502的控制指令也可以一硬体型式来实作。例如,存储器管理电路502包括微控制器、存储单元管理电路、存储器写入电路、存储器读取电路、存储器抹除电路与数据处理电路。存储单元管理电路、存储器写入电路、存储器读取电路、存储器抹除电路与数据处理电路是连接至微控制器。存储单元管理电路用以管理可复写式非易失性存储器模块406的存储单元或其群组。存储器写入电路用以对可复写式非易失性存储器模块406下达写入指令序列以将数据写入至可复写式非易失性存储器模块406中。存储器读取电路用以对可复写式非易失性存储器模块406下达读取指令序列以从可复写式非易失性存储器模块406中读取数据。存储器抹除电路用以对可复写式非易失性存储器模块406下达抹除指令序列以将数据从可复写式非易失性存储器模块406中抹除。数据处理电路用以处理欲写入至可复写式非易失性存储器模块406的数据以及从可复写式非易失性存储器模块406中读取的数据。写入指令序列、读取指令序列及抹除指令序列可各别包括一或多个程序码或指令码并且用以指示可复写式非易失性存储器模块406执行相对应的写入、读取及抹除等操作。在一范例实施例中,存储器管理电路502还可以下达其他类型的指令序列给可复写式非易失性存储器模块406以指示执行相对应的操作。In addition, in another exemplary embodiment, the control instructions of the memory management circuit 502 can also be implemented in a hardware form. For example, the memory management circuit 502 includes a microcontroller, a memory unit management circuit, a memory writing circuit, a memory reading circuit, a memory erasing circuit and a data processing circuit. The storage unit management circuit, the memory writing circuit, the memory reading circuit, the memory erasing circuit and the data processing circuit are connected to the microcontroller. The storage unit management circuit is used for managing the storage units or groups thereof of the rewritable non-volatile memory module 406 . The memory writing circuit is used to issue a write command sequence to the rewritable non-volatile memory module 406 to write data into the rewritable non-volatile memory module 406 . The memory read circuit is used to issue a read command sequence to the rewritable non-volatile memory module 406 to read data from the rewritable non-volatile memory module 406 . The memory erasing circuit is used for issuing an erase command sequence to the rewritable non-volatile memory module 406 to erase data from the rewritable non-volatile memory module 406 . The data processing circuit is used for processing data to be written into the rewritable non-volatile memory module 406 and data read from the rewritable non-volatile memory module 406 . The write command sequence, the read command sequence and the erase command sequence may respectively include one or more program codes or command codes and are used to instruct the rewritable non-volatile memory module 406 to perform corresponding write, read and erase operations. In an exemplary embodiment, the memory management circuit 502 can also issue other types of instruction sequences to the rewritable non-volatile memory module 406 to instruct to perform corresponding operations.

主机接口504是连接至存储器管理电路502并且用以接收与识别主机系统11所传送的指令与数据。也就是说,主机系统11所传送的指令与数据会通过主机接口504来传送至存储器管理电路502。在本范例实施例中,主机接口504是相容于SATA标准。然而,必须了解的是本发明不限于此,主机接口504也可以是相容于PATA标准、IEEE 1394标准、PCIExpress标准、USB标准、SD标准、UHS-I标准、UHS-II标准、MS标准、MMC标准、eMMC标准、UFS标准、CF标准、IDE标准或其他适合的数据传输标准。The host interface 504 is connected to the memory management circuit 502 and is used for receiving and identifying commands and data transmitted by the host system 11 . That is to say, the commands and data sent by the host system 11 are sent to the memory management circuit 502 through the host interface 504 . In this exemplary embodiment, the host interface 504 is compatible with the SATA standard. However, it must be understood that the present invention is not limited thereto, and the host interface 504 may also be compatible with PATA standard, IEEE 1394 standard, PCIExpress standard, USB standard, SD standard, UHS-I standard, UHS-II standard, MS standard, MMC standard, eMMC standard, UFS standard, CF standard, IDE standard or other suitable data transmission standards.

存储器接口506是连接至存储器管理电路502并且用以存取可复写式非易失性存储器模块406。也就是说,欲写入至可复写式非易失性存储器模块406的数据会经由存储器接口506转换为可复写式非易失性存储器模块406所能接受的格式。具体来说,若存储器管理电路502要存取可复写式非易失性存储器模块406,存储器接口506会传送对应的指令序列。例如,这些指令序列可包括指示写入数据的写入指令序列、指示读取数据的读取指令序列、指示抹除数据的抹除指令序列、以及用以指示各种存储器操作(例如,改变读取电压电平或执行垃圾回收操作等等)的相对应的指令序列。这些指令序列例如是由存储器管理电路502产生并且通过存储器接口506传送至可复写式非易失性存储器模块406。这些指令序列可包括一或多个信号,或是在总线上的数据。这些信号或数据可包括指令码或程序码。例如,在读取指令序列中,会包括读取的识别码、存储器地址等信息。The memory interface 506 is connected to the memory management circuit 502 and used for accessing the rewritable non-volatile memory module 406 . That is to say, the data to be written into the rewritable nonvolatile memory module 406 will be converted into a format acceptable to the rewritable nonvolatile memory module 406 via the memory interface 506 . Specifically, if the memory management circuit 502 wants to access the rewritable non-volatile memory module 406, the memory interface 506 will transmit the corresponding instruction sequence. For example, these command sequences may include a write command sequence for writing data, a read command sequence for reading data, an erase command sequence for erasing data, and instructions for various memory operations such as changing the read the corresponding sequence of instructions to fetch voltage levels or perform garbage collection operations, etc.). These instruction sequences are, for example, generated by the memory management circuit 502 and transmitted to the rewritable non-volatile memory module 406 through the memory interface 506 . These command sequences may include one or more signals, or data on a bus. These signals or data may include instruction codes or program codes. For example, in the read command sequence, information such as read identification code and memory address will be included.

错误检查与校正电路508是连接至存储器管理电路502并且用以执行错误检查与校正操作以确保数据的正确性。具体来说,当存储器管理电路502从主机系统11中接收到写入指令时,错误检查与校正电路508会为对应此写入指令的数据产生对应的错误更正码(error correcting code,ECC)和/或错误检查码(error detecting code,EDC),并且存储器管理电路502会将对应此写入指令的数据与对应的错误更正码和/或错误检查码写入至可复写式非易失性存储器模块406中。之后,当存储器管理电路502从可复写式非易失性存储器模块406中读取数据时会同时读取此数据对应的错误更正码和/或错误检查码,并且错误检查与校正电路508会依据此错误更正码和/或错误检查码对所读取的数据执行错误检查与校正操作。The error checking and correction circuit 508 is connected to the memory management circuit 502 and configured to perform error checking and correction operations to ensure the correctness of data. Specifically, when the memory management circuit 502 receives a write command from the host system 11, the error checking and correction circuit 508 will generate a corresponding error correction code (error correcting code, ECC) and /or error checking code (error detecting code, EDC), and the memory management circuit 502 will write the data corresponding to the write command and the corresponding error correction code and/or error checking code into the rewritable non-volatile memory In module 406. Afterwards, when the memory management circuit 502 reads data from the rewritable non-volatile memory module 406, it will simultaneously read the error correction code and/or error check code corresponding to the data, and the error check and correction circuit 508 will be based on The error correcting code and/or error checking code performs error checking and correcting operations on the read data.

缓冲存储器510是连接至存储器管理电路502并且用以暂存来自于主机系统11的数据与指令或来自于可复写式非易失性存储器模块406的数据。在一范例实施例中,存储器控制电路单元404还包括电源管理电路512。电源管理电路512是连接至存储器管理电路502并且用以控制存储器存储装置10的电源。The buffer memory 510 is connected to the memory management circuit 502 and used for temporarily storing data and instructions from the host system 11 or data from the rewritable non-volatile memory module 406 . In an exemplary embodiment, the memory control circuit unit 404 further includes a power management circuit 512 . The power management circuit 512 is connected to the memory management circuit 502 and used to control the power of the memory storage device 10 .

图6是根据本发明的一范例实施例所示出的管理可复写式非易失性存储器模块的示意图。FIG. 6 is a schematic diagram of managing a rewritable non-volatile memory module according to an exemplary embodiment of the present invention.

请参照图6,存储器管理电路502会将可复写式非易失性存储器模块406的实体单元610(0)~610(B)逻辑地分组至存储区601与替换区602。存储区601中的实体单元610(0)~610(A)是用以存储数据,而替换区602中的实体单元610(A+1)~610(B)则是用以替换存储区601中损坏的实体单元。例如,若从某一个实体单元中读取的数据所包含的错误过多而无法被更正时,此实体单元会被视为是损坏的实体单元。须注意的是,若替换区602中没有可用的实体抹除单元,则存储器管理电路502可能会将整个存储器存储装置10宣告为写入保护(write protect)状态,而无法再写入数据。Referring to FIG. 6 , the memory management circuit 502 logically groups the physical units 610 ( 0 )˜ 610 (B) of the rewritable non-volatile memory module 406 into a storage area 601 and a replacement area 602 . The physical units 610(0)-610(A) in the storage area 601 are used to store data, and the physical units 610(A+1)-610(B) in the replacement area 602 are used to replace the data in the storage area 601 Damaged solid elements. For example, if the data read from a certain physical unit contains too many errors to be corrected, the physical unit will be regarded as a damaged physical unit. It should be noted that if there is no available physical erasing unit in the replacement area 602 , the memory management circuit 502 may declare the entire memory storage device 10 as a write-protected state, and data cannot be written any more.

在本范例实施例中,每一个实体单元是指一个实体程序化单元。然而,在另一范例实施例中,一个实体单元也可以是指一个实体地址、一个实体抹除单元或由多个连续或不连续的实体地址组成。存储器管理电路502会配置逻辑单元612(0)~612(C)以映射存储区601中的实体单元610(0)~610(A)。在本范例实施例中,每一个逻辑单元是指一个逻辑地址。然而,在另一范例实施例中,一个逻辑单元也可以是指一个逻辑程序化单元、一个逻辑抹除单元或者由多个连续或不连续的逻辑地址组成。此外,逻辑单元612(0)~612(C)中的每一者可被映射至一或多个实体单元。In this exemplary embodiment, each physical unit refers to a physical programming unit. However, in another exemplary embodiment, a physical unit may also refer to a physical address, a physical erase unit, or consist of multiple continuous or discontinuous physical addresses. The memory management circuit 502 configures the logic units 612 ( 0 )˜ 612 (C) to map the physical units 610 ( 0 )˜ 610 (A) in the storage area 601 . In this exemplary embodiment, each logical unit refers to a logical address. However, in another exemplary embodiment, a logical unit may also refer to a logical programming unit, a logical erasing unit, or consist of multiple consecutive or discontinuous logical addresses. Furthermore, each of logical units 612(0)-612(C) may be mapped to one or more physical units.

存储器管理电路502会将逻辑单元与实体单元之间的映射关系(也称为逻辑-实体地址映射关系)记录于至少一逻辑-实体地址映射表。当主机系统11欲从存储器存储装置10读取数据或写入数据至存储器存储装置10时,存储器管理电路502可根据此逻辑-实体地址映射表来执行对于存储器存储装置10的数据存取操作。The memory management circuit 502 records the mapping relationship between the logical unit and the physical unit (also referred to as the logical-physical address mapping relationship) in at least one logical-physical address mapping table. When the host system 11 intends to read data from or write data to the memory storage device 10 , the memory management circuit 502 can perform a data access operation to the memory storage device 10 according to the logical-physical address mapping table.

在本范例实施例中,错误检查与校正电路508执行编码程序的基本单位是一个讯框(frame)(也称为解码讯框)。一个讯框包括多个数据比特。在本范例实施例中,一个讯框包括256个比特。然而,在另一范例实施例中,一个讯框也可以包括更多(例如4K bytes)或更少的比特。In this exemplary embodiment, the basic unit for the error checking and correction circuit 508 to execute the encoding process is a frame (also called a decoding frame). A frame includes multiple data bits. In this exemplary embodiment, a frame includes 256 bits. However, in another exemplary embodiment, a frame may also include more (eg 4K bytes) or less bits.

在本范例实施例中,错误检查与校正电路508可以针对存储于同一个实体单元中的数据进行单讯框(single-frame)编码与解码,也可以针对存储于多个实体单元中的数据进行多讯框(multi-frame)编码与解码。单讯框编码与多讯框编码可以分别采用低密度奇偶检查校正码(low density parity code,LDPC)、BCH码、回旋码(convolutional code)或涡轮码(turbo code)等编码算法的至少其中之一。或者,在一范例实施例中,多讯框编码还可以采用里德-所罗门码(Reed-solomon codes,RS codes)算法。此外,在另一范例实施例中,更多未列于上的编码算法也可以被采用,在此便不赘述。根据所采用的编码算法,错误检查与校正电路508可以编码欲保护的数据来产生相对应的错误更正码和/或错误检查码。为了说明方便,以下将经由编码产生的错误更正码和/或错误检查码统称为解码数据(即,用于解码的数据)。在一范例实施例中,经由编码产生的解码数据也称为奇偶数据。In this exemplary embodiment, the error checking and correction circuit 508 can perform single-frame encoding and decoding on data stored in the same physical unit, or can perform single-frame encoding and decoding on data stored in multiple physical units. Multi-frame (multi-frame) encoding and decoding. The single-frame coding and the multi-frame coding can respectively adopt at least one of coding algorithms such as low density parity correction code (low density parity code, LDPC), BCH code, convolutional code or turbo code. one. Alternatively, in an exemplary embodiment, the multi-frame coding may also use Reed-Solomon codes (Reed-solomon codes, RS codes) algorithm. In addition, in another exemplary embodiment, more encoding algorithms not listed above may also be adopted, so details will not be described here. According to the encoding algorithm used, the ECC circuit 508 can encode the data to be protected to generate corresponding ECC codes and/or ECC codes. For the convenience of description, the error correction codes and/or error check codes generated through encoding are collectively referred to as decoded data (ie, data used for decoding) hereinafter. In an exemplary embodiment, the decoded data generated through encoding is also referred to as parity data.

图7是根据本发明的一范例实施例所示出的多讯框编码的示意图。FIG. 7 is a schematic diagram of multi-frame coding according to an exemplary embodiment of the present invention.

请参照图7,以编码实体单元710(0)~710(E)所存储的数据来产生相对应的解码数据720为例,实体单元710(0)~710(E)中的每一者所存储的至少部分数据可视为一个讯框。在多讯框编码中,是以每一个比特(或,比特组)所在的位置为依据来对实体单元710(0)~710(E)中的数据进行编码。例如,位于位置701(1)的比特b11、b21、…、bp1会被编码为解码数据720中的比特bo1,位于位置701(2)的比特b12、b22、…、bp2会被编码为解码数据720中的比特bo2;以此类推,位于位置701(r)的比特b1r、b2r、…、bpr会被编码为解码数据720中的比特borPlease refer to FIG. 7, taking the data stored in the encoding entity units 710(0)-710(E) to generate the corresponding decoded data 720 as an example, each of the entity units 710(0)-710(E) At least part of the stored data can be considered as a frame. In multi-frame coding, the data in the physical units 710(0)-710(E) are coded based on the position of each bit (or bit group). For example , bits b 11 , b 21 , . p2 will be encoded as bit b o2 in decoded data 720 ; and so on, bits b 1r , b 2r , . . . , b pr at position 701(r) will be encoded as bit b or in decoded data 720 .

在一范例实施例中,实体单元710(0)~710(E)也称为第一实体单元,而用以存储解码数据720的实体单元则称为第二实体单元。第一实体单元与第二实体单元的数目皆可以是更多或更少。在一范例实施例中,解码数据720是经由编码实体单元710(0)~710(E)中特定数据(也称为原始数据)而产生的,因此解码数据720可视为是对应于原始数据的原始解码数据。在一范例实施例中,可视为原始数据是在实体单元710(0)~710(E)中受解码数据720保护。在一范例实施例中,解码数据720也可视为是独立硬盘冗余阵列(RedundantArray of Independent Disks,RAID)错误更正码。基于解码数据720,从实体单元710(0)~710(E)中读取的数据可被解码,以尝试更正所读取的数据中可能存在的错误。In an exemplary embodiment, the physical units 710 ( 0 )˜710 (E) are also called first physical units, and the physical units for storing the decoded data 720 are called second physical units. Both the number of the first physical unit and the number of the second physical unit can be more or less. In an exemplary embodiment, the decoded data 720 is generated by encoding specific data (also referred to as original data) in the physical units 710(0)-710(E), so the decoded data 720 can be regarded as corresponding to the original data the original decoded data. In an exemplary embodiment, it can be considered that the original data is protected by the decoded data 720 in the physical units 710(0)˜710(E). In an exemplary embodiment, the decoded data 720 can also be regarded as a redundant array of independent disks (Redundant Array of Independent Disks, RAID) error correction code. Based on decoded data 720, data read from physical units 710(0)-710(E) may be decoded in an attempt to correct possible errors in the read data.

在一范例实施例中,用于产生解码数据720的数据也可能包括实体单元710(0)~710(E)所存储的数据中的数据比特所对应的冗余比特。以实体单元710(0)所存储的数据为例,其中的冗余比特例如是对存储于实体单元710(0)中的数据比特进行单讯框编码而产生的。In an exemplary embodiment, the data used to generate the decoded data 720 may also include redundant bits corresponding to data bits in the data stored in the physical units 710(0)˜710(E). Taking the data stored in the physical unit 710(0) as an example, the redundant bits are generated by performing single-frame coding on the data bits stored in the physical unit 710(0).

在一范例实施例中,当欲读取某一个实体单元所存储的数据(也称为目标数据)时,对应于此目标数据的单讯框解码可先被执行。例如,若目标数据是基于LDPC码来进行单讯框编码,则此目标数据也会基于LDPC码来进行单讯框解码。若对应于此目标数据的单讯框解码失败,则对应于此目标数据的多讯框解码会接续执行,例如,基于编码时采用的RS码而执行。In an exemplary embodiment, when data stored in a certain physical unit (also referred to as target data) is to be read, single-frame decoding corresponding to the target data may be performed first. For example, if the target data is single-frame encoded based on LDPC codes, the target data will also be single-frame decoded based on LDPC codes. If the single-frame decoding corresponding to the target data fails, then the multi-frame decoding corresponding to the target data is performed sequentially, for example, based on the RS code used during encoding.

在一范例实施例中,单讯框解码与多讯框解码可以交替执行,直到判定解码失败或解码成功为止。以图7为例,当欲读取存储于实体单元710(0)的目标数据时,对应于实体单元710(0)中欲读取的目标数据的第一次单讯框解码会先被执行,以尝试更正可能存在的错误。若对应于目标数据的第一次单讯框解码失败,则解码数据720以及实体单元710(1)~710(E)中用于产生解码数据720的数据会被读取出来并且对应于目标数据的第一次多讯框解码可被执行。若对应于目标数据的第一次多讯框解码失败,则根据第一次的多讯框解码的执行结果(例如,目标数据中的某些比特可能已被更正),对应于目标数据的第二次单讯框解码可被执行。若第二次单讯框解码仍然失败,则对应于目标数据的第二次多讯框解码可被执行。依此类推,在对目标数据执行至少一次的单讯框解码和/或至少一次的多讯框解码之后,目标数据中的错误应可逐渐被更正。若某一次的单讯框解码或多讯框解码成功更正目标数据中的所有错误,则相应的叠代解码可停止。或者,若对同一目标数据执行的单讯框解码和/或多讯框解码的次数达到一个次数临界值,则可判定解码失败。In an exemplary embodiment, single-frame decoding and multi-frame decoding may be performed alternately until it is determined that decoding fails or succeeds. Taking FIG. 7 as an example, when the target data stored in the physical unit 710(0) is to be read, the first single-frame decoding corresponding to the target data to be read in the physical unit 710(0) will be executed first , to try to correct possible errors. If the first single-frame decoding corresponding to the target data fails, the decoded data 720 and the data used to generate the decoded data 720 in the physical units 710(1)-710(E) will be read out and correspond to the target data The first multiframe decoding can be performed. If the first multiframe decoding corresponding to the target data fails, then according to the execution result of the first multiframe decoding (for example, some bits in the target data may have been corrected), the first multiframe corresponding to the target data may be corrected. A second single-frame decoding can be performed. If the second single-frame decoding still fails, the second multi-frame decoding corresponding to the target data can be performed. By analogy, after performing at least one single-frame decoding and/or at least one multi-frame decoding on the target data, errors in the target data should be corrected gradually. If a certain single-frame decoding or multi-frame decoding successfully corrects all errors in the target data, the corresponding iterative decoding may stop. Alternatively, if the number of single-frame decoding and/or multi-frame decoding performed on the same target data reaches a threshold value, it may be determined that the decoding fails.

在一范例实施例中,在完成对应于目标数据的某一多讯框解码(目标数据中可能仍有错误存在)后,至少一个单讯框解码可根据此多讯框解码的解码结果而执行。此单讯框解码可验证先前的多讯框解码中对至少一个错误比特的更正是否正确。若此单讯框解码的解码结果反映出先前对于某一错误比特的更正是正确的,则此错误比特的更正可被保留。反之,若此单讯框解码的解码结果反映出先前对于某一错误比特的更正不是正确的,则此错误比特的更正可被取消,使得此错误比特的比特值回复为其初始值。In an exemplary embodiment, after completing a certain multi-frame decoding corresponding to the target data (errors may still exist in the target data), at least one single-frame decoding can be performed according to the decoding result of the multi-frame decoding . This single-frame decoding verifies that at least one erroneous bit was corrected in the previous multi-frame decoding. If the decoding result of the single frame decoding reflects that the previous correction to an erroneous bit is correct, the correction of the erroneous bit can be kept. Conversely, if the decoding result of the single-frame decoding reflects that the previous correction of an erroneous bit is not correct, the correction of the erroneous bit can be canceled so that the bit value of the erroneous bit returns to its initial value.

图8至图11是根据本发明的一范例实施例所示出的解码操作的示意图。请参照图8,缓冲存储器510包括缓冲区810与820。缓冲区810也称为第一缓冲区,并且缓冲区820也称为第二缓冲区。在一范例实施例中,缓冲区810的容量可以相同或约略相同于缓冲区820的容量。在一范例实施例中,缓冲区820的容量小于缓冲区810的容量。在一范例实施例中,缓冲区810与820可由图5的存储器管理单元502动态配置。8 to 11 are schematic diagrams showing decoding operations according to an exemplary embodiment of the present invention. Please refer to FIG. 8 , the buffer memory 510 includes buffers 810 and 820 . Buffer 810 is also called a first buffer, and buffer 820 is also called a second buffer. In an exemplary embodiment, the capacity of the buffer 810 may be the same or approximately the same as the capacity of the buffer 820 . In an exemplary embodiment, the capacity of the buffer 820 is smaller than that of the buffer 810 . In an exemplary embodiment, the buffers 810 and 820 can be dynamically configured by the memory management unit 502 of FIG. 5 .

当判定需要执行对应于数据831的多讯框解码时,数据830与对应于数据830的解码数据840会被分别从第一实体单元与第二实体单元读取出来。数据830包括数据831与832。数据831为当前欲基于解码数据840而解码并更正的目标数据,而数据832则为用于产生解码数据840的其余数据。以图7为例,若数据831是存储于实体单元710(0)的数据,则数据832可能是存储于实体单元710(1)~710(E)的至少部分数据。When it is determined that multi-frame decoding corresponding to the data 831 needs to be performed, the data 830 and the decoded data 840 corresponding to the data 830 are read from the first physical unit and the second physical unit respectively. Data 830 includes data 831 and 832 . The data 831 is the target data to be decoded and corrected based on the decoded data 840 , and the data 832 is the remaining data for generating the decoded data 840 . Taking FIG. 7 as an example, if the data 831 is data stored in the physical unit 710(0), then the data 832 may be at least part of the data stored in the physical units 710(1)-710(E).

在一范例实施例中,数据830可视为是原始数据,而解码数据840可视为是对应于数据830、数据831和/或832的原始解码数据。数据830与解码数据840会被载入至缓冲存储器510。例如,数据830与解码数据840会被暂存于缓冲区810。须注意的是,在基于解码数据840对数据830进行解码前,解码数据840会被复制到缓冲区820成为解码数据841。在将解码数据840复制到缓冲区820之后,基于解码数据840,数据830可于缓冲区810中被解码。In an exemplary embodiment, data 830 may be regarded as original data, and decoded data 840 may be regarded as original decoded data corresponding to data 830 , data 831 and/or 832 . The data 830 and the decoded data 840 are loaded into the buffer memory 510 . For example, the data 830 and the decoded data 840 are temporarily stored in the buffer 810 . It should be noted that, before decoding the data 830 based on the decoded data 840 , the decoded data 840 will be copied to the buffer 820 to become the decoded data 841 . After copying the decoded data 840 to the buffer 820 , the data 830 can be decoded in the buffer 810 based on the decoded data 840 .

在一范例实施例中,由于缓冲存储器510(或缓冲区810)的容量不足以一次性的存储完整的数据830(即数据830的总数据量大于缓冲存储器510或缓冲区810的容量),因此数据830可能会分批地被存入缓冲区810并基于解码数据840而分批地被解码。须注意的是,在一范例实施例中,在对数据830分批地解码的过程中,数据831会持续被维护和/或保留在缓冲区810中,直到数据831被成功解码和/或更正为止。In an exemplary embodiment, since the capacity of the buffer memory 510 (or the buffer memory 810) is not enough to store the complete data 830 at one time (that is, the total data volume of the data 830 is greater than the capacity of the buffer memory 510 or the buffer memory 810), therefore Data 830 may be stored into buffer 810 in batches and decoded in batches based on decoded data 840 . It should be noted that, in an exemplary embodiment, in the process of decoding data 830 in batches, data 831 will continue to be maintained and/or remain in buffer 810 until data 831 is successfully decoded and/or corrected until.

在一范例实施例中,对应于缓冲区810中执行的解码,解码数据840中的至少部分比特可能会被更新,使得缓冲区810中更新后的解码数据840可能会与缓冲区820中预先存储的解码数据841不同。在一范例实施例中,对应于缓冲区810中执行的解码,解码数据840会被更新为校验(syndrome)数据。此校验数据可反映对于数据830执行的解码的解码状态或解码结果。In an exemplary embodiment, corresponding to the decoding performed in the buffer 810, at least some bits in the decoded data 840 may be updated, so that the updated decoded data 840 in the buffer 810 may be compared with the previously stored bits in the buffer 820. The decoded data of 841 is different. In an exemplary embodiment, corresponding to the decoding performed in the buffer 810, the decoded data 840 will be updated as syndrome data. This check data may reflect the decoding status or decoding results of the decoding performed on the data 830 .

请参照图9,假设根据缓冲区810中执行的解码,数据830中的数据833被更正,但是数据831尚未被更正。在一范例实施例中,数据833也称为已更正数据。在更正数据833后,基于缓冲区820中的解码数据841,数据833会被解码。在基于解码数据841解码数据833的过程中,解码数据841中的至少部分比特可能也会被更新。更新后的解码数据841会被持续保存在缓冲区820中。须注意的是,在一范例实施例中,缓冲区820中的解码数据841只会用于解码数据830中已更正的数据(即,数据833),而不会用于解码数据830中尚未更正的数据。此外,更新后的解码数据841也可称为对应于数据833的校验数据,以反映对于数据833执行的解码的解码状态或解码结果。Referring to FIG. 9 , it is assumed that according to the decoding performed in the buffer 810, data 833 in data 830 is corrected, but data 831 is not yet corrected. In an exemplary embodiment, the data 833 is also referred to as corrected data. After correcting data 833 , based on decoded data 841 in buffer 820 , data 833 is decoded. During the process of decoding the data 833 based on the decoded data 841 , at least some bits in the decoded data 841 may also be updated. The updated decoded data 841 will be kept in the buffer 820 continuously. It should be noted that, in an exemplary embodiment, the decoded data 841 in the buffer 820 will only be used for the corrected data in the decoded data 830 (ie, data 833 ), and will not be used in the uncorrected data in the decoded data 830 The data. In addition, the updated decoded data 841 may also be referred to as check data corresponding to the data 833 to reflect the decoding status or decoding result of the decoding performed on the data 833 .

在一范例实施例中,数据833基于解码数据840的更正仍须经由对应于数据833的单讯框解码的验证。例如,在图9的一范例实施例中,在基于解码数据840更正数据833之后,对应于数据833的单讯框解码会被执行。若此单讯框解码的解码结果反映出对于数据833中错误比特的更正是正确的,则数据833的更正结果可被保留。反之,若此单讯框解码的解码结果反映出对于数据833中错误比特的更正不是正确的,则数据833的更正结果可被取消,使得数据833中某些被更正的比特会被回复为其原始的比特值。In an exemplary embodiment, corrections to data 833 based on decoded data 840 are still subject to verification corresponding to single frame decoding of data 833 . For example, in an exemplary embodiment of FIG. 9, after data 833 is corrected based on decoded data 840, single frame decoding corresponding to data 833 is performed. If the decoding result of the single frame decoding reflects that the correction of the erroneous bits in the data 833 is correct, the correction result of the data 833 can be kept. On the contrary, if the decoding result of this single frame decoding reflects that the correction of the erroneous bits in the data 833 is not correct, then the correction result of the data 833 can be canceled, so that some of the corrected bits in the data 833 will be returned to their Raw bit value.

在一范例实施例中,图8与图9的解码操作可视为是对于数据831的第一次多讯框解码。此第一次多讯框解码是为了更正数据831中的错误而执行的。例如,数据831可能是来自主机系统的某一个读取指令所指示读取的数据。若数据831中的错误未完全被更正,则此第一次多讯框解码会被判定为失败。In an exemplary embodiment, the decoding operations in FIG. 8 and FIG. 9 can be regarded as the first multi-frame decoding for the data 831 . This first multiframe decoding is performed to correct errors in the data 831 . For example, the data 831 may be the data instructed to be read by a certain read command from the host system. If the errors in the data 831 are not completely corrected, the first multiframe decoding will be judged as failed.

请参照图10,若对于数据831的第一次多讯框解码失败,则数据1001可被重新从第一实体单元中读取出来。须注意的是,延续图8与图9的范例实施例,数据831可持续地被保存于缓冲区810中,而不需随着数据1001重新从第一实体单元中读取。在一范例实施例中,数据1001也称为第一数据。数据1001可不包含图9的范例实施例中已被更正的数据833。数据1001会被载入至缓冲存储器510,例如,暂存于缓冲区810中。Referring to FIG. 10 , if the first multi-frame decoding of the data 831 fails, the data 1001 can be re-read from the first physical unit. It should be noted that continuing the exemplary embodiments of FIG. 8 and FIG. 9 , the data 831 can be continuously stored in the buffer 810 without re-reading from the first physical unit along with the data 1001 . In an exemplary embodiment, the data 1001 is also referred to as first data. The data 1001 may not include the corrected data 833 in the exemplary embodiment of FIG. 9 . The data 1001 will be loaded into the buffer memory 510 , for example, temporarily stored in the buffer 810 .

在解码数据831与1001之前,解码数据941会被从缓冲区820复制到缓冲区810中成为解码数据942。须注意的是,解码数据941是用以表示图9的缓冲区820中更新后的解码数据841。换言之,解码数据941的数据内容会相同于图9的缓冲区820中更新后的解码数据841。在将解码数据941从缓冲区820中复制到缓冲区810之后,基于解码数据942,数据831与1001会于缓冲区810中被解码。Before decoding the data 831 and 1001 , the decoded data 941 is copied from the buffer 820 to the buffer 810 to become the decoded data 942 . It should be noted that the decoded data 941 is used to represent the updated decoded data 841 in the buffer 820 in FIG. 9 . In other words, the data content of the decoded data 941 is the same as the updated decoded data 841 in the buffer 820 of FIG. 9 . After copying the decoded data 941 from the buffer 820 to the buffer 810 , based on the decoded data 942 , the data 831 and 1001 are decoded in the buffer 810 .

须注意的是,在图10的范例实施例中,用于解码数据831与1001的解码数据942是从缓冲区820复制的,而非从第二实体单元读取。因此,图10中用于解码数据831与1001的解码数据942不同于图8与图9中的解码数据840。在一范例实施例中,图8与图9中的解码数据840也可视为是对应于数据1001的原始解码数据。此外,由于缓冲存储器510或缓冲区810的容量不足以一次性的存储完整的数据1001(即数据1001的总数据量大于缓冲存储器510或缓冲区810的容量),因此数据1001可能也会分批地被存入缓冲区810并基于解码数据942而分批地被解码。此外,分批存入缓冲区810进行解码的数据1001不会覆盖数据831。It should be noted that in the exemplary embodiment of FIG. 10 , the decoded data 942 for the decoded data 831 and 1001 is copied from the buffer 820 instead of being read from the second physical unit. Therefore, the decoded data 942 for the decoded data 831 and 1001 in FIG. 10 is different from the decoded data 840 in FIGS. 8 and 9 . In an exemplary embodiment, the decoded data 840 in FIG. 8 and FIG. 9 can also be regarded as the original decoded data corresponding to the data 1001 . In addition, because the capacity of the buffer memory 510 or the buffer memory 810 is not enough to store the complete data 1001 at one time (that is, the total data volume of the data 1001 is greater than the capacity of the buffer memory 510 or the buffer memory 810), the data 1001 may also be divided into batches are stored in buffer 810 and decoded in batches based on decoded data 942 . In addition, data 1001 batched into buffer 810 for decoding will not overwrite data 831 .

请参照图11,假设根据图10在缓冲区810中执行的解码,数据1002被更正,但是数据831仍未被更正。在一范例实施例中,数据1002也称为已更正数据。在一范例实施例中,对于数据1002的更正也会通过对应于数据1002的单讯框解码的验证,以决定对于数据1002的更正的正确性。在更正数据1002后,基于缓冲区820中的解码数据941,数据1002会被解码。在基于解码数据941解码数据1002的过程中,解码数据941中的至少部分比特可能也会被更新。更新后的解码数据941会被持续保存在缓冲区820中,以供对应于数据831的下一次叠代解码使用。Referring to FIG. 11 , suppose that according to the decoding performed in the buffer 810 in FIG. 10 , the data 1002 is corrected, but the data 831 is still not corrected. In an exemplary embodiment, data 1002 is also referred to as corrected data. In an exemplary embodiment, the correction to the data 1002 is also verified by the single-frame decoding corresponding to the data 1002 to determine the correctness of the correction to the data 1002 . After correcting data 1002 , based on decoded data 941 in buffer 820 , data 1002 is decoded. During the process of decoding the data 1002 based on the decoded data 941 , at least some bits in the decoded data 941 may also be updated. The updated decoded data 941 will be kept in the buffer 820 for the next iterative decoding corresponding to the data 831 .

类似于图9的范例实施例,在图11的一范例实施例中,缓冲区820中的解码数据941只会用于解码已更正的数据(即,数据1002),而不会用于解码尚未更正的数据(例如数据831或图10的数据1001中未更正的数据)。更新后的解码数据941也可称为对应于数据1002的校验数据,以反映对于数据1002执行的解码的解码状态或解码结果。至此,可视为完成对数据831的第二次多讯框解码。此第二次多讯框解码也是为了更正数据831中的错误而执行的。在图11的范例实施例中,若数据831中的错误未完全被更正,则此第二次多讯框解码也会被判定为失败。Similar to the exemplary embodiment of FIG. 9, in an exemplary embodiment of FIG. 11, the decoded data 941 in the buffer 820 will only be used for decoding the corrected data (ie, data 1002), and will not be used for decoding Corrected data (eg, data 831 or uncorrected data in data 1001 of FIG. 10 ). The updated decoded data 941 may also be referred to as check data corresponding to the data 1002 to reflect the decoding status or decoding result of the decoding performed on the data 1002 . So far, it can be considered that the second multi-frame decoding of the data 831 is completed. This second multiframe decoding is also performed to correct errors in the data 831 . In the exemplary embodiment of FIG. 11 , if the errors in the data 831 are not completely corrected, then the second multi-frame decoding is also judged as failed.

若第二次多讯框解码仍然失败,则图10与图11的范例实施例中的读取不包含目标数据以及已更新数据的第一数据的操作、将解码数据从第二缓冲区复制到第一缓冲区的操作、在第一缓冲区中执行解码与数据更正操作、基于第二缓冲区中的解码数据对已更正数据执行解码的操作、以及更新第二缓冲区中的解码数据的操作皆可被重复执行,直到保存在第一缓冲区中的目标数据中的错误被成功更正为止。此外,图8至图11的解码操作可由图5的存储器管理电路502搭配错误检查与校正电路508执行。If the second multi-frame decoding still fails, the operation of reading the first data that does not include the target data and the updated data in the exemplary embodiment of FIG. 10 and FIG. 11 copies the decoded data from the second buffer to Operation of the first buffer, decoding and data correction in the first buffer, decoding of corrected data based on the decoded data in the second buffer, and updating of the decoded data in the second buffer can be executed repeatedly until the error in the target data stored in the first buffer is successfully corrected. In addition, the decoding operations in FIGS. 8 to 11 can be performed by the memory management circuit 502 in FIG. 5 together with the error checking and correction circuit 508 .

在一范例实施例中,基于复制到第一缓冲区中的解码数据(例如,图8的解码数据840与图10中的解码数据942)执行的解码也称为第一类解码操作,而基于存储于第二缓冲区中的解码数据(例如,图9的解码数据841与图11中的解码数据941)执行的解码也称为第二类解码操作。In an exemplary embodiment, the decoding based on the decoded data copied into the first buffer (for example, the decoded data 840 in FIG. 8 and the decoded data 942 in FIG. 10 ) is also referred to as the first type of decoding operation, and The decoding performed on the decoded data stored in the second buffer (eg, the decoded data 841 in FIG. 9 and the decoded data 941 in FIG. 11 ) is also referred to as a second type of decoding operation.

在一范例实施例中,第一类解码操作所解码的数据(例如原始数据和/或第一数据)可包括具有无法更正(简称为UNC)错误的数据单元,而第二类解码操作所解码的数据(例如已更正数据)不会包括具有UNC错误的数据单元。在此,UNC错误是指无法通过相应的单讯框解码来更正的错误。以图7为例,假设一个数据单元是指一个讯框,若存储于实体单元710(0)中的某一个数据单元无法通过对应于此数据单元的单讯框解码来成功更正其中的错误,则此数据单元可视为是一个具有UNC错误的数据单元。或者,若存储于实体单元710(1)中的某一个数据单元可以通过对应于此数据单元的单讯框解码来成功更正其中的错误,则此数据单元可视为是一个不具有UNC错误的数据单元。In an exemplary embodiment, data decoded by the first type of decoding operation (such as raw data and/or first data) may include data units with uncorrectable (abbreviated as UNC) errors, while data decoded by the second type of decoding operation The data (such as corrected data) will not include data units with UNC errors. Here, UNC errors refer to errors that cannot be corrected by corresponding single-frame decoding. Taking FIG. 7 as an example, assuming that a data unit refers to a frame, if a certain data unit stored in the physical unit 710(0) cannot successfully correct the error in the single frame decoding corresponding to the data unit, Then this data unit can be regarded as a data unit with UNC error. Or, if a certain data unit stored in the physical unit 710(1) can successfully correct the error therein through single-frame decoding corresponding to this data unit, then this data unit can be regarded as a UNC error-free data unit.

在一范例实施例中,第一类解码操作包括正常解码模式与擦除(erasure)模式。根据待解码数据(例如,图8中的数据830或图10的数据831与1001)中具有UNC错误的数据单元的总数,第一类解码操作操作可被决定为操作于正常解码模式或擦除模式。在一范例实施例中,若待解码数据中具有UNC错误的数据单元的总数大于或等于一预定值,例如2,但并不以此为限,则对应于待解码数据执行的第一类解码操作操作会被操作于正常解码模式。若待解码数据中具有UNC错误的数据单元的总数小于预定值,则对应于待解码数据执行的第一类解码操作操作会被操作于擦除模式。在擦除模式下,第一类解码操作通常可以保证完成对于待解码数据(或目标数据)的解码与更正。In an exemplary embodiment, the first type of decoding operation includes a normal decoding mode and an erasure mode. According to the total number of data units with UNC errors in the data to be decoded (for example, data 830 in FIG. 8 or data 831 and 1001 in FIG. 10 ), the first type of decoding operation can be decided to operate in normal decoding mode or erase model. In an exemplary embodiment, if the total number of data units with UNC errors in the data to be decoded is greater than or equal to a predetermined value, such as 2, but not limited thereto, the first type of decoding corresponding to the data to be decoded is performed The operation will be operated in normal decoding mode. If the total number of data units with UNC errors in the data to be decoded is less than a predetermined value, the first type of decoding operation performed corresponding to the data to be decoded will be operated in an erase mode. In the erasing mode, the first type of decoding operation can usually guarantee to complete the decoding and correction of the data to be decoded (or target data).

在图9或图11的范例实施例中,缓冲区810中的待解码数据可能会包括至少一个具有UNC错误的数据单元。对应于对待解码数据执行的第一类解码操作,缓冲区810中某一个具有UNC错误的数据单元可能会被更正为不具有UNC错误的数据单元。此不具有UNC错误的数据单元可被视为已更正数据。在连续执行的多次叠代解码中,每次从第一实体单元读取并载入至缓冲区810中的第一数据可不包含已不具有UNC错误的数据单元。藉此,在连续执行的多次叠代解码中,待解码数据中具有UNC错误的数据单元的数目可逐渐减少,从而提高解码成功率。In the exemplary embodiment of FIG. 9 or FIG. 11 , the data to be decoded in the buffer 810 may include at least one data unit with a UNC error. Corresponding to the first type of decoding operation performed on the data to be decoded, a certain data unit with a UNC error in the buffer 810 may be corrected to a data unit without a UNC error. Such data units without UNC errors may be considered corrected data. In multiple iterative decodings performed consecutively, the first data read from the first physical unit and loaded into the buffer 810 each time may not include data units that have no UNC error. Thereby, the number of data units with UNC errors in the data to be decoded can be gradually reduced during multiple iterative decodings performed continuously, thereby improving the success rate of decoding.

须注意的是,在图8至图11的前述范例实施例中,只有在对原始数据执行第一次的第一类解码操作时,对应于第一数据(或原始数据)的原始解码数据会被从第二实体单元中读取。在第二次以后执行的第一类解码操作中,用于对第一数据进行解码的解码数据都是从第二缓冲区中复制的。此外,在更新存储于第二缓冲区的解码数据的(解码)操作中,第二缓冲区中的解码数据的更新只会受到不具有UNC错误的数据单元的影响,从而降低第二缓冲区中的解码数据受到错误比特(或UNC错误)影响的机率。因此,在将解码数据从第二缓冲区复制到第一缓冲区后,基于所复制的解码数据于第一缓冲区执行的第一类解码操作的解码成功率可以被提高。It should be noted that, in the aforementioned exemplary embodiments of FIG. 8 to FIG. 11 , only when the first type of decoding operation is performed on the original data, the original decoded data corresponding to the first data (or original data) will be is read from the second entity unit. In the first type of decoding operation performed after the second time, the decoded data used to decode the first data is all copied from the second buffer. Furthermore, in the (decoding) operation of updating the decoded data stored in the second buffer, the update of the decoded data in the second buffer is only affected by data units that do not have UNC errors, thereby reducing the The probability that the decoded data is affected by erroneous bits (or UNC errors). Therefore, after copying the decoded data from the second buffer to the first buffer, the decoding success rate of the first type of decoding operation performed in the first buffer based on the copied decoded data can be improved.

图12与图13是根据本发明的一范例实施例所示出的解码操作的流程图。请参照图12,在步骤S1201中,从可复写式非易失性存储器模块读取原始数据与对应于第一数据(或原始数据)的原始解码数据。在步骤S1202中,将原始数据与对应于第一数据的原始解码数据暂存至缓冲存储器(例如,图8的缓冲存储器510)的第一缓冲区(例如,图8中的缓冲区810)。在步骤S1203中,将对应于第一数据的原始解码数据复制到缓冲存储器的第二缓冲区(例如,图8中的缓冲区820)。在步骤S1204中,在缓冲存储器的第一缓冲区中,基于对应于第一数据的原始解码数据对原始数据执行第一类解码操作。在步骤S1205中,判断对应于原始数据的第一类解码操作是否成功。若是(即第一类解码操作成功),在步骤S1206中,输出解码成功的数据(也称为已解码数据)。若否(即第一类解码操作失败),则进入图13的步骤S1301。FIG. 12 and FIG. 13 are flowcharts showing decoding operations according to an exemplary embodiment of the present invention. Please refer to FIG. 12 , in step S1201 , the original data and the original decoded data corresponding to the first data (or original data) are read from the rewritable non-volatile memory module. In step S1202, the original data and the original decoded data corresponding to the first data are temporarily stored in a first buffer (eg, buffer 810 in FIG. 8 ) of a buffer memory (eg, buffer 510 in FIG. 8 ). In step S1203, the original decoded data corresponding to the first data is copied to the second buffer of the buffer memory (for example, the buffer 820 in FIG. 8). In step S1204, in the first buffer memory of the buffer memory, a first type of decoding operation is performed on the original data based on the original decoded data corresponding to the first data. In step S1205, it is judged whether the first type of decoding operation corresponding to the original data is successful. If yes (that is, the first type of decoding operation succeeds), in step S1206, output the data that has been successfully decoded (also referred to as decoded data). If not (that is, the first type of decoding operation fails), go to step S1301 in FIG. 13 .

请参照图13,在步骤S1301中,从可复写式非易失性存储器模块读取第一数据并将第一数据暂存至缓冲存储器的第一缓冲区。须注意的是,第一数据可不包括持续保存在第一缓冲区中的目标数据以及已于先前的第一类解码操作中更正的已更正数据。在步骤S1302中,将第二缓冲区中的解码数据复制到第一缓冲区中。在步骤S1303中,在第一缓冲区中,基于所复制的解码数据对第一数据与目标数据执行第一类解码操作。在步骤S1304中,判断第一类解码操作是否成功。若是,在步骤S1305中,输出已解码数据。若否,在步骤S1306中,判断是否有数据(或数据单元)在第一类解码操作中被更正。若否(即没有数据(或数据单元)在第一类解码操作中被更正),回到步骤S1301,重新执行下一次叠代解码。若有(即有数据(或数据单元)在第一类解码操作中被更正),在步骤S1307中,基于第二缓冲区中的解码数据对所更正的数据(即已更正数据)执行第二类解码操作,以更新第二缓冲区中的解码数据。基于已更正数据而更新的解码数据可持续保存于第二缓冲区中,以供下一次的叠代解码使用。在步骤S1307之后,步骤S1301可重复执行。此外,在图12与图13的范例实施例中,若所执行的解码操作的一执行次数达到一个次数临界值,则解码操作可被判定失败并且被停止。Please refer to FIG. 13 , in step S1301 , read first data from the rewritable non-volatile memory module and temporarily store the first data into a first buffer of the buffer memory. It should be noted that the first data may not include the target data persistently stored in the first buffer and the corrected data that has been corrected in the previous first type of decoding operation. In step S1302, copy the decoded data in the second buffer to the first buffer. In step S1303, in the first buffer zone, a first type of decoding operation is performed on the first data and the target data based on the copied decoded data. In step S1304, it is judged whether the first type of decoding operation is successful. If yes, in step S1305, output the decoded data. If not, in step S1306, it is determined whether any data (or data unit) is corrected in the first type of decoding operation. If not (that is, no data (or data unit) is corrected in the first type of decoding operation), go back to step S1301 and re-execute the next iterative decoding. If there is (that is, there is data (or data unit) that is corrected in the first type of decoding operation), in step S1307, based on the decoded data in the second buffer, a second operation is performed on the corrected data (that is, the corrected data) Decode-like operation to update the decoded data in the second buffer. The decoded data updated based on the corrected data is continuously stored in the second buffer for use in the next iterative decoding. After step S1307, step S1301 may be executed repeatedly. In addition, in the exemplary embodiments of FIG. 12 and FIG. 13 , if a number of execution times of the performed decoding operation reaches a threshold value, the decoding operation may be judged to be failed and stopped.

在一范例实施例中,步骤S1206和/或S1305还可包括将解码成功的数据(例如,目标数据)复制到其他的实体单元重新存储,并且将原先存储此数据(例如,目标数据)的实体抹除单元标记为损坏的实体抹除单元。此外,更多的错误处理手段也可在步骤S1206和/或S1305中执行,本发明不加以限制。In an exemplary embodiment, steps S1206 and/or S1305 may also include copying successfully decoded data (for example, target data) to other entity units for re-storage, and copying the entity that originally stored the data (for example, target data) The erase unit is marked as a damaged physical erase unit. In addition, more error handling means can also be executed in step S1206 and/or S1305, which is not limited by the present invention.

然而,图12与图13中各步骤已详细说明如上,在此便不再赘述。值得注意的是,图12与图13中各步骤可以实作为多个程序码或是电路,本发明不加以限制。此外,图12与图13的方法可以搭配以上范例实施例使用,也可以单独使用,本发明不加以限制。However, each step in FIG. 12 and FIG. 13 has been described in detail above, and will not be repeated here. It should be noted that each step in FIG. 12 and FIG. 13 can be implemented as a plurality of program codes or circuits, which is not limited in the present invention. In addition, the methods shown in FIG. 12 and FIG. 13 can be used together with the above exemplary embodiments, or can be used alone, which is not limited by the present invention.

综上所述,本发明可将解码过程中动态产生的解码数据持续保存在缓冲存储器中。当后续要重复解码目标数据时,保存在缓冲存储器中的解码数据可即时地被使用,而不需要重复从可复写式非易失性存储器模块读取相关数据并重复计算而获得。此外,本发明也可减少UNC错误对保存在缓冲存储器中的解码数据的影响。藉此,可在缓冲存储器的容量有限的状况下提高解码操作的效率。To sum up, the present invention can continuously save the decoded data dynamically generated during the decoding process in the buffer memory. When the target data is to be repeatedly decoded subsequently, the decoded data stored in the buffer memory can be used immediately without repeatedly reading relevant data from the rewritable non-volatile memory module and obtaining it repeatedly. In addition, the present invention can also reduce the influence of UNC errors on the decoded data stored in the buffer memory. Thereby, the efficiency of the decoding operation can be improved under the condition that the capacity of the buffer memory is limited.

虽然本发明已以实施例揭示如上,然其并非用以限定本发明,任何所属技术领域中技术人员,在不脱离本发明的精神和范围内,当可作些许的更动与润饰,故本发明的保护范围当视权利雅琪所界定者为准。Although the present invention has been disclosed above with the embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some changes and modifications without departing from the spirit and scope of the present invention. Therefore, this The scope of protection of an invention shall be subject to what is defined by the right Yaqi.

Claims (30)

1. A decoding method for a rewritable nonvolatile memory module, wherein the rewritable nonvolatile memory module includes a plurality of physical units, the decoding method comprising:
temporarily storing first data to a first buffer area in a buffer memory, wherein the buffer memory comprises the first buffer area and a second buffer area;
copying the decoded data of the second buffer to the first buffer to decode the first data;
performing, in the first buffer, a first type of decoding operation on the first data based on the copied decoded data, wherein the first type of decoding operation includes at least one decoding operation performed in the first buffer; and
and outputting the decoded data if the first type of decoding operation is successful.
2. The decoding method of claim 1, further comprising:
encoding original data to generate original decoded data corresponding to the first data;
storing the original data to at least one first entity unit; and
storing the original decoded data corresponding to the first data in at least a second physical unit of the plurality of physical units.
3. The decoding method of claim 1, further comprising:
reading original data from at least one first entity unit and original decoded data corresponding to the first data from at least one second entity unit of the plurality of entity units;
loading the original data and the original decoded data corresponding to the first data into the buffer memory; and
performing, in the first buffer, the first type of decoding operation on the original data based on the original decoded data corresponding to the first data.
4. The decoding method of claim 3, further comprising:
copying the original decoded data corresponding to the first data to the second buffer before performing the first type of decoding operation on the original data based on the original decoded data corresponding to the first data.
5. The decoding method of claim 1, further comprising:
performing a second type of decoding operation on the corrected data based on the decoded data in the second buffer to update the decoded data in the second buffer,
wherein the corrected data is corrected via the first type of decoding operation.
6. The decoding method according to claim 5, wherein the corrected data does not include data units having uncorrectable errors.
7. The decoding method according to claim 1, wherein the decoded data copied to the first buffer is generated based on a second type of decoding operation performed on the corrected data and original decoded data corresponding to the first data.
8. The decoding method of claim 1, wherein the first class of decoding operations comprises a normal decoding mode and an erasure mode, and the decoding method further comprises:
and determining to operate the first type of decoding operation in the normal decoding mode or the erasure mode according to the total number of data units with uncorrectable errors in the first data.
9. The decoding method according to claim 1, wherein the first data is protected by RAID ECC in at least a first physical unit.
10. The decoding method of claim 1, wherein the first type of decoding operation belongs to multi-frame decoding, and the decoding method further comprises:
and performing single-frame decoding according to the decoding result of the first type of decoding operation to verify the correction of the first type of decoding operation on at least one error bit.
11. A memory storage device, comprising:
a connection interface unit for connecting to a host system;
a rewritable non-volatile memory module, wherein the rewritable non-volatile memory module comprises a plurality of entity units; and
a memory control circuit unit connected to the connection interface unit and the rewritable nonvolatile memory module,
wherein the memory control circuit unit is used for temporarily storing the first data into a first buffer area in a buffer memory, wherein the buffer memory comprises the first buffer area and a second buffer area,
wherein the memory control circuit unit is further to copy decoded data of the second buffer to the first buffer to decode the first data,
wherein the memory control circuitry unit is further to perform a first type of decoding operation on the first data in the first buffer based on the copied decoded data, wherein the first type of decoding operation includes at least one decoding operation performed in the first buffer,
wherein the memory control circuit unit is further configured to output decoded data if the first type of decoding operation is successful.
12. The memory storage device of claim 11, wherein the memory control circuitry unit is further to encode original data to produce original decoded data corresponding to the first data,
wherein the memory control circuit unit is further configured to store the raw data to at least a first physical unit,
wherein the memory control circuitry unit is further to store the original decoded data corresponding to the first data in at least a second physical unit of the plurality of physical units.
13. The memory storage device of claim 11, wherein the memory control circuitry unit is further to instruct reading original data from at least a first physical unit and reading original decoded data corresponding to the first data from at least a second physical unit of the plurality of physical units,
wherein the memory control circuit unit is further configured to load the original data and the original decoded data corresponding to the first data into the buffer memory,
wherein the memory control circuitry unit is further to perform the first type of decoding operation on the original data in the first buffer based on the original decoded data corresponding to the first data.
14. The memory storage device of claim 13, wherein prior to performing the first type of decoding operation on the original data based on the original decoded data corresponding to the first data, the memory control circuitry unit is also to copy the original decoded data corresponding to the first data to the second buffer.
15. The memory storage device of claim 11, wherein the memory control circuitry unit is further to perform a second type of decoding operation on corrected data based on the decoded data in the second buffer to update the decoded data in the second buffer,
wherein the corrected data is corrected via the first type of decoding operation.
16. The memory storage device of claim 15, wherein the corrected data does not include data units having uncorrectable errors.
17. The memory storage device of claim 11, wherein the decoded data copied to the first buffer is generated based on a second type of decoding operation performed on corrected data and original decoded data corresponding to the first data.
18. The memory storage device of claim 11, wherein the first type of decoding operation comprises a normal decoding mode and an erasure mode, and the memory control circuit unit is further configured to determine to operate the first type of decoding operation in the normal decoding mode or the erasure mode according to a total number of data units in the first data having uncorrectable errors.
19. The memory storage device of claim 11, wherein the first data is protected in at least a first physical unit by redundant array of independent disks error correction code.
20. The memory storage device of claim 11, wherein the first type of decoding operation is multi-frame decoding, and the memory control circuit unit is further configured to perform single-frame decoding according to a decoding result of the first type of decoding operation to verify correction of at least one erroneous bit by the first type of decoding operation.
21. A memory control circuit unit for controlling a rewritable nonvolatile memory module, wherein the rewritable nonvolatile memory module includes a plurality of entity units, wherein the memory control circuit unit includes:
a host interface for connecting to a host system;
a memory interface for connecting to the rewritable nonvolatile memory module;
a buffer memory;
an error checking and correcting circuit; and
memory management circuitry connected to the host interface, the memory interface, the buffer memory, and the error checking and correction circuitry,
wherein the memory management circuit is used for temporarily storing the first data to a first buffer area in the buffer memory, wherein the buffer memory comprises the first buffer area and a second buffer area,
wherein the memory management circuitry is further to copy decoded data of the second buffer to the first buffer to decode the first data,
wherein the error checking and correcting circuit is configured to perform a first type of decoding operation on the first data based on the copied decoded data in the first buffer, wherein the first type of decoding operation comprises at least one decoding operation performed in the first buffer,
wherein the memory management circuit is further configured to output decoded data if the first type of decoding operation is successful.
22. The memory control circuitry unit of claim 21, wherein the error checking and correction circuitry is further to encode raw data to produce raw decoded data corresponding to the first data,
wherein the memory management circuit is further configured to store the raw data to at least a first physical unit,
wherein the memory management circuitry is also to store the original decoded data corresponding to the first data in at least a second physical unit of the plurality of physical units.
23. The memory control circuit unit of claim 21, wherein the memory management circuit is further configured to instruct reading original data from at least a first physical unit and reading original decoded data corresponding to the first data from at least a second physical unit of the plurality of physical units,
wherein the memory management circuit is further to load the original data and the original decoded data corresponding to the first data into the buffer memory,
wherein the error checking and correcting circuit is further configured to perform the first type of decoding operation on the original data in the first buffer based on the original decoded data corresponding to the first data.
24. The memory control circuitry unit of claim 23, wherein prior to performing the first type of decoding operation on the original data based on the original decoded data corresponding to the first data, the memory management circuitry is further to copy the original decoded data corresponding to the first data to the second buffer.
25. The memory control circuit unit of claim 21, wherein the memory control circuit unit is further configured to perform a second type of decoding operation on corrected data based on the decoded data in the second buffer to update the decoded data in the second buffer,
wherein the corrected data is corrected via the first type of decoding operation.
26. The memory control circuit unit of claim 25, wherein the corrected data does not include data cells with uncorrectable errors.
27. The memory control circuit unit of claim 21, wherein the decoded data copied to the first buffer is generated based on a second type of decoding operation performed on corrected data and original decoded data corresponding to the first data.
28. The memory control circuit unit of claim 21, wherein the first type of decoding operation comprises a normal decoding mode and an erasure mode, and the memory management circuit is further configured to determine to operate the first type of decoding operation in the normal decoding mode or the erasure mode according to a total number of data units in the first data having uncorrectable errors.
29. The memory control circuit unit of claim 21, wherein the first data is protected by redundant array of independent disks error correction code in at least a first physical unit.
30. The memory control circuit unit of claim 21, wherein the first type of decoding operation is multi-frame decoding, and the memory control circuit unit is further configured to perform single-frame decoding according to a decoding result of the first type of decoding operation to verify the correction of at least one erroneous bit by the first type of decoding operation.
CN201710825756.3A 2017-09-14 2017-09-14 Decoding method, memory storage device and memory control circuit unit Active CN109509499B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710825756.3A CN109509499B (en) 2017-09-14 2017-09-14 Decoding method, memory storage device and memory control circuit unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710825756.3A CN109509499B (en) 2017-09-14 2017-09-14 Decoding method, memory storage device and memory control circuit unit

Publications (2)

Publication Number Publication Date
CN109509499A CN109509499A (en) 2019-03-22
CN109509499B true CN109509499B (en) 2023-02-28

Family

ID=65744371

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710825756.3A Active CN109509499B (en) 2017-09-14 2017-09-14 Decoding method, memory storage device and memory control circuit unit

Country Status (1)

Country Link
CN (1) CN109509499B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105653199A (en) * 2014-11-14 2016-06-08 群联电子股份有限公司 Data reading method, memory storage device and memory control circuit unit
CN106873901A (en) * 2015-12-11 2017-06-20 群联电子股份有限公司 Memory management method, memory control circuit unit and memory storage device
CN106970763A (en) * 2016-01-14 2017-07-21 群联电子股份有限公司 Memory management method, memory control circuit unit and memory storage device
CN107025935A (en) * 2016-01-29 2017-08-08 大心电子股份有限公司 decoding method, memory storage device and memory control circuit unit

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5042568B2 (en) * 2006-09-07 2012-10-03 富士通株式会社 MPEG decoder and MPEG encoder
JP2010009643A (en) * 2008-06-24 2010-01-14 Toshiba Corp Error correction system
JP2011040136A (en) * 2009-08-13 2011-02-24 Toshiba Corp Semiconductor memory device
US9213600B2 (en) * 2013-11-11 2015-12-15 Seagate Technology Llc Dynamic per-decoder control of log likelihood ratio and decoding parameters

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105653199A (en) * 2014-11-14 2016-06-08 群联电子股份有限公司 Data reading method, memory storage device and memory control circuit unit
CN106873901A (en) * 2015-12-11 2017-06-20 群联电子股份有限公司 Memory management method, memory control circuit unit and memory storage device
CN106970763A (en) * 2016-01-14 2017-07-21 群联电子股份有限公司 Memory management method, memory control circuit unit and memory storage device
CN107025935A (en) * 2016-01-29 2017-08-08 大心电子股份有限公司 decoding method, memory storage device and memory control circuit unit

Also Published As

Publication number Publication date
CN109509499A (en) 2019-03-22

Similar Documents

Publication Publication Date Title
TWI658463B (en) Data access method,memory control circuit unit and memory storage device
TWI640865B (en) Decoding method, memory storage device and memory control circuit unit
TWI628543B (en) Decoding method, memory storage device and memory control circuit unit
TWI751620B (en) Memory control method, memory storage device and memory control circuit unit
CN109491828B (en) Decoding method, memory storage device, and memory control circuit unit
TWI634556B (en) Decoding method, memory storage device and memory control circuit unit
CN109901784B (en) Data access method, memory control circuit unit and memory storage device
CN113140253A (en) Memory management method, memory storage device and memory control circuit unit
CN113724774B (en) Decoding method, memory storage device and memory control circuit unit
CN107146638A (en) Decoding method, memory storage device and memory control circuit unit
CN111580741B (en) Data writing method, memory control circuit unit and memory storage device
TWI668699B (en) Data storing method, memory controlling circuit unit and memory storage device
CN111538687B (en) Memory control method, memory storage device, and memory control circuit unit
CN107305510B (en) Data processing method, memory storage device and memory control circuit unit
CN109697134B (en) Decoding method, memory storage device, and memory control circuit unit
TWI808483B (en) Decoding method, memory storage device and memory control circuit unit
CN117079691A (en) Decoding method, memory storage device and memory control circuit unit
CN112799874B (en) Memory control method, memory storage device and memory control circuit unit
CN111326186B (en) Memory control method, memory storage device and memory control circuit unit
CN110874282B (en) Data access method, memory control circuit unit and memory storage device
CN109509499B (en) Decoding method, memory storage device and memory control circuit unit
CN109710450B (en) Data encoding method, memory control circuit unit, and memory storage device
TWI763310B (en) Memory control method, memory storage device and memory control circuit unit
CN111143253A (en) Data storage method, memory control circuit unit, and memory storage device
CN111258791B (en) Memory control method, memory storage device and memory control circuit unit

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