[go: up one dir, main page]

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

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

Info

Publication number
CN110837339B
CN110837339B CN201810938535.1A CN201810938535A CN110837339B CN 110837339 B CN110837339 B CN 110837339B CN 201810938535 A CN201810938535 A CN 201810938535A CN 110837339 B CN110837339 B CN 110837339B
Authority
CN
China
Prior art keywords
data
read
memory
unit
entity
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
CN201810938535.1A
Other languages
Chinese (zh)
Other versions
CN110837339A (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 CN201810938535.1A priority Critical patent/CN110837339B/en
Publication of CN110837339A publication Critical patent/CN110837339A/en
Application granted granted Critical
Publication of CN110837339B publication Critical patent/CN110837339B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0608Saving storage space on storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • G06F3/0656Data buffering arrangements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0679Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Read Only Memory (AREA)

Abstract

The invention provides a data merging method, which is used for a memory storage device. The method comprises the following steps: a data consolidation operation is performed to store valid data collected from the source node to the reclamation node. The data merging operation includes: reading first data from the first entity unit via a first read operation; performing a first-stage programming operation on the second entity unit according to the first data; reading the first data from the first entity unit again via a second read operation; and performing a second-stage programming operation on the second physical unit according to the first data read by the second reading operation. In addition, the invention also provides a memory storage device and a memory control circuit unit.

Description

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

技术领域technical field

本发明涉及一种存储器管理技术,尤其涉及一种数据整并方法、存储器存储装置及存储器控制电路单元。The invention relates to a memory management technology, in particular to a data integration method, a memory storage device and a memory control circuit unit.

背景技术Background technique

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

可复写式非易失性存储器模块可以是三阶存储单元(Triple Level Cell,TLC)NAND型快闪存储器模块(即,一个存储单元中可存储3个位元的快闪存储器模块)或四阶存储单元(Quad Level Cell,QLC)NAND型快闪存储器模块(即,一个存储单元中可存储4个位元的快闪存储器模块)。在TLC NAND型快闪存储器模块或QLC NAND型快闪存储器模块中,一个实体单元可以基于相同的写入数据而被程序化多次,以完整存储此写入数据。此外,对于不同实体单元的多个程序化操作可交错执行。因此,存储器存储装置中往往需要配置具有足够存储空间的缓冲存储器,以同时存储用于不同实体单元的写入数据。The rewritable non-volatile memory module can be a triple level cell (Triple Level Cell, TLC) NAND flash memory module (that is, a flash memory module that can store 3 bits in a storage unit) or a fourth-level Storage unit (Quad Level Cell, QLC) NAND flash memory module (that is, a flash memory module that can store 4 bits in one storage unit). In a TLC NAND type flash memory module or a QLC NAND type flash memory module, a physical unit can be programmed multiple times based on the same write data to fully store the write data. In addition, multiple programmed operations on different physical units can be interleaved. Therefore, it is often necessary to configure a buffer memory with sufficient storage space in the memory storage device to simultaneously store the written data for different physical units.

发明内容Contents of the invention

本发明提供一种数据整并方法、存储器存储装置及存储器控制电路单元,可节省在数据整并操作中缓冲存储器的使用空间。The invention provides a data integration method, a memory storage device and a memory control circuit unit, which can save the use space of the buffer memory in the data integration operation.

本发明的范例实施例提供一种数据整并方法,其用于包括多个实体单元的存储器存储装置,且所述数据整并方法包括:执行数据整并操作,以将从来源节点收集的有效数据存储至回收节点。所述来源节点包括所述实体单元中的至少一第一实体单元,所述回收节点包括所述实体单元中的一第二实体单元并且所述数据整并操作包括:经由第一读取操作从所述第一实体单元读取第一数据;根据所述第一数据对所述第二实体单元执行第一阶段程序化操作;在执行所述第一阶段程序化操作后,经由第二读取操作再次从所述第一实体单元读取所述第一数据;以及根据经由所述第二读取操作读取的所述第一数据对所述第二实体单元执行第二阶段程序化操作。Exemplary embodiments of the present invention provide a data integration method for a memory storage device including a plurality of physical units, and the data integration method includes: performing a data integration operation to combine valid data collected from a source node Data is stored to the recycling node. The source node includes at least a first physical unit of the physical units, the recycling node includes a second physical unit of the physical units, and the data integration operation includes: via a first read operation from The first physical unit reads the first data; performs a first-stage programming operation on the second physical unit according to the first data; after performing the first-stage programming operation, via the second reading operations to read the first data from the first physical unit again; and perform a second stage programming operation on the second physical unit based on the first data read via the second read operation.

在本发明的一范例实施例中,所述来源节点还包括所述实体单元中的至少一第三实体单元,所述回收节点还包括所述实体单元中的一第四实体单元,且所述数据整并操作还包括:从所述第三实体单元读取第二数据;以及在所述第一阶段程序化操作与所述第二阶段程序化操作之间,根据所述第二数据程序化所述第四实体单元。In an exemplary embodiment of the present invention, the source node further includes at least one third physical unit among the physical units, the recycling node further includes a fourth physical unit among the physical units, and the The data integration operation further includes: reading second data from the third entity unit; and programming according to the second data between the first-stage programming operation and the second-stage programming operation The fourth entity unit.

在本发明的一范例实施例中,所述数据整并操作还包括:将经由所述第一读取操作读取的所述第一数据暂存于缓冲存储器,以提供用于所述第一阶段程序化操作的所述第一数据;将第二数据暂存于所述缓冲存储器,且所述第二数据于所述缓冲存储器中覆盖经由所述第一读取操作读取的所述第一数据的至少一部分数据;以及将经由所述第二读取操作读取的所述第一数据暂存于所述缓冲存储器,以提供用于所述第二阶段程序化操作的所述第一数据。In an exemplary embodiment of the present invention, the data consolidation operation further includes: temporarily storing the first data read through the first read operation in a buffer memory, so as to provide data for the first The first data of the phase programming operation; temporarily storing the second data in the buffer memory, and the second data overwrites the first read through the first read operation in the buffer memory at least a portion of data; and temporarily storing the first data read through the second read operation in the buffer memory to provide the first data for the second stage programming operation data.

在本发明的一范例实施例中,所述的数据整并方法还包括:将读取信息纪录于管理表格,其中所述读取信息反映所述第一实体单元是否经过所述第一读取操作与所述第二读取操作的至少其中之一读取;以及根据所述读取信息抹除所述第一实体单元。In an exemplary embodiment of the present invention, the data integration method further includes: recording read information in a management table, wherein the read information reflects whether the first physical unit has passed the first read reading at least one of the operation and the second reading operation; and erasing the first physical unit according to the read information.

在本发明的一范例实施例中,所述的数据整并方法还包括:将经由所述第一读取操作或所述第二读取操作读取的所述第一数据暂存于缓冲存储器。所述第二实体单元具有基本容量,且所述缓冲存储器的可用容量小于所述基本容量的两倍。In an exemplary embodiment of the present invention, the data integration method further includes: temporarily storing the first data read through the first read operation or the second read operation in a buffer memory . The second physical unit has a basic capacity, and the available capacity of the buffer memory is less than twice the basic capacity.

本发明的范例实施例另提供一种存储器存储装置,其包括连接接口单元、可复写式非易失性存储器模块及存储器控制电路单元。所述连接接口单元用以连接至主机系统。所述可复写式非易失性存储器模块包括多个实体单元。所述存储器控制电路单元连接至所述连接接口单元与所述可复写式非易失性存储器模块。所述存储器控制电路单元用以执行数据整并操作,以将从来源节点收集的有效数据存储至回收节点。所述来源节点包括所述实体单元中的至少一第一实体单元,所述回收节点包括所述实体单元中的第二实体单元,并且所述数据整并操作包括:发送第一读取指令序列以指示经由第一读取操作从所述第一实体单元读取第一数据;发送第一写入指令序列以指示根据所述第一数据对所述第二实体单元执行第一阶段程序化操作;在执行所述第一阶段程序化操作后,发送第二读取指令序列以指示经由第二读取操作再次从所述第一实体单元读取所述第一数据;以及发送第二写入指令序列以指示根据经由所述第二读取操作读取的所述第一数据对所述第二实体单元执行第二阶段程序化操作。An exemplary embodiment of the present invention further provides a memory storage device, which includes a connection interface unit, a rewritable non-volatile memory module, and a memory control circuit unit. The connection interface unit is used for connecting to a host system. The rewritable non-volatile memory module includes multiple physical units. The memory control circuit unit is connected to the connection interface unit and the rewritable non-volatile memory module. The memory control circuit unit is used for performing a data integration operation, so as to store valid data collected from the source node into the recovery node. The source node includes at least one first physical unit among the physical units, the recycling node includes a second physical unit among the physical units, and the data consolidation operation includes: sending a first read instruction sequence Instructing to read first data from the first physical unit via a first read operation; sending a first write instruction sequence to instruct to perform a first-stage programming operation on the second physical unit according to the first data ; after performing the first-stage programming operation, sending a second read instruction sequence to indicate that the first data is read from the first physical unit again via a second read operation; and sending a second write The instruction sequence is to instruct to perform a second-stage programming operation on the second physical unit according to the first data read through the second read operation.

在本发明的一范例实施例中,所述数据整并操作还包括:将经由所述第一读取操作读取的所述第一数据暂存于缓冲存储器,以提供用于所述第一阶段程序化操作的所述第一数据;将第二数据暂存于所述缓冲存储器,且所述第二数据于所述缓冲存储器中覆盖经由所述第一读取操作读取的所述第一数据;以及将经由所述第二读取操作读取的所述第一数据暂存于所述缓冲存储器,以提供用于所述第二阶段程序化操作的所述第一数据。In an exemplary embodiment of the present invention, the data consolidation operation further includes: temporarily storing the first data read through the first read operation in a buffer memory, so as to provide data for the first The first data of the phase programming operation; temporarily storing the second data in the buffer memory, and the second data overwrites the first read through the first read operation in the buffer memory data; and temporarily storing the first data read through the second read operation in the buffer memory to provide the first data for the second stage programming operation.

在本发明的一范例实施例中,所述存储器控制电路单元还用以将读取信息纪录于管理表格并根据所述读取信息抹除所述第一实体单元。所述读取信息反映所述第一实体单元是否经过所述第一读取操作与所述第二读取操作的至少其中之一读取。In an exemplary embodiment of the present invention, the memory control circuit unit is further configured to record read information in a management table and erase the first entity unit according to the read information. The read information reflects whether the first physical unit is read through at least one of the first read operation and the second read operation.

在本发明的一范例实施例中,所述存储器控制电路单元还用以将经由所述第一读取操作或所述第二读取操作读取的所述第一数据暂存于缓冲存储器。所述第二实体单元具有基本容量,且所述缓冲存储器的可用容量小于所述基本容量的两倍。In an exemplary embodiment of the present invention, the memory control circuit unit is further configured to temporarily store the first data read through the first read operation or the second read operation in a buffer memory. The second physical unit has a basic capacity, and the available capacity of the buffer memory is less than twice the basic capacity.

本发明的范例实施例另提供一种存储器控制电路单元,其用于控制可复写式非易失性存储器模块。所述可复写式非易失性存储器模块包括多个实体单元。所述存储器控制电路单元包括主机接口、存储器接口及存储器管理电路。所述主机接口用以连接至主机系统。所述存储器接口用以连接至所述可复写式非易失性存储器模块。所述存储器管理电路连接至所述主机接口与所述存储器接口。所述存储器管理电路用以执行数据整并操作,以将从来源节点收集的有效数据存储至回收节点。所述来源节点包括所述实体单元中的至少一第一实体单元,所述回收节点包括所述实体单元中的第二实体单元,并且所述数据整并操作包括:发送第一读取指令序列以指示经由第一读取操作从所述第一实体单元读取第一数据;发送第一写入指令序列以指示根据所述第一数据对所述第二实体单元执行第一阶段程序化操作;在执行所述第一阶段程序化操作后,发送第二读取指令序列以指示经由第二读取操作再次从所述第一实体单元读取所述第一数据;以及发送第二写入指令序列以指示根据经由所述第二读取操作读取的所述第一数据对所述第二实体单元执行第二阶段程序化操作。An exemplary embodiment of the present invention further provides a memory control circuit unit for controlling a rewritable non-volatile memory module. The rewritable non-volatile memory module includes multiple physical units. The memory control circuit unit includes a host interface, a memory interface and a memory management circuit. The host interface is used for connecting to a host system. The memory interface is used for connecting to the rewritable non-volatile memory module. The memory management circuit is connected to the host interface and the memory interface. The memory management circuit is used for performing a data consolidation operation, so as to store valid data collected from the source node into the recovery node. The source node includes at least one first physical unit among the physical units, the recycling node includes a second physical unit among the physical units, and the data consolidation operation includes: sending a first read instruction sequence Instructing to read first data from the first physical unit via a first read operation; sending a first write instruction sequence to instruct to perform a first-stage programming operation on the second physical unit according to the first data ; after performing the first-stage programming operation, sending a second read instruction sequence to indicate that the first data is read from the first physical unit again via a second read operation; and sending a second write The instruction sequence is to instruct to perform a second-stage programming operation on the second physical unit according to the first data read through the second read operation.

在本发明的一范例实施例中,所述来源节点还包括所述实体单元中的至少一第三实体单元,所述回收节点还包括所述实体单元中的一第四实体单元,且所述数据整并操作还包括:发送第三读取指令序列以指示从所述第三实体单元读取第二数据;以及在所述第一阶段程序化操作与所述第二阶段程序化操作之间,发送第三写入指令序列以指示根据所述第二数据程序化所述第四实体单元。In an exemplary embodiment of the present invention, the source node further includes at least one third physical unit among the physical units, the recycling node further includes a fourth physical unit among the physical units, and the The data integration operation further includes: sending a third read instruction sequence to instruct to read second data from the third physical unit; and between the first-stage programming operation and the second-stage programming operation , sending a third write instruction sequence to instruct to program the fourth physical unit according to the second data.

在本发明的一范例实施例中,所述的存储器控制电路单元还包括缓冲存储器。所述缓冲存储器连接至所述存储器管理电路,且所述数据整并操作还包括:将经由所述第一读取操作读取的所述第一数据暂存于所述缓冲存储器,以提供用于所述第一阶段程序化操作的所述第一数据;将第二数据暂存于所述缓冲存储器,且所述第二数据于所述缓冲存储器中覆盖经由所述第一读取操作读取的所述第一数据;以及将经由所述第二读取操作读取的所述第一数据暂存于所述缓冲存储器,以提供用于所述第二阶段程序化操作的所述第一数据。In an exemplary embodiment of the present invention, the memory control circuit unit further includes a buffer memory. The buffer memory is connected to the memory management circuit, and the data integration operation further includes: temporarily storing the first data read through the first read operation in the buffer memory to provide The first data in the first stage programming operation; temporarily storing the second data in the buffer memory, and the second data in the buffer memory overwrites the data read by the first read operation fetching the first data; and temporarily storing the first data read through the second read operation in the buffer memory, so as to provide the first data for the second stage programming operation a data.

在本发明的一范例实施例中,所述存储器管理电路还用以将读取信息纪录于管理表格并根据所述读取信息抹除所述第一实体单元,其中所述读取信息反映所述第一实体单元是否经过所述第一读取操作与所述第二读取操作的至少其中之一读取。In an exemplary embodiment of the present invention, the memory management circuit is further configured to record read information in a management table and erase the first entity unit according to the read information, wherein the read information reflects the Whether the first physical unit is read through at least one of the first read operation and the second read operation.

在本发明的一范例实施例中,所述第二实体单元依序经由所述第一阶段程序化操作与所述第二阶段程序化操作的程序化以存储所述第一数据。In an exemplary embodiment of the present invention, the second entity unit stores the first data by sequentially programming the first-stage programming operation and the second-stage programming operation.

在本发明的一范例实施例中,所述第一阶段程序化操作与所述第二阶段程序化操作属于多阶段程序化操作,且所述第二实体单元中经所述多阶段程序化操作程序化的一个存储单元存储不少于3个位元。In an exemplary embodiment of the present invention, the first-stage programming operation and the second-stage programming operation belong to a multi-stage programming operation, and the second physical unit undergoes the multi-stage programming operation A programmed storage unit stores no less than 3 bits.

在本发明的一范例实施例中,所述的存储器控制电路单元还包括缓冲存储器。所述缓冲存储器连接至所述存储器管理电路,且所述存储器管理电路还用以将经由所述第一读取操作或所述第二读取操作读取的所述第一数据暂存于所述缓冲存储器。所述第二实体单元具有基本容量,且所述缓冲存储器的可用容量小于所述基本容量的两倍。In an exemplary embodiment of the present invention, the memory control circuit unit further includes a buffer memory. The buffer memory is connected to the memory management circuit, and the memory management circuit is also used to temporarily store the first data read through the first read operation or the second read operation in the memory management circuit. the buffer memory. The second physical unit has a basic capacity, and the available capacity of the buffer memory is less than twice the basic capacity.

基于上述,在数据整并操作中,第一实体单元中的相同数据可以被读取至少两次,以根据经由不同读取操作所读取的数据来完成对于第二实体单元的多阶段程序化操作。Based on the above, in the data integration operation, the same data in the first physical unit can be read at least twice, so as to complete the multi-stage programming of the second physical unit according to the data read through different read operations operate.

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

附图说明Description of drawings

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

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

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

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

图5A是根据本发明的一范例实施例所示出的存储单元阵列的示意图;FIG. 5A is a schematic diagram of a memory cell array according to an exemplary embodiment of the present invention;

图5B是根据本发明的另一范例实施例所示出的存储单元阵列的示意图;5B is a schematic diagram of a memory cell array according to another exemplary embodiment of the present invention;

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

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

图8是根据本发明的一范例实施例所示出的程序化实体单元的示意图;Fig. 8 is a schematic diagram of a programmed entity unit according to an exemplary embodiment of the present invention;

图9是根据本发明的一范例实施例所示出的程序化实体单元的示意图;Fig. 9 is a schematic diagram of a programmed entity unit according to an exemplary embodiment of the present invention;

图10是根据本发明的一范例实施例所示出的程序化实体单元的示意图;Fig. 10 is a schematic diagram of a programmatic entity unit according to an exemplary embodiment of the present invention;

图11是根据本发明的一范例实施例所示出的程序化某一个实体管理单元中的多个实体单元的示意图;Fig. 11 is a schematic diagram of programming multiple entity units in a certain entity management unit according to an exemplary embodiment of the present invention;

图12是根据本发明的一范例实施例所示出的数据整并操作的示意图;Fig. 12 is a schematic diagram of a data integration operation according to an exemplary embodiment of the present invention;

图13至图17是根据本发明的一范例实施例所示出的数据整并操作的示意图;13 to 17 are schematic diagrams of data integration operations according to an exemplary embodiment of the present invention;

图18是根据本发明的一范例实施例所示出的数据整并方法的流程图。FIG. 18 is a flow chart of a data consolidation method according to an exemplary embodiment of the present invention.

附图标号说明:Explanation of reference numbers:

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

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

110:系统总线110: System bus

111:处理器111: Processor

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

113:只读存储器113: ROM

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

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

20:主机板20: Motherboard

201:随身盘201: Pen drive

202:存储卡202: memory card

203:固态硬盘203: SSD

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

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

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

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

208:键盘208: Keyboard

209:荧幕209: screen

210:喇叭210: Horn

32:SD卡32: SD card

33:CF卡33: CF card

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

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

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

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

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

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

502、522:存储单元502, 522: storage unit

504:位线504: bit line

506:字线506: word line

508:共用源极线508: Shared source line

510、520:存储单元阵列510, 520: memory cell array

512:选择闸漏极晶体管512: Select Gate-Drain Transistor

514:选择闸源极晶体管514: select gate source transistor

524:位线524: bit line

524(1)~524(4):字节524(1)~524(4): bytes

526(1)~526(8):字线层:526(1)~526(8): word line layer:

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

604:主机接口604: host interface

606:存储器接口606: memory interface

608:错误检查与校正电路608: Error Checking and Correction Circuit

610:缓冲存储器610: buffer memory

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

701:存储区701: storage area

702:替换区702: Replacement area

710(0)~710(B)、1110(0)~1110(D)、1210(0)~1210(E)、1220(0)~1220(F)、1310(0)~1310(G)、1320(0)~1320(H)、1610(0)~1610(I):实体单元710(0)~710(B), 1110(0)~1110(D), 1210(0)~1210(E), 1220(0)~1220(F), 1310(0)~1310(G), 1320(0)~1320(H), 1610(0)~1610(I): entity unit

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

801、802、811~814、821~828、901~908、911~926、1001~1016、1021~1036:状态801, 802, 811~814, 821~828, 901~908, 911~926, 1001~1016, 1021~1036: Status

1110:实体管理单元1110: Entity snap-in

1210、1310、1320、1610:来源节点1210, 1310, 1320, 1610: source nodes

1220:回收节点1220: Recycle node

1300、1400、1600:数据1300, 1400, 1600: data

1301、1401、1501、1601、1701:读取操作1301, 1401, 1501, 1601, 1701: Read operation

1302、1402、1602:第一阶段程序化操作1302, 1402, 1602: The first stage of programmatic operation

1502、1702:第二阶段程序化操作1502, 1702: The second stage of programmatic operation

S1810:步骤(启动数据整并操作)S1810: Step (Start data consolidation operation)

S1820:步骤S1820: Steps

S1821:步骤(经由第一读取操作从第一实体单元读取第一数据)S1821: Step (reading the first data from the first physical unit via the first read operation)

S1822:步骤(根据第一数据对第二实体单元执行第一阶段程序化操作)S1822: Step (executing the first stage programming operation on the second entity unit according to the first data)

S1823:步骤(经由第二读取操作再次从第一实体单元读取第一数据)S1823: step (reading the first data from the first physical unit again via the second read operation)

S1824:步骤(根据经由第二读取操作读取的第一数据对第二实体单元执行第二阶段程序化操作)S1824: Step (perform a second-stage programming operation on the second physical unit according to the first data read via the second read operation)

S1830:步骤(结束数据整并操作)S1830: step (end data consolidation operation)

具体实施方式Detailed ways

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

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

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

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

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

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

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

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

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

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

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

可复写式非易失性存储器模块406中的存储单元是以阵列的方式设置。以下分别以二维阵列与三维阵列来对不同范例实施例中的存储单元阵列进行说明。须注意的是,以下范例实施例只是存储单元阵列的几种范例,在其他的范例实施例中,存储单元阵列的配置方式可以被调整以符合实务上的需求。The storage units in the rewritable non-volatile memory module 406 are arranged in an array. The memory cell arrays in different exemplary embodiments are described below with two-dimensional arrays and three-dimensional arrays respectively. It should be noted that the following exemplary embodiments are just some examples of memory cell arrays, and in other exemplary embodiments, the configuration of the memory cell arrays can be adjusted to meet practical requirements.

图5A是根据本发明的一范例实施例所示出的存储单元阵列的示意图。FIG. 5A is a schematic diagram of a memory cell array according to an exemplary embodiment of the present invention.

请参照图5A,存储单元阵列510包括用以存储数据的多个存储单元502、多个选择闸漏极(select gate drain,SGD)晶体管512与多个选择闸源极(select gate source,SGS)晶体管514、连接此些存储单元502的多条位线504、多条字线506、与共用源极线508。存储单元502是以阵列方式配置在位线504与字线506的交叉点上,如图5A所示。Referring to FIG. 5A, the memory cell array 510 includes a plurality of memory cells 502 for storing data, a plurality of select gate drain (SGD) transistors 512 and a plurality of select gate source (SGS) The transistor 514 , a plurality of bit lines 504 , a plurality of word lines 506 , and a common source line 508 are connected to the memory cells 502 . The memory cells 502 are arranged in an array at intersections of bit lines 504 and word lines 506 , as shown in FIG. 5A .

图5B是根据本发明的另一范例实施例所示出的存储单元阵列的示意图。FIG. 5B is a schematic diagram of a memory cell array according to another exemplary embodiment of the present invention.

请参照图5B,存储单元阵列520包括用以存储数据的多个存储单元522、多个字节524(1)~524(4)及多个字线层526(1)~526(8)。字节524(1)~524(4)彼此独立(例如,彼此分离)并且沿第一方向(例如,X轴)排列。字节524(1)~524(4)中的每一个字节包括彼此独立(例如,彼此分离)的多条位线524。包含于每一字节中的位线524沿第二方向(例如,Y轴)排列并且往第三方向(例如,Z轴)延伸。字线层526(1)~526(8)彼此独立(例如,彼此分离)并且沿第三方向堆叠。在本范例实施例中,字线层526(1)~526(8)中的每一个字线层亦可视为一个平面(亦称为字线平面)。每一个存储单元522被配置于字节524(1)~524(4)中的每一位线524与字线层526(1)~526(8)之间的每一个交错处。然而,在另一范例实施例中,一个字节可以包括更多或更少的位线,并且一个字线层也可以让更多或更少的字节通过。Referring to FIG. 5B, the memory cell array 520 includes a plurality of memory cells 522 for storing data, a plurality of bytes 524(1)-524(4), and a plurality of word line layers 526(1)-526(8). Bytes 524(1)-524(4) are independent of each other (eg, separated from each other) and are arranged along a first direction (eg, X-axis). Each of bytes 524(1)-524(4) includes a plurality of bit lines 524 that are independent of each other (eg, separated from each other). The bit lines 524 included in each byte are arranged along a second direction (eg, Y axis) and extend toward a third direction (eg, Z axis). The word line layers 526(1)˜526(8) are independent from each other (eg, separated from each other) and are stacked along a third direction. In this exemplary embodiment, each of the word line layers 526 ( 1 )˜ 526 ( 8 ) can also be regarded as a plane (also referred to as a word line plane). Each memory cell 522 is configured at each intersection between each bit line 524 in bytes 524(1)-524(4) and word line layers 526(1)-526(8). However, in another example embodiment, a byte may include more or fewer bit lines, and a word line layer may pass through more or fewer bytes.

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

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

请参照图6,存储器控制电路单元404包括存储器管理电路602、主机接口604及存储器接口606。Referring to FIG. 6 , the memory control circuit unit 404 includes a memory management circuit 602 , a host interface 604 and a memory interface 606 .

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

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

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

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

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

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

在一范例实施例中,存储器控制电路单元404还包括错误检查与校正电路608、缓冲存储器610与电源管理电路612。In an exemplary embodiment, the memory control circuit unit 404 further includes an error checking and correction circuit 608 , a buffer memory 610 and a power management circuit 612 .

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

缓冲存储器610是连接至存储器管理电路602并且用以暂存来自于主机系统11的数据与指令或来自于可复写式非易失性存储器模块406的数据。电源管理电路612是连接至存储器管理电路602并且用以控制存储器存储装置10的电源。The buffer memory 610 is connected to the memory management circuit 602 and used for temporarily storing data and instructions from the host system 11 or data from the rewritable non-volatile memory module 406 . The power management circuit 612 is connected to the memory management circuit 602 and used to control the power of the memory storage device 10 .

在一范例实施例中,图4的可复写式非易失性存储器模块406亦称为快闪(flash)存储器模块,存储器控制电路单元404亦称为用于控制快闪存储器模块的快闪存储器控制器,和/或图6的存储器管理电路亦称为快闪存储器管理电路。In an exemplary embodiment, the rewritable non-volatile memory module 406 of FIG. 4 is also called a flash memory module, and the memory control circuit unit 404 is also called a flash memory for controlling the flash memory module. The controller, and/or the memory management circuit of FIG. 6 is also referred to as a flash memory management circuit.

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

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

存储器管理电路602是基于一个实体单元来程序化存储单元。也就是说,属于同一个实体单元的存储单元可同步被程序化。例如,一个实体单元可以包括N条字线上的存储单元,且N可以为4或其他整数(例如2、8或16等)。换言之,一个实体单元可包含N条字线上的存储单元或由N条字线上的存储单元组成。然而,在另一范例实施例中,一个实体单元也可以包含更多或更少的存储单元,本发明不加以限制。在一范例实施例中,一个实体单元亦可称为一个层(或存储器层)。The memory management circuit 602 programs memory cells on a physical unit basis. That is, storage units belonging to the same physical unit can be programmed simultaneously. For example, a physical unit may include storage units on N word lines, and N may be 4 or other integers (such as 2, 8 or 16, etc.). In other words, a physical cell may include or consist of memory cells on N word lines. However, in another exemplary embodiment, a physical unit may also include more or less storage units, which is not limited by the present invention. In an exemplary embodiment, a physical unit may also be called a layer (or memory layer).

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

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

在一范例实施例中,存储器管理电路602会对某一实体单元执行一多阶段程序化操作,以将数据(亦称为写入数据)存储至此实体单元。例如,此多阶段程序化操作可至少包括第一阶段程序化操作与第二阶段程序化操作,且第二阶段程序化操作会在第一阶段程序化操作之后执行。此外,在执行对于此实体单元的第一阶段程序化操作与第二阶段程序化操作之间,对于另一个实体单元的程序化操作可被执行。In an exemplary embodiment, the memory management circuit 602 performs a multi-stage programming operation on a physical unit to store data (also referred to as writing data) into the physical unit. For example, the multi-stage programming operation may at least include a first-stage programming operation and a second-stage programming operation, and the second-stage programming operation will be performed after the first-stage programming operation. In addition, between performing the first-stage programming operation and the second-stage programming operation on this physical unit, a programming operation on another physical unit may be performed.

图8是根据本发明的一范例实施例所示出的程序化实体单元的示意图。以TLCNAND型快闪存储器模块为例,对于某一个实体单元的多阶段程序化操作可将属于此实体单元的每一个存储单元程序化至存储3个位元的状态。FIG. 8 is a schematic diagram of a programmatic entity unit according to an exemplary embodiment of the present invention. Taking the TLCNAND flash memory module as an example, the multi-stage programming operation for a certain physical unit can program each storage unit belonging to the physical unit to a state of storing 3 bits.

请参照图8,在程序化某一个实体单元之前,此实体单元的存储单元皆属于状态ERA。例如,在抹除此实体单元后,经抹除的存储单元皆属于状态ERA。属于状态ERA的存储单元的临界电压皆位于一预设电压范围(亦称为抹除电压范围)内。在对此实体单元执行一次程序化操作后,经程序化的存储单元可属于状态801与状态802。属于不同状态的存储单元会具有不同的临界电压。例如,属于状态802的存储单元的临界电压大于属于状态801的存储单元的临界电压。然后,在对此实体单元执行下一次程序化操作后,经程序化的存储单元会属于状态811~814且存储单元的临界电压会随之改变。例如,属于状态811的存储单元具有最低的临界电压,而属于状态814的存储单元具有最高的临界电压。接着,在对此实体单元执行下一次程序化操作后,经程序化的存储单元会属于状态821~828且存储单元的临界电压会随之改变。例如,属于状态821的存储单元具有最低的临界电压,而属于状态828的存储单元具有最高的临界电压。属于状态821~828的每一个存储单元皆存储3个位元。Please refer to FIG. 8 , before a certain physical unit is programmed, the storage units of the physical unit belong to the state ERA. For example, after erasing the physical unit, the erased memory units all belong to the state ERA. The threshold voltages of the memory cells belonging to the state ERA are all within a predetermined voltage range (also called the erase voltage range). After a programming operation is performed on this physical unit, the programmed memory unit can belong to state 801 and state 802 . Memory cells belonging to different states have different threshold voltages. For example, the threshold voltage of memory cells belonging to state 802 is greater than the threshold voltage of memory cells belonging to state 801 . Then, after the next programming operation is performed on this physical cell, the programmed memory cells will belong to the states 811-814 and the threshold voltage of the memory cells will change accordingly. For example, memory cells belonging to state 811 have the lowest threshold voltage, while memory cells belonging to state 814 have the highest threshold voltage. Then, after the next programming operation is performed on this physical cell, the programmed memory cells will belong to states 821-828 and the threshold voltage of the memory cells will change accordingly. For example, memory cells belonging to state 821 have the lowest threshold voltage, while memory cells belonging to state 828 have the highest threshold voltage. Each memory cell belonging to states 821-828 stores 3 bits.

图9是根据本发明的一范例实施例所示出的程序化实体单元的示意图。以QLCNAND型快闪存储器模块为例,对于某一个实体单元的多阶段程序化操作可将属于此实体单元的每一个存储单元程序化至存储4个位元的状态。FIG. 9 is a schematic diagram of a programmatic entity unit according to an exemplary embodiment of the present invention. Taking the QLCNAND flash memory module as an example, the multi-stage programming operation for a certain physical unit can program each storage unit belonging to the physical unit to a state of storing 4 bits.

请参照图9,以QLC NAND型快闪存储器模块为例,在程序化某一个实体单元之前,此实体单元的存储单元皆属于状态ERA。在对此实体单元执行一次程序化操作后,经程序化的存储单元会属于状态901~908。例如,属于状态908的存储单元的临界电压大于属于状态901的存储单元的临界电压。然后,在对此实体单元执行下一次程序化操作后,经程序化的存储单元会属于状态911~926且存储单元的临界电压会随之改变。例如,属于状态926的存储单元的临界电压大于属于状态911的存储单元的临界电压。属于状态911~926的每一个存储单元皆存储4个位元。Please refer to FIG. 9 , taking the QLC NAND type flash memory module as an example, before programming a certain physical unit, the memory cells of this physical unit all belong to the state ERA. After a programming operation is performed on the physical unit, the programmed storage unit will belong to states 901-908. For example, the threshold voltage of memory cells belonging to state 908 is greater than the threshold voltage of memory cells belonging to state 901 . Then, after the next programming operation is performed on this physical cell, the programmed memory cells will belong to the states 911-926 and the threshold voltages of the memory cells will change accordingly. For example, the threshold voltage of memory cells belonging to state 926 is greater than the threshold voltage of memory cells belonging to state 911 . Each memory cell belonging to states 911-926 stores 4 bits.

在图8与图9的范例实施例中,先执行的程序化操作可视为所述第一阶段程序化操作,而后执行的程序化操作可视为所述第二阶段程序化操作。例如,在图8的一范例实施例中,第一阶段程序化操作将存储单元程序化至属于状态801与802(或811~814),而第二阶段程序化操作则将存储单元程序化至属于状态811~814(或821~828)。在图9的一范例实施例中,第一阶段程序化操作将存储单元程序化至属于状态901~908,而第二阶段程序化操作则将存储单元程序化至属于状态911~926。须注意的是,本发明并不限制多阶段程序化操作中不同程序化阶段对于存储单元的程序化程序。In the exemplary embodiments of FIG. 8 and FIG. 9 , the programming operation executed first may be regarded as the first-stage programming operation, and the programming operation executed later may be regarded as the second-stage programming operation. For example, in an exemplary embodiment of FIG. 8, the first-stage programming operation programs the memory cells to belong to states 801 and 802 (or 811-814), and the second-stage programming operation programs the memory cells to It belongs to states 811-814 (or 821-828). In an exemplary embodiment of FIG. 9 , the first-stage programming operation programs the memory cells to belong to states 901 - 908 , and the second-stage programming operation programs the memory cells to belong to states 911 - 926 . It should be noted that the present invention does not limit the programming procedure of the memory cells in different programming stages in the multi-stage programming operation.

图10是根据本发明的一范例实施例所示出的程序化实体单元的示意图。本范例实施例也是以QLC NAND型快闪存储器模块的程序化为例。FIG. 10 is a schematic diagram of a programmatic entity unit according to an exemplary embodiment of the present invention. This exemplary embodiment also takes the programming of the QLC NAND flash memory module as an example.

请参照图10,在程序化某一个实体单元之前,此实体单元的存储单元皆属于状态ERA。在对此实体单元执行一次程序化操作后,经程序化的存储单元会属于状态1001~1016。然后,在对此实体单元执行下一次程序化操作后,经程序化的存储单元会属于状态1021~1036。属于状态1021~1036的每一个存储单元皆存储4个位元。须注意的是,在图10的范例实施例中,第一阶段程序化操作是概略地调整存储单元的临界电压。尔后,在第二阶段程序化操作中,存储单元的临界电压被更精确地调整至对应于状态1021~1036的电压位置。Please refer to FIG. 10 , before a certain physical unit is programmed, the storage units of this physical unit all belong to the state ERA. After a programming operation is performed on the physical unit, the programmed storage unit will belong to states 1001-1016. Then, after the next programming operation is performed on this physical unit, the programmed memory unit will belong to the states 1021-1036. Each memory cell belonging to states 1021-1036 stores 4 bits. It should be noted that in the exemplary embodiment of FIG. 10 , the first-stage programming operation roughly adjusts the threshold voltage of the memory cell. Then, in the second stage of programming operation, the threshold voltage of the memory cell is more precisely adjusted to the voltage position corresponding to the states 1021-1036.

图11是根据本发明的一范例实施例所示出的程序化某一个实体管理单元中的多个实体单元的示意图。Fig. 11 is a schematic diagram of programming multiple entity units in a certain entity management unit according to an exemplary embodiment of the present invention.

请参照图11,一个实体管理单元1110包括多个实体单元1110(0)~1110(D)。例如,D可为8、16、32等正整数,本发明不加以限制。在一范例实施例中,属于实体管理单元1110的实体单元1110(0)~1110(D)可被同步抹除。此外,实体单元1110(0)~1110(D)会被交错地程序化。Referring to FIG. 11 , an entity management unit 1110 includes a plurality of entity units 1110 ( 0 )˜1110 (D). For example, D can be a positive integer such as 8, 16, 32, etc., which is not limited in the present invention. In an exemplary embodiment, the physical units 1110(0)˜1110(D) belonging to the physical management unit 1110 can be erased synchronously. In addition, the physical units 1110(0)˜1110(D) are programmed alternately.

在一范例实施例中,在将数据存入实体管理单元1110时,实体单元1110(0)~1110(D)可依照图11中标示的数字来依序执行多阶段程序化操作。例如,某一写入数据(亦称为第一数据)可先被暂存于图6的缓冲存储器610。根据缓冲存储器610中的第一数据,实体单元1110(0)的第一阶段程序化操作可被执行(对应于图11的标号1)。在执行实体单元1110(0)的第一阶段程序化操作后,另一写入数据(亦称为第二数据)可被暂存于缓冲存储器610。根据缓冲存储器610中的第二数据,实体单元1110(1)的第一阶段程序化操作可被执行(对应于图11的标号2)。在执行实体单元1110(1)的第一阶段程序化操作后,根据缓冲存储器610中的第一数据,实体单元1110(0)的第二阶段程序化操作可被执行(对应于图11的标号3)。须注意的是,在完成实体单元1110(0)的第二阶段程序化操作后,可判定对于实体单元1110(0)的多阶段程序化操作已完成且第一数据已被存储于实体单元1110(0)。In an exemplary embodiment, when storing data into the physical management unit 1110 , the physical units 1110 ( 0 )˜1110 (D) may sequentially execute multi-stage programming operations according to the numbers marked in FIG. 11 . For example, certain write data (also referred to as first data) may be temporarily stored in the buffer memory 610 in FIG. 6 . According to the first data in the buffer memory 610, the first-stage programming operation of the physical unit 1110(0) can be executed (corresponding to number 1 in FIG. 11 ). After performing the first-stage programming operation of the physical unit 1110 ( 0 ), another write data (also referred to as second data) may be temporarily stored in the buffer memory 610 . According to the second data in the buffer memory 610, the first-stage programming operation of the physical unit 1110(1) can be executed (corresponding to number 2 in FIG. 11 ). After executing the first-stage programming operation of the physical unit 1110(1), according to the first data in the buffer memory 610, the second-stage programming operation of the physical unit 1110(0) can be executed (corresponding to the label in FIG. 11 3). It should be noted that after the second-stage programming operation of the physical unit 1110(0) is completed, it can be determined that the multi-stage programming operation for the physical unit 1110(0) has been completed and the first data has been stored in the physical unit 1110 (0).

在执行实体单元1110(0)的第二阶段程序化操作后,另一写入数据(亦称为第三数据)可被暂存于图6的缓冲存储器610。然后,根据缓冲存储器610中的第三数据,实体单元1110(2)的第一阶段程序化操作可被执行(对应于图11的标号4)。在执行实体单元1110(2)的第一阶段程序化操作后,第二数据可再次被暂存于图6的缓冲存储器610。然后,根据缓冲存储器610中的第二数据,实体单元1110(1)的第二阶段程序化操作可被执行(对应于图11的标号5)。须注意的是,在完成实体单元1110(1)的第二阶段程序化操作后,可判定对于实体单元1110(1)的多阶段程序化操作已完成且第二数据已被存储于实体单元1110(1)。依此类推,实体管理单元1110中的剩余实体单元可以交错地被程序化,以存储其他数据。After performing the second-stage programming operation of the physical unit 1110(0), another write data (also referred to as third data) may be temporarily stored in the buffer memory 610 of FIG. 6 . Then, according to the third data in the buffer memory 610, the first-stage programming operation of the physical unit 1110(2) can be executed (corresponding to number 4 in FIG. 11 ). After performing the first-stage programming operation of the physical unit 1110(2), the second data may be temporarily stored in the buffer memory 610 of FIG. 6 again. Then, according to the second data in the buffer memory 610, the second-stage programming operation of the physical unit 1110(1) can be executed (corresponding to number 5 in FIG. 11 ). It should be noted that after the second-stage programming operation of the physical unit 1110(1) is completed, it can be determined that the multi-stage programming operation for the physical unit 1110(1) has been completed and the second data has been stored in the physical unit 1110 (1). By analogy, the rest of the entity units in the entity management unit 1110 can be interleavedly programmed to store other data.

在一范例实施例中,缓冲存储器610的可用容量可能会受到设备建置成本的限制。例如,设计人员可能会减少缓冲存储器610的可用容量来降低设备建置成本。因此,在一范例实施例中,图6的缓冲存储器610的可用空间可能不足以同时存储所述第一数据与所述第二数据。或者,从另一角度来看,假设每一个实体单元具有一基本容量,则缓冲存储器610的可用容量可小于此基本容量的两倍。若缓冲存储器610的可用容量小于此基本容量的两倍,则缓冲存储器610的可用空间同样不足以同时存储所述第一数据与所述第二数据。In an exemplary embodiment, the available capacity of the buffer memory 610 may be limited by the equipment construction cost. For example, the designer may reduce the available capacity of the buffer memory 610 to reduce the equipment construction cost. Therefore, in an exemplary embodiment, the available space of the buffer memory 610 in FIG. 6 may not be enough to store the first data and the second data at the same time. Or, from another point of view, assuming that each physical unit has a basic capacity, the available capacity of the buffer memory 610 may be less than twice the basic capacity. If the available capacity of the buffer memory 610 is less than twice the basic capacity, the available space of the buffer memory 610 is also not enough to store the first data and the second data at the same time.

根据图11的范例实施例,第一数据是用来执行对于实体单元1110(0)的多阶段程序化操作(对应于标号1与3),而第二数据是用来执行对于实体单元1110(1)的多阶段程序化操作(对应于标号2与5)。若缓冲存储器610的可用空间不足以同时存储所述第一数据与所述第二数据,则在程序化实体单元1110(0)与1110(1)时,原先暂存在缓冲存储器610中用以执行对于实体单元1110(0)的第一阶段程序化操作(对应于图11的标号1)的第一数据的至少一部分数据可能会被用以执行对于实体单元1110(1)的第一阶段程序化操作(对应于图11的标号2)的第二数据覆写。因此,在执行对于实体单元1110(1)的第一阶段程序化操作(对应于图11的标号2)后,缓冲存储器610中可能不具有完整的第一数据以供对于实体单元1110(0)的第二阶段程序化操作(对应于图11的标号3)使用。According to the exemplary embodiment of FIG. 11 , the first data is used to perform multi-stage programming operations (corresponding to labels 1 and 3) for the physical unit 1110(0), and the second data is used to perform the multi-stage programming operation for the physical unit 1110( 1) Multi-stage programmatic operation (corresponding to labels 2 and 5). If the available space of the buffer memory 610 is not enough to store the first data and the second data at the same time, when programming the physical units 1110(0) and 1110(1), they are temporarily stored in the buffer memory 610 for execution At least a part of the first data of the first-stage programming operation (corresponding to label 1 in FIG. 11 ) for the physical unit 1110(0) may be used to perform the first-stage programming for the physical unit 1110(1). The second data overwriting of operation (corresponding to reference numeral 2 of FIG. 11 ). Therefore, after executing the first-stage programming operation (corresponding to label 2 in FIG. 11 ) for the physical unit 1110(1), the buffer memory 610 may not have complete first data for the physical unit 1110(0) The second stage of the programming operation (corresponding to the label 3 in FIG. 11 ) is used.

在图11的一范例实施例中,在执行实体单元1110(1)的第一阶段程序化操作(对应于图11的标号2)后,第一数据可重新被读取并暂存于缓冲存储器610。例如,若第一数据是来自图1的主机系统11的即时数据,则第一数据可以重新从主机系统11接收。或者,若第一数据是从图7的存储区710中的某一个实体单元读取的数据,则此第一数据可以再次从此实体单元读取。在重新将第一数据暂存于缓冲存储器610后,根据缓冲存储器610中的第一数据,实体单元1110(0)的第二阶段程序化操作可被执行(对应于图11的标号3)。类似地,在将重新读取的第一数据暂存至缓冲存储器610后,缓冲存储器610中的第二数据的至少一部分数据可能会被覆写。因此,在图11的一范例实施例中,在执行对于实体单元1110(1)的第二阶段程序化操作(对应于图11的标号5)之前,第二数据可重新从主机系统11接收(或重新从某一个实体单元读取)并暂存于缓冲存储器610,以供对于实体单元1110(1)的第二阶段程序化操作使用。In an exemplary embodiment of FIG. 11 , after executing the first-stage programming operation (corresponding to label 2 in FIG. 11 ) of the physical unit 1110(1), the first data can be read again and temporarily stored in the buffer memory 610. For example, if the first data is immediate data from the host system 11 of FIG. 1 , the first data may be received from the host system 11 again. Alternatively, if the first data is data read from a certain physical unit in the storage area 710 in FIG. 7 , the first data may be read from the physical unit again. After re-temporarily storing the first data in the buffer memory 610, according to the first data in the buffer memory 610, the second-stage programming operation of the physical unit 1110(0) can be executed (corresponding to label 3 in FIG. 11 ). Similarly, after the re-read first data is temporarily stored in the buffer memory 610, at least a part of the second data in the buffer memory 610 may be overwritten. Therefore, in an exemplary embodiment of FIG. 11 , before performing the second-stage programming operation (corresponding to reference number 5 of FIG. 11 ) on the physical unit 1110(1), the second data may be received again from the host system 11 ( or re-read from a certain physical unit) and temporarily stored in the buffer memory 610 for use in the second-stage programming operation on the physical unit 1110(1).

图12是根据本发明的一范例实施例所示出的数据整并操作的示意图。FIG. 12 is a schematic diagram of a data consolidation operation according to an exemplary embodiment of the present invention.

请参照图12,在特定时间点,存储器管理电路602可执行数据整并操作。例如,此特定时间点可以是当图7的存储区701中的闲置实体单元不足时、当图1的存储器存储装置10处于闲置状态时,或者满足所设定的条件的任意时间点。在一范例实施例中,数据整并操作亦称为垃圾收集操作。在启动数据整并操作后,存储器管理电路602可发送读取指令序列至图4的可复写式非易失性存储器模块406以指示从作为来源节点1210的实体单元1210(0)~1210(E)中读取有效数据。所读取的有效数据(亦称为所收集的有效数据)可被暂存于缓冲存储器610。然后,存储器管理电路602可发送写入指令序列至图4的可复写式非易失性存储器模块406以指示将缓冲存储器610中的数据(即所收集的有效数据)存储至作为回收节点(或目标节点)1220的实体单元1220(0)~1220(F)。在将从作为来源节点1210的某一个实体单元的有效数据完整存储至来源节点1220后,此实体单元(或者包含此实体单元的实体管理单元)可被抹除。例如,假设根据来自实体单元1210(0)的有效数据经由多阶段程序化操作完整地程序化至实体单元1220(0)后,实体单元1210(0)(或者包含实体单元1210(0)的实体管理单元)可被抹除。经抹除的实体单元(或实体管理单元)可成为一个新的闲置实体单元(或闲置实体管理单元)。换言之,经由数据整并操作,新的闲置实体单元可被释放。此外,若满足特定条件(例如产生足够的闲置实体单元),数据整并操作可被停止。Referring to FIG. 12 , at a specific time point, the memory management circuit 602 may perform a data consolidation operation. For example, this specific time point may be when the idle physical units in the storage area 701 in FIG. 7 are insufficient, when the memory storage device 10 in FIG. 1 is in an idle state, or any time point that meets the set conditions. In an exemplary embodiment, the data consolidation operation is also called a garbage collection operation. After starting the data integration operation, the memory management circuit 602 can send a read command sequence to the rewritable non-volatile memory module 406 of FIG. ) to read valid data. The read valid data (also referred to as collected valid data) can be temporarily stored in the buffer memory 610 . Then, the memory management circuit 602 can send a write command sequence to the rewritable non-volatile memory module 406 of FIG. Entity elements 1220(0)-1220(F) of target node) 1220. After the valid data of a certain entity unit as the source node 1210 is completely stored in the source node 1220, the entity unit (or the entity management unit including the entity unit) can be erased. For example, assuming that according to the valid data from the entity unit 1210(0), the entity unit 1210(0) (or the entities containing the entity unit 1210(0) snap-in) can be erased. The erased physical unit (or physical management unit) can become a new idle physical unit (or idle physical management unit). In other words, through the data consolidation operation, new idle physical units can be released. In addition, if certain conditions are met (for example, sufficient idle physical units are generated), the data consolidation operation can be stopped.

