[go: up one dir, main page]

CN105335299B - Data storage method, memory control circuit unit and memory storage device - Google Patents

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

Info

Publication number
CN105335299B
CN105335299B CN201410394322.9A CN201410394322A CN105335299B CN 105335299 B CN105335299 B CN 105335299B CN 201410394322 A CN201410394322 A CN 201410394322A CN 105335299 B CN105335299 B CN 105335299B
Authority
CN
China
Prior art keywords
physical programming
unit
programming unit
data
physical
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
CN201410394322.9A
Other languages
Chinese (zh)
Other versions
CN105335299A (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 CN201410394322.9A priority Critical patent/CN105335299B/en
Publication of CN105335299A publication Critical patent/CN105335299A/en
Application granted granted Critical
Publication of CN105335299B publication Critical patent/CN105335299B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)
  • Read Only Memory (AREA)

Abstract

本发明提供一种数据存储方法、存储器控制电路单元及存储器存储装置。本方法包括:依据第一数据产生一奇偶信息。本方法还包括:将第一数据程序化至第一实体程序化单元时,将至少一标记程序化至所述第一实体程序化单元之中的冗余比特区。此方法还包括:将所述奇偶信息程序化至排列在所述第一实体程序化单元之后的至少一第二实体程序化单元中,其中上述至少一标记指示所述奇偶信息被程序化至所述至少一第二实体程序化单元中。

The present invention provides a data storage method, a memory control circuit unit and a memory storage device. The method includes: generating parity information according to first data. The method also includes: when programming the first data to a first physical programming unit, programming at least one mark to a redundant bit area in the first physical programming unit. The method also includes: programming the parity information to at least one second physical programming unit arranged after the first physical programming unit, wherein the at least one mark indicates that the parity information is programmed to the at least one second physical programming unit.

Description

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

技术领域technical field

本发明是有关于一种数据存储方法,且特别是有关于一种用于可复写式非易失性存储器的数据存储方法、存储器控制电路单元及存储器存储装置。The present invention relates to a data storage method, and in particular to a data storage method for a rewritable non-volatile memory, a memory control circuit unit and a memory storage device.

背景技术Background technique

数码相机、手机与MP3在这几年来的成长十分迅速,使得消费者对存储媒体的需求也急速增加。由于可复写式非易失性存储器(rewritable non-volatile memory)具有数据非易失性、省电、体积小、无机械结构、读写速度快等特性,因此,近年可复写式非易失性存储器产业成为电子产业中相当热门的一环。例如,以快闪存储器作为存储媒体的固态硬盘(Solid-state drive)已广泛应用作为电脑主机的硬盘,以提升电脑的存取效能。The rapid growth of digital cameras, mobile phones, and MP3 players has led to a rapid increase in consumer demand for storage media. Since rewritable non-volatile memory (rewritable non-volatile memory) has the characteristics of data non-volatility, power saving, small size, no mechanical structure, fast read and write speed, etc., in recent years, rewritable non-volatile memory The memory industry has become a very popular part of the electronics industry. For example, a solid-state drive using flash memory as a storage medium has been widely used as a hard disk of a computer host to improve the access performance of the computer.

由于存储在可复写式非易失性存储器的数据可能会因各种因素(例如,存储器单元的漏电、程序化失败、损毁等)而产生错误比特,因此,在存储器存储系统中一般会配置错误检查与校正电路并为所存储的数据产生错误检查与校正码以确保数据的正确性。然而,当数据中的错误比特数目超过错误检查与校正电路所能检测与校正的错误比特数时,含有错误比特的数据就无法被校正,而造成数据遗失。一般来说,当此情况发生时,可根据存储在可复写式非易失性存储器中对应于所欲校正的数据的奇偶性(Parity)来校正此数据。传统上,由于此些奇偶信息所在的实体程序化单元的数据比特区与冗余比特区中的数据也是通过其他受保护的数据所计算出来的,即,无法通过冗余比特区中的信息得知此些实体程序化单元即是奇偶信息所在的实体程序化单元。因此,传统的方法会将奇偶信息放置在固定的位置上。Because the data stored in the rewritable non-volatile memory may generate error bits due to various factors (such as leakage of memory cells, programming failure, damage, etc.), therefore, configuration errors are generally encountered in memory storage systems. The checking and correcting circuit generates error checking and correcting codes for the stored data to ensure the correctness of the data. However, when the number of erroneous bits in the data exceeds the number of erroneous bits that can be detected and corrected by the ECC circuit, the data containing the erroneous bits cannot be corrected, resulting in data loss. Generally, when this situation occurs, the data can be corrected according to the parity corresponding to the data to be corrected stored in the rewritable non-volatile memory. Traditionally, the data in the data bit area and the redundant bit area of the entity programming unit where the parity information is located is also calculated from other protected data, that is, the information in the redundant bit area cannot be obtained. It is known that these physical programming units are the physical programming units where the parity information is located. Therefore, the traditional method places the parity information in a fixed position.

例如,假设存储器存储系统具有八个存储器晶粒,则使用其中最后一个存储器晶粒来存储奇偶信息。倘若来自主机系统的数据仅需写入一个实体程序化单元时,则必须要将其中间的六个存储器晶粒中相对应的实体程序化单元填上虚构数据(dummy data),以产生欲存放在第八个存储器晶粒中相对应的实体程序化单元中的奇偶信息。也就是说,此种作法将造成存储器存储装置中存储空间的浪费。基此,如何在避免存储器存储装置中存储空间的浪费下增加并提升错误校正的更正能力与效率是此领域技术人员所致力的目标。For example, assuming a memory storage system has eight memory dies, the last memory die among them is used to store parity information. If the data from the host system only needs to be written into one physical programming unit, it is necessary to fill the corresponding physical programming unit in the middle six memory dies with dummy data to generate the data to be stored. Parity information in the corresponding physical programming unit in the eighth memory die. That is to say, this approach will result in a waste of storage space in the memory storage device. Based on this, how to increase and improve the correction capability and efficiency of error correction without wasting the storage space in the memory storage device is the goal that those skilled in the art are working on.

发明内容Contents of the invention

本发明提供一种数据存储方法、存储器控制电路单元及存储器存储装置,其可以有效地避免存储器存储装置中存储空间的浪费并且当无法由错误检查与校正码校正数据的错误比特时,可通过所存储的奇偶信息来更正此数据的错误比特,由此提升错误校正的能力。The present invention provides a data storage method, a memory control circuit unit and a memory storage device, which can effectively avoid the waste of storage space in the memory storage device and when the error bit of the data cannot be corrected by the error checking and correction code, the error bit can be corrected by the error checking and correction code. The stored parity information is used to correct the erroneous bits of this data, thereby improving the ability of error correction.

本发明的一范例实施例提供一种用于可复写式非易失性存储器模块的数据存储方法,所述可复写式非易失性存储器模块包括多个实体抹除单元,且每一实体抹除单元包括多个实体程序化单元,以及其中每一实体程序化单元包括数据比特区与冗余比特区,本数据存储方法包括:依据第一数据产生一奇偶信息;将所述数据程序化至所述实体程序化单元之中的第一实体程序化单元中;以及将所述奇偶信息程序化至所述实体程序化单元之中的至少一第二实体程序化单元中,其中所述至少一第二实体程序化单元是排列在所述第一实体程序化单元之后。在上述将所述数据程序化至所述实体程序化单元之中的所述第一实体程序化单元的步骤包括:将至少一标记程序化至所述第一实体程序化单元之中的冗余比特区,其中所述至少一标记指示所述奇偶信息被程序化至所述至少一第二实体程序化单元中。An exemplary embodiment of the present invention provides a data storage method for a rewritable non-volatile memory module, the rewritable non-volatile memory module includes a plurality of physical erasing units, and each physical erasing The division unit includes a plurality of physical programming units, and each physical programming unit includes a data bit area and a redundant bit area. The data storage method includes: generating a parity information according to the first data; programming the data to In a first physical programming unit among the physical programming units; and programming the parity information into at least one second physical programming unit among the physical programming units, wherein the at least one The second physical programming unit is arranged behind the first physical programming unit. The above step of programming the data into the first physical programming unit among the physical programming units includes: programming at least one tag into a redundancy in the first physical programming unit A bit field, wherein the at least one flag indicates that the parity information is programmed into the at least one second physical programming unit.

在本发明的一实施例中,上述第一数据包括一使用者数据与对应所述使用者数据的一管理信息,其中所述使用者数据被程序化至所述第一实体程序化单元之中的数据比特区,其中对应所述使用者数据的所述管理信息被程序化至所述第一实体程序化单元之中的冗余比特区。In an embodiment of the present invention, the above-mentioned first data includes user data and management information corresponding to the user data, wherein the user data is programmed into the first entity programming unit The data bit area of , wherein the management information corresponding to the user data is programmed into the redundant bit area in the first physical programming unit.

在本发明的一实施例中,上述第一数据包括一使用者数据、对应所述使用者数据的一管理信息以及对应所述使用者数据的一错误检查与校正码。其中所述错误检查与校正码是根据所述使用者数据所产生的。其中所述使用者数据被程序化至所述第一实体程序化单元之中的数据比特区,其中对应所述使用者数据的所述管理信息被程序化至所述第一实体程序化单元之中的冗余比特区,其中对应所述使用者数据的所述错误检查与校正码被程序化至所述第一实体程序化单元之中的冗余比特区。In an embodiment of the present invention, the above-mentioned first data includes user data, management information corresponding to the user data, and an error checking and correction code corresponding to the user data. Wherein the ECC code is generated according to the user data. Wherein the user data is programmed into the data bit area of the first physical programming unit, wherein the management information corresponding to the user data is programmed into the first physical programming unit The redundant bit area in the first physical programming unit, wherein the error checking and correction code corresponding to the user data is programmed into the redundant bit area in the first physical programming unit.

在本发明的一实施例中,上述将所述至少一标记程序化至所述第一实体程序化单元之中的冗余比特区的步骤包括:将第一标记程序化至所述第一实体程序化单元之中的最后一个实体程序化单元的冗余比特区,其中所述至少一第二实体程序化单元是排列在所述第一实体程序化单元之中的所述最后一个实体程序化单元之后,其中所述第一标记指示所述至少一第二实体程序化单元存储所述奇偶信息;以及将第二标记程序化至所述实体程序化单元之中的至少一第三实体程序化单元的冗余比特区,其中所述至少一第三实体程序化单元是排列在所述至少一第二实体程序化单元之后,其中所述第二标记指示所述至少一第二实体程序化单元存储所述奇偶信息。In an embodiment of the present invention, the above-mentioned step of programming the at least one flag into the redundant bit area in the programming unit of the first entity includes: programming the first flag into the first entity The redundant bit area of the last physical programming unit among the programming units, wherein the at least one second physical programming unit is the last physical programming unit arranged among the first physical programming units After the unit, wherein the first flag instructs the at least one second physical programming unit to store the parity information; and programming the second flag to at least one third physical programming unit in the physical programming unit A redundant bit area of a unit, wherein the at least one third physical programming unit is arranged after the at least one second physical programming unit, wherein the second flag indicates the at least one second physical programming unit The parity information is stored.

在本发明的一实施例中,上述将所述至少一标记程序化至所述第一实体程序化单元之中的冗余比特区的步骤还包括:建立一奇偶信息地址对应表;以及将一第三标记记录在所述奇偶信息地址对应表,其中所述第三标记指示所述至少一第二实体程序化单元存储所述奇偶信息。In an embodiment of the present invention, the step of programming the at least one flag into the redundant bit area in the first physical programming unit further includes: establishing a parity information address correspondence table; and adding a A third flag is recorded in the parity information address correspondence table, wherein the third flag instructs the at least one second physical programming unit to store the parity information.

在本发明的一实施例中,上述将所述至少一标记程序化至所述第一实体程序化单元之中的冗余比特区的步骤包括:计数所述第一实体程序化单元的个数;以及根据所述第一实体程序化单元的个数,在每一所述第一实体程序化单元的冗余比特区中记录一标记值,其中记录在所述第一实体程序化单元中的所述标记值依据所述第一实体程序化单元的排列依序地递减。In an embodiment of the present invention, the step of programming the at least one flag into the redundant bit area in the first physical programming unit includes: counting the number of the first physical programming unit ; and according to the number of the first physical programming unit, record a flag value in the redundant bit area of each of the first physical programming unit, wherein the value recorded in the first physical programming unit The tag value is sequentially decremented according to the arrangement of the first physical programming unit.

在本发明的一实施例中,上述标记值之中的第一标记值为1,且所述第一标记值被记录在所述第一实体程序化单元之中的最后一个实体程序化单元的冗余比特区中,且所述至少一第二实体程序化单元是排列在所述第一实体程序化单元之中的所述最后一个实体程序化单元之后,其中所述标记值之中的第二标记值为2,且所述第二标记值被记录在所述第一实体程序化单元之中相邻且排列在所述最后一个实体程序化单元之前的实体程序化单元的冗余比特区中,其中所述标记值之中的第三标记值为3,且所述第三标记值被记录在所述第一实体程序化单元之中相邻且排列在记录所述第二标记值的实体程序化单元之前的实体程序化单元的冗余比特区中。In an embodiment of the present invention, the first flag value among the above flag values is 1, and the first flag value is recorded in the last entity programming unit among the first entity programming units In the redundant bit area, and the at least one second physical programming unit is arranged after the last physical programming unit among the first physical programming units, wherein the first physical programming unit among the tag values The second flag value is 2, and the second flag value is recorded in the redundant bit area of the physical programming unit adjacent to the first physical programming unit and arranged before the last physical programming unit , wherein the third tag value among the tag values is 3, and the third tag value is recorded adjacent to and arranged in the first entity programming unit where the second tag value is recorded In the redundant bit area of the physical programming unit before the physical programming unit.

在本发明的一实施例中,上述第一数据包括一第二数据以及一错误检查与校正码,并且上述数据存储方法,还包括:当无法通过使用所述错误检查与校正码来校正所述第二数据时,根据所述至少一标记获得记录所述奇偶信息的所述至少一第二实体程序化单元的地址,从所述至少一第二实体程序化单元中读取所述奇偶信息以及依据所读取的所述奇偶信息来校正所述第二数据。In an embodiment of the present invention, the above-mentioned first data includes a second data and an error checking and correction code, and the above data storage method further includes: when the error checking and correction code cannot be used to correct the For the second data, obtain the address of the at least one second physical programming unit that records the parity information according to the at least one mark, read the parity information from the at least one second physical programming unit and Correcting the second data according to the read parity information.

本发明的一范例实施例提供一种用于可复写式非易失性存储器模块的数据存储方法,所述可复写式非易失性存储器模块包括多个实体抹除单元,且每一实体抹除单元包括多个实体程序化单元,以及其中每一实体程序化单元包括数据比特区与冗余比特区,本数据存储方法包括:建立一奇偶信息地址对应表;依据第一数据产生一奇偶信息;将所述数据程序化至所述实体程序化单元之中的第一实体程序化单元中;将所述奇偶信息程序化至所述实体程序化单元之中的至少一第二实体程序化单元中,以及将至少一标记记录在所述奇偶信息地址对应表,其中所述标记指示所述奇偶信息被程序化至所述至少一第二实体程序化单元中。An exemplary embodiment of the present invention provides a data storage method for a rewritable non-volatile memory module, the rewritable non-volatile memory module includes a plurality of physical erasing units, and each physical erasing The division unit includes a plurality of physical programming units, and each physical programming unit includes a data bit area and a redundant bit area. The data storage method includes: establishing a parity information address correspondence table; generating a parity information according to the first data ; programming the data into a first physical programming unit among the physical programming units; programming the parity information into at least one second physical programming unit among the physical programming units , and record at least one mark in the parity information address correspondence table, wherein the mark indicates that the parity information is programmed into the at least one second physical programming unit.

本发明的一范例实施例提出一种用于控制可复写式非易失性存储器模块的存储器控制电路单元,其中所述可复写式非易失性存储器模块包括多个实体抹除单元,且每一实体抹除单元包括多个实体程序化单元,以及其中每一实体程序化单元包括数据比特区与冗余比特区。此存储器控制电路单元包括主机接口、存储器接口与存储器管理电路。主机接口用以耦接至主机系统,存储器接口用以耦接至可复写式非易失性存储器模块,以及存储器管理电路耦接至主机接口与存储器接口。存储器管理电路用以依据第一数据产生一奇偶信息并且将所述第一数据程序化至所述实体程序化单元之中的第一实体程序化单元中,其中所述存储器管理电路还用以将所述奇偶信息程序化至所述实体程序化单元之中的至少一第二实体程序化单元中,其中所述至少一第二实体程序化单元是排列在所述第一实体程序化单元之后。在上述将所述数据程序化至所述实体程序化单元之中的所述第一实体程序化单元的操作中,存储器管理电路将至少一标记程序化至所述第一实体程序化单元之中的冗余比特区,其中所述至少一标记指示所述奇偶信息被程序化至所述至少一第二实体程序化单元中。An 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 erasing units, and each A physical erasing unit includes a plurality of physical programming units, and each physical programming unit includes a data bit area and a redundant bit area. The memory control circuit unit includes a host interface, a memory interface and a memory management circuit. The host interface is used for coupling to the host system, the memory interface is used for coupling to the rewritable non-volatile memory module, and the memory management circuit is coupled to the host interface and the memory interface. The memory management circuit is used for generating parity information according to the first data and programming the first data into the first physical programming unit among the physical programming units, wherein the memory management circuit is also used for The parity information is programmed into at least one second physical programming unit among the physical programming units, wherein the at least one second physical programming unit is arranged after the first physical programming unit. In the above operation of programming the data into the first physical programming unit among the physical programming units, the memory management circuit programs at least one flag into the first physical programming unit , wherein the at least one flag indicates that the parity information is programmed into the at least one second physical programming unit.

在本发明的一实施例中,上述第一数据包括一使用者数据与对应所述使用者数据的一管理信息,其中所述使用者数据被程序化至所述第一实体程序化单元之中的数据比特区,其中对应所述使用者数据的所述管理信息被程序化至所述第一实体程序化单元之中的冗余比特区。In an embodiment of the present invention, the above-mentioned first data includes user data and management information corresponding to the user data, wherein the user data is programmed into the first entity programming unit The data bit area of , wherein the management information corresponding to the user data is programmed into the redundant bit area in the first physical programming unit.

在本发明的一实施例中,上述第一数据包括一使用者数据、对应所述使用者数据的一管理信息以及对应所述使用者数据的一错误检查与校正码。其中所述错误检查与校正码是根据所述使用者数据所产生的。其中所述使用者数据被程序化至所述第一实体程序化单元之中的数据比特区,其中对应所述使用者数据的所述管理信息被程序化至所述第一实体程序化单元之中的冗余比特区,其中对应所述使用者数据的所述错误检查与校正码被程序化至所述第一实体程序化单元之中的冗余比特区。In an embodiment of the present invention, the above-mentioned first data includes user data, management information corresponding to the user data, and an error checking and correction code corresponding to the user data. Wherein the ECC code is generated according to the user data. Wherein the user data is programmed into the data bit area of the first physical programming unit, wherein the management information corresponding to the user data is programmed into the first physical programming unit The redundant bit area in the first physical programming unit, wherein the error checking and correction code corresponding to the user data is programmed into the redundant bit area in the first physical programming unit.

