TW201441816A - Data merging method for non-volatile memory and controller and storage apparatus using the same - Google Patents

Data merging method for non-volatile memory and controller and storage apparatus using the same Download PDF

Info

Publication number
TW201441816A
TW201441816A TW103125839A TW103125839A TW201441816A TW 201441816 A TW201441816 A TW 201441816A TW 103125839 A TW103125839 A TW 103125839A TW 103125839 A TW103125839 A TW 103125839A TW 201441816 A TW201441816 A TW 201441816A
Authority
TW
Taiwan
Prior art keywords
data
physical
page
block
pages
Prior art date
Application number
TW103125839A
Other languages
Chinese (zh)
Other versions
TWI521346B (en
Inventor
Kiang-Giap Lau
Kheng-Chong Tan
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 TW103125839A priority Critical patent/TWI521346B/en
Publication of TW201441816A publication Critical patent/TW201441816A/en
Application granted granted Critical
Publication of TWI521346B publication Critical patent/TWI521346B/en

Links

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

A data merging method for merging valid data of one logical block in a rewritable non-volatile memory module is provided. The method includes assigning a plurality of arrangement physical blocks for the logical block. The method also includes performing a data arrangement operation and a data move operation with a partial synchronization manner to copy the valid data of the logical block into the low physical pages of the arrangement physical blocks from a first data physical block and at least one temporary physical block while programing the valid data of the logical block into a second data physical block from the low physical pages of the arrangement physical blocks in units of each physical page group. The method further includes remapping the logical block to the second physical block. Accordingly, the method can effectively shorten the time of merging valid data and improving the reliability of writing data.

Description

用於非揮發性記憶體的資料合併方法、控制器與儲存裝置 Data merging method, controller and storage device for non-volatile memory

本發明是有關於一種用於可複寫式非揮發性記憶體模組的資料合併方法及使用此方法的記憶體控制器與記憶體儲存裝置。 The invention relates to a data merging method for a rewritable non-volatile memory module and a memory controller and a memory storage device using the same.

數位相機、手機與MP3在這幾年來的成長十分迅速,使得消費者對儲存媒體的需求也急速增加。由於可複寫式非揮發性記憶體(rewritable non-volatile memory)具有資料非揮發性、省電、體積小、無機械結構、讀寫速度快等特性,最適於可攜式電子產品,例如筆記型電腦。固態硬碟就是一種以快閃記憶體作為儲存媒體的儲存裝置。因此,近年快閃記憶體產業成為電子產業中相當熱門的一環。 Digital cameras, mobile phones and MP3s have grown very rapidly in recent years, and the demand for storage media has increased rapidly. Because rewritable non-volatile memory has the characteristics of non-volatile data, power saving, small size, no mechanical structure, fast reading and writing speed, etc., it is most suitable for portable electronic products, such as notebook type. computer. A solid state hard disk is a storage device that uses flash memory as a storage medium. Therefore, in recent years, the flash memory industry has become a very popular part of the electronics industry.

依據每個記憶胞可儲存的位元數,反及(NAND)型快閃記憶體可區分為單階儲存單元(Single Level Cell,SLC)NAND型快閃記憶體、多階儲存單元(Multi Level Cell,MLC)NAND型快 閃記憶體與三階儲存單元(Trinary Level Cell,TLC)NAND型快閃記憶體,其中SLC NAND型快閃記憶體的每個記憶胞可儲存1個位元的資料(即,”1”與”0”),MLC NAND型快閃記憶體的每個記憶胞可儲存2個位元的資料並且TLC NAND型快閃記憶體的每個記憶胞可儲存3個位元的資料。 According to the number of bits that each memory cell can store, the (NAND) type flash memory can be divided into single level cell (SLC) NAND type flash memory, multi-level memory cell (Multi Level). Cell, MLC) NAND type fast Flash memory and Trinary Level Cell (TLC) NAND flash memory, in which each memory cell of SLC NAND flash memory can store 1 bit of data (ie, "1" and "0"), each memory cell of the MLC NAND type flash memory can store 2 bits of data and each memory cell of the TLC NAND type flash memory can store 3 bits of data.

MLC NAND型快閃記憶體具有多個實體區塊(physical block),且每一實體區塊具有多個實體頁面(physical page)。 The MLC NAND type flash memory has a plurality of physical blocks, and each physical block has a plurality of physical pages.

具體來說,在NAND型快閃記憶體中,實體頁面是由排列在同一條字元線上的數個記憶胞所組成。由於SLC NAND型快閃記憶體的每個記憶胞可儲存1個位元的資料,因此,在SLC NAND型快閃記憶體中,排列在同一條字元線上的數個記憶胞是對應一個實體頁面。 Specifically, in a NAND type flash memory, a physical page is composed of a plurality of memory cells arranged on the same word line. Since each memory cell of the SLC NAND type flash memory can store one bit of data, in the SLC NAND type flash memory, a plurality of memory cells arranged on the same word line correspond to one entity. page.

相對於SLC NAND型快閃記憶體來說,MLC NAND型快閃記憶體的每個記憶胞的浮動閘儲存層可儲存2個位元的資料,其中每一個儲存狀態(即,”11”、”10”、”01”與”00”)包括最低有效位元(Least Significant Bit,LSB)以及最高有效位元(Most Significant Bit,MSB)。例如,儲存狀態中從左側算起之第1個位元的值為LSB,而從左側算起之第2個位元的值為MSB。因此,排列在同一條字元線上的數個記憶胞可組成2個實體頁面,其中由此些記憶胞之LSB所組成的實體頁面稱為下頁實體頁面(low physical page),並且由此些記憶胞之MSB所組成的實體頁面稱為上頁實體頁面(upper physical page)。特別是,下頁實體頁 面的寫入速度會快於上頁實體頁面的寫入速度,並且當程式化上頁實體頁面發生錯誤時,下頁實體頁面所儲存之資料亦可能因此遺失。 Compared with the SLC NAND type flash memory, the floating gate storage layer of each memory cell of the MLC NAND type flash memory can store 2 bits of data, each of which is stored (ie, "11", "10", "01" and "00") include a Least Significant Bit (LSB) and a Most Significant Bit (MSB). For example, the value of the first bit from the left side in the storage state is the LSB, and the value of the second bit from the left side is the MSB. Therefore, a plurality of memory cells arranged on the same character line can form two physical pages, wherein the physical page composed of the LSBs of the memory cells is called a lower physical page, and thus The physical page composed of the MSB of the memory cell is called the upper physical page. In particular, the next page of physical pages The write speed of the face will be faster than the write speed of the physical page of the previous page, and when an error occurs on the stylized page physical page, the data stored on the physical page of the next page may also be lost.

類似地,在TLC NAND型快閃記憶體中,的每個記憶胞可儲存3個位元的資料,其中每一個儲存狀態(即,”111”、”110”、”101”、”100”、”011”、”010”、”001”與”000”)包括每一個儲存狀態包括左側算起之第1個位元的LSB、從左側算起之第2個位元的中間有效位元(Center Significant Bit,CSB)以及從左側算起之第3個位元的MSB。因此,排列在同一條字元線上的數個記憶胞可組成3個實體頁面,其中由此些記憶胞之LSB所組成的實體頁面稱為下頁實體頁面,由此些記憶胞之CSB所組成的實體頁面稱為中頁實體頁面,並且由此些記憶胞之MSB所組成的實體頁面稱為上頁實體頁面。特別是,在排列在同一條字元線上的數個記憶胞所構成的實體頁面中儲存資料時,僅能選擇僅使用程式化下頁實體頁面儲存資料或者一併同時使用程式化下頁實體頁面、中頁實體頁面與上頁實體頁面來儲存資料,否則所儲存之資料可能會遺失。例如,若在僅對排列在同一條字元線上的數個記憶胞所組成之下頁實體頁面與中頁實體頁面儲存資料的狀態下,從此下頁實體頁面或此中頁實體頁面讀取資料時,此讀取運作將會失敗。 Similarly, in TLC NAND type flash memory, each memory cell can store 3 bits of data, each of which stores state (ie, "111", "110", "101", "100" "011", "010", "001" and "000") include the LSB of the first bit from the left side of each storage state, and the intermediate effective bit of the second bit from the left side. (Center Significant Bit, CSB) and the MSB of the third bit from the left. Therefore, a plurality of memory cells arranged on the same character line can form three physical pages, wherein the physical page composed of the LSBs of the memory cells is called a physical page of the next page, and thus the CSB of the memory cells is composed. The physical page is called the middle page physical page, and the physical page composed of the MSBs of the memory cells is called the upper page physical page. In particular, when storing data in a physical page composed of a plurality of memory cells arranged on the same character line, it is only possible to select only the stylized lower page physical page to store data or to simultaneously use the stylized lower page physical page. The physical page of the middle page and the physical page of the previous page are used to store the data, otherwise the stored data may be lost. For example, if the data is stored only on the page entity page and the middle page entity page, which are composed of a plurality of memory cells arranged on the same word line, the data is read from the next page entity page or the middle page entity page. This read operation will fail.

此外,在實體區塊中寫入資料時必須以實體頁面為單位來寫入資料,並且已被寫入資料之實體頁面必需先被抹除後才能 再次用於寫入資料。特別是,實體區塊為抹除之最小單位。因此,一般來說,在快閃記憶體模組的寫入過程中,會輪替使用實體區塊來寫入資料。 In addition, when writing data in a physical block, the data must be written in units of physical pages, and the physical page that has been written into the data must be erased before being Used again to write data. In particular, the physical block is the smallest unit of erasure. Therefore, in general, during the writing process of the flash memory module, the physical block is used to write data.

例如,當某一個邏輯區塊的資料被儲存在一個資料實體區塊(以下稱為原映射資料實體區塊)中且主機系統欲更新儲存在某一邏輯區塊的某一邏輯頁面上的資料時,儲存裝置的記憶體控制器會從快閃記憶體模組中提取一個實體區塊作為對應此邏輯區塊的暫存實體區塊,並且將此更新資料寫入至此暫存實體區塊的實體頁面中,由此縮短執行寫入指令的時間。之後,當快閃記憶體模組中無使用之實體區塊快耗盡時,記憶體控制器會對此邏輯區塊執行資料合併(Merge)程序。例如,在資料合併程序中,記憶體控制器會提取一個空的實體區塊作為新資料實體區塊,將屬於此邏輯區塊的所有有效資料從原映射實體區塊與暫存實體區塊中複製到新資料實體區塊中並且將此邏輯區塊重新映射至此新資料實體區塊。 For example, when the data of a certain logical block is stored in a data entity block (hereinafter referred to as the original mapping data entity block) and the host system wants to update the data stored on a certain logical page of a certain logical block. The memory controller of the storage device extracts a physical block from the flash memory module as a temporary physical block corresponding to the logical block, and writes the updated data to the temporary physical block. In the physical page, the time to execute the write command is thus shortened. Then, when the unused physical block in the flash memory module is exhausted, the memory controller performs a data merge (Merge) process on the logical block. For example, in the data merge program, the memory controller extracts an empty physical block as a new data entity block, and all valid data belonging to the logical block from the original mapped physical block and the temporary physical block. Copy to the new data entity block and remap this logical block to this new data entity block.

然而,如上所述,MLC NAND型快閃記憶體或TLC NAND型快閃記憶體中部分實體頁面的可靠度較低,因此,如何有效地在實體區塊之間搬移資料以進行資料合併程序是此領域技術人員所致力的目標。 However, as described above, the reliability of some physical pages in the MLC NAND-type flash memory or the TLC NAND-type flash memory is low, so how to efficiently move data between physical blocks for data merge is The goal of the technical staff in this field.

本發明提供一種資料合併方法、記憶體控制器與記憶體 儲存裝置,其能夠提升資料合併的效率及所寫入之資料的可靠度。 The invention provides a data merging method, a memory controller and a memory A storage device that improves the efficiency of data merging and the reliability of the data being written.

本發明範例實施例提出一種資料合併方法,用於在可複寫式非揮發性記憶模組中合併一個邏輯區塊的有效資料,其中此可複寫式非揮發性記憶體模組具有多個實體區塊,每一實體區塊具有多個實體頁面組,每一實體頁面組至少具有一個下頁實體頁面與一個上頁實體頁面,寫入資料至下頁實體頁面的速度快於寫入資料至上頁實體頁面的速度,此邏輯區塊的有效資料分散地被儲存在第一資料實體區塊與至少一暫存實體區塊中,並且此邏輯區塊的有效資料欲被合併至第二資料實體區塊。本資料合併方法包括:指派對應此邏輯區塊的多個整理實體區塊。此外,本資料合併方法也包括以部分同步方式執行資料整理運作與資料搬移運作,其中此資料整理運作用以從第一資料實體區塊和暫存實體區塊中將上述邏輯區塊的有效資料整理至整理實體區塊的下頁實體頁面,此資料搬移運作用以從整理實體區塊之中將上述邏輯區塊的有效資料搬移至第二資料實體區塊。再者,本資料合併方法更包括將此邏輯區塊重新映射至第二資料實體區塊。 An exemplary embodiment of the present invention provides a data merging method for merging valid data of a logical block in a rewritable non-volatile memory module, wherein the rewritable non-volatile memory module has multiple physical regions. Block, each physical block has a plurality of physical page groups, each physical page group has at least one lower page physical page and one upper page physical page, and writing data to the next page physical page is faster than writing the data to the previous page The speed of the physical page, the valid data of the logical block is stored in the first data entity block and the at least one temporary physical block, and the valid data of the logical block is to be merged into the second data entity area. Piece. The method for merging data includes: assigning a plurality of collating entity blocks corresponding to the logical block. In addition, the method of merging data also includes performing a data sorting operation and a data moving operation in a partially synchronized manner, wherein the data sorting operation is to use the valid data of the logical block from the first data entity block and the temporary physical block. Sorting to the next page entity page of the physical block, the data moving operation is used to move the valid data of the logical block to the second data entity block from the finishing physical block. Furthermore, the method of merging data further includes re-mapping the logical block to the second data entity block.