图13至图17是根据本发明的一范例实施例所示出的数据整并操作的示意图。13 to 17 are schematic diagrams showing data consolidation operations according to an exemplary embodiment of the present invention.

请参照图13,假设在数据整并操作中,有效数据被从来源节点1310与1320收集并且被写入至作为回收节点的实体管理单元1110。在启动数据整并操作后,经由读取操作1301,数据1300被从来源节点1310中的实体单元1310(0)~1310(G)的至少其中一者读取并且被暂存至缓冲存储器610。根据缓冲存储器610中经由读取操作1301所读取的数据1300,第一阶段程序化操作1302可被执行以程序化实体管理单元1110中的实体单元1110(0)(对应于图13的标号1)。Referring to FIG. 13 , it is assumed that in the data consolidation operation, valid data is collected from source nodes 1310 and 1320 and written to the entity management unit 1110 as a recycling node. After starting the data consolidation operation, via the read operation 1301 , the data 1300 is read from at least one of the physical units 1310( 0 )˜1310(G) in the source node 1310 and temporarily stored in the buffer memory 610 . According to the data 1300 read through the read operation 1301 in the buffer memory 610, the first-stage programming operation 1302 can be executed to program the entity unit 1110(0) in the entity management unit 1110 (corresponding to the label 1 in FIG. 13 ).

