TW201447577A - Data writing method, memory controller and memory storage apparatus - Google Patents

Data writing method, memory controller and memory storage apparatus Download PDF

Info

Publication number
TW201447577A
TW201447577A TW102121184A TW102121184A TW201447577A TW 201447577 A TW201447577 A TW 201447577A TW 102121184 A TW102121184 A TW 102121184A TW 102121184 A TW102121184 A TW 102121184A TW 201447577 A TW201447577 A TW 201447577A
Authority
TW
Taiwan
Prior art keywords
data
sub
memory
physical
strings
Prior art date
Application number
TW102121184A
Other languages
Chinese (zh)
Other versions
TWI516927B (en
Inventor
Kheng-Chong Tan
Ming-Jen Liang
Original Assignee
Phison Electronics Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Phison Electronics Corp filed Critical Phison Electronics Corp
Priority to TW102121184A priority Critical patent/TWI516927B/en
Priority to US13/958,627 priority patent/US9201785B2/en
Publication of TW201447577A publication Critical patent/TW201447577A/en
Application granted granted Critical
Publication of TWI516927B publication Critical patent/TWI516927B/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/023Free address space management
    • G06F12/0238Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory
    • G06F12/0246Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory in block erasable memory, e.g. flash memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/08Error detection or correction by redundancy in data representation, e.g. by using checking codes
    • G06F11/10Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's
    • G06F11/1008Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's in individual solid state devices
    • G06F11/1048Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's in individual solid state devices using arrangements adapted for a specific error detection or correction feature
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/72Details relating to flash memory management
    • G06F2212/7203Temporary buffering, e.g. using volatile buffer or dedicated buffer blocks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0614Improving the reliability of storage systems
    • G06F3/0619Improving the reliability of storage systems in relation to data integrity, e.g. data losses, bit errors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • G06F3/0656Data buffering arrangements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0679Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]

Abstract

A data writing method for a writeable non-volatile memory module is provided. The method includes receiving a write command and data corresponding to the write command from a host system and temper temporarily storing the data into a buffer memory, wherein the data includes a plurality of sub-data streams. The method includes still includes transmitting the sub-data streams into the writeable non-volatile memory module, thereby writing the sub-data streams into at least one physical erasing unit of the non-volatile memory module. The method further includes generating parity information based on at least a portion of the sub-data streams; storing the parity information into the buffer memory and deleting the sub-data streams from the buffer memory. Accordingly, the method can effectively utilize the storage space of the buffer memory.

Description

資料寫入方法、記憶體控制器與記憶體儲存裝置 Data writing method, memory controller and memory storage device

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

數位相機、手機與MP3在這幾年來的成長十分迅速,促使消費者對儲存媒體的需求也急遽增加。由於可複寫式非揮發性記憶體(rewritable non-volatile memory)具有資料非揮發性、低耗電、體積小、無機械結構且讀寫速度快等特性,最適合用在可攜式電子產品,例如手機、個人數位助理與筆記型電腦等。因此,近年來,快閃記憶體產業成為電子產業中相當熱門的一環。 Digital cameras, mobile phones and MP3s have grown very rapidly in recent years, prompting consumers to increase their demand for storage media. Because rewritable non-volatile memory has the characteristics of non-volatile data, low power consumption, small size, no mechanical structure and fast reading and writing speed, it is most suitable for portable electronic products, such as Mobile phones, personal digital assistants, and notebook computers. Therefore, in recent years, the flash memory industry has become a very popular part of the electronics industry.

傳統上,快閃記憶體儲存裝置之快閃記憶體控制器配置有緩衝記憶體,並且從主機系統接收到寫入指令與多筆資料時,快閃記憶體控制器會先將此些資料暫存於緩衝記憶體,然後再依據實體頁面排列順序依序將資料寫入至對應的實體頁面中。然而,在同一條字元線上的實體頁面彼此會有耦合關係,因此,若 一個實體頁面發生程式化錯誤,與此實體頁面具耦合關係的另一個實體頁面上的資料可能會遺失。例如,一個實體區塊包括多個實體頁面組,且每一實體頁面組包括一個下實體頁面與一個上實體頁面。當一個實體頁面組的上實體頁面發生實體程式化錯誤時,其下實體頁面上的資料亦可能會遺失。特別是,根據快閃記憶體所規範的實體頁面程式化順序,可能是連續對數個下實體頁面進行程式化後才對數個上實體頁面進行程式。因此,在執行一個寫入指令(以下稱為第一寫入指令)後,經常會發生某些實體頁面組中僅下實體頁面被寫入資料的暫態,並且此些某些實體頁面組中的上實體頁面可能在執行下一個寫入指令(以下稱為第二寫入指令)才會被寫入資料。在此例子中,倘若執行第二寫入指令已將資料寫入上實體頁面時發生程式化錯誤,執行第一寫入指令所寫入至下實體頁面的資料可能亦遺失。為了避免資料遺失,快閃記憶體控制器會在緩衝記憶體中保留此些資料,直到確保資料不會因其他實體頁面之程式化而遺失才會從緩衝記憶體中移除。基此,現有快閃記憶體儲存系統需配置有大容量的緩衝記憶體,造成快閃記憶體儲存系統的體積無法縮小,且製造成本增加。特別是,若在配置多顆快閃記憶體晶粒的記憶體儲存系統中,需要更多的緩衝記憶體容量來暫存此些主機系統所寫入的資料。 Traditionally, the flash memory controller of the flash memory storage device is configured with a buffer memory, and when receiving a write command and multiple data from the host system, the flash memory controller first temporarily stores the data. Stored in the buffer memory, and then sequentially write the data to the corresponding entity page according to the order of the physical page. However, physical pages on the same character line have a coupling relationship with each other, so if A stylized error occurs on one of the entity pages, and the data on another entity page that is coupled to the physical page may be lost. For example, one physical block includes a plurality of physical page groups, and each physical page group includes a lower entity page and an upper entity page. When a physical stylization error occurs on the physical page of a physical page group, the data on the physical page may also be lost. In particular, according to the stylized order of the physical pages specified by the flash memory, it is possible to program a plurality of upper physical pages after serializing a plurality of lower physical pages. Therefore, after executing a write command (hereinafter referred to as a first write command), a transient in which only the lower physical page of the physical page group is written to the data is frequently generated, and in some of the physical page groups The upper physical page may be written to the data after executing the next write instruction (hereinafter referred to as the second write instruction). In this example, if a stylized error occurs when the second write command is executed to write the data to the physical page, the data written to the next physical page by executing the first write command may also be lost. In order to avoid data loss, the flash memory controller will retain this data in the buffer memory until it is ensured that the data will not be lost due to the stylization of other physical pages. Therefore, the existing flash memory storage system needs to be equipped with a large-capacity buffer memory, so that the volume of the flash memory storage system cannot be reduced, and the manufacturing cost is increased. In particular, in a memory storage system in which a plurality of flash memory dies are arranged, more buffer memory capacity is required to temporarily store data written by such host systems.

本發明提供一種用於可複寫式非揮發性記憶體模組的資 料寫入方法、記憶體控制器與記憶體儲存裝置,其能夠減少在執行寫入指令時所需的緩衝記憶體空間,同時避免資料遺失。 The invention provides a resource for a rewritable non-volatile memory module The material writing method, the memory controller and the memory storage device can reduce the buffer memory space required when executing the write command while avoiding data loss.

本發明範例實施例提出一種用於可複寫式非揮發性記憶體模組的資料寫入方法,其中此可複寫式非揮發性記憶體模組具有至少一記憶體晶粒,此至少一記憶體晶粒包括多個實體抹除單元,每一實體抹除單元包括多個實體程式化單元。本資料寫入方法包括:從主機系統中接收第一寫入指令與對應此寫入指令的第一資料並且將第一資料暫存至緩衝記憶體中,其中此第一資料包括多個子資料串。本資料寫入方法還包括從緩衝記憶體中將此些子資料串傳送至可複寫式非揮發性記憶體模組以寫入此些子資料串至至少一第一實體抹除單元中;根據此些子資料串之中至少一部分子資料串來產生同位資訊;以及將此同位資訊儲存在緩衝記憶體中並且從緩衝記憶體中移除此第一資料。 An exemplary embodiment of the present invention provides a data writing method for a rewritable non-volatile memory module, wherein the rewritable non-volatile memory module has at least one memory die, the at least one memory The die includes a plurality of physical erase units, each of the physical erase units including a plurality of physical stylized units. The method for writing data includes: receiving, from a host system, a first write command and a first data corresponding to the write command, and temporarily storing the first data in a buffer memory, wherein the first data includes multiple sub-data strings . The data writing method further includes transmitting the sub-data strings from the buffer memory to the rewritable non-volatile memory module to write the sub-data strings to the at least one first physical erasing unit; At least a portion of the sub-data strings of the sub-data strings are used to generate the co-located information; and the same-bit information is stored in the buffer memory and the first data is removed from the buffer memory.

在本發明的一範例實施例中,上述根據此些子資料串之中至少一部分子資料串來產生上述同位資訊的步驟包括:依據所有的子資料串來產生上述同位資訊。 In an exemplary embodiment of the present invention, the step of generating the parity information according to at least a part of the sub-data strings of the sub-data strings includes: generating the co-located information according to all the sub-data strings.

在本發明的一範例實施例中,上述每一實體抹除單元的實體程式化單元包括多個下實體程式化單元與多個上實體程式化單元,寫入資料至下實體程式化單元的速度快於寫入資料至上實體程式化單元。並且,上述根據此些子資料串之中至少一部分子資料串來產生上述同位資訊的步驟包括:根據儲存此些子資料串的實體程式化單元識別此些子資料串之中的至少一第一子資料串 以及根據此至少一第一子資料串產生該同位資訊,其中此至少一第一子資料串被儲存在此些下實體程式化單元之中的至少一第一下實體程式化單元並且對應此至少一第一下實體程式化單元的至少一第一上實體程式化單元未儲存資料。 In an exemplary embodiment of the present invention, the physical stylization unit of each of the physical erasing units includes a plurality of lower physical stylized units and a plurality of upper physical stylized units, and the speed of writing data to the lower physical stylizing unit Faster than writing data to the upper stylized unit. And the step of generating the above-mentioned information according to at least a part of the sub-data strings of the sub-data strings includes: identifying at least one of the first sub-data strings according to the entity stylizing unit storing the sub-data strings Subdata string And generating the parity information according to the at least one first sub-data string, wherein the at least one first sub-data string is stored in the at least one first lower physical stylized unit among the lower physical stylized units and corresponds to the at least At least one of the first upper physical stylized units of a first lower entity stylized unit does not store data.

在本發明的一範例實施例中,上述資料寫入方法,更包括:在將上述同位資訊儲存在緩衝記憶體中並且從緩衝記憶體中移除上述第一資料之後,從主機系統接收第二寫入指令與對應第二寫入指令的第二資料。 In an exemplary embodiment of the present invention, the data writing method further includes: receiving the second information from the host system after storing the parity information in the buffer memory and removing the first data from the buffer memory. The write command and the second data corresponding to the second write command.

在本發明的一範例實施例中,上述資料寫入方法更包括:判斷從緩衝記憶體中將第二資料寫入至上述至少一第一實體抹除單元中時是否發生程式化錯誤;以及倘若發生程式化錯誤時,使用儲存在緩衝記憶體中的同位資訊解碼儲存在上述至少一第一實體抹除單元中的至少一部分子資料串來校正上述至少一部分子資料串中的至少一錯誤子資料串。 In an exemplary embodiment of the present invention, the data writing method further includes: determining whether a stylization error occurs when the second data is written into the at least one first physical erasing unit from the buffer memory; and When a stylization error occurs, at least a portion of the sub-data strings stored in the at least one first entity erasing unit are decoded using the parity information stored in the buffer memory to correct at least one of the at least one sub-data string. string.

在本發明的一範例實施例中,上述資料寫入方法更包括:倘若從緩衝記憶體中將第二資料寫入至第一實體抹除單元中時未發生該程式化錯誤時,從緩衝記憶體中移除上述同位資訊。 In an exemplary embodiment of the present invention, the data writing method further includes: if the stylization error does not occur when the second data is written into the first entity erasing unit from the buffer memory, the buffer memory Remove the above information from the body.

在本發明的一範例實施例中,上述資料寫入方法更包括:根據至少一部分的第二資料產生另一同位資訊;以及將此另一同位資訊儲存至緩衝記憶體中並刪除第二資料。 In an exemplary embodiment of the present invention, the data writing method further includes: generating another parity information according to at least a portion of the second data; and storing the another parity information in the buffer memory and deleting the second data.

在本發明的一範例實施例中,其中從緩衝記憶體中將此些子資料串傳送至該可複寫式非揮發性記憶體模組以寫入此些子 資料串至此些實體抹除單元之中的至少一第一實體抹除單元中的步驟包括:分別地為此些子資料串產生多個錯誤檢查與校正碼;以及將此些子資料串與分別地對應此些子資料串的錯誤檢查與校正碼傳送至可複寫式非揮發性記憶體模組以寫入此些子資料串與分別地對應此些子資料串的錯誤檢查與校正碼至上述至少一第一實體抹除單元的實體程式化單元中。 In an exemplary embodiment of the present invention, the sub-data strings are transferred from the buffer memory to the rewritable non-volatile memory module to write the sub-files. The step of the data string to the at least one first entity erasing unit of the physical erasing units includes: generating a plurality of error checking and correcting codes for the sub-data strings respectively; and respectively separating the sub-data strings The error check and correction code corresponding to the sub-data strings are transmitted to the rewritable non-volatile memory module to write the sub-data strings and the error check and correction codes respectively corresponding to the sub-data strings to the above At least one first entity erases the entity in the stylized unit.

在本發明的一範例實施例中,上述根據此些子資料串之中至少一部分子資料串來產生同位資訊的步驟包括:每當將此些子資料串之中的其中一個子資料串寫入至第一實體抹除單元時,根據此其中一個子資料串與先前同位資訊來產生此同位資訊。 In an exemplary embodiment of the present invention, the step of generating the parity information according to at least a part of the sub-data strings of the sub-data strings includes: writing each one of the sub-data strings into each of the sub-data strings. When the first entity erases the unit, the parity information is generated according to one of the sub-data strings and the previous parity information.