在本发明的一实施例中,上述将所述至少一标记程序化至所述第一实体程序化单元之中的冗余比特区的操作中,存储器管理电路将第一标记程序化至所述第一实体程序化单元之中的最后一个实体程序化单元的冗余比特区,其中所述至少一第二实体程序化单元是排列在所述第一实体程序化单元之中的所述最后一个实体程序化单元之后,其中所述第一标记指示所述至少一第二实体程序化单元存储所述奇偶信息,其中存储器管理电路还用以将第二标记程序化至所述实体程序化单元之中的至少一第三实体程序化单元的冗余比特区,其中所述第三实体程序化单元是排列在所述至少一第二实体程序化单元之后,并且所述第二标记指示所述至少一第二实体程序化单元存储所述奇偶信息。In an embodiment of the present invention, in the above-mentioned operation of programming the at least one flag into the redundant bit area in the first physical programming unit, the memory management circuit programs the first flag into the The redundant bit area of the last physical programming unit among the first physical programming units, wherein the at least one second physical programming unit is the last physical programming unit arranged among the first physical programming units After the physical programming unit, wherein the first flag instructs the at least one second physical programming unit to store the parity information, wherein the memory management circuit is also used to program the second flag to the physical programming unit A redundant bit area of at least one third physical programming unit, wherein the third physical programming unit is arranged after the at least one second physical programming unit, and the second flag indicates that the at least A second physical programming unit stores the parity information.

本发明的一范例实施例提出一种存储器存储装置,其包括连接接口单元、可复写式非易失性存储器模块与存储器控制电路单元。连接接口单元用以耦接至主机系统。可复写式非易失性存储器模块包括多个实体抹除单元,且每一实体抹除单元包括多个实体程序化单元,其中每一实体程序化单元包括数据比特区与冗余比特区。存储器控制电路单元耦接至连接接口单元与可复写式非易失性存储器模块,并且用以依据第一数据产生一奇偶信息,并且将所述第一数据程序化至所述实体程序化单元之中的一第一实体程序化单元中。此外,存储器控制电路单元还用以将所述奇偶信息程序化至所述实体程序化单元之中的至少一第二实体程序化单元中,其中所述至少一第二实体程序化单元是排列在所述第一实体程序化单元之后。在上述将所述第一数据程序化至所述实体程序化单元之中的所述第一实体程序化单元的操作中,存储器控制电路单元将至少一标记程序化至所述第一实体程序化单元之中的冗余比特区,其中所述至少一标记指示所述奇偶信息被程序化至所述至少一第二实体程序化单元中。An 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 coupling to the host system. The rewritable non-volatile memory module includes a plurality of physical erasing units, and each physical erasing unit includes a plurality of physical programming units, wherein each physical programming unit includes a data bit area and a redundant bit area. The memory control circuit unit is coupled to the connection interface unit and the rewritable non-volatile memory module, and is used for generating parity information according to the first data, and programming the first data to the physical programming unit In a first entity programming unit in . In addition, the memory control circuit unit is also used to program the parity information into at least one second physical programming unit among the physical programming units, wherein the at least one second physical programming unit is arranged in The first entity is programmed after the unit. In the above operation of programming the first data into the first physical programming unit among the physical programming units, the memory control circuit unit programs at least one flag into the first physical programming unit A redundant bit field in a unit, wherein the at least one flag indicates that the parity information is programmed into the at least one second physical programming unit.

在本发明的一实施例中,上述第一数据包括一使用者数据与对应所述使用者数据的一管理信息,其中所述使用者数据被程序化至所述第一实体程序化单元之中的数据比特区,其中对应所述使用者数据的所述管理信息被程序化至所述第一实体程序化单元之中的冗余比特区。In an embodiment of the present invention, the above-mentioned first data includes user data and management information corresponding to the user data, wherein the user data is programmed into the first entity programming unit The data bit area of , wherein the management information corresponding to the user data is programmed into the redundant bit area in the first physical programming unit.

在本发明的一实施例中,上述第一数据包括一使用者数据、对应所述使用者数据的一管理信息以及对应所述使用者数据的一错误检查与校正码。其中所述错误检查与校正码是根据所述使用者数据所产生的。其中所述使用者数据被程序化至所述第一实体程序化单元之中的数据比特区,其中对应所述使用者数据的所述管理信息被程序化至所述第一实体程序化单元之中的冗余比特区,其中对应所述使用者数据的所述错误检查与校正码被程序化至所述第一实体程序化单元之中的冗余比特区。In an embodiment of the present invention, the above-mentioned first data includes user data, management information corresponding to the user data, and an error checking and correction code corresponding to the user data. Wherein the ECC code is generated according to the user data. Wherein the user data is programmed into the data bit area of the first physical programming unit, wherein the management information corresponding to the user data is programmed into the first physical programming unit The redundant bit area in the first physical programming unit, wherein the error checking and correction code corresponding to the user data is programmed into the redundant bit area in the first physical programming unit.

在本发明的一实施例中,上述将所述至少一标记程序化至所述第一实体程序化单元之中的冗余比特区的操作中,存储器控制电路单元将一第一标记程序化至所述第一实体程序化单元之中的最后一个实体程序化单元的冗余比特区,其中所述至少一第二实体程序化单元是排列在所述第一实体程序化单元之中的所述最后一个实体程序化单元之后,其中所述第一标记指示所述至少一第二实体程序化单元存储所述奇偶信息,其中存储器控制电路单元还用以将第二标记程序化至所述实体程序化单元之中的至少一第三实体程序化单元的冗余比特区,其中所述至少一第三实体程序化单元是排列在所述至少一第二实体程序化单元之后,并且所述第二标记指示所述至少一第二实体程序化单元存储所述奇偶信息。In an embodiment of the present invention, in the above-mentioned operation of programming the at least one flag into the redundant bit area in the first physical programming unit, the memory control circuit unit programs a first flag into The redundant bit area of the last physical programming unit among the first physical programming units, wherein the at least one second physical programming unit is the After the last physical programming unit, wherein the first flag instructs the at least one second physical programming unit to store the parity information, wherein the memory control circuit unit is also used to program the second flag to the physical program The redundant bit area of at least one third physical programming unit among the programming units, wherein the at least one third physical programming unit is arranged after the at least one second physical programming unit, and the second The flag instructs the at least one second physical programming unit to store the parity information.

在本发明的一实施例中,上述将所述至少一标记程序化至所述第一实体程序化单元之中的冗余比特区的操作中,存储器控制电路单元建立一奇偶信息地址对应表并且将第三标记记录在所述奇偶信息地址对应表,其中所述第三标记指示所述至少一第二实体程序化单元存储所述奇偶信息。In an embodiment of the present invention, in the above-mentioned operation of programming the at least one flag into the redundant bit area in the first physical programming unit, the memory control circuit unit establishes a parity information address correspondence table and Recording a third mark in the parity information address correspondence table, wherein the third mark instructs the at least one second entity programming unit to store the parity information.

在本发明的一实施例中,上述将所述至少一标记程序化至所述第一实体程序化单元之中的冗余比特区的操作中,存储器控制电路单元计数所述第一实体程序化单元的个数,并且根据所述第一实体程序化单元的个数,在每一第一实体程序化单元的冗余比特区中记录一标记值,其中记录在所述第一实体程序化单元中的所述标记值依据所述第一实体程序化单元的排列依序地递减。In an embodiment of the present invention, in the above-mentioned operation of programming the at least one flag into the redundant bit area in the first physical programming unit, the memory control circuit unit counts the first physical programming The number of units, and according to the number of the first physical programming unit, record a flag value in the redundant bit area of each first physical programming unit, wherein the value recorded in the first physical programming unit The tag values in are sequentially decremented according to the arrangement of the first entity programming unit.

在本发明的一实施例中,上述标记值之中的第一标记值为1,且所述第一标记值被记录在所述第一实体程序化单元之中的最后一个实体程序化单元的冗余比特区中,且所述至少一第二实体程序化单元是排列在所述第一实体程序化单元之中的所述最后一个实体程序化单元之后。其中标记值之中的第二标记值为2,且所述第二标记值被记录在所述第一实体程序化单元之中相邻且排列在所述最后一个实体程序化单元之前的实体程序化单元的冗余比特区中。其中所述标记值之中的第三标记值为3,且所述第三标记值被记录在所述第一实体程序化单元之中相邻且排列在记录所述第二标记值的实体程序化单元之前的实体程序化单元的冗余比特区中。In an embodiment of the present invention, the first flag value among the above flag values is 1, and the first flag value is recorded in the last entity programming unit among the first entity programming units In the redundant bit area, the at least one second physical programming unit is arranged after the last physical programming unit among the first physical programming units. Among the tag values, the second tag value is 2, and the second tag value is recorded in the entity program adjacent to the first entity programming unit and arranged before the last entity programming unit in the redundant bit area of the unit. Wherein the third tag value among the tag values is 3, and the third tag value is recorded in the first entity programming unit adjacent and arranged in the entity program recording the second tag value In the redundant bit area of the physical programming unit before the programming unit.

在本发明的一实施例中,上述第一数据包括一第二数据以及一错误检查与校正码,当无法通过使用所述错误检查与校正码来校正所述第二数据时,存储器控制电路单元还用以根据所述至少一标记获得记录所述奇偶信息的所述至少一第二实体程序化单元的地址,从所述至少一第二实体程序化单元中读取所述奇偶信息以及依据所读取的所述奇偶信息来校正所述第二数据。In an embodiment of the present invention, the above-mentioned first data includes a second data and an error checking and correcting code, and when the second data cannot be corrected by using the error checking and correcting code, the memory control circuit unit It is also used to obtain the address of the at least one second physical programming unit that records the parity information according to the at least one mark, read the parity information from the at least one second physical programming unit and according to the The read parity information is used to correct the second data.

基于上述,当从可复写式非易失性存储器模块中读取的数据比特存在错误时,本发明的一范例实施例可以根据记录在实体程序化单元中的至少一标记,快速地获得奇偶信息所在的实体程序化单元地址。据此,本发明范例实施例提出的数据存储方法、存储器控制电路单元与存储器存储装置可有效地增加错误校正的更正能力与效率。Based on the above, when there is an error in the data bits read from the rewritable non-volatile memory module, an exemplary embodiment of the present invention can quickly obtain parity information according to at least one mark recorded in the physical programming unit The entity programmatic unit address where it is located. Accordingly, the data storage method, the memory control circuit unit and the memory storage device proposed by the exemplary embodiments of the present invention can effectively increase the correction capability and efficiency of error correction.

为让本发明的上述特征和优点能更明显易懂,下文特举实施例,并配合附图作详细说明如下。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

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

图1B是根据本发明的第一范例实施例所示出的电脑、输入/输出装置与存储器存储装置的示意图;1B is a schematic diagram of a computer, an input/output device and a memory storage device according to a first exemplary embodiment of the present invention;

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

图2是示出图1A所示的存储器存储装置的概要方块图;FIG. 2 is a schematic block diagram illustrating the memory storage device shown in FIG. 1A;

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

图4A与图4B是根据第一范例实施例所示出的管理实体抹除单元的范例示意图;FIG. 4A and FIG. 4B are exemplary schematic diagrams of a management entity erasing unit shown according to the first exemplary embodiment;

图5A至图5B是根据本发明第一范例实施例所示出的将写入数据、对应于写入数据的错误检查与校正码以及用以记录奇偶信息的至少一标记写入至实体程序化单元的范例示意图;5A to FIG. 5B show writing data, error checking and correction codes corresponding to the writing data, and at least one mark for recording parity information into the physical programming device according to the first exemplary embodiment of the present invention. An example schematic diagram of the unit;

图6是根据本发明第一范例实施例所示出的将写入数据、对应于写入数据的错误检查与校正码以及用以记录奇偶信息的至少一标记写入至实体程序化单元的另一个范例示意图;6 is another example of writing write data, error checking and correction codes corresponding to the write data, and at least one mark for recording parity information into the physical programming unit according to the first exemplary embodiment of the present invention. An example schematic diagram;

图7是根据本发明的第一范例实施例所示出的数据存储方法的流程图;FIG. 7 is a flowchart of a data storage method according to a first exemplary embodiment of the present invention;

图8A至图8B是根据本发明第二范例实施例所示出的将写入数据、对应于写入数据的错误检查与校正码以及用以记录奇偶信息的至少一标记写入至实体程序化单元的范例示意图;8A to FIG. 8B show writing data, error checking and correction codes corresponding to the writing data, and at least one mark for recording parity information into the physical programming device according to the second exemplary embodiment of the present invention. An example schematic diagram of the unit;

图9是根据本发明第三范例实施例所示出的根据写入数据欲写入的每一实体程序化单元的个数将其排列与记录标记值的范例示意图;FIG. 9 is a schematic diagram showing an example of arranging and recording tag values according to the number of each physical programming unit to be written into data according to the third exemplary embodiment of the present invention;

图10是根据本发明第三范例实施例所示出的将写入数据、对应于写入数据的错误检查与校正码与用以记录奇偶信息的至少一标记写入至实体程序化单元的另一范例示意图;FIG. 10 shows another method for writing write data, error checking and correction codes corresponding to the write data, and at least one mark for recording parity information into the physical programming unit according to the third exemplary embodiment of the present invention. A schematic diagram of an example;

图11是根据本发明第四范例实施例所示出的将写入数据、对应于写入数据的错误检查与校正码程序化至实体程序化单元以及将用以记录奇偶信息的至少一标记记录在奇偶信息地址对应表的范例示意图;FIG. 11 shows programming of write data, error checking and correction codes corresponding to the write data to the physical programming unit, and recording at least one mark for recording parity information according to a fourth exemplary embodiment of the present invention. An example schematic diagram of the parity information address correspondence table;

图12是根据本发明的第四范例实施例所示出的数据存储方法的流程图。Fig. 12 is a flowchart of a data storage method according to a fourth exemplary embodiment of the present invention.

附图标记说明:Explanation of reference signs:

1000:主机系统;1000: host system;

1100:电脑;1100: computer;

1102:微处理器;1102: microprocessor;

1104:随机存取存储器(RAM);1104: random access memory (RAM);

1106:输入/输出装置;1106: input/output device;

1108:系统总线;1108: system bus;

1110:数据传输接口;1110: data transmission interface;

1202:鼠标;1202: mouse;

1204:键盘;1204: keyboard;

1206:显示器;1206: display;

1208:打印机;1208: printer;

1212:优盘;1212: U disk;

1214:存储卡;1214: memory card;

1216:固态硬盘;1216: SSD;

1310:数码相机;1310: digital camera;

1312:SD卡;1312: SD card;

1314:MMC卡;1314: MMC card;

1316:存储棒;1316: memory stick;

1318:CF卡;1318: CF card;

1320:嵌入式存储装置;1320: embedded storage device;

100:存储器存储装置;100: memory storage device;

102:连接接口单元;102: connect the interface unit;

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

106:可复写式非易失性存储器模块;106: a rewritable non-volatile memory module;

410(0)~410(N):实体抹除单元;410(0)~410(N): Entity erasing unit;

202:存储器管理电路;202: memory management circuit;

204:主机接口;204: host interface;

206:存储器接口;206: memory interface;

208:缓冲存储器;208: buffer memory;

210:电源管理电路;210: power management circuit;

212:错误检查与校正电路;212: error checking and correction circuit;

502:数据区;502: data area;

504:闲置区;504: idle area;

506:系统区;506: system area;

508:取代区;508: Replacement area;

510(0)~510(D):逻辑地址;510(0)~510(D): logical address;

520:数据比特区;520: data bit area;

540:冗余比特区;540: redundant bit area;

542:第一记录区;542: the first recording area;

544:第二记录区;544: the second recording area;

800、110:奇偶信息地址对应表;800, 110: parity information address correspondence table;

602、702、802:第一实体程序化单元;602, 702, 802: the first entity programming unit;

604、704、804:第二实体程序化单元;604, 704, 804: the second entity programming unit;

606、706、806:第三实体程序化单元;606, 706, 806: third entity programming unit;

808:第四实体程序化单元;808: The fourth entity programming unit;

810:第五实体程序化单元;810: The fifth entity programming unit;

812:第六实体程序化单元;812: The sixth entity programming unit;

900:排序;900: sort;

D1、D1-1~D1-4:第一使用者数据;D1, D1-1~D1-4: first user data;

D2、D2-1、D2-2:第二使用者数据;D2, D2-1, D2-2: second user data;

D3、D3-1、D3-2:第三使用者数据;D3, D3-1, D3-2: third user data;

S1、S1-1~S1-4:第一使用者数据的管理信息;S1, S1-1~S1-4: management information of the first user data;

S2、S2-1、S2-2:第二使用者数据的管理信息;S2, S2-1, S2-2: management information of the second user data;

S3-1、S3-2:第三使用者数据的管理信息;S3-1, S3-2: management information of third user data;

M1:第一标记;M1: first mark;

M2:第二标记;M2: second mark;

M3:第三标记;M3: third mark;

ECC1-1~ECC1-4、ECC2、ECC2-1、ECC2-2、ECC3-1、ECC3-2:错误检查与校正码;ECC1-1~ECC1-4, ECC2, ECC2-1, ECC2-2, ECC3-1, ECC3-2: error checking and correction codes;

P:奇偶信息;P: parity information;

P1:第一奇偶信息;P1: first parity information;

P2:第二奇偶信息;P2: second parity information;

P3:第三奇偶信息;P3: third parity information;

S701、S703、S705、S707、S1201、S1203、S1205、S1207、S1209:数据存储方法的步骤。S701, S703, S705, S707, S1201, S1203, S1205, S1207, S1209: steps of the data storage method.

具体实施方式Detailed ways

[第一范例实施例][First Exemplary Embodiment]

一般而言,存储器存储装置(也称,存储器存储系统)包括可复写式非易失性存储器模块与控制器(也称,控制电路)。通常存储器存储装置是与主机系统一起使用,以使主机系统可将数据写入至存储器存储装置或从存储器存储装置中读取数据。Generally speaking, a memory storage device (also called a memory storage system) includes a 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.

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

请参照图1A,主机系统1000一般包括电脑1100与输入/输出(input/output,简称I/O)装置1106。电脑1100包括微处理器1102、随机存取存储器(random access memory,简称RAM)1104、系统总线1108与数据传输接口1110。输入/输出装置1106包括如图1B的鼠标1202、键盘1204、显示器1206与打印机1208。必须了解的是,图1B所示的装置非限制输入/输出装置1106,输入/输出装置1106可还包括其他装置。Referring to FIG. 1A , the host system 1000 generally includes a computer 1100 and an input/output (input/output, I/O for short) device 1106 . The computer 1100 includes a microprocessor 1102 , a random access memory (random access memory, RAM for short) 1104 , a system bus 1108 and a data transmission interface 1110 . The input/output device 1106 includes a mouse 1202, a keyboard 1204, a monitor 1206 and a printer 1208 as shown in FIG. 1B. It must be understood that the device shown in FIG. 1B is not limited to the I/O device 1106, and the I/O device 1106 may also include other devices.

在本发明实施例中,存储器存储装置100是通过数据传输接口1110与主机系统1000的其他元件电性连接。通过微处理器1102、随机存取存储器1104与输入/输出装置1106的运作可将数据写入至存储器存储装置100或从存储器存储装置100中读取数据。例如,存储器存储装置100可以是如图1B所示的优盘1212、存储卡1214或固态硬盘(Solid StateDrive,简称SSD)1216等的可复写式非易失性存储器存储装置。In the embodiment of the present invention, the memory storage device 100 is electrically connected with other components of the host system 1000 through the data transmission interface 1110 . Data can be written into or read from the memory storage device 100 through the operation of the microprocessor 1102 , the random access memory 1104 and the input/output device 1106 . For example, the memory storage device 100 may be a rewritable non-volatile memory storage device such as a USB flash drive 1212, a memory card 1214, or a solid state drive (Solid State Drive, SSD for short) 1216 as shown in FIG. 1B.