请参照图14,经第一阶段程序化操作1302程序化的实体单元1110(0)以斜线标记。在执行第一阶段程序化操作1302后,经由读取操作1401,数据1400被从来源节点1320中的实体单元1320(0)~1320(H)的至少其中一者读取并且被暂存至缓冲存储器610。例如,数据1400可在缓冲存储器610中覆写原先存储的数据1300的至少一部分数据。根据缓冲存储器610中经由读取操作1401所读取的数据1400,第一阶段程序化操作1402可被执行以程序化实体单元1110(1)(对应于图14的标号2)。Referring to FIG. 14 , the entity unit 1110 ( 0 ) programmed by the first-stage programming operation 1302 is marked with a slash. After executing the first-stage programming operation 1302, via the read operation 1401, the data 1400 is read from at least one of the physical units 1320(0)-1320(H) in the source node 1320 and temporarily stored in the buffer memory 610. For example, the data 1400 may overwrite at least a part of data of the data 1300 originally stored in the buffer memory 610 . According to the data 1400 read in the buffer memory 610 via the read operation 1401 , the first-stage programming operation 1402 may be performed to program the physical unit 1110 ( 1 ) (corresponding to label 2 in FIG. 14 ).

请参照图15,经第一阶段程序化操作1402程序化的实体单元1110(1)以斜线标记。在执行第一阶段程序化操作1402后,经由读取操作1501,数据1300再次被从来源节点1310中的实体单元1310(0)~1310(G)的至少其中一者读取并且被暂存至缓冲存储器610。例如,数据1300可在缓冲存储器610中覆写原先存储的数据1400的至少一部分数据。根据缓冲存储器610中经由读取操作1501所读取的数据1300,第二阶段程序化操作1502可被执行以再次程序化实体单元1110(0)(对应于图15的标号3)。Referring to FIG. 15 , the entity unit 1110 ( 1 ) programmed by the first-stage programming operation 1402 is marked with a slash. After executing the first-stage programming operation 1402, via the read operation 1501, the data 1300 is read from at least one of the physical units 1310(0)-1310(G) in the source node 1310 again and temporarily stored in buffer memory 610 . For example, the data 1300 may overwrite at least a part of data of the data 1400 originally stored in the buffer memory 610 . According to the data 1300 read in the buffer memory 610 through the read operation 1501 , the second-stage programming operation 1502 may be performed to reprogram the physical unit 1110 ( 0 ) (corresponding to reference numeral 3 in FIG. 15 ).