在本發明之一實施例中,上述之以部分同步方式執行資料整理運作與資料搬移運作的步驟包括:(a)從第一資料實體區塊和暫存實體區塊中將上述邏輯區塊的有效資料之中屬於多個邏輯頁面的有效資料複製到上述整理實體區塊的下頁實體頁面中,其中該些邏輯頁面的數目為一預定數目;(b)從此些整理實體區塊中將屬於該些邏輯頁面的有效資料複製到第二資料實體區塊,同時 從第一資料實體區塊和暫存實體區塊中將該邏輯區塊的有效資料之中屬於其他邏輯頁面的後續有效資料複製到上述整理實體區塊的後續下頁實體頁面中;以及(c)重複執行步驟(a)與(b),直到上述邏輯區塊的所有有效資料都被複製到第二資料實體區塊為止。 In an embodiment of the present invention, the step of performing the data sorting operation and the data moving operation in a partially synchronous manner includes: (a) transferring the logical block from the first data entity block and the temporary storage physical block. The valid data belonging to the plurality of logical pages among the valid data is copied to the next page physical page of the finishing physical block, wherein the number of the logical pages is a predetermined number; (b) from the finishing physical blocks The valid data of the logical pages is copied to the second data entity block, and at the same time Copying, from the first data entity block and the temporary storage entity block, the subsequent valid data belonging to the other logical pages among the valid data of the logical block to the subsequent lower page entity page of the finishing physical block; and (c Repeat steps (a) and (b) until all valid data of the above logical block is copied to the second data entity block.

在本發明之一實施例中,上述之以部分同步方式執行資料整理運作與資料搬移運作的步驟包括:(a)從第一資料實體區塊和暫存實體區塊中將邏輯區塊的有效資料之中屬於一個邏輯頁面的有效資料複製到整理實體區塊的下頁實體頁面中;(b)從整理實體區塊中將此邏輯頁面的有效資料複製到第二資料實體區塊,同時從第一資料實體區塊和暫存實體區塊中將此邏輯區塊的有效資料之中屬於下一個邏輯頁面的有效資料複製到整理實體區塊的後續下頁實體頁面中;以及(c)重複執行步驟(a)與(b),直到此邏輯區塊的所有有效資料都被複製到第二資料實體區塊為止。 In an embodiment of the present invention, the step of performing the data sorting operation and the data moving operation in a partially synchronous manner includes: (a) validating the logical block from the first data entity block and the temporary storage physical block. The valid data belonging to one logical page in the data is copied to the next page entity page of the finishing physical block; (b) copying the valid data of the logical page from the finishing physical block to the second physical entity block, and simultaneously Copying valid data belonging to the next logical page from the valid data of the logical block to the subsequent page physical page of the finishing entity block in the first data entity block and the temporary storage entity block; and (c) repeating Steps (a) and (b) are performed until all valid data of the logical block is copied to the second data entity block.

在本發明之一實施例中,上述之資料搬移運作是藉由使用一複製回(copyback)指令來執行。 In one embodiment of the invention, the data transfer operation described above is performed by using a copyback instruction.

在本發明之一實施例中,上述之每一實體頁面組更具有一中頁實體頁面,並且寫入資料至下頁實體頁面的速度快於寫入資料至中頁實體頁面的速度,寫入資料至中頁實體頁面的速度快於寫入資料至上頁實體頁面的速度。 In an embodiment of the present invention, each of the physical page groups has a medium page physical page, and the data is written to the next page physical page faster than the speed of writing the data to the middle page physical page, and writing The data to the physical page of the middle page is faster than the speed at which the data is written to the physical page of the previous page.

在本發明之一實施例中,上述之資料合併方法更包括:將上述實體區塊至少分組為資料區與暫存區,其中第一資料實體區塊與第二資料實體區塊屬於資料區並且暫存實體區塊是從暫存 區中被指派。 In an embodiment of the present invention, the data merging method further includes: grouping the physical blocks into at least a data area and a temporary storage area, wherein the first data entity block and the second data entity block belong to the data area and Temporary physical block is from temporary storage The area is assigned.

在本發明之一實施例中,上述之從暫存區中指派作為對應上述邏輯區塊的整理實體區塊的步驟包括:從暫存區中提取3個實體區塊作為對應此邏輯區塊的第一整理實體區塊、第二整理實體區塊與第三整理實體區塊。 In an embodiment of the present invention, the step of assigning from the temporary storage area as the finishing physical block corresponding to the logical block comprises: extracting three physical blocks from the temporary storage area as corresponding to the logical block. The first finishing physical block, the second finishing physical block, and the third finishing physical block.

本發明範例實施例提出一種記憶體控制器,用於控制可複寫式非揮發性記憶體模組,其中此可複寫式非揮發性記憶體模組具有多個實體區塊,每一實體區塊具有多個實體頁面組,每一實體頁面組至少具有一個下頁實體頁面與一上個實體頁面,寫入資料至下頁實體頁面的速度快於寫入資料至上頁實體頁面的速度。本記憶體控制器包括主機介面、記憶體介面與記憶體管理電路。主機介面用以耦接至主機系統。記憶體介面用以耦接至可複寫式非揮發性記憶體模組。記憶體管理電路耦接至主機介面與記憶體介面,並且用以將一個邏輯區塊的有效資料合併至第二資料實體區塊,其中此邏輯區塊的有效資料分散地被儲存在第一資料實體區塊與暫存實體區塊中。在此,記憶體管理電路指派對應此邏輯區塊的多個整理實體區塊。此外,記憶體管理電路以部分同步方式執行資料整理運作與資料搬移運作,其中此資料整理運作用以從第一資料實體區塊和暫存實體區塊中將上述邏輯區塊的有效資料整理至整理實體區塊的下頁實體頁面,此資料搬移運作用以從整理實體區塊之中將上述邏輯區塊的有效資料搬移至第二資料實體區塊。再者,記憶體管理電路更用以將此邏輯區塊重新映 射至第二資料實體區塊。 An exemplary embodiment of the present invention provides a memory controller for controlling a rewritable non-volatile memory module, wherein the rewritable non-volatile memory module has a plurality of physical blocks, each physical block There are multiple physical page groups, each physical page group has at least one lower page physical page and one last physical page, and the data is written to the next page physical page faster than the data is written to the upper page physical page. The memory controller includes a host interface, a memory interface and a memory management circuit. The host interface is coupled to the host system. The memory interface is coupled to the rewritable non-volatile memory module. The memory management circuit is coupled to the host interface and the memory interface, and is configured to merge the valid data of one logical block into the second physical entity block, wherein the valid data of the logical block is stored in the first data in a dispersed manner. In the physical block and the temporary physical block. Here, the memory management circuit assigns a plurality of collating physical blocks corresponding to the logical block. In addition, the memory management circuit performs the data sorting operation and the data moving operation in a partially synchronized manner, wherein the data sorting operation is used to sort the valid data of the logical block from the first data entity block and the temporary storage physical block to The next page physical page of the physical block is arranged, and the data moving operation is used to move the valid data of the logical block from the finishing physical block to the second physical entity block. Furthermore, the memory management circuit is used to remap this logical block. Shot to the second data entity block.

在本發明之一實施例中,在資料整理運作與資料搬移運作被以部分同步方式執行期間,記憶體管理電路從第一資料實體區塊和暫存實體區塊中將上述邏輯區塊的有效資料之中屬於多個邏輯頁面的有效資料複製到此些整理實體區塊的下頁實體頁面中,其中該些邏輯頁面的數目為一預定數目。此外,在資料整理運作與資料搬移運作以部分同步方式被執行期間,記憶體管理電路從此些整理實體區塊中將屬於此些邏輯頁面的有效資料複製到第二資料實體區塊,同時從第一資料實體區塊和暫存實體區塊中將該邏輯區塊的有效資料之中屬於其他邏輯頁面的後續有效資料複製到此些整理實體區塊的後續下頁實體頁面中。 In an embodiment of the present invention, during the data sorting operation and the data moving operation are performed in a partially synchronous manner, the memory management circuit validates the logical block from the first data entity block and the temporary physical block. The valid data belonging to the plurality of logical pages among the data is copied into the next page physical pages of the finishing physical blocks, wherein the number of the logical pages is a predetermined number. In addition, during the data sorting operation and the data moving operation are performed in a partially synchronous manner, the memory management circuit copies the valid data belonging to the logical pages from the sorted physical blocks to the second data entity block, and simultaneously from the In the data entity block and the temporary storage entity block, the subsequent valid data belonging to the other logical pages among the valid data of the logical block is copied into the subsequent lower page entity pages of the finishing physical blocks.

在本發明之一實施例中,在資料整理運作與資料搬移運作以部分同步方式被執行期間,記憶體管理電路從第一資料實體區塊和暫存實體區塊中將上述邏輯區塊的有效資料之中屬於一個邏輯頁面的有效資料複製到此些整理實體區塊的下頁實體頁面中。此外,在資料整理運作與資料搬移運作以部分同步方式被執行期間,記憶體管理電路從此些整理實體區塊中將屬於此邏輯頁面的有效資料複製到第二資料實體區塊,同時從第一資料實體區塊和暫存實體區塊中將此邏輯區塊的有效資料之中屬於下一個邏輯頁面的有效資料複製到整理實體區塊的後續下頁實體頁面中。 In an embodiment of the present invention, during the data sorting operation and the data moving operation are performed in a partially synchronous manner, the memory management circuit validates the logical block from the first data entity block and the temporary storage physical block. The valid data belonging to a logical page among the data is copied to the next page entity page of the finishing physical block. In addition, during the data sorting operation and the data moving operation are performed in a partially synchronous manner, the memory management circuit copies the valid data belonging to the logical page from the sorted physical blocks to the second data physical block, and simultaneously from the first In the data entity block and the temporary storage entity block, the valid data belonging to the next logical page among the valid data of the logical block is copied to the subsequent lower page entity page of the finishing physical block.

在本發明之一實施例中,上述之記憶體管理電路使用複製回指令來執行資料搬移運作。 In an embodiment of the invention, the memory management circuit described above performs a data transfer operation using a copy back instruction.

在本發明之一實施例中,每一實體頁面組更具有一中頁實體頁面,並且寫入資料至下頁實體頁面的速度快於寫入資料至中頁實體頁面的速度,寫入資料至中頁實體頁面的速度快於寫入資料至上頁實體頁面的速度。 In an embodiment of the present invention, each physical page group has a medium page physical page, and the data is written to the next page physical page faster than the speed of writing the data to the middle page physical page, and the data is written to The medium page physical page is faster than the data written to the physical page of the previous page.

在本發明之一實施例中,上述之記憶體管理電路將上述實體區塊至少分組為資料區與暫存區,其中第一資料實體區塊與第二資料實體區塊屬於資料區並且暫存實體區塊是從暫存區中被指派。 In an embodiment of the present invention, the memory management circuit groups the physical blocks into at least a data area and a temporary storage area, wherein the first data entity block and the second data entity block belong to the data area and are temporarily stored. The physical block is assigned from the temporary storage area.

在本發明之一實施例中,上述之記憶體管理電路從暫存區中提取3個實體區塊作為對應上述邏輯區塊的第一整理實體區塊、第二整理實體區塊與第三整理實體區塊。 In an embodiment of the present invention, the memory management circuit extracts three physical blocks from the temporary storage area as the first finishing physical block, the second finishing physical block, and the third finishing corresponding to the logical block. Physical block.

本發明範例實施例提出一種記憶體儲存裝置,其包括連接器、可複寫式非揮發性記憶體模組與記憶體控制器。連接器用以耦接至一主機系統。可複寫式非揮發性記憶體模組具有多個實體區塊,每一實體區塊具有多個實體頁面組,每一實體頁面組至少具有一個下頁實體頁面與一個上頁實體頁面,並且寫入資料至下頁實體頁面的速度快於寫入資料至上頁實體頁面的速度。記憶體控制器耦接至連接器與可複寫式非揮發性記憶體模組,並且用以將一個邏輯區塊的有效資料合併至第二資料實體區塊,其中此邏輯區塊的有效資料分散地被儲存在第一資料實體區塊與暫存實體區塊中。在此,記憶體控制器指派對應此邏輯區塊的多個整理實體區塊。此外,記憶體控制器以部分同步方式執行資料整理運 作與資料搬移運作,其中此資料整理運作用以從第一資料實體區塊和暫存實體區塊中將上述邏輯區塊的有效資料整理至整理實體區塊的下頁實體頁面,此資料搬移運作用以從整理實體區塊之中將上述邏輯區塊的有效資料搬移至第二資料實體區塊。再者,記憶體控制器更用以將此邏輯區塊重新映射至第二資料實體區塊。 An exemplary embodiment of the present invention provides a memory storage device including a connector, a rewritable non-volatile memory module, and a memory controller. The connector is coupled to a host system. The rewritable non-volatile memory module has a plurality of physical blocks, each physical block has a plurality of physical page groups, and each physical page group has at least one lower page physical page and one upper page physical page, and is written Entering the data to the next page of the physical page is faster than writing the data to the physical page of the previous page. The memory controller is coupled to the connector and the rewritable non-volatile memory module, and is configured to merge the valid data of one logical block into the second physical entity block, where the effective data of the logical block is dispersed The ground is stored in the first data entity block and the temporary storage entity block. Here, the memory controller assigns a plurality of collating physical blocks corresponding to the logical block. In addition, the memory controller performs data sorting in a partially synchronized manner. And the data moving operation, wherein the data sorting operation is used to sort the valid data of the logical block from the first data entity block and the temporary physical block to the next page physical page of the physical block, and the data is moved. The operation is for moving the valid data of the logical block to the second data entity block from the finishing physical block. Furthermore, the memory controller is further configured to remap the logical block to the second data entity block.

在本發明之一實施例中,在資料整理運作與資料搬移運作以部分同步方式被執行期間,記憶體控制器從第一資料實體區塊和暫存實體區塊中將上述邏輯區塊的有效資料之中屬於多個邏輯頁面的有效資料複製到此些整理實體區塊的下頁實體頁面中,其中該些邏輯頁面的數目為一預定數目。此外,在資料整理運作與資料搬移運作以部分同步方式被執行期間,記憶體控制器從此些整理實體區塊中將屬於此些邏輯頁面的有效資料複製到第二資料實體區塊,同時從第一資料實體區塊和暫存實體區塊中將該邏輯區塊的有效資料之中屬於其他邏輯頁面的後續有效資料複製到此些整理實體區塊的後續下頁實體頁面中。 In an embodiment of the present invention, during the data sorting operation and the data moving operation are performed in a partially synchronous manner, the memory controller validates the logical block from the first data entity block and the temporary storage physical block. The valid data belonging to the plurality of logical pages among the data is copied into the next page physical pages of the finishing physical blocks, wherein the number of the logical pages is a predetermined number. In addition, during the data sorting operation and the data moving operation are executed in a partially synchronous manner, the memory controller copies the valid data belonging to the logical pages from the sorted physical blocks to the second data entity block, and simultaneously from the In the data entity block and the temporary storage entity block, the subsequent valid data belonging to the other logical pages among the valid data of the logical block is copied into the subsequent lower page entity pages of the finishing physical blocks.

在本發明之一實施例中,在資料整理運作與資料搬移運作以部分同步方式被執行期間,記憶體控制器從第一資料實體區塊和暫存實體區塊中將上述邏輯區塊的有效資料之中屬於一個邏輯頁面的有效資料複製到此些整理實體區塊的下頁實體頁面中。此外,在資料整理運作與資料搬移運作以部分同步方式被執行期間,記憶體控制器從此些整理實體區塊中將屬於此邏輯頁面的有效資料複製到第二資料實體區塊,同時從第一資料實體區塊和暫 存實體區塊中將此邏輯區塊的有效資料之中屬於下一個邏輯頁面的有效資料複製到整理實體區塊的後續下頁實體頁面中。 In an embodiment of the present invention, during the data sorting operation and the data moving operation are performed in a partially synchronous manner, the memory controller validates the logical block from the first data entity block and the temporary storage physical block. The valid data belonging to a logical page among the data is copied to the next page entity page of the finishing physical block. In addition, during the data sorting operation and the data moving operation are performed in a partially synchronous manner, the memory controller copies the valid data belonging to the logical page from the sorted physical blocks to the second data entity block, and simultaneously from the first Data entity block and temporary In the physical block, the valid data belonging to the next logical page among the valid data of the logical block is copied to the subsequent lower page physical page of the finishing physical block.

在本發明之一實施例中,上述之記憶體控制器使用複製回指令來執行資料搬移運作。 In an embodiment of the invention, the memory controller described above performs a data transfer operation using a copy back instruction.

在本發明之一實施例中,每一實體頁面組更具有一中頁實體頁面,並且寫入資料至下頁實體頁面的速度快於寫入資料至中頁實體頁面的速度,寫入資料至中頁實體頁面的速度快於寫入資料至上頁實體頁面的速度。 In an embodiment of the present invention, each physical page group has a medium page physical page, and the data is written to the next page physical page faster than the speed of writing the data to the middle page physical page, and the data is written to The medium page physical page is faster than the data written to the physical page of the previous page.

在本發明之一實施例中,上述之記憶體控制器將上述實體區塊至少分組為資料區與暫存區,其中第一資料實體區塊與第二資料實體區塊屬於資料區並且暫存實體區塊是從暫存區中被指派。 In an embodiment of the present invention, the memory controller groups the physical blocks into at least a data area and a temporary storage area, wherein the first data entity block and the second data entity block belong to the data area and are temporarily stored. The physical block is assigned from the temporary storage area.

在本發明之一實施例中,上述之記憶體控制器從暫存區中提取3個實體區塊作為對應上述邏輯區塊的第一整理實體區塊、第二整理實體區塊與第三整理實體區塊。 In an embodiment of the present invention, the memory controller extracts three physical blocks from the temporary storage area as the first finishing physical block, the second finishing physical block, and the third finishing corresponding to the logical block. Physical block.

基於上述,本發明範例實施例的資料合併方法、記憶體控制器與記憶體儲存裝置能夠有效地提升合併資料的可靠度並且縮短執行資料合併所需的時間。 Based on the above, the data merging method, the memory controller and the memory storage device of the exemplary embodiments of the present invention can effectively improve the reliability of the merged data and shorten the time required to perform data merging.

為讓本發明之上述特徵和優點能更明顯易懂,下文特舉實施例,並配合所附圖式作詳細說明如下。 The above described features and advantages of the present invention will be more apparent from the following description.

1000‧‧‧主機系統 1000‧‧‧Host system

1100‧‧‧電腦 1100‧‧‧ computer

1102‧‧‧微處理器 1102‧‧‧Microprocessor

1104‧‧‧隨機存取記憶體 1104‧‧‧ Random access memory

1106‧‧‧輸入/輸出裝置 1106‧‧‧Input/output devices

1108‧‧‧系統匯流排 1108‧‧‧System Bus

1110‧‧‧資料傳輸介面 1110‧‧‧Data transmission interface

1202‧‧‧滑鼠 1202‧‧‧ Mouse

1204‧‧‧鍵盤 1204‧‧‧ keyboard

1206‧‧‧顯示器 1206‧‧‧ display

1208‧‧‧印表機 1208‧‧‧Printer

1212‧‧‧隨身碟 1212‧‧‧USB flash drive

1214‧‧‧記憶卡 1214‧‧‧ memory card

1216‧‧‧固態硬碟 1216‧‧‧ Solid State Drive

1310‧‧‧數位相機 1310‧‧‧ digital camera

1312‧‧‧SD卡 1312‧‧‧SD card

1314‧‧‧MMC卡 1314‧‧‧MMC card

1316‧‧‧記憶棒 1316‧‧‧ Memory Stick

1318‧‧‧CF卡 1318‧‧‧CF card

1320‧‧‧嵌入式儲存裝置 1320‧‧‧Embedded storage device

100‧‧‧記憶體儲存裝置 100‧‧‧ memory storage device

102‧‧‧連接器 102‧‧‧Connector

104‧‧‧記憶體控制器 104‧‧‧ memory controller

106‧‧‧可複寫式非揮發性記憶體模組 106‧‧‧Reusable non-volatile memory module

302‧‧‧記憶體管理電路 302‧‧‧Memory Management Circuit

304‧‧‧主機介面 304‧‧‧Host interface

306‧‧‧記憶體介面 306‧‧‧ memory interface

308‧‧‧緩衝記憶體 308‧‧‧ Buffer memory

310‧‧‧電源管理電路 310‧‧‧Power Management Circuit

312‧‧‧錯誤檢查與校正電路 312‧‧‧Error checking and correction circuit

502‧‧‧取代區 502‧‧‧Substitute area

504‧‧‧暫存區 504‧‧‧ temporary storage area

506‧‧‧資料區 506‧‧‧Information area

410(0)~410(R)、410(R+1)~410(T)、410(T+1)~410(N)‧‧‧實體區塊 410(0)~410(R), 410(R+1)~410(T), 410(T+1)~410(N)‧‧‧ physical blocks

610(0)~610(H)‧‧‧邏輯區塊 610(0)~610(H)‧‧‧ logical block

S901、S903、S905、S907‧‧‧資料合併方法的步驟 Steps of S901, S903, S905, S907‧‧‧ data merge method

S1001、S1003、S1005、S1007‧‧‧以部分同步方式執行資料整理運作與資料搬移運作的步驟 S1001, S1003, S1005, S1007‧‧‧ Steps to perform data sorting operations and data movement operations in a partially synchronized manner

圖1A是根據一範例實施例所繪示的主機系統與記憶體儲存裝置。 FIG. 1A illustrates a host system and a memory storage device according to an exemplary embodiment.

圖1B是根據本發明一範例實施例所繪示的電腦、輸入/輸出裝置與記憶體儲存裝置的示意圖。 FIG. 1B is a schematic diagram of a computer, an input/output device, and a memory storage device according to an exemplary embodiment of the invention.

圖1C是根據本發明另一範例實施例所繪示的主機系統與記憶體儲存裝置的示意圖。 FIG. 1C is a schematic diagram of a host system and a memory storage device according to another exemplary embodiment of the invention.

圖2是繪示圖1A所示的記憶體儲存裝置的概要方塊圖。 FIG. 2 is a schematic block diagram showing the memory storage device shown in FIG. 1A.

圖3A與圖3B是根據本範例時實施例所繪示之記憶胞儲存架構與實體區塊的範例示意圖。 FIG. 3A and FIG. 3B are schematic diagrams showing examples of a memory cell storage architecture and a physical block according to an embodiment of the present exemplary embodiment.

圖4是根據一範例實施例所繪示之記憶體控制器的概要方塊圖。 4 is a schematic block diagram of a memory controller according to an exemplary embodiment.

圖5是根據一範例實施例所繪示管理可複寫式非揮發性記憶體模組之實體區塊的示意圖。 FIG. 5 is a schematic diagram of managing a physical block of a rewritable non-volatile memory module according to an exemplary embodiment.

圖6是根據一範例所繪示之寫入資料的示意圖。 FIG. 6 is a schematic diagram of writing data according to an example.

圖7與圖8是根據一範例所繪示之資料合併程序的示意圖,其中圖7繪示資料整理運作的範例示意圖並且圖8繪示資料搬移運作的範例示意圖。 FIG. 7 and FIG. 8 are schematic diagrams of a data merge procedure according to an example. FIG. 7 is a schematic diagram showing an example of data sorting operation and FIG. 8 is a schematic diagram showing an example of data shifting operation.

圖9是根據一範例實施例所繪示的資料合併方法的流程圖。 FIG. 9 is a flowchart of a data merging method according to an exemplary embodiment.

圖10是根據一範例實施例所繪示之步驟S905的詳細流程圖。 FIG. 10 is a detailed flowchart of step S905 according to an exemplary embodiment.

一般而言,記憶體儲存裝置(亦稱,記憶體儲存系統)包括可複寫式非揮發性記憶體模組與控制器(亦稱,控制電路)。通常記憶體儲存裝置是與主機系統一起使用,以使主機系統可將資料寫入至記憶體儲存裝置或從記憶體儲存裝置中讀取資料。 In general, a memory storage device (also referred to as a memory storage system) includes a rewritable non-volatile memory module and controller (also referred to as a control circuit). Typically, the memory storage device is used with a host system to enable the host system to write data to or read data from the memory storage device.

圖1A是根據一範例實施例所繪示的主機系統與記憶體儲存裝置。 FIG. 1A illustrates a host system and a memory storage device according to an exemplary embodiment.

請參照圖1A,主機系統1000一般包括電腦1100與輸入/輸出(input/output,I/O)裝置1106。電腦1100包括微處理器1102、隨機存取記憶體(random access memory,RAM)1104、系統匯流排1108與資料傳輸介面1110。輸入/輸出裝置1106包括如圖1B的滑鼠1202、鍵盤1204、顯示器1206與印表機1208。必須瞭解的是,圖1B所示的裝置非限制輸入/輸出裝置1106,輸入/輸出裝置1106可更包括其他裝置。 Referring to FIG. 1A, the host system 1000 generally includes a computer 1100 and an input/output (I/O) device 1106. The computer 1100 includes a microprocessor 1102, a random access memory (RAM) 1104, a system bus 1108, and a data transmission interface 1110. The input/output device 1106 includes a mouse 1202, a keyboard 1204, a display 1206, and a printer 1208 as in FIG. 1B. It must be understood that the device shown in FIG. 1B is not limited to the input/output device 1106, and the input/output device 1106 may further include other devices.

在本發明實施例中,記憶體儲存裝置100是透過資料傳輸介面1110與主機系統1000的其他元件耦接。藉由微處理器1102、隨機存取記憶體1104與輸入/輸出裝置1106的運作可將資料寫入至記憶體儲存裝置100或從記憶體儲存裝置100中讀取資料。例如,記憶體儲存裝置100可以是如圖1B所示的隨身碟1212、記憶卡1214或固態硬碟(Solid State Drive,SSD)1216等的可複寫式非揮發性記憶體儲存裝置。 In the embodiment of the present invention, the memory storage device 100 is coupled to other components of the host system 1000 through the data transmission interface 1110. The data can be written to or read from the memory storage device 100 by the operation of the microprocessor 1102, the random access memory 1104, and the input/output device 1106. For example, the memory storage device 100 may be a rewritable non-volatile memory storage device such as a flash drive 1212, a memory card 1214, or a solid state drive (SSD) 1216 as shown in FIG. 1B.

一般而言,主機系統1000可實質地為可與記憶體儲存裝 置100配合以儲存資料的任意系統。雖然在本範例實施例中,主機系統1000是以電腦系統來作說明,然而,在本發明另一範例實施例中主機系統1000可以是數位相機、攝影機、通信裝置、音訊播放器或視訊播放器等系統。例如,在主機系統為數位相機(攝影機)1310時,可複寫式非揮發性記憶體儲存裝置則為其所使用的SD卡1312、MMC卡1314、記憶棒(memory stick)1316、CF卡1318或嵌入式儲存裝置1320(如圖1C所示)。嵌入式儲存裝置1320包括嵌入式多媒體卡(Embedded MMC,eMMC)。值得一提的是,嵌入式多媒體卡是直接耦接於主機系統的基板上。 In general, the host system 1000 can be substantially loaded with memory. Set 100 to match any system that stores data. Although in the present exemplary embodiment, the host system 1000 is illustrated by a computer system, in another exemplary embodiment of the present invention, the host system 1000 may be a digital camera, a video camera, a communication device, an audio player, or a video player. And other systems. For example, when the host system is a digital camera (camera) 1310, the rewritable non-volatile memory storage device uses the SD card 1312, the MMC card 1314, the memory stick 1316, the CF card 1318 or Embedded storage device 1320 (shown in Figure 1C). The embedded storage device 1320 includes an embedded multimedia card (Embedded MMC, eMMC). It is worth mentioning that the embedded multimedia card is directly coupled to the substrate of the host system.

圖2是繪示圖1A所示的記憶體儲存裝置的概要方塊圖。 FIG. 2 is a schematic block diagram showing the memory storage device shown in FIG. 1A.

請參照圖2,記憶體儲存裝置100包括連接器102、記憶體控制器104與可複寫式非揮發性記憶體模組106。 Referring to FIG. 2, the memory storage device 100 includes a connector 102, a memory controller 104, and a rewritable non-volatile memory module 106.

在本範例實施例中,連接器102是相容於序列安全數位(Secure Digital,SD)介面標準。然而,必須瞭解的是,本發明不限於此,連接器102亦可以是符合電氣和電子工程師協會(Institute of Electrical and Electronic Engineers,IEEE)1394標準、平行先進附件(Parallel Advanced Technology Attachment,PATA)標準、高速周邊零件連接介面(Peripheral Component Interconnect Express,PCI Express)標準、通用序列匯流排(Universal Serial Bus,USB)標準、先進附件(Serial Advanced Technology Attachment,SATA)標準、記憶棒(Memory Stick,MS)介面標準、多媒體儲存卡(Multi Media Card,MMC)介面標準、小型快閃(Compact Flash, CF)介面標準、整合式驅動電子介面(Integrated Device Electronics,IDE)標準或其他適合的標準。 In the present exemplary embodiment, connector 102 is compatible with the Secure Digital (SD) interface standard. However, it must be understood that the present invention is not limited thereto, and the connector 102 may also conform to the Institute of Electrical and Electronic Engineers (IEEE) 1394 standard, Parallel Advanced Technology Attachment (PATA) standard. , Peripheral Component Interconnect Express (PCI Express) standard, Universal Serial Bus (USB) standard, Serial Advanced Technology Attachment (SATA) standard, Memory Stick (MS) Interface standard, multimedia memory card (MMC) interface standard, compact flash (Compact Flash, CF) interface standard, Integrated Device Electronics (IDE) standard or other suitable standard.

記憶體控制器104用以執行以硬體型式或韌體型式實作的多個邏輯閘或控制指令,並且根據主機系統1000的指令在可複寫式非揮發性記憶體模組106中進行資料的寫入、讀取、抹除與合併等運作。 The memory controller 104 is configured to execute a plurality of logic gates or control commands implemented in a hard type or a firmware type, and perform data in the rewritable non-volatile memory module 106 according to instructions of the host system 1000. Write, read, erase, and merge operations.

可複寫式非揮發性記憶體模組106是耦接至記憶體控制器104,並且具有多個實體區塊以儲存主機系統1000所寫入之資料。 The rewritable non-volatile memory module 106 is coupled to the memory controller 104 and has a plurality of physical blocks to store data written by the host system 1000.

在本範例實施例中,每一實體區塊分別具有複數個實體頁面組並且每一實體頁面組包括由位於同一條字元線之記憶胞所構成的至少一個實體頁面,其中屬於同一個實體區塊之實體頁面必須被同時地抹除。更詳細來說,實體區塊為抹除之最小單位。亦即,每一實體區塊含有最小數目之一併被抹除之記憶胞。 In this exemplary embodiment, each physical block has a plurality of physical page groups, and each physical page group includes at least one physical page composed of memory cells located on the same word line, wherein the same physical area belongs to the same physical area. The physical pages of the block must be erased at the same time. In more detail, the physical block is the smallest unit of erasure. That is, each physical block contains one of the smallest number of erased memory cells.

每一實體頁面通常包括資料位元區與冗餘位元區。資料位元區用以儲存使用者的資料,而冗餘位元區用以儲存系統的資料(例如,錯誤檢查與校正碼)。在本範例實施例中,每一實體區塊是由258個實體頁面所組成,並且每一實體頁面的容量為8千位元組(Kilobyte,KB)。然而,必須瞭解的是,本發明不限於此。 Each physical page typically includes a data bit area and a redundant bit area. The data bit area is used to store the user's data, and the redundant bit area is used to store system data (eg, error checking and correction codes). In this exemplary embodiment, each physical block is composed of 258 physical pages, and the capacity of each physical page is 8 kilobytes (Kilobyte, KB). However, it must be understood that the invention is not limited thereto.

在本範例實施例中,可複寫式非揮發性記憶體模組106為一種三階儲存單元(Triple Level Cell,TLC)NAND型快閃記憶體模組。然而,必須瞭解的是,可複寫式非揮發性記憶體模組106 並非限於TLC NAND型快閃記憶體模組。在本發明另一範例實施例中,可複寫式非揮發性記憶體模組106亦可是MLC NAND型快閃記憶體模組或其他具有相同特性的記憶體模組。 In the exemplary embodiment, the rewritable non-volatile memory module 106 is a third-level storage unit (TLC) NAND-type flash memory module. However, it must be understood that the rewritable non-volatile memory module 106 Not limited to TLC NAND type flash memory modules. In another exemplary embodiment of the present invention, the rewritable non-volatile memory module 106 can also be an MLC NAND type flash memory module or other memory modules having the same characteristics.

圖3A與圖3B是根據本範例實施例所繪示之記憶胞儲存架構與實體區塊的範例示意圖。 FIG. 3A and FIG. 3B are schematic diagrams showing examples of a memory cell storage architecture and a physical block according to an exemplary embodiment of the present invention.

請參照圖3A,可複寫式非揮發性記憶體模組106的每個記憶胞的儲存狀態可被識別為”111”、”110”、”101”、”100”、”011”、”010”、”001”或”000”(如圖3A所示),其中左側算起之第1個位元為LSB、從左側算起之第2個位元為CSB以及從左側算起之第3個位元為MSB。此外,排列在同一條字元線上的數個記憶胞可組成3個實體頁面,其中由此些記憶胞之LSB所組成的實體頁面稱為下頁實體頁面,由此些記憶胞之CSB所組成的實體頁面稱為中頁實體頁面,並且由此些記憶胞之MSB所組成的實體頁面稱為上頁實體頁面。 Referring to FIG. 3A, the storage state of each memory cell of the rewritable non-volatile memory module 106 can be identified as "111", "110", "101", "100", "011", "010". "," 001" or "000" (as shown in Figure 3A), where the first bit from the left is the LSB, the second bit from the left is the CSB, and the third from the left The bits are MSB. In addition, a plurality of memory cells arranged on the same character line can form three physical pages, wherein the physical page composed of the LSBs of the memory cells is called a physical page of the next page, and thus the CSB of the memory cells is composed. The physical page is called the middle page physical page, and the physical page composed of the MSBs of the memory cells is called the upper page physical page.

請參照圖3B,例如,在本範例實施例中,一個實體區塊是由多個實體頁面組(即,第0~第85個實體頁面組)所組成,其中每個實體頁面組包括由排列在同一條字元線上的數個記憶胞所組成的下頁實體頁面、中頁實體頁面與上頁實體頁面。例如,屬於下頁實體頁面的第0個實體頁面、屬於中頁實體頁面的第1個實體頁面和屬於上頁實體頁面的第2個實體頁面會被視為一個實體頁面組。類似地,第3、4、5個實體頁面會被視為一個實體頁面 組,並且以此類推其他實體頁面亦是依據此方式被區分為多個實體頁面組。 Referring to FIG. 3B, for example, in the exemplary embodiment, a physical block is composed of a plurality of physical page groups (ie, 0th to 85th physical page groups), wherein each physical page group includes an arrangement. The next page entity page, the middle page entity page and the upper page entity page composed of a plurality of memory cells on the same character line. For example, the 0th entity page belonging to the next page entity page, the 1st entity page belonging to the middle page entity page, and the 2nd entity page belonging to the upper page entity page are regarded as one entity page group. Similarly, the 3rd, 4th, and 5th physical pages will be treated as one physical page. Groups, and so on, other entity pages are also differentiated into multiple entity page groups in this way.

圖4是根據一範例實施例所繪示之記憶體控制器的概要方塊圖。必須瞭解的是,圖4所繪示之記憶體控制器僅為一個範例,本發明不限於此。 4 is a schematic block diagram of a memory controller according to an exemplary embodiment. It should be understood that the memory controller illustrated in FIG. 4 is merely an example, and the present invention is not limited thereto.

請參照圖4,記憶體控制器104包括記憶體管理電路302、主機介面304、記憶體介面306、緩衝記憶體308、電源管理電路310、錯誤檢查與校正電路312。 Referring to FIG. 4, the memory controller 104 includes a memory management circuit 302, a host interface 304, a memory interface 306, a buffer memory 308, a power management circuit 310, and an error checking and correction circuit 312.

記憶體管理電路302用以控制記憶體控制器104的整體運作。具體來說,記憶體管理電路302具有多個控制指令,並且在記憶體儲存裝置100運作時,此些控制指令會被執行以進行資料的寫入、讀取與抹除等運作。 The memory management circuit 302 is used to control the overall operation of the memory controller 104. Specifically, the memory management circuit 302 has a plurality of control commands, and when the memory storage device 100 operates, such control commands are executed to perform operations such as writing, reading, and erasing data.

在本範例實施例中,記憶體管理電路302的控制指令是以韌體型式來實作。例如,記憶體管理電路302具有微處理器單元(未繪示)與唯讀記憶體(未繪示),並且此些控制指令是被燒錄至此唯讀記憶體中。當記憶體儲存裝置100運作時,此些控制指令會由微處理器單元來執行以進行資料的寫入、讀取與抹除等運作。 In the present exemplary embodiment, the control instructions of the memory management circuit 302 are implemented in a firmware version. For example, the memory management circuit 302 has a microprocessor unit (not shown) and a read-only memory (not shown), and such control instructions are programmed into the read-only memory. When the memory storage device 100 is in operation, such control commands are executed by the microprocessor unit to perform operations such as writing, reading, and erasing data.

在本發明另一範例實施例中,記憶體管理電路302的控制指令亦可以程式碼型式儲存於可複寫式非揮發性記憶體模組106的特定區域(例如,記憶體模組中專用於存放系統資料的系統區)中。此外,記憶體管理電路302具有微處理器單元(未繪示)、 唯讀記憶體(未繪示)及隨機存取記憶體(未繪示)。特別是,此唯讀記憶體具有驅動碼,並且當記憶體控制器104被致能時,微處理器單元會先執行此驅動碼段來將儲存於可複寫式非揮發性記憶體模組106中之控制指令載入至記憶體管理電路302的隨機存取記憶體中。之後,微處理器單元會運轉此些控制指令以進行資料的寫入、讀取與抹除等運作。 In another exemplary embodiment of the present invention, the control command of the memory management circuit 302 can also be stored in a specific area of the rewritable non-volatile memory module 106 (for example, the memory module is dedicated to storage). In the system area of the system data). In addition, the memory management circuit 302 has a microprocessor unit (not shown), Read only memory (not shown) and random access memory (not shown). In particular, the read-only memory has a drive code, and when the memory controller 104 is enabled, the microprocessor unit executes the drive code segment to store the rewritable non-volatile memory module 106. The control command is loaded into the random access memory of the memory management circuit 302. After that, the microprocessor unit will run these control commands to perform data writing, reading and erasing operations.