一般而言,主机系统1000为可实质地与存储器存储装置100配合以存储数据的任意系统。虽然在本范例实施例中,主机系统1000是以电脑系统来做说明,然而,在本发明另一范例实施例中主机系统1000可以是数码相机、摄影机、通信装置、音频播放器或视频播放器等系统。例如,在主机系统为图1C中的数码相机(摄影机)1310时,可复写式非易失性存储器存储装置则为其所使用的SD卡1312、MMC卡1314、存储棒(memory stick)1316、CF卡1318或嵌入式存储装置1320(如图1C所示)。嵌入式存储装置1320包括嵌入式多媒体卡(Embedded MMC,简称eMMC)。值得一提的是,嵌入式多媒体卡是直接电性连接在主机系统的基板上。In general, host system 1000 is any system that can cooperate substantially with memory storage device 100 to store data. Although in this exemplary embodiment, the host system 1000 is described as a computer system, however, in another exemplary embodiment of the present invention, the host system 1000 may be a digital camera, video camera, communication device, audio player or video player and other systems. For example, when the host computer system is the digital camera (video camera) 1310 in FIG. CF card 1318 or embedded storage device 1320 (as shown in FIG. 1C ). The embedded storage device 1320 includes an embedded multimedia card (Embedded MMC, eMMC for short). It is worth mentioning that the embedded multimedia card is directly electrically connected to the substrate of the host system.

图2是示出图1A所示的存储器存储装置的概要方块图。FIG. 2 is a schematic block diagram showing the memory storage device shown in FIG. 1A.

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

在本范例实施例中,连接接口单元102是符合串行高级技术附件(SerialAdvanced Technology Attachment,简称SATA)标准。然而,必须了解的是,本发明不限于此,连接接口单元102也可以是符合平行高级技术附件(Parallel Advanced TechnologyAttachment,简称PATA)标准、电气和电子工程师协会(Institute of Electrical andElectronic Engineers,简称IEEE)1394标准、高速外围组件互连接口(PeripheralComponent Interconnect Express,简称PCI Express)标准、通用串行总线(UniversalSerial Bus,简称USB)标准、超高速一代(Ultra High Speed-I,简称UHS-I)接口标准、超高速二代(Ultra High Speed-II,简称UHS-II)接口标准、安全数位(Secure Digital,简称SD)接口标准、存储棒(Memory Stick,简称MS)接口标准、多媒体存储卡(Multi MediaCard,简称MMC)接口标准、小型快闪(Compact Flash,简称CF)接口标准、电子集成驱动器接口(Integrated Device Electronics,简称IDE)标准或其他适合的标准。在本范例实施例中,连接器可与存储器控制电路单元封装在一个芯片中,或布设在一包含存储器控制电路单元的芯片外。In this exemplary embodiment, the connection interface unit 102 complies 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 102 may also be in compliance with the Parallel Advanced Technology Attachment (PATA for short) standard, the Institute of Electrical and Electronic Engineers (Institute of Electrical and Electronic Engineers, IEEE for short) 1394 standard, Peripheral Component Interconnect Express (PCI Express for short) standard, Universal Serial Bus (USB for short) standard, Ultra High Speed-I (UHS-I for short) interface standard , Ultra High Speed-II (UHS-II for short) interface standard, Secure Digital (SD for short) interface standard, Memory Stick (MS for short) interface standard, Multi Media Card (Multi MediaCard for short) interface standard , MMC for short) interface standard, Compact Flash (CF for short) interface standard, Integrated Device Electronics (IDE for short) standard, or other suitable standards. In this exemplary embodiment, the connector can be packaged with the memory control circuit unit in a chip, or arranged outside a chip including the memory control circuit unit.

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

可复写式非易失性存储器模块106是耦接至存储器控制电路单元104,并且用以存储主机系统1000所写入的数据。可复写式非易失性存储器模块106具有实体抹除单元410(0)~410(R)。例如,实体抹除单元410(0)~410(R)可属于同一个存储器晶粒(die)或者属于不同的存储器晶粒。每一实体抹除单元分别具有复数个实体程序化单元,其中属于同一个实体抹除单元的实体程序化单元可被独立地写入且被同时地抹除。此外,每一实体抹除单元可由64个实体程序化单元、256个实体程序化单元或其他任意个实体程序化单元所组成。The rewritable non-volatile memory module 106 is coupled to the memory control circuit unit 104 and used for storing data written by the host system 1000 . The rewritable non-volatile memory module 106 has physical erasing units 410(0)˜410(R). For example, the physical erasing units 410(0)˜410(R) may belong to the same memory die or belong to different memory dies. Each physical erasing unit has a plurality of physical programming units, wherein the physical programming units belonging to the same physical erasing unit can be written independently and erased simultaneously. In addition, each physical erasing unit can be composed of 64 physical programming units, 256 physical programming units, or any other number of physical programming units.

更详细来说,实体抹除单元为抹除的最小单位。即,每一实体抹除单元含有最小数目的一并被抹除的存储单元。实体程序化单元为程序化的最小单元。即,实体程序化单元为写入数据的最小单元。每一实体程序化单元通常包括数据比特区与冗余比特区。数据比特区包含多个实体存取地址用以存储使用者的数据,而冗余比特区用以存储系统的数据(例如,控制信息与错误更正码)。在本范例实施例中,每一个实体程序化单元的数据比特区中会包含4个实体存取地址,且一个实体存取地址的大小为512字节(byte)。然而,在其他范例实施例中,数据比特区中也可包含数目更多或更少的实体存取地址,本发明并不限制实体存取地址的大小以及个数。例如,在一范例实施例中,实体抹除单元为实体抹除单元,并且实体程序化单元为实体程序化单元或实体扇区,但本发明不以此为限。In more detail, the entity erasing unit is the smallest unit of erasing. That is, each physical erase unit contains the minimum number of memory cells to be erased together. Entity programming unit is the smallest unit of programming. That is, the entity programming unit is the smallest unit for writing data. Each physical programming unit generally includes a data bit area and a redundant bit area. The data bit area contains a plurality of physical access addresses for storing user data, and the redundant bit area is used for storing system data (eg, control information and error correction code). In this exemplary embodiment, the data bit area of each physical programming unit includes 4 physical access addresses, and the size of one physical access address is 512 bytes. However, in other exemplary embodiments, the data bit area may also include more or less physical access addresses, and the present invention does not limit the size and number of physical access addresses. For example, in an exemplary embodiment, the physical erasing unit is a physical erasing unit, and the physical programming unit is a physical programming unit or a physical sector, but the invention is not limited thereto.

在本范例实施例中,可复写式非易失性存储器模块106为多层单元(Multi LevelCell,简称MLC)NAND型快闪存储器模块(即,一个存储单元中可存储2个比特数据的快闪存储器模块)。然而,本发明不限于此,可复写式非易失性存储器模块106也可是单层单元(Single Level Cell,简称SLC)NAND型快闪存储器模块(即,一个存储单元中可存储1个比特数据的快闪存储器模块)、三层单元(Trinary Level Cell,简称TLC)NAND型快闪存储器模块(即,一个存储单元中可存储3个比特数据的快闪存储器模块)、其他快闪存储器模块或其他具有相同特性的存储器模块。In this exemplary embodiment, the rewritable non-volatile memory module 106 is a multi-level cell (Multi LevelCell, MLC for short) NAND flash memory module (that is, a flash memory that can store 2 bits of data in a storage unit) memory module). However, the present invention is not limited thereto, and the rewritable non-volatile memory module 106 may also be a single-level cell (Single Level Cell, SLC for short) NAND flash memory module (that is, one bit of data can be stored in one storage unit). flash memory module), triple-level cell (Trinary Level Cell, TLC for short) NAND flash memory module (that is, a flash memory module that can store 3 bits of data in a storage unit), other flash memory modules or Other memory modules with the same characteristics.

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

请参照图3与图2,存储器控制电路单元104包括存储器管理电路202、主机接口204与存储器接口206。Referring to FIG. 3 and FIG. 2 , the memory control circuit unit 104 includes a memory management circuit 202 , a host interface 204 and a memory interface 206 .

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

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

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

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

存储器接口206是耦接至存储器管理电路202并且用以存取可复写式非易失性存储器模块106。也就是说,欲写入至可复写式非易失性存储器模块106的数据会经由存储器接口206转换为可复写式非易失性存储器模块106所能接受的格式。The memory interface 206 is coupled to the memory management circuit 202 and used for accessing the rewritable non-volatile memory module 106 . That is to say, the data to be written into the rewritable nonvolatile memory module 106 will be converted into a format acceptable to the rewritable nonvolatile memory module 106 via the memory interface 206 .

在本发明一范例实施例中,存储器控制电路单元104还包括缓冲存储器208、电源管理电路210与错误检查与校正电路212。In an exemplary embodiment of the present invention, the memory control circuit unit 104 further includes a buffer memory 208 , a power management circuit 210 and an error checking and correction circuit 212 .

缓冲存储器208是耦接至存储器管理电路202并且用以寄存来自于主机系统1000的数据与指令或来自于可复写式非易失性存储器模块106的数据。The buffer memory 208 is coupled to the memory management circuit 202 and used for storing data and instructions from the host system 1000 or data from the rewritable non-volatile memory module 106 .

电源管理电路210是耦接至存储器管理电路202并且用以控制存储器存储装置100的电源。The power management circuit 210 is coupled to the memory management circuit 202 and used for controlling the power of the memory storage device 100 .

错误检查与校正电路212是耦接至存储器管理电路202并且用以执行错误检查与校正程序以确保数据的正确性。具体来说,当存储器管理电路202从主机系统1000中接收到写入指令时,错误检查与校正电路212会为对应此写入指令的数据产生对应的错误检查与校正码(Error Checking and Correcting Code,简称ECC Code),并且存储器管理电路202会将对应此写入指令的数据与对应的错误检查与校正码写入至可复写式非易失性存储器模块106中。之后,当存储器管理电路202从可复写式非易失性存储器模块106中读取数据时会同时读取此数据对应的错误检查与校正码,并且错误检查与校正电路212会依据此错误检查与校正码对所读取的数据执行错误检查与校正程序。The error checking and correcting circuit 212 is coupled to the memory management circuit 202 and used for executing error checking and correcting procedures to ensure the correctness of data. Specifically, when the memory management circuit 202 receives a write command from the host system 1000, the error checking and correcting circuit 212 will generate a corresponding error checking and correcting code (Error Checking and Correcting Code) for the data corresponding to the write command. , ECC Code for short), and the memory management circuit 202 will write the data corresponding to the write command and the corresponding ECC code into the rewritable non-volatile memory module 106 . Afterwards, when the memory management circuit 202 reads data from the rewritable non-volatile memory module 106, it will simultaneously read the error checking and correction code corresponding to the data, and the error checking and correction circuit 212 will read the error checking and correction code according to the error checking and correction code. The correction code performs error checking and correction procedures on the read data.

图4A与图4B是根据第一范例实施例所示出的管理实体抹除单元的范例示意图。FIG. 4A and FIG. 4B are exemplary schematic diagrams of a management entity erasing unit according to the first exemplary embodiment.

必须了解的是,在此描述可复写式非易失性存储器模块106的实体抹除单元的运作时,以“提取”、“分组”、“划分”、“关联”等词来操作实体抹除单元是逻辑上的概念。也就是说,可复写式非易失性存储器模块的实体抹除单元的实际位置并未更动,而是逻辑上对可复写式非易失性存储器模块的实体抹除单元进行操作。It must be understood that when describing the operation of the physical erasing unit of the rewritable non-volatile memory module 106, words such as "extract", "group", "divide", and "associate" are used to operate the physical erase. A unit is a logical concept. That is to say, the actual position of the physical erasing unit of the rewritable non-volatile memory module is not changed, but the physical erasing unit of the rewritable non-volatile memory module is logically operated.

请参照图4A,存储器控制电路单元104(或存储器管理电路202)会将实体抹除单元410(0)~410-(N)逻辑地分组为数据区502、闲置区504、系统区506与取代区508。Please refer to FIG. 4A, the memory control circuit unit 104 (or the memory management circuit 202) will logically group the entity erasing units 410(0)-410-(N) into a data area 502, an idle area 504, a system area 506, and a replacement area. District 508.

逻辑上属于数据区502与闲置区504的实体抹除单元是用以存储来自于主机系统1000的数据。具体来说,数据区502的实体抹除单元是被视为已存储数据的实体抹除单元,而闲置区504的实体抹除单元是用以替换数据区502的实体抹除单元。也就是说,当从主机系统1000接收到写入指令与欲写入的数据时,存储器管理电路202会从闲置区504中提取实体抹除单元,并且将数据写入至所提取的实体抹除单元中,以替换数据区502的实体抹除单元。The physical erase units logically belonging to the data area 502 and the free area 504 are used to store data from the host system 1000 . Specifically, the physical erasing unit of the data area 502 is a physical erasing unit regarded as stored data, and the physical erasing unit of the spare area 504 is a physical erasing unit used to replace the data area 502 . That is to say, when receiving the write command and the data to be written from the host system 1000, the memory management circuit 202 will extract the physical erase unit from the spare area 504, and write the data into the extracted physical erase unit. In the unit, replace the physical erasing unit of the data area 502.

逻辑上属于系统区506的实体抹除单元是用以记录系统数据。例如,系统数据包括关于可复写式非易失性存储器模块的制造商与型号、可复写式非易失性存储器模块的实体抹除单元数、每一实体抹除单元的实体程序化单元数等。The physical erase unit logically belonging to the system area 506 is used to record system data. For example, the system data includes the manufacturer and model of the rewritable non-volatile memory module, the number of physical erasing units of the rewritable non-volatile memory module, the number of physical programming units of each physical erasing unit, etc. .

逻辑上属于取代区508中的实体抹除单元是用于坏实体抹除单元取代程序,以取代损坏的实体抹除单元。具体来说,倘若取代区508中仍存有正常的实体抹除单元并且数据区502的实体抹除单元损坏时,存储器管理电路202会从取代区508中提取正常的实体抹除单元来更换损坏的实体抹除单元。The physical erase units logically belonging to the replacement area 508 are used in the bad physical erase unit replacement process to replace the damaged physical erase units. Specifically, if there are still normal physical erasing units in the replacement area 508 and the physical erasing units in the data area 502 are damaged, the memory management circuit 202 will extract normal physical erasing units from the replacement area 508 to replace the damaged ones. The physical erasing unit.

特别是,数据区502、闲置区504、系统区506与取代区508的实体抹除单元的数量会依据不同的存储器规格而有所不同。此外,必须了解的是,在存储器存储装置100的运作中,实体抹除单元关联至数据区502、闲置区504、系统区506与取代区508的分组关系会动态地变动。例如,当闲置区504中的实体抹除单元损坏而被取代区508的实体抹除单元取代时,则原本取代区508的实体抹除单元会被关联至闲置区504。In particular, the number of physical erasing units in the data area 502 , the spare area 504 , the system area 506 and the replacement area 508 will vary according to different memory specifications. In addition, it must be understood that during the operation of the memory storage device 100 , the grouping relationship of the physical erasing unit associated with the data area 502 , the spare area 504 , the system area 506 and the replacement area 508 will change dynamically. For example, when the physical erasing unit in the spare area 504 is damaged and replaced by the physical erasing unit in the replacement area 508 , the original physical erasing unit in the replacement area 508 will be associated with the spare area 504 .

请参照图4B,如上所述,数据区502、闲置区504的实体抹除单元是以轮替方式来存储主机系统1000所写入的数据。在本范例实施例中,存储器控制电路单元104(或存储器管理电路202)会配置逻辑地址510(0)~510(D)给主机系统1000,以映射至数据区502中部分的实体抹除单元414(0)~410(F-1),以利于在以上述轮替方式来存储数据的实体抹除单元中进行数据存取。特别是,主机系统1000会通过逻辑地址510(0)~510(D)来存取数据区502中的数据。此外,存储器控制电路单元104(或存储器管理电路202)会建立逻辑地址-实体抹除单元映射表(logical address-physical erasing unit mapping table),以记录逻辑地址与实体抹除单元之间的映射关系。此逻辑地址-实体抹除单元映射表还可以例如是记录逻辑地址与实体程序化单元、逻辑程序化单元与实体程序化单元及/或逻辑程序化单元与实体抹除单元之间的映射关系等各种逻辑与实体的对应关系,本发明不加以限制。Referring to FIG. 4B , as mentioned above, the physical erasing units of the data area 502 and the spare area 504 store the data written by the host system 1000 in an alternate manner. In this exemplary embodiment, the memory control circuit unit 104 (or the memory management circuit 202) configures logical addresses 510(0)-510(D) to the host system 1000 to map to some physical erase units in the data area 502 414(0)-410(F-1), to facilitate data access in the physical erasing units that store data in the aforementioned alternate manner. In particular, the host system 1000 accesses the data in the data area 502 through logical addresses 510(0)˜510(D). In addition, the memory control circuit unit 104 (or the memory management circuit 202) will establish a logical address-physical erasing unit mapping table (logical address-physical erasing unit mapping table) to record the mapping relationship between the logical address and the physical erasing unit . The logical address-physical erasing unit mapping table can also, for example, record the mapping relationship between the logical address and the physical programming unit, the logical programming unit and the physical programming unit, and/or the logical programming unit and the physical erasing unit, etc. The correspondence between various logics and entities is not limited by the present invention.

图5A至图5B是根据本发明第一范例实施例所示出的将写入数据、对应于写入数据的错误检查与校正码以及用以记录奇偶信息的至少一标记写入至实体程序化单元的范例示意图。5A to FIG. 5B show writing data, error checking and correction codes corresponding to the writing data, and at least one mark for recording parity information into the physical programming device according to the first exemplary embodiment of the present invention. An example schematic of a unit.

请参照图5A,在本范例实施例中,每一实体程序化单元会包括数据比特区520与冗余比特区540。其中,冗余比特区540包括第一记录区542及第二记录区544。举例来说,当一个实体程序化单元的容量为8千字节(Kilobyte,简称KB)时,冗余比特区540的容量有22字节。Please refer to FIG. 5A , in this exemplary embodiment, each physical programming unit includes a data bit area 520 and a redundant bit area 540 . Wherein, the redundant bit area 540 includes a first recording area 542 and a second recording area 544 . For example, when the capacity of a physical programming unit is 8 kilobytes (Kilobyte, KB for short), the capacity of the redundant bit area 540 is 22 bytes.