须注意的是,图13的读取操作1301与图15的读取操作1501是从相同的实体单元中读取数据1300。例如,若读取操作1301是从实体单元1310(0)读取数据1300,则读取操作1501也是从实体单元1310(0)读取数据1300。换言之,读取操作1301与1501是读取存储于相同实体地址的数据1300。或者,从另一角度来看,经由读取操作1301与1501重复从相同的实体单元中读取的数据1300会被用来对实体单元1110(0)执行多阶段程序化操作。It should be noted that the read operation 1301 in FIG. 13 and the read operation 1501 in FIG. 15 read the data 1300 from the same physical unit. For example, if the read operation 1301 reads the data 1300 from the physical unit 1310(0), then the read operation 1501 also reads the data 1300 from the physical unit 1310(0). In other words, the read operations 1301 and 1501 read the data 1300 stored at the same physical address. Or, viewed from another perspective, the data 1300 repeatedly read from the same physical unit via the read operations 1301 and 1501 can be used to perform a multi-stage programming operation on the physical unit 1110(0).

请参照图16,经第二阶段程序化操作1502程序化的实体单元1110(0)以网底标记。在执行第二阶段程序化操作1502后,经由读取操作1601,数据1600被从另一来源节点1610中的实体单元1610(0)~1610(I)的至少其中一者读取并且被暂存至缓冲存储器610。例如,数据1600可在缓冲存储器610中覆写原先存储的数据1300的至少一部分数据。根据缓冲存储器610中经由读取操作1601所读取的数据1600,第一阶段程序化操作1602可被执行以程序化实体单元1110(2)(对应于图16的标号4)。Referring to FIG. 16 , the entity unit 1110 ( 0 ) programmed by the second-stage programming operation 1502 is marked with the bottom of the grid. After performing the second-stage programming operation 1502, via the read operation 1601, the data 1600 is read from at least one of the entity units 1610(0)˜1610(1) in another source node 1610 and temporarily stored to buffer memory 610. For example, the data 1600 may overwrite at least a part of data of the data 1300 originally stored in the buffer memory 610 . According to the data 1600 read in the buffer memory 610 through the read operation 1601 , the first-stage programming operation 1602 may be performed to program the physical unit 1110(2) (corresponding to the reference numeral 4 in FIG. 16 ).

