TWI712886B - Memory management method, memory storage device and memory control circuit unit - Google Patents

Memory management method, memory storage device and memory control circuit unit Download PDF

Info

Publication number
TWI712886B
TWI712886B TW108123692A TW108123692A TWI712886B TW I712886 B TWI712886 B TW I712886B TW 108123692 A TW108123692 A TW 108123692A TW 108123692 A TW108123692 A TW 108123692A TW I712886 B TWI712886 B TW I712886B
Authority
TW
Taiwan
Prior art keywords
data
type
target data
memory
information
Prior art date
Application number
TW108123692A
Other languages
Chinese (zh)
Other versions
TW202103007A (en
Inventor
朱啟傲
張靜
王鑫
朱凱迪
Original Assignee
大陸商合肥兆芯電子有限公司
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 大陸商合肥兆芯電子有限公司 filed Critical 大陸商合肥兆芯電子有限公司
Priority to TW108123692A priority Critical patent/TWI712886B/en
Application granted granted Critical
Publication of TWI712886B publication Critical patent/TWI712886B/en
Publication of TW202103007A publication Critical patent/TW202103007A/en

Links

Images

Abstract

A memory management method, a memory storage device and a memory control circuit unit are provided. The method includes: receiving a first write command from a host system; instructing a rewritable non-volatile memory module to perform a first write operation according to the first write command; obtaining first performance information corresponding to the first write operation; and updating threshold information according to the first performance information, wherein the threshold information is configured to determine a type of target data.

Description

記憶體管理方法、記憶體儲存裝置及記憶體控制電路單元Memory management method, memory storage device and memory control circuit unit

本發明是有關於一種記憶體管理技術,且特別是有關於一種記憶體管理方法、記憶體儲存裝置及記憶體控制電路單元。The present invention relates to a memory management technology, and particularly relates to a memory management method, a memory storage device and a memory control circuit unit.

數位相機、行動電話與MP3播放器在這幾年來的成長十分迅速,使得消費者對儲存媒體的需求也急速增加。由於可複寫式非揮發性記憶體模組(rewritable non-volatile memory module)(例如,快閃記憶體)具有資料非揮發性、省電、體積小,以及無機械結構等特性,所以非常適合內建於上述所舉例的各種可攜式多媒體裝置中。Digital cameras, mobile phones and MP3 players have grown rapidly in the past few years, which has led to a rapid increase in consumer demand for storage media. Because rewritable non-volatile memory modules (for example, flash memory) have the characteristics of non-volatile data, power saving, small size, and no mechanical structure, they are very suitable for internal Built in the various portable multimedia devices mentioned above.

在記憶體管理技術中,許多操作都會根據所儲存之資料的特性及/或類型來執行。例如,在資料整併程序(或稱為垃圾收集程序)中,有效資料可被劃分為冷資料與熱資料。屬於冷資料的有效資料可優先被收集並集中儲存,從而提高資料整併程序的效能。或者,不同特性及/或類型的資料也可使用不同的資料管理機制或資料保護機制來進行管理,以提高對於記憶體儲存裝置的資料維護能力。因此,如何對特定資料進行分類有效影響記憶體儲存裝置的系統效能。In the memory management technology, many operations are performed according to the characteristics and/or types of the stored data. For example, in the data consolidation process (or called the garbage collection process), valid data can be divided into cold data and hot data. Effective data belonging to cold data can be collected first and stored centrally, thereby improving the efficiency of the data consolidation process. Alternatively, different characteristics and/or types of data can also be managed using different data management mechanisms or data protection mechanisms to improve the data maintenance capability of the memory storage device. Therefore, how to classify specific data effectively affects the system performance of the memory storage device.

本發明提供一種記憶體管理方法、記憶體儲存裝置及記憶體控制電路單元,可提高對於資料的分類效率。The invention provides a memory management method, a memory storage device and a memory control circuit unit, which can improve the efficiency of data classification.

本發明的範例實施例提供一種記憶體管理方法,其用於可複寫式非揮發性記憶體模組,且所述記憶體管理方法包括:從主機系統接收第一寫入指令;根據所述第一寫入指令指示所述可複寫式非揮發性記憶體模組執行第一寫入操作;獲得對應於所述第一寫入操作的第一效能資訊;以及根據所述第一效能資訊更新臨界資訊,其中所述臨界資訊用以決定目標資料之類型。An exemplary embodiment of the present invention provides a memory management method, which is used in a rewritable non-volatile memory module, and the memory management method includes: receiving a first write command from a host system; A write command instructs the rewritable non-volatile memory module to perform a first write operation; obtains first performance information corresponding to the first write operation; and updates a threshold according to the first performance information Information, where the critical information is used to determine the type of target data.

在本發明的一範例實施例中,根據所述第一效能資訊更新所述臨界資訊之步驟包括:從所述主機系統接收第二寫入指令;根據所述第二寫入指令指示所述可複寫式非揮發性記憶體模組執行第二寫入操作;獲得對應於所述第二寫入操作的第二效能資訊;以及根據所述第一效能資訊與所述第二效能資訊更新所述臨界資訊。In an exemplary embodiment of the present invention, the step of updating the threshold information according to the first performance information includes: receiving a second write command from the host system; and instructing the available data according to the second write command The copy-type non-volatile memory module performs a second write operation; obtains second performance information corresponding to the second write operation; and updates the first performance information and the second performance information Critical information.

在本發明的一範例實施例中,根據所述第一效能資訊更新所述臨界資訊之步驟包括:獲得所述第一效能資訊與第二效能資訊之間的差值;以及根據所述差值更新所述臨界資訊。In an exemplary embodiment of the present invention, the step of updating the critical information according to the first performance information includes: obtaining a difference between the first performance information and the second performance information; and according to the difference Update the critical information.

在本發明的一範例實施例中,根據所述差值更新所述臨界資訊之步驟包括:若所述差值符合預設條件,提高所述臨界資訊的數值;以及若所述差值不符合所述預設條件,降低所述臨界資訊的所述數值。In an exemplary embodiment of the present invention, the step of updating the threshold information according to the difference includes: if the difference meets a preset condition, increasing the value of the threshold information; and if the difference does not meet The preset condition reduces the value of the critical information.

在本發明的一範例實施例中,所述的記憶體管理方法更包括:根據所述臨界資訊決定所述目標資料為第一類資料或第二類資料,其中所述第一類資料的資料更新頻率不同於所述第二類資料的資料更新頻率。In an exemplary embodiment of the present invention, the memory management method further includes: determining whether the target data is the first type of data or the second type of data according to the critical information, wherein the data of the first type of data The update frequency is different from the data update frequency of the second type of data.

在本發明的一範例實施例中,根據所述臨界資訊決定所述目標資料為所述第一類資料或所述第二類資料之步驟包括:將所述目標資料的資料量與所述臨界資訊進行比較;若所述目標資料的所述資料量小於所述臨界資訊,判定所述目標資料為所述第一類資料;以及若所述目標資料的所述資料量不小於所述臨界資訊,判定所述目標資料為所述第二類資料。In an exemplary embodiment of the present invention, the step of determining whether the target data is the first type of data or the second type of data according to the threshold information includes: comparing the data amount of the target data with the threshold Information; if the data amount of the target data is less than the critical information, determine that the target data is the first type of data; and if the data amount of the target data is not less than the critical information , Determining that the target data is the second type of data.

在本發明的一範例實施例中,根據所述臨界資訊決定所述目標資料為所述第一類資料或所述第二類資料之步驟包括:將所述目標資料的邏輯範圍與所述臨界資訊進行比較;若所述目標資料的所述邏輯範圍小於所述臨界資訊,判定所述目標資料為所述第一類資料;以及若所述目標資料的所述邏輯範圍不小於所述臨界資訊,判定所述目標資料為所述第二類資料。In an exemplary embodiment of the present invention, the step of determining whether the target data is the first type of data or the second type of data according to the threshold information includes: comparing the logical range of the target data with the threshold Information; if the logical range of the target data is smaller than the critical information, determine that the target data is the first type of data; and if the logical range of the target data is not smaller than the critical information , Determining that the target data is the second type of data.

在本發明的一範例實施例中,所述可複寫式非揮發性記憶體模組包括多個實體單元,所述多個實體單元包括第一實體單元與第二實體單元,且所述記憶體管理方法更包括:若所述目標資料為第一類資料,發送第一寫入指令序列以指示將所述目標資料寫入至所述第一實體單元;以及若所述目標資料為第二類資料,發送第二寫入指令序列以指示將所述目標資料寫入至所述第二實體單元,其中所述第一實體單元不同於所述第二實體單元。In an exemplary embodiment of the present invention, the rewritable non-volatile memory module includes a plurality of physical units, the plurality of physical units includes a first physical unit and a second physical unit, and the memory The management method further includes: if the target data is the first type of data, sending a first write instruction sequence to instruct to write the target data to the first physical unit; and if the target data is of the second type Data, sending a second write instruction sequence to instruct to write the target data to the second physical unit, wherein the first physical unit is different from the second physical unit.

本發明的範例實施例另提供一種記憶體儲存裝置,其包括連接介面單元、可複寫式非揮發性記憶體模組及記憶體控制電路單元。所述連接介面單元用以耦接至主機系統。所述記憶體控制電路單元耦接至所述連接介面單元與所述可複寫式非揮發性記憶體模組。所述記憶體控制電路單元用以從所述主機系統接收第一寫入指令。所述記憶體控制電路單元更用以根據所述第一寫入指令指示所述可複寫式非揮發性記憶體模組執行第一寫入操作。所述記憶體控制電路單元更用以獲得對應於所述第一寫入操作的第一效能資訊。所述記憶體控制電路單元更用以根據所述第一效能資訊更新臨界資訊,其中所述臨界資訊用以決定目標資料之類型。An exemplary embodiment of the present invention further provides a memory storage device, which includes a connection interface unit, a rewritable non-volatile memory module, and a memory control circuit unit. The connection interface unit is used for coupling to the host system. The memory control circuit unit is coupled to the connection interface unit and the rewritable non-volatile memory module. The memory control circuit unit is used for receiving a first write command from the host system. The memory control circuit unit is further configured to instruct the rewritable non-volatile memory module to perform a first write operation according to the first write instruction. The memory control circuit unit is further used to obtain first performance information corresponding to the first write operation. The memory control circuit unit is further used for updating critical information according to the first performance information, wherein the critical information is used to determine the type of target data.

在本發明的一範例實施例中,所述記憶體控制電路單元根據所述第一效能資訊更新所述臨界資訊之操作包括:從所述主機系統接收第二寫入指令;根據所述第二寫入指令指示所述可複寫式非揮發性記憶體模組執行第二寫入操作;獲得對應於所述第二寫入操作的第二效能資訊;以及根據所述第一效能資訊與所述第二效能資訊更新所述臨界資訊。In an exemplary embodiment of the present invention, the operation of the memory control circuit unit to update the critical information according to the first performance information includes: receiving a second write command from the host system; and according to the second A write command instructs the rewritable non-volatile memory module to perform a second write operation; obtains second performance information corresponding to the second write operation; and according to the first performance information and the The second performance information updates the critical information.

在本發明的一範例實施例中,所述記憶體控制電路單元根據所述第一效能資訊更新所述臨界資訊之操作包括:獲得所述第一效能資訊與第二效能資訊之間的差值;以及根據所述差值更新所述臨界資訊。In an exemplary embodiment of the present invention, the operation of the memory control circuit unit to update the critical information according to the first performance information includes: obtaining the difference between the first performance information and the second performance information ; And updating the critical information according to the difference.

在本發明的一範例實施例中,所述記憶體控制電路單元根據所述差值更新所述臨界資訊之操作包括:若所述差值符合預設條件,提高所述臨界資訊的數值;以及若所述差值不符合所述預設條件,降低所述臨界資訊的所述數值。In an exemplary embodiment of the present invention, the operation of the memory control circuit unit to update the critical information according to the difference value includes: if the difference value meets a preset condition, increasing the value of the critical information; and If the difference does not meet the preset condition, reduce the value of the critical information.

在本發明的一範例實施例中,所述記憶體控制電路單元更用以根據所述臨界資訊決定所述目標資料為第一類資料或第二類資料,其中所述第一類資料的資料更新頻率不同於所述第二類資料的資料更新頻率。In an exemplary embodiment of the present invention, the memory control circuit unit is further used to determine whether the target data is the first type of data or the second type of data according to the critical information, wherein the data of the first type of data The update frequency is different from the data update frequency of the second type of data.

在本發明的一範例實施例中,所述記憶體控制電路單元根據所述臨界資訊決定所述目標資料為所述第一類資料或所述第二類資料之操作包括:將所述目標資料的資料量與所述臨界資訊進行比較;若所述目標資料的所述資料量小於所述臨界資訊,判定所述目標資料為所述第一類資料;以及若所述目標資料的所述資料量不小於所述臨界資訊,判定所述目標資料為所述第二類資料。In an exemplary embodiment of the present invention, the operation of the memory control circuit unit to determine whether the target data is the first type of data or the second type of data according to the critical information includes: Compare the data volume of the target data with the critical information; if the data volume of the target data is less than the critical information, determine that the target data is the first type of data; and if the data of the target data If the amount is not less than the critical information, it is determined that the target data is the second type of data.

在本發明的一範例實施例中,所述記憶體控制電路單元根據所述臨界資訊決定所述目標資料為所述第一類資料或所述第二類資料之操作包括:將所述目標資料的邏輯範圍與所述臨界資訊進行比較;若所述目標資料的所述邏輯範圍小於所述臨界資訊,判定所述目標資料為所述第一類資料;以及若所述目標資料的所述邏輯範圍不小於所述臨界資訊,判定所述目標資料為所述第二類資料。In an exemplary embodiment of the present invention, the operation of the memory control circuit unit to determine whether the target data is the first type of data or the second type of data according to the critical information includes: Compare the logical range of the target data with the critical information; if the logical range of the target data is smaller than the critical information, determine that the target data is the first type of data; and if the logic of the target data The range is not less than the critical information, and the target data is determined to be the second type of data.

在本發明的一範例實施例中,所述可複寫式非揮發性記憶體模組包括多個實體單元,所述多個實體單元包括第一實體單元與第二實體單元。若所述目標資料為第一類資料,所述記憶體控制電路單元更用以發送第一寫入指令序列以指示將所述目標資料寫入至所述第一實體單元。若所述目標資料為第二類資料,所述記憶體控制電路單元更用以發送第二寫入指令序列以指示將所述目標資料寫入至所述第二實體單元,其中所述第一實體單元不同於所述第二實體單元。In an exemplary embodiment of the present invention, the rewritable non-volatile memory module includes a plurality of physical units, and the plurality of physical units includes a first physical unit and a second physical unit. If the target data is the first type of data, the memory control circuit unit is further configured to send a first write command sequence to instruct to write the target data to the first physical unit. If the target data is the second type of data, the memory control circuit unit is further used to send a second write command sequence to instruct to write the target data to the second physical unit, wherein the first The physical unit is different from the second physical unit.

本發明的範例實施例另提供一種記憶體控制電路單元,其用於控制可複寫式非揮發性記憶體模組,且所述記憶體控制電路單元包括主機介面、記憶體介面及記憶體管理電路。所述主機介面用以耦接至主機系統。所述記憶體介面用以耦接至所述可複寫式非揮發性記憶體模組。所述記憶體管理電路耦接至所述主機介面與所述記憶體介面。所述記憶體管理電路用以從所述主機系統接收第一寫入指令。所述記憶體管理電路更用以根據所述第一寫入指令指示所述可複寫式非揮發性記憶體模組執行第一寫入操作。所述記憶體管理電路更用以獲得對應於所述第一寫入操作的第一效能資訊。所述記憶體管理電路更用以根據所述第一效能資訊更新臨界資訊,其中所述臨界資訊用以決定目標資料之類型。Example embodiments of the present invention further provide a memory control circuit unit for controlling a rewritable non-volatile memory module, and the memory control circuit unit includes a host interface, a memory interface, and a memory management circuit . The host interface is used for coupling to a host system. The memory interface is used for coupling to the rewritable non-volatile memory module. The memory management circuit is coupled to the host interface and the memory interface. The memory management circuit is used for receiving a first write command from the host system. The memory management circuit is further configured to instruct the rewritable non-volatile memory module to perform a first write operation according to the first write instruction. The memory management circuit is further used to obtain first performance information corresponding to the first write operation. The memory management circuit is further used for updating critical information according to the first performance information, wherein the critical information is used to determine the type of target data.

在本發明的一範例實施例中,所述記憶體管理電路根據所述第一效能資訊更新所述臨界資訊之操作包括:從所述主機系統接收第二寫入指令;根據所述第二寫入指令指示所述可複寫式非揮發性記憶體模組執行第二寫入操作;獲得對應於所述第二寫入操作的第二效能資訊;以及根據所述第一效能資訊與所述第二效能資訊更新所述臨界資訊。In an exemplary embodiment of the present invention, the operation of the memory management circuit to update the threshold information according to the first performance information includes: receiving a second write command from the host system; and according to the second write The input command instructs the rewritable non-volatile memory module to perform a second write operation; obtains second performance information corresponding to the second write operation; and according to the first performance information and the first 2. The performance information updates the critical information.

在本發明的一範例實施例中,所述記憶體管理電路根據所述第一效能資訊更新所述臨界資訊之操作包括:獲得所述第一效能資訊與第二效能資訊之間的差值;以及根據所述差值更新所述臨界資訊。In an exemplary embodiment of the present invention, the operation of the memory management circuit to update the critical information according to the first performance information includes: obtaining the difference between the first performance information and the second performance information; And update the critical information according to the difference.

在本發明的一範例實施例中,所述記憶體管理電路根據所述差值更新所述臨界資訊之操作包括:若所述差值符合預設條件,提高所述臨界資訊的數值;以及若所述差值不符合所述預設條件,降低所述臨界資訊的所述數值。In an exemplary embodiment of the present invention, the operation of the memory management circuit to update the critical information according to the difference includes: if the difference meets a preset condition, increasing the value of the critical information; and if If the difference does not meet the preset condition, the value of the critical information is reduced.

在本發明的一範例實施例中,所述第一效能資訊包括寫入放大參數,且所述寫入放大參數反映所述第一寫入操作引起的寫入放大比例。In an exemplary embodiment of the present invention, the first performance information includes a write amplification parameter, and the write amplification parameter reflects a write amplification ratio caused by the first write operation.

在本發明的一範例實施例中,所述記憶體管理電路更用以根據所述臨界資訊決定所述目標資料為第一類資料或第二類資料,其中所述第一類資料的資料更新頻率不同於所述第二類資料的資料更新頻率。In an exemplary embodiment of the present invention, the memory management circuit is further used to determine whether the target data is the first type of data or the second type of data according to the critical information, wherein the data of the first type of data is updated The frequency is different from the data update frequency of the second type of data.

在本發明的一範例實施例中,所述記憶體管理電路根據所述臨界資訊決定所述目標資料為所述第一類資料或所述第二類資料之操作包括:將所述目標資料的資料量與所述臨界資訊進行比較;若所述目標資料的所述資料量小於所述臨界資訊,判定所述目標資料為所述第一類資料;以及若所述目標資料的所述資料量不小於所述臨界資訊,判定所述目標資料為所述第二類資料。In an exemplary embodiment of the present invention, the operation of the memory management circuit to determine whether the target data is the first type of data or the second type of data according to the critical information includes: Compare the amount of data with the threshold information; if the amount of data of the target data is smaller than the threshold information, determine that the target data is the first type of data; and if the amount of data of the target data Not less than the critical information, determine that the target data is the second type of data.

在本發明的一範例實施例中,所述記憶體管理電路根據所述臨界資訊決定所述目標資料為所述第一類資料或所述第二類資料之操作包括:將所述目標資料的邏輯範圍與所述臨界資訊進行比較;若所述目標資料的所述邏輯範圍小於所述臨界資訊,判定所述目標資料為所述第一類資料;以及若所述目標資料的所述邏輯範圍不小於所述臨界資訊,判定所述目標資料為所述第二類資料。In an exemplary embodiment of the present invention, the operation of the memory management circuit to determine whether the target data is the first type of data or the second type of data according to the critical information includes: Compare the logical range with the critical information; if the logical range of the target data is smaller than the critical information, determine that the target data is the first type of data; and if the logical range of the target data Not less than the critical information, determine that the target data is the second type of data.

在本發明的一範例實施例中,所述可複寫式非揮發性記憶體模組包括多個實體單元,所述多個實體單元包括第一實體單元與第二實體單元。若所述目標資料為第一類資料,所述記憶體管理電路更用以發送第一寫入指令序列以指示將所述目標資料寫入至所述第一實體單元。若所述目標資料為第二類資料,所述記憶體管理電路更用以發送第二寫入指令序列以指示將所述目標資料寫入至所述第二實體單元,其中所述第一實體單元不同於所述第二實體單元。In an exemplary embodiment of the present invention, the rewritable non-volatile memory module includes a plurality of physical units, and the plurality of physical units includes a first physical unit and a second physical unit. If the target data is the first type of data, the memory management circuit is further configured to send a first write command sequence to instruct to write the target data to the first physical unit. If the target data is the second type of data, the memory management circuit is further configured to send a second write command sequence to instruct to write the target data to the second physical unit, wherein the first physical unit The unit is different from the second physical unit.

基於上述,在接收到來自主機系統的第一寫入指令後,可複寫式非揮發性記憶體模組可根據此第一寫入指令執行第一寫入操作且對應於第一寫入操作的第一效能資訊可被獲得。接著,根據第一效能資訊,臨界資訊可被更新並用以決定目標資料的類型。藉此,可有效提高對於記憶體儲存裝置中的資料分類效率。Based on the above, after receiving the first write command from the host system, the rewritable non-volatile memory module can execute the first write operation according to the first write command and corresponds to the first write operation. The first performance information can be obtained. Then, based on the first performance information, the critical information can be updated and used to determine the type of target data. In this way, the efficiency of data classification in the memory storage device can be effectively improved.

為讓本發明的上述特徵和優點能更明顯易懂,下文特舉實施例,並配合所附圖式作詳細說明如下。In order to make the above-mentioned features and advantages of the present invention more comprehensible, the following specific embodiments are described in detail in conjunction with the accompanying drawings.

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

圖1是根據本發明的一範例實施例所繪示的主機系統、記憶體儲存裝置及輸入/輸出(I/O)裝置的示意圖。圖2是根據本發明的另一範例實施例所繪示的主機系統、記憶體儲存裝置及I/O裝置的示意圖。FIG. 1 is a schematic diagram of a host system, a memory storage device, and an input/output (I/O) device according to an exemplary embodiment of the present invention. 2 is a schematic diagram of a host system, a memory storage device, and an I/O device according to another exemplary embodiment of the invention.

請參照圖1與圖2,主機系統11一般包括處理器111、隨機存取記憶體(random access memory, RAM)112、唯讀記憶體(read only memory, ROM)113及資料傳輸介面114。處理器111、隨機存取記憶體112、唯讀記憶體113及資料傳輸介面114皆耦接至系統匯流排(system bus)110。1 and FIG. 2, the host system 11 generally includes a processor 111, a random access memory (RAM) 112, a read only memory (ROM) 113, and a data transmission interface 114. The processor 111, the random access memory 112, the read-only memory 113, and the data transmission interface 114 are all coupled to a system bus 110.

在本範例實施例中,主機系統11是透過資料傳輸介面114與記憶體儲存裝置10耦接。例如,主機系統11可經由資料傳輸介面114將資料儲存至記憶體儲存裝置10或從記憶體儲存裝置10中讀取資料。此外,主機系統11是透過系統匯流排110與I/O裝置12耦接。例如,主機系統11可經由系統匯流排110將輸出訊號傳送至I/O裝置12或從I/O裝置12接收輸入訊號。In this exemplary embodiment, the host system 11 is coupled to the memory storage device 10 through the data transmission interface 114. For example, the host system 11 can store data to or read data from the memory storage device 10 via the data transmission interface 114. In addition, the host system 11 is coupled to the I/O device 12 through the system bus 110. For example, the host system 11 can transmit output signals to or receive input signals from the I/O device 12 via the system bus 110.

在本範例實施例中,處理器111、隨機存取記憶體112、唯讀記憶體113及資料傳輸介面114可設置在主機系統11的主機板20上。資料傳輸介面114的數目可以是一或多個。透過資料傳輸介面114,主機板20可以經由有線或無線方式耦接至記憶體儲存裝置10。記憶體儲存裝置10可例如是隨身碟201、記憶卡202、固態硬碟(Solid State Drive, SSD)203或無線記憶體儲存裝置204。無線記憶體儲存裝置204可例如是近距離無線通訊(Near Field Communication, NFC)記憶體儲存裝置、無線傳真(WiFi)記憶體儲存裝置、藍牙(Bluetooth)記憶體儲存裝置或低功耗藍牙記憶體儲存裝置(例如,iBeacon)等以各式無線通訊技術為基礎的記憶體儲存裝置。此外,主機板20也可以透過系統匯流排110耦接至全球定位系統(Global Positioning System, GPS)模組205、網路介面卡206、無線傳輸裝置207、鍵盤208、螢幕209、喇叭210等各式I/O裝置。例如,在一範例實施例中,主機板20可透過無線傳輸裝置207存取無線記憶體儲存裝置204。In this exemplary embodiment, the processor 111, the random access memory 112, the read-only memory 113, and the data transmission interface 114 may be disposed on the main board 20 of the host system 11. The number of data transmission interfaces 114 may be one or more. Through the data transmission interface 114, the motherboard 20 can be coupled to the memory storage device 10 in a wired or wireless manner. The memory storage device 10 can be, for example, a flash drive 201, a memory card 202, a solid state drive (SSD) 203, or a wireless memory storage device 204. The wireless memory storage device 204 may be, for example, a Near Field Communication (NFC) memory storage device, a wireless fax (WiFi) memory storage device, a Bluetooth (Bluetooth) memory storage device, or a Bluetooth low energy memory device. Storage devices (for example, iBeacon) and other memory storage devices based on various wireless communication technologies. In addition, the motherboard 20 can also be coupled to a Global Positioning System (GPS) module 205, a network interface card 206, a wireless transmission device 207, a keyboard 208, a screen 209, a speaker 210, etc. through the system bus 110. Type I/O device. For example, in an exemplary embodiment, the motherboard 20 can access the wireless memory storage device 204 through the wireless transmission device 207.

在一範例實施例中,所提及的主機系統為可實質地與記憶體儲存裝置配合以儲存資料的任意系統。雖然在上述範例實施例中,主機系統是以電腦系統來作說明,然而,圖3是根據本發明的另一範例實施例所繪示的主機系統與記憶體儲存裝置的示意圖。請參照圖3,在另一範例實施例中,主機系統31也可以是數位相機、攝影機、通訊裝置、音訊播放器、視訊播放器或平板電腦等系統,而記憶體儲存裝置30可為其所使用的安全數位(Secure Digital, SD)卡32、小型快閃(Compact Flash, CF)卡33或嵌入式儲存裝置34等各式非揮發性記憶體儲存裝置。嵌入式儲存裝置34包括嵌入式多媒體卡(embedded Multi Media Card, eMMC)341及/或嵌入式多晶片封裝(embedded Multi Chip Package, eMCP)儲存裝置342等各類型將記憶體模組直接耦接於主機系統的基板上的嵌入式儲存裝置。In an exemplary embodiment, the host system mentioned is any system that can substantially cooperate with a memory storage device to store data. Although in the above exemplary embodiment, the host system is described as a computer system, FIG. 3 is a schematic diagram of a host system and a memory storage device according to another exemplary embodiment of the present invention. 3, in another exemplary embodiment, the host system 31 may also be a system such as a digital camera, a video camera, a communication device, an audio player, a video player, or a tablet computer, and the memory storage device 30 may be used for it. Various non-volatile memory storage devices such as Secure Digital (SD) card 32, Compact Flash (CF) card 33 or embedded storage device 34 are used. The embedded storage device 34 includes an embedded Multi Media Card (eMMC) 341 and/or an embedded Multi Chip Package (embedded Multi Chip Package, eMCP) storage device 342. The memory module is directly coupled to the Embedded storage device on the substrate of the host system.

圖4是根據本發明的一範例實施例所繪示的記憶體儲存裝置的概要方塊圖。請參照圖4,記憶體儲存裝置10包括連接介面單元402、記憶體控制電路單元404與可複寫式非揮發性記憶體模組406。FIG. 4 is a schematic block diagram of a memory storage device according to an exemplary embodiment of the present invention. 4, the memory storage device 10 includes a connection interface unit 402, a memory control circuit unit 404, and a rewritable non-volatile memory module 406.

連接介面單元402用以將記憶體儲存裝置10耦接至主機系統11。記憶體儲存裝置10可透過連接介面單元402與主機系統11通訊。在本範例實施例中,連接介面單元402是相容於序列先進附件(Serial Advanced Technology Attachment, SATA)標準。然而,必須瞭解的是,本發明不限於此,連接介面單元402亦可以是符合並列先進附件(Parallel Advanced Technology Attachment, PATA)標準、電氣和電子工程師協會(Institute of Electrical and Electronic Engineers, IEEE)1394標準、高速周邊零件連接介面(Peripheral Component Interconnect Express, PCI Express)標準、通用序列匯流排(Universal Serial Bus, USB)標準、SD介面標準、超高速一代(Ultra High Speed-I, UHS-I)介面標準、超高速二代(Ultra High Speed-II, UHS-II)介面標準、記憶棒(Memory Stick, MS)介面標準、MCP介面標準、MMC介面標準、eMMC介面標準、通用快閃記憶體(Universal Flash Storage, UFS)介面標準、eMCP介面標準、CF介面標準、整合式驅動電子介面(Integrated Device Electronics, IDE)標準或其他適合的標準。連接介面單元402可與記憶體控制電路單元404封裝在一個晶片中,或者連接介面單元402是佈設於一包含記憶體控制電路單元404之晶片外。The connection interface unit 402 is used to couple the memory storage device 10 to the host system 11. The memory storage device 10 can communicate with the host system 11 through the connection interface unit 402. In this exemplary embodiment, the connection interface unit 402 is compatible with the Serial Advanced Technology Attachment (SATA) standard. However, it must be understood that the present invention is not limited to this, and the connection interface unit 402 may also conform to the Parallel Advanced Technology Attachment (PATA) standard, the Institute of Electrical and Electronic Engineers (IEEE) 1394 Standard, high-speed peripheral component connection interface (Peripheral Component Interconnect Express, PCI Express) standard, universal serial bus (Universal Serial Bus, USB) standard, SD interface standard, Ultra High Speed-I (UHS-I) interface Standard, Ultra High Speed-II (UHS-II) interface standard, Memory Stick (MS) interface standard, MCP interface standard, MMC interface standard, eMMC interface standard, universal flash memory (Universal Flash Storage, UFS) interface standard, eMCP interface standard, CF interface standard, Integrated Device Electronics (IDE) standard or other suitable standards. The connection interface unit 402 and the memory control circuit unit 404 can be packaged in one chip, or the connection interface unit 402 can be arranged outside a chip including the memory control circuit unit 404.

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

可複寫式非揮發性記憶體模組406是耦接至記憶體控制電路單元404並且用以儲存主機系統11所寫入之資料。可複寫式非揮發性記憶體模組406可以是單階記憶胞(Single Level Cell, SLC)NAND型快閃記憶體模組(即,一個記憶胞中可儲存1個位元的快閃記憶體模組)、多階記憶胞(Multi Level Cell, MLC)NAND型快閃記憶體模組(即,一個記憶胞中可儲存2個位元的快閃記憶體模組)、三階記憶胞(Triple Level Cell,TLC)NAND型快閃記憶體模組(即,一個記憶胞中可儲存3個位元的快閃記憶體模組)、四階記憶胞(Quad Level Cell,QLC)NAND型快閃記憶體模組(即,一個記憶胞中可儲存4個位元的快閃記憶體模組)、其他快閃記憶體模組或其他具有相同特性的記憶體模組。The rewritable non-volatile memory module 406 is coupled to the memory control circuit unit 404 and used for storing data written by the host system 11. The rewritable non-volatile memory module 406 can be a single-level cell (SLC) NAND flash memory module (that is, a flash memory that can store 1 bit in a memory cell). Modules), Multi Level Cell (MLC) NAND flash memory modules (that is, a flash memory module that can store 2 bits in a memory cell), and a third-level memory cell ( Triple Level Cell (TLC) NAND flash memory modules (that is, a flash memory module that can store 3 bits in a memory cell), Quad Level Cell (QLC) NAND flash memory modules Flash memory module (ie, a flash memory module that can store 4 bits in a memory cell), other flash memory modules or other memory modules with the same characteristics.

可複寫式非揮發性記憶體模組406中的每一個記憶胞是以電壓(以下亦稱為臨界電壓)的改變來儲存一或多個位元。具體來說,每一個記憶胞的控制閘極(control gate)與通道之間有一個電荷捕捉層。透過施予一寫入電壓至控制閘極,可以改變電荷補捉層的電子量,進而改變記憶胞的臨界電壓。此改變記憶胞之臨界電壓的操作亦稱為“把資料寫入至記憶胞”或“程式化(programming)記憶胞”。隨著臨界電壓的改變,可複寫式非揮發性記憶體模組406中的每一個記憶胞具有多個儲存狀態。透過施予讀取電壓可以判斷一個記憶胞是屬於哪一個儲存狀態,藉此取得此記憶胞所儲存的一或多個位元。Each memory cell in the rewritable non-volatile memory module 406 stores one or more bits with a change in voltage (hereinafter also referred to as a threshold voltage). Specifically, there is a charge trapping layer between the control gate and the channel of each memory cell. By applying a write voltage to the control gate, the amount of electrons in the charge trapping layer can be changed, thereby changing the threshold voltage of the memory cell. This operation of changing the threshold voltage of the memory cell is also called "writing data to the memory cell" or "programming the memory cell". As the threshold voltage changes, each memory cell in the rewritable non-volatile memory module 406 has multiple storage states. By applying the read voltage, it is possible to determine which storage state a memory cell belongs to, thereby obtaining one or more bits stored in the memory cell.

在本範例實施例中,可複寫式非揮發性記憶體模組406的記憶胞可構成多個實體程式化單元,並且此些實體程式化單元可構成多個實體抹除單元。具體來說,同一條字元線上的記憶胞可組成一或多個實體程式化單元。若每一個記憶胞可儲存2個以上的位元,則同一條字元線上的實體程式化單元可至少可被分類為下實體程式化單元與上實體程式化單元。例如,一記憶胞的最低有效位元(Least Significant Bit,LSB)是屬於下實體程式化單元,並且一記憶胞的最高有效位元(Most Significant Bit,MSB)是屬於上實體程式化單元。一般來說,在MLC NAND型快閃記憶體中,下實體程式化單元的寫入速度會大於上實體程式化單元的寫入速度,及/或下實體程式化單元的可靠度是高於上實體程式化單元的可靠度。In this exemplary embodiment, the memory cells of the rewritable non-volatile memory module 406 can constitute multiple physical programming units, and these physical programming units can constitute multiple physical erasing units. Specifically, the memory cells on the same character line can form one or more physical programming units. If each memory cell can store more than two bits, the physical programming unit on the same character line can be at least classified into a lower physical programming unit and an upper physical programming unit. For example, the Least Significant Bit (LSB) of a memory cell belongs to the lower physical programming unit, and the Most Significant Bit (MSB) of a memory cell belongs to the upper physical programming unit. Generally speaking, in MLC NAND flash memory, the writing speed of the lower physical programming unit is higher than that of the upper physical programming unit, and/or the reliability of the lower physical programming unit is higher than that of the upper physical programming unit. The reliability of the physical programming unit.

在本範例實施例中,實體程式化單元為程式化的最小單元。即,實體程式化單元為寫入資料的最小單元。例如,實體程式化單元可為實體頁面(page)或是實體扇(sector)。若實體程式化單元為實體頁面,則此些實體程式化單元可包括資料位元區與冗餘(redundancy)位元區。資料位元區包含多個實體扇,用以儲存使用者資料,而冗餘位元區用以儲存系統資料(例如,錯誤更正碼等管理資料)。在本範例實施例中,資料位元區包含32個實體扇,且一個實體扇的大小為512位元組(byte, B)。然而,在其他範例實施例中,資料位元區中也可包含8個、16個或數目更多或更少的實體扇,並且每一個實體扇的大小也可以是更大或更小。另一方面,實體抹除單元為抹除之最小單位。亦即,每一實體抹除單元含有最小數目之一併被抹除之記憶胞。例如,實體抹除單元為實體區塊(block)。In this exemplary embodiment, the physical programming unit is the smallest programming unit. That is, the physical programming unit is the smallest unit for writing data. For example, the physical programming unit may be a physical page (page) or a physical sector (sector). If the physical programming unit is a physical page, these physical programming units may include a data bit area and a redundancy bit area. The data bit area contains multiple physical sectors for storing user data, and the redundant bit area is used for storing system data (for example, management data such as error correction codes). In this exemplary embodiment, the data bit area includes 32 physical sectors, and the size of one physical sector is 512 bytes (byte, B). However, in other exemplary embodiments, the data bit area may also include 8, 16, or more or less physical sectors, and the size of each physical sector can also be larger or smaller. On the other hand, the physical erasure unit is the smallest unit of erasure. That is, each physical erasing unit contains one of the smallest number of memory cells to be erased. For example, the physical erasing unit is a physical block.

圖5是根據本發明的一範例實施例所繪示的記憶體控制電路單元的概要方塊圖。請參照圖5,記憶體控制電路單元404包括記憶體管理電路502、主機介面504及記憶體介面506。FIG. 5 is a schematic block diagram of a memory control circuit unit according to an exemplary embodiment of the present invention. 5, the memory control circuit unit 404 includes a memory management circuit 502, a host interface 504, and a memory interface 506.

記憶體管理電路502用以控制記憶體控制電路單元404的整體運作。具體來說,記憶體管理電路502具有多個控制指令,並且在記憶體儲存裝置10運作時,此些控制指令會被執行以進行資料的寫入、讀取與抹除等運作。以下說明記憶體管理電路502的操作時,等同於說明記憶體控制電路單元404的操作。The memory management circuit 502 is used to control the overall operation of the memory control circuit unit 404. Specifically, the memory management circuit 502 has a plurality of control commands, and when the memory storage device 10 is operating, these control commands are executed to perform operations such as writing, reading, and erasing data. The following description of the operation of the memory management circuit 502 is equivalent to the description of the operation of the memory control circuit unit 404.

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

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

此外,在另一範例實施例中,記憶體管理電路502的控制指令亦可以一硬體型式來實作。例如,記憶體管理電路502包括微控制器、記憶胞管理電路、記憶體寫入電路、記憶體讀取電路、記憶體抹除電路與資料處理電路。記憶胞管理電路、記憶體寫入電路、記憶體讀取電路、記憶體抹除電路與資料處理電路是耦接至微控制器。記憶胞管理電路用以管理可複寫式非揮發性記憶體模組406的記憶胞或記憶胞群組。記憶體寫入電路用以對可複寫式非揮發性記憶體模組406下達寫入指令序列以將資料寫入至可複寫式非揮發性記憶體模組406中。記憶體讀取電路用以對可複寫式非揮發性記憶體模組406下達讀取指令序列以從可複寫式非揮發性記憶體模組406中讀取資料。記憶體抹除電路用以對可複寫式非揮發性記憶體模組406下達抹除指令序列以將資料從可複寫式非揮發性記憶體模組406中抹除。資料處理電路用以處理欲寫入至可複寫式非揮發性記憶體模組406的資料以及從可複寫式非揮發性記憶體模組406中讀取的資料。寫入指令序列、讀取指令序列及抹除指令序列可各別包括一或多個程式碼或指令碼並且用以指示可複寫式非揮發性記憶體模組406執行相對應的寫入、讀取及抹除等操作。在一範例實施例中,記憶體管理電路502還可以下達其他類型的指令序列給可複寫式非揮發性記憶體模組406以指示執行相對應的操作。In addition, in another exemplary embodiment, the control commands of the memory management circuit 502 can also be implemented in a hardware type. For example, the memory management circuit 502 includes a microcontroller, a memory cell management circuit, a memory write circuit, a memory read circuit, a memory erase circuit, and a data processing circuit. The memory cell management circuit, the memory writing circuit, the memory reading circuit, the memory erasing circuit and the data processing circuit are coupled to the microcontroller. The memory cell management circuit is used to manage the memory cell or the memory cell group of the rewritable non-volatile memory module 406. The memory write circuit is used to issue a write command sequence to the rewritable non-volatile memory module 406 to write data into the rewritable non-volatile memory module 406. The memory read circuit is used to issue a read command sequence to the rewritable non-volatile memory module 406 to read data from the rewritable non-volatile memory module 406. The memory erase circuit is used to issue an erase command sequence to the rewritable non-volatile memory module 406 to erase data from the rewritable non-volatile memory module 406. The data processing circuit is used to process data to be written to the rewritable non-volatile memory module 406 and data read from the rewritable non-volatile memory module 406. The write command sequence, the read command sequence, and the erase command sequence may each include one or more program codes or command codes and are used to instruct the rewritable non-volatile memory module 406 to perform corresponding writing and reading. Take and erase operations. In an exemplary embodiment, the memory management circuit 502 can also send other types of instruction sequences to the rewritable non-volatile memory module 406 to instruct to perform corresponding operations.

主機介面504是耦接至記憶體管理電路502。記憶體管理電路502可透過主機介面504與主機系統11通訊。主機介面504可用以接收與識別主機系統11所傳送的指令與資料。例如,主機系統11所傳送的指令與資料可透過主機介面504來傳送至記憶體管理電路502。此外,記憶體管理電路502可透過主機介面504將資料傳送至主機系統11。在本範例實施例中,主機介面504是相容於SATA標準。然而,必須瞭解的是本發明不限於此,主機介面504亦可以是相容於PATA標準、IEEE 1394標準、PCI Express標準、USB標準、SD標準、UHS-I標準、UHS-II標準、MS標準、MMC標準、eMMC標準、UFS標準、CF標準、IDE標準或其他適合的資料傳輸標準。The host interface 504 is coupled to the memory management circuit 502. The memory management circuit 502 can communicate with the host system 11 through the host interface 504. The host interface 504 can be used to receive and identify commands and data sent by the host system 11. For example, the commands and data sent by the host system 11 can be sent to the memory management circuit 502 through the host interface 504. In addition, the memory management circuit 502 can transmit data to the host system 11 through the host interface 504. In this exemplary embodiment, the host interface 504 is compatible with the SATA standard. However, it must be understood that the present invention is not limited to this. The host interface 504 can also be compatible with PATA standard, IEEE 1394 standard, PCI Express standard, USB standard, SD standard, UHS-I standard, UHS-II standard, MS standard. , MMC standard, eMMC standard, UFS standard, CF standard, IDE standard or other suitable data transmission standards.

記憶體介面506是耦接至記憶體管理電路502並且用以存取可複寫式非揮發性記憶體模組406。也就是說,欲寫入至可複寫式非揮發性記憶體模組406的資料會經由記憶體介面506轉換為可複寫式非揮發性記憶體模組406所能接受的格式。具體來說,若記憶體管理電路502要存取可複寫式非揮發性記憶體模組406,記憶體介面506會傳送對應的指令序列。例如,這些指令序列可包括指示寫入資料的寫入指令序列、指示讀取資料的讀取指令序列、指示抹除資料的抹除指令序列、以及用以指示各種記憶體操作(例如,改變讀取電壓準位或執行垃圾回收操作等等)的相對應的指令序列。這些指令序列例如是由記憶體管理電路502產生並且透過記憶體介面506傳送至可複寫式非揮發性記憶體模組406。這些指令序列可包括一或多個訊號,或是在匯流排上的資料。這些訊號或資料可包括指令碼或程式碼。例如,在讀取指令序列中,會包括讀取的辨識碼、記憶體位址等資訊。The memory interface 506 is coupled to the memory management circuit 502 and used to access the rewritable non-volatile memory module 406. In other words, the data to be written into the rewritable non-volatile memory module 406 is converted into a format acceptable by the rewritable non-volatile memory module 406 through the memory interface 506. Specifically, if the memory management circuit 502 needs to access the rewritable non-volatile memory module 406, the memory interface 506 will send a corresponding command sequence. For example, these command sequences may include a write command sequence instructing to write data, a read command sequence instructing to read data, an erase command sequence instructing to erase data, and various memory operations (for example, changing read Take the voltage level or perform garbage collection operation, etc.) corresponding to the instruction sequence. These command sequences are generated by the memory management circuit 502 and transmitted to the rewritable non-volatile memory module 406 through the memory interface 506, for example. These command sequences can include one or more signals, or data on the bus. These signals or data may include script or program code. For example, in the read command sequence, information such as the read identification code and memory address will be included.

在一範例實施例中,記憶體控制電路單元404還包括錯誤檢查與校正電路508、緩衝記憶體510與電源管理電路512。In an exemplary embodiment, the memory control circuit unit 404 further includes an error checking and correction circuit 508, a buffer memory 510, and a power management circuit 512.

錯誤檢查與校正電路508是耦接至記憶體管理電路502並且用以執行錯誤檢查與校正操作以確保資料的正確性。具體來說,當記憶體管理電路502從主機系統11中接收到寫入指令時,錯誤檢查與校正電路508會為對應此寫入指令的資料產生對應的錯誤更正碼(error correcting code, ECC)及/或錯誤檢查碼(error detecting code,EDC),並且記憶體管理電路502會將對應此寫入指令的資料與對應的錯誤更正碼及/或錯誤檢查碼寫入至可複寫式非揮發性記憶體模組406中。之後,當記憶體管理電路502從可複寫式非揮發性記憶體模組406中讀取資料時會同時讀取此資料對應的錯誤更正碼及/或錯誤檢查碼,並且錯誤檢查與校正電路508會依據此錯誤更正碼及/或錯誤檢查碼對所讀取的資料執行錯誤檢查與校正操作。The error checking and correction circuit 508 is coupled to the memory management circuit 502 and used to perform error checking and correction operations to ensure the correctness of the data. Specifically, when the memory management circuit 502 receives a write command from the host system 11, the error checking and correction circuit 508 will generate a corresponding error correcting code (ECC) for the data corresponding to the write command. And/or error detecting code (EDC), and the memory management circuit 502 will write the data corresponding to the write command and the corresponding error correction code and/or error check code to the rewritable non-volatile In the memory module 406. Later, when the memory management circuit 502 reads data from the rewritable non-volatile memory module 406, it will also read the error correction code and/or error check code corresponding to the data, and the error check and correction circuit 508 Based on the error correction code and/or error check code, error checking and correction operations are performed on the read data.

緩衝記憶體510是耦接至記憶體管理電路502並且用以暫存來自於主機系統11的資料與指令或來自於可複寫式非揮發性記憶體模組406的資料。電源管理電路512是耦接至記憶體管理電路502並且用以控制記憶體儲存裝置10的電源。The buffer memory 510 is coupled to the memory management circuit 502 and used to temporarily store data and commands from the host system 11 or data from the rewritable non-volatile memory module 406. The power management circuit 512 is coupled to the memory management circuit 502 and used to control the power of the memory storage device 10.

在一範例實施例中,圖4的可複寫式非揮發性記憶體模組406亦稱為快閃(flash)記憶體模組,且記憶體控制電路單元404亦稱為用於控制快閃記憶體模組的快閃記憶體控制器。在一範例實施例中,圖5的記憶體管理電路502亦稱為快閃記憶體管理電路。In an exemplary embodiment, the rewritable non-volatile memory module 406 of FIG. 4 is also called a flash memory module, and the memory control circuit unit 404 is also called for controlling the flash memory The flash memory controller of the physical module. In an exemplary embodiment, the memory management circuit 502 of FIG. 5 is also referred to as a flash memory management circuit.

圖6是根據本發明的一範例實施例所繪示的管理可複寫式非揮發性記憶體模組的示意圖。請參照圖6,記憶體管理電路502可將可複寫式非揮發性記憶體模組406的實體單元610(0)~610(B)邏輯地分組至儲存區601與替換區602。儲存區601中的實體單元610(0)~610(A)是用以儲存資料,而替換區602中的實體單元610(A+1)~610(B)則是用以替換儲存區601中損壞的實體單元。例如,若從某一個實體單元中讀取的資料所包含的錯誤過多而無法被更正時,此實體單元會被視為是損壞的實體單元。須注意的是,若替換區602中沒有可用的實體抹除單元,則記憶體管理電路502可能會將整個記憶體儲存裝置10宣告為寫入保護(write protect)狀態,而無法再寫入資料。FIG. 6 is a schematic diagram of managing a rewritable non-volatile memory module according to an exemplary embodiment of the present invention. Please refer to FIG. 6, the memory management circuit 502 can logically group the physical units 610(0)-610(B) of the rewritable non-volatile memory module 406 into the storage area 601 and the replacement area 602. The physical units 610(0)~610(A) in the storage area 601 are used to store data, and the physical units 610(A+1)~610(B) in the replacement area 602 are used to replace the storage area 601 Damaged physical unit. For example, if the data read from a certain physical unit contains too many errors to be corrected, this physical unit will be regarded as a damaged physical unit. It should be noted that if there is no usable physical erasing unit in the replacement area 602, the memory management circuit 502 may declare the entire memory storage device 10 as a write protect state, and no more data can be written. .

在本範例實施例中,每一個實體單元是指一個實體抹除單元。然而,在另一範例實施例中,一個實體單元亦可以是指一個實體位址、一個實體程式化單元或由多個連續或不連續的實體位址組成。記憶體管理電路502會配置邏輯單元612(0)~612(C)以映射儲存區601中的實體單元610(0)~610(A)。在本範例實施例中,每一個邏輯單元是指一個邏輯位址。然而,在另一範例實施例中,一個邏輯單元也可以是指一個邏輯程式化單元、一個邏輯抹除單元或者由多個連續或不連續的邏輯位址組成。此外,邏輯單元612(0)~612(C)中的每一者可被映射至一或多個實體單元。In this exemplary embodiment, each physical unit refers to a physical erasing unit. However, in another exemplary embodiment, a physical unit may also refer to a physical address, a physical programming unit, or consist of multiple continuous or discontinuous physical addresses. The memory management circuit 502 will configure the logical units 612(0)~612(C) to map the physical units 610(0)~610(A) in the storage area 601. In this exemplary embodiment, each logical unit refers to a logical address. However, in another exemplary embodiment, a logic unit may also refer to a logic programming unit, a logic erasing unit, or composed of multiple consecutive or discontinuous logic addresses. In addition, each of the logical units 612(0)-612(C) can be mapped to one or more physical units.

記憶體管理電路502可將邏輯單元與實體單元之間的映射關係(亦稱為邏輯-實體位址映射關係)記錄於至少一邏輯-實體位址映射表。當主機系統11欲從記憶體儲存裝置10讀取資料或寫入資料至記憶體儲存裝置10時,記憶體管理電路502可根據此邏輯-實體位址映射表來執行對於記憶體儲存裝置10的資料存取操作。The memory management circuit 502 can record the mapping relationship between the logical unit and the physical unit (also referred to as the logical-physical address mapping relationship) in at least one logical-physical address mapping table. When the host system 11 wants to read data from the memory storage device 10 or write data to the memory storage device 10, the memory management circuit 502 can perform the processing of the memory storage device 10 according to the logical-physical address mapping table. Data access operations.

圖7是根據本發明的一範例實施例所繪示的資料儲存操作的示意圖。請參照圖7,假設記憶體管理電路502從主機系統11接收到指示儲存資料(亦稱為目標資料)701的至少一寫入指令。記憶體管理電路502可將此寫入指令與資料701暫存於緩衝記憶體510。記憶體管理電路502可從緩衝記憶體510中讀取臨界資訊。記憶體管理電路502可根據此臨界資訊決定資料701的類型。FIG. 7 is a schematic diagram of a data storage operation according to an exemplary embodiment of the present invention. Referring to FIG. 7, it is assumed that the memory management circuit 502 receives from the host system 11 at least one write command instructing to store data (also referred to as target data) 701. The memory management circuit 502 can temporarily store the write command and data 701 in the buffer memory 510. The memory management circuit 502 can read the critical information from the buffer memory 510. The memory management circuit 502 can determine the type of the data 701 according to the critical information.

在一範例實施例中,記憶體管理電路502可根據此臨界資訊判斷資料701為第一類資料或第二類資料。若資料701為第一類資料,記憶體管理電路502可發送至少一寫入指令序列(亦稱為第一寫入指令序列)以指示可複寫式非揮發性記憶體模組406將緩衝記憶體510中的資料701儲存至實體單元(亦稱為第一實體單元)710。或者,若資料701為第二類資料,則記憶體管理電路502可發送至少一寫入指令序列(亦稱為第二寫入指令序列)以指示可複寫式非揮發性記憶體模組406將資料701儲存至實體單元(亦稱為第二實體單元)720。須注意的是,實體單元710與720為不同的兩個實體單元。例如,圖6的儲存區601中可包含多個閒置實體單元。每一個閒置實體單元皆未儲存有效資料。例如,在抹除某一個實體單元後,被抹除的實體單元可成為一個新的閒置實體單元。實體單元710與720可從此些閒置實體單元中進行選取。In an exemplary embodiment, the memory management circuit 502 can determine whether the data 701 is the first type of data or the second type of data based on the critical information. If the data 701 is the first type of data, the memory management circuit 502 can send at least one write command sequence (also referred to as the first write command sequence) to instruct the rewritable non-volatile memory module 406 to buffer the memory The data 701 in 510 is stored in a physical unit (also referred to as a first physical unit) 710. Or, if the data 701 is the second type of data, the memory management circuit 502 can send at least one write command sequence (also called a second write command sequence) to instruct the rewritable non-volatile memory module 406 to The data 701 is stored in a physical unit (also referred to as a second physical unit) 720. It should be noted that the physical units 710 and 720 are two different physical units. For example, the storage area 601 in FIG. 6 may include multiple idle physical units. Each idle physical unit has not stored valid data. For example, after a certain physical unit is erased, the erased physical unit can become a new idle physical unit. The physical units 710 and 720 can be selected from these idle physical units.

在一範例實施例中,不同類型的資料具有不同的資料更新頻率。例如,第一類資料的資料更新頻率可高於第二類資料的資料更新頻率。因此,若資料701屬於第一類資料,表示資料701所屬的邏輯單元的資料更新頻率可能較高(例如高於一門檻值)。反之,若資料701屬於第二類資料,則表示資料701所屬的邏輯單元的資料更新頻率可能較低(例如低於一門檻值)。記憶體管理電路502可將第一類資料(即更新頻率較高的資料,亦稱為熱資料)集中儲存於實體單元710並將第二類資料(即更新頻率較低的資料,亦稱為冷資料)集中儲存於實體單元720。In an exemplary embodiment, different types of data have different data update frequencies. For example, the data update frequency of the first type of data may be higher than the data update frequency of the second type of data. Therefore, if the data 701 belongs to the first type of data, it means that the data update frequency of the logical unit to which the data 701 belongs may be higher (for example, higher than a threshold value). Conversely, if the data 701 belongs to the second type of data, it means that the data update frequency of the logical unit to which the data 701 belongs may be low (for example, lower than a threshold). The memory management circuit 502 can store the first type of data (that is, data with a higher update frequency, also called thermal data) in the physical unit 710 and store the second type of data (that is, the data with a lower update frequency, also called The cold data) is stored centrally in the physical unit 720.

在一範例實施例中,記憶體管理電路502可執行資料整併操作(例如垃圾回收操作)以釋放新的閒置實體單元。釋放新的閒置實體單元之操作包含將有效資料從選定的實體單元(亦稱為來源節點)中移除以及抹除此實體單元。在圖7的範例實施例中,更新頻率較高的第一類資料是集中儲存於實體單元710,故實體單元710中的資料很容易在經過多次寫入操作後即變成無效資料,從而減少實體單元710中有效資料的資料量。因此,在後續執行的資料整併操作中,若優先選擇實體單元710作為來源節點並從中收集有效資料,則可有效提高閒置實體單元的釋放效率。In an exemplary embodiment, the memory management circuit 502 can perform a data consolidation operation (such as a garbage collection operation) to release new idle physical units. The operation of releasing a new idle physical unit includes removing valid data from the selected physical unit (also referred to as the source node) and erasing the physical unit. In the exemplary embodiment of FIG. 7, the first type of data with a higher update frequency is stored centrally in the physical unit 710, so the data in the physical unit 710 can easily become invalid data after multiple write operations, thereby reducing The amount of valid data in the physical unit 710. Therefore, in the subsequent data merging operation, if the physical unit 710 is preferentially selected as the source node and effective data is collected from it, the release efficiency of idle physical units can be effectively improved.

在一範例實施例中,記憶體管理電路502可將資料701的資料量與臨界資訊進行比較。若資料701的資料量小於此臨界資訊,記憶體管理電路502可判定資料701為第一類資料。或者,若資料701的資料量大於(或不小於)此臨界資訊,則記憶體管理電路502可判定資料701為第二類資料。In an exemplary embodiment, the memory management circuit 502 can compare the data amount of the data 701 with the critical information. If the data amount of the data 701 is less than the threshold information, the memory management circuit 502 can determine that the data 701 is the first type of data. Or, if the data amount of the data 701 is greater than (or not less than) the critical information, the memory management circuit 502 can determine that the data 701 is the second type of data.

圖8是根據本發明的一範例實施例所繪示的比較目標資料之資料量與臨界資訊的示意圖。請參照圖8,在一範例實施例中,假設資料801的資料量小於臨界資訊THR,則資料801可被識別為第一類資料。或者,在一範例實施例中,假設資料802的資料量不小於臨界資訊THR,則資料802可被識別為第二類資料。臨界資訊THR的數值可例如為4KB、8KB、16KB或其他數值。FIG. 8 is a schematic diagram illustrating the data amount and critical information of the comparison target data according to an exemplary embodiment of the present invention. Referring to FIG. 8, in an exemplary embodiment, assuming that the data amount of the data 801 is less than the threshold information THR, the data 801 can be identified as the first type of data. Alternatively, in an exemplary embodiment, assuming that the data amount of the data 802 is not less than the threshold information THR, the data 802 can be identified as the second type of data. The value of the threshold information THR may be 4KB, 8KB, 16KB or other values, for example.

須注意的是,在圖7的另一範例實施例中,記憶體管理電路502也可將資料701的邏輯範圍(即資料701所屬的至少一個邏輯單元的邏輯位址之範圍)與此臨界資訊進行比較。若資料701的邏輯範圍小於此臨界資訊,記憶體管理電路502可判定資料701屬於第一類資料(即熱資料)。或者,若資料701的邏輯範圍不小於此臨界資訊,記憶體管理電路502可判定資料701屬於第二類資料(即冷資料)。It should be noted that in another exemplary embodiment of FIG. 7, the memory management circuit 502 may also combine the logical range of the data 701 (that is, the range of the logical address of at least one logical unit to which the data 701 belongs) and the critical information Compare. If the logical range of the data 701 is smaller than the critical information, the memory management circuit 502 can determine that the data 701 belongs to the first type of data (ie, thermal data). Or, if the logical range of the data 701 is not less than the critical information, the memory management circuit 502 can determine that the data 701 belongs to the second type of data (ie, cold data).

須注意的是,在一範例實施例中,用於決定目標資料之類型的臨界資訊可能是一個定值。然而,對於不同型號及/或不同操作行為的記憶體儲存裝置來說,相同的臨界資訊對於目標資料之類型的識別的準確度可能不同。因此,若可在記憶體儲存裝置運作過程中動態地對臨界資訊的數值進行校正及/或最佳化,則可針對不同型號及/或不同操作行為的記憶體儲存裝置提供客製化的臨界資訊,進而提高對於目標資料之類型的識別效率。若對於目標資料之類型的識別效率提高,則後續對於記憶體儲存裝置的自動化管理之效能也可被提高。It should be noted that, in an exemplary embodiment, the critical information used to determine the type of target data may be a fixed value. However, for memory storage devices of different models and/or different operating behaviors, the same critical information may have different accuracy in identifying the type of target data. Therefore, if the value of the threshold information can be dynamically calibrated and/or optimized during the operation of the memory storage device, then customized thresholds can be provided for memory storage devices of different models and/or different operating behaviors. Information, thereby improving the efficiency of identifying the type of target data. If the identification efficiency of the target data type is improved, the subsequent automatic management of the memory storage device can also be improved.

在一範例實施例中,記憶體管理電路502可從主機系統11接收至少一寫入指令(亦稱為第一寫入指令)。第一寫入指令可指示將某一資料(亦稱為第一資料)儲存至至少一邏輯單元(亦稱為第一邏輯單元)。根據第一寫入指令,記憶體管理電路502可指示可複寫式非揮發性記憶體模組406執行某一寫入操作(亦稱為第一寫入操作)。在第一寫入操作中,可複寫式非揮發性記憶體模組406可將第一資料儲存至第一邏輯單元所映射的一或多個實體單元。在執行第一寫入操作後,記憶體管理電路502可獲得對應於第一寫入操作的效能資訊(亦稱為第一效能資訊)。第一效能資訊可反映第一寫入操作的執行效能。或者,記憶體管理電路502可藉由第一效能資訊評估第一寫入操作的效能。然後,記憶體管理電路502可根據第一效能資訊更新所述臨界資訊。In an exemplary embodiment, the memory management circuit 502 can receive at least one write command (also referred to as a first write command) from the host system 11. The first write command can instruct to store a certain data (also referred to as the first data) to at least one logical unit (also referred to as the first logical unit). According to the first write command, the memory management circuit 502 can instruct the rewritable non-volatile memory module 406 to perform a certain write operation (also referred to as the first write operation). In the first write operation, the rewritable non-volatile memory module 406 can store the first data in one or more physical units mapped by the first logical unit. After the first write operation is performed, the memory management circuit 502 can obtain performance information (also referred to as first performance information) corresponding to the first write operation. The first performance information can reflect the execution performance of the first write operation. Alternatively, the memory management circuit 502 can evaluate the performance of the first write operation based on the first performance information. Then, the memory management circuit 502 can update the threshold information according to the first performance information.

在一範例實施例中,第一效能資訊包括一個寫入放大參數(亦稱為第一寫入放大參數)。第一寫入放大參數可反映第一寫入操作引起的寫入放大比例。例如,假設第一資料的資料量為16KB,且在執行第一寫入操作之期間,第一寫入操作總共寫入了48KB的資料。也就是說,在用於儲存第一資料的第一資料寫入操作中,寫入的資料之資料量被放大了3倍(48/16=3)。例如,這48KB的資料可能包含至少一次的資料搬移及/或管理資訊之更新。例如,資料搬移可包含將第一資料從可複寫式非揮發性記憶體模組406中的暫存區搬移至主儲存區及/或可複寫式非揮發性記憶體模組406中部分有效資料之搬移。管理資訊之更新可包含邏輯-實體位址映射關係之更新等等。此外,此第一寫入放大參數的數值可負相關於第一寫入操作的執行效能。亦即,若第一寫入放大參數的數值越大,則表示第一寫入操作的執行效能越差。In an exemplary embodiment, the first performance information includes a write amplification parameter (also referred to as the first write amplification parameter). The first write amplification parameter may reflect the write amplification ratio caused by the first write operation. For example, suppose that the data volume of the first data is 16KB, and during the first write operation, the first write operation writes a total of 48KB of data. That is, in the first data writing operation for storing the first data, the data volume of the written data is enlarged by 3 times (48/16=3). For example, the 48KB of data may include at least one data movement and/or management information update. For example, data transfer may include moving the first data from the temporary storage area in the rewritable non-volatile memory module 406 to the main storage area and/or part of the valid data in the rewritable non-volatile memory module 406 The move. The update of the management information may include the update of the logical-physical address mapping relationship, etc. In addition, the value of the first write amplification parameter may negatively correlate with the performance of the first write operation. That is, if the value of the first write amplification parameter is larger, it means that the performance of the first write operation is worse.

在一範例實施例中,記憶體管理電路502可獲得第一效能資訊與另一效能資訊(亦稱為第二效能資訊)之間的差值。記憶體管理電路502可根據此差值更新所述臨界資訊。例如,記憶體管理電路502可判斷此差值是否符合預設條件。若此差值符合預設條件,記憶體管理電路502可提高所述臨界資訊之數值。或者,若此差值不符合預設條件,記憶體管理電路502可降低所述臨界資訊之數值。In an exemplary embodiment, the memory management circuit 502 can obtain the difference between the first performance information and another performance information (also referred to as second performance information). The memory management circuit 502 can update the critical information according to the difference. For example, the memory management circuit 502 can determine whether the difference meets a preset condition. If the difference meets the preset condition, the memory management circuit 502 can increase the value of the critical information. Or, if the difference does not meet the preset condition, the memory management circuit 502 can reduce the value of the critical information.

在一範例實施例中,記憶體管理電路502可判斷此差值是否小於零。若此差值小於零,記憶體管理電路502可判定此差值符合預設條件並提高所述臨界資訊之數值。或者,若此差值不小於零(例如大於零),則記憶體管理電路502可判定此差值不符合預設條件並降低所述臨界資訊之數值。In an exemplary embodiment, the memory management circuit 502 can determine whether the difference is less than zero. If the difference is less than zero, the memory management circuit 502 can determine that the difference meets a preset condition and increase the value of the critical information. Alternatively, if the difference is not less than zero (for example, greater than zero), the memory management circuit 502 can determine that the difference does not meet the preset condition and reduce the value of the critical information.

在一範例實施例中,記憶體管理電路502可從主機系統11接收至少一寫入指令(亦稱為第二寫入指令)。第二寫入指令可例如指示將某一資料(亦稱為第二資料)儲存至至少一邏輯單元(亦稱為第二邏輯單元)。根據第二寫入指令,記憶體管理電路502可指示可複寫式非揮發性記憶體模組406執行某一寫入操作(亦稱為第二寫入操作)。在第二寫入操作中,可複寫式非揮發性記憶體模組406可將第二資料儲存至第二邏輯單元所映射的一或多個實體單元。在執行第二寫入操作後,記憶體管理電路502可獲得對應於第二寫入操作的效能資訊(即第二效能資訊)。第二效能資訊可反映第二寫入操作的執行效能。或者,記憶體管理電路502可藉由第二效能資訊評估第二寫入操作的效能。然後,記憶體管理電路502可根據第一效能資訊與第二效能資訊更新所述臨界資訊。In an exemplary embodiment, the memory management circuit 502 can receive at least one write command (also referred to as a second write command) from the host system 11. The second write command can, for example, instruct to store a certain data (also referred to as the second data) to at least one logical unit (also referred to as the second logical unit). According to the second write command, the memory management circuit 502 can instruct the rewritable non-volatile memory module 406 to perform a certain write operation (also referred to as a second write operation). In the second write operation, the rewritable non-volatile memory module 406 can store the second data in one or more physical units mapped by the second logical unit. After the second write operation is performed, the memory management circuit 502 can obtain performance information (ie, second performance information) corresponding to the second write operation. The second performance information can reflect the execution performance of the second write operation. Alternatively, the memory management circuit 502 can evaluate the performance of the second write operation based on the second performance information. Then, the memory management circuit 502 can update the threshold information according to the first performance information and the second performance information.

在一範例實施例中,第二效能資訊也包括一個寫入放大參數(亦稱為第二寫入放大參數)。第二寫入放大參數可反映第二寫入操作引起的寫入放大比例。例如,假設第二資料的資料量為128KB,且在執行第二寫入操作之期間,第二寫入操作總共寫入了1024KB的資料。也就是說,在用於儲存第二資料的第二資料寫入操作中,寫入的資料之資料量被放大了8倍(1024/128=8)。例如,這1024KB的資料也可能包含至少一次的資料搬移及/或管理資訊之更新,在此不重複贅述。In an exemplary embodiment, the second performance information also includes a write amplification parameter (also referred to as a second write amplification parameter). The second write amplification parameter may reflect the write amplification ratio caused by the second write operation. For example, suppose that the data volume of the second data is 128KB, and during the second write operation, the second write operation writes a total of 1024KB of data. That is, in the second data writing operation for storing the second data, the data volume of the written data is enlarged by 8 times (1024/128=8). For example, the 1024KB data may also include at least one data movement and/or management information update, which will not be repeated here.

須注意的是,雖然前述範例實施例皆是以寫入放大參數作為效能資訊之範例,然而,本發明並不限制反映寫入操作之效能的效能資訊之類型。例如,在另一範例實施例中,效能資訊還可以包括其他類型的參數,以反映用於執行某一寫入操作所需的時間長度等等。It should be noted that although the foregoing exemplary embodiments are all examples of writing amplification parameters as performance information, the present invention does not limit the type of performance information that reflects the performance of the writing operation. For example, in another exemplary embodiment, the performance information may also include other types of parameters to reflect the length of time required to perform a certain write operation, and so on.

圖9是根據本發明的一範例實施例所繪示的在不同時間點獲得效能資訊的示意圖。圖10是根據本發明的一範例實施例所繪示的用於更新臨界資訊的虛擬碼(pseudo code)的示意圖。FIG. 9 is a schematic diagram of obtaining performance information at different time points according to an exemplary embodiment of the present invention. 10 is a schematic diagram of a pseudo code for updating critical information according to an exemplary embodiment of the present invention.

請參照圖9與圖10,假設臨界資訊THR的初始值為S。效能資訊WAF(i)在時間點T(i)獲得,且i介於0與n+1之間。在時間點T(0),臨界資訊THR被增加一個調整值ΔS。在時間點T(0)與T(1)之間,效能資訊WAF(0)可視為第一效能資訊且效能資訊WAF(1)可視為第二效能資訊。效能資訊WAF(0)可反映在時間點T(0)之前的第一寫入操作的效能。效能資訊WAF(1)可反映在時間點T(0)與T(1)之間的第二寫入操作的效能。效能資訊WAF(0)與WAF(1)之間的差值F(0)可藉由將效能資訊WAF(1)減去WAF(0)而獲得。根據差值F(0),臨界資訊THR可以被更新。例如,根據虛擬碼1001,若差值F(0)小於零,則臨界資訊THR可被增加一個調整值ΔS。或者,若差值F(0)大於零,則臨界資訊THR可被減少一個調整值ΔS。Please refer to FIG. 9 and FIG. 10, assuming that the initial value of the threshold information THR is S. The performance information WAF(i) is obtained at time T(i), and i is between 0 and n+1. At time T(0), the threshold information THR is increased by an adjustment value ΔS. Between time points T(0) and T(1), the performance information WAF(0) can be regarded as the first performance information and the performance information WAF(1) can be regarded as the second performance information. The performance information WAF(0) can reflect the performance of the first write operation before the time point T(0). The performance information WAF(1) can reflect the performance of the second write operation between the time points T(0) and T(1). The difference F(0) between the performance information WAF(0) and WAF(1) can be obtained by subtracting WAF(0) from the performance information WAF(1). According to the difference F(0), the threshold information THR can be updated. For example, according to the virtual code 1001, if the difference F(0) is less than zero, the threshold information THR can be increased by an adjustment value ΔS. Alternatively, if the difference F(0) is greater than zero, the threshold information THR can be reduced by an adjustment value ΔS.

接著,在時間點T(1)與T(2)之間,效能資訊WAF(1)可視為第一效能資訊且效能資訊WAF(2)可視為第二效能資訊。效能資訊WAF(1)可反映在時間點T(0)與T(1)之間的第一寫入操作的效能。效能資訊WAF(2)可反映在時間點T(1)與T(2)之間的第二寫入操作的效能。效能資訊WAF(1)與WAF(2)之間的差值F(1)可藉由將效能資訊WAF(2)減去WAF(1)而獲得。根據差值F(1),臨界資訊THR可再次被更新。例如,根據虛擬碼1001,若差值F(1)小於零,則臨界資訊THR可被增加一個調整值ΔS。或者,若差值F(1)大於零,則臨界資訊THR可被減少一個調整值ΔS。依此類推,在到達時間點T(n+1)後,臨界資訊THR可被更新n次。Then, between the time points T(1) and T(2), the performance information WAF(1) can be regarded as the first performance information and the performance information WAF(2) can be regarded as the second performance information. The performance information WAF(1) can reflect the performance of the first write operation between the time points T(0) and T(1). The performance information WAF(2) can reflect the performance of the second write operation between the time points T(1) and T(2). The difference F(1) between the performance information WAF(1) and WAF(2) can be obtained by subtracting WAF(1) from the performance information WAF(2). According to the difference F(1), the threshold information THR can be updated again. For example, according to the virtual code 1001, if the difference F(1) is less than zero, the threshold information THR can be increased by an adjustment value ΔS. Alternatively, if the difference F(1) is greater than zero, the threshold information THR can be reduced by an adjustment value ΔS. By analogy, after reaching the time point T(n+1), the critical information THR can be updated n times.

在一範例實施例中,若於時間點T(i)所獲得的效能資訊WAF(i)趨近於一個定值,則表示使用當前的臨界資訊THR來識別目標資料的類型可以讓相應的寫入操作之效能趨於穩定。在此情況下,當前的臨界資訊THR可以被固定並且不再更新。從另一角度來看,若於時間點T(i)所獲得的效能資訊WAF(i)趨近於一個定值,亦可表示當前的臨界資訊THR已被更新為最佳數值。在此情況下,記憶體儲存裝置的整體性能(包含資料寫入操作及/或資料整併操作)皆可被維持於較佳狀態。此外,當效能資訊WAF(i)再次發散時,臨界資訊THR亦可再次更新。In an exemplary embodiment, if the performance information WAF(i) obtained at the time point T(i) approaches a constant value, it means that using the current threshold information THR to identify the type of target data can allow the corresponding write The performance of the entry operation tends to be stable. In this case, the current threshold information THR can be fixed and no longer updated. From another perspective, if the performance information WAF(i) obtained at the time point T(i) approaches a fixed value, it can also indicate that the current threshold information THR has been updated to the optimal value. In this case, the overall performance of the memory storage device (including data writing operations and/or data merging operations) can be maintained in a better state. In addition, when the performance information WAF(i) diverges again, the threshold information THR can also be updated again.

圖11是根據本發明的一範例實施例所繪示的記憶體管理方法的流程圖。請參照圖11,在步驟S1101中,從主機系統接收第一寫入指令。在步驟S1102中,根據第一寫入指令指示可複寫式非揮發性記憶體模組執行第一寫入操作。在步驟S1103中,獲得對應於第一寫入操作的第一效能資訊。在步驟S1104中,根據第一效能資訊更新臨界資訊,其中所述臨界資訊用以決定目標資料之類型。FIG. 11 is a flowchart of a memory management method according to an exemplary embodiment of the present invention. Referring to FIG. 11, in step S1101, a first write command is received from the host system. In step S1102, the rewritable non-volatile memory module is instructed to perform the first write operation according to the first write command. In step S1103, first performance information corresponding to the first write operation is obtained. In step S1104, the critical information is updated according to the first performance information, where the critical information is used to determine the type of target data.

圖12是根據本發明的一範例實施例所繪示的記憶體管理方法的流程圖。請參照圖12,在步驟S1201中,從主機系統接收第一寫入指令。在步驟S1202中,根據第一寫入指令指示可複寫式非揮發性記憶體模組執行第一寫入操作。在步驟S1203中,獲得對應於第一寫入操作的第一效能資訊。在步驟S1204中,從主機系統接收第二寫入指令。在步驟S1205中,根據第二寫入指令指示可複寫式非揮發性記憶體模組執行第二寫入操作。在步驟S1206中,獲得對應於第二寫入操作的第二效能資訊。在步驟S1207中,根據第一效能資訊與第二效能資訊更新臨界資訊,其中所述臨界資訊用以決定目標資料之類型。FIG. 12 is a flowchart of a memory management method according to an exemplary embodiment of the present invention. Referring to FIG. 12, in step S1201, a first write command is received from the host system. In step S1202, the rewritable non-volatile memory module is instructed to perform the first write operation according to the first write command. In step S1203, first performance information corresponding to the first write operation is obtained. In step S1204, a second write command is received from the host system. In step S1205, the rewritable non-volatile memory module is instructed to perform a second write operation according to the second write command. In step S1206, second performance information corresponding to the second write operation is obtained. In step S1207, the critical information is updated according to the first performance information and the second performance information, where the critical information is used to determine the type of target data.

圖13是根據本發明的一範例實施例所繪示的記憶體管理方法的流程圖。請參照圖13,在步驟S1301中,獲得目標資料。在步驟S1302中,將目標資料的資料量與臨界資訊進行比較。在步驟S1303中,判斷目標資料的資料量是否小於臨界資訊。若目標資料的資料量小於臨界資訊,在步驟S1304中,判定目標資料為第一類資料,並且在步驟S1305中,將目標資料儲存至第一實體單元。然而,若目標資料的資料量不小於臨界資訊,則在步驟S1306中,判定目標資料為第二類資料,並且在步驟S1307中,將目標資料儲存至第二實體單元。FIG. 13 is a flowchart of a memory management method according to an exemplary embodiment of the present invention. Referring to FIG. 13, in step S1301, target data is obtained. In step S1302, the data amount of the target data is compared with the critical information. In step S1303, it is determined whether the data amount of the target data is less than the critical information. If the data amount of the target data is less than the critical information, in step S1304, it is determined that the target data is the first type of data, and in step S1305, the target data is stored in the first physical unit. However, if the data amount of the target data is not less than the critical information, in step S1306, it is determined that the target data is the second type of data, and in step S1307, the target data is stored in the second physical unit.

須注意的是,在圖13的範例實施例中,步驟S1302亦可以修改為將目標資料的邏輯範圍與臨界資訊進行比較。若步驟S1303判斷目標資料的邏輯範圍小於臨界資訊,可進入步驟S1304。此外,若步驟S1303判斷目標資料的邏輯範圍不小於臨界資訊,則可進入步驟S1306。It should be noted that in the exemplary embodiment of FIG. 13, step S1302 can also be modified to compare the logical range of the target data with the critical information. If step S1303 determines that the logical range of the target data is smaller than the critical information, step S1304 can be entered. In addition, if it is determined in step S1303 that the logical range of the target data is not less than the critical information, step S1306 can be entered.

然而,圖11至圖13中各步驟已詳細說明如上,在此便不再贅述。值得注意的是,圖11至圖13中各步驟可以實作為多個程式碼或是電路,本發明不加以限制。此外,圖11至圖13的方法可以搭配以上範例實施例使用,也可以單獨使用,本發明不加以限制。However, each step in FIG. 11 to FIG. 13 has been described in detail as above, and will not be repeated here. It should be noted that each step in FIG. 11 to FIG. 13 can be implemented as multiple program codes or circuits, and the present invention is not limited. In addition, the methods in FIGS. 11 to 13 can be used in conjunction with the above exemplary embodiments, or can be used alone, and the present invention is not limited.

綜上所述,在不同時間點,對應於多個寫入操作的效能資訊可被獲得。根據所獲得的效能資訊,臨界資訊可被更新並用以決定目標資料的類型。藉此,可有效提高對於記憶體儲存裝置中的資料分類效率及/或提高記憶體儲存裝置的整體效能。In summary, at different time points, performance information corresponding to multiple write operations can be obtained. Based on the obtained performance information, the critical information can be updated and used to determine the type of target data. In this way, the efficiency of data classification in the memory storage device can be effectively improved and/or the overall performance of the memory storage device can be improved.

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

10、30:記憶體儲存裝置 11、31:主機系統 110:系統匯流排 111:處理器 112:隨機存取記憶體 113:唯讀記憶體 114:資料傳輸介面 12:輸入/輸出(I/O)裝置 20:主機板 201:隨身碟 202:記憶卡 203:固態硬碟 204:無線記憶體儲存裝置 205:全球定位系統模組 206:網路介面卡 207:無線傳輸裝置 208:鍵盤 209:螢幕 210:喇叭 32:SD卡 33:CF卡 34:嵌入式儲存裝置 341:嵌入式多媒體卡 342:嵌入式多晶片封裝儲存裝置 402:連接介面單元 404:記憶體控制電路單元 406:可複寫式非揮發性記憶體模組 502:記憶體管理電路 504:主機介面 506:記憶體介面 508:錯誤檢查與校正電路 510:緩衝記憶體 512:電源管理電路 601:儲存區 602:替換區 610(0)~610(B)、710、720:實體單元 612(0)~612(C):邏輯單元 701、801、802:資料 THR:臨界資訊 WAF(0)~WAF(n+1):效能資訊 F(0)~F(n):差值 T(0)~T(n+1):時間點 1001:虛擬碼 S1101:步驟(從主機系統接收第一寫入指令) S1102:步驟(根據第一寫入指令指示可複寫式非揮發性記憶體模組執行第一寫入操作) S1103:步驟(獲得對應於第一寫入操作的第一效能資訊) S1104:步驟(根據第一效能資訊更新臨界資訊,其中所述臨界資訊用以決定目標資料之類型) S1201:步驟(從主機系統接收第一寫入指令) S1202:步驟(根據第一寫入指令指示可複寫式非揮發性記憶體模組執行第一寫入操作) S1203:步驟(獲得對應於第一寫入操作的第一效能資訊) S1204:步驟(從主機系統接收第二寫入指令) S1205:步驟(根據第二寫入指令指示可複寫式非揮發性記憶體模組執行第二寫入操作) S1206:步驟(獲得對應於第二寫入操作的第二效能資訊) S1207:步驟(根據第一效能資訊與第二效能資訊更新臨界資訊) S1301:步驟(獲得目標資料) S1302:步驟(將目標資料的資料量與臨界資訊進行比較) S1303:步驟(判斷目標資料的資料量是否小於臨界資訊) S1304:步驟(判定目標資料為第一類資料) S1305:步驟(將目標資料儲存至第一實體單元) S1306:步驟(判定目標資料為第二類資料) S1307:步驟(將目標資料儲存至第二實體單元) 10.30: Memory storage device 11.31: Host system 110: system bus 111: processor 112: Random Access Memory 113: read-only memory 114: Data Transmission Interface 12: Input/output (I/O) device 20: Motherboard 201: flash drive 202: Memory Card 203: Solid State Drive 204: wireless memory storage device 205: Global Positioning System Module 206: network interface card 207: wireless transmission device 208: keyboard 209: Screen 210: Horn 32: SD card 33: CF card 34: Embedded storage device 341: Embedded Multimedia Card 342: Embedded multi-chip package storage device 402: connection interface unit 404: Memory control circuit unit 406: rewritable non-volatile memory module 502: Memory Management Circuit 504: Host Interface 506: Memory Interface 508: Error checking and correction circuit 510: buffer memory 512: power management circuit 601: storage area 602: replacement area 610(0)~610(B), 710, 720: physical unit 612(0)~612(C): logic unit 701, 801, 802: data THR: critical information WAF(0)~WAF(n+1): performance information F(0)~F(n): Difference T(0)~T(n+1): time point 1001: virtual code S1101: Step (receive the first write command from the host system) S1102: Step (instruct the rewritable non-volatile memory module to execute the first write operation according to the first write command) S1103: Step (obtain first performance information corresponding to the first write operation) S1104: Step (update critical information according to the first performance information, where the critical information is used to determine the type of target data) S1201: Step (receive the first write command from the host system) S1202: Step (instruct the rewritable non-volatile memory module to perform the first write operation according to the first write command) S1203: Step (obtain first performance information corresponding to the first write operation) S1204: Step (receive the second write command from the host system) S1205: Step (instruct the rewritable non-volatile memory module to execute the second write operation according to the second write command) S1206: Step (obtain second performance information corresponding to the second write operation) S1207: Step (Update critical information based on the first performance information and the second performance information) S1301: Steps (obtain target data) S1302: Step (compare the data volume of the target data with the critical information) S1303: Step (determine whether the data volume of the target data is less than the critical information) S1304: Steps (determine that the target data is the first type of data) S1305: Step (store target data in the first physical unit) S1306: Steps (determine that the target data is the second type of data) S1307: Step (Save the target data to the second physical unit)

圖1是根據本發明的一範例實施例所繪示的主機系統、記憶體儲存裝置及輸入/輸出(I/O)裝置的示意圖。 圖2是根據本發明的另一範例實施例所繪示的主機系統、記憶體儲存裝置及I/O裝置的示意圖。 圖3是根據本發明的另一範例實施例所繪示的主機系統與記憶體儲存裝置的示意圖。 圖4是根據本發明的一範例實施例所繪示的記憶體儲存裝置的概要方塊圖。 圖5是根據本發明的一範例實施例所繪示的記憶體控制電路單元的概要方塊圖。 圖6是根據本發明的一範例實施例所繪示的管理可複寫式非揮發性記憶體模組的示意圖。 圖7是根據本發明的一範例實施例所繪示的資料儲存操作的示意圖。 圖8是根據本發明的一範例實施例所繪示的比較目標資料之資料量與臨界資訊的示意圖。 圖9是根據本發明的一範例實施例所繪示的在不同時間點獲得效能資訊的示意圖。 圖10是根據本發明的一範例實施例所繪示的用於更新臨界資訊的虛擬碼(pseudo code)的示意圖。 圖11是根據本發明的一範例實施例所繪示的記憶體管理方法的流程圖。 圖12是根據本發明的一範例實施例所繪示的記憶體管理方法的流程圖。 圖13是根據本發明的一範例實施例所繪示的記憶體管理方法的流程圖。 FIG. 1 is a schematic diagram of a host system, a memory storage device, and an input/output (I/O) device according to an exemplary embodiment of the present invention. 2 is a schematic diagram of a host system, a memory storage device, and an I/O device according to another exemplary embodiment of the invention. 3 is a schematic diagram of a host system and a memory storage device according to another exemplary embodiment of the invention. FIG. 4 is a schematic block diagram of a memory storage device according to an exemplary embodiment of the present invention. FIG. 5 is a schematic block diagram of a memory control circuit unit according to an exemplary embodiment of the present invention. FIG. 6 is a schematic diagram of managing a rewritable non-volatile memory module according to an exemplary embodiment of the present invention. FIG. 7 is a schematic diagram of a data storage operation according to an exemplary embodiment of the present invention. FIG. 8 is a schematic diagram illustrating the data amount and critical information of the comparison target data according to an exemplary embodiment of the present invention. FIG. 9 is a schematic diagram of obtaining performance information at different time points according to an exemplary embodiment of the present invention. 10 is a schematic diagram of a pseudo code for updating critical information according to an exemplary embodiment of the present invention. FIG. 11 is a flowchart of a memory management method according to an exemplary embodiment of the present invention. FIG. 12 is a flowchart of a memory management method according to an exemplary embodiment of the present invention. FIG. 13 is a flowchart of a memory management method according to an exemplary embodiment of the present invention.

S1101:步驟(從主機系統接收第一寫入指令) S1101: Step (receive the first write command from the host system)

S1102:步驟(根據第一寫入指令指示可複寫式非揮發性記憶體模組執行第一寫入操作) S1102: Step (instruct the rewritable non-volatile memory module to execute the first write operation according to the first write command)

S1103:步驟(獲得對應於第一寫入操作的第一效能資訊) S1103: Step (obtain first performance information corresponding to the first write operation)

S1104:步驟(根據第一效能資訊更新臨界資訊,其中所述臨界資訊用以決定目標資料之類型) S1104: Step (update critical information according to the first performance information, where the critical information is used to determine the type of target data)

Claims (27)

一種記憶體管理方法,用於一可複寫式非揮發性記憶體模組,且該記憶體管理方法包括:從一主機系統接收一第一寫入指令;根據該第一寫入指令指示該可複寫式非揮發性記憶體模組執行一第一寫入操作;獲得對應於該第一寫入操作的一第一效能資訊;以及根據該第一效能資訊更新一臨界資訊,其中該臨界資訊用以決定該第一寫入指令指示儲存的一目標資料之類型。 A memory management method for a rewritable non-volatile memory module, and the memory management method includes: receiving a first write command from a host system; and instructing the rewritable memory module according to the first write command The copy-type non-volatile memory module performs a first write operation; obtains a first performance information corresponding to the first write operation; and updates a threshold information according to the first performance information, wherein the threshold information is used To determine the type of a target data stored in the first write command. 如申請專利範圍第1項所述的記憶體管理方法,其中根據該第一效能資訊更新該臨界資訊之步驟包括:從該主機系統接收一第二寫入指令;根據該第二寫入指令指示該可複寫式非揮發性記憶體模組執行一第二寫入操作;獲得對應於該第二寫入操作的一第二效能資訊;以及根據該第一效能資訊與該第二效能資訊更新該臨界資訊。 For the memory management method described in claim 1, wherein the step of updating the critical information according to the first performance information includes: receiving a second write command from the host system; according to the second write command instruction The rewritable non-volatile memory module performs a second write operation; obtains a second performance information corresponding to the second write operation; and updates the second performance information according to the first performance information and the second performance information Critical information. 如申請專利範圍第1項所述的記憶體管理方法,其中根據該第一效能資訊更新該臨界資訊之步驟包括:獲得該第一效能資訊與一第二效能資訊之間的一差值;以及根據該差值更新該臨界資訊。 In the memory management method described in claim 1, wherein the step of updating the critical information according to the first performance information includes: obtaining a difference between the first performance information and a second performance information; and Update the critical information according to the difference. 如申請專利範圍第3項所述的記憶體管理方法,其中根據該差值更新該臨界資訊之步驟包括: 若該差值符合一預設條件,提高該臨界資訊的一數值;以及若該差值不符合該預設條件,降低該臨界資訊的該數值。 In the memory management method described in item 3 of the scope of patent application, the step of updating the critical information according to the difference includes: If the difference meets a preset condition, increase a value of the threshold information; and if the difference does not meet the preset condition, decrease the value of the threshold information. 如申請專利範圍第1項所述的記憶體管理方法,其中該第一效能資訊包括一寫入放大參數,且該寫入放大參數反映該第一寫入操作引起的一寫入放大比例。 In the memory management method described in claim 1, wherein the first performance information includes a write amplification parameter, and the write amplification parameter reflects a write amplification ratio caused by the first write operation. 如申請專利範圍第1項所述的記憶體管理方法,更包括:根據該臨界資訊決定該目標資料為一第一類資料或一第二類資料,其中該第一類資料的一資料更新頻率不同於該第二類資料的一資料更新頻率。 For example, the memory management method described in item 1 of the scope of patent application further includes: determining whether the target data is a first type of data or a second type of data according to the critical information, wherein a data update frequency of the first type of data A data update frequency different from the second type of data. 如申請專利範圍第6項所述的記憶體管理方法,其中根據該臨界資訊決定該目標資料為該第一類資料或該第二類資料之步驟包括:將該目標資料的一資料量與該臨界資訊進行比較;若該目標資料的該資料量小於該臨界資訊,判定該目標資料為該第一類資料;以及若該目標資料的該資料量不小於該臨界資訊,判定該目標資料為該第二類資料。 For example, in the memory management method described in item 6 of the scope of patent application, the step of determining whether the target data is the first type of data or the second type of data according to the critical information includes: a data amount of the target data and the Compare the threshold information; if the amount of the target data is less than the threshold information, determine the target data as the first type of data; and if the amount of the target data is not less than the threshold information, determine the target data as the The second type of information. 如申請專利範圍第6項所述的記憶體管理方法,其中根據該臨界資訊決定該目標資料為該第一類資料或該第二類資料之步驟包括:將該目標資料的一邏輯範圍與該臨界資訊進行比較;若該目標資料的該邏輯範圍小於該臨界資訊,判定該目標資 料為該第一類資料;以及若該目標資料的該邏輯範圍不小於該臨界資訊,判定該目標資料為該第二類資料。 For example, in the memory management method described in claim 6, wherein the step of determining whether the target data is the first type of data or the second type of data according to the critical information includes: a logical range of the target data and the Critical information; if the logical range of the target data is smaller than the critical information, determine the target data The data is the first type of data; and if the logical range of the target data is not less than the critical information, the target data is determined to be the second type of data. 如申請專利範圍第1項所述的記憶體管理方法,其中該可複寫式非揮發性記憶體模組包括多個實體單元,該多個實體單元包括一第一實體單元與一第二實體單元,且該記憶體管理方法更包括:若該目標資料為一第一類資料,發送一第一寫入指令序列以指示將該目標資料寫入至該第一實體單元;以及若該目標資料為一第二類資料,發送一第二寫入指令序列以指示將該目標資料寫入至該第二實體單元,其中,該第一實體單元不同於該第二實體單元。 The memory management method according to claim 1, wherein the rewritable non-volatile memory module includes a plurality of physical units, and the plurality of physical units includes a first physical unit and a second physical unit , And the memory management method further includes: if the target data is a first type of data, sending a first write command sequence to instruct the target data to be written to the first physical unit; and if the target data is A second type of data, sending a second write command sequence to instruct the target data to be written to the second physical unit, wherein the first physical unit is different from the second physical unit. 一種記憶體儲存裝置,包括:一連接介面單元,用以耦接至一主機系統;一可複寫式非揮發性記憶體模組;以及一記憶體控制電路單元,耦接至該連接介面單元與該可複寫式非揮發性記憶體模組,其中該記憶體控制電路單元用以從該主機系統接收一第一寫入指令,該記憶體控制電路單元更用以根據該第一寫入指令指示該可複寫式非揮發性記憶體模組執行一第一寫入操作,該記憶體控制電路單元更用以獲得對應於該第一寫入操作的 一第一效能資訊,並且該記憶體控制電路單元更用以根據該第一效能資訊更新一臨界資訊,其中該臨界資訊用以決定該第一寫入指令指示儲存的一目標資料之類型。 A memory storage device includes: a connection interface unit for coupling to a host system; a rewritable non-volatile memory module; and a memory control circuit unit coupled to the connection interface unit and The rewritable non-volatile memory module, wherein the memory control circuit unit is used to receive a first write command from the host system, and the memory control circuit unit is further used to instruct according to the first write command The rewritable non-volatile memory module executes a first write operation, and the memory control circuit unit is further used to obtain a data corresponding to the first write operation A first performance information, and the memory control circuit unit is further used to update a threshold information according to the first performance information, wherein the threshold information is used to determine the type of a target data stored in the first write command. 如申請專利範圍第10項所述的記憶體儲存裝置,其中該記憶體控制電路單元根據該第一效能資訊更新該臨界資訊之操作包括:從該主機系統接收一第二寫入指令;根據該第二寫入指令指示該可複寫式非揮發性記憶體模組執行一第二寫入操作;獲得對應於該第二寫入操作的一第二效能資訊;以及根據該第一效能資訊與該第二效能資訊更新該臨界資訊。 For the memory storage device described in claim 10, the operation of the memory control circuit unit to update the critical information according to the first performance information includes: receiving a second write command from the host system; The second write command instructs the rewritable non-volatile memory module to perform a second write operation; obtains a second performance information corresponding to the second write operation; and according to the first performance information and the The second performance information updates the critical information. 如申請專利範圍第10項所述的記憶體儲存裝置,其中該記憶體控制電路單元根據該第一效能資訊更新該臨界資訊之操作包括:獲得該第一效能資訊與一第二效能資訊之間的一差值;以及根據該差值更新該臨界資訊。 For the memory storage device described in claim 10, wherein the operation of the memory control circuit unit to update the critical information according to the first performance information includes: obtaining a relationship between the first performance information and a second performance information And update the critical information according to the difference. 如申請專利範圍第12項所述的記憶體儲存裝置,其中該記憶體控制電路單元根據該差值更新該臨界資訊之操作包括:若該差值符合一預設條件,提高該臨界資訊的一數值;以及若該差值不符合該預設條件,降低該臨界資訊的該數值。 For the memory storage device described in claim 12, the operation of the memory control circuit unit to update the critical information according to the difference includes: if the difference meets a preset condition, increasing a value of the critical information Value; and if the difference does not meet the preset condition, reduce the value of the critical information. 如申請專利範圍第10項所述的記憶體儲存裝置,其中該第一效能資訊包括一寫入放大參數,且該寫入放大參數反映該第一寫入操作引起的一寫入放大比例。 The memory storage device according to claim 10, wherein the first performance information includes a write amplification parameter, and the write amplification parameter reflects a write amplification ratio caused by the first write operation. 如申請專利範圍第10項所述的記憶體儲存裝置,其中該記憶體控制電路單元更用以根據該臨界資訊決定該目標資料為一第一類資料或一第二類資料,其中該第一類資料的一資料更新頻率不同於該第二類資料的一資料更新頻率。 For example, the memory storage device described in claim 10, wherein the memory control circuit unit is further used for determining whether the target data is a first type data or a second type data according to the critical information, wherein the first A data update frequency of one type of data is different from a data update frequency of the second type of data. 如申請專利範圍第15項所述的記憶體儲存裝置,其中該記憶體控制電路單元根據該臨界資訊決定該目標資料為該第一類資料或該第二類資料之操作包括:將該目標資料的一資料量與該臨界資訊進行比較;若該目標資料的該資料量小於該臨界資訊,判定該目標資料為該第一類資料;以及若該目標資料的該資料量不小於該臨界資訊,判定該目標資料為該第二類資料。 For example, in the memory storage device described in claim 15, wherein the operation of the memory control circuit unit to determine whether the target data is the first type of data or the second type of data according to the critical information includes: the target data Compare a data amount of with the threshold information; if the data amount of the target data is less than the threshold information, determine the target data as the first type of data; and if the data amount of the target data is not less than the threshold information, Determine the target data as the second type of data. 如申請專利範圍第15項所述的記憶體儲存裝置,其中該記憶體控制電路單元根據該臨界資訊決定該目標資料為該第一類資料或該第二類資料之操作包括:將該目標資料的一邏輯範圍與該臨界資訊進行比較;若該目標資料的該邏輯範圍小於該臨界資訊,判定該目標資料為該第一類資料;以及若該目標資料的該邏輯範圍不小於該臨界資訊,判定該目標 資料為該第二類資料。 For example, in the memory storage device described in claim 15, wherein the operation of the memory control circuit unit to determine whether the target data is the first type of data or the second type of data according to the critical information includes: the target data Compare a logical range of the target data with the critical information; if the logical range of the target data is smaller than the critical information, determine the target data as the first type of data; and if the logical range of the target data is not smaller than the critical information, Determine the target The data is the second type of data. 如申請專利範圍第10項所述的記憶體儲存裝置,其中該可複寫式非揮發性記憶體模組包括多個實體單元,該多個實體單元包括一第一實體單元與一第二實體單元,若該目標資料為一第一類資料,該記憶體控制電路單元更用以發送一第一寫入指令序列以指示將該目標資料寫入至該第一實體單元,並且若該目標資料為一第二類資料,該記憶體控制電路單元更用以發送一第二寫入指令序列以指示將該目標資料寫入至該第二實體單元,其中,該第一實體單元不同於該第二實體單元。 The memory storage device according to claim 10, wherein the rewritable non-volatile memory module includes a plurality of physical units, and the plurality of physical units includes a first physical unit and a second physical unit If the target data is a first type of data, the memory control circuit unit is further used to send a first write command sequence to instruct the target data to be written to the first physical unit, and if the target data is A second type of data, the memory control circuit unit is further used to send a second write command sequence to instruct to write the target data to the second physical unit, wherein the first physical unit is different from the second physical unit Entity unit. 一種記憶體控制電路單元,用於控制一可複寫式非揮發性記憶體模組,且該記憶體控制電路單元包括:一主機介面,用以耦接至一主機系統;一記憶體介面,用以耦接至該可複寫式非揮發性記憶體模組;以及一記憶體管理電路,耦接至該主機介面與該記憶體介面,其中該記憶體管理電路用以從該主機系統接收一第一寫入指令,該記憶體管理電路更用以根據該第一寫入指令指示該可複寫式非揮發性記憶體模組執行一第一寫入操作;該記憶體管理電路更用以獲得對應於該第一寫入操作的一第 一效能資訊,並且該記憶體管理電路更用以根據該第一效能資訊更新一臨界資訊,其中該臨界資訊用以決定該第一寫入指令指示儲存的一目標資料之類型。 A memory control circuit unit is used to control a rewritable non-volatile memory module, and the memory control circuit unit includes: a host interface for coupling to a host system; and a memory interface for To be coupled to the rewritable non-volatile memory module; and a memory management circuit coupled to the host interface and the memory interface, wherein the memory management circuit is used to receive a second from the host system A write command, the memory management circuit is further used to instruct the rewritable non-volatile memory module to perform a first write operation according to the first write command; the memory management circuit is further used to obtain a corresponding In the first write operation A performance information, and the memory management circuit is further used for updating a threshold information according to the first performance information, wherein the threshold information is used to determine the type of a target data stored in the first write command. 如申請專利範圍第19項所述的記憶體控制電路單元,其中該記憶體管理電路根據該第一效能資訊更新該臨界資訊之操作包括:從該主機系統接收一第二寫入指令;根據該第二寫入指令指示該可複寫式非揮發性記憶體模組執行一第二寫入操作;獲得對應於該第二寫入操作的一第二效能資訊;以及根據該第一效能資訊與該第二效能資訊更新該臨界資訊。 The memory control circuit unit according to claim 19, wherein the operation of the memory management circuit to update the critical information according to the first performance information includes: receiving a second write command from the host system; The second write command instructs the rewritable non-volatile memory module to perform a second write operation; obtains a second performance information corresponding to the second write operation; and according to the first performance information and the The second performance information updates the critical information. 如申請專利範圍第19項所述的記憶體控制電路單元,其中該記憶體管理電路根據該第一效能資訊更新該臨界資訊之操作包括:獲得該第一效能資訊與一第二效能資訊之間的一差值;以及根據該差值更新該臨界資訊。 For the memory control circuit unit described in claim 19, wherein the operation of the memory management circuit to update the critical information according to the first performance information includes: obtaining a relationship between the first performance information and a second performance information And update the critical information according to the difference. 如申請專利範圍第21項所述的記憶體控制電路單元,其中該記憶體管理電路根據該差值更新該臨界資訊之操作包括:若該差值符合一預設條件,提高該臨界資訊的一數值;以及若該差值不符合該預設條件,降低該臨界資訊的該數值。 For the memory control circuit unit described in claim 21, the operation of the memory management circuit to update the critical information according to the difference includes: if the difference meets a preset condition, increasing a value of the critical information Value; and if the difference does not meet the preset condition, reduce the value of the critical information. 如申請專利範圍第19項所述的記憶體控制電路單元,其中該第一效能資訊包括一寫入放大參數,且該寫入放大參數反映該第一寫入操作引起的一寫入放大比例。 The memory control circuit unit described in claim 19, wherein the first performance information includes a write amplification parameter, and the write amplification parameter reflects a write amplification ratio caused by the first write operation. 如申請專利範圍第19項所述的記憶體控制電路單元,其中該記憶體管理電路更用以根據該臨界資訊決定該目標資料為一第一類資料或一第二類資料,其中該第一類資料的一資料更新頻率不同於該第二類資料的一資料更新頻率。 For example, the memory control circuit unit described in claim 19, wherein the memory management circuit is further used for determining whether the target data is a first type of data or a second type of data according to the critical information, wherein the first A data update frequency of one type of data is different from a data update frequency of the second type of data. 如申請專利範圍第24項所述的記憶體控制電路單元,其中該記憶體管理電路根據該臨界資訊決定該目標資料為該第一類資料或該第二類資料之操作包括:將該目標資料的一資料量與該臨界資訊進行比較;若該目標資料的該資料量小於該臨界資訊,判定該目標資料為該第一類資料;以及若該目標資料的該資料量不小於該臨界資訊,判定該目標資料為該第二類資料。 For example, the memory control circuit unit described in claim 24, wherein the operation of the memory management circuit to determine whether the target data is the first type of data or the second type of data according to the critical information includes: the target data Compare a data amount of with the threshold information; if the data amount of the target data is less than the threshold information, determine the target data as the first type of data; and if the data amount of the target data is not less than the threshold information, Determine the target data as the second type of data. 如申請專利範圍第24項所述的記憶體儲存裝置,其中該記憶體管理電路根據該臨界資訊決定該目標資料為該第一類資料或該第二類資料之操作包括:將該目標資料的一邏輯範圍與該臨界資訊進行比較;若該目標資料的該邏輯範圍小於該臨界資訊,判定該目標資料為該第一類資料;以及若該目標資料的該邏輯範圍不小於該臨界資訊,判定該目標 資料為該第二類資料。 For example, in the memory storage device described in claim 24, the operation of the memory management circuit to determine whether the target data is the first type of data or the second type of data according to the critical information includes: A logical range is compared with the critical information; if the logical range of the target data is smaller than the critical information, the target data is determined to be the first type of data; and if the logical range of the target data is not smaller than the critical information, it is determined The goal The data is the second type of data. 如申請專利範圍第19項所述的記憶體控制電路單元,其中該可複寫式非揮發性記憶體模組包括多個實體單元,該多個實體單元包括一第一實體單元與一第二實體單元,若該目標資料為一第一類資料,該記憶體管理電路更用以發送一第一寫入指令序列以指示將該目標資料寫入至該第一實體單元,並且若該目標資料為一第二類資料,該記憶體管理電路更用以發送一第二寫入指令序列以指示將該目標資料寫入至該第二實體單元,其中,該第一實體單元不同於該第二實體單元。 The memory control circuit unit according to claim 19, wherein the rewritable non-volatile memory module includes a plurality of physical units, and the plurality of physical units includes a first physical unit and a second physical unit Unit, if the target data is a first type of data, the memory management circuit is further used to send a first write command sequence to instruct the target data to be written to the first physical unit, and if the target data is A second type of data, the memory management circuit is further used to send a second write command sequence to instruct the target data to be written to the second physical unit, wherein the first physical unit is different from the second physical unit unit.
TW108123692A 2019-07-05 2019-07-05 Memory management method, memory storage device and memory control circuit unit TWI712886B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW108123692A TWI712886B (en) 2019-07-05 2019-07-05 Memory management method, memory storage device and memory control circuit unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW108123692A TWI712886B (en) 2019-07-05 2019-07-05 Memory management method, memory storage device and memory control circuit unit

Publications (2)

Publication Number Publication Date
TWI712886B true TWI712886B (en) 2020-12-11
TW202103007A TW202103007A (en) 2021-01-16

Family

ID=74669916

Family Applications (1)

Application Number Title Priority Date Filing Date
TW108123692A TWI712886B (en) 2019-07-05 2019-07-05 Memory management method, memory storage device and memory control circuit unit

Country Status (1)

Country Link
TW (1) TWI712886B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI806470B (en) * 2022-03-04 2023-06-21 瑞昱半導體股份有限公司 Method for dynamically resizing instruction memory and data memory in system and system for dynamically resizing instruction memory and data memory

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103348331A (en) * 2010-10-27 2013-10-09 尹摩特斯公司 Tiered data storage system with data management and method of operation thereof
US20150095567A1 (en) * 2013-09-27 2015-04-02 Fujitsu Limited Storage apparatus, staging control method, and computer-readable recording medium having stored staging control program
CN105653466A (en) * 2014-11-03 2016-06-08 慧荣科技股份有限公司 Data storage device and flash memory control method
TW201729113A (en) * 2015-10-16 2017-08-16 高通公司 System and method for memory channel interleaving using a sliding threshold address
TWI602190B (en) * 2016-12-21 2017-10-11 旺宏電子股份有限公司 Memory control method and memory device
TW201909183A (en) * 2017-05-25 2019-03-01 美商美光科技公司 Memory device with dynamic target calibration

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103348331A (en) * 2010-10-27 2013-10-09 尹摩特斯公司 Tiered data storage system with data management and method of operation thereof
US20150095567A1 (en) * 2013-09-27 2015-04-02 Fujitsu Limited Storage apparatus, staging control method, and computer-readable recording medium having stored staging control program
CN105653466A (en) * 2014-11-03 2016-06-08 慧荣科技股份有限公司 Data storage device and flash memory control method
TW201729113A (en) * 2015-10-16 2017-08-16 高通公司 System and method for memory channel interleaving using a sliding threshold address
TWI602190B (en) * 2016-12-21 2017-10-11 旺宏電子股份有限公司 Memory control method and memory device
TW201909183A (en) * 2017-05-25 2019-03-01 美商美光科技公司 Memory device with dynamic target calibration

Also Published As

Publication number Publication date
TW202103007A (en) 2021-01-16

Similar Documents

Publication Publication Date Title
TWI731338B (en) Memory control method, memory storage device and memory control circuit unit
TWI676176B (en) Data merge method, memory storage device and memory control circuit unit
TWI701552B (en) Memory control method, memory storage device and memory control circuit unit
TW201820145A (en) Data storage method, memory storage device and memory control circuit unit
TW202038098A (en) Memory control method, memory storage device and memory control circuit unit
TWI717816B (en) Memory control method, memory storage device and memory control circuit unit
TWI658405B (en) Data programming method, memory storage device and memory control circuit unit
CN106775479B (en) Memory management method, memory storage device and memory control circuit unit
TWI702496B (en) Memory management method, memory storage device and memory control circuit unit
TWI714840B (en) Memory management method, memory storage device and memory control circuit unit
US11221791B2 (en) Memory management method, memory device, and memory control circuit for improving data classification
CN111767005B (en) Memory control method, memory storage device and memory control circuit unit
TWI702497B (en) Memory management method, memory storage device and memory control circuit unit
TWI712886B (en) Memory management method, memory storage device and memory control circuit unit
TWI757216B (en) Temperature control method, memory storage device and memory control circuit unit
TWI688956B (en) Memory control method, memory storage device and memory control circuit unit
CN112835536A (en) Memory control method, memory storage device and memory control circuit unit
TW202026884A (en) Memory control method, memory storage device and memory control circuit unit
TWI722490B (en) Memory management method, memory storage device and memory control circuit unit
TWI726541B (en) Memory management method, memory storage device and memory control circuit unit
TWI823792B (en) Mapping table updating method, memory storage device and memory control circuit unit
TWI741870B (en) Data merge method, memory storage device and memory control circuit unit
TWI741779B (en) Data merge method, memory storage device and memory control circuit unit
CN111143230B (en) Data merging method, memory storage device and memory control circuit unit
US11561719B2 (en) Flash memory control method of re-programming memory cells before erase operations, flash memory storage device and flash memory controller