此外,在本發明另一範例實施例中,記憶體管理電路302的控制指令亦可以一硬體型式來實作。例如,記憶體管理電路302包括微控制器、記憶體管理單元、記憶體寫入單元、記憶體讀取單元、記憶體抹除單元與資料處理單元。記憶體管理單元、記憶體寫入單元、記憶體讀取單元、記憶體抹除單元與資料處理單元是耦接至微控制器。其中,記憶體管理單元用以管理可複寫式非揮發性記憶體模組106的實體區塊;記憶體寫入單元用以對可複寫式非揮發性記憶體模組106下達寫入指令以將資料寫入至可複寫式非揮發性記憶體模組106中;記憶體讀取單元用以對可複寫式非揮發性記憶體模組106下達讀取指令以從可複寫式非揮發性記憶體模組106中讀取資料;記憶體抹除單元用以對可複寫式非揮發性記憶體模組106下達抹除指令以將資料從可複寫式非揮發性記憶體模組106中抹除;而資料處理單元用以處理欲寫入至可複寫式非揮發性記憶體模組106的資料以及從可複寫式非揮發性記憶體模組106中讀取的資料。 In addition, in another exemplary embodiment of the present invention, the control command of the memory management circuit 302 can also be implemented in a hardware format. For example, the memory management circuit 302 includes a microcontroller, a memory management unit, a memory write unit, a memory read unit, a memory erase unit, and a data processing unit. The memory management unit, the memory writing unit, the memory reading unit, the memory erasing unit and the data processing unit are coupled to the microcontroller. The memory management unit is configured to manage the physical block of the rewritable non-volatile memory module 106; the memory write unit is configured to issue a write command to the rewritable non-volatile memory module 106 to The data is written into the rewritable non-volatile memory module 106; the memory reading unit is configured to issue a read command to the rewritable non-volatile memory module 106 to recover from the rewritable non-volatile memory The module 106 reads the data; the memory erasing unit is configured to issue an erase command to the rewritable non-volatile memory module 106 to erase the data from the rewritable non-volatile memory module 106; The data processing unit is configured to process data to be written to the rewritable non-volatile memory module 106 and data read from the rewritable non-volatile memory module 106.