具体而言,当主机系统1000传送写入指令与对应此写入指令的第一使用者数据D1给存储器存储装置100时,存储器控制电路单元104(或存储器管理电路202)会判断第一使用者数据D1的大小,并且根据第一使用者数据D1的大小获得写入此第一使用者数据D1所需的实体程序化单元的数目。在此,假设需两个实体程序化单元来写入此第一使用者数据D1。因此,如图5A所示,存储器控制电路单元104(或存储器管理电路202)会产生对应第一使用者数据D1-1与D1-2的错误检查与校正码ECC1-1与ECC1-2以及对应第一使用者数据D1-1与D1-2的管理信息S1-1与S1-2(例如,实体程序化单元的好坏标记等),并且自闲置区504提取实体抹除单元410(F)作为替换实体抹除单元。之后,存储器控制电路单元104(或存储器管理电路202)会将此些第一使用者数据、对应此些第一使用者数据的管理信息,以及对应此些第一使用者数据的多个错误检查与校正码依序地写入至实体抹除单元410(F)的第0个与第1个实体程序化单元中。在此假设此些第一使用者数据所写入的实体程序化单元为第一实体程序化单元602,也就是说,第一使用者数据D1-1与D1-2是被程序化至第一实体程序化单元602的数据比特区520中,且对应此些第一使用者数据的错误检查与校正码ECC1-1与ECC1-2是被程序化至第一实体程序化单元602中冗余比特区540的第二记录区544。特别是,当主机系统1000欲从存储器存储装置100中读取第一使用者数据D1时,存储器控制电路单元104(或存储器管理电路202)会从第一实体程序化单元602中读取错误检查与校正码ECC1-1与ECC1-2,并且错误检查与校正电路212会分别地依据错误检查与校正码ECC1-1与ECC1-2,来对第一使用者数据D1-1与D1-2进行错误检查与校正程序。基此,在错误检查与校正电路212的错误校正能力范围内,错误检查与校正电路212可校正数据中的错误比特,由此确保数据的正确性。Specifically, when the host system 1000 sends the write command and the first user data D1 corresponding to the write command to the memory storage device 100, the memory control circuit unit 104 (or the memory management circuit 202) will determine that the first user The size of the data D1, and according to the size of the first user data D1, the number of physical programming units required to write the first user data D1 is obtained. Here, it is assumed that two entity programming units are required to write the first user data D1. Therefore, as shown in FIG. 5A, the memory control circuit unit 104 (or the memory management circuit 202) will generate error checking and correction codes ECC1-1 and ECC1-2 corresponding to the first user data D1-1 and D1-2 and corresponding The management information S1-1 and S1-2 of the first user data D1-1 and D1-2 (for example, the good and bad marks of the entity programming unit, etc.), and extract the entity erasing unit 410 (F) from the spare area 504 Erasing unit as a replacement entity. Afterwards, the memory control circuit unit 104 (or the memory management circuit 202) will check these first user data, management information corresponding to these first user data, and multiple error checks corresponding to these first user data The calibration code and the correction code are sequentially written into the 0th and 1st physical programming units of the physical erasing unit 410(F). It is assumed here that the entity programming unit in which the first user data is written is the first entity programming unit 602, that is, the first user data D1-1 and D1-2 are programmed into the first entity programming unit 602. In the data bit area 520 of the physical programming unit 602, the error checking and correction codes ECC1-1 and ECC1-2 corresponding to the first user data are programmed to the redundancy ratio in the first physical programming unit 602 The second recording area 544 of the special zone 540 . Especially, when the host system 1000 intends to read the first user data D1 from the memory storage device 100, the memory control circuit unit 104 (or the memory management circuit 202) will read the error checking data from the first physical programming unit 602 and correction codes ECC1-1 and ECC1-2, and the error checking and correction circuit 212 will perform the first user data D1-1 and D1-2 according to the error checking and correction codes ECC1-1 and ECC1-2 respectively Error checking and correction procedures. Based on this, within the scope of the error correction capability of the ECC circuit 212 , the ECC circuit 212 can correct erroneous bits in the data, thereby ensuring the correctness of the data.

在本范例实施例中,假设一第一数据包括第一使用者数据以及对应第一使用者数据的管理信息,因此,当存储器存储装置100接收到上述第一使用者数据并且产生对应第一使用者数据D1-1与D1-2的管理信息S1-1与S1-2后,存储器控制电路单元104(或存储器管理电路202)会依据此第一数据(即,第一使用者数据D1-1与D1-2与对应于第一使用者数据D1-1与D1-2的管理信息S1-1与S1-2)产生一奇偶信息P。此外,在另一范例实施例中,第一数据包括使用者数据、对应该使用者数据的管理信息以及对应使用者数据的错误检查与校正码,也就是说,存储器控制电路单元104(或存储器管理电路202)会根据整个实体程序化单元来产生奇偶信息,例如,存储器控制电路单元104(或存储器管理电路202)会依据第一使用者数据D1-1与D1-2、对应第一使用者数据D1-1与D1-2的管理信息S1-1与S1-2以及对应第一使用者数据D1-1与D1-2的错误检查与校正码ECC1-1与ECC1-2来产生奇偶信息。值得一提的是,在本范例实施例中,第一数据为两笔第一使用者数据以及对应此些第一使用者数据的管理信息所组成(即,第一使用者数据D1-1与D1-2与对应于第一使用者数据D1-1与D1-2的管理信息S1-1与S1-2),然而,本发明并不加以限制第一数据的大小,例如,在另一范例实施例中,第一数据可为一笔或多笔第一使用者数据以及对应第一使用者数据的管理信息所组成,或是由一笔或多笔第一使用者数据、对应第一使用者数据的管理信息以及对应第一使用者数据的错误检查与校正码所组成。值得注意的是,本发明并不限制奇偶信息的产生时间点与产生方式,具体而言,在本范例实施例中,所产生的奇偶信息可以是奇偶校正码(parity checking code)、通道编码(channel coding)或是其他类型。例如,汉明码(hamming code)、低密度奇偶检查码(low density parity check code,简称LDPC code)、涡旋码(turbo code)或里德-所罗门码(Reed-solomon code,简称RS code)。特别是,在另一范例实施例中,存储器控制电路单元104(或存储器管理电路202)也可以使用异或(XOR)运算来为第一数据产生的奇偶信息。In this exemplary embodiment, it is assumed that a first data includes first user data and management information corresponding to the first user data. Therefore, when the memory storage device 100 receives the first user data and generates the corresponding first user data After the management information S1-1 and S1-2 of user data D1-1 and D1-2, the memory control circuit unit 104 (or memory management circuit 202) will and D1-2 and management information S1-1 and S1-2 corresponding to the first user data D1-1 and D1-2) to generate a parity information P. In addition, in another exemplary embodiment, the first data includes user data, management information corresponding to the user data, and error checking and correction codes corresponding to the user data, that is, the memory control circuit unit 104 (or memory The management circuit 202) will generate parity information according to the entire physical programming unit, for example, the memory control circuit unit 104 (or the memory management circuit 202) will correspond to the first user according to the first user data D1-1 and D1-2 The management information S1-1 and S1-2 of the data D1-1 and D1-2 and the error checking and correction codes ECC1-1 and ECC1-2 corresponding to the first user data D1-1 and D1-2 generate parity information. It is worth mentioning that, in this exemplary embodiment, the first data is composed of two pieces of first user data and management information corresponding to these first user data (that is, the first user data D1-1 and D1-2 and management information S1-1 and S1-2 corresponding to the first user data D1-1 and D1-2), however, the present invention does not limit the size of the first data, for example, in another example In an embodiment, the first data may be composed of one or more first user data and management information corresponding to the first user data, or may be composed of one or more first user data, corresponding to the first user data The user data management information and the error checking and correction code corresponding to the first user data. It is worth noting that the present invention does not limit the generation time and method of parity information. Specifically, in this exemplary embodiment, the generated parity information can be parity checking code (parity checking code), channel coding ( channel coding) or other types. For example, Hamming code (hamming code), low density parity check code (low density parity check code, LDPC code for short), turbo code (turbo code) or Reed-Solomon code (Reed-solomon code, RS code for short). In particular, in another exemplary embodiment, the memory control circuit unit 104 (or the memory management circuit 202 ) may also use an exclusive OR (XOR) operation to generate the parity information for the first data.

请再参照图5A,存储器控制电路单元104(或存储器管理电路202)会将奇偶信息P程序化至实体抹除单元410(F)的实体程序化单元之中的第2个实体程序化单元(即,第二实体程序化单元604)。值得一提的是,在上述将第一使用者数据、对应第一使用者数据的管理信息与对应第一使用者数据的错误检查与校正码程序化至实体程序化单元之中的第一实体程序化单元602的操作中,存储器控制电路单元104(或存储器管理电路202)会将至少一标记程序化至实体抹除单元410(F)的第1个实体程序化单元的冗余比特区的第一记录区542(即,图5A中所示第一标记M1),并且此第一标记M1会指示奇偶信息P被程序化至实体抹除单元410(F)的第二实体程序化单元604中。Please refer to FIG. 5A again, the memory control circuit unit 104 (or the memory management circuit 202) will program the parity information P to the second physical programming unit ( That is, the second entity programming unit 604). It is worth mentioning that, in the above-mentioned programming of the first user data, the management information corresponding to the first user data, and the error checking and correction code corresponding to the first user data into the first entity in the entity programming unit During the operation of the programming unit 602, the memory control circuit unit 104 (or the memory management circuit 202) will program at least one flag into the redundant bit area of the first physical programming unit of the physical erasing unit 410(F). The first recording area 542 (ie, the first mark M1 shown in FIG. 5A ), and this first mark M1 will indicate that the parity information P is programmed to the second physical programming unit 604 of the physical erasing unit 410 (F) middle.

特别是,第二实体程序化单元604是排列于第一实体程序化单元602之中的最后一个实体程序化单元之后,并且第一标记M1会指示第二实体程序化单元604存储奇偶信息P。In particular, the second physical programming unit 604 is arranged after the last physical programming unit of the first physical programming unit 602 , and the first marker M1 indicates the second physical programming unit 604 to store the parity information P.

请参照图5B,当主机系统1000传送另一个写入指令与对应此写入指令的第二使用者数据D2给存储器存储装置100时,存储器控制电路单元104(或存储器管理电路202)也会判断第二使用者数据D2的大小,并且根据第二使用者数据D2的大小获得写入此第二使用者数据D2所需的实体程序化单元的数目。在此,假设需一个实体程序化单元来写入此第二使用者数据D2。因此,如图5B所示,存储器管理电路202会产生对应第二使用者数据D2的错误检查与校正码ECC2以及对应第二使用者数据D2的管理信息S2。之后,存储器控制电路单元104(或存储器管理电路202)会将此第二使用者数据、对应此第二使用者数据的管理信息,以及对应此第二使用者数据的错误检查与校正码写入至实体抹除单元410(F)的第3个实体程序化单元(即,第三实体程序化单元606)中。在存储器控制电路单元104(或存储器管理电路202)将对应此第二使用者数据D2的管理信息S2写入至实体抹除单元410(F)的第三实体程序化单元606中的同时,存储器控制电路单元104(或存储器管理电路202)会将一第二标记M2程序化至第三实体程序化单元606的冗余比特区540的第一记录区542中,其中第三实体程序化单元606是排列在第二实体程序化单元604之后,并且第二标记M2也会指示第二实体程序化单元604存储奇偶信息P。Referring to FIG. 5B, when the host system 1000 sends another write command and the second user data D2 corresponding to the write command to the memory storage device 100, the memory control circuit unit 104 (or the memory management circuit 202) will also judge The size of the second user data D2, and according to the size of the second user data D2, the number of physical programming units required to write the second user data D2 is obtained. Here, it is assumed that a physical programming unit is required to write the second user data D2. Therefore, as shown in FIG. 5B , the memory management circuit 202 generates the error checking and correction code ECC2 corresponding to the second user data D2 and the management information S2 corresponding to the second user data D2 . Afterwards, the memory control circuit unit 104 (or the memory management circuit 202) will write the second user data, the management information corresponding to the second user data, and the error checking and correction code corresponding to the second user data to the third physical programming unit (ie, the third physical programming unit 606 ) of the physical erasing unit 410 (F). When the memory control circuit unit 104 (or the memory management circuit 202) writes the management information S2 corresponding to the second user data D2 into the third physical programming unit 606 of the physical erasing unit 410(F), the memory The control circuit unit 104 (or the memory management circuit 202) will program a second mark M2 into the first recording area 542 of the redundant bit area 540 of the third physical programming unit 606, wherein the third physical programming unit 606 is arranged after the second physical programming unit 604, and the second mark M2 also indicates that the second physical programming unit 604 stores the parity information P.

此后,当存储器控制电路单元104(或存储器管理电路202)接收到主机系统1000所传送的欲读取上述第一使用者数据D1的读取指令时,存储器控制电路单元104(或错误检查与校正电路212)会依据所读取的错误检查与校正码对所读取的第一使用者数据D1-1与D1-2进行上述的错误检查与校正程序。举例而言,在本发明范例实施例中,上述第一数据包括一第二数据以及一错误检查与校正码,其中第二数据可仅包括第一使用者数据,或是同时包括第一使用者数据与对应第一使用者数据的管理信息,而错误检查与校正码即为对应第一使用者数据的错误检查与校正码。当无法通过使用对应第一使用者数据的错误检查与校正码来校正所述第二数据时,存储器控制电路单元104(或存储器管理电路202)会根据上述至少一标记获得记录奇偶信息的至少一第二实体程序化单元的地址,并从至少一第二实体程序化单元中读取奇偶信息以及依据所读取的该奇偶信息来校正第二数据。例如,倘若无法通过使用第一使用者数据D1-1与D1-2的错误检查与校正码(即,ECC1、ECC2)来校正第一使用者数据D1-1与D1-2时,存储器控制电路单元104(或存储器管理电路202)会根据上述的至少一标记来获得记录奇偶信息P的第二实体程序化单元604的地址,并从第二实体程序化单元604中读取此奇偶信息P以及依据所读取的第一奇偶信息P来校正第一使用者数据D1。例如,当无法通过使用第一使用者数据D1-1的错误检查与校正码ECC1来校正第一使用者数据D1-1时,存储器控制电路单元104(或存储器管理电路202)会先从第一实体程序化单元602中邻近于第一使用者数据D1-1所在的第0个实体程序化单元的实体程序化单元(例如,实体抹除单元410(F)的第1个实体程序化单元)中获得第一标记M1,并由此来识别存储奇偶信息P的地址。在另一范例实施例中,倘若无法通过使用第一使用者数据D1-2的错误检查与校正码ECC2来校正第一使用者数据D1-2且无法从对应于第一使用者数据D1-2的冗余比特区的第一记录区获得第一标记值M1时,存储器控制电路单元104(或存储器管理电路202)则会从邻近于第一使用者数据D1-2所在的第1个实体程序化单元的实体程序化单元(例如,实体抹除单元410(F)的第0个实体程序化单元、第二实体程序化单元604与第三实体程序化单元606)中寻找以获得位于第三实体程序化单元606中的第二标记M2,并由此来识别存储有奇偶信息P的实体程序化单元的地址。Thereafter, when the memory control circuit unit 104 (or the memory management circuit 202) receives the read instruction to read the first user data D1 sent by the host system 1000, the memory control circuit unit 104 (or the error checking and correction The circuit 212) performs the above-mentioned error checking and correction procedure on the read first user data D1-1 and D1-2 according to the read error checking and correction code. For example, in an exemplary embodiment of the present invention, the above-mentioned first data includes a second data and an error checking and correction code, wherein the second data may only include the first user data, or include the first user data at the same time The data and the management information corresponding to the first user data, and the error checking and correction code is the error checking and correction code corresponding to the first user data. When the second data cannot be corrected by using the error checking and correction code corresponding to the first user data, the memory control circuit unit 104 (or the memory management circuit 202) will obtain at least one piece of record parity information according to the above-mentioned at least one mark The addresses of the second physical programming units are read, parity information is read from at least one second physical programming unit, and the second data is corrected according to the read parity information. For example, if the first user data D1-1 and D1-2 cannot be corrected by using the error checking and correction codes (ie, ECC1, ECC2) of the first user data D1-1 and D1-2, the memory control circuit The unit 104 (or the memory management circuit 202) will obtain the address of the second physical programming unit 604 that records the parity information P according to the above-mentioned at least one mark, and read the parity information P from the second physical programming unit 604 and Correct the first user data D1 according to the read first parity information P. For example, when the first user data D1-1 cannot be corrected by using the error checking and correction code ECC1 of the first user data D1-1, the memory control circuit unit 104 (or the memory management circuit 202) will first The physical programming unit adjacent to the 0th physical programming unit in the physical programming unit 602 where the first user data D1-1 is located (for example, the 1st physical programming unit of the physical erasing unit 410(F)) Obtain the first mark M1 in, and thus identify the address where the parity information P is stored. In another exemplary embodiment, if the first user data D1-2 cannot be corrected by using the error checking and correction code ECC2 of the first user data D1-2 and cannot be obtained from the error code corresponding to the first user data D1-2 When the first recording area of the redundant bit area obtains the first mark value M1, the memory control circuit unit 104 (or the memory management circuit 202) will start from the first entity program adjacent to the first user data D1-2. In the physical programming unit of the physical erasing unit (for example, the 0th physical programming unit of the physical erasing unit 410(F), the second physical programming unit 604 and the third physical programming unit 606) to obtain the The second mark M2 in the physical programming unit 606 identifies the address of the physical programming unit storing the parity information P.

在本范例实施例中,可复写式非易失性存储器模块106为多层单元MLC NAND型快闪存储器模块,因此,每一存储单元可存储多个比特。具体来说,在对SLC NAND型快闪存储器模块的存储单元进行程序化时仅能执行单层的程序化,因此每一存储单元仅能存储一个比特。而MLC NAND型快闪存储器模块的实体抹除单元的程序化可分为多层。例如,以2层存储单元为例,实体程序化单元的程序化可分为2阶段。第一阶段是下实体程序化单元的写入部分,其物理特性类似于单层存储单元SLC NAND快闪存储器,在完成第一阶段之后才会程序化上实体程序化单元,其中下实体程序化单元的写入速度会快于上实体程序化单元。因此,每一实体抹除单元的实体程序化单元可区分为慢速实体程序化单元(即,上实体程序化单元)与快速实体程序化单元(即,下实体程序化单元)。In this exemplary embodiment, the rewritable non-volatile memory module 106 is a multi-level cell MLC NAND flash memory module, so each memory cell can store multiple bits. Specifically, when programming the memory cells of the SLC NAND flash memory module, only a single layer of programming can be performed, so each memory cell can only store one bit. The programming of the physical erasing unit of the MLC NAND flash memory module can be divided into multiple layers. For example, taking a 2-layer storage unit as an example, the programming of the entity programming unit can be divided into two stages. The first stage is the writing part of the lower entity programming unit. Its physical characteristics are similar to single-layer storage unit SLC NAND flash memory. After the first stage is completed, the upper entity programming unit will be programmed. The lower entity programming unit The writing speed of the unit will be faster than that of the programmatic unit above. Therefore, the physical programming units of each physical erase unit can be divided into slow physical programming units (ie, upper physical programming units) and fast physical programming units (ie, lower physical programming units).

图6是根据本发明第一范例实施例所示出的将写入数据、对应于写入数据的错误检查与校正码以及用以记录奇偶信息的至少一标记写入至实体程序化单元的另一个范例示意图。6 is another example of writing write data, error checking and correction codes corresponding to the write data, and at least one mark for recording parity information into the physical programming unit according to the first exemplary embodiment of the present invention. An example schematic.