请参照图17,经第一阶段程序化操作1602程序化的实体单元1110(2)以斜线标记。在执行第一阶段程序化操作1602后,经由读取操作1701,数据1400再次被从来源节点1320中的实体单元1320(0)~1320(H)的至少其中一者读取并且被暂存至缓冲存储器610。例如,数据1400可在缓冲存储器610中覆写原先存储的数据1600的至少一部分数据。根据缓冲存储器610中经由读取操作1701所读取的数据1400,第二阶段程序化操作1702可被执行以再次程序化实体单元1110(1)(对应于图17的标号5)。Referring to FIG. 17 , the entity unit 1110 ( 2 ) programmed by the first-stage programming operation 1602 is marked with a slash. After performing the first-stage programming operation 1602, via the read operation 1701, the data 1400 is read from at least one of the physical units 1320(0)-1320(H) in the source node 1320 again and temporarily stored in buffer memory 610 . For example, the data 1400 may overwrite at least a part of data of the data 1600 originally stored in the buffer memory 610 . According to the data 1400 read through the read operation 1701 in the buffer memory 610, the second-stage programming operation 1702 may be performed to reprogram the physical unit 1110(1) (corresponding to the reference numeral 5 in FIG. 17 ).

须注意的是,图14的读取操作1401与图17的读取操作1701是从相同的实体单元中读取数据1400。例如,若读取操作1401是从实体单元1320(0)读取数据1400,则读取操作1701也是从实体单元1320(0)读取数据1400。换言之,读取操作1401与1701是读取存储于相同实体地址的数据1400。或者,从另一角度来看,经由读取操作1401与1701重复从相同的实体单元中读取的数据1400会被用来对实体单元1110(1)执行多阶段程序化操作。依此类推,更多的有效数据可以被从来源节点收集并且被存入作为回收节点的实体管理单元1110。此外,图13至图17的范例实施例中对于实体管理单元1110的使用相同或相似于图11的范例实施例中对于实体管理单元1110的使用。It should be noted that the read operation 1401 in FIG. 14 and the read operation 1701 in FIG. 17 read the data 1400 from the same physical unit. For example, if the read operation 1401 reads the data 1400 from the physical unit 1320(0), then the read operation 1701 also reads the data 1400 from the physical unit 1320(0). In other words, the read operations 1401 and 1701 read the data 1400 stored at the same physical address. Or, viewed from another perspective, data 1400 repeatedly read from the same physical unit via read operations 1401 and 1701 may be used to perform a multi-stage programming operation on physical unit 1110(1). By analogy, more valid data can be collected from the source node and stored in the entity management unit 1110 as a recycling node. In addition, the use of the entity management unit 1110 in the exemplary embodiments of FIG. 13 to FIG. 17 is the same or similar to the use of the entity management unit 1110 in the exemplary embodiment of FIG. 11 .