主機介面304是耦接至記憶體管理電路302並且用以接 收與識別主機系統1000所傳送的指令與資料。在本範例實施例中,主機介面304是相容於SD標準。然而,必須瞭解的是本發明不限於此,主機介面304亦可以是相容於PATA標準、IEEE 1394標準、PCI Express標準、USB標準、SATA標準、MS標準、MMC標準、CF標準、IDE標準或其他適合的資料傳輸標準。 The host interface 304 is coupled to the memory management circuit 302 and used to connect The instructions and data transmitted by the host system 1000 are received and recognized. In the present exemplary embodiment, host interface 304 is compatible with the SD standard. However, it must be understood that the present invention is not limited thereto, and the host interface 304 may be compatible with the PATA standard, the IEEE 1394 standard, the PCI Express standard, the USB standard, the SATA standard, the MS standard, the MMC standard, the CF standard, the IDE standard, or Other suitable data transmission standards.

記憶體介面306是耦接至記憶體管理電路302並且用以存取可複寫式非揮發性記憶體模組106。也就是說,欲寫入至可複寫式非揮發性記憶體模組106的資料會經由記憶體介面306轉換為可複寫式非揮發性記憶體模組106所能接受的格式。 The memory interface 306 is coupled to the memory management circuit 302 and is used to access the rewritable non-volatile memory module 106. That is, the data to be written to the rewritable non-volatile memory module 106 is converted to a format acceptable to the rewritable non-volatile memory module 106 via the memory interface 306.

緩衝記憶體308是耦接至記憶體管理電路302並且用以暫存來自於主機系統1000的資料與指令或來自於可複寫式非揮發性記憶體模組106的資料。例如,緩衝記憶體302可以是靜態隨機存取記憶體、動態隨機存取記憶體等。 The buffer memory 308 is coupled to the memory management circuit 302 and is used to temporarily store data and instructions from the host system 1000 or data from the rewritable non-volatile memory module 106. For example, the buffer memory 302 can be a static random access memory, a dynamic random access memory, or the like.

電源管理電路310是耦接至記憶體管理電路302並且用以控制記憶體儲存裝置100的電源。 The power management circuit 310 is coupled to the memory management circuit 302 and is used to control the power of the memory storage device 100.

錯誤檢查與校正電路312是耦接至記憶體管理電路302並且用以執行一錯誤校正程序以確保資料的正確性。具體來說,當主機介面304從主機系統1000中接收到主機寫入指令時,錯誤檢查與校正電路會為對應此主機寫入指令的寫入資料(亦稱為更新資料)產生對應的錯誤檢查與校正碼(Error Checking and Correcting Code,ECC Code),並且記憶體管理電路302會將此更新資料與對應的錯誤校正碼寫入至可複寫式非揮發性記憶體模組 106中。之後,當記憶體管理電路302從可複寫式非揮發性記憶體模組106中讀取資料時會同時讀取此資料對應的錯誤校正碼,並且錯誤檢查與校正電路312會依據此錯誤校正碼對所讀取的資料執行錯誤校正程序。 The error checking and correction circuit 312 is coupled to the memory management circuit 302 and is used to perform an error correction procedure to ensure the correctness of the data. Specifically, when the host interface 304 receives a host write command from the host system 1000, the error check and correction circuit generates a corresponding error check for the write data (also referred to as update data) corresponding to the host write command. And the error checking and correction code (ECC Code), and the memory management circuit 302 writes the update data and the corresponding error correction code to the rewritable non-volatile memory module. 106. Thereafter, when the memory management circuit 302 reads the data from the rewritable non-volatile memory module 106, the error correction code corresponding to the data is simultaneously read, and the error checking and correction circuit 312 is based on the error correction code. Perform an error correction procedure on the data read.

圖5是根據一範例實施例所繪示管理可複寫式非揮發性記憶體模組之實體區塊的示意圖。 FIG. 5 is a schematic diagram of managing a physical block of a rewritable non-volatile memory module according to an exemplary embodiment.

請參照圖5,可複寫式非揮發性記憶體模組106具有實體區塊410(0)~410(N),並且記憶體控制器104的記憶體管理電路302會將實體區塊410(0)~410(N)分割(partition)為取代區(replacement area)502、暫存區(spare area)504與資料區(data area)506。 Referring to FIG. 5, the rewritable non-volatile memory module 106 has physical blocks 410(0)-410(N), and the memory management circuit 302 of the memory controller 104 will block the physical block 410 (0). The ~410 (N) partition is a replacement area 502, a spare area 504, and a data area 506.

取代區502的實體區塊是用於壞實體區塊取代程序,以取代損壞的實體區塊。具體來說,倘若取代區502中仍存有正常之實體區塊並且資料區506或暫存區504的實體區塊損壞時,記憶體管理電路302會從取代區502中提取正常的實體區塊來取代損壞的實體區塊。 The physical block of the replacement area 502 is used for the bad physical block replacement procedure to replace the damaged physical block. Specifically, if the normal physical block remains in the replacement area 502 and the physical block of the data area 506 or the temporary storage area 504 is damaged, the memory management circuit 302 extracts the normal physical block from the replacement area 502. To replace the damaged physical block.

暫存區504的實體區塊是用於暫存主機系統1000所寫入的資料。詳細的寫入方法,將配合圖示說明如後。值得一提的是,在本範例實施例中,記憶體管理電路302是使用單頁模式來操作暫存區504的實體區塊。具體來說,在單頁模式中,僅下頁實體頁面會被用來儲存資料。也就是說,在單頁模式中,記憶體管理電路302僅會對下頁實體頁面進行資料的寫入、讀取、抹除等運作。 The physical block of the temporary storage area 504 is used to temporarily store the data written by the host system 1000. The detailed writing method will be described later with the illustration. It is worth mentioning that in the present exemplary embodiment, the memory management circuit 302 is a physical block that operates the temporary storage area 504 using a single page mode. Specifically, in the single page mode, only the next page of the physical page will be used to store the data. That is to say, in the single page mode, the memory management circuit 302 only performs data writing, reading, erasing, etc. on the next page physical page.

資料區506的實體區塊(亦稱為資料實體區塊)是用於儲存主機系統1000所寫入的資料。具體來說,記憶體管理電路302會將主機系統1000所存取的邏輯存取位址轉換為對應的邏輯區塊與對應的邏輯頁面並且將此邏輯區塊的邏輯頁面映射至資料區的實體區塊的實體頁面。也就是說,資料區506的實體區塊是被視為已被使用之實體區塊(例如,已儲存主機系統所寫入的資料)。例如,記憶體管理電路302會使用邏輯區塊-實體區塊映射表(logical block-physical block mapping table)來記載邏輯區塊與資料區506的實體區塊之間的映射關係,其中邏輯區塊中的邏輯頁面可依序的對應所映射之實體區塊的實體頁面。例如,在本範例實施例中,邏輯區塊610(0)~610(H)會被配置以映射資料區506的實體區塊,其中一個邏輯區塊的容量等於一個實體區塊的容量並且資料區506的實體區塊的數量必須大於或等於邏輯區塊的數量。也就是說,在資料區506的實體區塊的數量會攸關記憶體儲存裝置100的容量。在本範例實施例中,邏輯區塊610(0)~610(H)的數量是等於資料區506的實體區塊。 The physical block (also referred to as a data entity block) of the data area 506 is used to store data written by the host system 1000. Specifically, the memory management circuit 302 converts the logical access address accessed by the host system 1000 into a corresponding logical block and corresponding logical page and maps the logical page of the logical block to the entity of the data area. The physical page of the block. That is, the physical block of the data area 506 is a physical block that is considered to have been used (eg, data that has been written by the host system). For example, the memory management circuit 302 uses a logical block-physical block mapping table to record the mapping relationship between the logical block and the physical block of the data area 506, where the logical block The logical page in the sequence may correspond to the physical page of the mapped physical block. For example, in the present exemplary embodiment, logical blocks 610(0)-610(H) are configured to map physical blocks of data area 506, where the capacity of one logical block is equal to the capacity of one physical block and the data The number of physical blocks of area 506 must be greater than or equal to the number of logical blocks. That is, the number of physical blocks in the data area 506 will correlate the capacity of the memory storage device 100. In the present exemplary embodiment, the number of logical blocks 610(0)-610(H) is equal to the physical block of the data area 506.

在本範例實施例中,記憶體管理電路302是使用多頁模式來操作資料區506的實體區塊。具體來說,在多頁模式中,實體區塊之每個實體頁面組的下頁實體頁面、中頁實體頁面與上頁實體頁面皆會被用來儲存資料。再者,相較於以單頁模式來操作的實體區塊,以多頁模式來操作的實體區塊的使用壽命較短。具體來說,每個實體區塊能夠被寫入或抹除的次數是有限的,當一 個實體區塊被寫入的次數超過一臨界值時,此實體區塊就會損壞而無法在被寫入資料,其中對應以多頁模式來操作之實體區塊的臨界值會低於對應以單頁模式來操作之實體區塊的臨界值。 In the present exemplary embodiment, memory management circuit 302 is a physical block that operates data area 506 using a multi-page mode. Specifically, in the multi-page mode, the next page physical page, the middle page physical page, and the upper page physical page of each physical page group of the physical block are used to store data. Furthermore, the physical block operating in the multi-page mode has a shorter lifetime than the physical block operating in the single page mode. Specifically, the number of times each physical block can be written or erased is limited, when one When the number of times a physical block is written exceeds a critical value, the physical block is damaged and cannot be written to the data, and the critical value corresponding to the physical block operating in the multi-page mode is lower than the corresponding value. The threshold of the physical block in which the single page mode is operated.