此外,本發明範例實施例提出一種記憶體控制器,用於控制可複寫式非揮發性記憶體模組。本記憶體控制器包括主機介面、記憶體介面、緩衝記憶體、同位資訊編碼與解碼電路以及記憶體管理電路。主機介面用以耦接至主機系統。記憶體介面,用以耦接至可複寫式非揮發性記憶體模組,其中可複寫式非揮發性記憶體模組具有至少一記憶體晶粒,此記憶體晶粒包括多個實體抹除單元,每一實體抹除單元包括多個實體程式化單元。記憶體管理電路耦接至主機介面、記憶體介面、緩衝記憶體與同位資訊編碼與解碼電路。記憶體管理電路用以從主機系統中接收第一寫入指令與對應此寫入指令的第一資料並且將第一資料暫存至緩衝記憶體中,其中第一資料包括多個子資料串。此外,記憶體管理電路更用以從緩衝記憶體中將此些子資料串傳送至可複寫式非揮 發性記憶體模組以寫入此些子資料串至此些實體抹除單元之中的至少一第一實體抹除單元中。另外,同位資訊編碼與解碼電路用以根據此些子資料串之中至少一部分子資料串來產生同位資訊,並且記憶體管理電路更用以將此同位資訊儲存在緩衝記憶體中並且該緩衝記憶體中移除上述第一資料。 In addition, an exemplary embodiment of the present invention provides a memory controller for controlling a rewritable non-volatile memory module. The memory controller includes a host interface, a memory interface, a buffer memory, a parity information encoding and decoding circuit, and a memory management circuit. The host interface is coupled to the host system. The memory interface is coupled to the rewritable non-volatile memory module, wherein the rewritable non-volatile memory module has at least one memory die, and the memory die includes a plurality of physical erase electrodes Unit, each entity erasing unit includes a plurality of entity stylizing units. The memory management circuit is coupled to the host interface, the memory interface, the buffer memory, and the parity information encoding and decoding circuit. The memory management circuit is configured to receive the first write command and the first data corresponding to the write command from the host system and temporarily store the first data into the buffer memory, wherein the first data includes a plurality of sub-data strings. In addition, the memory management circuit is further configured to transfer the sub-data strings from the buffer memory to the rewritable non-swing The boot memory module writes the sub-data strings to at least one of the first physical erase units of the physical erase units. In addition, the parity information encoding and decoding circuit is configured to generate the parity information according to at least a part of the sub-data strings of the sub-data strings, and the memory management circuit is further configured to store the parity information in the buffer memory and the buffer memory. The first data is removed from the body.

在本發明的一範例實施例中,在上述根據此些子資料串之中至少一部分子資料串來產生同位資訊的運作中,上述同位資訊編碼與解碼電路依據所有的子資料串來產生上述同位資訊。 In an exemplary embodiment of the present invention, in the operation of generating the parity information according to at least a part of the sub-data strings of the sub-data strings, the co-located information encoding and decoding circuit generates the co-located according to all the sub-data strings. News.

在本發明的一範例實施例中,上述每一實體抹除單元的實體程式化單元包括多個下實體程式化單元與多個上實體程式化單元,寫入資料至下實體程式化單元的速度快於寫入資料至上實體程式化單元。並且,在根據此些子資料串之中至少一部分子資料串來產生上述同位資訊的運作中,記憶體管理電路根據儲存此些子資料串的實體程式化單元識別此些子資料串之中的至少一第一子資料串並且同位資訊編碼與解碼電路根據此第一子資料串產生同位資訊,其中第一子資料串被儲存在下實體程式化單元之中的至少一第一下實體程式化單元並且對應此至少一第一下實體程式化單元的至少一第一上實體程式化單元未儲存資料。 In an exemplary embodiment of the present invention, the physical stylization unit of each of the physical erasing units includes a plurality of lower physical stylized units and a plurality of upper physical stylized units, and the speed of writing data to the lower physical stylizing unit Faster than writing data to the upper stylized unit. And, in the operation of generating the above-mentioned information according to at least a part of the sub-data strings, the memory management circuit identifies the sub-data strings according to the entity stylizing unit storing the sub-data strings. At least a first sub-data string and a parity information encoding and decoding circuit generates co-located information according to the first sub-data string, wherein the first sub-data string is stored in at least one first lower physical stylized unit among the lower physical stylized units And at least one first upper physical stylized unit corresponding to the at least one first lower entity stylized unit does not store data.

在本發明的一範例實施例中,上述記憶體管理路更用以在將上述同位資訊儲存在緩衝記憶體中並且從緩衝記憶體中移除上述第一資料之後,從主機系統接收第二寫入指令與對應第二寫入指令的第二資料。 In an exemplary embodiment of the present invention, the memory management path is further configured to receive the second write from the host system after storing the parity information in the buffer memory and removing the first data from the buffer memory. The input instruction and the second data corresponding to the second write command.

在本發明的一範例實施例中,上述記憶體管理電路根據至少一部分的第二資料產生另一同位資訊並將此另一同位資訊儲存至緩衝記憶體中並刪除第二資料。 In an exemplary embodiment of the present invention, the memory management circuit generates another parity information according to at least a portion of the second data and stores the other parity information in the buffer memory and deletes the second data.

在本發明的一範例實施例中,在上述根據此些子資料串之中至少一部分子資料串來產生同位資訊的運作中,每當將此些子資料串之中的其中一個子資料串寫入至第一實體抹除單元時,上述同位資訊編碼與解碼電路根據此其中一個子資料串與先前同位資訊來產生此同位資訊。 In an exemplary embodiment of the present invention, in the operation of generating the parity information according to at least a part of the sub-data strings of the sub-data strings, each of the sub-data strings is written. When entering the first entity erasing unit, the above-mentioned parity information encoding and decoding circuit generates the parity information according to the one of the sub-data strings and the previous parity information.

再者,本發明範例實施例提出一種記憶體儲存裝置,其包括連接器、可複寫式非揮發性記憶體模組與記憶體控制器。連接器用以耦接至主機系統。可複寫式非揮發性記憶體模組具有至少一記憶體晶粒,此至少一記憶體晶粒包括多個實體抹除單元,且每一實體抹除單元包括多個實體程式化單元。記憶體控制器,具有緩衝記憶體且耦接至上述連接器與可複寫式非揮發性記憶體模組。記憶體控制器用以從主機系統中接收第一寫入指令與對應此寫入指令的第一資料並且將第一資料暫存至緩衝記憶體中,其中第一資料包括多個子資料串。此外,記憶體控制器更用以從緩衝記憶體中將此些子資料串傳送至可複寫式非揮發性記憶體模組以寫入此些子資料串至此些實體抹除單元之中的至少一第一實體抹除單元中。另外,記憶體控制器用以根據此些子資料串之中至少一部分子資料串來產生同位資訊,將此同位資訊儲存在緩衝記憶體中並且該緩衝記憶體中移除上述第一資料。 Furthermore, an exemplary embodiment of the present invention provides a memory storage device including a connector, a rewritable non-volatile memory module, and a memory controller. The connector is for coupling to the host system. The rewritable non-volatile memory module has at least one memory die, the at least one memory die includes a plurality of physical erase units, and each physical erase unit includes a plurality of physical stylization units. The memory controller has a buffer memory and is coupled to the connector and the rewritable non-volatile memory module. The memory controller is configured to receive the first write command and the first data corresponding to the write command from the host system and temporarily store the first data into the buffer memory, wherein the first data includes a plurality of sub-data strings. In addition, the memory controller is further configured to transfer the sub-data strings from the buffer memory to the rewritable non-volatile memory module to write the sub-data strings to at least one of the physical erasing units. A first entity is erased in the unit. In addition, the memory controller is configured to generate the parity information according to at least a part of the sub-data strings of the sub-data strings, and store the co-located information in the buffer memory and remove the first data from the buffer memory.

在本發明的一範例實施例中,在上述根據此些子資料串之中至少一部分子資料串來產生同位資訊的運作中,上述記憶體控制器依據所有的子資料串來產生上述同位資訊。 In an exemplary embodiment of the present invention, in the foregoing operation of generating the parity information according to at least a part of the sub-data strings of the sub-data strings, the memory controller generates the co-located information according to all the sub-data strings.

在本發明的一範例實施例中,上述每一實體抹除單元的實體程式化單元包括多個下實體程式化單元與多個上實體程式化單元,寫入資料至下實體程式化單元的速度快於寫入資料至上實體程式化單元。並且,在根據此些子資料串之中至少一部分子資料串來產生上述同位資訊的運作中,記憶體控制器根據儲存此些子資料串的實體程式化單元識別此些子資料串之中的至少一第一子資料串並且根據此第一子資料串產生同位資訊,其中第一子資料串被儲存在下實體程式化單元之中的至少一第一下實體程式化單元並且對應此至少一第一下實體程式化單元的至少一第一上實體程式化單元未儲存資料。 In an exemplary embodiment of the present invention, the physical stylization unit of each of the physical erasing units includes a plurality of lower physical stylized units and a plurality of upper physical stylized units, and the speed of writing data to the lower physical stylizing unit Faster than writing data to the upper stylized unit. And, in the operation of generating the above-mentioned information according to at least a part of the sub-data strings of the sub-data strings, the memory controller identifies the sub-data strings according to the entity stylizing unit storing the sub-data strings. And generating at least one first sub-data string according to the first sub-data string, wherein the first sub-data string is stored in at least one first lower physical stylized unit among the lower physical stylized units and corresponds to the at least one At least one of the first upper stylized units of the entity stylized unit does not store data.

在本發明的一範例實施例中,上述記憶體控制器更用以在將上述同位資訊儲存在緩衝記憶體中並且從緩衝記憶體中移除上述第一資料之後,從主機系統接收第二寫入指令與對應第二寫入指令的第二資料。 In an exemplary embodiment of the present invention, the memory controller is further configured to receive the second write from the host system after storing the parity information in the buffer memory and removing the first data from the buffer memory. The input instruction and the second data corresponding to the second write command.

在本發明的一範例實施例中,上述記憶體控制器更用以判斷從緩衝記憶體中將第二資料寫入至上述第一實體抹除單元中時是否發生程式化錯誤。倘若發生程式化錯誤時,記憶體控制器使用儲存在緩衝記憶體中的同位資訊來解碼儲存在上述至少一第一實體抹除單元中的至少一部分子資料串以校正此至少一部分子 資料串中的至少一錯誤子資料串。 In an exemplary embodiment of the invention, the memory controller is further configured to determine whether a stylization error occurs when the second data is written into the first physical erasing unit from the buffer memory. In the event of a stylization error, the memory controller uses the parity information stored in the buffer memory to decode at least a portion of the sub-data strings stored in the at least one first physical erasing unit to correct the at least one portion. At least one error substring in the data string.

在本發明的一範例實施例中,倘若從緩衝記憶體中將第二資料寫入至第一實體抹除單元中時未發生程式化錯誤時,記憶體控制器更用以從緩衝記憶體中移除上述同位資訊。 In an exemplary embodiment of the present invention, if no stylization error occurs when the second data is written into the first physical erasing unit from the buffer memory, the memory controller is further used from the buffer memory. Remove the above information.

在本發明的一範例實施例中,上述記憶體控制器根據至少一部分的第二資料產生另一同位資訊並將此另一同位資訊儲存至緩衝記憶體中並刪除第二資料。 In an exemplary embodiment of the present invention, the memory controller generates another parity information according to at least a portion of the second data and stores the other parity information in the buffer memory and deletes the second data.

在本發明的一範例實施例中,上述記憶體控制器更用以分別地為此些子資料串產生多個錯誤檢查與校正碼。並且,在從緩衝記憶體中將此些子資料串傳送至可複寫式非揮發性記憶體模組以寫入此些子資料串至此些實體抹除單元之中的至少一第一實體抹除單元中的運作中,上述記憶體控制器將此些子資料串與分別地對應此些子資料串的錯誤檢查與校正碼傳送至可複寫式非揮發性記憶體模組以寫入此些子資料串與分別地對應此些子資料串的錯誤檢查與校正碼至上述至少一第一實體抹除單元的實體程式化單元中。 In an exemplary embodiment of the present invention, the memory controller is further configured to generate a plurality of error check and correction codes for the sub-data strings respectively. And transferring the sub-data strings from the buffer memory to the rewritable non-volatile memory module to write the sub-data strings to at least one of the physical erasing units In the operation of the unit, the memory controller transmits the sub-data strings and the error check and correction codes respectively corresponding to the sub-data strings to the rewritable non-volatile memory module to write the sub-data modules. The data string and the error check and correction code respectively corresponding to the sub-data strings are respectively added to the entity stylizing unit of the at least one first entity erasing unit.

在本發明的一範例實施例中,在上述根據此些子資料串之中至少一部分子資料串來產生同位資訊的運作中,每當將此些子資料串之中的其中一個子資料串寫入至第一實體抹除單元時,上述記憶體控制器根據此其中一個子資料串與先前同位資訊來產生此同位資訊。 In an exemplary embodiment of the present invention, in the operation of generating the parity information according to at least a part of the sub-data strings of the sub-data strings, each of the sub-data strings is written. When entering the first physical erasing unit, the memory controller generates the parity information according to the one of the sub-data strings and the previous parity information.

基於上述,本範例實施例的資料寫入方法、記憶體控制 器與記憶體儲存裝置能夠在使用較少的緩衝記憶體空間下執行寫入指令同時確保資料的正確性。 Based on the above, the data writing method and the memory control of the exemplary embodiment The memory and memory storage device can perform write instructions while using less buffer memory space while ensuring the correctness of the data.

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

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

1100‧‧‧電腦 1100‧‧‧ computer

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

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

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

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

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

1202‧‧‧滑鼠 1202‧‧‧ Mouse

1204‧‧‧鍵盤 1204‧‧‧ keyboard

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

204‧‧‧主機介面 204‧‧‧Host interface

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

208‧‧‧緩衝記憶體 208‧‧‧buffer memory

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

212‧‧‧同位資訊編碼與解碼電路 212‧‧‧Same Information Encoding and Decoding Circuit

252‧‧‧記憶胞陣列 252‧‧‧ memory cell array

254‧‧‧控制電路 254‧‧‧Control circuit

256‧‧‧資料輸入/輸出緩衝器 256‧‧‧Data input/output buffer