在一范例实施例中,存储器管理电路602还将与实体单元的读取相关的读取信息记录于一管理表格。此读取信息可反映作为来源节点的某一个实体单元是否经过一或多次的读取操作(或一预设次数)的读取。In an exemplary embodiment, the memory management circuit 602 also records read information related to the read of the physical unit in a management table. The read information may reflect whether a physical unit serving as the source node has been read for one or more read operations (or a preset number of times).

以图13的范例实施例为例,假设在刚开始执行数据整并操作时,管理表格中对应于实体单元1310(0)的读取信息为初始读取旗标(例如数值0)。在经由读取操作1301从实体单元1310(0)读取数据1300后,对应于实体单元1310(0)的读取信息可被更新。例如,可在管理表格中将对应于实体单元1310(0)的读取信息更新为第一读取旗标(例如数值1),以反映实体单元1310(0)已经在数据整并操作中经由读取操作1301读取。在图15的范例实施例中,在经由读取操作1501再次从实体单元1310(0)读取数据1300后,对应于实体单元1310(0)的读取信息可再次被更新。例如,可在管理表格中将对应于实体单元1310(0)的读取信息更新为第二读取旗标(例如数值2),以反映实体单元1310(0)已经在数据整并操作中经由读取操作1501读取。或者,从另一角度来看,对应于实体单元1310(0)的初始读取旗标可反映实体单元1310(0)在数据整并操作中尚未被读取过;对应于实体单元1310(0)的第一读取旗标可反映实体单元1310(0)在数据整并操作中被读取过一次;和/或对应于实体单元1310(0)的第二读取旗标可反映实体单元1310(0)在数据整并操作中被读取过两次。此外,在一范例实施例中,对应于实体单元1310(0)的读取信息亦可以仅包括初始读取旗标与第二读取旗标,以反映实体单元1310(0)是否在数据整并操作中被读取过两次。Taking the exemplary embodiment of FIG. 13 as an example, assume that when the data integration operation is first performed, the read information corresponding to the entity unit 1310(0) in the management table is an initial read flag (for example, a value of 0). After the data 1300 is read from the physical unit 1310(0) via the read operation 1301, the read information corresponding to the physical unit 1310(0) may be updated. For example, the read information corresponding to entity unit 1310(0) may be updated in the management table as the first read flag (for example, a value of 1), to reflect that entity unit 1310(0) has passed Read operation 1301 reads. In the exemplary embodiment of FIG. 15 , after the data 1300 is read again from the physical unit 1310 ( 0 ) via the read operation 1501 , the read information corresponding to the physical unit 1310 ( 0 ) may be updated again. For example, the read information corresponding to entity unit 1310(0) may be updated in the management table to a second read flag (for example, a value of 2) to reflect that entity unit 1310(0) has passed A read operation 1501 reads. Or, from another point of view, the initial read flag corresponding to the entity unit 1310(0) may reflect that the entity unit 1310(0) has not been read in the data integration operation; ) may reflect that the physical unit 1310(0) was read once in the data consolidation operation; and/or the second read flag corresponding to the physical unit 1310(0) may reflect that the physical unit 1310(0) was read twice in the data consolidation operation. In addition, in an exemplary embodiment, the read information corresponding to the physical unit 1310(0) may only include an initial read flag and a second read flag to reflect whether the physical unit 1310(0) is in the data And the operation is read twice.