如上所述,暫存區504的實體區塊與資料區506的實體區塊是藉由使用不同的模式來操作,因此,當一個實體區塊被劃分至暫存區504或資料區506後,此實體區塊將僅能用於特定分割區。也就是說,記憶體管理電路302會獨立地操作資料區506的實體區塊和暫存區504的實體區塊,而不會混用此些實體區塊。例如,當一個實體區塊被劃分至暫存區504後,記憶體管理電路302會以單頁模式於暫存區504中操作此實體區塊,直到此實體區塊損壞為止;或者當一個實體區塊被劃分至資料區506後,記憶體管理電路302會以多頁模式於資料區506中操作此實體區塊,直到此實體區塊不再屬於資料區506。 As described above, the physical block of the temporary storage area 504 and the physical block of the data area 506 are operated by using different modes. Therefore, when a physical block is divided into the temporary storage area 504 or the data area 506, This physical block will only be available for a specific partition. That is, the memory management circuit 302 will independently operate the physical block of the data area 506 and the physical block of the temporary storage area 504 without mixing the physical blocks. For example, when a physical block is divided into the temporary storage area 504, the memory management circuit 302 operates the physical block in the temporary storage area 504 in a single page mode until the physical block is damaged; or when an entity After the block is divided into the data area 506, the memory management circuit 302 operates the physical block in the data area 506 in a multi-page mode until the physical block no longer belongs to the data area 506.

圖6是根據一範例所繪示之寫入資料的示意圖。 FIG. 6 is a schematic diagram of writing data according to an example.

請參照圖6,假設資料區506的資料實體區塊410(T+1)已儲存有屬於邏輯區塊610(0)的所有邏輯頁面的資料(即,邏輯區塊610(0)目前是映射資料實體區塊410(T+1))並且記憶體儲存裝置100從主機系統1000中接收到將更新資料儲存至邏輯區塊610(0)的第10~100個邏輯頁面的寫入指令時,記憶體管理電路302會從暫存區504中提取實體區塊410(R+1)~410(R+2)作為對應邏輯區塊610(0)的第一與第二暫存實體區塊來寫入屬於邏輯區塊610(0)的更新資料。具體來說,由於暫存區504的實體區塊僅能以單頁 模式來程式化,因此,需要使用2個暫存實體區塊的容量才能夠儲存屬於91個邏輯頁面(即,邏輯區塊610(0)的第10~100個邏輯頁面)的資料。 Referring to FIG. 6, it is assumed that the data entity block 410 (T+1) of the data area 506 has stored data of all logical pages belonging to the logical block 610(0) (ie, the logical block 610(0) is currently mapped. Data entity block 410 (T+1)) and the memory storage device 100 receives a write command from the host system 1000 to store the updated data to the 10th to 100th logical pages of the logical block 610(0), The memory management circuit 302 extracts the physical blocks 410(R+1)~410(R+2) from the temporary storage area 504 as the first and second temporary physical blocks of the corresponding logical block 610(0). The update data belonging to logical block 610(0) is written. Specifically, since the physical block of the temporary storage area 504 can only be a single page The pattern is programmed, so the capacity of the 2 temporary physical blocks is required to be able to store data belonging to 91 logical pages (ie, the 10th to 100th logical pages of logical block 610(0)).

之後,記憶體管理電路302會將欲儲存至邏輯區塊610(0)的第10~95個邏輯頁面的更新資料寫入至第一暫存實體區塊410(R+1)的下頁實體頁面(即,第0、3、6…252、255個實體頁面)並且將欲儲存至邏輯區塊610(0)的第96~100個邏輯頁面的更新資料寫入至第二暫存實體區塊410(R+2)的下頁實體頁面(即,第0、3、6、9、12個實體頁面)。 Thereafter, the memory management circuit 302 writes the updated data of the 10th to 95th logical pages to be stored to the logical block 610(0) to the next page entity of the first temporary physical block 410 (R+1). Pages (ie, 0, 3, 6, ... 252, 255 physical pages) and write the updated data of the 96th to 100th logical pages to be stored to the logical block 610(0) to the second temporary physical area The next page of the block 410 (R+2) is the physical page (ie, the 0th, 3rd, 6th, 9th, and 12th physical pages).

在本範例實施例中,當將主機系統1000欲儲存之更新資料寫入至暫存實體區塊後,記憶體管理電路302就會傳送通知已完成指令的回覆(Response)給主機系統1000。並且,之後,當記憶體儲存裝置100處於閒置狀態一段時間(例如,30秒未從主機系統1000中接收到任何指令)或者暫存區504中可用的實體區塊的數目小於預設門檻值時,記憶體管理電路302才會將屬於同一個邏輯區塊的有效資料搬移至資料區506中的空資料實體區塊中。例如,預設門檻值會被設定為3。然而,必須瞭解的是,本發明不限於此,預設門檻值亦可以是其他適當的數值。在此,將屬於同一個邏輯區塊的有效資料搬移至資料區506的空資料實體區塊中的運作稱為資料合併運作,其中資料合併運作包括資料整理運作與資料搬移運作。 In the present exemplary embodiment, after the update data to be stored by the host system 1000 is written to the temporary physical block, the memory management circuit 302 transmits a response (Notation) to the host system 1000 to notify the completed instruction. And, then, when the memory storage device 100 is in an idle state for a period of time (for example, 30 seconds has not received any instructions from the host system 1000) or the number of physical blocks available in the temporary storage area 504 is less than a preset threshold value The memory management circuit 302 will move the valid data belonging to the same logical block to the empty data entity block in the data area 506. For example, the preset threshold will be set to 3. However, it must be understood that the present invention is not limited thereto, and the preset threshold may be other suitable values. Here, the operation of moving the valid data belonging to the same logical block to the empty data entity block of the data area 506 is called data merge operation, and the data merge operation includes data sorting operation and data transfer operation.

圖7與圖8是根據一範例所繪示之資料合併程序的示意 圖,其中圖7繪示資料整理運作的範例示意圖並且圖8繪示資料搬移運作的範例示意圖。。 7 and FIG. 8 are schematic diagrams of a data merge procedure according to an example FIG. 7 is a schematic diagram showing an example of data sorting operation and FIG. 8 is a schematic diagram showing an example of data moving operation. .

請參照圖7,假設資料實體區塊410(T+1)、暫存實體區塊410(R+1)與410(R+2)分別地儲存邏輯區塊610(0)的部分邏輯頁面的有效資料(如圖6所示)並且記憶體管理電路302選擇對邏輯區塊610(0)進行資料合併運作時,首先,記憶體管理電路302會從暫存區504中提取實體區塊410(R+3)、410(R+4)與410(R+5)作為對應邏輯區塊610(0)的第一至第三整理實體區塊來儲存屬於邏輯區塊610(0)的所有有效資料。具體來說,由於暫存區504的實體區塊僅能以單頁模式來程式化,因此,3個整理實體區塊的容量才能夠儲存一個邏輯區塊之所有邏輯頁面的資料。 Referring to FIG. 7, it is assumed that the data entity block 410 (T+1), the temporary storage physical block 410 (R+1), and 410 (R+2) respectively store part of the logical page of the logical block 610 (0). When the valid data (as shown in FIG. 6) and the memory management circuit 302 selects to perform the data merge operation on the logical block 610(0), first, the memory management circuit 302 extracts the physical block 410 from the temporary storage area 504 ( R+3), 410(R+4) and 410(R+5) are used as the first to third collating physical blocks of the corresponding logical block 610(0) to store all valid entries belonging to the logical block 610(0). data. Specifically, since the physical blocks of the temporary storage area 504 can only be programmed in a single page mode, the capacity of the three finishing physical blocks can store the data of all logical pages of one logical block.

之後,記憶體管理電路302會將屬於邏輯區塊610(0)的所有邏輯頁面的有效資料從資料實體區塊410(T+1)以及暫存實體區塊410(R+1)與410(R+2)中依序地複製到整理實體區塊410(R+3)、410(R+4)與410(R+5)中。 Thereafter, the memory management circuit 302 will validate the valid data of all logical pages belonging to the logical block 610(0) from the data entity block 410 (T+1) and the temporary storage physical block 410 (R+1) and 410 ( R+2) is sequentially copied into the collating physical blocks 410 (R+3), 410 (R+4), and 410 (R+5).

具體來說,首先,記憶體管理電路302會將屬於邏輯區塊610(0)的第0~9個邏輯頁面的有效資料從資料實體區塊410(T+1)中依序地複製至整理實體區塊410(R+3)的第0、3、6…24、27個實體頁面中,並且將屬於邏輯區塊610(0)的第10~85個邏輯頁面的有效資料從暫存實體區塊410(R+1)中依序地複製到整理實體區塊410(R+3)的第30、33…252、255個實體頁面中。更詳細來說,由於屬於邏輯區塊610(0)的第0~9個邏輯頁面的資 料未被更新,因此,記憶體管理電路302會從原映射邏輯區塊610(0)的資料實體區塊410(T+1)中將屬於邏輯區塊610(0)的第0~9個邏輯頁面的資料搬移至實體區塊410(R+3)。此外,由於屬於邏輯區塊610(0)的第10~85個邏輯頁面的更新資料已被儲存至暫存實體區塊410(R+1)中,因此,記憶體管理電路302會從暫存實體區塊410(R+1)中將屬於邏輯區塊610(0)的第10~85個邏輯頁面的資料搬移至實體區塊410(R+3)。 Specifically, first, the memory management circuit 302 sequentially copies the valid data of the 0th to 9th logical pages belonging to the logical block 610(0) from the data entity block 410 (T+1) to the collation. In the 0th, 3rd, 6th, 24th, and 27th physical pages of the physical block 410 (R+3), and the valid data of the 10th to 85th logical pages belonging to the logical block 610(0) are from the temporary storage entity. The block 410 (R+1) is sequentially copied into the 30th, 33...252, 255 physical pages of the collation physical block 410 (R+3). In more detail, due to the 0th to 9th logical pages belonging to the logical block 610(0) The material management circuit 302 will be from the data entity block 410 (T+1) of the original mapping logic block 610(0) to the 0th to 9th blocks belonging to the logic block 610(0). The data of the logical page is moved to the physical block 410 (R+3). In addition, since the updated data of the 10th to 85th logical pages belonging to the logical block 610(0) has been stored in the temporary physical block 410 (R+1), the memory management circuit 302 will temporarily store the data. The data of the 10th to 85th logical pages belonging to the logical block 610(0) is moved to the physical block 410 (R+3) in the physical block 410 (R+1).

其次,記憶體管理電路302會將屬於邏輯區塊610(0)的第86~100個邏輯頁面的有效資料從暫存實體區塊410(R+1)與410(R+2)中依序地複製到整理實體區塊410(R+4)的第0、3…39、42個實體頁面中,並且將屬於邏輯區塊610(0)的第101~171個邏輯頁面的有效資料從資料實體區塊410(T+1)中依序地複製到整理實體區塊410(R+4)的第45、48…252、255個實體頁面中。更詳細來說,由於屬於邏輯區塊610(0)的第86~95個邏輯頁面的更新資料已被儲存至暫存實體區塊410(R+1)中,因此,記憶體管理電路302會從暫存實體區塊410(R+1)中將屬於邏輯區塊610(0)的第86~95個邏輯頁面的資料搬移至實體區塊410(R+4)。此外,由於屬於邏輯區塊610(0)的第96~100個邏輯頁面的更新資料已被儲存至暫存實體區塊410(R+2)中,因此,記憶體管理電路302會從暫存實體區塊410(R+2)中將屬於邏輯區塊610(0)的第96~100個邏輯頁面的資料搬移至實體區塊410(R+4)。再者,由於屬於邏輯區塊610(0)的第101~171個邏輯頁面的資料未被更新,因此,記憶 體管理電路302會從原映射邏輯區塊610(0)的資料實體區塊410(T+1)中將屬於邏輯區塊610(0)的第101~171個邏輯頁面的資料搬移至實體區塊410(R+4)。 Next, the memory management circuit 302 sequentially stores the valid data of the 86th to 100th logical pages belonging to the logical block 610(0) from the temporary physical blocks 410(R+1) and 410(R+2). Copying to the 0th, 3th, 39th, and 42th physical pages of the finishing physical block 410 (R+4), and validating the valid data of the 101st to 171th logical pages belonging to the logical block 610(0) The physical block 410 (T+1) is sequentially copied into the 45th, 48...252, 255 physical pages of the finishing physical block 410 (R+4). In more detail, since the updated data of the 86th to 95th logical pages belonging to the logical block 610(0) has been stored in the temporary physical block 410 (R+1), the memory management circuit 302 will The data of the 86th to 95th logical pages belonging to the logical block 610(0) is moved from the temporary physical block 410 (R+1) to the physical block 410 (R+4). In addition, since the updated data of the 96th to 100th logical pages belonging to the logical block 610(0) has been stored in the temporary physical block 410 (R+2), the memory management circuit 302 will temporarily store the data. The physical block 410 (R+2) moves the data of the 96th to 100th logical pages belonging to the logical block 610(0) to the physical block 410 (R+4). Furthermore, since the data of the 101st to 171th logical pages belonging to the logical block 610(0) are not updated, the memory is The volume management circuit 302 moves the data of the 101st to 171th logical pages belonging to the logical block 610(0) from the data entity block 410 (T+1) of the original mapping logic block 610(0) to the physical area. Block 410 (R+4).

然後,記憶體管理電路302會將屬於邏輯區塊610(0)的第172~257個邏輯頁面的有效資料從資料實體區塊410(T+1)中依序地複製至整理實體區塊410(R+5)的第0、3…252、255個實體頁面中。更詳細來說,由於屬於邏輯區塊610(0)的第172~257個邏輯頁面的資料未被更新,因此,記憶體管理電路302會從原映射邏輯區塊610(0)的資料實體區塊410(T+1)中將屬於邏輯區塊610(0)的第172~257個邏輯頁面的資料搬移至實體區塊410(R+5)。 Then, the memory management circuit 302 sequentially copies the valid data of the 172th to 257th logical pages belonging to the logical block 610(0) from the data entity block 410(T+1) to the sorting entity block 410. (R+5) in the 0th, 3...252, 255 physical pages. In more detail, since the data of the 172th to 257th logical pages belonging to the logical block 610(0) are not updated, the memory management circuit 302 will from the data entity area of the original mapping logical block 610(0). In block 410 (T+1), the data of the 172th to 257th logical pages belonging to the logical block 610(0) are moved to the physical block 410 (R+5).

值得一提的是,由於邏輯區塊610(0)的所有邏輯頁面的有效資料皆已被複製到整理實體區塊410(R+3)、410(R+4)與410(R+5)中,因此,在本發明一範例實施例中,記憶體管理電路302會將資料實體區塊410(T+1)標記為儲存無效資料的實體區塊或者對資料實體區塊410(T+1)執行抹除運作。類似地,在本發明一範例實施例中,記憶體管理電路302會將暫存實體區塊410(R+1)與410(R+2)標記為儲存無效資料的實體區塊或者對暫存實體區塊410(R+1)與410(R+2)執行抹除運作,由此實體區塊410(R+1)與410(R+2)可於執行下一個寫入指令時被用來寫入資料。 It is worth mentioning that since all the valid data of logical pages of logical block 610(0) have been copied to the finishing physical blocks 410 (R+3), 410 (R+4) and 410 (R+5) Therefore, in an exemplary embodiment of the present invention, the memory management circuit 302 marks the data entity block 410 (T+1) as a physical block storing invalid data or a data entity block 410 (T+1). ) Perform the erase operation. Similarly, in an exemplary embodiment of the present invention, the memory management circuit 302 marks the temporary physical blocks 410 (R+1) and 410 (R+2) as physical blocks for storing invalid data or for temporary storage. The physical blocks 410 (R+1) and 410 (R+2) perform an erase operation, whereby the physical blocks 410 (R+1) and 410 (R+2) can be used when executing the next write command. To write data.