在另一范例实施例中,存储器控制电路单元104(或存储器管理电路202)也可以将第一使用者数据D1-1与D1-2、对应第一使用者数据D1-1与D1-2的管理信息S1-1与S1-2以及错误检查与校正码ECC1-1与ECC1-2程序化至实体程序化单元之中的多个实体程序化单元中。例如,存储器控制电路单元104(或存储器管理电路202)会将第一使用者数据D1-1与D1-2、对应第一使用者数据D1-1与D1-2的管理信息S1-1与S1-2以及对应第一使用者数据D1-1与D1-2的错误检查与校正码ECC1-1与ECC1-2仅程序化至第一实体程序化单元702中的快速实体程序化单元。因此,如图6所示,存储器控制电路单元104(或存储器管理电路202)会将第一使用者数据D1-1、管理信息S1-1以及错误检查与校正码ECC1-1程序化至实体抹除单元410(F)的第0个实体程序化单元,并且将第一使用者数据D1-2、管理信息S1-2、第一标记M1以及错误检查与校正码ECC1-2程序化至实体抹除单元410(F)的第2个实体程序化单元。此外,存储器控制电路单元104(或存储器管理电路202)会产生对应于第一使用者数据D1-1、D1-2与对应于第一使用者数据D1-1、D1-2的管理信息S1-1、S1-2的奇偶信息P,并且将此奇偶信息P写入至第二实体程序化单元704中的快速实体程序化单元(即,实体抹除单元410(F)的第4个实体程序化单元)。之后,当主机系统1000传送另一个写入指令与对应此写入指令的第二使用者数据D2给存储器存储装置100时,存储器控制电路单元104(或存储器管理电路202)会将其所产生的对应第二使用者数据D2的错误检查与校正码ECC2、对应第二使用者数据D2的管理信息S2以及一第二标记M2写入至实体抹除单元410(F)的第三实体程序化单元706中的快速实体程序化单元(即,实体抹除单元410(F)的第6个实体程序化单元)。在此,相同于图5A与图5B所示的范例,第一标记M1与第二标记M2都会指示第二实体程序化单元704中的快速实体程序化单元存储有奇偶信息P。In another exemplary embodiment, the memory control circuit unit 104 (or the memory management circuit 202 ) may also convert the first user data D1-1 and D1-2, and the data corresponding to the first user data D1-1 and D1-2 The management information S1-1 and S1-2 and the error checking and correcting codes ECC1-1 and ECC1-2 are programmed into a plurality of physical programming units among the physical programming units. For example, the memory control circuit unit 104 (or the memory management circuit 202) will store the first user data D1-1 and D1-2, and the management information S1-1 and S1 corresponding to the first user data D1-1 and D1-2 -2 and the ECC codes ECC1-1 and ECC1-2 corresponding to the first user data D1-1 and D1-2 are only programmed to the fast physical programming unit in the first physical programming unit 702. Therefore, as shown in FIG. 6, the memory control circuit unit 104 (or the memory management circuit 202) will program the first user data D1-1, the management information S1-1 and the error checking and correction code ECC1-1 to the physical memory. The 0th entity programming unit of the division unit 410(F), and program the first user data D1-2, the management information S1-2, the first mark M1 and the error checking and correction code ECC1-2 to the entity wipe The second physical programming unit of the division unit 410(F). In addition, the memory control circuit unit 104 (or memory management circuit 202) will generate corresponding to the first user data D1-1, D1-2 and management information S1-1 corresponding to the first user data D1-1, D1-2 1. The parity information P of S1-2, and write this parity information P into the fast physical programming unit in the second physical programming unit 704 (that is, the fourth physical program of the physical erasing unit 410 (F) unit). Afterwards, when the host system 1000 sends another write command and the second user data D2 corresponding to the write command to the memory storage device 100, the memory control circuit unit 104 (or the memory management circuit 202) will send the generated The error checking and correction code ECC2 corresponding to the second user data D2, the management information S2 corresponding to the second user data D2, and a second mark M2 are written into the third physical programming unit of the physical erasing unit 410(F). The fast physical programming unit in 706 (ie, the 6th physical programming unit of the physical erasing unit 410(F)). Here, similar to the example shown in FIG. 5A and FIG. 5B , both the first mark M1 and the second mark M2 indicate that the fast physical programming unit in the second physical programming unit 704 stores parity information P.

也就是说,在本范例实施例中,倘若无法通过使用第一使用者数据D1-1的错误检查与校正码ECC1来校正第一使用者数据D1-1时,存储器控制电路单元104(或存储器管理电路202)会先从第一实体程序化单元702中接近于第一使用者数据D1-1所在的第0个实体程序化单元的快速实体程序化单元(例如,实体抹除单元410(F)的第2个实体程序化单元)中获得第一标记M1,并由此来识别存储奇偶信息P的地址。在另一范例实施例中,倘若无法通过使用第一使用者数据D1-2的错误检查与校正码ECC1-2来校正第一使用者数据D1-2且无法从对应于第一使用者数据D1-2的冗余比特区的第一记录区获得第一标记值M1时,存储器控制电路单元104(或存储器管理电路202)则会从接近于第一使用者数据D1-2所在的第2个实体程序化单元的快速实体程序化单元(例如,实体抹除单元410(F)的第0个实体程序化单元、实体抹除单元410(F)的第4个实体程序化单元与实体抹除单元410(F)的第6个实体程序化单元)中寻找以获得位于第三实体程序化单元706的快速实体程序化单元中的第二标记M2,并由此来识别存储奇偶信息P的地址。That is to say, in this exemplary embodiment, if the first user data D1-1 cannot be corrected by using the error checking and correction code ECC1 of the first user data D1-1, the memory control circuit unit 104 (or the memory The management circuit 202) first selects the fast physical programming unit (for example, the physical erasing unit 410 (F ) in the second physical programming unit) to obtain the first mark M1, and thereby identify the address where the parity information P is stored. In another exemplary embodiment, if the first user data D1-2 cannot be corrected by using the error checking and correction code ECC1-2 of the first user data D1-2 and cannot be obtained from the error code corresponding to the first user data D1 When the first recording area of the redundant bit area of -2 obtains the first mark value M1, the memory control circuit unit 104 (or the memory management circuit 202) will start from the second one close to the first user data D1-2. Fast physical programming unit of physical programming unit (for example, 0th physical programming unit of physical erasing unit 410(F), 4th physical programming unit of physical erasing unit 410(F) and physical erasing In the 6th physical programming unit of unit 410 (F), search to obtain the second mark M2 in the fast physical programming unit of the third physical programming unit 706, and thus identify the address for storing the parity information P .

值得一提的是,在此范例实施例中,由于用以记录奇偶信息所属的实体程序化单元地址的实体程序化单元会分别是位于奇偶信息所属的实体程序化单元的之前与之后的实体程序化单元,因此,倘若当用以记录奇偶信息所属的实体程序化单元地址的实体程序化单元中的其中一个损坏时(即,实体抹除单元中数据比特区所记录的数据与冗余比特区所记录的标记及错误检查与校正码遗失或损坏时),存储器控制电路单元104(或存储器管理电路202)可还通过相邻于或接近于此笔所读取的数据的另一个实体程序化单元来识别出奇偶信息所属的实体程序化单元的地址。据此,在数据无法通过错误检查与校正码来校正时,通过实体程序化单元中所存储的标记可有效地识别出存储此笔数据的奇偶信息的地址并且获取此奇偶信息,由此使用所获取的奇偶信息来校正数据中的错误比特。It is worth mentioning that, in this exemplary embodiment, since the physical programming unit used to record the address of the physical programming unit to which the parity information belongs is the physical program located before and after the physical programming unit to which the parity information belongs, respectively Therefore, if one of the physical programming units used to record the address of the physical programming unit to which the parity information belongs is damaged (that is, the data recorded in the data bit area and the redundant bit area in the physical erasing unit When the recorded marks and error checking and correction codes are lost or damaged), the memory control circuit unit 104 (or the memory management circuit 202) can also be programmed by another entity adjacent to or close to the data read by this pen Unit to identify the address of the physical programming unit to which the parity information belongs. Accordingly, when the data cannot be corrected by the error checking and correction code, the address of the parity information storing the data can be effectively identified and the parity information is obtained through the mark stored in the physical programming unit, thereby using the The acquired parity information is used to correct erroneous bits in the data.

图7是根据本发明的第一范例实施例所示出的数据存储方法的流程图。Fig. 7 is a flowchart of a data storage method according to the first exemplary embodiment of the present invention.

请参照图7,在步骤S701中,存储器控制电路单元(或存储器管理电路)会依据一第一数据产生一奇偶信息。在步骤S703中,存储器控制电路单元(或存储器管理电路)会将第一数据程序化至第一实体程序化单元。接着,在步骤S705中,存储器控制电路单元(或存储器管理电路)会将至少一标记程序化至所述第一实体程序化单元之中的冗余比特区,并且在步骤S707中,存储器控制电路单元(或存储器管理电路)将所述奇偶信息程序化至排列在所述第一实体程序化单元之后的至少一第二体程序化单元中,其中上述至少一标记会指示所述奇偶信息被程序化至所述至少一第二实体程序化单元中。Please refer to FIG. 7 , in step S701 , the memory control circuit unit (or memory management circuit) generates parity information according to a first data. In step S703, the memory control circuit unit (or memory management circuit) programs the first data to the first physical program unit. Next, in step S705, the memory control circuit unit (or memory management circuit) will program at least one flag to the redundant bit area in the first physical programming unit, and in step S707, the memory control circuit The unit (or memory management circuit) programs the parity information into at least one second physical programming unit arranged after the first physical programming unit, wherein the at least one flag indicates that the parity information is programmed into the at least one second entity programming unit.

[第二范例实施例][Second Exemplary Embodiment]

本发明第二范例实施例的存储器存储装置与主机系统本质上是相同于第一范例实施例的存储器存储装置与主机系统,其中差异在于第二范例实施例的存储器控制电路单元(或存储器管理电路)会建立一奇偶信息地址对应表,并且同时使用实体程序化单元与奇偶信息地址对应表来记录一个奇偶信息所属的实体程序化单元地址。以下将使用图1A、图2与图3的装置结构来描述第二范例实施例与第一范例实施例的差异部分。The memory storage device and the host system of the second exemplary embodiment of the present invention are essentially the same as the memory storage device and the host system of the first exemplary embodiment, wherein the difference lies in the memory control circuit unit (or memory management circuit) of the second exemplary embodiment ) will establish a parity information address correspondence table, and simultaneously use the physical programming unit and parity information address correspondence table to record a physical programming unit address to which the parity information belongs. The differences between the second exemplary embodiment and the first exemplary embodiment will be described below using the device structures of FIG. 1A , FIG. 2 and FIG. 3 .

图8A与图8B是根据本发明第二范例实施例所示出的将写入数据、对应于写入数据的错误检查与校正码以及用以记录奇偶信息的至少一标记写入至实体程序化单元的范例示意图。8A and FIG. 8B show writing data, error checking and correction codes corresponding to the writing data, and at least one mark for recording parity information into the physical programming device according to the second exemplary embodiment of the present invention. An example schematic of a unit.

请参照图8A与图8B,其中图8A所示的将第一使用者数据、对应于第一使用者数据的错误检查与校正码、用以记录奇偶信息的地址的第一标记以及对应于第一使用者数据及其管理信息的奇偶信息写入至实体程序化单元的方法是相同于图5A所示的方法,在此不再重复。其不同之处在于,在本范例实施例中,在将第一使用者数据D1-1与D1-2以及对应第一使用者数据D1-1与D1-2的错误检查与校正码ECC1-1与ECC1-2程序化至实体程序化单元之中的第一实体程序化单元602,并且将对应第一使用者数据D1-1与D1-2与第一使用者数据D1-1与D1-2的管理信息S1-1与S1-2的奇偶信息P程序化至实体程序化单元之中的第二实体程序化单元604的操作中,存储器控制电路单元104(或存储器管理电路202)会建立一奇偶信息地址对应表800(如图8B所示)。例如,奇偶信息地址对应表800会被存储在缓冲存储器208或随机存取存储器1104中。特别是,存储器控制电路单元104(或存储器管理电路202)会将第三标记M3记录在奇偶信息地址对应表800中,其中第三标记M3也会指示第二实体程序化单元604存储有奇偶信息P。Please refer to FIG. 8A and FIG. 8B, wherein the first user data shown in FIG. 8A, the error checking and correction code corresponding to the first user data, the first mark for recording the address of the parity information, and the first mark corresponding to the first user data The method for writing the parity information of user data and its management information into the physical programming unit is the same as that shown in FIG. 5A , and will not be repeated here. The difference is that in this exemplary embodiment, the first user data D1-1 and D1-2 and the error checking and correction code ECC1-1 corresponding to the first user data D1-1 and D1-2 and ECC1-2 are programmed into the first entity programming unit 602 among the entity programming units, and will correspond to the first user data D1-1 and D1-2 and the first user data D1-1 and D1-2 The management information S1-1 and the parity information P of S1-2 are programmed into the operation of the second physical programming unit 604 among the physical programming units, the memory control circuit unit 104 (or the memory management circuit 202) will establish a Parity information address correspondence table 800 (as shown in FIG. 8B ). For example, the parity information address correspondence table 800 will be stored in the buffer memory 208 or the random access memory 1104 . In particular, the memory control circuit unit 104 (or the memory management circuit 202) will record the third mark M3 in the parity information address correspondence table 800, wherein the third mark M3 will also indicate that the second entity programming unit 604 stores the parity information p.

在本范例实施例中,在图8A中所示将第一使用者数据D1-1与D1-2以及对应第一使用者数据D1-1与D1-2的错误检查与校正码ECC1-1与ECC1-2程序化至实体程序化单元之中的第一实体程序化单元602,并且将对应第一使用者数据D1-1与D1-2与其管理信息S1-1与S1-2的奇偶信息P程序化至实体程序化单元之中的第二实体程序化单元604的操作之后,主机系统1000又再传送另一个写入指令与对应此写入指令的第二使用者数据D2给存储器存储装置100。此时,倘若在存储器控制电路单元104(或存储器管理电路202)将此第二使用者数据、对应此第二使用者数据的管理信息、指示奇偶信息P位于第二实体程序化单元604的第三标记M3以及对应此第二使用者数据的错误检查与校正码写入第三实体程序化单元606之前,主机系统1000或存储器存储装置100发生断电时,会造成用以记录奇偶信息P所在地址的第三标记M3无法被写入第三实体程序化单元606,或是造成第一实体程序化单元602中的数据遗失或损坏。In this exemplary embodiment, the first user data D1-1 and D1-2 and the error checking and correction code ECC1-1 corresponding to the first user data D1-1 and D1-2 are combined as shown in FIG. 8A ECC1-2 is programmed to the first physical programming unit 602 among the physical programming units, and the parity information P corresponding to the first user data D1-1 and D1-2 and its management information S1-1 and S1-2 After being programmed into the operation of the second physical programming unit 604 among the physical programming units, the host system 1000 sends another write command and the second user data D2 corresponding to the write command to the memory storage device 100 . At this time, if the memory control circuit unit 104 (or the memory management circuit 202) puts the second user data, the management information corresponding to the second user data, and the indicating parity information P in the second physical programming unit 604 Before the three-mark M3 and the error checking and correction code corresponding to the second user data are written into the third physical programming unit 606, when the host system 1000 or the memory storage device 100 is powered off, it will cause the location where the parity information P is recorded. The third tag M3 of the address cannot be written into the third physical programming unit 606 , or the data in the first physical programming unit 602 is lost or damaged.

在上述排列在第二实体程序化单元604之后的第三实体程序化单元606为空实体单元或因断电所造成的第一实体程序化单元602中的数据遗失或损坏的情况下,并且当存储器控制电路单元104(或存储器管理电路202)接收到主机系统1000所传送的欲读取上述第一使用者数据D1-1与D1-2的读取指令时,存储器管理电路202(或错误检查与校正电路212)会依据所读取的错误检查与校正码对所读取的第一使用者数据D1-1与D1-2进行上述的错误检查与校正程序。倘若无法通过使用第一使用者数据D1-1与D1-2的错误检查与校正码(即,ECC1-1、ECC1-2)来校正第一使用者数据D1-1与D1-2时,存储器控制电路单元104(或存储器管理电路202)会还用以根据上述的至少一标记来获得记录奇偶信息P的第二实体程序化单元604的地址,并从第二实体程序化单元604中读取此奇偶信息P以及依据所读取的奇偶信息P来校正第一使用者数据D1-1与D1-2。举例而言,存储器管理电路202会先判断所读取的实体抹除单元410(F)中对应于第一使用者数据D1-2的冗余比特区的第一记录区是否具有第一标记M1,倘若此第一标记M1存在并且可通过其得知奇偶信息P所在的地址,则存储器控制电路单元104(或存储器管理电路202)会根据此奇偶信息P来校正第一使用者数据D1-1或D1-2。反之,倘若第一标记M1不存在或是记录此第一标记M1的冗余比特区损坏,则存储器管理电路202会读取上述奇偶信息地址对应表800并且根据奇偶信息地址对应表800中的第三标记M3获得奇偶信息P所在的实体程序化单元的地址。In the case that the above-mentioned third entity programming unit 606 arranged after the second entity programming unit 604 is an empty entity unit or the data in the first entity programming unit 602 is lost or damaged due to power failure, and when When the memory control circuit unit 104 (or the memory management circuit 202) receives the read instruction to read the first user data D1-1 and D1-2 sent by the host system 1000, the memory management circuit 202 (or the error checking The AND correction circuit 212) performs the above error checking and correction procedure on the read first user data D1-1 and D1-2 according to the read ECC code. If the first user data D1-1 and D1-2 cannot be corrected by using the error checking and correction codes (ie, ECC1-1, ECC1-2) of the first user data D1-1 and D1-2, the memory The control circuit unit 104 (or the memory management circuit 202) will also be used to obtain the address of the second physical programming unit 604 that records the parity information P according to the above at least one flag, and read from the second physical programming unit 604 The parity information P and the first user data D1-1 and D1-2 are corrected according to the read parity information P. For example, the memory management circuit 202 will first determine whether the first recording area corresponding to the redundant bit area of the first user data D1-2 in the read physical erasing unit 410(F) has the first mark M1 , if the first mark M1 exists and the address of the parity information P can be known through it, the memory control circuit unit 104 (or the memory management circuit 202) will correct the first user data D1-1 according to the parity information P or D1-2. Conversely, if the first mark M1 does not exist or the redundant bit area for recording the first mark M1 is damaged, the memory management circuit 202 will read the above parity information address correspondence table 800 and according to the first parity information address correspondence table 800 The three-mark M3 obtains the address of the physical programming unit where the parity information P is located.

[第三范例实施例][Third Exemplary Embodiment]

本发明第三范例实施例的存储器存储装置与主机系统本质上是相同于第一范例实施例的存储器存储装置与主机系统,其中差异在于第三范例实施例的存储器控制电路单元(或存储器管理电路)会根据每一笔写入数据所需写入的实体程序化单元的个数将标记值记录在此些实体程序化单元中,并且通过此些标记值来获得奇偶信息所属的实体程序化单元地址。以下将使用图1A、图2与图3的装置结构来描述第三范例实施例与第一范例实施例的差异部分。The memory storage device and the host system of the third exemplary embodiment of the present invention are essentially the same as the memory storage device and the host system of the first exemplary embodiment, wherein the difference lies in the memory control circuit unit (or memory management circuit) of the third exemplary embodiment ) will record the tag value in these physical programming units according to the number of physical programming units that need to be written for each write data, and use these tag values to obtain the physical programming unit to which the parity information belongs address. The differences between the third exemplary embodiment and the first exemplary embodiment will be described below using the device structures of FIG. 1A , FIG. 2 and FIG. 3 .