256a‧‧‧第一緩衝區 256a‧‧‧ first buffer

256b‧‧‧第二緩衝區 256b‧‧‧second buffer zone

304(0)~304(R)‧‧‧實體抹除單元 304(0)~304(R)‧‧‧ physical erasing unit

701(0)~701(255)‧‧‧實體程式化單元 701(0)~701(255)‧‧‧ entity stylized unit

400‧‧‧記憶體晶粒 400‧‧‧ memory grain

402‧‧‧資料區 402‧‧‧Information area

404‧‧‧備用區 404‧‧‧ spare area

406‧‧‧系統區 406‧‧‧System Area

408‧‧‧取代區 408‧‧‧Replaced area

LBA(0)~LBA(H)‧‧‧邏輯位址 LBA(0)~LBA(H)‧‧‧ logical address

DATA1、DATA2‧‧‧資料 DATA1, DATA2‧‧‧ data

P1、P2‧‧‧同位資訊 P1, P2‧‧‧Information

SDATA1、SDATA2、SDATA3、SDATA4、SDATA5、SDATA6、SDAT7、SDATA8、SDATA9、SDATA10、SDATA11、SDATA12‧‧‧子資料串 SDATA1, SDATA2, SDATA3, SDATA4, SDATA5, SDATA6, SDAT7, SDATA8, SDATA9, SDATA10, SDATA11, SDATA12‧‧‧ sub-data strings

ECC1、ECC2、ECC3、ECC4、ECC5、ECC6、ECC7、ECC8、ECC9、ECC10、ECC11、ECC12‧‧‧錯誤檢查與校正碼 ECC1, ECC2, ECC3, ECC4, ECC5, ECC6, ECC7, ECC8, ECC9, ECC10, ECC11, ECC12‧‧‧ Error checking and correction code

S1601、S1603、S1605、S1607、S1609、S1611、S1613‧‧‧資料寫入方法的步驟 S1601, S1603, S1605, S1607, S1609, S1611, S1613‧‧‧ steps of data writing method

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

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

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

圖4是繪示根據本範例實施例所繪示之記憶體儲存裝置的概要方塊圖。 FIG. 4 is a schematic block diagram of a memory storage device according to an embodiment of the present invention.

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

圖6是根據本發明一範例實施例所繪示的可複寫式非揮發性記憶體模組的示意圖。 FIG. 6 is a schematic diagram of a rewritable non-volatile memory module according to an exemplary embodiment of the invention.

圖7是根據本發明一範例實施例所繪示的實體抹除單元中實體程式化單元的佈局示意圖。 FIG. 7 is a schematic diagram of a layout of an entity stylizing unit in a physical erasing unit according to an exemplary embodiment of the invention.

圖8與圖9是根據一範例實施例所繪示之管理可複寫式非揮 發性記憶體模組的範例示意圖。 8 and FIG. 9 are diagrams illustrating management of rewritable non-swings according to an exemplary embodiment. A schematic diagram of an example of a hair memory module.

圖10~12是根據本發明一範例實施例所繪示的寫入資料至實體程式化單元的範例。 10-12 are examples of writing data to a physical stylized unit according to an exemplary embodiment of the invention.

圖13~15是根據本發明一範例實施例所繪示的寫入資料至實體程式化單元的另一範例。 13-15 are another example of writing data to a physical stylization unit according to an exemplary embodiment of the invention.

圖16是根據一範例實施例所繪示的資料寫入的流程圖。 FIG. 16 is a flow chart of data writing according to an exemplary embodiment.

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

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

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

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

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

圖4是繪示根據本範例實施例所繪示之記憶體儲存裝置的概要方塊圖。 FIG. 4 is a schematic block diagram of a memory storage device according to an embodiment of the present invention.

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

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

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

可複寫式非揮發性記憶體模組106是耦接至記憶體控制器104,並且用以儲存主機系統1000所寫入之資料。 The rewritable non-volatile memory module 106 is coupled to the memory controller 104 and is used to store data written by the host system 1000.

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

請參照圖5,記憶體控制器104包括記憶體管理電路202、主機介面204、記憶體介面206、緩衝記憶體208、錯誤檢查與校正電路210與同位資訊編碼與解碼電路212。 Referring to FIG. 5, the memory controller 104 includes a memory management circuit 202, a host interface 204, a memory interface 206, a buffer memory 208, an error checking and correction circuit 210, and a parity information encoding and decoding circuit 212.

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

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

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

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

主機介面204是耦接至記憶體管理電路202並且用以接收與識別主機系統1000所傳送的指令與資料。也就是說,主機系統1000所傳送的指令與資料會透過主機介面204來傳送至記憶體管理電路202。在本範例實施例中,主機介面204是相容於SATA標準。然而,必須瞭解的是本發明不限於此,主機介面204亦可以是相容於PATA標準、IEEE 1394標準、PCI Express標準、USB標準、SD標準、UHS-I介面標準、UHS-II介面標準、MS標準、 MMC標準、eMMC介面標準、UFS介面標準、CF標準、IDE標準或其他適合的資料傳輸標準。 The host interface 204 is coupled to the memory management circuit 202 and is configured to receive and identify instructions and data transmitted by the host system 1000. That is to say, the instructions and data transmitted by the host system 1000 are transmitted to the memory management circuit 202 through the host interface 204. In the present exemplary embodiment, host interface 204 is compatible with the SATA standard. However, it must be understood that the present invention is not limited thereto, and the host interface 204 may be compatible with the PATA standard, the IEEE 1394 standard, the PCI Express standard, the USB standard, the SD standard, the UHS-I interface standard, and the UHS-II interface standard. MS standard, MMC standard, eMMC interface standard, UFS interface standard, CF standard, IDE standard or other suitable data transmission standard.

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

緩衝記憶體208是耦接至記憶體管理電路202並且用以暫存來自於主機系統1000的資料與指令或來自於可複寫式非揮發性記憶體模組106的資料。 The buffer memory 208 is coupled to the memory management circuit 202 and is used to temporarily store data and instructions from the host system 1000 or data from the rewritable non-volatile memory module 106.

錯誤檢查與校正電路210是耦接至記憶體管理電路202並且用以執行錯誤檢查與校正程序以確保資料的正確性。在本範例實施例中,當記憶體管理電路202從主機系統1000中接收到寫入指令時,錯誤檢查與校正電路210會為對應此寫入指令的資料產生對應的錯誤檢查與校正碼(Error Checking and Correcting Code,ECC Code),並且記憶體管理電路202會將對應此寫入指令的資料與對應的錯誤檢查與校正碼寫入至可複寫式非揮發性記憶體模組106中。之後,當記憶體管理電路202從可複寫式非揮發性記憶體模組106中讀取資料時會同時讀取此資料對應的錯誤檢查與校正碼,並且錯誤檢查與校正電路210會依據此錯誤檢查與校正碼對所讀取的資料執行錯誤檢查與校正程序。具體來說,錯誤檢查與校正電路210會被設計能夠校正一數目的錯誤位元(以下稱為最大可校正錯誤位元數)。例如,最大可校正錯誤位元數為24。倘若發 生在所讀取之資料的錯誤位元的數目非大於24個時,錯誤檢查與校正電路210就能夠依據錯誤檢查與校正碼將錯誤位元校正回正確的值。反之,錯誤檢查與校正電路210就會回報錯誤校正失敗且記憶體管理電路202會將指示資料已遺失的訊息傳送給主機系統1000。 The error checking and correction circuit 210 is coupled to the memory management circuit 202 and is used to perform error checking and correction procedures to ensure the correctness of the data. In the present exemplary embodiment, when the memory management circuit 202 receives a write command from the host system 1000, the error check and correction circuit 210 generates a corresponding error check and correction code (Error) for the data corresponding to the write command. Checking and Correcting Code (ECC Code), and the memory management circuit 202 writes the data corresponding to the write command and the corresponding error check and correction code into the rewritable non-volatile memory module 106. Then, when the memory management circuit 202 reads the data from the rewritable non-volatile memory module 106, the error check and correction code corresponding to the data is simultaneously read, and the error check and correction circuit 210 according to the error. Check and calibration code Perform error checking and calibration procedures on the data read. In particular, error checking and correction circuit 210 will be designed to correct a number of error bits (hereinafter referred to as the maximum number of correctable error bits). For example, the maximum number of correctable error bits is 24. If it is issued When the number of error bits generated by the read data is not more than 24, the error check and correction circuit 210 can correct the error bit back to the correct value based on the error check and the correction code. Conversely, the error checking and correction circuit 210 will report an error correction failure and the memory management circuit 202 will transmit a message indicating that the data has been lost to the host system 1000.

同位資訊編碼與解碼電路212是耦接至記憶體管理電路202並且用以根據記憶體管理電路202的指示編碼暫存於緩衝記憶體208中欲寫入至多個實體程式化單元的多筆資料(即,主機系統1000欲寫入的資料)以產生同位資訊。此外,同位資訊編碼與解碼電路212亦可根據記憶體管理電路202的指示以同位資訊解碼儲存在多個實體程式化單元的資料以修正資料內的錯誤資料。也就是說,倘若此些實體程式化單元的其中一個實體程式化單元上的資料出現錯誤資料時,同位資訊編碼與解碼電路212能夠依據所產生的同位資訊來解碼此些實體程式化單元上的資料以修正錯誤資料。在此,同位資訊編碼與解碼電路212所產生的同位資訊可以是奇偶校正碼(parity checking code)、通道編碼(channel coding)或是其他類型。例如,漢明碼(hamming code)、低密度奇偶檢查碼(low density parity check code,LDPC code)、渦旋碼(turbo code)或里德-所羅門碼(Reed-solomon code,RS code)。例如,若資料與同位資訊的長度比例為m:n,則表示m筆資料會對應至n筆同位資訊,其中m與n為正整數並且在資料錯誤筆數小於n的情況下錯誤資料都可藉由同位資訊來修正。一般來說,正整數m會 大於正整數n,但本發明並不在此限。並且,本發明也不限制正整數m與正整數n的值。 The collocation information encoding and decoding circuit 212 is coupled to the memory management circuit 202 and configured to temporarily store a plurality of data to be written to the plurality of physical stylizing units in the buffer memory 208 according to the indication of the memory management circuit 202 ( That is, the data that the host system 1000 wants to write) to generate the parity information. In addition, the parity information encoding and decoding circuit 212 can also decode the data stored in the plurality of entity stylizing units with the parity information according to the instruction of the memory management circuit 202 to correct the error data in the data. That is, if an error message occurs in the data on one of the entity stylized units of the entity stylized units, the parity information encoding and decoding circuit 212 can decode the entity stylized units according to the generated parity information. Information to correct the error data. Here, the co-located information generated by the parity information encoding and decoding circuit 212 may be a parity checking code, a channel coding, or the like. For example, a hamming code, a low density parity check code (LDPC code), a turbo code, or a Reed-solomon code (RS code). For example, if the ratio of the length of the data to the information of the same information is m:n, it means that the m-pen data will correspond to n pen-like information, where m and n are positive integers and the error data can be obtained if the number of data errors is less than n. Corrected by the same information. In general, a positive integer m will Greater than a positive integer n, but the invention is not limited thereto. Moreover, the present invention does not limit the values of the positive integer m and the positive integer n.

圖6是根據本發明一範例實施例所繪示的可複寫式非揮發性記憶體模組106的示意圖。 FIG. 6 is a schematic diagram of a rewritable non-volatile memory module 106 according to an exemplary embodiment of the invention.

可複寫式非揮發性記憶體模組106包括記憶體晶粒400。記憶體晶粒400包括記憶胞陣列252、控制電路254與資料輸入/輸出緩衝器256。 The rewritable non-volatile memory module 106 includes a memory die 400. The memory die 400 includes a memory cell array 252, a control circuit 254, and a data input/output buffer 256.

記憶胞陣列252包括實體抹除單元304(0)~304(R)。每一實體抹除單元分別具有至少一個實體程式化單元,並且屬於同一個實體抹除單元之實體程式化單元可被獨立地寫入且被同時地抹除。例如,每一實體抹除單元是由128個實體程式化單元所組成。然而,必須瞭解的是,本發明不限於此,每一實體抹除單元亦可由64個實體程式化單元、256個實體程式化單元或其他任意個實體程式化單元所組成。 Memory cell array 252 includes physical erase units 304(0)-304(R). Each physical erasing unit has at least one physical stylized unit, and the physical stylized units belonging to the same physical erasing unit can be independently written and erased simultaneously. For example, each physical erase unit is composed of 128 physical stylized units. However, it must be understood that the present invention is not limited thereto, and each physical erasing unit may also be composed of 64 physical stylized units, 256 physical stylized units, or any other physical stylized units.

更詳細來說,實體抹除單元為抹除之最小單位。亦即,每一實體抹除單元含有最小數目之一併被抹除之記憶胞。實體程式化單元為程式化的最小單元。即,實體程式化單元為寫入資料的最小單元。 In more detail, the physical erase unit is the smallest unit of erase. That is, each physical erase unit contains one of the smallest number of erased memory cells. The entity stylized unit is the smallest unit that is stylized. That is, the entity stylized unit is the smallest unit that writes data.

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

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

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

類似地,在TLC NAND型快閃記憶體中,每個記憶胞可儲存3個位元的資料,其中每一個儲存狀態(即,”111”、”110”、”101”、”100”、”011”、”010”、”001”與”000”)包括左側算起之第1個位元的LSB、從左側算起之第2個位元的中間有效位元(Center Significant Bit,CSB)以及從左側算起之第3個位元的MSB。因此,排列在同一條字元線上的數個記憶胞可組成3個實體程式化單元,其中由此些記憶胞之LSB所組成的實體程式化單元稱為下實體程式化單元,由此些記憶胞之CSB所組成的實體程式化單元稱為中實體程式化單元,並且由此些記憶胞之MSB所組成的實體程式化單元稱為上實體程式化單元。同樣地,相對於中實體程式化單元與上實體程式化單元來說,下實體程式化單元具有較高的穩定度並且寫入資料至下實體程式化單元的速度快於寫入資料至中實體程式化單元與上實體程式化單元的速度。 Similarly, in TLC NAND type flash memory, each memory cell can store 3 bits of data, each of which stores state (ie, "111", "110", "101", "100", "011", "010", "001" and "000") include the LSB of the first bit from the left and the intermediate significant bit of the second bit from the left (Center Significant Bit, CSB) ) and the MSB of the third bit from the left. Therefore, a plurality of memory cells arranged on the same character line can be composed into three physical stylized units, wherein the physical stylized unit composed of the LSBs of the memory cells is called a lower physical stylized unit, and thus the memory The entity stylized unit composed of the CSB of the cell is called the medium entity stylized unit, and the entity stylized unit composed of the MSBs of the memory cells is referred to as the upper entity stylized unit. Similarly, the lower entity stylized unit has higher stability than the middle entity stylized unit and the upper entity stylized unit, and the data is written to the lower physical stylized unit faster than the write data to the medium entity. The speed of the stylized unit and the upper stylized unit.