請參照圖8,在將邏輯區塊610(0)的所有邏輯頁面的有效資料整理至整理實體區塊410(R+3)、410(R+4)與410(R+5)後,記憶體管理電路302會從資料區506中提取資料實體區塊410(T+2) 作為對應邏輯區塊610(0)的新資料實體區塊。具體來說,記憶體管理電路302會從資料區504中選擇一個空的實體區塊或者所儲存之資料為無效資料的實體區塊。特別是,倘若所提取之實體區塊是儲存無效資料的實體區塊時,記憶體管理電路302會先對此實體區塊執行抹除運作。也就是說,實體區塊上的無效資料必須先被抹除。 Referring to FIG. 8, after the valid data of all logical pages of the logical block 610(0) is sorted to the physical blocks 410 (R+3), 410 (R+4), and 410 (R+5), the memory is restored. The volume management circuit 302 extracts the data entity block 410 (T+2) from the data area 506. As a new data entity block corresponding to logical block 610(0). Specifically, the memory management circuit 302 selects an empty physical block from the data area 504 or the stored data is a physical block of invalid data. In particular, if the extracted physical block is a physical block storing invalid data, the memory management circuit 302 first performs an erase operation on the physical block. In other words, invalid data on the physical block must be erased first.

然後,記憶體管理電路302會將邏輯區塊610(0)的所有邏輯頁面的有效資料從整理實體區塊410(R+3)、410(R+4)與410(R+5)中依序地複製到所提取之資料實體區塊410(T+2)中。 Then, the memory management circuit 302 will validate the valid data of all logical pages of the logical block 610(0) from the collating physical blocks 410 (R+3), 410 (R+4), and 410 (R+5). It is sequentially copied into the extracted data entity block 410 (T+2).

具體來說,記憶體管理電路302會從第一整理實體區塊410(R+3)的下頁實體頁面中將屬於邏輯區塊610(0)的第0~85邏輯頁面的有效資料依序地搬移至實體區塊410(T+2)的對應頁面(例如,實體區塊410(T+2)的第0~85實體頁面)。接著,記憶體管理電路302會從第二整理實體區塊410(R+4)的下頁實體頁面中將屬於邏輯區塊610(0)的第86~171邏輯頁面的有效資料依序地搬移至實體區塊410(T+2)的對應頁面(例如,實體區塊410(T+2)的第86~171實體頁面)。然後,記憶體管理電路302會從第三整理實體區塊410(R+5)的下頁實體頁面中將屬於邏輯區塊610(0)的第172~257邏輯頁面的有效資料依序地搬移至實體區塊410(T+2)的對應頁面(例如,實體區塊410(T+2)的第172~257實體頁面)。也就是說,由於資料區506的實體區塊是以多頁模式來操作,因此,實體區塊410(T+2)的所有下頁實體頁面、中頁實體頁面與上頁實 體頁面皆會被用來儲存資料。在本範例實施例中,例如,在資料搬移運作中,記憶體管理電路302是使用複製回(copyback)指令來將有效資料從整理實體區塊搬移至資料實體區塊。 Specifically, the memory management circuit 302 sequentially sorts the valid data of the 0th to 85th logical pages belonging to the logical block 610(0) from the next page physical page of the first collating physical block 410 (R+3). Move to the corresponding page of the physical block 410 (T+2) (for example, the 0th to 85th physical pages of the physical block 410 (T+2)). Next, the memory management circuit 302 sequentially shifts the valid data of the 86th to 171th logical pages belonging to the logical block 610(0) from the next page physical page of the second collation physical block 410 (R+4). To the corresponding page of the physical block 410 (T+2) (for example, the 86th to 171th physical pages of the physical block 410 (T+2)). Then, the memory management circuit 302 sequentially shifts the valid data of the 172th to 257th logical pages belonging to the logical block 610(0) from the next page physical page of the third finishing physical block 410 (R+5). To the corresponding page of the physical block 410 (T+2) (for example, the 172th to 257th physical pages of the physical block 410 (T+2)). That is, since the physical block of the data area 506 is operated in a multi-page mode, all the next page physical pages, the middle page physical pages, and the upper page of the physical block 410 (T+2) Body pages are used to store data. In the present exemplary embodiment, for example, in the data transfer operation, the memory management circuit 302 uses a copyback instruction to move valid data from the collating physical block to the data physical block.

最後,記憶體管理電路302會在邏輯區塊-實體區塊映射表中將邏輯區塊610(0)重新映射至實體區塊410(T+2)。 Finally, the memory management circuit 302 will remap the logical block 610(0) to the physical block 410 (T+2) in the logical block-physical block mapping table.

此外,由於邏輯區塊610(0)的所有邏輯頁面的有效資料皆已被複製到實體區塊410(T+2)中,因此,在本發明一範例實施例中,記憶體管理電路302會將整理實體區塊410(R+3)、410(R+4)與410(R+5)標記為儲存無效資料的實體區塊或者對整理實體區塊410(R+3)、410(R+4)與410(R+5)執行抹除運作,由此實體區塊410(R+3)、410(R+4)與410(R+5)可於執行下一個寫入指令時被再用來寫入資料。 In addition, since the valid data of all logical pages of the logical block 610(0) has been copied into the physical block 410 (T+2), in an exemplary embodiment of the present invention, the memory management circuit 302 The finishing physical blocks 410 (R+3), 410 (R+4), and 410 (R+5) are marked as physical blocks storing invalid data or for the finishing physical blocks 410 (R+3), 410 (R +4) Execute the erase operation with 410 (R+5), whereby the physical blocks 410 (R+3), 410 (R+4) and 410 (R+5) can be executed when the next write command is executed. Used to write data.

值得一提的是,在本範例實施例中,記憶體管理電路302會以部分同步方式來執行上述資料整理運作(如圖7所示)與上述資料搬移運作(如圖8所示)。也就是說,倘若記憶體管理電路302欲將分散儲存於資料實體區塊(以下簡稱為第一資料實體區塊,例如,圖7所示的資料實體區塊410(T+1))與暫存資料實體區塊(例如,圖7所示的暫存實體區塊410(R+1)與410(R+2))合併至空的資料實體區塊(以下稱為第二資料實體區塊,例如,圖8所示的資料實體區塊410(T+2))時,記憶體管理電路302會在進行資料搬移運作期間同時將已整理好的有效資料從整理實體區塊(如圖8所示的整理實體區塊410(R+3)、410(R+4)與410(R+5))複製到第二資料實 體區塊。 It should be noted that in the exemplary embodiment, the memory management circuit 302 performs the above-mentioned data sorting operation (as shown in FIG. 7) and the above data moving operation (as shown in FIG. 8) in a partially synchronized manner. That is, if the memory management circuit 302 wants to store the data in a physical entity block (hereinafter referred to as a first data entity block, for example, the data entity block 410 (T+1) shown in FIG. 7) The physical entity block (for example, the temporary physical blocks 410 (R+1) and 410 (R+2) shown in FIG. 7) are merged into an empty data entity block (hereinafter referred to as a second data entity block). For example, when the data entity block 410 (T+2) shown in FIG. 8 is used, the memory management circuit 302 will simultaneously sort the valid data from the physical block during the data transfer operation (see FIG. 8). The collating physical blocks 410 (R+3), 410 (R+4), and 410 (R+5) shown are copied to the second data. Body block.

以圖7與圖8為例,在資料搬移運作中,記憶體管理電路302會依序地將邏輯區塊610(0)所有邏輯頁面的有效資料依序地複製至整理實體區塊410(R+3)、410(R+4)與410(R+5)的下頁實體頁面。特別是,在邏輯區塊610(0)的第0個邏輯頁面的有效資料已被複製到整理實體區塊410(R+3)後,記憶體管理電路302會繼續下達指令來將後續邏輯頁面的有效資料複製到整理實體區塊410(R+3),同時下達指令將邏輯區塊610(0)的第0個邏輯頁面的有效資料從整理實體區塊410(R+3)複製到資料實體區塊410(T+2)。接著,在邏輯區塊610(0)的第1、2、3個邏輯頁面的有效資料已被複製到整理實體區塊410(R+3)後,記憶體管理電路302會繼續下達指令來將後續邏輯頁面的有效資料複製到整理實體區塊410(R+3),同時下達指令將邏輯區塊610(0)的第1、3個邏輯頁面的有效資料從整理實體區塊410(R+3)複製到資料實體區塊410(T+2)。接著,在邏輯區塊610(0)的第4、5、6個邏輯頁面的有效資料已被複製到整理實體區塊410(R+3)後,記憶體管理電路302會繼續下達指令來將後續邏輯頁面的有效資料複製到整理實體區塊410(R+3),同時下達指令將邏輯區塊610(0)的第2、4、6個邏輯頁面的有效資料從整理實體區塊410(R+3)複製到資料實體區塊410(T+2)。接著,在邏輯區塊610(0)的第7、8、9個邏輯頁面的有效資料已被複製到整理實體區塊410(R+3)後,記憶體管理電路302會繼續下達指令來將後續邏輯頁面的有效資料複製到整理實體區 塊410(R+3),同時下達指令將邏輯區塊610(0)的第5、7、9個邏輯頁面的有效資料從整理實體區塊410(R+3)複製到資料實體區塊410(T+2)。以此類推,記憶體管理電路302會在整理後續邏輯頁面的有效資料期間,同步地將已整理之部分有效資料從整理實體區塊搬移至資料實體區塊,直到所有有效資料被搬移至資料實體區塊為止。也就是說,在此範例中,記憶體管理電路302會在整理屬於一預定數目之邏輯頁面(例如,3個邏輯頁面)的資料之後,在繼續整理後續邏輯頁面的有效資料時同步地將部分已整理之資料從整理實體區塊搬移至資料實體區塊。 7 and FIG. 8 , in the data moving operation, the memory management circuit 302 sequentially sequentially copies the valid data of all the logical pages of the logical block 610 ( 0 ) to the finishing physical block 410 (R). +3), 410 (R+4) and 410 (R+5) on the next page of the entity page. In particular, after the valid data of the 0th logical page of logical block 610(0) has been copied to the finishing physical block 410 (R+3), the memory management circuit 302 continues to issue instructions to the subsequent logical page. The valid data is copied to the collation entity block 410 (R+3), and the release instruction copies the valid data of the 0th logical page of the logical block 610(0) from the collation entity block 410 (R+3) to the data. Physical block 410 (T+2). Then, after the valid data of the first, second, and third logical pages of the logical block 610(0) has been copied to the finishing physical block 410 (R+3), the memory management circuit 302 continues to issue instructions to The valid data of the subsequent logical page is copied to the finishing entity block 410 (R+3), and the release instruction sends the valid data of the first and third logical pages of the logical block 610(0) from the finishing entity block 410 (R+ 3) Copy to data entity block 410 (T+2). Then, after the valid data of the 4th, 5th, and 6th logical pages of the logical block 610(0) has been copied to the finishing physical block 410 (R+3), the memory management circuit 302 continues to issue instructions to The valid data of the subsequent logical page is copied to the collation entity block 410 (R+3), and the release instruction sends the valid data of the 2nd, 4th, and 6th logical pages of the logical block 610(0) from the collation entity block 410 ( R+3) is copied to the data entity block 410 (T+2). Then, after the valid data of the 7th, 8th, and 9th logical pages of the logical block 610(0) has been copied to the finishing physical block 410 (R+3), the memory management circuit 302 continues to issue instructions to Copy the valid data of the subsequent logical page to the finishing entity area At block 410 (R+3), the same instruction copies the valid data of the 5th, 7th, and 9th logical pages of the logical block 610(0) from the collation entity block 410 (R+3) to the data entity block 410. (T+2). By analogy, the memory management circuit 302 synchronously moves the sorted valid data from the collating physical block to the data physical block during the collation of the valid data of the subsequent logical page until all valid data is moved to the data entity. Until the block. That is to say, in this example, the memory management circuit 302 will synchronously arrange portions of the data of a predetermined number of logical pages (for example, three logical pages) while continuing to organize the valid data of the subsequent logical pages. The organized data is moved from the finishing physical block to the data physical block.

值得一提的是,上述部分同步方式僅為一個範例,本發明不限於此。例如,在本發明另一範例實施例中,在邏輯區塊610(0)的第0個邏輯頁面的有效資料已被複製到整理實體區塊410(R+3)後,記憶體管理電路302會繼續下達指令來將後續邏輯頁面的有效資料複製到整理實體區塊410(R+3),同時下達指令將邏輯區塊610(0)的第0個邏輯頁面的有效資料從整理實體區塊410(R+3)複製到資料實體區塊410(T+2)。接著,在邏輯區塊610(0)的第2個邏輯頁面的有效資料已被複製到整理實體區塊410(R+3)後,記憶體管理電路302會繼續下達指令來將後續邏輯頁面的有效資料複製到整理實體區塊410(R+3),同時下達指令將邏輯區塊610(0)的第2個邏輯頁面的有效資料從整理實體區塊410(R+3)複製到資料實體區塊410(T+2)。接著,在邏輯區塊610(0)的第3個邏輯頁面的有效資料已被複製到整理實體區塊410(R+3)後,記憶體管理電 路302會繼續下達指令來將後續邏輯頁面的有效資料複製到整理實體區塊410(R+3),同時下達指令將邏輯區塊610(0)的第3個邏輯頁面的有效資料從整理實體區塊410(R+3)複製到資料實體區塊410(T+2)。以此類推,記憶體管理電路302會在整理後續邏輯頁面的有效資料期間,同步地將有效資料從整理實體區塊搬移至資料實體區塊,直到所有有效資料被搬移至資料實體區塊為止。也就是說,在此範例中,記憶體管理電路302會在整理屬於一個邏輯頁面的資料之後,在繼續整理屬於下一個邏輯頁面的有效資料時同步地將已整理之資料從整理實體區塊搬移至資料實體區塊。 It is worth mentioning that the above partial synchronization mode is only an example, and the present invention is not limited thereto. For example, in another exemplary embodiment of the present invention, after the valid data of the 0th logical page of the logical block 610(0) has been copied to the finishing physical block 410 (R+3), the memory management circuit 302 The instruction will continue to be issued to copy the valid data of the subsequent logical page to the finishing entity block 410 (R+3), and the issuing instruction will save the valid data of the 0th logical page of the logical block 610(0) from the finishing physical block. 410 (R+3) is copied to the data entity block 410 (T+2). Then, after the valid data of the second logical page of logical block 610(0) has been copied to the finishing physical block 410 (R+3), the memory management circuit 302 continues to issue instructions to the subsequent logical page. The valid data is copied to the collation entity block 410 (R+3), and the release instruction copies the valid data of the second logical page of the logical block 610(0) from the collation entity block 410 (R+3) to the data entity. Block 410 (T+2). Then, after the valid data of the third logical page of the logical block 610(0) has been copied to the finishing physical block 410 (R+3), the memory management power The path 302 will continue to issue instructions to copy the valid data of the subsequent logical page to the finishing entity block 410 (R+3), while the issuing instruction will validate the valid data of the third logical page of the logical block 610(0) from the finishing entity. Block 410 (R+3) is copied to data entity block 410 (T+2). By analogy, the memory management circuit 302 synchronously moves the valid data from the collating physical block to the data physical block during the collation of the valid data of the subsequent logical page until all valid data is moved to the data physical block. That is to say, in this example, the memory management circuit 302 synchronously reorganizes the collated data from the collating physical block after arranging the materials belonging to one logical page and continuing to organize the valid materials belonging to the next logical page. To the data entity block.

基於上述,由於資料整理運作與資料搬移運作是以部分同步方式被執行,因此,執行資料合併運作所需的時間會大幅縮短。 Based on the above, since the data sorting operation and the data moving operation are performed in a partially synchronized manner, the time required to perform the data merge operation is greatly shortened.

圖9是根據一範例實施例所繪示的資料合併方法的流程圖。 FIG. 9 is a flowchart of a data merging method according to an exemplary embodiment.

請參照圖9,在步驟S901中,記憶體管理電路302會選擇一個邏輯區塊(以下稱為目標邏輯區塊)來進行資料合併運作。具體來說,記憶體管理電路202會根據暫存區504所暫存之資料來判斷需要被執行資料合併程序的邏輯區塊並且從此些邏輯區塊中選擇一個邏輯區塊來進行資料合併程序。也就是說,目標邏輯區塊的有效資料已被分散地儲存在資料實體區塊(以下稱對第一資料實體區塊)與至少一暫存實體區塊中。 Referring to FIG. 9, in step S901, the memory management circuit 302 selects a logical block (hereinafter referred to as a target logical block) to perform a data merge operation. Specifically, the memory management circuit 202 determines the logical blocks that need to be executed by the data merge program according to the data temporarily stored in the temporary storage area 504, and selects one logical block from the logical blocks to perform the data merge process. That is to say, the valid data of the target logical block has been distributedly stored in the data entity block (hereinafter referred to as the first data entity block) and at least one temporary physical block.