相同于第一范例实施例,当主机系统1000传送写入指令与对应此写入指令的第一使用者数据D1给存储器存储装置100时,存储器控制电路单元104(或存储器管理电路202)会判断第一使用者数据D1的大小,并且根据第一使用者数据D1的大小获得写入此第一使用者数据D1所需的实体程序化单元的数目。在此,假设需四个实体程序化单元来写入此第一使用者数据D1。在此范例中,存储器控制电路单元104(或存储器管理电路202)会产生对应第一使用者数据D1-1~D1-4的错误检查与校正码ECC1-1~ECC1-4以及对应第一使用者数据D1-1~D1-4的管理信息S1-1~S1-4。特别是,存储器控制电路单元104(或存储器管理电路202)在接收到上述第一使用者数据D1时,并不会立刻将此第一使用者数据D1写入至实体抹除单元中。举例而言,存储器控制电路单元104(或存储器管理电路202)会继续等待主机系统1000传送其他写入指令与对应此些指令的第二使用者数据D2与第三使用者数据D3给存储器存储装置100,并且计数此第二使用者数据D2与第三使用者数据D3所需写入的实体程序化单元的个数。在此假设本范例实施例中的存储器控制电路单元104(或存储器管理电路202)会在写入每三个实体程序化单元后,对此三个实体程序化单元中的数据产生一个奇偶信息。在此范例实施例中,存储器控制电路单元104(或存储器管理电路202)会判断写入第二使用者数据D2与第三使用者数据D3所需的实体程序化单元的个数都为两个,并且存储器控制电路单元104(或存储器管理电路202)还会根据每一笔数据所需写入的实体程序化单元的个数以及每一笔数据被接收的先后顺序,将欲写入每一实体程序化单元的此些数据如图9中排序900所示的顺序来排序。Similar to the first exemplary embodiment, when the host system 1000 sends the write command and the first user data D1 corresponding to the write command to the memory storage device 100, the memory control circuit unit 104 (or the memory management circuit 202) will determine The size of the first user data D1, and according to the size of the first user data D1, the number of physical programming units required to write the first user data D1 is obtained. Here, it is assumed that four physical programming units are required to write the first user data D1. In this example, the memory control circuit unit 104 (or the memory management circuit 202) generates error checking and correction codes ECC1-1˜ECC1-4 corresponding to the first user data D1-1˜D1-4 and corresponding to the first user data D1-1˜ECC1-4. management information S1-1 to S1-4 of user data D1-1 to D1-4. In particular, when the memory control circuit unit 104 (or the memory management circuit 202 ) receives the first user data D1, it will not immediately write the first user data D1 into the physical erasing unit. For example, the memory control circuit unit 104 (or the memory management circuit 202) will continue to wait for the host system 1000 to send other write commands and the second user data D2 and third user data D3 corresponding to these commands to the memory storage device 100, and count the number of physical programming units that need to be written into the second user data D2 and the third user data D3. It is assumed here that the memory control circuit unit 104 (or the memory management circuit 202 ) in this exemplary embodiment will generate a parity information for the data in the three physical programming units after every three physical programming units are written. In this exemplary embodiment, the memory control circuit unit 104 (or the memory management circuit 202) will determine that the number of physical programming units required to write the second user data D2 and the third user data D3 is two. , and the memory control circuit unit 104 (or the memory management circuit 202) will also write each piece of data according to the number of physical programming units that need to be written into each piece of data and the order in which each piece of data is received. Such data of the entity programmatic units are sorted in the order shown as sorting 900 in FIG. 9 .

在另一范例实施例中,也可以在写入三个以上或三个以下的实体程序化单元后,对此三个以上或三个以下的实体程序化单元中的数据产生一个奇偶信息,本发明不加以限制。此外,存储器控制电路单元104(或存储器管理电路202)等待主机系统1000所传送的其他写入指令与对应此些指令的数据笔数也不限于三笔。In another exemplary embodiment, after writing more than three or less than three physical programming units, a parity information may be generated for the data in more than three or less than three physical programming units. The invention is not limited. In addition, the memory control circuit unit 104 (or the memory management circuit 202 ) waits for other write commands sent by the host system 1000 and the number of data corresponding to these commands is not limited to three.

图9是根据本发明第三范例实施例所示出的根据写入数据欲写入的每一实体程序化单元的个数将其排列与记录标记值的范例,且图10是根据本发明第三范例实施例所示出的将写入数据、对应于写入数据的错误检查与校正码与用以记录奇偶信息的至少一标记写入至实体程序化单元的另一范例示意图。FIG. 9 is an example of arranging and recording tag values according to the number of each physical programming unit to be written in according to the third exemplary embodiment of the present invention, and FIG. 10 is an example according to the third exemplary embodiment of the present invention. Another exemplary schematic diagram of writing write data, ECC codes corresponding to the write data, and at least one mark for recording parity information into the physical programming unit shown in the three exemplary embodiments.

请参照图9,如上所述,由于存储器控制电路单元104(或存储器管理电路202)会在写入每三个实体程序化单元后,对每三个实体程序化单元中的数据产生一个奇偶信息,因此存储器控制电路单元104(或存储器管理电路202)会进一步地根据排序900为欲写入每一实体程序化单元的此些数据记录一标记值。具体而言,第一使用者数据D1-1的标记值会被记录为3,第一使用者数据D1-2的标记值会被记录为2,第一使用者数据D1-3的标记值会被记录为1,第一使用者数据D1-4的标记值会被记录为3,以及第二使用者数据D2-1的标记值会被记录为2且第二使用者数据D2-2的标记值会被记录为1。特别是,其余的第三使用者数据D3所需写入的实体程序化单元仅有两个,因此,存储器管理电路202会将第三使用者数据D3-1的标记值会被记录为2并且将第三使用者数据D3-2的标记值会被记录为1。Please refer to FIG. 9, as mentioned above, since the memory control circuit unit 104 (or the memory management circuit 202) will generate a parity information for the data in every three physical programming units after writing every three physical programming units Therefore, the memory control circuit unit 104 (or the memory management circuit 202 ) will further record a tag value for the data to be written into each physical programming unit according to the sorting 900 . Specifically, the tag value of the first user data D1-1 will be recorded as 3, the tag value of the first user data D1-2 will be recorded as 2, and the tag value of the first user data D1-3 will be is recorded as 1, the tag value of the first user data D1-4 will be recorded as 3, and the tag value of the second user data D2-1 will be recorded as 2 and the tag value of the second user data D2-2 The value will be recorded as 1. In particular, there are only two physical programming units to be written into the rest of the third user data D3, therefore, the memory management circuit 202 will record the flag value of the third user data D3-1 as 2 and The flag value of the third user data D3-2 is recorded as 1.

之后,存储器控制电路单元104(或存储器管理电路202)会自闲置区504提取实体抹除单元410(F+1)作为替换实体抹除单元,并且根据图9中所示的排序,将此些数据、对应此些数据的管理信息,以及对应此些数据的多个错误检查与校正码依序地写入至实体抹除单元410(F+1)。Afterwards, the memory control circuit unit 104 (or the memory management circuit 202) will extract the physical erasing unit 410 (F+1) from the free area 504 as a replacement physical erasing unit, and according to the sequence shown in FIG. Data, management information corresponding to the data, and error checking and correction codes corresponding to the data are sequentially written into the physical erasing unit 410 (F+1).

请参照图10,存储器控制电路单元104(或存储器管理电路202)会将第一使用者数据D1-1~D1-3与对应此些第一使用者数据的管理信息S1-1~S1-3,以及对应此些第一使用者数据的多个错误检查与校正码ECC1-1~ECC1-3依序地写入至实体抹除单元410(F+1)的第0个至第2个实体程序化单元中,其中在存储器控制电路单元104(或存储器管理电路202)将对应第一使用者数据D1-1~D1-3的管理信息S1-1~S1-3写入实体抹除单元410(F+1)中第0个至第2个实体程序化单元的冗余比特区中第一记录区的同时,存储器控制电路单元104(或存储器管理电路202)还会根据先前为第一使用者数据D1-1~D1-3所记录的标记值,在对应于第一使用者数据D1-1~D1-3的实体程序化单元的冗余比特区的第一记录区中记录此些标记值。此外,存储器控制电路单元104(或存储器管理电路202)会产生对应于第一使用者数据D1-1~D1-3与对应于第一使用者数据D1-1~D1-3的管理信息S1-1~S1-3的第一奇偶信息P1。举例来说,在此假设第一使用者数据D1-1~D1-3所写入的实体抹除单元410(F+1)中第0个至第2个实体程序化单元为第一实体程序化单元802,则存储器管理电路202会将应于第一使用者数据D1-1~D1-3及其管理信息S1-1~S1-3的奇偶信息P1写入至实体抹除单元410(F+1)中第3个实体程序化单元,在此假设实体抹除单元410(F+1)中的第3个实体程序化单元为第二实体程序化单元804,即,存储器控制电路单元104(或存储器管理电路202)会将对应于第一使用者数据D1-1~D1-3及其管理信息S1-1~S1-3的第一奇偶信息P1写入排列在第一实体程序化单元802之中的最后一个实体程序化单元(即,实体抹除单元410(F+1)中的第2个实体程序化单元)之后的第二实体程序化单元804。并且,以此类推,存储器控制电路单元104(或存储器管理电路202)会根据图9中的排序900接续地以第一使用者数据D1-4、第二使用者数据D2-1与第二使用者数据D2-2为一组,将对应此欲写入三个实体程序化单元中的数据的三个管理信息、三个错误检查与校正码以及奇偶信息分别且依序地写入实体抹除单元410(F+1)中的第三实体程序化单元806与第四实体程序化单元808中。特别是,由于其余的第三使用者数据D3欲写入的实体程序化单元的个数为2,因此存储器控制电路单元104(或存储器管理电路202)仅会以第三使用者数据D3-1与第三使用者数据D3-2为一组,并且将对应此欲写入两个实体程序化单元中的数据的两个管理信息、两个错误检查与校正码以及奇偶信息分别且依序地写入实体抹除单元410(F+1)中的第五实体程序化单元810与第六实体程序化单元812中。Please refer to FIG. 10, the memory control circuit unit 104 (or the memory management circuit 202) will combine the first user data D1-1~D1-3 with the management information S1-1~S1-3 corresponding to these first user data , and a plurality of error checking and correction codes ECC1-1~ECC1-3 corresponding to the first user data are sequentially written into the 0th to 2nd entities of the physical erasing unit 410 (F+1) In the programming unit, the memory control circuit unit 104 (or the memory management circuit 202) writes the management information S1-1~S1-3 corresponding to the first user data D1-1~D1-3 into the physical erasing unit 410 At the same time as the first recording area in the redundant bit area of the 0th to the 2nd entity programming unit in (F+1), the memory control circuit unit 104 (or the memory management circuit 202) will also The tag values recorded in user data D1-1~D1-3 are recorded in the first recording area corresponding to the redundant bit area of the physical programming unit of the first user data D1-1~D1-3 value. In addition, the memory control circuit unit 104 (or the memory management circuit 202) will generate the management information S1- The first parity information P1 of 1 to S1-3. For example, it is assumed here that the 0th to 2nd physical programming units in the physical erasing unit 410 (F+1) written by the first user data D1-1˜D1-3 are the first physical program unit 802, then the memory management circuit 202 will write the parity information P1 corresponding to the first user data D1-1~D1-3 and its management information S1-1~S1-3 into the physical erasing unit 410 (F +1) in the third physical programming unit, here it is assumed that the third physical programming unit in the physical erasing unit 410 (F+1) is the second physical programming unit 804, that is, the memory control circuit unit 104 (or the memory management circuit 202) will write and arrange the first parity information P1 corresponding to the first user data D1-1~D1-3 and its management information S1-1~S1-3 in the first entity programming unit The second physical programming unit 804 after the last physical programming unit in 802 (ie, the second physical programming unit in the physical erasing unit 410 (F+1)). And, by analogy, the memory control circuit unit 104 (or the memory management circuit 202) will successively use the first user data D1-4, the second user data D2-1 and the second user data according to the sequence 900 in FIG. The data D2-2 is a group, and the three management information, three error checking and correction codes and parity information corresponding to the data to be written into the three physical programming units are respectively and sequentially written into the physical erasing In the third entity programming unit 806 and the fourth entity programming unit 808 in the unit 410 (F+1). In particular, since the number of physical programming units to be written into the rest of the third user data D3 is 2, the memory control circuit unit 104 (or the memory management circuit 202) only uses the third user data D3-1 It is a group with the third user data D3-2, and two management information, two error checking and correction codes and parity information corresponding to the data to be written into the two entity programming units are separately and sequentially Write into the fifth physical programming unit 810 and the sixth physical programming unit 812 in the physical erasing unit 410 (F+1).

具体而言,分别位于实体抹除单元410(F+1)的第一实体程序化单元802、第三实体程序化单元806与第五实体程序化单元810中的第一标记值为1,第二标记值为2以及第三标记值为3。请再参照图10,第一标记值会被记录在第一实体程序化单元802之中的最后一个实体程序化单元(即,实体抹除单元410(F+1)中的第2个实体程序化单元)中冗余比特区的第一记录区,第二标记值会被记录在第一实体程序化单元802之中相邻且排列在最后一个实体程序化单元之前的实体程序化单元(即,实体抹除单元410(F+1)中的第1个实体程序化单元)的冗余比特区中,以及第三标记值会被记录在第一实体程序化单元802之中相邻且排列在记录第二标记值的实体程序化单元之前的实体程序化单元(即,实体抹除单元410(F+1)中的第0个实体程序化单元)的冗余比特区中。并且,以此类推,第三实体程序化单元806中的标记值会以图10中所示的排列方式排序。值得一提的是,第三使用者数据D3仅须写入两个实体程序化单元,因此,第五实体程序化单元810中仅会有第一标记值与第二标记值。Specifically, the value of the first flag in the first physical programming unit 802, the third physical programming unit 806, and the fifth physical programming unit 810 respectively located in the physical erasing unit 410 (F+1) is 1. The second flag has a value of 2 and the third flag has a value of 3. Please refer to FIG. 10 again, the first tag value will be recorded in the last physical programming unit in the first physical programming unit 802 (that is, the second physical program in the physical erasing unit 410 (F+1) programming unit), the second tag value will be recorded in the physical programming unit adjacent to and arranged before the last physical programming unit in the first physical programming unit 802 (i.e. , in the redundant bit area of the first physical programming unit in the physical erasing unit 410 (F+1), and the third mark value will be recorded in the first physical programming unit 802 adjacent and arranged In the redundant bit area of the physical programming unit (that is, the 0th physical programming unit in the physical erasing unit 410(F+1)) before the physical programming unit recording the second tag value. And, by analogy, the tag values in the third entity programming unit 806 will be sorted in the arrangement shown in FIG. 10 . It is worth mentioning that the third user data D3 only needs to be written into two physical programming units, therefore, there are only the first tag value and the second tag value in the fifth physical programming unit 810 .

之后,倘若存储器控制电路单元104(或存储器管理电路202)接收到主机系统1000所传送的欲读取上述第一使用者数据D1的读取指令时,存储器管理电路202(或错误检查与校正电路212)会依据所读取的错误检查与校正码对所读取的第一使用者数据D1进行上述的错误检查与校正程序。倘若无法通过使用第一使用者数据D1-1~D1-4的错误检查与校正码(即,ECC1-1~ECC1-4)来校正第一使用者数据D1-1~D1-4时,存储器控制电路单元104(或存储器管理电路202)会根据上述的至少一个标记值来获得记录第一奇偶信息P1与第二奇偶信息P2的实体程序化单元的地址。在此假设当无法通过使用第一使用者数据D1-2的错误检查与校正码ECC1-2来校正第一使用者数据D1-2且无法从对应于第一使用者数据D1-2的冗余比特区的第一记录区获得第二标记值时,存储器控制电路单元104(或存储器管理电路202)会从第一实体程序化单元802中邻近于第一使用者数据D1-2所在的第1个实体程序化单元的实体程序化单元(例如,实体抹除单元410(F+1)的第0个或第2个实体程序化单元)中获得至少一个标记值。在此假设存储器控制电路单元104(或存储器管理电路202)是从第一实体程序化单元802中的第2个实体程序化单元获得其冗余比特区的标记值为1,则存储器控制电路单元104(或存储器管理电路202)会判断对应于第一使用者数据D1-1~D1-3的第一奇偶信息P1所在的地址即为相邻于第一实体程序化单元802之中的最后一个实体程序化单元的实体程序化单元(即,第二实体程序化单元804),并且存储器控制电路单元104(或存储器管理电路202)会读取此第一奇偶信息P1以及依据所读取的第一奇偶信息P1来校正第一使用者数据D1。此外,假设存储器控制电路单元104(或存储器管理电路202)也可以从第一实体程序化单元802中的第0个实体程序化单元获得其冗余比特区的标记值为3,则存储器控制电路单元104(或存储器管理电路202)会判断对应于第一使用者数据D1-1~D1-3的第一奇偶信息P1所在的地址即为距离本身(即,第一实体程序化单元802中的第0个实体程序化单元)3个的实体程序化单元的第二实体程序化单元804。接着,存储器控制电路单元104(或存储器管理电路202)会读取此第一奇偶信息P1以及依据所读取的第一奇偶信息P1来校正第一使用者数据D1。据此,倘若对应每一实体化程序单元中的数据无法通过各自的错误检查与校正码而被校正时,或是每一实体化程序单元中的数据所对应的用以记录标记值的区域部分损坏时,存储器控制电路单元104(或存储器管理电路202)可根据相邻的实体程序化单元来获得用以指示奇偶信息的地址的标记值,由此也可以有效的预防所读取的数据发生无法校正的情况。Afterwards, if the memory control circuit unit 104 (or the memory management circuit 202) receives the read command sent by the host system 1000 to read the above-mentioned first user data D1, the memory management circuit 202 (or the error checking and correction circuit) 212) Perform the above error checking and correction procedure on the read first user data D1 according to the read error checking and correction code. If the first user data D1-1 to D1-4 cannot be corrected by using the error checking and correction codes (that is, ECC1-1 to ECC1-4) of the first user data D1-1 to D1-4, the memory The control circuit unit 104 (or the memory management circuit 202 ) will obtain the address of the physical programming unit recording the first parity information P1 and the second parity information P2 according to the above at least one flag value. It is assumed here that when the first user data D1-2 cannot be corrected by using the error checking and correction code ECC1-2 of the first user data D1-2 and cannot be obtained from the redundancy corresponding to the first user data D1-2 When the first recording area of the bit area obtains the second mark value, the memory control circuit unit 104 (or the memory management circuit 202) will obtain the second mark value from the first physical programming unit 802 adjacent to the first user data D1-2. At least one flag value is obtained in the physical programming unit of the physical programming unit (for example, the 0th or the 2nd physical programming unit of the physical erasing unit 410 (F+1)). Assuming that the memory control circuit unit 104 (or the memory management circuit 202) obtains the flag value of its redundant bit area from the second physical programming unit in the first physical programming unit 802, then the memory control circuit unit 104 (or the memory management circuit 202) will determine that the address of the first parity information P1 corresponding to the first user data D1-1˜D1-3 is the last one adjacent to the first physical programming unit 802 The physical programming unit of the physical programming unit (that is, the second physical programming unit 804), and the memory control circuit unit 104 (or the memory management circuit 202) will read the first parity information P1 and according to the read first parity information P1 A parity information P1 is used to correct the first user data D1. In addition, assuming that the memory control circuit unit 104 (or the memory management circuit 202) can also obtain the flag value of its redundant bit area from the 0th physical programming unit 802 in the first physical programming unit 802, then the memory control circuit The unit 104 (or the memory management circuit 202) will determine that the address where the first parity information P1 corresponding to the first user data D1-1˜D1-3 is located is the distance itself (that is, the address in the first entity programming unit 802 The second entity programming unit 804 of the 0th entity programming unit) of the 3 entity programming units. Next, the memory control circuit unit 104 (or the memory management circuit 202 ) reads the first parity information P1 and corrects the first user data D1 according to the read first parity information P1 . Accordingly, if the data corresponding to each materialized program unit cannot be corrected through the respective error checking and correction codes, or the area part for recording the tag value corresponding to the data in each materialized program unit When damaged, the memory control circuit unit 104 (or the memory management circuit 202) can obtain the tag value used to indicate the address of the parity information according to the adjacent entity programming unit, thereby effectively preventing the read data from occurring. Conditions that cannot be corrected.