在一范例实施例中,存储器管理电路602可根据对应于某一实体单元的读取信息决定是否抹除此实体单元。例如,在执行数据整并操作后,存储器管理电路602可判断对应于某一实体单元的读取信息是否为第二读取旗标。若对应于此实体单元的读取信息为第二读取旗标,表示此实体单元已在数据整并操作中被读取过两次,故存储器管理电路602可指示抹除此实体单元。反之,若对应于此实体单元的读取信息不为第二读取旗标,表示此实体单元尚未在数据整并操作中被读取过两次,故存储器管理电路602可不指示抹除此实体单元。例如,在图13的范例实施例中,实体单元1310(0)仅被读取一次以提供用于第一阶段程序化操作1302的数据1300,则存储器管理电路602可根据对应于实体单元1310(0)的读取信息而暂不抹除实体单元1310(0)。在图15的范例实施例中,实体单元1310(0)被读取第二次以提供用于第二阶段程序化操作1502的数据1300,故存储器管理电路602可根据对应于实体单元1310(0)的读取信息而抹除实体单元1310(0)。In an exemplary embodiment, the memory management circuit 602 may determine whether to erase the physical unit according to the read information corresponding to the physical unit. For example, after performing the data consolidation operation, the memory management circuit 602 may determine whether the read information corresponding to a certain physical unit is the second read flag. If the read information corresponding to the physical unit is the second read flag, it means that the physical unit has been read twice in the data consolidation operation, so the memory management circuit 602 can instruct to erase the physical unit. On the contrary, if the read information corresponding to this physical unit is not the second read flag, it means that this physical unit has not been read twice in the data integration operation, so the memory management circuit 602 may not instruct to erase this physical unit unit. For example, in the exemplary embodiment of FIG. 13, the physical unit 1310(0) is only read once to provide the data 1300 for the first-stage programming operation 1302, and the memory management circuit 602 may correspond to the physical unit 1310( 0) without erasing the physical unit 1310(0). In the exemplary embodiment of FIG. 15 , the physical unit 1310(0) is read a second time to provide the data 1300 for the second-stage programming operation 1502, so the memory management circuit 602 can operate according to the data corresponding to the physical unit 1310(0) ) to erase the physical unit 1310(0).

须注意的是,在前述范例实施例中,经多阶段程序化操作的某一个存储单元可以存储3或4个位元。然而,在另一范例实施例中,经多阶段程序化操作的某一个存储单元可以存储更多或更少位元(例如2个或8个位元),本发明不加以限制。此外,一个多阶段程序化操作可以包括更多阶段的程序化操作,而不限于第一阶段程序化操作与第二阶段程序化操作。例如,在图8的一范例实施例中,可视为所执行的多阶段程序化操作包含第一阶段程序化操作、第二阶段程序化操作及第三阶段程序化操作。第一阶段程序化操作用以将存储单元程序化至属于状态801与802。第二阶段程序化操作用以将存储单元程序化至属于状态811~814。第三阶段程序化操作用以将存储单元程序化至属于状态821~828。在一范例实施例中,一个实体单元亦可以被读取更多次(例如3次或4次),以执行第三阶段程序化操作或第四阶段程序化操作。It should be noted that, in the aforementioned exemplary embodiments, a certain memory cell that has undergone multi-stage programming operations can store 3 or 4 bits. However, in another exemplary embodiment, a certain memory cell that has undergone the multi-stage programming operation may store more or less bits (for example, 2 or 8 bits), which is not limited by the present invention. In addition, a multi-stage programming operation may include more stages of programming operations, not limited to the first-stage programming operation and the second-stage programming operation. For example, in an exemplary embodiment of FIG. 8 , it can be considered that the executed multi-stage programming operation includes a first-stage programming operation, a second-stage programming operation, and a third-stage programming operation. The first phase programming operation is used to program memory cells to belong to states 801 and 802 . The second phase programming operation is used to program the memory cells to belong to the states 811 - 814 . The third-stage programming operation is used to program the memory cells to belong to the states 821-828. In an exemplary embodiment, a physical unit may also be read more times (for example, 3 times or 4 times) to perform the third-stage programming operation or the fourth-stage programming operation.

图18是根据本发明的一范例实施例所示出的数据整并方法的流程图。FIG. 18 is a flow chart of a data consolidation method according to an exemplary embodiment of the present invention.

请参照图18,在步骤S1810中,启动数据整并操作。在步骤S1820中,执行数据整并操作。步骤S1820包括步骤S1821~S1824。在步骤S1821中,经由第一读取操作从第一实体单元读取第一数据。在步骤S1822中,根据第一数据对第二实体单元执行第一阶段程序化操作。在步骤S1823中,经由第二读取操作再次从第一实体单元读取第一数据。在步骤S1824中,根据经由第二读取操作读取的第一数据对第二实体单元执行第二阶段程序化操作。在步骤S1830中,结束数据整并操作。Referring to FIG. 18 , in step S1810 , the data integration operation is started. In step S1820, a data integration operation is performed. Step S1820 includes steps S1821-S1824. In step S1821, the first data is read from the first physical unit via a first read operation. In step S1822, a first-stage programming operation is performed on the second entity unit according to the first data. In step S1823, the first data is read from the first physical unit again via the second read operation. In step S1824, a second-stage programming operation is performed on the second physical unit according to the first data read through the second read operation. In step S1830, the data integration operation ends.

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

综上所述,在数据整并操作中,第一实体单元中的相同数据可以被读取至少两次,以根据经由不同读取操作所读取的数据来完成对于第二实体单元的多阶段程序化操作。藉此,即便存储器存储装置因为成本考量而减少其中的缓冲存储器的可用空间,对于单一实体单元的多阶段程序化操作也可以被顺利完成,而不需要额外提高缓冲存储器的容量。在一范例实施例中,前述对同一个实体单元执行多次数据读取操作以完成多阶段程序化操作的机制,也可以有效提高存储器存储装置对于缓冲存储器的容量较小的存储器控制器(或控制芯片)的相容性。To sum up, in the data consolidation operation, the same data in the first physical unit can be read at least twice, so as to complete the multi-stage for the second physical unit according to the data read through different read operations Programmatic operation. Thereby, even if the available space of the buffer memory in the memory storage device is reduced due to cost considerations, the multi-stage programming operation for a single physical unit can be successfully completed without additionally increasing the capacity of the buffer memory. In an exemplary embodiment, the above-mentioned mechanism of performing multiple data read operations on the same physical unit to complete the multi-stage programming operation can also effectively improve the performance of the memory storage device for a memory controller with a small buffer memory capacity (or control chip) compatibility.

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

Claims (21)