在步驟S903中,記憶體管理電路302會指派對應目標邏 輯區塊的多個整理實體區塊。例如,在本範例實施例中,記憶體管理電路302會從暫存區504中提取3個實體區塊作為對應目標邏輯區塊的第一至第三整理實體區塊。 In step S903, the memory management circuit 302 assigns a corresponding target logic. Multiple defragmentation physical blocks of the block. For example, in the present exemplary embodiment, the memory management circuit 302 extracts three physical blocks from the temporary storage area 504 as the first to third finishing physical blocks of the corresponding target logical block.

在步驟S905中,記憶體管理電路302會以部分同步方式執行資料整理運作與資料搬移運作,以從第一資料實體區塊和至少一暫存實體區塊中將目標邏輯區塊的有效資料整理至整理實體區塊的下頁實體頁面,同時從整理實體區塊將目標邏輯區塊的有效資料程式化至第二資料實體區塊。 In step S905, the memory management circuit 302 performs the data sorting operation and the data moving operation in a partially synchronized manner to sort the valid data of the target logical block from the first data entity block and the at least one temporary physical block. To organize the next page entity page of the physical block, and program the valid data of the target logical block from the finishing physical block to the second data entity block.

在步驟S907中,記憶體管理電路302會將目標邏輯區塊重新映射至第二資料實體區塊,由此完成資料合併運作。 In step S907, the memory management circuit 302 remaps the target logical block to the second data entity block, thereby completing the data merge operation.

圖10是根據一範例實施例所繪示之步驟S905的詳細流程圖。 FIG. 10 is a detailed flowchart of step S905 according to an exemplary embodiment.

請參照圖10,在步驟S1001中,記憶體管理電路302會從第一資料實體區塊和至少一暫存實體區塊中將目標邏輯區塊的有效資料之中欲程式化至第二資料實體區塊的資料以實體頁面為單位複製到整理實體區塊中。 Referring to FIG. 10, in step S1001, the memory management circuit 302 will program the valid data of the target logical block from the first data entity block and the at least one temporary physical block to the second data entity. The data of the block is copied to the finishing entity block in units of physical pages.

接著,在步驟S1003中,記憶體管理電路302會判斷目標邏輯區塊的所有邏輯頁面的有效資料是否已皆被整理至整理實體區塊。 Next, in step S1003, the memory management circuit 302 determines whether the valid data of all the logical pages of the target logical block have been collated to the finishing physical block.

倘若目標邏輯區塊的所有邏輯頁面的有效資料尚未完全被整理至整理實體區塊時,在步驟S1005中,記憶體管理電路302會將至少部分已複製到整理實體區塊中的資料程式化至第二資料 實體區塊,同時從第一資料實體區塊和至少一暫存實體區塊中將目標邏輯區塊的有效資料之中欲程式化至第二資料實體區塊的後續實體頁面的資料複製到整理實體區塊中。並且,在步驟S1005之後,步驟S1003會被執行。 If the valid data of all logical pages of the target logical block has not been completely organized into the finishing physical block, in step S1005, the memory management circuit 302 will program at least part of the data that has been copied into the finishing physical block to Second data The physical block, at the same time, from the first data entity block and the at least one temporary physical block, copying the data of the valid data of the target logical block to the subsequent entity page of the second data entity block In the physical block. And, after step S1005, step S1003 is executed.

倘若目標邏輯區塊的所有邏輯頁面的有效資料皆已被整理至整理實體區塊時,在步驟S1007中,記憶體管理電路302會將已複製到整理實體區塊中的資料程式化至第二資料實體區塊。並且在步驟S1007之後,資料整理運作與資料搬移運作會被完成。 If the valid data of all the logical pages of the target logical block have been organized into the finishing physical block, in step S1007, the memory management circuit 302 will program the data copied into the finishing physical block to the second. Data entity block. And after step S1007, the data sorting operation and the data moving operation are completed.

綜上所述,本發明範例實施例的資料合併方法、記憶體控制器與記憶體儲存裝置是將欲合併的資料整理至以單頁模式操作的整理實體區塊中,並且之後再將資料從整理實體區塊中程式化至資料實體區塊,因此,可有效地提升儲存資料的可靠度。此外,本發明範例實施例的資料合併方法、記憶體控制器與記憶體儲存裝置是以部分同步方式執行將有效資料整理至整理實體區塊的運作以及將有效資料複製至資料實體區塊的運作,由此可有效地縮短執行資料合併所需的時間。 In summary, the data merging method, the memory controller, and the memory storage device of the exemplary embodiment of the present invention organize the data to be merged into a finishing physical block that operates in a single page mode, and then the data is The stylization to the data entity block is arranged in the physical block, so that the reliability of the stored data can be effectively improved. In addition, the data merging method, the memory controller, and the memory storage device of the exemplary embodiment of the present invention perform the operation of sorting the valid data into the defragmenting physical block and copying the valid data to the data entity block in a partially synchronous manner. This effectively reduces the time required to perform data consolidation.

雖然本發明已以實施例揭露如上,然其並非用以限定本發明,任何所屬技術領域中具有通常知識者,在不脫離本發明之精神和範圍內,當可作些許之更動與潤飾,故本發明之保護範圍當視後附之申請專利範圍所界定者為準。 Although the present invention has been disclosed in the above embodiments, it is not intended to limit the invention, and any one of ordinary skill in the art can make some modifications and refinements without departing from the spirit and scope of the invention. The scope of the invention is defined by the scope of the appended claims.

S901、S903、S905、S907‧‧‧資料合併方法的步驟 Steps of S901, S903, S905, S907‧‧‧ data merge method

Claims (34)