[第四范例实施例][Fourth Exemplary Embodiment]

本发明第四范例实施例的存储器存储装置与主机系统本质上是相同于第一范例实施例的存储器存储装置与主机系统,其中差异在于第四范例实施例的存储器控制电路单元(或存储器管理电路)会建立一奇偶信息地址对应表,并且使用此奇偶信息地址对应表来记录每一奇偶信息所属的实体程序化单元地址。以下将使用图1A、图2与图3的装置结构来描述第四范例实施例与第一范例实施例的差异部分。The memory storage device and the host system of the fourth exemplary embodiment of the present invention are essentially the same as the memory storage device and the host system of the first exemplary embodiment, wherein the difference lies in the memory control circuit unit (or memory management circuit) of the fourth exemplary embodiment ) will establish a parity information address correspondence table, and use the parity information address correspondence table to record the physical programming unit address to which each parity information belongs. The differences between the fourth exemplary embodiment and the first exemplary embodiment will be described below using the device structures of FIG. 1A , FIG. 2 and FIG. 3 .

图11是根据本发明第四范例实施例所示出的将写入数据、对应于写入数据的错误检查与校正码程序化至实体程序化单元以及将用以记录奇偶信息的至少一标记记录在奇偶信息地址对应表的范例示意图。FIG. 11 shows programming of write data, error checking and correction codes corresponding to the write data to the physical programming unit, and recording at least one mark for recording parity information according to a fourth exemplary embodiment of the present invention. An example schematic diagram of the parity information address correspondence table.

请参照图11,图11所示的将第一使用者数据、对应于第一使用者数据的错误检查与校正码以及对应于第一使用者数据的奇偶信息写入至实体程序化单元的方法是相同于第一范例实施例中的图5A与图5B所示的方法,在此不再重复。其不同之处在于,在本范例实施例中,存储器控制电路单元104(或存储器管理电路202)会先建立一奇偶信息地址对应表110,并且奇偶信息地址对应表110会被存储在缓冲存储器208或随机存取存储器1104中。并且在存储器控制电路单元104(或存储器管理电路202)将第一使用者数据D1-1与D1-2、对应第一使用者数据D1-1与D1-2的管理信息S1-1与S1-2以及对应第一使用者数据D1-1与D1-2的错误检查与校正码ECC1-1与ECC1-2程序化至实体程序化单元之中的第一实体程序化单元602,以及将对应第一使用者数据D1-1与D1-2及其管理信息S1-1与S1-2的第一奇偶信息P1程序化至实体程序化单元之中的第二实体程序化单元604的操作中,存储器控制电路单元104(或存储器管理电路202)不会将用以记录第一奇偶信息P1的地址的第一标记M1程序化至第一实体程序化单元602中的至少其中一个实体程序化单元,而是将第一标记M1记录在先前所建立的奇偶信息地址对应表110。在另一范例实施例中,倘若主机系统1000传送一个写入指令与对应此写入指令的第二使用者数据D2给存储器存储装置100时,存储器控制电路单元104(或存储器管理电路202)会将此第二使用者数据D2与其所产生的对应此第二使用者数据D2的错误检查与校正码ECC2以及对应第二使用者数据D2的管理信息S2写入至实体抹除单元410(F)的第三实体程序化单元606中,特别是,存储器控制电路单元104(或存储器管理电路202)可以另外地提取一个实体抹除单元410(F+1),并将对应第二使用者数据D2及其管理信息S2的第二奇偶信息P2程序化至实体抹除单元410(F+1)中的第一实体程序化单元802,此外,存储器控制电路单元104(或存储器管理电路202)会将用以记录第二奇偶信息P2的地址的第二标记M2同样地记录在奇偶信息地址对应表110中。值得一提的是,在本范例实施例中,并不加以限制奇偶信息所存放的实体抹除单元,即,存储器控制电路单元104(或存储器管理电路202)所提取的用以记录奇偶信息的实体抹除单元也可以是不同于对应此奇偶信息的写入数据所在的实体抹除单元所对应的存储器晶粒。换言之,当无法通过使用第一使用者数据D1-1与D1-2的错误检查与校正码ECC1-1、ECC1-2来校正第一使用者数据D1-1或D1-2时,存储器控制电路单元104(或存储器管理电路202)即可根据奇偶信息地址对应表110获得记录第一奇偶信息P1的地址的第一标记M1,或是当无法通过使用第二使用者数据D2的错误检查与校正码ECC2来校正第二使用者数据D2时,存储器控制电路单元104(或存储器管理电路202)即可根据奇偶信息地址对应表110获得记录第二奇偶信息P2的地址的第二标记M2,据此,存储器控制电路单元104(或存储器管理电路202)可根据奇偶信息地址对应表110快速地获得奇偶信息是属于哪一个实体程序化单元。Please refer to FIG. 11 , the method shown in FIG. 11 for writing the first user data, the error checking and correction code corresponding to the first user data, and the parity information corresponding to the first user data into the entity programming unit It is the same as the method shown in FIG. 5A and FIG. 5B in the first exemplary embodiment, and will not be repeated here. The difference is that, in this exemplary embodiment, the memory control circuit unit 104 (or the memory management circuit 202) will first establish a parity information address correspondence table 110, and the parity information address correspondence table 110 will be stored in the buffer memory 208 or random access memory 1104. And in the memory control circuit unit 104 (or memory management circuit 202), the first user data D1-1 and D1-2, the management information S1-1 and S1-2 corresponding to the first user data D1-1 and D1-2 2 and the error checking and correction codes ECC1-1 and ECC1-2 corresponding to the first user data D1-1 and D1-2 are programmed into the first physical programming unit 602 among the physical programming units, and the corresponding second A user data D1-1 and D1-2 and the first parity information P1 of the management information S1-1 and S1-2 are programmed into the operation of the second physical programming unit 604 among the physical programming units, the memory The control circuit unit 104 (or the memory management circuit 202) will not program the first mark M1 for recording the address of the first parity information P1 to at least one of the physical programming units in the first physical programming unit 602, but It is to record the first mark M1 in the previously created parity information address correspondence table 110 . In another exemplary embodiment, if the host system 1000 sends a write command and the second user data D2 corresponding to the write command to the memory storage device 100, the memory control circuit unit 104 (or the memory management circuit 202) will Write the second user data D2 and its generated error checking and correction code ECC2 corresponding to the second user data D2 and the management information S2 corresponding to the second user data D2 into the physical erasing unit 410 (F) In the third physical programming unit 606, in particular, the memory control circuit unit 104 (or the memory management circuit 202) can additionally extract a physical erasing unit 410 (F+1), and will correspond to the second user data D2 The second parity information P2 of its management information S2 is programmed to the first physical programming unit 802 in the physical erasing unit 410 (F+1). In addition, the memory control circuit unit 104 (or memory management circuit 202) will The second mark M2 used to record the address of the second parity information P2 is also recorded in the parity information address correspondence table 110 . It is worth mentioning that, in this exemplary embodiment, there is no restriction on the physical erasing unit where the parity information is stored, that is, the memory control circuit unit 104 (or memory management circuit 202 ) extracts the unit for recording the parity information. The physical erasing unit may also be different from the memory die corresponding to the physical erasing unit where the write data corresponding to the parity information is located. In other words, when the first user data D1-1 or D1-2 cannot be corrected by using the error checking and correction codes ECC1-1, ECC1-2 of the first user data D1-1 and D1-2, the memory control circuit The unit 104 (or the memory management circuit 202) can obtain the first mark M1 of the address recording the first parity information P1 according to the parity information address correspondence table 110, or when the error checking and correction using the second user data D2 cannot be passed When the code ECC2 is used to correct the second user data D2, the memory control circuit unit 104 (or the memory management circuit 202) can obtain the second mark M2 of the address recording the second parity information P2 according to the parity information address correspondence table 110, according to which The memory control circuit unit 104 (or the memory management circuit 202 ) can quickly obtain which physical programming unit the parity information belongs to according to the parity information address correspondence table 110 .

图12是根据本发明的第四范例实施例所示出的数据存储方法的流程图。Fig. 12 is a flowchart of a data storage method according to a fourth exemplary embodiment of the present invention.

请参照图12,在步骤S1201中,存储器控制电路单元(或存储器管理电路)会建立一奇偶信息地址对应表。在步骤S1203中,存储器控制电路单元(或存储器管理电路)会依据第一数据产生一奇偶信息。接着,在步骤S1205中,存储器控制电路单元(或存储器管理电路)会将第一数据程序化至第一实体程序化单元的数据比特区。在步骤S1207中,存储器控制电路单元(或存储器管理电路)将所述奇偶信息程序化至至少一第二实体程序化单元中。并且在步骤S1209中,存储器控制电路单元(或存储器管理电路)将至少一标记记录于所述奇偶信息地址对应表,其中所述至少一标记会指示所述奇偶信息被程序化至所述第二实体程序化单元中。Please refer to FIG. 12 , in step S1201 , the memory control circuit unit (or memory management circuit) creates a parity information address correspondence table. In step S1203, the memory control circuit unit (or memory management circuit) generates parity information according to the first data. Next, in step S1205, the memory control circuit unit (or memory management circuit) programs the first data into the data bit area of the first physical programming unit. In step S1207, the memory control circuit unit (or memory management circuit) programs the parity information into at least one second physical programming unit. And in step S1209, the memory control circuit unit (or memory management circuit) records at least one mark in the parity information address correspondence table, wherein the at least one mark will indicate that the parity information is programmed into the second Entity programmatic unit.

综上所述,本发明范例实施例的数据存储方法、存储器控制电路单元与存储器存储装置会在写入数据的同时,将对应此些写入数据的奇偶信息的地址记录在至少一个标记中并且将此至少一标记写入所接收的数据所欲写入的至少一实体程序化单元,据此,当从可复写式非易失性存储器模块中读取的数据比特存在错误时,可以根据所述至少一标记,快速地获得奇偶信息是属于哪一个实体程序化单元,进而有效地增加错误校正的更正能力与效率。此外,本发明范例实施例的用以校正读取数据的奇偶信息所写入的实体程序化单元是排列在所写入之数据所在的实体程序化单元之后,基此,通过本发明范例实施例的数据存储方法不需要将对应于多笔写入数据的奇偶信息放置在系统中的固定的存储器晶粒,以有效地避免存储器存储装置中存储空间的浪费。To sum up, the data storage method, the memory control circuit unit and the memory storage device of the exemplary embodiments of the present invention record the address of the parity information corresponding to the written data in at least one mark while writing the data and Write the at least one mark into at least one physical programming unit where the received data is to be written, so that when there is an error in the data bit read from the rewritable non-volatile memory module, the At least one mark is used to quickly obtain which physical programming unit the parity information belongs to, thereby effectively increasing the correction capability and efficiency of error correction. In addition, the physical programming unit for correcting the parity information of the read data in the exemplary embodiment of the present invention is arranged after the physical programming unit where the written data is located. Based on this, through the exemplary embodiment of the present invention The data storage method does not need to place parity information corresponding to multiple pieces of written data in a fixed memory die in the system, so as to effectively avoid waste of storage space in the memory storage device.

最后应说明的是:以上各实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述各实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的范围。Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present invention, rather than limiting them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: It is still possible to modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the technical solutions of the various embodiments of the present invention. scope.

Claims (21)