每一實體程式化單元通常包括資料位元區與冗餘位元區。資料位元區包含多個實體存取位址用以儲存使用者的資料,而冗餘位元區用以儲存系統的資料(例如,控制資訊與錯誤更正碼)。在本範例實施例中,每一個實體程式化單元的資料位元區中會包含4個實體存取位址,且一個實體存取位址的大小為512位元組(byte)。然而,在其他範例實施例中,資料位元區中也可包含數目更多或更少的實體存取位址,本發明並不限制實體存取位址的大小以及個數。例如,在一範例實施例中,實體抹除單元為實 體區塊,並且實體程式化單元為實體頁面或實體扇區,但本發明不以此為限。 Each entity stylized unit typically includes a data bit area and a redundant bit area. The data bit area includes a plurality of physical access addresses for storing user data, and the redundant bit area is used to store system data (eg, control information and error correction codes). In this exemplary embodiment, each physical stylized unit has four physical access addresses in the data bit area, and one physical access address has a size of 512 bytes. However, in other exemplary embodiments, a greater or lesser number of physical access addresses may be included in the data bit area, and the present invention does not limit the size and number of physical access addresses. For example, in an exemplary embodiment, the physical erasing unit is The body block, and the entity stylized unit is a physical page or a physical sector, but the invention is not limited thereto.

在本範例實施例中,可複寫式非揮發性記憶體模組106為多階儲存單元(Multi Level Cell,MLC)反及(NAND)型快閃記憶體模組。然而,本發明不限於此,可複寫式非揮發性記憶體模組106亦可是單階儲存單元(Single Level Cell,SLC)NAND型快閃記憶體模組、複數階儲存單元(Trinary Level Cell,TLC)NAND型快閃記憶體模組、其他快閃記憶體模組或其他具有相同特性的記憶體模組。 In the exemplary embodiment, the rewritable non-volatile memory module 106 is a multi-level cell (MLC) inverse (NAND) type flash memory module. However, the present invention is not limited thereto, and the rewritable non-volatile memory module 106 may also be a single-level storage unit (SLC) NAND-type flash memory module, and a multi-level storage unit (Trinary Level Cell, TLC) NAND flash memory module, other flash memory modules or other memory modules with the same characteristics.

控制電路254用以根據來自於記憶體控制器104的指令將資料程式化至記憶胞陣列252或從記憶胞陣列252中讀取資料。 The control circuit 254 is configured to program data into or read data from the memory cell array 252 according to instructions from the memory controller 104.

資料輸入/輸出緩衝器256包括第一緩衝區256a與第二緩衝區256b。第一緩衝區256a與第二緩衝區256b彼此獨立,且可分別具有相同的容量。例如,第一緩衝區256a與第二緩衝區256b的容量皆為一個實體程式化單元的容量,用以暫存欲寫入至記憶胞陣列202的資料或從記憶胞陣列202中所讀取的資料。 The data input/output buffer 256 includes a first buffer 256a and a second buffer 256b. The first buffer 256a and the second buffer 256b are independent of each other and may have the same capacity, respectively. For example, the capacities of the first buffer 256a and the second buffer 256b are both the capacity of a physical stylized unit for temporarily storing data to be written to or read from the memory cell array 202. data.

在可複寫式非揮發性記憶體模組106中寫入資料的過程包括資料傳輸以及資料程式化兩個部分。在資料傳輸的部分,記憶體控制器104(或記憶體管理電路202)會將欲寫入的頁資料傳輸至第一緩衝區256a,並且之後,欲寫入的頁資料會被搬移至第二緩衝區256b。而在資料程式化的部分,欲寫入的頁資料會從第二緩衝區256b中程式化至記憶胞陣列252。特別是,當欲寫入的 頁資料從第一緩衝區256a搬移至第二緩衝區256b之後,記憶體控制器104(或記憶體管理電路202)就會從可複寫式非揮發性記憶體模組106中接收到完成寫入指令的確認訊息,而可再對可複寫式非揮發性記憶體模組106傳輸(或下達)下一個指令。在此,第一緩衝區256a亦可稱為資料快取(data cache)區,而第二緩衝區256b亦可稱為頁面緩衝(page buffer)區,並且透過第二緩衝區256b的寫入運作可稱為快取程式化(Cache Program)運作。 The process of writing data in the rewritable non-volatile memory module 106 includes data transmission and data stylization. In the portion of the data transfer, the memory controller 104 (or the memory management circuit 202) transfers the page data to be written to the first buffer 256a, and thereafter, the page data to be written is moved to the second page. Buffer 256b. In the stylized portion of the data, the page data to be written is programmed from the second buffer 256b to the memory cell array 252. Especially when you want to write After the page data is moved from the first buffer 256a to the second buffer 256b, the memory controller 104 (or the memory management circuit 202) receives the completed write from the rewritable non-volatile memory module 106. The command confirmation message can be transmitted (or released) to the rewritable non-volatile memory module 106. Here, the first buffer 256a may also be referred to as a data cache area, and the second buffer 256b may also be referred to as a page buffer area, and is operated by the write operation of the second buffer 256b. It can be called a Cache Program operation.

值得一提的是,在本發明範例實施例中,記憶體控制器104(或記憶體管理電路202)亦可指示可複寫式非揮發性記憶體模組106不使用第二緩衝區256b來寫入資料。例如,在資料輸入/輸出緩衝器256未配置第二緩衝區256b或者基於某些因素而不使用第二緩衝區256b的例子中,可複寫式非揮發性記憶體模組106也可根據記憶體控制器104(或記憶體管理電路202)的指令直接將欲寫入的頁資料從第一緩衝區256a中程式化至記憶胞陣列252中。在此例子中,記憶體管理電路202必須等到可複寫式非揮發性記憶體模組106將頁資料從第一緩衝區256a中程式化至記憶胞陣列252之後才會接收到完成寫入指令的確認訊息。 It should be noted that, in an exemplary embodiment of the present invention, the memory controller 104 (or the memory management circuit 202) may also instruct the rewritable non-volatile memory module 106 to write without using the second buffer 256b. Enter the information. For example, in the example where the data input/output buffer 256 is not configured with the second buffer 256b or based on some factors without using the second buffer 256b, the rewritable non-volatile memory module 106 can also be based on the memory. The instructions of controller 104 (or memory management circuit 202) directly program the page data to be written from first buffer 256a into memory cell array 252. In this example, the memory management circuit 202 must wait until the rewritable non-volatile memory module 106 programs the page data from the first buffer 256a to the memory cell array 252 before receiving the write command. Confirmation message.

必須了解的是,本發明不限於圖6的範例,並且在另一範例實施例中,資料輸入/輸出緩衝器256亦可只具有一個緩衝區或大於2個緩衝區。 It must be understood that the present invention is not limited to the example of FIG. 6, and in another exemplary embodiment, the data input/output buffer 256 may also have only one buffer or more than two buffers.

圖7是根據本發明一範例實施例所繪示的實體抹除單元中實體程式化單元的佈局示意圖。 FIG. 7 is a schematic diagram of a layout of an entity stylizing unit in a physical erasing unit according to an exemplary embodiment of the invention.

請參照圖7,在此以MLC NAND快閃記憶體的實體抹除單元為例進行說明並且假設每個實體抹除單元包括256個實體程式化單元。實體抹除單元304(0)包括實體程式化單元701(0)~701(255)。實體程式化單元701(0)與實體程式化單元701(4)位於同一條字元線上,實體程式化單元701(1)與實體程式化單元701(5)位於同一條字元線上,實體程式化單元701(2)與實體程式化單元701(8)位於同一條字元線上,實體程式化單元701(3)與實體程式化單元701(9)位於同一條字元線上,實體程式化單元701(6)與實體程式化單元701(12)位於同一條字元線上,實體程式化單元701(7)與實體程式化單元701(13)位於同一條字元線上,實體程式化單元701(10)與實體程式化單元701(16)位於同一條字元線上,實體程式化單元701(11)與實體程式化單元701(17)位於同一條字元線上,並且以此類推。在此,實體程式化單元701(0)、701(1)、701(2)、701(3)、701(6)、701(7)、710(10)、710(11)、701(14)、701(15)、...、701(250)與701(251)屬於下實體程式單元,並且實體程式化單元701(4)、701(5)、701(8)、701(9)、701(12)、701(13)、710(16)、710(17)、...、701(252)、701(253)、701(254)與701(255)屬於上實體程式單元。必須了解的是,圖7所示的配置方式僅為範例,本發明不限於此。 Referring to FIG. 7, the physical erasing unit of the MLC NAND flash memory is taken as an example for explanation and it is assumed that each physical erasing unit includes 256 physical stylizing units. The entity erasing unit 304(0) includes entity stylized units 701(0)-701(255). The entity stylization unit 701(0) is located on the same character line as the entity stylization unit 701(4), and the entity stylization unit 701(1) and the entity stylization unit 701(5) are on the same character line, and the entity program The unit 701(2) is located on the same character line as the entity stylization unit 701(8), and the entity stylization unit 701(3) is located on the same word line as the entity stylization unit 701(9), and the entity stylized unit 701 (6) is located on the same character line as the entity stylization unit 701 (12), and the entity stylization unit 701 (7) is located on the same word line as the entity stylization unit 701 (13), and the entity stylization unit 701 ( 10) On the same word line as the entity stylization unit 701 (16), the entity stylization unit 701 (11) is on the same word line as the entity stylization unit 701 (17), and so on. Here, the entity stylized units 701(0), 701(1), 701(2), 701(3), 701(6), 701(7), 710(10), 710(11), 701(14 ), 701 (15), ..., 701 (250) and 701 (251) belong to the lower entity program unit, and the entity stylized units 701 (4), 701 (5), 701 (8), 701 (9) 701 (12), 701 (13), 710 (16), 710 (17), ..., 701 (252), 701 (253), 701 (254), and 701 (255) belong to the upper physical program unit. It should be understood that the configuration shown in FIG. 7 is merely an example, and the present invention is not limited thereto.

圖8與圖9是根據一範例實施例所繪示之管理可複寫式非揮發性記憶體模組的範例示意圖。 FIG. 8 and FIG. 9 are schematic diagrams showing examples of managing a rewritable non-volatile memory module according to an exemplary embodiment.

必須瞭解的是,在此描述可複寫式非揮發性記憶體模組 106之實體抹除單元的運作時,以“提取”、“交換”、“分組”、“輪替”等詞來操作實體抹除單元是邏輯上的概念。也就是說,可複寫式非揮發性記憶體模組之實體抹除單元的實際位置並未更動,而是邏輯上對可複寫式非揮發性記憶體模組的實體抹除單元進行操作。 It must be understood that the description of the rewritable non-volatile memory module is described herein. When the physical erase unit of 106 operates, it is a logical concept to operate the physical erase unit with words such as "extract", "swap", "group", and "rotation". That is to say, the actual position of the physical erasing unit of the rewritable non-volatile memory module is not changed, but the physical erasing unit of the rewritable non-volatile memory module is logically operated.