一種資料處理方法,用於一快閃記憶體儲存裝置,其中該快閃記憶體儲存裝置具有一快閃記憶體模組,該快閃記憶體模組具有複數個實體區塊,各該實體區塊具有複數個實體頁面,該資料處理方法包括:以一單頁模式儲存一第一資料於該複數個實體頁面之中的複數個第一實體頁面中;以一多頁模式將該第一資料由該複數個第一實體頁面搬移至該複數個實體頁面之中的複數個第二實體頁面;在上述將該第一資料由該複數個第一實體頁面搬移至該複數個第二實體頁面的步驟期間,準備一第二資料;以及將該第二資料以該單頁模式寫入該複數個實體頁面之中的至少一第三實體頁面。 A data processing method for a flash memory storage device, wherein the flash memory storage device has a flash memory module, the flash memory module having a plurality of physical blocks, each of the physical regions The block has a plurality of physical pages, and the data processing method includes: storing a first data in a single page mode in a plurality of first physical pages among the plurality of physical pages; and the first data in a multi-page mode Moving from the plurality of first entity pages to the plurality of second entity pages among the plurality of entity pages; moving the first data from the plurality of first entity pages to the plurality of second entity pages During the step, preparing a second material; and writing the second data to the at least one third entity page of the plurality of physical pages in the single page mode. 如申請專利範圍第1項所述的資料處理方法,其中上述以該多頁模式將該第一資料由該複數個第一實體頁面搬移至該複數個第二實體頁面的步驟包括以該多頁模式的一複製回(copyback)指令將該第一資料由該複數個第一實體頁面搬移至該複數個第二實體頁面。 The data processing method of claim 1, wherein the step of moving the first data from the plurality of first entity pages to the plurality of second entity pages in the multi-page mode comprises the plurality of pages A copyback instruction of the mode moves the first data from the plurality of first entity pages to the plurality of second entity pages. 如申請專利範圍第1項所述的資料處理方法,更包括:從一主機系統接收該第二資料或從該快閃記憶體模組中讀取該第二資料;以及在一緩衝記憶體中暫存該第二資料。 The data processing method of claim 1, further comprising: receiving the second data from a host system or reading the second data from the flash memory module; and in a buffer memory Temporarily save the second data. 如申請專利範圍第1項所述的資料處理方法,其中在上述以該多頁模式將該第一資料由該複數個第一實體頁面搬移至該複數個第二實體頁面的期間,準備該第二資料的步驟包括:以至少部分同步方式將該第一資料由該複數個第一實體頁面搬移至該複數個第二實體頁面並將該第二資料暫存至一緩衝記憶體中。 The data processing method according to claim 1, wherein the first data is moved from the plurality of first entity pages to the plurality of second entity pages in the multi-page mode, and the first The step of data includes: moving the first data from the plurality of first entity pages to the plurality of second entity pages in an at least partially synchronized manner and temporarily storing the second data in a buffer memory. 如申請專利範圍第1項所述的資料處理方法,其中在上述以該多頁模式將該第一資料由該複數個第一實體頁面搬移至該複數個第二實體頁面的期間,準備該第二資料的步驟包括:在以該多頁模式將該第一資料由該複數個實體頁面完全搬移至該複數個第二實體頁面前,先將欲以該單頁模式寫入該至少一第三實體頁面的該第二資料暫存於一緩衝記憶體。 The data processing method according to claim 1, wherein the first data is moved from the plurality of first entity pages to the plurality of second entity pages in the multi-page mode, and the first The step of the second data includes: before completely moving the first data from the plurality of physical pages to the plurality of second physical pages in the multi-page mode, first writing the at least one third in the single page mode The second data of the entity page is temporarily stored in a buffer memory. 如申請專利範圍第1項所述的資料處理方法,其中該複數個實體區塊之中以該多頁模式來儲存資料的一實體區塊的一抹除次數臨界值低於以該單頁模式來儲存資料的一實體區塊的一抹除次數臨界值。 The data processing method of claim 1, wherein a threshold of the number of erasures of a physical block in the plurality of physical blocks storing the data in the multi-page mode is lower than the single page mode. A threshold for the number of erasures of a physical block in which the data is stored. 如申請專利範圍第1項所述的資料處理方法,其中該複數個實體區塊之中以該多頁模式來儲存資料的一實體區塊的容量大於以該單頁模式來儲存資料的一實體區塊的一容量。 The data processing method of claim 1, wherein a physical block of the plurality of physical blocks storing the data in the multi-page mode is larger than an entity storing the data in the single page mode. A capacity of the block. 如申請專利範圍第1項所述的資料處理方法,其中該複數個實體區塊之中以該多頁模式來操作的一實體區塊中之下頁實體頁面、中頁實體頁面與上頁實體頁面皆會被用來儲存資料,且在 以該單頁模式來操作的一實體區塊中僅下頁實體頁面會被用來儲存資料。 The data processing method of claim 1, wherein the physical entity page, the middle page physical page, and the upper page entity in a physical block operating in the multi-page mode among the plurality of physical blocks Pages will be used to store data and Only the next page of the physical page in a physical block operating in the single page mode is used to store data. 一種記憶體儲存裝置,包括:一連接器,用以耦接至一主機系統;一快閃記憶體模組,具有複數個實體區塊,其中各該實體區塊具有複數個實體頁面;以及一記憶體控制器,耦接至該連接器與該快閃記憶體模組,並且用以以一單頁模式儲存一第一資料於該複數個實體頁面之中的複數個第一實體頁面中,其中該記憶體控制器更用以以一多頁模式將該第一資料由該複數個第一實體頁面搬移至該複數個實體頁面之中的複數個第二實體頁面,其中該記憶體控制器更用以在將該第一資料由該複數個第一實體頁面搬移至該複數個第二實體頁面的期間,準備一第二資料,其中該記憶體控制器更用以將該第二資料以該單頁模式寫入該複數個實體頁面之中的至少一第三實體頁面。 A memory storage device includes: a connector for coupling to a host system; a flash memory module having a plurality of physical blocks, wherein each of the physical blocks has a plurality of physical pages; a memory controller, coupled to the connector and the flash memory module, and configured to store a first data in a single page mode in a plurality of first physical pages among the plurality of physical pages, The memory controller is further configured to move the first data from the plurality of first physical pages to a plurality of second physical pages among the plurality of physical pages in a multi-page mode, wherein the memory controller Further, during the moving of the first data from the plurality of first physical pages to the plurality of second physical pages, preparing a second data, wherein the memory controller is further configured to use the second data to The one-page mode is written to at least one third entity page of the plurality of physical pages. 如申請專利範圍第9項所述的記憶體儲存裝置,其中在上述以該多頁模式將該第一資料由該複數個第一實體頁面搬移至該複數個第二實體頁面的運作中,該記憶體控制器以該多頁模式的一複製回(copyback)指令將該第一資料由該複數個第一實體頁面搬移至該複數個第二實體頁面。 The memory storage device of claim 9, wherein in the operation of moving the first data from the plurality of first physical pages to the plurality of second physical pages in the multi-page mode, The memory controller moves the first data from the plurality of first entity pages to the plurality of second entity pages in a copyback instruction of the multi-page mode. 如申請專利範圍第9項所述的記憶體儲存裝置,更包括 一緩衝記憶體,其中該記憶體控制器從該主機系統接收該第二資料或從該快閃記憶體模組中讀取該第二資料,其中該記憶體控制器更用以在該緩衝記憶體中暫存該第二資料。 The memory storage device according to claim 9 of the patent application, further comprising a buffer memory, wherein the memory controller receives the second data from the host system or reads the second data from the flash memory module, wherein the memory controller is further used in the buffer memory The second data is temporarily stored in the body. 如申請專利範圍第11項所述的記憶體儲存裝置,其中該記憶體控制器以至少部分同步方式將該第一資料由該複數個第一實體頁面搬移至該複數個第二實體頁面並將該第二資料暫存至該緩衝記憶體中。 The memory storage device of claim 11, wherein the memory controller moves the first data from the plurality of first physical pages to the plurality of second physical pages in an at least partially synchronized manner and The second data is temporarily stored in the buffer memory. 如申請專利範圍第11項所述的記憶體儲存裝置,其中該記憶體控制器在以該多頁模式將該第一資料由該複數個實體頁面完全搬移至該複數個第二實體頁面前,先將欲以該單頁模式寫入該至少一第三實體頁面的該第二資料暫存於該緩衝記憶體。 The memory storage device of claim 11, wherein the memory controller moves the first data from the plurality of physical pages to the plurality of second physical pages in the multi-page mode. The second data to be written in the at least one third physical page in the single page mode is temporarily stored in the buffer memory. 如申請專利範圍第9項所述的記憶體儲存裝置,其中該複數個實體區塊之中以該多頁模式來儲存資料的一實體區塊的一抹除次數臨界值低於以該單頁模式來儲存資料的一實體區塊的一抹除次數臨界值。 The memory storage device of claim 9, wherein a threshold of the number of erasures of a physical block in the plurality of physical blocks storing the data in the multi-page mode is lower than the single page mode A threshold value for erasing a physical block of data. 如申請專利範圍第9項所述的記憶體儲存裝置,其中該複數個實體區塊之中以該多頁模式來儲存資料的一實體區塊的容量大於以該單頁模式來儲存資料的一實體區塊的一容量。 The memory storage device of claim 9, wherein a physical block of the plurality of physical blocks storing the data in the multi-page mode is larger than the one storing the data in the single page mode. A capacity of a physical block. 如申請專利範圍第9項所述的記憶體儲存裝置,其中該複數個實體區塊之中以該多頁模式來操作的一實體區塊中之下頁 實體頁面、中頁實體頁面與上頁實體頁面皆會被用來儲存資料,且在以該單頁模式來操作的一實體區塊中僅下頁實體頁面會被用來儲存資料。 The memory storage device of claim 9, wherein a lower of a physical block in the plurality of physical blocks operating in the multi-page mode The physical page, the middle page physical page and the upper page physical page are all used to store data, and only the next page physical page is used to store data in a physical block operated in the single page mode. 一種資料處理方法,用於一快閃記憶體儲存裝置,其中該快閃記憶體儲存裝置具有一快閃記憶體模組,該快閃記憶體模組具有複數個實體區塊,該資料處理方法包括:以一單頁模式儲存一第一資料於該複數個實體區塊之中一第一實體區塊中;以一多頁模式將該第一資料由該第一實體區塊搬移至該複數個實體區塊之中的一第二實體區塊;在上述將該第一資料由該第一實體區塊完全搬移至該第二實體區塊前,暫存一第二資料;以及將該第二資料以該單頁模式寫入該複數個實體區塊之中的一第三實體區塊。 A data processing method for a flash memory storage device, wherein the flash memory storage device has a flash memory module, the flash memory module has a plurality of physical blocks, and the data processing method The method includes: storing a first data in a single page mode in a first physical block of the plurality of physical blocks; and moving the first data from the first physical block to the plurality in a multi-page mode a second physical block among the physical blocks; temporarily storing a second data before the first data is completely moved from the first physical block to the second physical block; and The second data is written into a third physical block of the plurality of physical blocks in the single page mode. 如申請專利範圍第17項所述的資料處理方法,其中上述以該多頁模式將該第一資料由該第一實體區塊搬移至該第二實體區塊的步驟包括以該多頁模式的一複製回(copyback)指令將該第一資料由該第一實體區塊搬移至該第二實體區塊。 The data processing method of claim 17, wherein the step of moving the first material from the first physical block to the second physical block in the multi-page mode comprises the multi-page mode A copyback instruction moves the first data from the first physical block to the second physical block. 如申請專利範圍第17項所述的資料處理方法,其中在上述以該多頁模式將該第一資料由該第一實體區塊完全搬移至該第二實體區塊前,暫存該第二資料的步驟包括:選取該第一實體區塊中之複數個第一實體頁面; 將該第一資料由該複數個第一實體頁面以該多頁模式的一複製回(copyback)指令搬移至該第二實體區塊的複數個第二實體頁面;以及將欲以該單頁模式寫入至該第三實體區塊的該第二資料暫存於一緩衝記憶體。 The data processing method of claim 17, wherein the second data is temporarily stored before the first physical block is completely moved from the first physical block to the second physical block in the multi-page mode. The step of data includes: selecting a plurality of first entity pages in the first physical block; Moving the first data from the plurality of first entity pages in a multi-page mode by a copyback instruction to a plurality of second entity pages of the second physical block; and intending to use the single page mode The second data written to the third physical block is temporarily stored in a buffer memory. 如申請專利範圍第17項所述的資料處理方法,其中在上述以該多頁模式將該第一資料由該第一實體區塊完全搬移至該第二實體區塊前,暫存該第二資料的步驟包括:以至少部分同步方式將該第一資料由該第一實體區塊的複數個實體頁面搬移至該第二實體區塊的複數個實體頁面並將該第二資料暫存至一緩衝記憶體中。 The data processing method of claim 17, wherein the second data is temporarily stored before the first physical block is completely moved from the first physical block to the second physical block in the multi-page mode. The step of data includes: moving the first data from the plurality of physical pages of the first physical block to the plurality of physical pages of the second physical block in an at least partially synchronized manner, and temporarily storing the second data to the first physical data Buffer memory. 如申請專利範圍第17項所述的資料處理方法,更包括:從一主機系統接收該第二資料或從該快閃記憶體模組中讀取該第二資料;以及在一緩衝記憶體中暫存該第二資料。 The data processing method of claim 17, further comprising: receiving the second data from a host system or reading the second data from the flash memory module; and in a buffer memory Temporarily save the second data. 如申請專利範圍第17項所述的資料處理方法,其中該複數個實體區塊之中以該多頁模式來儲存資料的一實體區塊的一抹除次數臨界值低於以該單頁模式來儲存資料的一實體區塊的一抹除次數臨界值。 The data processing method of claim 17, wherein a threshold of the number of erasures of a physical block in the plurality of physical blocks storing the data in the multi-page mode is lower than the single page mode A threshold for the number of erasures of a physical block in which the data is stored. 如申請專利範圍第17項所述的資料處理方法,其中該複數個實體區塊之中以該多頁模式來儲存資料的一實體區塊的容量大於以該單頁模式來儲存資料的一實體區塊的一容量。 The data processing method of claim 17, wherein a physical block of the plurality of physical blocks storing the data in the multi-page mode is larger than an entity storing the data in the single page mode; A capacity of the block. 如申請專利範圍第17項所述的資料處理方法,其中該複數個實體區塊之中以該多頁模式來操作的一實體區塊中之下頁實體頁面、中頁實體頁面與上頁實體頁面皆會被用來儲存資料,且在以該單頁模式來操作的一實體區塊中僅下頁實體頁面會被用來儲存資料。 The data processing method of claim 17, wherein the physical entity page, the middle page physical page, and the upper page entity in a physical block operating in the multi-page mode among the plurality of physical blocks The pages are used to store the data, and only the next page of the physical page in a physical block operating in the single page mode is used to store the data. 一種記憶體儲存裝置,包括:一連接器,用以耦接至一主機系統;一快閃記憶體模組,具有複數個實體區塊;以及一記憶體控制器,耦接至該連接器與該快閃記憶體模組,並且用以以一單頁模式儲存一第一資料於該複數個實體區塊之中一第一實體區塊中,其中該記憶體控制器更用以以一多頁模式將該第一資料由該第一實體區塊搬移至該複數個實體區塊之中的一第二實體區塊;其中該記憶體控制器更用以在將該第一資料由該第一實體區塊完全搬移至該第二實體區塊前,暫存一第二資料,其中該記憶體控制器更用以將該第二資料以該單頁模式寫入該複數個實體區塊之中的一第三實體區塊。 A memory storage device includes: a connector coupled to a host system; a flash memory module having a plurality of physical blocks; and a memory controller coupled to the connector and The flash memory module is configured to store a first data in a single page mode in a first physical block of the plurality of physical blocks, wherein the memory controller is used to more than The page mode moves the first data from the first physical block to a second physical block of the plurality of physical blocks; wherein the memory controller is further configured to use the first data by the first Before the physical block is completely moved to the second physical block, a second data is temporarily stored, wherein the memory controller is further configured to write the second data into the plurality of physical blocks in the single page mode. A third physical block in the middle. 如申請專利範圍第25項所述的記憶體儲存裝置,其中該記憶體控制器更用以以該多頁模式的一複製回(copyback)指令將該第一資料由該第一實體區塊搬移至該第二實體區塊。 The memory storage device of claim 25, wherein the memory controller is further configured to move the first data from the first physical block by a copyback instruction in the multi-page mode. To the second physical block. 如申請專利範圍第25項所述的記憶體儲存裝置,更包括一緩衝記憶體, 其中該記憶體控制器選取該第一實體區塊中之複數個第一實體頁面,將該第一資料由該複數個第一實體頁面以該多頁模式的一複製回(copyback)指令搬移至該第二實體區塊的複數個第二實體頁面,其中該記憶體控制器將欲以該單頁模式寫入至該第三實體區塊的該第二資料暫存於該緩衝記憶體。 The memory storage device of claim 25, further comprising a buffer memory, The memory controller selects a plurality of first entity pages in the first physical block, and moves the first data from the plurality of first entity pages to a copyback instruction in the multi-page mode to a plurality of second physical pages of the second physical block, wherein the memory controller temporarily stores the second data to be written to the third physical block in the single-page mode to the buffer memory. 如申請專利範圍第25項所述的記憶體儲存裝置,更包括一緩衝記憶體,其中該記憶體控制器以至少部分同步方式將該第一資料由該第一實體區塊的複數個實體頁面搬移至該第二實體區塊的複數個實體頁面並將該第二資料暫存至該緩衝記憶體中。 The memory storage device of claim 25, further comprising a buffer memory, wherein the memory controller is configured to at least partially synchronize the first data from the plurality of physical pages of the first physical block Moving to a plurality of physical pages of the second physical block and temporarily storing the second data in the buffer memory. 如申請專利範圍第25項所述的記憶體儲存裝置,更包括一緩衝記憶體,其中該記憶體控制器從該主機系統接收該第二資料或從該快閃記憶體模組中讀取該第二資料,其中該記憶體控制器更用以在該緩衝記憶體中暫存該第二資料。 The memory storage device of claim 25, further comprising a buffer memory, wherein the memory controller receives the second data from the host system or reads the same from the flash memory module The second data, wherein the memory controller is further configured to temporarily store the second data in the buffer memory. 如申請專利範圍第25項所述的記憶體儲存裝置,其中該複數個實體區塊之中以該多頁模式來儲存資料的一實體區塊的一抹除次數臨界值低於以該單頁模式來儲存資料的一實體區塊的一抹除次數臨界值。 The memory storage device of claim 25, wherein a threshold value of an erasure number of a physical block in the plurality of physical blocks storing the data in the multi-page mode is lower than the single page mode A threshold value for erasing a physical block of data. 如申請專利範圍第25項所述的記憶體儲存裝置,其中該 複數個實體區塊之中以該多頁模式來儲存資料的一實體區塊的容量大於以該單頁模式來儲存資料的一實體區塊的一容量。 The memory storage device of claim 25, wherein the The capacity of a physical block storing data in the multi-page mode among the plurality of physical blocks is larger than a capacity of a physical block storing the data in the single page mode. 如申請專利範圍第25項所述的記憶體儲存裝置,其中該複數個實體區塊之中以該多頁模式來操作的一實體區塊中之下頁實體頁面、中頁實體頁面與上頁實體頁面皆會被用來儲存資料,且在以該單頁模式來操作的一實體區塊中僅下頁實體頁面會被用來儲存資料。 The memory storage device of claim 25, wherein the physical page of the lower page, the page of the middle page and the previous page of a physical block operating in the multi-page mode among the plurality of physical blocks The physical page is used to store data, and only the next page of the physical page in a physical block operating in the single page mode is used to store data. 一種資料處理方法,用於一快閃記憶體儲存裝置,其中該快閃記憶體儲存裝置具有一快閃記憶體控制器及一快閃記憶體模組,該快閃記憶體控制器具有一緩衝記憶體且該快閃記憶體模組具有複數個實體區塊,該資料處理方法包括:以一單頁模式將一第一資料儲存於該複數個實體區塊之中一第一實體區塊中;以一多頁模式的一複製回(copyback)指令將該第一資料由該第一實體區塊搬移至該第二實體區塊中,其中,以該多頁模式來操作的該第二實體區塊中之下頁頁面、中頁頁面與上頁頁面皆會被用來儲存資料;在將該第一資料由該第一實體區塊搬移至該第二實體區塊之過程中,將欲以該單頁模式寫入至一第三實體區塊的一第二資料暫存於該記憶體控制器之該緩衝記憶體中;以及將該第二資料以該單頁模式從該緩衝器中寫入至該複數個實體區塊之中的一第三實體區塊。 A data processing method for a flash memory storage device, wherein the flash memory storage device has a flash memory controller and a flash memory module, the flash memory controller has a buffer memory And the flash memory module has a plurality of physical blocks, and the data processing method includes: storing a first data in a single page mode in a first physical block of the plurality of physical blocks; Transmitting the first data from the first physical block to the second physical block by a copyback instruction in a multi-page mode, wherein the second physical area operating in the multi-page mode The lower page, the middle page and the upper page of the block are used to store data; in the process of moving the first data from the first physical block to the second physical block, Writing a second data of the single-page mode to a third physical block to the buffer memory of the memory controller; and writing the second data from the buffer in the single page mode Entering a third of the plurality of physical blocks Physical block. 如申請專利範圍第33項所述的資料處理方法,其中該複數個實體區塊之中以該多頁模式來儲存資料的實體區塊的儲存容量為以該單頁模式來儲存資料的實體區塊的可儲存容量的三倍。 The data processing method of claim 33, wherein the storage capacity of the physical block in the plurality of physical blocks storing the data in the multi-page mode is a physical area in which the data is stored in the single page mode. Three times the storage capacity of the block.
TW103125839A 2011-12-15 2011-12-15 Data merging method for non-volatile memory and controller and stoarge apparatus using the same TWI521346B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW103125839A TWI521346B (en) 2011-12-15 2011-12-15 Data merging method for non-volatile memory and controller and stoarge apparatus using the same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW103125839A TWI521346B (en) 2011-12-15 2011-12-15 Data merging method for non-volatile memory and controller and stoarge apparatus using the same

Publications (2)

Publication Number Publication Date
TW201441816A true TW201441816A (en) 2014-11-01
TWI521346B TWI521346B (en) 2016-02-11

Family

ID=52422914

Family Applications (1)

Application Number Title Priority Date Filing Date
TW103125839A TWI521346B (en) 2011-12-15 2011-12-15 Data merging method for non-volatile memory and controller and stoarge apparatus using the same

Country Status (1)

Country Link
TW (1) TWI521346B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI564901B (en) * 2015-04-30 2017-01-01 群聯電子股份有限公司 Data writing method, memory control circuit unit and memory storage apparatus
CN111583976A (en) * 2020-05-11 2020-08-25 群联电子股份有限公司 Data writing method, memory control circuit unit and memory storage device
US11442662B2 (en) 2020-04-30 2022-09-13 Phison Electronics Corp. Data writing method, memory control circuit unit and memory storage apparatus
TWI800795B (en) * 2021-02-09 2023-05-01 宏碁股份有限公司 Data arrangement method and memory storage system using persistent memory

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI564901B (en) * 2015-04-30 2017-01-01 群聯電子股份有限公司 Data writing method, memory control circuit unit and memory storage apparatus
US9830077B2 (en) 2015-04-30 2017-11-28 Phison Electronics Corp. Data writing method, memory control circuit unit and memory storage apparatus
US11442662B2 (en) 2020-04-30 2022-09-13 Phison Electronics Corp. Data writing method, memory control circuit unit and memory storage apparatus
TWI791981B (en) * 2020-04-30 2023-02-11 群聯電子股份有限公司 Data writing method memory control circuit unit and memory storage apparatus
CN111583976A (en) * 2020-05-11 2020-08-25 群联电子股份有限公司 Data writing method, memory control circuit unit and memory storage device
CN111583976B (en) * 2020-05-11 2022-09-13 群联电子股份有限公司 Data writing method, memory control circuit unit and memory storage device
TWI800795B (en) * 2021-02-09 2023-05-01 宏碁股份有限公司 Data arrangement method and memory storage system using persistent memory

Also Published As

Publication number Publication date
TWI521346B (en) 2016-02-11

Similar Documents

Publication Publication Date Title
TWI451249B (en) Data merging method for non-volatile memory and controller and stoarge apparatus using the same
US20180260317A1 (en) Method for managing the copying and storing of data in garbage collection, memory storage device and memory control circuit unit using the same
TWI527037B (en) Data storing method, memory control circuit unit and memory storage apparatus
TWI423026B (en) Data writing method, memory controller and memory storage apparatus
TWI436212B (en) Data writing method, memory controller and memory storage apparatus
TWI470431B (en) Data writing method, memory controller and memory storage apparatus
TWI476590B (en) Memory management method, and memory controller and memory storage device using the same
TW201437807A (en) Method of recording mapping information method, and memory controller and memory storage apparatus using the same
TWI421870B (en) Data writing method for a flash memory, and controller and storage system using the same
TWI597730B (en) Data writing method, memory control circuit unit and memory storage apparatus
TWI584189B (en) Memory controller, memory storage device, and method for writing data
TWI540428B (en) Data writing method, memory controller and memory storage apparatus
US9383929B2 (en) Data storing method and memory controller and memory storage device using the same
US8943289B2 (en) Data moving method for flash memory module, and memory controller and memory storage apparatus using the same
US9778862B2 (en) Data storing method for preventing data losing during flush operation, memory control circuit unit and memory storage apparatus
CN113885808B (en) Mapping information recording method, memory control circuit unit and memory device
TWI501244B (en) Data writing method, memory control circuit unit and memory storage apparatus
TWI521346B (en) Data merging method for non-volatile memory and controller and stoarge apparatus using the same
TWI446170B (en) Data writing method, memory controller and memory storage apparatus
TW201643722A (en) Memory management method, memory control circuit unit and memory storage device
TWI564901B (en) Data writing method, memory control circuit unit and memory storage apparatus
CN114203239B (en) Memory management method, memory storage device and memory control circuit unit
CN112445418B (en) Memory control method, memory storage device and memory control circuit unit