1. A data consolidation method for a memory storage device comprising a plurality of physical units, and the data consolidation method comprising:
performing a data merge operation to store valid data collected from the source node to the reclamation node,
wherein the source node comprises at least a first entity unit of the plurality of entity units, the recovery node comprises a second entity unit of the plurality of entity units, and
the data merging operation includes:
reading first data from the at least one first physical unit via a first read operation;
performing a first-stage programming operation on the second entity unit according to the first data;
after the first-stage programming operation is executed, the first data is read from the at least one first entity unit again through a second reading operation; and
and performing a second-stage programming operation on the second entity unit according to the first data read through the second reading operation.
2. The data consolidation method of claim 1, wherein the source node further comprises at least a third entity unit of the plurality of entity units, the reclamation node further comprises a fourth entity unit of the plurality of entity units, and the data consolidation operation further comprises:
reading second data from the at least one third entity unit; and
and programming the fourth entity unit according to the second data between the first-stage programming operation and the second-stage programming operation.
3. The data consolidation method of claim 1, wherein the data consolidation operation further comprises:
temporarily storing the first data read through the first read operation in a buffer memory to provide the first data for the first stage programming operation;
temporarily storing second data in the buffer memory, and the second data overwrites at least a portion of the first data read via the first read operation in the buffer memory; and
the first data read via the second read operation is suspended in the buffer memory to provide the first data for the second stage programming operation.
4. The data consolidation method of claim 1, further comprising:
recording read information in a management table, wherein the read information reflects whether the at least one first physical unit is read by at least one of the first read operation and the second read operation; and
and erasing the at least one first entity unit according to the read information.
5. The data consolidation method according to claim 1, wherein the second entity unit is programmed to store the first data via the first stage programming operation and the second stage programming operation in sequence.
6. The data consolidation method according to claim 1, wherein the first stage programming operation and the second stage programming operation belong to a multi-stage programming operation, and one memory cell of the second entity unit programmed by the multi-stage programming operation stores not less than 3 bits.
7. The data consolidation method of claim 1, further comprising:
temporarily storing the first data read by the first reading operation or the second reading operation in a buffer memory,
wherein the second entity unit has a basic capacity and the available capacity of the buffer memory is less than twice the basic capacity.
8. A memory storage device, comprising:
a connection interface unit for connecting to a host system;
a rewritable non-volatile memory module including a plurality of physical units; and
a memory control circuit unit connected to the connection interface unit and the rewritable nonvolatile memory module,
wherein the memory control circuit unit is configured to perform a data merging operation to store valid data collected from the source node to the reclamation node,
the source node includes at least one first entity unit of the plurality of entity units, the recovery node includes a second entity unit of the plurality of entity units, and
the data merging operation includes:
sending a first read instruction sequence to instruct to read first data from the at least one first entity unit via a first read operation;
transmitting a first write instruction sequence to instruct the second entity unit to execute a first stage programming operation according to the first data;
after the first-stage programming operation is performed, sending a second read instruction sequence to instruct to read the first data from the at least one first entity unit again through a second read operation; and
A second sequence of write instructions is sent to instruct a second-stage programming operation to be performed on the second physical unit in accordance with the first data read via the second read operation.
9. The memory storage device of claim 8, wherein the source node further comprises at least a third entity of the plurality of entity units, the reclamation node further comprises a fourth entity of the plurality of entity units, and the data consolidation operation further comprises:
sending a third read instruction sequence to instruct to read second data from the at least one third entity unit; and
a third sequence of write instructions is sent between the first phase programming operation and the second phase programming operation to instruct programming of the fourth entity unit according to the second data.
10. The memory storage device of claim 8, wherein the data merge operation further comprises:
temporarily storing the first data read through the first read operation in a buffer memory to provide the first data for the first stage programming operation;
temporarily storing second data in the buffer memory, and the second data overwrites at least a portion of the first data read via the first read operation in the buffer memory; and
The first data read via the second read operation is suspended in the buffer memory to provide the first data for the second stage programming operation.
11. The memory storage device of claim 8, wherein the memory control circuit unit is further configured to record read information in a management table and erase the at least one first physical unit according to the read information, wherein the read information reflects whether the at least one first physical unit is read by at least one of the first read operation and the second read operation.
12. The memory storage device of claim 8, wherein the second entity unit is programmed to store the first data via the first phase programming operation and the second phase programming operation in sequence.
13. The memory storage device of claim 8, wherein the first-stage programming operation and the second-stage programming operation belong to a multi-stage programming operation, and one memory cell of the second physical unit programmed by the multi-stage programming operation stores not less than 3 bits.
14. The memory storage device of claim 8, wherein the memory control circuit unit is further configured to temporarily store the first data read via the first read operation or the second read operation in a buffer memory,
wherein the second entity unit has a basic capacity and the available capacity of the buffer memory is less than twice the basic capacity.
15. A memory control circuit unit for controlling a rewritable non-volatile memory module, wherein the rewritable non-volatile memory module comprises a plurality of physical units, wherein the memory control circuit unit comprises:
a host interface for connecting to a host system;
a memory interface to connect 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 configured to perform a data merge operation to store valid data collected from the source node to the reclamation node,
the source node includes at least one first entity unit of the plurality of entity units, the recovery node includes a second entity unit of the plurality of entity units, and
The data merging operation includes:
sending a first read instruction sequence to instruct to read first data from the at least one first entity unit via a first read operation;
transmitting a first write instruction sequence to instruct the second entity unit to execute a first stage programming operation according to the first data;
after the first-stage programming operation is performed, sending a second read instruction sequence to instruct to read the first data from the at least one first entity unit again through a second read operation; and
a second sequence of write instructions is sent to instruct a second-stage programming operation to be performed on the second physical unit in accordance with the first data read via the second read operation.
16. The memory control circuit unit of claim 15, wherein the source node further comprises at least a third entity unit of the plurality of entity units, the reclamation node further comprises a fourth entity unit of the plurality of entity units, and the data merge operation further comprises:
sending a third read instruction sequence to instruct to read second data from the at least one third entity unit; and
a third sequence of write instructions is sent between the first phase programming operation and the second phase programming operation to instruct programming of the fourth entity unit according to the second data.
17. The memory control circuit unit of claim 15, further comprising a buffer memory, wherein the buffer memory is connected to the memory management circuit, and the data merge operation further comprises:
temporarily storing the first data read via the first read operation in the buffer memory to provide the first data for the first stage programming operation;
temporarily storing second data in the buffer memory, and the second data overwrites at least a portion of the first data read via the first read operation in the buffer memory; and
the first data read via the second read operation is suspended in the buffer memory to provide the first data for the second stage programming operation.
18. The memory control circuit unit of claim 15, wherein the memory management circuit is further configured to record read information in a management table and erase the at least one first physical unit according to the read information, wherein the read information reflects whether the at least one first physical unit is read by at least one of the first read operation and the second read operation.
19. The memory control circuit unit of claim 15, wherein the second entity unit is programmed to store the first data via the first phase programming operation and the second phase programming operation in sequence.
20. The memory control circuit unit of claim 15, wherein the first-stage programming operation and the second-stage programming operation belong to a multi-stage programming operation, and one memory cell of the second physical unit programmed by the multi-stage programming operation stores not less than 3 bits.
21. The memory control circuit unit of claim 15, further comprising a buffer memory, wherein the buffer memory is connected to the memory management circuit, and the memory management circuit is further configured to store the first data read via the first read operation or the second read operation temporarily in the buffer memory,
wherein the second entity unit has a basic capacity and the available capacity of the buffer memory is less than twice the basic capacity.
CN201810938535.1A 2018-08-17 2018-08-17 Data integration method, memory storage device and memory control circuit unit Active CN110837339B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810938535.1A CN110837339B (en) 2018-08-17 2018-08-17 Data integration method, memory storage device and memory control circuit unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810938535.1A CN110837339B (en) 2018-08-17 2018-08-17 Data integration method, memory storage device and memory control circuit unit

Publications (2)

Publication Number Publication Date
CN110837339A CN110837339A (en) 2020-02-25
CN110837339B true CN110837339B (en) 2023-07-04

Family

ID=69573516

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810938535.1A Active CN110837339B (en) 2018-08-17 2018-08-17 Data integration method, memory storage device and memory control circuit unit

Country Status (1)

Country Link
CN (1) CN110837339B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111880749B (en) * 2020-08-04 2023-06-13 群联电子股份有限公司 Data reading method, memory storage device and memory control circuit unit
TWI768738B (en) * 2021-03-02 2022-06-21 群聯電子股份有限公司 Memory control method, memory storage device and memory control circuit unit
CN112835536B (en) * 2021-03-10 2023-08-29 群联电子股份有限公司 Memory control method, memory storage device and memory control circuit unit

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104573537A (en) * 2013-10-11 2015-04-29 群联电子股份有限公司 Data processing method, memory storage device and memory control circuit unit
CN104765568A (en) * 2014-01-08 2015-07-08 群联电子股份有限公司 Data storage method, memory control circuit unit and memory storage device
CN104903874A (en) * 2012-09-06 2015-09-09 百科容(科技)公司 Large-scale data storage and delivery system
CN105390155A (en) * 2014-08-26 2016-03-09 爱思开海力士有限公司 Ata storage device and method for operating the same
CN106648443A (en) * 2015-10-30 2017-05-10 群联电子股份有限公司 Effective data merging method, memory controller and memory storage device
CN107025063A (en) * 2016-01-29 2017-08-08 大心电子股份有限公司 Memory management method, memory storage device and memory control circuit unit
CN107402716A (en) * 2016-05-20 2017-11-28 合肥兆芯电子有限公司 Method for writing data, memory control circuit unit and internal storing memory

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI650639B (en) * 2016-11-07 2019-02-11 群聯電子股份有限公司 Memory management method, memory control circuit unit and mempry storage device
TWI587135B (en) * 2016-11-23 2017-06-11 群聯電子股份有限公司 Data storage method, memory storage device and memory control circuit unit

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104903874A (en) * 2012-09-06 2015-09-09 百科容(科技)公司 Large-scale data storage and delivery system
CN104573537A (en) * 2013-10-11 2015-04-29 群联电子股份有限公司 Data processing method, memory storage device and memory control circuit unit
CN104765568A (en) * 2014-01-08 2015-07-08 群联电子股份有限公司 Data storage method, memory control circuit unit and memory storage device
CN105390155A (en) * 2014-08-26 2016-03-09 爱思开海力士有限公司 Ata storage device and method for operating the same
CN106648443A (en) * 2015-10-30 2017-05-10 群联电子股份有限公司 Effective data merging method, memory controller and memory storage device
CN107025063A (en) * 2016-01-29 2017-08-08 大心电子股份有限公司 Memory management method, memory storage device and memory control circuit unit
CN107402716A (en) * 2016-05-20 2017-11-28 合肥兆芯电子有限公司 Method for writing data, memory control circuit unit and internal storing memory

Also Published As

Publication number Publication date
CN110837339A (en) 2020-02-25

Similar Documents

Publication Publication Date Title
CN111078149B (en) Memory management method, memory storage device and memory control circuit unit
TWI668570B (en) Data merge method, memory storage device and memory control circuit unit
TWI554885B (en) Memory management method, memory control circuit unit and memory storage device
CN113885808B (en) Mapping information recording method, memory control circuit unit and memory device
CN111078146B (en) Memory management method, memory storage device and memory control circuit unit
CN110879793A (en) Memory management method, memory storage device, and memory control circuit unit
TW201727492A (en) Data protecting method, memory control circuit unit and memory storage device
CN110837339B (en) Data integration method, memory storage device and memory control circuit unit
CN107045890B (en) Data protection method, memory control circuit unit and memory storage device
CN106484307A (en) Memory management method, memory control circuit unit and memory storage device
CN110308876B (en) Memory management method, memory storage device and memory control circuit unit
CN110390985A (en) Memory management method, memory storage device and memory control circuit unit
CN111737165A (en) Memory control method, memory storage device, and memory control circuit unit
CN112860194B (en) Memory control method, memory storage device and memory control circuit unit
CN112835536B (en) Memory control method, memory storage device and memory control circuit unit
CN112051971A (en) Data consolidation method, memory storage device, and memory control circuit unit
CN111767005A (en) Memory control method, memory storage device, and memory control circuit unit
CN112394883B (en) Data merging method, memory storage device and memory control circuit unit
CN112799601B (en) Effective data combination method, memory storage device and control circuit unit
CN110580230B (en) Memory management method, memory storage device and memory control circuit unit
CN111610937A (en) Data writing method, memory storage device and memory control circuit unit
CN114527941B (en) Memory control method, memory storage device and memory control circuit unit
US20240354024A1 (en) Memory management method, memory storage device and memory control circuit unit
TWI780003B (en) Memory control method, memory storage device and memory control circuit unit
TWI810719B (en) Memory management method, memory storage device and memory control circuit unit

Legal Events

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