請參照圖8,記憶體控制器104(或記憶體管理電路202)會將可複寫式非揮發性記憶體模組106的實體抹除單元304(0)~304(R)邏輯地分組為(或指派至)資料區(data area)402、備用區(spare area)404、系統區(system area)406與取代區(replacement area)408。 Referring to FIG. 8, the memory controller 104 (or the memory management circuit 202) logically groups the physical erasing units 304(0)-304(R) of the rewritable non-volatile memory module 106 into ( Or assigned to a data area 402, a spare area 404, a system area 406, and a replacement area 408.

邏輯上屬於資料區402與備用區404的實體抹除單元是用以儲存來自於主機系統1000的資料。具體來說,資料區402的實體抹除單元(亦稱為資料實體抹除單元)是被視為已儲存資料的實體抹除單元,而備用區404的實體抹除單元(亦稱為備用實體抹除單元)是用以寫入新資料的實體抹除單元。例如,當從主機系統1000接收到寫入指令與欲寫入之資料時,記憶體控制器104(或記憶體管理電路202)會從備用區404中提取實體抹除單元,整理欲寫入之資料並且將資料寫入至所提取的實體抹除單元中。 The physical erasing unit logically belonging to the data area 402 and the spare area 404 is for storing data from the host system 1000. Specifically, the physical erasing unit (also referred to as a data entity erasing unit) of the data area 402 is a physical erasing unit that is regarded as stored data, and the physical erasing unit of the spare area 404 (also referred to as a standby entity) The erase unit is a physical erase unit for writing new data. For example, when receiving the write command and the data to be written from the host system 1000, the memory controller 104 (or the memory management circuit 202) extracts the physical erase unit from the spare area 404, and sorts out the write to be written. The data is written to the extracted physical erase unit.

邏輯上屬於系統區406的實體抹除單元是用以記錄系統資料,其中此系統資料包括關於記憶體晶片的製造商與型號、記憶體晶片的實體抹除單元數、每一實體抹除單元的實體程式化單 元數、映射表等。特別是,當實體抹除單元備用於寫入系統資料時,記憶體控制器104(或記憶體管理電路202)會在此實體抹除單元的實體程式化單元的冗餘位元區中記錄一個系統實體抹除單元標記,以識別此實體抹除單元是被用於儲存系統資料的系統實體抹除單元。值得一提的是,由於對於記憶體儲存裝置100來說,系統資料是相當重要的資料,因此,在可複寫式非揮發性記憶體模組106為MLC NAND型快閃記憶體模組或TLC NAND型快閃記憶體模組的範例實施例中,記憶體控制器104(或記憶體管理電路202)僅會使用系統實體抹除單元的下實體程式化單元來儲存系統資料,以確保資料的可靠度。 The physical erasing unit logically belonging to the system area 406 is for recording system data, wherein the system data includes the manufacturer and model of the memory chip, the number of physical erasing units of the memory chip, and the physical erasing unit of each entity. Entity stylized Yuan, mapping table, etc. In particular, when the physical erasing unit is ready for writing system data, the memory controller 104 (or the memory management circuit 202) records a redundant bit area of the physical stylizing unit of the physical erasing unit. The system entity erases the unit tag to identify that the entity erase unit is a system entity erase unit that is used to store system data. It is worth mentioning that since the system data is quite important for the memory storage device 100, the rewritable non-volatile memory module 106 is an MLC NAND type flash memory module or TLC. In an exemplary embodiment of the NAND flash memory module, the memory controller 104 (or the memory management circuit 202) only uses the lower entity stylizing unit of the system entity erase unit to store system data to ensure data. Reliability.

邏輯上屬於取代區408中的實體抹除單元是替代實體抹除單元。例如,可複寫式非揮發性記憶體模組106於出廠時會預留4%的實體抹除單元作為更換使用。也就是說,當資料區402、備用區404或系統區406中的實體抹除單元損毀時,預留於取代區408中的實體抹除單元是用以取代損壞的實體抹除單元(即,壞實體抹除單元(bad block))。因此,倘若取代區408中仍存有正常之實體抹除單元且發生實體抹除單元損毀時,記憶體控制器104(或記憶體管理電路202)會從取代區408中提取正常的實體抹除單元來更換損毀的實體抹除單元。倘若取代區408中無正常之實體抹除單元且發生實體抹除單元損毀時,則記憶體控制器104會將整個記憶體儲存裝置100宣告為寫入保護(write protect)狀態,而無法再寫入資料。 The physical erase unit logically belonging to the replacement area 408 is an alternative physical erase unit. For example, the rewritable non-volatile memory module 106 will reserve 4% of the physical erasing unit for replacement when it leaves the factory. That is, when the physical erasing unit in the data area 402, the spare area 404, or the system area 406 is damaged, the physical erasing unit reserved in the replacement area 408 is used to replace the damaged physical erasing unit (ie, Bad entity bad block). Therefore, if the normal physical erasing unit still exists in the replacement area 408 and the physical erasing unit is damaged, the memory controller 104 (or the memory management circuit 202) extracts the normal physical erasing from the replacement area 408. Unit to replace the damaged physical erase unit. If there is no normal physical erasing unit in the replacement area 408 and the physical erasing unit is damaged, the memory controller 104 declares the entire memory storage device 100 as a write protect state, and cannot write again. Enter the information.

特別是,資料區402、備用區404、系統區406與取代區408之實體抹除單元的數量會依據不同的記憶體規格而有所不同。此外,必須瞭解的是,在記憶體儲存裝置100的運作中,實體抹除單元關聯至資料區402、備用區404、系統區406與取代區408的分組關係會動態地變動。例如,當備用區404中的實體抹除單元損壞而被取代區408的實體抹除單元取代時,則原本取代區408的實體抹除單元會被關聯至備用區404。 In particular, the number of physical erase units of data area 402, spare area 404, system area 406, and replacement area 408 may vary depending on different memory specifications. In addition, it must be understood that in the operation of the memory storage device 100, the grouping relationship associated with the physical erasing unit to the data area 402, the spare area 404, the system area 406, and the replacement area 408 may dynamically change. For example, when the physical erase unit in the spare area 404 is corrupted and replaced by the physical erase unit of the replacement area 408, the physical erase unit of the original replacement area 408 is associated with the spare area 404.

請參照圖9,如上所述,資料區402與備用區404的實體抹除單元是以輪替方式來儲存主機系統1000所寫入之資料。在本範例實施例中,記憶體控制器104(或記憶體管理電路202)會配置邏輯位址LBA(0)~LBA(H)給主機系統1000以進行資料的存取。每個邏輯位址是由數個扇區(sector)所組成。例如,在本範例實施例中,每一邏輯位址是由4個扇區所組成。但本發明不限於此,在本發明另一範例實施例中,邏輯位址亦可是由8個扇區所組成或是由16個扇區所組成。在本範例實施例中,一個邏輯位址的大小是相同於一個實體程式化單元的大小,並且資料區402與備用區404的實體抹除單元的實體程式化單元的數目是大於邏輯位址的數目。 Referring to FIG. 9, as described above, the physical erasing unit of the data area 402 and the spare area 404 stores the data written by the host system 1000 in a rotating manner. In the present exemplary embodiment, the memory controller 104 (or the memory management circuit 202) configures the logical addresses LBA(0)~LBA(H) to the host system 1000 for accessing data. Each logical address is composed of several sectors. For example, in the present exemplary embodiment, each logical address is composed of 4 sectors. However, the present invention is not limited thereto. In another exemplary embodiment of the present invention, the logical address may also be composed of 8 sectors or 16 sectors. In the present exemplary embodiment, the size of one logical address is the same as the size of one physical stylized unit, and the number of physical stylized units of the physical erasing unit of the data area 402 and the spare area 404 is greater than the logical address. number.

例如,當記憶體控制器104(或記憶體管理電路202)開始使用實體抹除單元304(0)來儲存主機系統1000欲寫入的資料時,不管主機系統1000是寫入那個邏輯位址,記憶體控制器104(或記憶體管理電路202)會將資料寫入至實體抹除單元304(0)的實體程 式化單元;而當記憶體控制器104(或記憶體管理電路202)開始使用實體抹除單元304(1)來儲存主機系統1000欲寫入的資料時,不管主機系統1000是寫入那個邏輯位址,記憶體控制器104(或記憶體管理電路202)會將資料寫入至實體抹除單元304(1)的實體程式化單元中。也就是說,當寫入主機系統1000欲寫入的資料時,記憶體控制器104(或記憶體管理電路202)會使用一個實體抹除單元內的實體程式化單元來寫入資料,並且當此實體抹除單元內的實體程式化單元被使用完後才會再選擇另一個無儲存資料的實體抹除單元,並且在新選擇之實體抹除單元的實體程式化單元中繼續寫入資料。 For example, when the memory controller 104 (or the memory management circuit 202) starts to use the physical erasing unit 304(0) to store the data to be written by the host system 1000, regardless of the host system 1000 writing the logical address, The memory controller 104 (or the memory management circuit 202) writes the data to the physical process of the physical erasing unit 304(0). And when the memory controller 104 (or the memory management circuit 202) starts to use the physical erasing unit 304(1) to store the data to be written by the host system 1000, regardless of the host system 1000 writing the logic The address, memory controller 104 (or memory management circuit 202) will write the data to the entity stylizing unit of entity erase unit 304(1). That is, when writing the data to be written by the host system 1000, the memory controller 104 (or the memory management circuit 202) uses a physical stylizing unit in the physical erasing unit to write data, and when After the entity stylizing unit in the entity erasing unit is used, another physical erasing unit without storing data is selected, and the data is continuously written in the entity stylizing unit of the newly selected physical erasing unit.

為了識別每個邏輯位址的資料被儲存在那個實體程式化單元,在本範例實施例中,記憶體控制器104(或記憶體管理電路202)會記錄邏輯位址與實體程式化單元之間的映射關係。並且,當主機系統1000欲在扇區中存取資料時,記憶體控制器104(或記憶體管理電路202)會確認此扇區所屬的邏輯位址,並且在此邏輯位址所映射的實體程式化單元中來存取資料。例如,在本範例實施例中,記憶體控制器104(或記憶體管理電路202)會在可複寫式非揮發性記憶體模組106的系統區406中儲存邏輯位址映射表來記錄每一邏輯位址所映射的實體程式化單元,並且當欲存取資料時,記憶體控制器104(或記憶體管理電路202)會將邏輯位址映射表載入至緩衝記憶體208來維護。 In order to identify that each logical address is stored in that physical stylized unit, in the present exemplary embodiment, the memory controller 104 (or memory management circuit 202) records between the logical address and the physical stylized unit. Mapping relationship. Moreover, when the host system 1000 wants to access data in a sector, the memory controller 104 (or the memory management circuit 202) confirms the logical address to which the sector belongs, and the entity mapped in the logical address. Access the data in the stylized unit. For example, in the present exemplary embodiment, the memory controller 104 (or the memory management circuit 202) stores a logical address mapping table in the system area 406 of the rewritable non-volatile memory module 106 to record each The physical stylization unit to which the logical address is mapped, and when the data is to be accessed, the memory controller 104 (or the memory management circuit 202) loads the logical address mapping table into the buffer memory 208 for maintenance.

圖10~12是根據本發明一範例實施例所繪示的寫入資料 至實體程式化單元的範例。 10 to 12 are written data according to an exemplary embodiment of the invention. An example of a physical stylized unit.

請參照圖10~12,倘若從主機系統1000接收到一寫入指令(以下稱為第一寫入指令)及欲寫入至邏輯位址LBA(0)~LBA(3)的資料DATA1時,記憶體控制器104(或記憶體管理電路202)會將資料DATA1暫存至緩衝記憶體208,並且將資料DATA1根據實體程式化單元的大小整理成子資料串SDATA1、SDATA2、SDATA3與SDATA4。然後,記憶體控制器104(或錯誤檢查與校正電路210)會分別地為SDATA1、SDATA2、SDATA3與SDATA4產生錯誤檢查與校正碼ECC1、ECC2、ECC3、與ECC4。之後,記憶體控制器104(或記憶體管理電路202)會選取一個實體抹除單元(例如,實體程式化單元304(0))並且將子資料串SDATA1、SDATA2、SDATA3與SDATA4及錯誤檢查與校正碼ECC1、ECC2、ECC3、與ECC4分別且依序地程式化至實體程式化單元304(0)的實體程式化單元701(0)、701(1)、701(2)與701(3)。特別是,記憶體控制器104(或同位資訊編碼與解碼電路212)會根據子資料串SDATA1、SDATA2、SDATA3與SDATA4來產生同位資訊P1。然後,記憶體控制器104(或記憶體管理電路202)會將同位資訊P1暫存至緩衝記憶體208並且刪除暫存在緩衝記憶體208中的子資料串SDATA1、SDATA2、SDATA3與SDATA4。具體來說,由於儲存子資料串SDATA1、SDATA2、SDATA3與SDATA4的實體程式化單元701(0)、701(1)、701(2)與701(3)皆為下實體程式化單元,並且對應下實體程式化單元701(0)、701(1)、701(2)與701(3)的上 實體程式化單元710(4)、710(5)、710(8)、710(9)尚未被寫入資料。因此,若之後對對應下實體程式化單元701(0)、701(1)、701(2)與701(3)的上實體程式化單元710(4)、710(5)、710(8)、710(9)執行程式化並發生程式化錯誤時,儲存在下實體程式化單元701(0)、701(1)、701(2)與701(3)的資料可能會遺失。基此,在緩衝記憶體208中儲存對應子資料串SDATA1、SDATA2、SDATA3與SDATA4的同位資訊以取代完成地暫存子資料串SDATA1、SDATA2、SDATA3與SDATA4,可在減少所需的緩衝記憶體208的空間下,達到保護資料的效果。 Referring to FIGS. 10-12, if a write command (hereinafter referred to as a first write command) and a data DATA1 to be written to the logical addresses LBA(0) to LBA(3) are received from the host system 1000, The memory controller 104 (or the memory management circuit 202) temporarily stores the data DATA1 to the buffer memory 208, and organizes the data DATA1 into the sub-data strings SDATA1, SDATA2, SDATA3, and SDATA4 according to the size of the physical stylized unit. Then, the memory controller 104 (or the error check and correction circuit 210) generates error check and correction codes ECC1, ECC2, ECC3, and ECC4 for SDATA1, SDATA2, SDATA3, and SDATA4, respectively. Thereafter, the memory controller 104 (or the memory management circuit 202) selects a physical erasing unit (eg, the entity stylizing unit 304(0)) and associates the substrings SDATA1, SDATA2, SDATA3, and SDATA4 with error checking. Correction codes ECC1, ECC2, ECC3, and ECC4 are respectively sequentially and sequentially programmed to the entity stylized units 701(0), 701(1), 701(2) and 701(3) of the entity stylized unit 304(0). . In particular, the memory controller 104 (or the parity information encoding and decoding circuit 212) generates the parity information P1 based on the sub-data strings SDATA1, SDATA2, SDATA3, and SDATA4. Then, the memory controller 104 (or the memory management circuit 202) temporarily stores the parity information P1 to the buffer memory 208 and deletes the sub-data strings SDATA1, SDATA2, SDATA3, and SDATA4 temporarily stored in the buffer memory 208. Specifically, since the entity stylized units 701(0), 701(1), 701(2), and 701(3) storing the sub-data strings SDATA1, SDATA2, SDATA3, and SDATA4 are all lower-organized units, and corresponding Lower physical stylized units 701(0), 701(1), 701(2) and 701(3) The entity stylization units 710(4), 710(5), 710(8), 710(9) have not yet been written to the material. Therefore, if the upper entity stylized units 710(4), 710(5), 710(8) corresponding to the lower entity stylized units 701(0), 701(1), 701(2) and 701(3) are subsequently followed. When 710(9) performs stylization and a stylization error occurs, the data stored in the lower entity stylized units 701(0), 701(1), 701(2), and 701(3) may be lost. Therefore, the parity information of the corresponding sub-data strings SDATA1, SDATA2, SDATA3 and SDATA4 is stored in the buffer memory 208 instead of the completed temporary data substrings SDATA1, SDATA2, SDATA3 and SDATA4, which can reduce the required buffer memory. Under the space of 208, the effect of protecting data is achieved.

圖13~15是根據本發明一範例實施例所繪示的寫入資料至實體程式化單元的另一範例。 13-15 are another example of writing data to a physical stylization unit according to an exemplary embodiment of the invention.

請參照圖13~15,接續圖10~12,倘若再從主機系統1000接收到另一寫入指令(以下稱為第二寫入指令)及欲寫入至邏輯位址LBA(4)~LBA(11)的資料DATA2時,記憶體控制器104(或記憶體管理電路202)會將資料暫存至緩衝記憶體208,並且將資料DATA2根據實體程式化單元的大小整理成子資料串SDATA5、SDATA6、SDATA7、SDATA8、SDATA9、SDATA10、SDATA11與SDATA12。然後,記憶體控制器104(或錯誤檢查與校正電路210)會分別地為子資料串SDATA5、SDATA6、SDATA7、SDATA8、SDATA9、SDATA10、SDATA11與SDATA12產生錯誤檢查與校正碼ECC5、ECC6、ECC7、ECC8、ECC9、ECC10、ECC11與ECC12。之後,記憶體控制器104(或記憶體管理電路202)會將子資料串 SDATA5、SDATA6、SDATA7、SDATA8、SDATA9、SDATA10、SDATA11與SDATA12以及錯誤檢查與校正碼ECC5、ECC6、ECC7、ECC8、ECC9、ECC10、ECC11與ECC12分別且依序地程式化至實體程式化單元304(0)的實體程式化單元701(4)、701(5)、701(6)、701(7)、701(8)、701(9)、701(10)與701(11)。特別是,記憶體控制器104(或同位資訊編碼與解碼電路212)會根據子資料串SDATA7、SDATA8、SDATA11與SDATA12來產生同位資訊P2。然後,記憶體控制器104(或記憶體管理電路202)會將同位資訊P2暫存至緩衝記憶體208並且刪除暫存在緩衝記憶體208中的子資料串SDATA5、SDATA6、SDATA7、SDATA8、SDATA9、SDATA10、SDATA11與SDATA12。具體來說,由於儲存子資料串SDATA7、SDATA8、SDATA11與SDATA12的實體程式化單元701(6)、701(7)、701(10)與701(11)皆為下實體程式化單元,並且對應下實體程式化單元701(6)、701(7)、701(10)與701(11)的上實體程式化單元710(12)、710(13)、710(16)、710(17)尚未被寫入資料。因此,若之後對上實體程式化單元710(12)、710(13)、710(16)、710(17)執行程式化並發生程式化錯誤時,儲存在下實體程式化單元701(6)、701(7)、701(10)與701(11)的資料可能會遺失。基此,在緩衝記憶體208中儲存對應子資料串SDATA7、SDATA8、SDATA11與SDATA12的同位資訊以取代完成地暫存子資料串SDATA7、SDATA8、SDATA11與SDATA12,可在減少所需的緩衝記憶體208的空間下,達到保護資料的效果。 Please refer to FIG. 13~15, and continue to FIG. 10~12, if another write command (hereinafter referred to as a second write command) is received from the host system 1000 and is to be written to the logical address LBA(4)~LBA. When the data DATA2 of (11) is DATA2, the memory controller 104 (or the memory management circuit 202) temporarily stores the data to the buffer memory 208, and organizes the data DATA2 into the sub-data strings SDATA5 and SDATA6 according to the size of the physical stylized unit. , SDATA7, SDATA8, SDATA9, SDATA10, SDATA11 and SDATA12. Then, the memory controller 104 (or the error checking and correction circuit 210) generates error checking and correction codes ECC5, ECC6, ECC7 for the sub-data strings SDATA5, SDATA6, SDATA7, SDATA8, SDATA9, SDATA10, SDATA11 and SDATA12, respectively. ECC8, ECC9, ECC10, ECC11 and ECC12. After that, the memory controller 104 (or the memory management circuit 202) will substring the data. SDATA5, SDATA6, SDATA7, SDATA8, SDATA9, SDATA10, SDATA11 and SDATA12, and error checking and correction codes ECC5, ECC6, ECC7, ECC8, ECC9, ECC10, ECC11 and ECC12 are sequentially and sequentially programmed to the physical stylization unit 304 ( Entity stylized units 701 (4), 701 (5), 701 (6), 701 (7), 701 (8), 701 (9), 701 (10), and 701 (11). In particular, the memory controller 104 (or the parity information encoding and decoding circuit 212) generates the parity information P2 based on the sub-data strings SDATA7, SDATA8, SDATA11, and SDATA12. Then, the memory controller 104 (or the memory management circuit 202) temporarily stores the parity information P2 to the buffer memory 208 and deletes the sub-data strings SDATA5, SDATA6, SDATA7, SDATA8, SDATA9 temporarily stored in the buffer memory 208, SDATA10, SDATA11 and SDATA12. Specifically, since the entity stylized units 701 (6), 701 (7), 701 (10), and 701 (11) storing the sub-data strings SDATA7, SDATA8, SDATA11, and SDATA12 are all lower-organized units, and corresponding The upper entity stylized units 710(12), 710(13), 710(16), 710(17) of the lower entity stylized units 701(6), 701(7), 701(10) and 701(11) have not yet Was written to the data. Therefore, if the upper body stylized units 710 (12), 710 (13), 710 (16), 710 (17) are subsequently programmed and a stylized error occurs, the lower body stylized unit 701 (6) is stored. Information on 701(7), 701(10) and 701(11) may be lost. Therefore, the parity information of the corresponding sub-data strings SDATA7, SDATA8, SDATA11 and SDATA12 is stored in the buffer memory 208 instead of the completed temporary data substrings SDATA7, SDATA8, SDATA11 and SDATA12, which can reduce the required buffer memory. Under the space of 208, the effect of protecting data is achieved.

在本發明另一範例實施例中,記憶體控制器104(或記憶體管理電路202)會確認先前所儲存的子資料串SDATA1、SDATA2、SDATA3與SDATA4是否正確無誤,並且在先前所儲存的子資料串SDATA1、SDATA2、SDATA3與SDATA4正確無誤時從緩衝記憶體208中刪除同位資訊P1。另外,在另一範例實施例中,記憶體控制器104(或記憶體管理電路202)亦可在緩衝記憶體208的空間不足時才刪除同位資訊P1。 In another exemplary embodiment of the present invention, the memory controller 104 (or the memory management circuit 202) confirms whether the previously stored sub-data strings SDATA1, SDATA2, SDATA3, and SDATA4 are correct and are previously stored. When the data strings SDATA1, SDATA2, SDATA3, and SDATA4 are correct, the parity information P1 is deleted from the buffer memory 208. In addition, in another exemplary embodiment, the memory controller 104 (or the memory management circuit 202) may also delete the parity information P1 when the buffer memory 208 has insufficient space.

在圖13~15的範例中,倘若在將子資料串SDATA5、SDATA6、SDATA9或SDATA10程式化實體程式化單元701(4)、701(5)、701(8)或701(9)時發生程式化錯誤並且導致子資料串SDATA1、SDATA2、SDATA3或SDATA4出現錯誤資料時,記憶體控制器104(或記憶體管理電路202)會根據同位資訊P1以及目前儲存在實體程式化單元701(0)、701(1)、701(2)與701(3)的子資料串來校正錯誤資料(子資料串SDATA1、SDATA2、SDATA3或SDATA4)。至於發生程式化錯誤的子資料串SDATA5、SDATA6、SDATA9或SDATA10,因緩衝記憶體208仍保留有此些子資料串,而不會遺失。 In the examples of FIGS. 13-15, the program occurs if the substring SDATA5, SDATA6, SDATA9 or SDATA10 is programmed into the stylized unit stylization unit 701(4), 701(5), 701(8) or 701(9). When the error occurs and the error data is caused by the substring SDATA1, SDATA2, SDATA3 or SDATA4, the memory controller 104 (or the memory management circuit 202) is stored in the entity stylizing unit 701(0) according to the parity information P1, The sub-data strings of 701(1), 701(2), and 701(3) are used to correct the error data (sub-string SDATA1, SDATA2, SDATA3, or SDATA4). As for the sub-data string SDATA5, SDATA6, SDATA9 or SDATA10 in which the stylization error has occurred, the buffer memory 208 still retains these sub-data strings without being lost.

值得一提的是,儘管在本範例實施例中,記憶體控制器104(或記憶體管理電路202)會識別出哪些已被寫入資料的下實體程式化所對應的上實體程式化單元未被程式化,並且記憶體控制器104(或同位資訊編碼與解碼電路212)針對所識別之下實體程式化單元上的子資料串來產生同位資訊,但本發明不限於此。例如, 在本發明另一範例實施例中,記憶體控制器104(或同位資訊編碼與解碼電路212)亦可對此次寫入指令所欲寫入的所有子資料串來產生同位資訊。又例如,在本發明另一範例實施例中,記憶體控制器104(或同位資訊編碼與解碼電路212)亦可在每寫一筆子資料至實體程式化單元時,根據前一次寫入子資料至實體程式化單元所產生的先前同位資訊與目前所寫入的子資料來產生新的同位資訊。 It is worth mentioning that, in the present exemplary embodiment, the memory controller 104 (or the memory management circuit 202) recognizes which of the upper physical stylized units corresponding to the lower body stylization of the data has been written. It is programmed, and the memory controller 104 (or the co-located information encoding and decoding circuit 212) generates co-located information for the sub-data strings on the identified underlying stylized unit, but the invention is not limited thereto. E.g, In another exemplary embodiment of the present invention, the memory controller 104 (or the parity information encoding and decoding circuit 212) may also generate the parity information for all the sub-data strings to be written by the write command. For another example, in another exemplary embodiment of the present invention, the memory controller 104 (or the parity information encoding and decoding circuit 212) may also write the sub-data according to the previous time each time a sub-data is written to the physical stylizing unit. The previous parity information generated by the physical stylized unit and the currently written sub-data are used to generate new parity information.

圖16是根據一範例實施例所繪示的資料寫入的流程圖。 FIG. 16 is a flow chart of data writing according to an exemplary embodiment.

請參照圖16,在步驟S1601中,記憶體控制器104(或記憶體管理電路202)從主機系統1000接收寫入指令與對應的資料。 Referring to FIG. 16, in step S1601, the memory controller 104 (or the memory management circuit 202) receives the write command and the corresponding data from the host system 1000.

在步驟S1603中,記憶體控制器104(或記憶體管理電路202)會將資料暫存至緩衝記憶體208並且將資料整理成多個子資料串。 In step S1603, the memory controller 104 (or the memory management circuit 202) temporarily stores the data to the buffer memory 208 and organizes the data into a plurality of sub-data strings.

在步驟S1605中,記憶體控制器104(或記憶體管理電路202)會選擇至少一實體抹除單元(以下稱為第一實體抹除單元)且將子資料串寫入至第一實體抹除單元的實體程式化單元中。具體來說,記憶體控制器104(或錯誤檢查與校正電路210)會為每個子資料串產生對應的錯誤檢查與校正碼,並且記憶體控制器104(或記憶體管理電路202)會將子資料串與對應的錯誤檢查與校正碼寫入至對應的實體程式化單元。 In step S1605, the memory controller 104 (or the memory management circuit 202) selects at least one physical erasing unit (hereinafter referred to as a first physical erasing unit) and writes the sub-data string to the first entity erasing. The unit's entity is stylized in the unit. Specifically, the memory controller 104 (or the error checking and correction circuit 210) generates a corresponding error check and correction code for each sub-data string, and the memory controller 104 (or the memory management circuit 202) will The data string and the corresponding error check and correction code are written to the corresponding entity stylized unit.

在步驟S1607中,記憶體控制器104(或記憶體管理電路202)會判斷將子資料串寫入至第一實體抹除單元的實體程式化單 元的過程中是否發生程式化錯誤。 In step S1607, the memory controller 104 (or the memory management circuit 202) determines the entity stylized list for writing the sub-data string to the first physical erasing unit. Whether a stylized error occurred during the meta process.

倘若未發生程式化錯誤時,在步驟S1609中,記憶體控制器104(或同位資訊編碼與解碼電路212)會根據此些子資料串之中至少一部分子資料串來產生同位資訊。例如,如上所述,記憶體控制器104(或記憶體管理電路202)會識別儲存此些子資料串的下實體程式化單元之中其對應之上實體程式化單元(以下稱為第一上實體程式化單元)未儲存資料的下實體程式化單元(以下稱為第一下實體程式化單元)並且依據被寫入至第一下實體程式化單元的子資料串來產生同位資訊。 If no stylization error has occurred, in step S1609, the memory controller 104 (or the parity information encoding and decoding circuit 212) generates the parity information based on at least a portion of the sub-data strings of the sub-data strings. For example, as described above, the memory controller 104 (or the memory management circuit 202) identifies the corresponding upper stylized unit of the lower physical stylized unit storing the sub-data strings (hereinafter referred to as the first upper The entity stylized unit is a lower entity stylized unit (hereinafter referred to as a first lower entity stylized unit) that does not store data, and generates the parity information according to the sub-data string written to the first lower entity stylized unit.

在步驟S1611中,記憶體控制器104(或記憶體管理電路202)會將所產生的同位資訊儲存至緩衝記憶體208,從緩衝記憶體208中刪除此些子資料串。特別是,倘若緩衝記憶體208中存有執行前次寫入指令所儲存的同位資訊時,在步驟S1611中記憶體控制器104(或記憶體管理電路202)會一併將舊的同位資訊移除。 In step S1611, the memory controller 104 (or the memory management circuit 202) stores the generated parity information in the buffer memory 208, and deletes the sub-data strings from the buffer memory 208. In particular, if the buffer memory 208 stores the parity information stored in the previous write command, the memory controller 104 (or the memory management circuit 202) shifts the old parity information in step S1611. except.

倘若發生程式化錯誤時,在步驟S1613中,記憶體控制器104(或同位資訊編碼與解碼電路212)會根據緩衝記憶體208中的同位資訊來解碼前次寫入指令所寫入之子資料串中的至少其中一部分來校正錯誤資料。之後,記憶體控制器104(或記憶體管理電路202)可將重新進行程式化運作。 If a stylization error occurs, in step S1613, the memory controller 104 (or the parity information encoding and decoding circuit 212) decodes the sub-data string written by the previous write command according to the parity information in the buffer memory 208. At least some of them are used to correct the error data. Thereafter, the memory controller 104 (or the memory management circuit 202) can be reprogrammed.

綜上所述,本發明範例實施例的資料寫入方法使用此資料寫入方法的記憶體控制器能夠有效地使用緩衝記憶體的儲存空間來執行寫入指令,同時避免資料遺失。此外,使用此資料寫入 方法記憶體儲存裝置能夠在配置較少容量的緩衝記憶體下順利地執行寫入指令,同時避免資料遺失。 In summary, the data writing method of the exemplary embodiment of the present invention uses the memory controller of the data writing method to effectively use the storage space of the buffer memory to execute the write command while avoiding data loss. Also, use this data to write The method memory storage device can smoothly execute a write command under a buffer memory configured with a small capacity while avoiding data loss.

S1601、S1603、S1605、S1607、S1609、S1611、S1613‧‧‧資料寫入方法的步驟 S1601, S1603, S1605, S1607, S1609, S1611, S1613‧‧‧ steps of data writing method

Claims (24)

一種資料寫入方法,用於寫入資料至一可複寫式非揮發性記憶體模組,其中該可複寫式非揮發性記憶體模組具有至少一記憶體晶粒,該至少一記憶體晶粒包括多個實體抹除單元,每一該些實體抹除單元包括多個實體程式化單元,該資料寫入方法包括:從一主機系統中接收一第一寫入指令與對應該寫入指令的一第一資料並且將該第一資料暫存至一緩衝記憶體中,其中該第一資料包括多個子資料串;從該緩衝記憶體中將該些子資料串傳送至該可複寫式非揮發性記憶體模組以寫入該些子資料串至該些實體抹除單元之中的至少一第一實體抹除單元中;根據該些子資料串之中至少一部分子資料串來產生一同位資訊;以及將該同位資訊儲存在該緩衝記憶體中並且從該緩衝記憶體中移除該第一資料。 A data writing method for writing data to a rewritable non-volatile memory module, wherein the rewritable non-volatile memory module has at least one memory die, the at least one memory crystal The granule includes a plurality of physical erasing units, each of the physical erasing units includes a plurality of physical stylizing units, and the data writing method includes: receiving a first writing instruction and a corresponding writing instruction from a host system And a first data is temporarily stored in a buffer memory, wherein the first data includes a plurality of sub-data strings; and the sub-data strings are transmitted from the buffer memory to the rewritable non- The volatile memory module writes the sub-data strings to at least one of the first physical erasing units of the physical erasing units; and generates the same according to at least a part of the sub-data strings of the sub-data strings Bit information; and storing the parity information in the buffer memory and removing the first data from the buffer memory. 如申請專利範圍第1項所述的資料寫入方法,其中所述根據該些子資料串之中該至少一部分子資料串來產生該同位資訊的步驟包括:依據所有的該些子資料串來產生該同位資訊。 The method for writing data according to claim 1, wherein the step of generating the information according to the at least a part of the sub-data strings of the sub-data strings comprises: according to all the sub-data strings Generate this information. 如申請專利範圍第1項所述的資料寫入方法,其中每一該些實體抹除單元的實體程式化單元包括多個下實體程式化單元與多個上實體程式化單元,寫入資料至該些下實體程式化單元的速 度快於寫入資料至該些上實體程式化單元,其中所述根據該些子資料串之中該至少一部分子資料串來產生該同位資訊的步驟包括:根據儲存該些子資料串的實體程式化單元識別該些子資料串之中的至少一第一子資料串,其中該至少一第一子資料串被儲存在該些下實體程式化單元之中的至少一第一下實體程式化單元並且對應該至少一第一下實體程式化單元的至少一第一上實體程式化單元未儲存資料;以及根據該至少一第一子資料串產生該同位資訊。 The method for writing data according to claim 1, wherein each of the entity staging units of the physical erasing unit comprises a plurality of lower stylized units and a plurality of upper stylized units, and the data is written to The speed of the lower entity stylized unit The step of generating the information according to the at least a part of the sub-data strings among the sub-data strings is faster than writing the data to the upper physical stylization unit, and the step of generating the information according to the at least a part of the sub-data strings includes: The stylizing unit identifies at least one first sub-data string among the sub-data strings, wherein the at least one first sub-data string is stylized by at least one first lower entity stored in the lower physical stylized units And storing, by the unit, at least one of the first upper physical stylized units of the at least one first lower physical stylized unit; and generating the parity information according to the at least one first substring. 如申請專利範圍第1項所述的資料寫入方法,更包括:在將該同位資訊儲存在該緩衝記憶體中並且從該緩衝記憶體中移除該第一資料之後,從該主機系統接收一第二寫入指令與對應該第二寫入指令的一第二資料。 The method for writing data according to claim 1, further comprising: receiving the same information in the buffer memory and removing the first data from the buffer memory, and receiving from the host system a second write command and a second data corresponding to the second write command. 如申請專利範圍第4項所述的資料寫入方法,更包括:判斷從該緩衝記憶體中將該第二資料寫入至該至少一第一實體抹除單元中時是否發生一程式化錯誤;以及倘若從該緩衝記憶體中將該第二資料寫入至該至少一第一實體抹除單元中時發生該程式化錯誤時,使用儲存在該緩衝記憶體中的該同位資訊解碼儲存在該至少一第一實體抹除單元中的該至少一部分子資料串來校正該至少一部分子資料串中的至少一錯誤子資料串。 The data writing method of claim 4, further comprising: determining whether a stylized error occurs when the second data is written into the at least one first physical erasing unit from the buffer memory. And if the stylized error occurs when the second data is written into the at least one first physical erasing unit from the buffer memory, the isomorphic information stored in the buffer memory is decoded and stored in The at least one first sub-data string of the at least one first physical erasing unit corrects at least one erroneous sub-data string in the at least one partial sub-data string. 如申請專利範圍第5項所述的資料寫入方法,更包括: 倘若從該緩衝記憶體中將該第二資料寫入至該至少一第一實體抹除單元中時未發生該程式化錯誤時,從該緩衝記憶體中移除該同位資訊。 For example, the method for writing data as described in item 5 of the patent application scope includes: And if the stylization error does not occur when the second data is written into the at least one first physical erasing unit from the buffer memory, the parity information is removed from the buffer memory. 如申請專利範圍第4項所述的資料寫入方法,更包括:根據至少一部份的該第二資料產生另一同位資訊;以及將該另一同位資訊儲存至該緩衝記憶體中並刪除該第二資料。 The method for writing data according to claim 4, further comprising: generating another parity information according to at least a portion of the second data; and storing the other parity information in the buffer memory and deleting The second information. 如申請專利範圍第1項所述的資料寫入方法,其中從該緩衝記憶體中將該些子資料串傳送至該可複寫式非揮發性記憶體模組以寫入該些子資料串至該些實體抹除單元之中的該至少一第一實體抹除單元中的步驟包括:分別地為該些子資料串產生多個錯誤檢查與校正碼;以及將該些子資料串與分別地對應該些子資料串的該些錯誤檢查與校正碼傳送至該可複寫式非揮發性記憶體模組以寫入該些子資料串與分別地對應該些子資料串的該些錯誤檢查與校正碼至該至少一第一實體抹除單元的實體程式化單元中。 The data writing method of claim 1, wherein the sub-data strings are transmitted from the buffer memory to the rewritable non-volatile memory module to write the sub-data strings to The step of the at least one first physical erasing unit among the physical erasing units includes: generating a plurality of error checking and correcting codes for the sub-data strings respectively; and separately separating the sub-data strings The error checking and correction codes corresponding to the sub-strings are transmitted to the rewritable non-volatile memory module to write the sub-strings and the error checking corresponding to the sub-strings respectively The correction code is in the physical stylized unit of the at least one first physical erasing unit. 如申請專利範圍第1項所述的資料寫入方法,其中所述根據該些子資料串之中該至少一部分子資料串來產生該同位資訊的步驟包括:每當將該些子資料串之中的其中一個子資料串寫入至該至少一第一實體抹除單元時,根據該其中一個子資料串與一先前同位資訊來產生該同位資訊。 The method for writing data according to claim 1, wherein the step of generating the information according to the at least a part of the sub-data strings of the sub-data strings comprises: When one of the sub-data strings is written to the at least one first entity erasing unit, the co-located information is generated according to the one of the sub-data strings and a previous parity information. 一種記憶體控制器,用於控制一可複寫式非揮發性記憶體模組,該記憶體控制器包括:一主機介面,用以耦接至一主機系統;一記憶體介面,用以耦接至該可複寫式非揮發性記憶體模組,其中該可複寫式非揮發性記憶體模組具有至少一記憶體晶粒,該至少一記憶體晶粒包括多個實體抹除單元,每一該些實體抹除單元包括多個實體程式化單元;一緩衝記憶體;一同位資訊編碼與解碼電路;以及一記憶體管理電路,耦接至該主機介面、該記憶體介面、該緩衝記憶體與該同位資訊編碼與解碼電路,其中該記憶體管理電路用以從該主機系統中接收一第一寫入指令與對應該寫入指令的一第一資料並且將該第一資料暫存至一緩衝記憶體中,其中該第一資料包括多個子資料串,其中該記憶體管理電路更用以從該緩衝記憶體中將該些子資料串傳送至該可複寫式非揮發性記憶體模組以寫入該些子資料串至該些實體抹除單元之中的至少一第一實體抹除單元中,其中該同位資訊編碼與解碼電路用以根據該些子資料串之中至少一部分子資料串來產生一同位資訊,其中該記憶體管理電路更用以將該同位資訊儲存在該緩衝記憶體中並且從該緩衝記憶體中移除該第一資料。 A memory controller for controlling a rewritable non-volatile memory module, the memory controller comprising: a host interface for coupling to a host system; a memory interface for coupling To the rewritable non-volatile memory module, wherein the rewritable non-volatile memory module has at least one memory die, the at least one memory die comprising a plurality of physical erase units, each The physical erasing unit includes a plurality of physical stylizing units; a buffer memory; a co-located information encoding and decoding circuit; and a memory management circuit coupled to the host interface, the memory interface, and the buffer memory And the parity information encoding and decoding circuit, wherein the memory management circuit is configured to receive a first write command and a first data corresponding to the write command from the host system and temporarily store the first data to a In the buffer memory, the first data includes a plurality of sub-data strings, wherein the memory management circuit is further configured to transfer the sub-data strings from the buffer memory to the rewritable non-swing The cryptographic memory module is configured to write the sub-data strings to at least one of the first physical erasing units, wherein the collocation information encoding and decoding circuit is configured to use the sub-data strings At least a portion of the sub-data strings are generated to generate a parity information, wherein the memory management circuit is further configured to store the parity information in the buffer memory and remove the first data from the buffer memory. 如申請專利範圍第10項所述的記憶體控制器,其中在根 據該些子資料串之中該至少一部分子資料串來產生該同位資訊的運作中,該同位資訊編碼與解碼電路依據所有的該些子資料串來產生該同位資訊。 The memory controller according to claim 10, wherein the root controller is The peer information encoding and decoding circuit generates the parity information according to all of the sub-data strings according to the at least a part of the sub-data strings in the sub-data strings to generate the information. 如申請專利範圍第10項所述的記憶體控制器,其中每一該些實體抹除單元的實體程式化單元包括多個下實體程式化單元與多個上實體程式化單元,寫入資料至該些下實體程式化單元的速度快於寫入資料至該些上實體程式化單元,其中在根據該些子資料串之中該至少一部分子資料串來產生該同位資訊的運作中,該記憶體管理電路根據儲存該些子資料串的實體程式化單元識別該些子資料串之中的至少一第一子資料串並且該同位資訊編碼與解碼電路根據該至少一第一子資料串產生該同位資訊,其中該至少一第一子資料串被儲存在該些下實體程式化單元之中的至少一第一下實體程式化單元並且對應該至少一第一下實體程式化單元的至少一第一上實體程式化單元未儲存資料。 The memory controller of claim 10, wherein the physical stylized unit of each of the physical erasing units comprises a plurality of lower physical stylized units and a plurality of upper physical stylized units, and the data is written to The lower physical stylizing units are faster than writing data to the upper physical stylizing units, wherein the memory is generated in the operation of generating the co-located information according to the at least a portion of the sub-strings among the sub-strings The body management circuit identifies at least one first sub-data string among the sub-data strings according to the entity stylizing unit storing the sub-data strings, and the information-based encoding and decoding circuit generates the first sub-data string according to the at least one first sub-data string The same information, wherein the at least one first substring is stored in at least one first lower entity stylizing unit among the lower entity stylizing units and corresponds to at least one of the first lower entity stylizing units An entity stylized unit does not store data. 如申請專利範圍第10項所述的記憶體控制器,其中該記憶體管理路更用以在將該同位資訊儲存在該緩衝記憶體中並且從該緩衝記憶體中移除該第一資料之後,從該主機系統接收一第二寫入指令與對應該第二寫入指令的一第二資料。 The memory controller of claim 10, wherein the memory management path is further configured to store the parity information in the buffer memory and remove the first data from the buffer memory. Receiving a second write command from the host system and a second data corresponding to the second write command. 如申請專利範圍第13項所述的記憶體控制器,其中該記憶體管理電路根據至少一部份的該第二資料產生另一同位資訊以及將該另一同位資訊儲存至該緩衝記憶體中並刪除 該第二資料。 The memory controller of claim 13, wherein the memory management circuit generates another parity information according to the at least part of the second data and stores the other parity information in the buffer memory. And delete The second information. 如申請專利範圍第10項所述的記憶體控制器,其中在根據該些子資料串之中該至少一部分子資料串來產生該同位資訊的運作中,每當將該些子資料串之中的其中一個子資料串寫入至該至少一第一實體抹除單元時,該同位資訊編碼與解碼電路根據該其中一個子資料串與一先前同位資訊來產生該同位資訊。 The memory controller of claim 10, wherein in the operation of generating the parity information according to the at least a part of the sub-data strings among the sub-data strings, each of the sub-data strings is When one of the sub-data strings is written to the at least one first entity erasing unit, the co-located information encoding and decoding circuit generates the co-located information according to the one of the sub-data strings and a previous parity information. 一種記憶體儲存裝置,包括:一連接器,用以耦接至一主機系統;一可複寫式非揮發性記憶體模組,具有至少一記憶體晶粒,該至少一記憶體晶粒包括多個實體抹除單元,每一該些實體抹除單元包括多個實體程式化單元;以及一記憶體控制器,具有一緩衝記憶體且耦接至該連接器與該可複寫式非揮發性記憶體模組,其中該記憶體控制器用以從該主機系統中接收一寫入指令與對應該寫入指令的一第一資料並且將該第一資料暫存至一緩衝記憶體中,其中該第一資料包括多個子資料串,其中該記憶體控制器更用以從該緩衝記憶體中將該些子資料串傳送至該可複寫式非揮發性記憶體模組以寫入該些子資料串至該些實體抹除單元之中的至少一第一實體抹除單元中,其中該記憶體控制器用以根據該些子資料串之中至少一部分子資料串來產生一同位資訊,其中該記憶體控制器更用以將該同位資訊儲存在該緩衝記憶 體中並且從該緩衝記憶體中移除該第一資料。 A memory storage device includes: a connector for coupling to a host system; a rewritable non-volatile memory module having at least one memory die, the at least one memory die including Physical erasing units, each of the physical erasing units comprising a plurality of physical stylizing units; and a memory controller having a buffer memory coupled to the connector and the rewritable non-volatile memory a memory module, wherein the memory controller is configured to receive a write command and a first data corresponding to the write command from the host system and temporarily store the first data in a buffer memory, wherein the first module The data includes a plurality of sub-data strings, wherein the memory controller is further configured to transfer the sub-data strings from the buffer memory to the rewritable non-volatile memory module to write the sub-data strings And at least one first physical erasing unit of the plurality of physical erasing units, wherein the memory controller is configured to generate a parity information according to at least a part of the sub-data strings of the sub-data strings, wherein the The controller is further configured to, memory and parity information stored in the buffer memory The first data is removed from the buffer memory. 如申請專利範圍第16項所述的記憶體儲存裝置,其中在根據該些子資料串之中該至少一部分子資料串來產生該同位資訊的運作中,該記憶體控制器依據所有的該些子資料串來產生該同位資訊。 The memory storage device of claim 16, wherein in the operation of generating the parity information according to the at least a portion of the sub-data strings among the sub-data strings, the memory controller is based on all of the The sub-data string is used to generate the co-located information. 如申請專利範圍第16項所述的記憶體儲存裝置,其中每一該些實體抹除單元的實體程式化單元包括多個下實體程式化單元與多個上實體程式化單元,寫入資料至該些下實體程式化單元的速度快於寫入資料至該些上實體程式化單元,其中在根據該些子資料串之中該至少一部分子資料串來產生該同位資訊的運作中,該記憶體控制器根據儲存該些子資料串的實體程式化單元識別該些子資料串之中的至少一第一子資料串並且該記憶體控制器根據該至少一第一子資料串產生該同位資訊,其中該至少一第一子資料串被儲存在該些下實體程式化單元之中的至少一第一下實體程式化單元並且對應該至少一第一下實體程式化單元的至少一第一上實體程式化單元未儲存資料。 The memory storage device of claim 16, wherein the physical stylization unit of each of the physical erasing units comprises a plurality of lower physical stylized units and a plurality of upper physical stylized units, and the data is written to The lower physical stylizing units are faster than writing data to the upper physical stylizing units, wherein the memory is generated in the operation of generating the co-located information according to the at least a portion of the sub-strings among the sub-strings The body controller identifies at least one first sub-data string among the sub-data strings according to the entity stylizing unit storing the sub-data strings, and the memory controller generates the parity information according to the at least one first sub-data string The at least one first sub-data string is stored in at least one first lower physical stylized unit of the lower physical stylized units and corresponds to at least one first of the at least one first lower physical stylized unit The stylized unit does not store data. 如申請專利範圍第16項所述的記憶體儲存裝置,其中該記憶體控制器更用以在將該同位資訊儲存在該緩衝記憶體中並且從該緩衝記憶體中移除該第一資料之後,從該主機系統接收一第二寫入指令與對應該第二寫入指令的一第二資料。 The memory storage device of claim 16, wherein the memory controller is further configured to store the parity information in the buffer memory and remove the first data from the buffer memory. Receiving a second write command from the host system and a second data corresponding to the second write command. 如申請專利範圍第19項所述的記憶體儲存裝置,其中該記憶體控制器更用以判斷從該緩衝記憶體中將該第二 資料寫入至該至少一第一實體抹除單元中時是否發生一程式化錯誤,其中倘若從該緩衝記憶體中將該第二資料寫入至該至少一第一實體抹除單元中時發生該程式化錯誤時,該記憶體控制器使用儲存在該緩衝記憶體中的該同位資訊來解碼儲存在該至少一第一實體抹除單元中的該至少一部分子資料串以校正該至少一部分子資料串中的至少一錯誤子資料串。 The memory storage device of claim 19, wherein the memory controller is further configured to determine the second from the buffer memory Whether a stylized error occurs when the data is written into the at least one first physical erasing unit, wherein the second data is written into the at least one first physical erasing unit from the buffer memory In the stylized error, the memory controller uses the parity information stored in the buffer memory to decode the at least a portion of the sub-data strings stored in the at least one first physical erasing unit to correct the at least one sub-segment At least one error substring in the data string. 如申請專利範圍第20項所述的記憶體儲存裝置,其中倘若從該緩衝記憶體中將該第二資料寫入至該至少一第一實體抹除單元中時未發生該程式化錯誤時,該記憶體控制器更用以從該緩衝記憶體中移除該同位資訊。 The memory storage device of claim 20, wherein if the stylization error does not occur when the second data is written into the at least one first physical erasing unit from the buffer memory, The memory controller is further configured to remove the parity information from the buffer memory. 如申請專利範圍第19項所述的記憶體儲存裝置,其中該記憶體控制器根據至少一部份的該第二資料產生另一同位資訊以及將該另一同位資訊儲存至該緩衝記憶體中並刪除該第二資料。 The memory storage device of claim 19, wherein the memory controller generates another parity information according to the at least part of the second data and stores the other parity information in the buffer memory. And delete the second data. 如申請專利範圍第16項所述的記憶體儲存裝置,其中該記憶體控制器更用以分別地為該些子資料串產生多個錯誤檢查與校正碼,其中在從該緩衝記憶體中將該些子資料串傳送至該可複寫式非揮發性記憶體模組以寫入該些子資料串至該些實體抹除單元之中的該至少一第一實體抹除單元中的運作中,該記憶體控制器將該些子資料串與分別地對應該些子資料串的該些錯誤檢查與校正 碼傳送至該可複寫式非揮發性記憶體模組以寫入該些子資料串與分別地對應該些子資料串的該些錯誤檢查與校正碼至該至少一第一實體抹除單元的實體程式化單元中。 The memory storage device of claim 16, wherein the memory controller is further configured to generate a plurality of error checking and correction codes for the sub-data strings respectively, wherein the buffer memory is Transmitting the sub-data strings to the rewritable non-volatile memory module to write the sub-data strings into the operation of the at least one first physical erasing unit among the physical erasing units, The memory controller checks and corrects the sub-data strings and the corresponding errors corresponding to the sub-data strings respectively. Transmitting to the rewritable non-volatile memory module to write the sub-data strings and respectively corresponding to the error checking and correction codes of the sub-data strings to the at least one first physical erasing unit In the entity stylized unit. 如申請專利範圍第16項所述的記憶體儲存裝置,其中在根據該些子資料串之中該至少一部分子資料串來產生該同位資訊的運作中,每當將該些子資料串之中的其中一個子資料串寫入至該至少一第一實體抹除單元時,該記憶體控制器根據該其中一個子資料串與一先前同位資訊來產生該同位資訊。 The memory storage device of claim 16, wherein in the operation of generating the parity information according to the at least a portion of the sub-data strings among the sub-data strings, each of the sub-data strings is When one of the sub-data strings is written to the at least one first physical erasing unit, the memory controller generates the co-located information according to the one of the sub-data strings and a previous parity information.
TW102121184A 2013-06-14 2013-06-14 Data writing method, memory controller and memory storage apparatus TWI516927B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
TW102121184A TWI516927B (en) 2013-06-14 2013-06-14 Data writing method, memory controller and memory storage apparatus
US13/958,627 US9201785B2 (en) 2013-06-14 2013-08-05 Data writing method, memory controller and memory storage apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW102121184A TWI516927B (en) 2013-06-14 2013-06-14 Data writing method, memory controller and memory storage apparatus

Publications (2)

Publication Number Publication Date
TW201447577A true TW201447577A (en) 2014-12-16
TWI516927B TWI516927B (en) 2016-01-11

Family

ID=52020271

Family Applications (1)

Application Number Title Priority Date Filing Date
TW102121184A TWI516927B (en) 2013-06-14 2013-06-14 Data writing method, memory controller and memory storage apparatus

Country Status (2)

Country Link
US (1) US9201785B2 (en)
TW (1) TWI516927B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI812034B (en) * 2022-02-25 2023-08-11 旺宏電子股份有限公司 Memory device and operation method thereof
US11847021B2 (en) 2022-02-25 2023-12-19 Macronix International Co., Ltd. Memory block, memory device for error correction operation and method thereof

Families Citing this family (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI512750B (en) * 2014-07-30 2015-12-11 Phison Electronics Corp Data storing method, memory control circuit unit and memory storage device
US9507663B1 (en) * 2015-05-04 2016-11-29 Macronix International Co., Ltd. Memory device and operation method
TWI573146B (en) * 2015-05-28 2017-03-01 旺宏電子股份有限公司 memory device and OPERATION method thereof
US10152413B2 (en) 2015-06-08 2018-12-11 Samsung Electronics Co. Ltd. Nonvolatile memory module and operation method thereof
TWI588833B (en) * 2015-11-27 2017-06-21 群聯電子股份有限公司 Data programming method and memory storage device
CN106933603B (en) * 2015-12-29 2024-03-05 深圳市博巨兴微电子科技有限公司 Chip burning method, device and microcontroller
TWI591641B (en) * 2016-02-19 2017-07-11 群聯電子股份有限公司 Data programming method, memory control circuit unit and memory storage device
TWI652572B (en) 2016-03-31 2019-03-01 慧榮科技股份有限公司 Data storage device
EP3710946B1 (en) * 2017-11-13 2023-10-25 Data I/O Corporation Device programming system with protocol emulation
US11048645B2 (en) * 2018-02-01 2021-06-29 Samsung Electronics Co., Ltd. Memory module, operation method therof, and operation method of host
US10838805B2 (en) * 2018-02-23 2020-11-17 Micron Technology, Inc. Generating parity data based on a characteristic of a stream of data
KR20200108650A (en) * 2019-03-11 2020-09-21 삼성전자주식회사 Storage device and method for operating storage device
TWI688965B (en) * 2019-08-14 2020-03-21 群聯電子股份有限公司 Data writing method, memory control circuit unit and memory storage device
KR20210034711A (en) * 2019-09-20 2021-03-31 삼성전자주식회사 Storage device selectively generating parity bits according to endurance of memory cell, and method thereof
KR20210131058A (en) * 2020-04-23 2021-11-02 에스케이하이닉스 주식회사 Apparatus and method for protecting data in a memory system
CN111796774B (en) * 2020-07-07 2024-03-08 深圳宏芯宇电子股份有限公司 Memory control method, memory storage device and memory controller
KR102351237B1 (en) * 2021-04-29 2022-01-13 삼성전자주식회사 Memory storage device and communication system
US11822429B2 (en) * 2022-04-08 2023-11-21 Dell Products L.P. Storage device raid data write intermediate parity system

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7340672B2 (en) * 2004-09-20 2008-03-04 Intel Corporation Providing data integrity for data streams
US8024639B2 (en) * 2006-06-23 2011-09-20 Schweitzer Engineering Laboratories, Inc. Software and methods to detect and correct data structure
US8745320B2 (en) * 2012-05-04 2014-06-03 Riverbed Technology, Inc. Ensuring write operation consistency using multiple storage devices
US20140068378A1 (en) * 2012-08-31 2014-03-06 Kabushiki Kaisha Toshiba Semiconductor storage device and memory controller
US9076530B2 (en) * 2013-02-07 2015-07-07 Seagate Technology Llc Non-volatile write buffer data retention pending scheduled verification

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI812034B (en) * 2022-02-25 2023-08-11 旺宏電子股份有限公司 Memory device and operation method thereof
US11847021B2 (en) 2022-02-25 2023-12-19 Macronix International Co., Ltd. Memory block, memory device for error correction operation and method thereof

Also Published As

Publication number Publication date
TWI516927B (en) 2016-01-11
US9201785B2 (en) 2015-12-01
US20140372667A1 (en) 2014-12-18

Similar Documents

Publication Publication Date Title
TWI516927B (en) Data writing method, memory controller and memory storage apparatus
TWI527037B (en) Data storing method, memory control circuit unit and memory storage apparatus
TWI423026B (en) Data writing method, memory controller and memory storage apparatus
TWI490871B (en) Method for preventing read-disturb, memory control circuit unit and memory storage apparatus
TWI479314B (en) Method of storing system data, and memory controller and memory storage apparatus using the same
TWI435329B (en) Flash memory management method and flash memory controller and storage system using the same
TWI421870B (en) Data writing method for a flash memory, and controller and storage system using the same
TWI656531B (en) Average wear method, memory control circuit unit and memory storage device
TWI447579B (en) Program code loading and accessing method, memory controller and memory storage apparatus
TWI725416B (en) Data writing method, memory controlling circuit unit and memory storage device
TWI545432B (en) Data management method, memory control circuit unit and memry storage apparatus
TWI509615B (en) Data storing method, and memory controller and memory storage apparatus using the same
CN103678162B (en) System data storage method, memory controller and memory storage device
CN104252317A (en) Data writing method, memory controller and memory storage device
TWI516934B (en) Data storing method, memory control circuit unit and memory stoarge apparatus
TWI464585B (en) Data storing method, and memory controller and memory storage apparatus using the same
CN112051963B (en) Data writing method, memory control circuit unit and memory storage device
TWI553477B (en) Memory management method, memory control circuit unit and memory storage device
TWI436209B (en) Memory management table proceesing method, memory controller and memory storage apparatus
CN110874282B (en) Data access method, memory control circuit unit and memory storage device
TWI512750B (en) Data storing method, memory control circuit unit and memory storage device
TWI814501B (en) Mapping table re-building method, memory storage device and memory control circuit unit
TWI777087B (en) Data managing method, memory controlling circuit unit and memory storage device
CN111724851B (en) Data protection method, memory storage device and memory control circuit unit
TWI727327B (en) Data writing method, memory controlling circuit unit and memory storage device