1.一种数据存储方法,其特征在于,用于可复写式非易失性存储器模块,该可复写式非易失性存储器模块包括多个实体抹除单元,且每一该些实体抹除单元包括多个实体程序化单元,其中每一该些实体程序化单元包括数据比特区与冗余比特区,该数据存储方法包括:1. A data storage method, characterized in that, for a rewritable non-volatile memory module, the rewritable non-volatile memory module includes a plurality of entity erasing units, and each of these entities erases The unit includes a plurality of physical programming units, wherein each of the physical programming units includes a data bit area and a redundant bit area, and the data storage method includes: 依据第一数据产生奇偶信息;generating parity information according to the first data; 将该第一数据程序化至该些实体程序化单元之中的第一实体程序化单元中;以及programming the first data into a first physical programming unit among the physical programming units; and 将该奇偶信息程序化至该些实体程序化单元之中的至少一第二实体程序化单元中,其中该至少一第二实体程序化单元是排列在该第一实体程序化单元之后;programming the parity information into at least one second physical programming unit among the physical programming units, wherein the at least one second physical programming unit is arranged after the first physical programming unit; 其中在上述将该第一数据程序化至该些实体程序化单元之中的该第一实体程序化单元的步骤包括:将至少一标记程序化至该第一实体程序化单元之中的冗余比特区,其中该至少一标记指示该奇偶信息被程序化至该至少一第二实体程序化单元中。Wherein the step of programming the first data into the first physical programming unit among the physical programming units includes: programming at least one tag into the redundancy of the first physical programming unit A bit field, wherein the at least one flag indicates that the parity information is programmed into the at least one second physical programming unit. 2.根据权利要求1所述的数据存储方法,其特征在于,该第一数据包括使用者数据与对应该使用者数据的管理信息;2. The data storage method according to claim 1, wherein the first data includes user data and management information corresponding to the user data; 其中该使用者数据被程序化至该第一实体程序化单元之中的数据比特区,其中对应该使用者数据的该管理信息被程序化至该第一实体程序化单元之中的冗余比特区。Wherein the user data is programmed into the data bit area in the first physical programming unit, wherein the management information corresponding to the user data is programmed into the redundancy ratio in the first physical programming unit sar. 3.根据权利要求1所述的数据存储方法,其特征在于,该第一数据包括使用者数据、对应该使用者数据的管理信息以及对应该使用者数据的错误检查与校正码;3. The data storage method according to claim 1, wherein the first data includes user data, management information corresponding to the user data, and error checking and correction codes corresponding to the user data; 其中该错误检查与校正码是根据该使用者数据所产生的;Wherein the error checking and correction code is generated according to the user data; 其中该使用者数据被程序化至该第一实体程序化单元之中的数据比特区,其中对应该使用者数据的该管理信息被程序化至该第一实体程序化单元之中的冗余比特区,其中对应该使用者数据的该错误检查与校正码被程序化至该第一实体程序化单元之中的冗余比特区。Wherein the user data is programmed into the data bit area in the first physical programming unit, wherein the management information corresponding to the user data is programmed into the redundancy ratio in the first physical programming unit A special zone, wherein the ECC code corresponding to the user data is programmed into a redundant bit area in the first physical programming unit. 4.根据权利要求2或3所述的数据存储方法,其特征在于,将该至少一标记程序化至该第一实体程序化单元之中的冗余比特区的步骤包括:4. The data storage method according to claim 2 or 3, wherein the step of programming the at least one flag into the redundant bit area in the first physical programming unit comprises: 将第一标记程序化至该第一实体程序化单元之中的最后一个实体程序化单元的冗余比特区,其中该至少一第二实体程序化单元是排列在该第一实体程序化单元之中的该最后一个实体程序化单元之后,其中该第一标记指示该至少一第二实体程序化单元存储该奇偶信息;以及programming a first flag into a redundant bit area of the last physical programming unit of the first physical programming unit, wherein the at least one second physical programming unit is arranged before the first physical programming unit after the last physical programming unit in , wherein the first flag instructs the at least one second physical programming unit to store the parity information; and 将第二标记程序化至该些实体程序化单元之中的至少一第三实体程序化单元的冗余比特区,其中该至少一第三实体程序化单元是排列在该至少一第二实体程序化单元之后,其中该第二标记指示该至少一第二实体程序化单元存储该奇偶信息。programming the second flag into the redundant bit area of at least one third physical programming unit among the physical programming units, wherein the at least one third physical programming unit is arranged in the at least one second physical programming unit After the programming unit, wherein the second flag instructs the at least one second physical programming unit to store the parity information. 5.根据权利要求4所述的数据存储方法,其特征在于,将该至少一标记程序化至该第一实体程序化单元之中的冗余比特区的步骤还包括:5. The data storage method according to claim 4, wherein the step of programming the at least one flag into the redundant bit area in the first physical programming unit further comprises: 建立奇偶信息地址对应表;以及Establishing a parity information address correspondence table; and 将第三标记记录在该奇偶信息地址对应表,其中该第三标记指示该至少一第二实体程序化单元存储该奇偶信息。A third mark is recorded in the parity information address correspondence table, wherein the third mark instructs the at least one second physical programming unit to store the parity information. 6.根据权利要求1所述的数据存储方法,其特征在于,将该至少一标记程序化至该第一实体程序化单元之中的冗余比特区的步骤包括:6. The data storage method according to claim 1, wherein the step of programming the at least one flag into the redundant bit area in the first physical programming unit comprises: 计数该第一实体程序化单元的个数;以及counting the number of the first physical programming unit; and 根据该第一实体程序化单元的个数,在每一该第一实体程序化单元的冗余比特区中记录一标记值,其中记录在该第一实体程序化单元中的该标记值依据该第一实体程序化单元的排列依序地递减。According to the number of the first physical programming unit, record a flag value in the redundant bit area of each first physical programming unit, wherein the flag value recorded in the first physical programming unit is based on the The arrangement of the first entity programming units is sequentially decreased. 7.根据权利要求6所述的数据存储方法,其特征在于,该标记值之中的第一标记值为1,且该第一标记值被记录在该第一实体程序化单元之中的最后一个实体程序化单元的冗余比特区中,且该至少一第二实体程序化单元是排列在该第一实体程序化单元之中的该最后一个实体程序化单元之后;7. The data storage method according to claim 6, wherein the first tag value among the tag values is 1, and the first tag value is recorded in the last In a redundant bit area of a physical programming unit, and the at least one second physical programming unit is arranged after the last physical programming unit of the first physical programming unit; 其中该标记值之中的第二标记值为2,且该第二标记值被记录在该些第一实体程序化单元之中相邻且排列在该最后一个实体程序化单元之前的实体程序化单元的冗余比特区中;Wherein the second tag value among the tag values is 2, and the second tag value is recorded in the entity programming adjacent among the first entity programming units and arranged before the last entity programming unit In the redundant bit area of the unit; 其中该标记值之中的第三标记值为3,且该第三标记值被记录在该些第一实体程序化单元之中相邻且排列在记录该第二标记值的实体程序化单元之前的实体程序化单元的冗余比特区中。Wherein the third tag value among the tag values is 3, and the third tag value is recorded adjacent to and arranged before the entity programming unit recording the second tag value among the first entity programming units In the redundant bit area of the entity programming unit. 8.根据权利要求1所述的数据存储方法,其特征在于,该第一数据包括第二数据以及错误检查与校正码,该数据存储方法还包括:8. The data storage method according to claim 1, wherein the first data comprises second data and error checking and correction codes, and the data storage method further comprises: 当无法通过使用该错误检查与校正码来校正该第二数据时,根据该至少一标记获得记录该奇偶信息的该至少一第二实体程序化单元的地址,从该至少一第二实体程序化单元中读取该奇偶信息以及依据所读取的该奇偶信息来校正该第二数据。When the second data cannot be corrected by using the error checking and correcting code, the address of the at least one second physical programming unit recording the parity information is obtained according to the at least one mark, and the at least one second physical programming unit is programmed from the at least one second physical programming unit The parity information is read in the unit and the second data is corrected according to the read parity information. 9.一种数据存储方法,其特征在于,用于可复写式非易失性存储器模块,该可复写式非易失性存储器模块包括多个实体抹除单元,且每一该些实体抹除单元包括多个实体程序化单元,其中每一该些实体程序化单元包括数据比特区与冗余比特区,该数据存储方法包括:9. A data storage method, characterized in that it is used for a rewritable non-volatile memory module, the rewritable non-volatile memory module includes a plurality of entity erasing units, and each of these entities erases The unit includes a plurality of physical programming units, wherein each of the physical programming units includes a data bit area and a redundant bit area, and the data storage method includes: 建立奇偶信息地址对应表;Establish a parity information address correspondence table; 依据第一数据产生奇偶信息;generating parity information according to the first data; 将该第一数据程序化至该些实体程序化单元之中的第一实体程序化单元中;programming the first data into a first physical programming unit among the physical programming units; 将该奇偶信息程序化至该些实体程序化单元之中的至少一第二实体程序化单元中;以及programming the parity information into at least one second physical programming unit among the physical programming units; and 将至少一标记记录在该奇偶信息地址对应表,其中该至少一标记指示该奇偶信息被程序化至该至少一第二实体程序化单元中。At least one mark is recorded in the parity information address correspondence table, wherein the at least one mark indicates that the parity information is programmed into the at least one second physical programming unit. 10.一种存储器控制电路单元,其特征在于,用于控制可复写式非易失性存储器模块,其中该可复写式非易失性存储器模块包括多个实体抹除单元,且每一该些实体抹除单元包括多个实体程序化单元,其中每一该些实体程序化单元包括数据比特区与冗余比特区,该存储器控制电路单元包括:10. A memory control circuit unit, characterized in that it is used to control a rewritable non-volatile memory module, wherein the rewritable non-volatile memory module includes a plurality of entity erasing units, and each of these The physical erasing unit includes a plurality of physical programming units, wherein each of the physical programming units includes a data bit area and a redundant bit area, and the memory control circuit unit includes: 主机接口,用以耦接至主机系统;a host interface for coupling to a host system; 存储器接口,用以耦接至该可复写式非易失性存储器模块;以及a memory interface for coupling to the rewritable non-volatile memory module; and 存储器管理电路,耦接至该主机接口与该存储器接口;a memory management circuit coupled to the host interface and the memory interface; 其中该存储器管理电路用以依据第一数据产生奇偶信息;Wherein the memory management circuit is used to generate parity information according to the first data; 其中该存储器管理电路还用以将该第一数据程序化至该些实体程序化单元之中的第一实体程序化单元中;Wherein the memory management circuit is also used to program the first data into the first physical programming unit among the physical programming units; 其中该存储器管理电路还用以将该奇偶信息程序化至该些实体程序化单元之中的至少一第二实体程序化单元中,其中该至少一第二实体程序化单元是排列在该第一实体程序化单元之后;The memory management circuit is also used to program the parity information into at least one second physical programming unit among the physical programming units, wherein the at least one second physical programming unit is arranged in the first After the entity programmatic unit; 其中在上述将该第一数据程序化至该些实体程序化单元之中的该第一实体程序化单元的操作中,该存储器管理电路将至少一标记程序化至该第一实体程序化单元之中的冗余比特区,其中该至少一标记指示该奇偶信息被程序化至该至少一第二实体程序化单元中。Wherein in the above operation of programming the first data to the first physical programming unit among the physical programming units, the memory management circuit programs at least one flag to the first physical programming unit In the redundant bit field, the at least one flag indicates that the parity information is programmed into the at least one second physical programming unit. 11.根据权利要求10所述的存储器控制电路单元,其特征在于,该第一数据包括使用者数据与对应该使用者数据的管理信息;11. The memory control circuit unit according to claim 10, wherein the first data includes user data and management information corresponding to the user data; 其中该使用者数据被程序化至该第一实体程序化单元之中的数据比特区,其中对应该使用者数据的该管理信息被程序化至该些第一实体程序化单元之中的冗余比特区。Wherein the user data is programmed into the data bit area of the first physical programming unit, wherein the management information corresponding to the user data is programmed into the redundancy of the first physical programming units bit area. 12.根据权利要求10所述的存储器控制电路单元,其特征在于,该第一数据包括一使用者数据、对应该使用者数据的一管理信息以及对应该使用者数据的一错误检查与校正码;12. The memory control circuit unit according to claim 10, wherein the first data includes a user data, a management information corresponding to the user data, and an error checking and correction code corresponding to the user data ; 其中该错误检查与校正码是根据该使用者数据所产生的;Wherein the error checking and correction code is generated according to the user data; 其中该使用者数据被程序化至该第一实体程序化单元之中的数据比特区,其中对应该使用者数据的该管理信息被程序化至该第一实体程序化单元之中的冗余比特区,其中对应该使用者数据的该错误检查与校正码被程序化至该第一实体程序化单元之中的冗余比特区。Wherein the user data is programmed into the data bit area in the first physical programming unit, wherein the management information corresponding to the user data is programmed into the redundancy ratio in the first physical programming unit A special zone, wherein the ECC code corresponding to the user data is programmed into a redundant bit area in the first physical programming unit. 13.根据权利要求11或12所述的存储器控制电路单元,其特征在于,将该至少一标记程序化至该些第一实体程序化单元之中的冗余比特区的操作中,该存储器管理电路将第一标记程序化至该第一实体程序化单元之中的最后一个实体程序化单元的冗余比特区,其中该至少一第二实体程序化单元是排列在该第一实体程序化单元之中的该最后一个实体程序化单元之后,其中该第一标记指示该至少一第二实体程序化单元存储该奇偶信息;13. The memory control circuit unit according to claim 11 or 12, wherein the memory management The circuit programs the first flag to the redundant bit area of the last physical programming unit of the first physical programming unit, wherein the at least one second physical programming unit is arranged in the first physical programming unit After the last physical programming unit, wherein the first flag instructs the at least one second physical programming unit to store the parity information; 其中该存储器管理电路还用以将第二标记程序化至该些实体程序化单元之中的至少一第三实体程序化单元的冗余比特区,其中该至少一第三实体程序化单元是排列在该至少一第二实体程序化单元之后,并且该第二标记指示该至少一第二实体程序化单元存储该奇偶信息。Wherein the memory management circuit is also used to program the second flag to the redundant bit area of at least one third physical programming unit among the physical programming units, wherein the at least one third physical programming unit is an array After the at least one second physical programming unit, and the second flag instructs the at least one second physical programming unit to store the parity information. 14.一种存储器存储装置,其特征在于,包括:14. A memory storage device, comprising: 连接接口单元,用以耦接至主机系统;connecting the interface unit for coupling to the host system; 可复写式非易失性存储器模块,包括多个实体抹除单元,且每一该些实体抹除单元包括多个实体程序化单元,其中每一该些实体程序化单元包括数据比特区与冗余比特区;以及The rewritable non-volatile memory module includes a plurality of physical erasing units, and each of the physical erasing units includes a plurality of physical programming units, wherein each of the physical programming units includes data bit areas and redundancy Yubit area; and 存储器控制电路单元,耦接至该连接接口单元与该可复写式非易失性存储器模块;a memory control circuit unit coupled to the connection interface unit and the rewritable non-volatile memory module; 其中该存储器控制电路单元用以依据第一数据产生奇偶信息;Wherein the memory control circuit unit is used to generate parity information according to the first data; 其中该存储器控制电路单元还用以将该第一数据程序化至该些实体程序化单元之中的第一实体程序化单元中;Wherein the memory control circuit unit is also used to program the first data into the first physical programming unit among the physical programming units; 其中该存储器控制电路单元还用以将该奇偶信息程序化至该些实体程序化单元之中的至少一第二实体程序化单元中,其中该至少一第二实体程序化单元是排列在该第一实体程序化单元之后;The memory control circuit unit is also used to program the parity information into at least one second physical programming unit among the physical programming units, wherein the at least one second physical programming unit is arranged in the first physical programming unit After an entity programming unit; 其中在上述将该第一数据程序化至该些实体程序化单元之中的该第一实体程序化单元的操作中,该存储器控制电路单元将至少一标记程序化至该第一实体程序化单元之中的冗余比特区,其中该至少一标记指示该奇偶信息被程序化至该至少一第二实体程序化单元中。Wherein in the operation of programming the first data to the first physical programming unit among the physical programming units, the memory control circuit unit programs at least one flag to the first physical programming unit In the redundant bit field, the at least one flag indicates that the parity information is programmed into the at least one second physical programming unit. 15.根据权利要求14所述的存储器存储装置,其特征在于,每一该第一数据包括使用者数据与对应该使用者数据的管理信息;15. The memory storage device according to claim 14, wherein each of the first data includes user data and management information corresponding to the user data; 其中该使用者数据被程序化至该第一实体程序化单元之中的数据比特区,其中对应该使用者数据的该管理信息被程序化至该些第一实体程序化单元之中的冗余比特区。Wherein the user data is programmed into the data bit area of the first physical programming unit, wherein the management information corresponding to the user data is programmed into the redundancy of the first physical programming units bit area. 16.根据权利要求14所述的存储器存储装置,其特征在于,该第一数据包括使用者数据、对应该使用者数据的管理信息以及对应该使用者数据的错误检查与校正码;16. The memory storage device according to claim 14, wherein the first data comprises user data, management information corresponding to the user data, and error checking and correction code corresponding to the user data; 其中该错误检查与校正码是根据该使用者数据所产生的;Wherein the error checking and correction code is generated according to the user data; 其中该使用者数据被程序化至该第一实体程序化单元之中的数据比特区,其中对应该使用者数据的该管理信息被程序化至该第一实体程序化单元之中的冗余比特区,其中对应该使用者数据的该错误检查与校正码被程序化至该第一实体程序化单元之中的冗余比特区。Wherein the user data is programmed into the data bit area in the first physical programming unit, wherein the management information corresponding to the user data is programmed into the redundancy ratio in the first physical programming unit A special zone, wherein the ECC code corresponding to the user data is programmed into a redundant bit area in the first physical programming unit. 17.根据权利要求15或16所述的存储器存储装置,其特征在于,将该至少一标记程序化至该些第一实体程序化单元之中的冗余比特区的操作中,该存储器控制电路单元将第一标记程序化至该第一实体程序化单元之中的最后一个实体程序化单元的冗余比特区,其中该至少一第二实体程序化单元是排列在该第一实体程序化单元之中的该最后一个实体程序化单元之后,其中该第一标记指示该至少一第二实体程序化单元存储该奇偶信息;17. The memory storage device according to claim 15 or 16, characterized in that, in the operation of programming the at least one flag into the redundant bit area among the first physical programming units, the memory control circuit The unit programs the first flag to the redundant bit area of the last physical programming unit of the first physical programming unit, wherein the at least one second physical programming unit is arranged in the first physical programming unit After the last physical programming unit, wherein the first flag instructs the at least one second physical programming unit to store the parity information; 其中该存储器控制电路单元还用以将第二标记程序化至该些实体程序化单元之中的至少一第三实体程序化单元的冗余比特区,其中该至少一第三实体程序化单元是排列在该至少一第二实体程序化单元之后,其中该第二标记指示该至少一第二实体程序化单元存储该奇偶信息。The memory control circuit unit is also used to program the second flag to the redundant bit area of at least one third physical programming unit among the physical programming units, wherein the at least one third physical programming unit is Arranged after the at least one second physical programming unit, wherein the second flag instructs the at least one second physical programming unit to store the parity information. 18.根据权利要求17所述的存储器存储装置,其特征在于,将该至少一标记程序化至该第一实体程序化单元之中的冗余比特区的操作中,该存储器控制电路单元建立奇偶信息地址对应表并且将第三标记记录在该奇偶信息地址对应表,其中该第三标记指示该至少一第二实体程序化单元存储该奇偶信息。18. The memory storage device according to claim 17, characterized in that, in the operation of programming the at least one flag into the redundant bit area in the first physical programming unit, the memory control circuit unit establishes parity The information address correspondence table records a third mark in the parity information address correspondence table, wherein the third mark instructs the at least one second physical programming unit to store the parity information. 19.根据权利要求14所述的存储器存储装置,其特征在于,将该至少一标记程序化至该些第一实体程序化单元之中的冗余比特区的操作中,该存储器控制电路单元计数该第一实体程序化单元的个数,并且根据该第一实体程序化单元的个数,在每一该第一实体程序化单元的冗余比特区中记录一标记值,其中记录在该第一实体程序化单元中的该标记值依据该第一实体程序化单元的排列依序地递减。19. The memory storage device according to claim 14, characterized in that, in the operation of programming the at least one flag into the redundant bit area among the first physical programming units, the memory control circuit unit counts The number of the first physical programming unit, and according to the number of the first physical programming unit, record a flag value in the redundant bit area of each first physical programming unit, wherein the value recorded in the first physical programming unit The tag value in a physical programming unit is sequentially decremented according to the arrangement of the first physical programming unit. 20.根据权利要求19所述的存储器存储装置,其特征在于,该标记值之中的第一标记值为1,且该第一标记值被记录在该第一实体程序化单元之中的最后一个实体程序化单元的冗余比特区中,且该至少一第二实体程序化单元是排列在该第一实体程序化单元之中的该最后一个实体程序化单元之后;20. The memory storage device according to claim 19, wherein the first tag value among the tag values is 1, and the first tag value is recorded in the last of the first entity programming unit In a redundant bit area of a physical programming unit, and the at least one second physical programming unit is arranged after the last physical programming unit of the first physical programming unit; 其中该标记值之中的第二标记值为2,且该第二标记值被记录在该些第一实体程序化单元之中相邻且排列在该最后一个实体程序化单元之前的实体程序化单元的冗余比特区中;Wherein the second tag value among the tag values is 2, and the second tag value is recorded in the entity programming adjacent among the first entity programming units and arranged before the last entity programming unit In the redundant bit area of the unit; 其中该些标记值之中的第三标记值为3,且该第三标记值被记录在该些第一实体程序化单元之中相邻且排列在记录该第二标记值的实体程序化单元之前的实体程序化单元的冗余比特区中。Wherein the third tag value among the tag values is 3, and the third tag value is recorded in the first physical programming unit adjacent to and arranged in the physical programming unit recording the second tag value In the redundant bit area of the previous entity programming unit. 21.根据权利要求14所述的存储器存储装置,其特征在于,该第一数据包括第二数据以及错误检查与校正码,其中当无法通过使用该错误检查与校正码来校正该第二数据时,该存储器控制电路单元还用以根据该至少一标记获得记录该奇偶信息的该至少一第二实体程序化单元的地址,从该至少一第二实体程序化单元中读取该奇偶信息以及依据所读取的该奇偶信息来校正该第二数据。21. The memory storage device according to claim 14, wherein the first data comprises second data and an ECC code, wherein when the second data cannot be corrected by using the ECC code The memory control circuit unit is also used to obtain the address of the at least one second physical programming unit recording the parity information according to the at least one mark, read the parity information from the at least one second physical programming unit and according to The read parity information is used to correct the second data.
CN201410394322.9A 2014-08-12 2014-08-12 Data storage method, memory control circuit unit and memory storage device Active CN105335299B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410394322.9A CN105335299B (en) 2014-08-12 2014-08-12 Data storage method, memory control circuit unit and memory storage device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410394322.9A CN105335299B (en) 2014-08-12 2014-08-12 Data storage method, memory control circuit unit and memory storage device

Publications (2)

Publication Number Publication Date
CN105335299A CN105335299A (en) 2016-02-17
CN105335299B true CN105335299B (en) 2018-10-02

Family

ID=55285850

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410394322.9A Active CN105335299B (en) 2014-08-12 2014-08-12 Data storage method, memory control circuit unit and memory storage device

Country Status (1)

Country Link
CN (1) CN105335299B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101473308A (en) * 2006-05-18 2009-07-01 矽玛特公司 Non-volatile memory error correction system and method
CN102498472A (en) * 2009-09-16 2012-06-13 国际商业机器公司 Wear leveling of solid state disks based on usage information of data and parity received from a raid controller
CN103827833A (en) * 2011-07-22 2014-05-28 桑迪士克科技股份有限公司 Systems and methods of storing data

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010152542A (en) * 2008-12-24 2010-07-08 Toshiba Corp Memory system
TWI383399B (en) * 2009-03-03 2013-01-21 Wistron Corp Embedded electronic device and method for storing data
US8321775B2 (en) * 2009-04-21 2012-11-27 Micron Technology, Inc. Non-volatile memory with extended error correction protection
US8316175B2 (en) * 2009-11-03 2012-11-20 Inphi Corporation High throughput flash memory system
TWI447739B (en) * 2010-03-22 2014-08-01 Phison Electronics Corp Error correcting method, and memory controller and memory storage system using the same
US8458568B2 (en) * 2010-09-24 2013-06-04 International Business Machines Corporation Systems and methods for memory devices
TWI475385B (en) * 2012-03-14 2015-03-01 Phison Electronics Corp Method of programming memory cells and reading data, memory controller and memory storage device using the same

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101473308A (en) * 2006-05-18 2009-07-01 矽玛特公司 Non-volatile memory error correction system and method
CN102498472A (en) * 2009-09-16 2012-06-13 国际商业机器公司 Wear leveling of solid state disks based on usage information of data and parity received from a raid controller
CN103827833A (en) * 2011-07-22 2014-05-28 桑迪士克科技股份有限公司 Systems and methods of storing data

Also Published As

Publication number Publication date
CN105335299A (en) 2016-02-17

Similar Documents

Publication Publication Date Title
TWI516927B (en) Data writing method, memory controller and memory storage apparatus
TWI490871B (en) Method for preventing read-disturb, memory control circuit unit and memory storage apparatus
TW201539455A (en) Data storing method, memory control circuit unit and memory storage apparatus
CN104866429B (en) Memory management method, memory control circuit unit and memory storage device
CN103514096B (en) Data storage method, memory controller and memory storage device
TWI725416B (en) Data writing method, memory controlling circuit unit and memory storage device
CN105320464B (en) Method for preventing read interference, memory control circuit unit and memory device
TW202009942A (en) Data access method,memory control circuit unit and memory storage device
TW201603031A (en) Data management method, memory control circuit unit and memory storage apparatus
US8966344B2 (en) Data protecting method, memory controller and memory storage device
CN103678162B (en) System data storage method, memory controller and memory storage device
TWI509615B (en) Data storing method, and memory controller and memory storage apparatus using the same
TW201606503A (en) Data management method, memory control circuit unit and memory storage apparatus
CN104252317B (en) Data writing method, memory controller and memory storage device
CN104252600B (en) Data protection method, memory controller and memory storage device
TWI709850B (en) Data writing method, memory control circuit unit and memory storage device
CN104731710A (en) Memory management method, memory control circuit unit and memory storage device
TWI512750B (en) Data storing method, memory control circuit unit and memory storage device
CN109032957B (en) Memory management method, memory control circuit unit and memory storage device
CN106920572A (en) Memory management method, memory control circuit unit and memory storage device
TWI738390B (en) Data protection method, memory storage device and memory control circuit unit
CN105573661B (en) Data writing method, memory storage device and memory control circuit unit
CN110874282B (en) Data access method, memory control circuit unit and memory storage device
CN105335299B (en) Data storage method, memory control circuit unit and memory storage device
CN105573662A (en) Data writing method, memory control circuit unit and memory storage device

Legal Events

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