[go: up one dir, main page]

CN106372000B - Mapping table updating method, memory control circuit unit and memory storage device - Google Patents

Mapping table updating method, memory control circuit unit and memory storage device Download PDF

Info

Publication number
CN106372000B
CN106372000B CN201510425001.5A CN201510425001A CN106372000B CN 106372000 B CN106372000 B CN 106372000B CN 201510425001 A CN201510425001 A CN 201510425001A CN 106372000 B CN106372000 B CN 106372000B
Authority
CN
China
Prior art keywords
physical
unit
mapping table
storage space
memory
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201510425001.5A
Other languages
Chinese (zh)
Other versions
CN106372000A (en
Inventor
叶志刚
谢长翰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Phison Electronics Corp
Original Assignee
Phison Electronics Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Phison Electronics Corp filed Critical Phison Electronics Corp
Priority to CN201510425001.5A priority Critical patent/CN106372000B/en
Publication of CN106372000A publication Critical patent/CN106372000A/en
Application granted granted Critical
Publication of CN106372000B publication Critical patent/CN106372000B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Read Only Memory (AREA)

Abstract

本发明提出一种映射表更新方法、存储器控制电路单元及存储器存储装置。本方法包括在缓冲存储器中分配映射表存储空间,以存储实体地址‑逻辑地址映射表;判断映射表存储空间的剩余存储空间是否小于门槛值;若剩余存储空间小于门槛值,将存储在映射表存储空间中的实体地址‑逻辑地址映射表的映射信息更新至至少一逻辑地址‑实体地址映射表,并清除存储在该映射表存储空间实体地址‑逻辑地址映射表的映射信息;将对应已编程作动实体擦除单元的更新映射信息存储至该映射表存储空间中。本发明可避免更新映射表后,已编程的数据因其它实体编程单元的编程失败而无法恢复的状况。

The present invention proposes a mapping table update method, a memory control circuit unit and a memory storage device. The method includes allocating a mapping table storage space in a buffer memory to store a physical address-logical address mapping table; determining whether the remaining storage space of the mapping table storage space is less than a threshold value; if the remaining storage space is less than the threshold value, updating the mapping information of the physical address-logical address mapping table stored in the mapping table storage space to at least one logical address-physical address mapping table, and clearing the mapping information of the physical address-logical address mapping table stored in the mapping table storage space; and storing the updated mapping information corresponding to the programmed actuated physical erase unit in the mapping table storage space. The present invention can avoid the situation where the programmed data cannot be restored due to the programming failure of other physical programming units after updating the mapping table.

Description

映射表更新方法、存储器控制电路单元及存储器存储装置Mapping table update method, memory control circuit unit and memory storage device

技术领域technical field

本发明是有关于一种的映射表更新方法,尤其涉及一种用于可复写式非易失性存储器模块的逻辑地址-实体地址的映射表更新方法、存储器控制电路单元及存储器存储装置。The present invention relates to a mapping table updating method, in particular to a logical address-physical address mapping table updating method for a rewritable non-volatile memory module, a memory control circuit unit and a memory storage device.

背景技术Background technique

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

使用可复写式非易失性存储器模块作为存储媒体的存储器存储装置会建立逻辑地址-实体地址映射表来记录逻辑单元与实体单元之间的映射信息,使主机系统可顺利存取可复写式非易失性存储器模块的数据。例如,当主机系统欲写入数据时,存储器存储装置可将此数据编程至实体单元,并将此数据的逻辑单元与实体单元的映射关系更新至逻辑地址-实体地址映射表。具体而言,存储器存储装置会将对应此逻辑单元的逻辑地址-实体地址映射表加载至缓冲存储器来更新。A memory storage device that uses a rewritable non-volatile memory module as a storage medium will establish a logical address-physical address mapping table to record the mapping information between logical units and physical units, so that the host system can smoothly access the rewritable non-volatile memory module. data of the volatile memory block. For example, when the host system intends to write data, the memory storage device can program the data into the physical unit, and update the mapping relationship between the logical unit and the physical unit of the data to the logical address-physical address mapping table. Specifically, the memory storage device loads the logical address-physical address mapping table corresponding to the logical unit into the buffer memory for updating.

而由于主机系统每次欲写入数据的逻辑单元可能对应于不同的逻辑地址-实体地址映射表,为避免频繁地更新逻辑地址-实体地址映射表,存储器存储装置会分配一暂存空间以存储暂存映射表,且将欲写入的数据编程至作动实体擦除单元,并将数据所属的逻辑单元与作动实体擦除单元的映射关系存储在暂存空间中。当暂存空间已满时,再将存储在暂存空间中的暂存映射表的映射信息一次更新至逻辑地址-实体地址映射表。And because the logic unit that the host system wants to write data each time may correspond to different logical address-physical address mapping tables, in order to avoid frequently updating the logical address-physical address mapping tables, the memory storage device will allocate a temporary storage space to store The mapping table is temporarily stored, and the data to be written is programmed into the active entity erasing unit, and the mapping relationship between the logic unit to which the data belongs and the operating entity erasing unit is stored in the temporary storage space. When the temporary storage space is full, the mapping information of the temporary storage mapping table stored in the temporary storage space is updated to the logical address-physical address mapping table once.

然而,实际可编程至每个实体单元的数据量可能不同(例如,数据经过压缩),也就是说,每个实体单元可能映射到不同数量的逻辑单元。因此,暂存映射表中对应每个实体单元的映射信息大小也会不同。如此一来,当暂存空间已满时,可能形成作动实体擦除单元尚未被写满的情况。而在此情况下,由于暂存空间已满,存储器存储装置的控制电路会将暂存空间中所存储的暂存映射表的映射信息更新至逻辑地址-实体地址映射表,并将后续欲写入的数据根据编程顺序编程至作动实体擦除单元中尚未被编程的实体编程单元。However, the amount of data actually programmable to each physical unit may be different (for example, the data is compressed), that is, each physical unit may be mapped to a different number of logical units. Therefore, the size of the mapping information corresponding to each entity unit in the temporary storage mapping table will also be different. In this way, when the temporary storage space is full, it may result in a situation that the erasing unit of the actuating entity has not been fully written. And in this case, because the temporary storage space is full, the control circuit of the memory storage device will update the mapping information of the temporary storage mapping table stored in the temporary storage space to the logical address-physical address mapping table, and write The entered data is programmed to the unprogrammed physical programming unit in the active physical erasing unit according to the programming sequence.

例如,多阶存储单元(Multi Level Cell,MLC)NAND闪存的实体擦除单元包括下实体编程单元(又称快速页面)与上实体编程单元(又称慢速页面)。在将暂存映射表的映射信息更新至逻辑地址-实体地址映射表之后,倘若根据编程顺序而将欲写入的数据编程至作动实体擦除单元中的上实体编程单元时,发生编程错误(例如,发生不预期断电),会导致对应此上实体编程单元的已编程的下实体编程单元的数据也发生错误。但由于逻辑地址-实体地址映射表已被更新,已无从得知此数据的旧地址,而发生此数据无法恢复的状况。For example, a physical erasing unit of a multi-level cell (Multi Level Cell, MLC) NAND flash memory includes a lower physical programming unit (also known as a fast page) and an upper physical programming unit (also known as a slow page). After updating the mapping information of the temporary storage mapping table to the logical address-physical address mapping table, if the data to be written is programmed to the upper physical programming unit in the active physical erasing unit according to the programming sequence, a programming error occurs (For example, an unexpected power failure occurs), which will cause errors in the data of the programmed lower physical programming unit corresponding to the upper physical programming unit. However, since the logical address-physical address mapping table has been updated, there is no way to know the old address of the data, and the data cannot be recovered.

发明内容Contents of the invention

本发明实施例提供一种映射表更新方法、存储器控制电路单元及存储器存储装置,其能够有效率地更新逻辑地址-实体地址映射表,并避免更新逻辑地址-实体地址映射表后,已编程的数据因其它实体编程单元的编程失败而无法恢复的状况。Embodiments of the present invention provide a mapping table update method, a memory control circuit unit, and a memory storage device, which can efficiently update the logical address-physical address mapping table, and avoid the programmed A condition in which data cannot be recovered due to programming failure of other physical programming cells.

本发明一实施例提出一种映射表更新方法,以用于存储器存储装置。存储器存储装置具有可复写式非易失性存储器模块。可复写式非易失性存储器模块具有多个实体擦除单元,每一实体擦除单元具有多个实体编程单元。映射表更新方法包括:在缓冲存储器中分配映射表存储空间,以存储实体地址-逻辑地址映射表;判断映射表存储空间中的剩余存储空间是否小于一第一门槛值;倘若判断剩余存储空间小于第一门槛值,则将存储在映射表存储空间中的实体地址-逻辑地址映射表的映射信息更新至至少一逻辑地址-实体地址映射表;清除存储在映射表存储空间中的实体地址-逻辑地址映射表的映射信息;以及将属于多个逻辑编程单元的多笔写入数据编程至所述实体擦除单元之中的一个作动实体擦除单元的多个实体编程单元,建立编程所述写入数据的实体编程单元与逻辑编程单元之间的多个更新映射信息,并且将所述更新映射信息存储至映射表存储空间中。An embodiment of the present invention provides a method for updating a mapping table, which is used in a memory storage device. The memory storage device has a rewritable nonvolatile memory module. The rewritable non-volatile memory module has a plurality of physical erasing units, and each physical erasing unit has a plurality of physical programming units. The method for updating the mapping table includes: allocating a mapping table storage space in the buffer memory to store the physical address-logical address mapping table; judging whether the remaining storage space in the mapping table storage space is less than a first threshold; if judging that the remaining storage space is less than The first threshold value is to update the mapping information of the physical address-logical address mapping table stored in the mapping table storage space to at least one logical address-physical address mapping table; clear the physical address-logic address stored in the mapping table storage space The mapping information of the address mapping table; and programming a plurality of writing data belonging to a plurality of logical programming units to a plurality of physical programming units of an actuating physical erasing unit among the physical erasing units, establishing the programming described A plurality of updated mapping information between the physical programming unit and the logical programming unit of the data is written, and the updated mapping information is stored in the storage space of the mapping table.

在本发明的一实施例中,上述将所述更新映射信息存储至映射表存储空间中的步骤包括:当将所述更新映射信息的其中一部分存储至映射表存储空间并且映射表存储空间中的剩余存储空间不大于第二门槛值时,判断作动实体擦除单元中是否存有至少一第一实体编程单元,其中所述至少一第一实体编程单元为下实体编程单元,所述至少一第一实体编程单元已编程有效数据且对应所述至少一第一实体编程单元的上实体编程单元未被编程;倘若判断作动实体擦除单元中存有所述至少一第一实体编程单元时,则将虚拟数据编程至对应所述至少一第一实体编程单元的上实体编程单元;在将虚拟数据编程至对应所述至少一第一实体编程单元的上实体编程单元之后,将存储在映射表存储空间中的实体地址-逻辑地址映射表的映射信息更新至至少一逻辑地址-实体地址映射表;以及清除存储在映射表存储空间中的实体地址-逻辑地址映射表的映射信息并且将所述更新映射信息的其余部分存储至映射表存储空间中。In an embodiment of the present invention, the above-mentioned step of storing the updated mapping information in the mapping table storage space includes: when storing a part of the updated mapping information in the mapping table storage space and the When the remaining storage space is not greater than the second threshold value, it is judged whether there is at least one first physical programming unit in the active physical erasing unit, wherein the at least one first physical programming unit is a lower physical programming unit, and the at least one The first physical programming unit has been programmed with valid data and the upper physical programming unit corresponding to the at least one first physical programming unit has not been programmed; if it is determined that the at least one first physical programming unit is stored in the active physical erasing unit , then program the dummy data to the upper physical programming unit corresponding to the at least one first physical programming unit; after programming the dummy data to the upper physical programming unit corresponding to the at least one first physical programming unit, the data stored in the mapping The mapping information of the physical address-logical address mapping table in the table storage space is updated to at least one logical address-physical address mapping table; and the mapping information of the physical address-logical address mapping table stored in the mapping table storage space is cleared and all The remaining part of the updated mapping information is stored in the storage space of the mapping table.

在本发明的一实施例中,上述映射表存储空间中已存储对应多个已编程实体擦除单元的多个更新映射信息。In an embodiment of the present invention, a plurality of updated mapping information corresponding to a plurality of programmed physical erase units has been stored in the above-mentioned mapping table storage space.

在本发明的一实施例中,上述的映射表更新方法还包括:计算对应所述已编程实体擦除单元的其中一个已编程实体擦除单元的更新映射信息的大小,其中所述其中一个已编程实体擦除单元为在将所述写入数据编程至作动实体擦除单元的多个实体编程单元之前最后编程的实体擦除单元;以及设定其中一个已编程实体擦除单元的更新映射信息的大小作为第一门槛值。In an embodiment of the present invention, the above-mentioned mapping table updating method further includes: calculating the size of the update mapping information of one of the programmed physical erasing units corresponding to the programmed physical erasing unit, wherein the one of the programmed physical erasing units The programming physical erasing unit is the last programmed physical erasing unit before the write data is programmed to a plurality of physical programming units of the actuating physical erasing unit; and an update map of one of the programmed physical erasing units is set The size of the information is used as the first threshold.

在本发明的一实施例中,上述的映射表更新方法还包括:计算对应每一已编程实体擦除单元的更新映射信息的大小;计算所述已编程实体擦除单元的更新映射信息的大小的平均值;以及设定平均值作为第一门槛值。In an embodiment of the present invention, the above-mentioned mapping table updating method further includes: calculating the size of the update mapping information corresponding to each programmed physical erasing unit; calculating the size of the updating mapping information of the programmed physical erasing unit the average value of ; and setting the average value as the first threshold value.

在本发明的一实施例中,上述的映射表更新方法还包括:计算对应每一已编程实体擦除单元的更新映射信息的大小;识别对应所述已编程实体擦除单元的更新映射信息的大小之中的最大值;以及设定最大值作为第一门槛值。In an embodiment of the present invention, the above-mentioned mapping table updating method further includes: calculating the size of the update mapping information corresponding to each programmed physical erasing unit; identifying the size of the updating mapping information corresponding to the programmed physical erasing unit a maximum value among the sizes; and setting the maximum value as the first threshold value.

在本发明的一实施例中,上述写入数据之中的至少一部分数据是将从主机系统所接收的多笔原始数据压缩后所产生的数据。In an embodiment of the present invention, at least a part of the written data is data generated by compressing multiple pieces of original data received from the host system.

本发明一实施例提出一种存储器控制电路单元,用于控制存储器存储装置的可复写式非易失性存储器模块。其中可复写式非易失性存储器模块具有多个实体擦除单元,每一实体擦除单元具有多个实体编程单元。存储器控制电路单元包括:主机接口、存储器接口与存储器管理电路。主机接口用以电性连接至主机系统;存储器接口用以电性连接至可复写式非易失性存储器模块;且存储器管理电路电性连接至主机接口与存储器接口。存储器管理电路用以在缓冲存储器中分配映射表存储空间,以存储实体地址-逻辑地址映射表,此外,存储器管理电路还用以判断映射表存储空间中的剩余存储空间是否小于一第一门槛值。倘若判断剩余存储空间小于第一门槛值,存储器管理电路还用以将存储在映射表存储空间中的实体地址-逻辑地址映射表的映射信息更新至至少一逻辑地址-实体地址映射表。再者,存储器管理电路还用以清除存储在映射表存储空间中的实体地址-逻辑地址映射表的映射信息。另外,存储器管理电路还用以将属于多个逻辑编程单元的多笔写入数据编程至所述实体擦除单元之中的一个作动实体擦除单元的多个实体编程单元,建立编程所述写入数据的实体编程单元与该些逻辑编程单元之间的多个更新映射信息,并且将所述更新映射信息存储至映射表存储空间中。An embodiment of the present invention provides a memory control circuit unit for controlling a rewritable non-volatile memory module of a memory storage device. The rewritable non-volatile memory module has a plurality of physical erasing units, and each physical erasing unit has a plurality of physical programming units. The memory control circuit unit includes: a host interface, a memory interface and a memory management circuit. The host interface is electrically connected to the host system; the memory interface is electrically connected to the rewritable non-volatile memory module; and the memory management circuit is electrically connected to the host interface and the memory interface. The memory management circuit is used to allocate the mapping table storage space in the buffer memory to store the physical address-logical address mapping table. In addition, the memory management circuit is also used to judge whether the remaining storage space in the mapping table storage space is less than a first threshold value . If it is determined that the remaining storage space is smaller than the first threshold, the memory management circuit is further configured to update the mapping information of the physical address-logical address mapping table stored in the mapping table storage space to at least one logical address-physical address mapping table. Furthermore, the memory management circuit is also used for clearing the mapping information of the physical address-logical address mapping table stored in the mapping table storage space. In addition, the memory management circuit is also used to program multiple pieces of writing data belonging to multiple logical programming units to a plurality of physical programming units of an actuating physical erasing unit among the physical erasing units, and to establish programming of the physical erasing unit. A plurality of updated mapping information between the physical programming unit of data and the logical programming units is written, and the updated mapping information is stored in the storage space of the mapping table.

在本发明的一实施例中,当将所述更新映射信息的其中一部分存储至映射表存储空间且映射表存储空间的剩余存储空间不大于第二门槛值时,存储器管理电路还用以判断作动实体擦除单元中是否存有至少一第一实体编程单元,其中所述至少一第一实体编程单元为下实体编程单元,所述至少一第一实体编程单元已编程有效数据且对应该所述至少一第一实体编程单元的上实体编程单元未被编程。此外,倘若判断作动实体擦除单元中存有所述至少一第一实体编程单元时,存储器管理电路还用以将虚拟数据编程至对应所述至少一第一实体编程单元的上实体编程单元。并且,在将虚拟数据编程至对应所述至少一第一实体编程单元的上实体编程单元之后,存储器管理电路还用以将存储在映射表存储空间中的实体地址-逻辑地址映射表的映射信息更新至至少一逻辑地址-实体地址映射表。再者,存储器管理电路还用以清除存储在映射表存储空间中的实体地址-逻辑地址映射表的映射信息并且将所述更新映射信息的其余部分存储至映射表存储空间中。In an embodiment of the present invention, when a part of the updated mapping information is stored in the storage space of the mapping table and the remaining storage space of the storage space of the mapping table is not greater than the second threshold value, the memory management circuit is also used to determine the Whether there is at least one first physical programming unit in the active physical erasing unit, wherein the at least one first physical programming unit is a lower physical programming unit, and the at least one first physical programming unit has been programmed with valid data and corresponds to the The upper physical programming unit of the at least one first physical programming unit is not programmed. In addition, if it is determined that the at least one first physical programming unit exists in the active physical erasing unit, the memory management circuit is also used to program dummy data to the upper physical programming unit corresponding to the at least one first physical programming unit . Moreover, after programming the dummy data to the upper physical programming unit corresponding to the at least one first physical programming unit, the memory management circuit is also used to store the mapping information of the physical address-logical address mapping table in the mapping table storage space Updating to at least one logical address-physical address mapping table. Moreover, the memory management circuit is also used for clearing the mapping information of the physical address-logical address mapping table stored in the mapping table storage space and storing the rest of the updated mapping information in the mapping table storage space.

在本发明的一实施例中,上述映射表存储空间中已存储对应多个已编程实体擦除单元的多个更新映射信息。In an embodiment of the present invention, a plurality of updated mapping information corresponding to a plurality of programmed physical erase units has been stored in the above-mentioned mapping table storage space.

在本发明的一实施例中,上述存储器管理电路还用以计算对应所述已编程实体擦除单元的其中一个已编程实体擦除单元的更新映射信息的大小,其中所述其中一个已编程实体擦除单元为在将所述写入数据编程至作动实体擦除单元的多个实体编程单元之前最后编程的实体擦除单元。并且,存储器管理电路还用以设定所述其中一个已编程实体擦除单元的更新映射信息的大小作为第一门槛值。In an embodiment of the present invention, the above-mentioned memory management circuit is also used to calculate the size of the update mapping information of one of the programmed physical erase units corresponding to the programmed physical erase unit, wherein the one of the programmed physical erase units The erasing unit is the last programmed physical erasing unit before programming the write data to the plurality of physical programming units that activate the physical erasing unit. Moreover, the memory management circuit is also used to set the size of the update mapping information of one of the programmed physical erase units as the first threshold value.

在本发明的一实施例中,上述存储器管理电路还用以计算对应每一已编程实体擦除单元的更新映射信息的大小。此外,存储器管理电路还用以计算所述已编程实体擦除单元的更新映射信息的大小的平均值,并设定此平均值作为第一门槛值。In an embodiment of the present invention, the above-mentioned memory management circuit is also used to calculate the size of the update mapping information corresponding to each programmed physical erasing unit. In addition, the memory management circuit is also used to calculate the average value of the size of the updated mapping information of the programmed physical erasing units, and set the average value as the first threshold value.

在本发明的一实施例中,上述存储器管理电路还用以计算对应每一已编程实体擦除单元的更新映射信息的大小。此外,存储器管理电路还用以识别对应所述已编程实体擦除单元的更新映射信息的大小之中的最大值,并设定此最大值作为第一门槛值。In an embodiment of the present invention, the above-mentioned memory management circuit is also used to calculate the size of the update mapping information corresponding to each programmed physical erasing unit. In addition, the memory management circuit is also used to identify the maximum value among the sizes of the update mapping information corresponding to the programmed physical erasing units, and set the maximum value as the first threshold value.

在本发明的一实施例中,上述写入数据之中的至少一部分数据是通过上述存储器管理电路将从主机系统所接收的多笔原始数据压缩后所产生的数据。In an embodiment of the present invention, at least a part of the written data is data generated by compressing multiple pieces of original data received from the host system through the memory management circuit.

本发明一实施例提出一种存储器存储装置,包括:连接接口单元、可复写式非易失性存储器模块及存储器控制电路单元。连接接口单元用以电性连接至主机系统;可复写式非易失性存储器模块包括多个实体擦除单元;存储器控制电路单元电性连接至连接接口单元与可复写式非易失性存储器模块。存储器控制电路单元用以在缓冲存储器中分配映射表存储空间,用以存储实体地址-逻辑地址映射表。此外,存储器控制电路单元还用以判断映射表存储空间中的剩余存储空间是否小于一第一门槛值。倘若判断剩余存储空间小于第一门槛值,存储器控制电路单元还用以将存储在映射表存储空间中的实体地址-逻辑地址映射表的映射信息更新至至少一逻辑地址-实体地址映射表。再者,存储器控制电路单元还用以清除存储在映射表存储空间中的实体地址-逻辑地址映射表的映射信息。另外,存储器控制电路单元还用以将属于多个逻辑编程单元的多笔写入数据编程至所述实体擦除单元之中的一个作动实体擦除单元的多个实体编程单元,建立编程所述写入数据的实体编程单元与逻辑编程单元之间的多个更新映射信息,并且将所述更新映射信息存储至映射表存储空间中。An embodiment of the present invention provides a memory storage device, including: a connection interface unit, a rewritable non-volatile memory module, and a memory control circuit unit. The connection interface unit is used to electrically connect to the host system; the rewritable non-volatile memory module includes a plurality of entity erasing units; the memory control circuit unit is electrically connected to the connection interface unit and the rewritable non-volatile memory module . The memory control circuit unit is used for allocating the mapping table storage space in the buffer memory for storing the physical address-logic address mapping table. In addition, the memory control circuit unit is also used to determine whether the remaining storage space in the storage space of the mapping table is smaller than a first threshold value. If it is determined that the remaining storage space is smaller than the first threshold, the memory control circuit unit is further configured to update the mapping information of the physical address-logical address mapping table stored in the mapping table storage space to at least one logical address-physical address mapping table. Furthermore, the memory control circuit unit is also used for clearing the mapping information of the physical address-logical address mapping table stored in the mapping table storage space. In addition, the memory control circuit unit is also used to program multiple pieces of write data belonging to multiple logical programming units to a plurality of physical programming units of an actuating physical erasing unit among the physical erasing units, so as to establish programming A plurality of updated mapping information between the physical programming unit and the logical programming unit in which the data is written, and store the updated mapping information in the storage space of the mapping table.

在本发明的一实施例中,当将所述更新映射信息的其中一部分存储至映射表存储空间并且映射表存储空间中的剩余存储空间不大于第二门槛值时,存储器控制电路单元还用以判断作动实体擦除单元中是否存有至少一第一实体编程单元,其中所述至少一第一实体编程单元为下实体编程单元,所述至少一第一实体编程单元已编程有效数据且对应所述至少一第一实体编程单元的上实体编程单元未被编程。此外,倘若判断作动实体擦除单元中存有所述至少一第一实体编程单元时,存储器控制电路单元还用以将虚拟数据编程至对应所述至少一第一实体编程单元的上实体编程单元。并且,在将虚拟数据编程至对应所述至少一第一实体编程单元的上实体编程单元之后,存储器控制电路单元还用以将存储在映射表存储空间中的实体地址-逻辑地址映射表的映射信息更新至至少一逻辑地址-实体地址映射表。再者,存储器控制电路单元还用以清除存储在映射表存储空间中的实体地址-逻辑地址映射表的映射信息并且将所述更新映射信息的其余部分存储至映射表存储空间中。In an embodiment of the present invention, when a part of the updated mapping information is stored in the mapping table storage space and the remaining storage space in the mapping table storage space is not greater than the second threshold value, the memory control circuit unit is further used to judging whether there is at least one first physical programming unit in the active physical erasing unit, wherein the at least one first physical programming unit is a lower physical programming unit, and the at least one first physical programming unit has programmed valid data and corresponds to An upper physical programming unit of the at least one first physical programming unit is not programmed. In addition, if it is determined that the at least one first physical programming unit exists in the operating physical erasing unit, the memory control circuit unit is also used to program dummy data to the upper physical programming unit corresponding to the at least one first physical programming unit. unit. Moreover, after programming the dummy data to the upper physical programming unit corresponding to the at least one first physical programming unit, the memory control circuit unit is also used to map the physical address-logical address mapping table stored in the mapping table storage space The information is updated to at least one logical address-physical address mapping table. Furthermore, the memory control circuit unit is also used for clearing the mapping information of the physical address-logical address mapping table stored in the mapping table storage space and storing the rest of the updated mapping information in the mapping table storage space.

在本发明的一实施例中,上述映射表存储空间中已存储对应多个已编程实体擦除单元的多个更新映射信息。In an embodiment of the present invention, a plurality of updated mapping information corresponding to a plurality of programmed physical erase units has been stored in the above-mentioned mapping table storage space.

在本发明的一实施例中,上述存储器控制电路单元还用以计算对应所述已编程实体擦除单元的其中一个已编程实体擦除单元的更新映射信息的大小,其中所述其中一个已编程实体擦除单元为在将所述写入数据编程至作动实体擦除单元的多个实体编程单元之前最后编程的实体擦除单元。并且,存储器控制电路单元还用以设定所述其中一个已编程实体擦除单元的更新映射信息的大小作为第一门槛值。In an embodiment of the present invention, the above-mentioned memory control circuit unit is also used to calculate the size of the update mapping information of one of the programmed physical erasing units corresponding to the programmed physical erasing unit, wherein the one of the programmed physical erasing units The physical erasing unit is the last programmed physical erasing unit before the write data is programmed into the plurality of physical programming units that activate the physical erasing unit. Moreover, the memory control circuit unit is also used to set the update mapping information size of one of the programmed physical erasing units as the first threshold value.

在本发明的一实施例中,上述存储器控制电路单元还用以计算对应每一已编程实体擦除单元的更新映射信息的大小。此外,存储器控制电路单元还用以计算所述已编程实体擦除单元的更新映射信息的大小的平均值,并设定此平均值作为第一门槛值。In an embodiment of the present invention, the memory control circuit unit is further used to calculate the size of the update mapping information corresponding to each programmed physical erase unit. In addition, the memory control circuit unit is also used to calculate the average value of the size of the updated mapping information of the programmed physical erasing units, and set the average value as the first threshold value.

在本发明的一实施例中,上述存储器控制电路单元还用以计算对应每一已编程实体擦除单元的更新映射信息的大小。此外,存储器控制电路单元还用以识别对应所述已编程实体擦除单元的更新映射信息的大小之中的最大值,并设定此最大值作为第一门槛值。In an embodiment of the present invention, the memory control circuit unit is further used to calculate the size of the update mapping information corresponding to each programmed physical erase unit. In addition, the memory control circuit unit is also used to identify the maximum value among the sizes of the update mapping information corresponding to the programmed physical erasing units, and set the maximum value as the first threshold value.

在本发明的一实施例中,上述写入数据之中的至少一部分数据是通过存储器控制电路单元将从主机系统所接收的多笔原始数据压缩后所产生的数据。In an embodiment of the present invention, at least a part of the written data is data generated by compressing multiple pieces of original data received from the host system through the memory control circuit unit.

基于上述,本发明实施例提供的映射表更新方法、存储器控制电路单元及存储器存储装置,可提升逻辑地址-实体地址映射表的更新效率,并避免更新逻辑地址-实体地址映射表后,已编程的数据因其它实体编程单元的编程失败而无法恢复的状况。Based on the above, the mapping table update method, memory control circuit unit, and memory storage device provided by the embodiments of the present invention can improve the update efficiency of the logical address-physical address mapping table, and avoid the programmed The data cannot be recovered due to programming failure of other physical programming units.

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

附图说明Description of drawings

图1是本发明实施例所示出的主机系统与存储器存储装置的示意图;FIG. 1 is a schematic diagram of a host system and a memory storage device shown in an embodiment of the present invention;

图2是本发明实施例所示出的计算机、输入/输出装置与存储器存储装置的示意图;2 is a schematic diagram of a computer, an input/output device and a memory storage device shown in an embodiment of the present invention;

图3是本发明实施例所示出的主机系统与存储器存储装置的示意图;3 is a schematic diagram of a host system and a memory storage device shown in an embodiment of the present invention;

图4是本发明实施例所示出的存储器存储装置的概要方块图;4 is a schematic block diagram of a memory storage device shown in an embodiment of the present invention;

图5是本发明实施例所示出的存储器控制电路单元的概要方块图;5 is a schematic block diagram of a memory control circuit unit shown in an embodiment of the present invention;

图6A与图6B是本发明实施例所示出的管理实体擦除单元的范例示意图;FIG. 6A and FIG. 6B are exemplary schematic diagrams of a management entity erasing unit shown in an embodiment of the present invention;

图7A、图7B与图7C是本发明实施例所示出的将作动实体擦除单元的更新映射信息存储至映射表存储空间的范例示意图;FIG. 7A, FIG. 7B and FIG. 7C are exemplary schematic diagrams of storing the updated mapping information of the actuating entity erasing unit in the storage space of the mapping table shown in the embodiment of the present invention;

图8是本发明实施例所示出的将作动实体擦除单元的更新映射信息的一部分存储至映射表存储空间的范例示意图;FIG. 8 is a schematic diagram of an example of storing part of the updated mapping information of the active entity erasing unit in the storage space of the mapping table shown in the embodiment of the present invention;

图9是本发明实施例所示出的实体编程单元的排列顺序的示意图;FIG. 9 is a schematic diagram of the arrangement order of the physical programming units shown in the embodiment of the present invention;

图10A与图10B是本发明实施例所示出的将虚拟数据编程至作动实体擦除单元的上实体编程单元的范例示意图;FIG. 10A and FIG. 10B are exemplary schematic diagrams of programming dummy data to an upper physical programming unit that operates a physical erasing unit shown in an embodiment of the present invention;

图11为本发明实施例所示出的映射表更新方法的流程图;FIG. 11 is a flowchart of a method for updating a mapping table shown in an embodiment of the present invention;

图12为本发明实施例所示出的映射表更新方法的另一范例流程图。FIG. 12 is another exemplary flow chart of the method for updating the mapping table shown in the embodiment of the present invention.

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

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

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

12:计算机;12: computer;

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

122:微处理器;122: microprocessor;

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

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

128:数据传输接口128: Data transmission interface

21:鼠标;21: mouse;

22:键盘;22: keyboard;

23:显示器;23: Display;

24:打印机;24: printer;

25:随身盘;25: Pen drive;

26:存储卡;26: memory card;

27:固态硬盘;27: SSD;

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

32:SD卡;32: SD card;

33:MMC卡;33: MMC card;

34:存储棒;34: memory stick;

35:CF卡;35: CF card;

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

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

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

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

410(0)~410(N):实体擦除单元;410(0)~410(N): entity erasing unit;

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

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

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

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

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

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

514:数据压缩/解压缩电路;514: data compression/decompression circuit;

602:数据区;602: data area;

604:闲置区;604: idle area;

606:系统区;606: system area;

608:取代区;608: replace area;

610(0)~610(D):逻辑地址;610(0)~610(D): logic address;

701、801:映射表存储空间;701, 801: mapping table storage space;

UM0、UM1、UM2、UM3:更新映射信息;UM0, UM1, UM2, UM3: update mapping information;

PBA(0-0)~PBA(0-K):实体编程单元;PBA(0-0)~PBA(0-K): Entity programming unit;

W(0)~W(L):字符线;W(0)~W(L): character line;

D0~D5:有效数据D0~D5: valid data

DD:虚拟数据DD: dummy data

S1101、S1103、S1105、S1107、S1109、S1111、S1201、S1203、S1205、S1207:映射表更新方法的步骤。S1101, S1103, S1105, S1107, S1109, S1111, S1201, S1203, S1205, S1207: Steps in the method for updating the mapping table.

具体实施方式Detailed ways

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

图1是本发明实施例所示出的主机系统与存储器存储装置的示意图,且图2是本发明实施例所示出的计算机、输入/输出装置与存储器存储装置的示意图。FIG. 1 is a schematic diagram of a host system and a memory storage device according to an embodiment of the present invention, and FIG. 2 is a schematic diagram of a computer, an input/output device and a memory storage device according to an embodiment of the present invention.

请参照图1,主机系统11一般包括计算机12与输入/输出(input/output,简称I/O)装置13。计算机12包括微处理器122、随机存取存储器(random access memory,简称RAM)124、系统总线126与数据传输接口128。输入/输出装置13包括如图2的鼠标21、键盘22、显示器23与打印机24。必须了解的是,图2所示的装置非限制输入/输出装置13,输入/输出装置13还可包括其它装置。Referring to FIG. 1 , the host system 11 generally includes a computer 12 and an input/output (input/output, I/O for short) device 13 . The computer 12 includes a microprocessor 122 , a random access memory (random access memory, RAM for short) 124 , a system bus 126 and a data transmission interface 128 . The input/output device 13 includes a mouse 21 , a keyboard 22 , a monitor 23 and a printer 24 as shown in FIG. 2 . It must be understood that the device shown in FIG. 2 is not limited to the input/output device 13, and the input/output device 13 may also include other devices.

在本实施例中,存储器存储装置10是通过数据传输接口128与主机系统11的其它组件电性连接。通过微处理器122、随机存取存储器124与输入/输出装置13的运作可将数据写入至存储器存储装置10或从存储器存储装置10中读取数据。例如,存储器存储装置10可以是如图2所示的随身盘25、存储卡26或固态硬盘(Solid State Drive,简称SSD)27等的可复写式非易失性存储器存储装置。In this embodiment, the memory storage device 10 is electrically connected to other components of the host system 11 through the data transmission interface 128 . Data can be written into the memory storage device 10 or read from the memory storage device 10 through the operation of the microprocessor 122 , the random access memory 124 and the input/output device 13 . For example, the memory storage device 10 may be a rewritable non-volatile memory storage device such as a flash drive 25, a memory card 26, or a solid state drive (Solid State Drive, SSD for short) 27 as shown in FIG. 2 .

图3是本发明实施例所示出的主机系统与存储器存储装置的示意图。FIG. 3 is a schematic diagram of a host system and a memory storage device shown in an embodiment of the present invention.

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

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

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

在本实施例中,连接接口单元402是兼容于串行先进技术附件(Serial AdvancedTechnology Attachment,简称SATA)标准。然而,必须了解的是,本发明不限于此,连接接口单元402也可以是符合并形先进技术附件(Parallel Advanced Technology Attachment,简称PATA)标准、电气和电子工程师协会(Institute of Electrical and ElectronicEngineers,简称IEEE)1394标准、高速周边部件连接接口(Peripheral ComponentInterconnect Express,PCI Express)标准、通用串行总线(Universal Serial Bus,简称USB)标准、超高速一代(Ultra High Speed-I,简称UHS-I)接口标准、超高速二代(UltraHigh Speed-II,UHS-II)接口标准、安全数字(Secure Digital,SD)接口标准、存储棒(Memory Stick,简称MS)接口标准、多媒体存储卡(Multi Media Card,简称MMC)接口标准、小型快闪(Compact Flash,简称CF)接口标准、集成设备电路(Integrated DeviceElectronics,IDE)标准或其它适合的标准。在本实施例中,连接接口单元可与存储器控制电路单元封装在一个芯片中,或布设于一包含存储器控制电路单元的芯片外。In this embodiment, the connection interface unit 402 is compatible with the Serial Advanced Technology Attachment (SATA) standard. However, it must be understood that the present invention is not limited thereto, and the connection interface unit 402 may also conform to the Parallel Advanced Technology Attachment (PATA) standard, the Institute of Electrical and Electronic Engineers (Institute of Electrical and Electronic Engineers, IEEE) 1394 standard, Peripheral Component Interconnect Express (PCI Express) standard, Universal Serial Bus (Universal Serial Bus, referred to as USB) standard, Ultra High Speed-I (UHS-I for short) interface Standard, Ultra High Speed-II (UHS-II) interface standard, Secure Digital (Secure Digital, SD) interface standard, Memory Stick (Memory Stick, referred to as MS) interface standard, Multi Media Card (Multi Media Card, MMC for short) interface standard, Compact Flash (CF for short) interface standard, Integrated Device Electronics (IDE) standard, or other suitable standards. In this embodiment, the connection interface unit and the memory control circuit unit can be packaged in a chip, or arranged outside a chip including the memory control circuit unit.

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

可复写式非易失性存储器模块406是电性连接至存储器控制电路单元404,并且用以存储主机系统11所写入的数据。可复写式非易失性存储器模块406具有实体擦除单元410(0)~410(N)。例如,实体擦除单元410(0)~410(N)可属于同一个存储器晶粒(die)或者属于不同的存储器晶粒。每一实体擦除单元分别具有复数个实体编程单元,其中属于同一个实体擦除单元的实体编程单元可被独立地写入且被同时地擦除。然而,必须了解的是,本发明不限于此,每一实体擦除单元是可由64个实体编程单元、256个实体编程单元或其它任意个实体编程单元所组成。The rewritable non-volatile memory module 406 is electrically connected to the memory control circuit unit 404 and used for storing data written by the host system 11 . The rewritable non-volatile memory module 406 has physical erasing units 410(0)˜410(N). For example, the physical erase units 410(0)˜410(N) may belong to the same memory die or belong to different memory dies. Each physical erasing unit has a plurality of physical programming units, wherein the physical programming units belonging to the same physical erasing unit can be written independently and erased simultaneously. However, it must be understood that the present invention is not limited thereto, and each physical erasing unit may be composed of 64 physical programming units, 256 physical programming units, or any other number of physical programming units.

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

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

图5是本发明实施例所示出的存储器控制电路单元的概要方块图。FIG. 5 is a schematic block diagram of a memory control circuit unit shown in an embodiment of the present invention.

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

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

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

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

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

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

在一实施例中,存储器控制电路单元404还包括缓冲存储器508、电源管理电路510、错误检查与校正电路512与数据压缩/解压缩电路514。In one embodiment, the memory control circuit unit 404 further includes a buffer memory 508 , a power management circuit 510 , an error checking and correction circuit 512 and a data compression/decompression circuit 514 .

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

电源管理电路510是电性连接至存储器管理电路502并且用以控制存储器存储装置10的电源。The power management circuit 510 is electrically connected to the memory management circuit 502 and used to control the power of the memory storage device 10 .

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

数据压缩/解压缩电路514是电性连接至存储器管理电路502。在此,数据压缩/解压缩电路514用以压缩欲写入至可复写式非易失性存储器模块406的数据并且用以解压缩从可复写式非易失性存储器模块406中所读取的数据。例如,数据压缩/解压缩电路514包含压缩器(compressor)及解压缩器(decompressor)。压缩器可用以找出原始数据(originaldata)中存在的数据累赘(data redundancy)、移除所找出的累赘,将剩余的必要数据编码并且输出编码结果(即,压缩数据(compressed data)。而解压缩器用以将读入的压缩数据根据既定的步骤译码并送出译码结果(即,解压缩数据(decompressed data))。在本范例实施例中,数据压缩/解压缩电路514是使用无失真压缩算法来压缩数据,以使压缩后的数据能够被还原。The data compression/decompression circuit 514 is electrically connected to the memory management circuit 502 . Here, the data compression/decompression circuit 514 is used to compress the data to be written into the rewritable non-volatile memory module 406 and to decompress the data read from the rewritable non-volatile memory module 406 data. For example, the data compression/decompression circuit 514 includes a compressor and a decompressor. The compressor can be used to find out the data redundancy existing in the original data (original data), remove the found redundancy, encode the remaining necessary data and output the encoding result (ie, compressed data). The decompressor is used to decode the read-in compressed data according to predetermined steps and send out the decoding result (that is, decompressed data (decompressed data). In this exemplary embodiment, the data compression/decompression circuit 514 uses no Distortion compression algorithm to compress data so that the compressed data can be restored.

图6A与图6B是本发明实施例所示出的管理实体擦除单元的范例示意图。FIG. 6A and FIG. 6B are exemplary schematic diagrams of the erasing unit of the management entity shown in the embodiment of the present invention.

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

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

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

逻辑上属于系统区606的实体擦除单元是用以记录系统数据。例如,系统数据包括关于可复写式非易失性存储器模块的制造商与型号、可复写式非易失性存储器模块的实体擦除单元数、每一实体擦除单元的实体编程单元数等。The physical erase units logically belonging to the system area 606 are used to record system data. For example, the system data includes the manufacturer and model of the rewritable nonvolatile memory module, the number of physically erased units of the rewritable nonvolatile memory module, the number of physically programmed units per physically erased unit, and the like.

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

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

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

在本实施例中,存储器存储装置10的可复写式非易失性存储器模块406可以是以实体编程单元为基础(也称为页面为基础(page based))来进行管理。例如,在执行写入指令时,不管目前数据是要写入至那个逻辑编程单元,存储器控制电路单元404(或存储器管理电路502)均会以一个实体编程单元接续一个实体编程单元的方式来写入数据(也称为随机写入机制)。具体来说,存储器控制电路单元404(或存储器管理电路502)会从闲置区604中提取一个空的实体擦除单元作为作动实体擦除单元来写入数据。并且,当此作动实体擦除单元已写满时,存储器控制电路单元404(或存储器管理电路502)会再从闲置区604中提取另一个空的实体擦除单元作为作动实体擦除单元,以继续写入对应来自于主机系统11的写入指令的数据。In this embodiment, the rewritable non-volatile memory module 406 of the memory storage device 10 may be managed on a physical programming unit basis (also referred to as a page basis). For example, when executing a write command, regardless of which logical programming unit the current data is to be written into, the memory control circuit unit 404 (or the memory management circuit 502) will write in the form of one physical programming unit following one physical programming unit. input data (also known as random write mechanism). Specifically, the memory control circuit unit 404 (or the memory management circuit 502 ) extracts an empty physical erasing unit from the spare area 604 as an active physical erasing unit to write data. And, when the active physical erasing unit is full, the memory control circuit unit 404 (or the memory management circuit 502) will extract another empty physical erasing unit from the spare area 604 as the active physical erasing unit , to continue writing data corresponding to the write command from the host system 11 .

在本实施例中,存储器控制电路单元404(或存储器管理电路502)会在缓冲存储器508中分配映射表存储空间,用以存储实体地址-逻辑地址映射表(physical address-logical address mapping table),以记录已编程的作动实体擦除单元的实体编程单元与数据所属的逻辑编程单元的映射关系。在本实施例中,编程至实体编程单元的数据可以是经过压缩或未经过压缩的。因此,一个实体编程单元可映射一个或多个逻辑编程单元。若一个实体编程单元是映射到一个逻辑编程单元(例如,编程至作动实体擦除单元的数据未经过压缩),当作动实体擦除单元写满时,作动实体擦除单元的多个实体编程单元与多个逻辑编程单元的多个映射关系所形成的更新映射信息的大小恰为1单位。存储器控制电路单元404(或存储器管理电路502)可在缓冲存储器508中分配4单位的存储空间作为映射表存储空间来存储实体地址-逻辑地址映射表。然而,也可视实际需求来决定分配更多或更少的存储空间来作为映射表存储空间,本发明不加以限制。In this embodiment, the memory control circuit unit 404 (or the memory management circuit 502) allocates a mapping table storage space in the buffer memory 508 to store a physical address-logical address mapping table (physical address-logical address mapping table), To record the mapping relationship between the programmed physical programming unit of the active entity erasing unit and the logical programming unit to which the data belongs. In this embodiment, the data programmed into the physical programming unit may be compressed or uncompressed. Therefore, one physical programming unit can map one or more logical programming units. If a physical programming unit is mapped to a logical programming unit (for example, the data programmed to the actuating entity erasing unit is not compressed), when the actuating entity erasing unit is full, multiple The size of the updated mapping information formed by the multiple mapping relationships between the physical programming unit and the multiple logical programming units is exactly 1 unit. The memory control circuit unit 404 (or the memory management circuit 502 ) can allocate 4 units of storage space in the buffer memory 508 as the mapping table storage space to store the physical address-logical address mapping table. However, more or less storage space may be allocated as the storage space of the mapping table according to actual needs, which is not limited by the present invention.

图7A、图7B与图7C是本发明实施例所示出的将作动实体擦除单元的更新映射信息存储至映射表存储空间的范例示意图。FIG. 7A , FIG. 7B and FIG. 7C are exemplary schematic diagrams of storing the updated mapping information of the erasing unit of the actuating entity in the storage space of the mapping table shown in the embodiment of the present invention.

请参照图7A,为方便说明,本实施例是以尚未有任何实体擦除单元被关联至数据区为开始来进行说明。存储器控制电路单元404(或存储器管理电路502)在缓冲存储器508中分配4单位存储空间的映射表存储空间701以存储实体地址-逻辑地址映射表。当存储器控制电路单元404(或存储器管理电路502)从主机系统11接收到将数据写入逻辑地址的写入指令时,存储器控制电路单元404(或存储器管理电路502)会从闲置区604提取一个空的实体擦除单元(即,实体擦除单元410(0))作为作动实体擦除单元。存储器控制电路单元404(或存储器管理电路502)会按照作动实体擦除单元的实体编程单元的编程顺序将数据编程至实体擦除单元410(0)的实体编程单元中。存储器控制电路单元404(或存储器管理电路502)并根据实体擦除单元410(0)中已编程的实体编程单元与数据所属的逻辑编程单元的映射关系建立更新映射信息,且将更新映射信息存储至映射表存储空间701中。当作动实体擦除单元(即实体擦除单元410(0))写满时,存储器控制电路单元404(或存储器管理电路502)会从闲置区604提取另一个空的实体擦除单元410(1)作为新的作动实体擦除单元,以存储后续写入指令的数据。Please refer to FIG. 7A , for the convenience of description, the present embodiment starts from the fact that no physical erasing unit has been associated with the data area. The memory control circuit unit 404 (or the memory management circuit 502 ) allocates the mapping table storage space 701 of 4 units of storage space in the buffer memory 508 to store the physical address-logical address mapping table. When the memory control circuit unit 404 (or memory management circuit 502) receives a write command to write data into a logical address from the host system 11, the memory control circuit unit 404 (or memory management circuit 502) will extract a An empty physical erase unit (ie, physical erase unit 410(0)) acts as an active physical erase unit. The memory control circuit unit 404 (or the memory management circuit 502 ) will program data into the physical programming units of the physical erasing unit 410 ( 0 ) according to the programming sequence of the physical programming units that activate the physical erasing unit. The memory control circuit unit 404 (or the memory management circuit 502) establishes update mapping information according to the mapping relationship between the programmed physical programming unit in the physical erasing unit 410 (0) and the logical programming unit to which the data belongs, and stores the update mapping information to the mapping table storage space 701. When the active physical erasing unit (that is, the physical erasing unit 410 (0)) is full, the memory control circuit unit 404 (or the memory management circuit 502) will extract another empty physical erasing unit 410 ( 1) Erasing the unit as a new operating entity to store the data of subsequent write commands.

在本实施例中,当作动实体擦除单元已写满而需从闲置区604选取另一个空的实体擦除单元作为新的作动实体擦除单元时,存储器控制电路单元404(或存储器管理电路502)会判断是否需更新逻辑地址-实体地址映射表。具体而言,存储器控制电路单元404(或存储器管理电路502)会预估映射表存储空间701的剩余存储空间是否还可完整存储对应一个实体擦除单元的更新映射信息,进而决定是否需将存储在映射表存储空间701中的实体地址-逻辑地址映射表的映射信息更新到逻辑地址-实体地址映射表。在本实施例中,存储器控制电路单元404(或存储器管理电路502)会判断映射表存储空间701的剩余存储空间是否小于特定的第一门槛值。倘若剩余存储空间小于第一门槛值,存储器控制电路单元404(或存储器管理电路502)会根据实体地址-逻辑地址映射表701中所存储的映射信息,将对应的逻辑地址-实体地址映射表加载至缓冲存储器508,并将映射信息更新至逻辑地址-实体地址映射表。In this embodiment, when the active physical erasing unit is full and another empty physical erasing unit needs to be selected from the idle area 604 as a new active physical erasing unit, the memory control circuit unit 404 (or memory The management circuit 502) will determine whether to update the logical address-physical address mapping table. Specifically, the memory control circuit unit 404 (or the memory management circuit 502) will estimate whether the remaining storage space of the mapping table storage space 701 can completely store the update mapping information corresponding to a physical erasing unit, and then decide whether to store The mapping information of the physical address-logical address mapping table in the mapping table storage space 701 is updated to the logical address-physical address mapping table. In this embodiment, the memory control circuit unit 404 (or the memory management circuit 502 ) determines whether the remaining storage space of the mapping table storage space 701 is smaller than a specific first threshold. If the remaining storage space is less than the first threshold value, the memory control circuit unit 404 (or the memory management circuit 502) will load the corresponding logical address-physical address mapping table according to the mapping information stored in the physical address-logical address mapping table 701 to the buffer memory 508, and update the mapping information to the logical address-physical address mapping table.

在本实施例中,第一门槛值可设定为存储在映射表存储空间701中对应已编程的实体擦除单元的其中一个实体擦除单元的更新映射信息的大小。例如,此其中一个实体擦除单元可为在选取新的作动实体擦除单元之前最后一个编程的实体擦除单元。In this embodiment, the first threshold may be set as the size of the updated mapping information stored in the mapping table storage space 701 corresponding to one of the programmed physical erasing units. For example, one of the physical erase units may be the last programmed physical erase unit before selecting a new active physical erase unit.

在本实施例中,当实体擦除单元410(0)已写满,而选取实体擦除单元410(1)作为新的作动实体擦除单元时,存储器控制电路单元404(或存储器管理电路502)会计算映射表存储空间701中对应已编程的实体擦除单元410(0)的更新映射信息UM0的大小为1单位,且映射表存储空间701的剩余存储空间为3单位。此时,在选取新的作动实体擦除单元之前最后一个编程的实体擦除单元为实体擦除单元410(0)。因此,存储器控制电路单元404(或存储器管理电路502)设定实体擦除单元410(0)的更新映射信息UM0的大小(即1单位)作为第一门槛值。进一步地,存储器控制电路单元404(或存储器管理电路502)会判断映射表存储空间701的剩余存储空间(即3单位)不小于第一门槛值(即1单位),而无需更新逻辑地址-实体地址映射表。也就是说,可将新的作动实体擦除单元的更新映射信息存储至映射表存储空间701。In this embodiment, when the physical erasing unit 410 (0) is full and the physical erasing unit 410 (1) is selected as a new actuating physical erasing unit, the memory control circuit unit 404 (or memory management circuit 502) The size of the updated mapping information UM0 corresponding to the programmed physical erase unit 410(0) in the mapping table storage space 701 is calculated as 1 unit, and the remaining storage space of the mapping table storage space 701 is 3 units. At this time, the last programmed physical erase unit before selecting a new active physical erase unit is the physical erase unit 410(0). Therefore, the memory control circuit unit 404 (or the memory management circuit 502 ) sets the size (ie, 1 unit) of the update mapping information UM0 of the physical erasing unit 410 ( 0 ) as the first threshold value. Further, the memory control circuit unit 404 (or the memory management circuit 502) will judge that the remaining storage space (ie, 3 units) of the mapping table storage space 701 is not less than the first threshold value (ie, 1 unit), without updating the logical address-entity Address mapping table. That is to say, the updated mapping information of the new active entity erasing unit can be stored in the mapping table storage space 701 .

请参照图7B,存储器控制电路单元404(或存储器管理电路502)选取实体擦除单元410(1)作为作动实体擦除单元,并将数据编程至实体擦除单元410(1)中。存储器控制电路单元404(或存储器管理电路502)根据实体擦除单元410(1)中已编程的实体编程单元与数据所属的逻辑编程单元的映射关系建立更新映射信息,且将更新映射信息存储至映射表存储空间中。当实体擦除单元410(1)写满时,存储器控制电路单元404(或存储器管理电路502)计算实体地址-逻辑地址映射表701中对应已编程的实体擦除单元410(1)的更新映射信息UM1的大小为1.5单位。Referring to FIG. 7B, the memory control circuit unit 404 (or the memory management circuit 502) selects the physical erasing unit 410(1) as the active physical erasing unit, and programs data into the physical erasing unit 410(1). The memory control circuit unit 404 (or the memory management circuit 502) establishes update mapping information according to the mapping relationship between the programmed physical programming unit in the physical erasing unit 410(1) and the logical programming unit to which the data belongs, and stores the update mapping information in In the mapping table storage space. When the physical erasing unit 410 (1) is full, the memory control circuit unit 404 (or the memory management circuit 502) calculates the update mapping of the programmed physical erasing unit 410 (1) in the physical address-logical address mapping table 701 The size of the information UM1 is 1.5 units.

此时,映射表存储空间701已存储有对应实体擦除单元410(0)的更新映射信息UM0与对应实体擦除单元410(1)的更新映射信息UM1,其中更新映射信息UM0的大小为1单位,更新映射信息UM1的大小为1.5单位。存储器控制电路单元404(或存储器管理电路502)并计算映射表存储空间701的剩余存储空间为1.5单位。而在选取新的作动实体擦除单元之前最后一个编程的实体擦除单元为实体擦除单元410(1)。因此,存储器控制电路单元404(或存储器管理电路502)设定实体擦除单元410(1)的更新映射信息UM1的大小(即1.5单位)作为第一门槛值。进一步地,存储器控制电路单元404(或存储器管理电路502)判断剩余存储空间(即1.5单位)不小于第一门槛值(即1.5单位),由此不更新逻辑地址-实体地址映射表。也就是说,可将新的作动实体擦除单元的更新映射信息存储至映射表存储空间701。At this time, the mapping table storage space 701 has stored the updated mapping information UM0 corresponding to the physical erasing unit 410(0) and the updated mapping information UM1 corresponding to the physical erasing unit 410(1), wherein the size of the updated mapping information UM0 is 1 unit, the size of the update mapping information UM1 is 1.5 units. The memory control circuit unit 404 (or the memory management circuit 502 ) calculates that the remaining storage space of the mapping table storage space 701 is 1.5 units. The last programmed physical erase unit before selecting a new active physical erase unit is the physical erase unit 410 ( 1 ). Therefore, the memory control circuit unit 404 (or the memory management circuit 502 ) sets the size (ie, 1.5 units) of the update mapping information UM1 of the physical erasing unit 410(1) as the first threshold value. Further, the memory control circuit unit 404 (or the memory management circuit 502 ) determines that the remaining storage space (ie 1.5 units) is not less than the first threshold (ie 1.5 units), thereby not updating the logical address-physical address mapping table. That is to say, the updated mapping information of the new active entity erasing unit can be stored in the mapping table storage space 701 .

请参照图7C,存储器控制电路单元404(或存储器管理电路502)选取实体擦除单元410(2)作为作动实体擦除单元,并将数据编程至实体擦除单元410(2)中。存储器控制电路单元404(或存储器管理电路502)根据实体擦除单元410(2)中已编程的实体编程单元与数据所属的逻辑编程单元的映射关系建立更新映射信息,且将更新映射信息存储至映射表存储空间701中。当实体擦除单元410(2)写满时,存储器控制电路单元404(或存储器管理电路502)计算映射表存储空间701中对应已编程的实体擦除单元410(2)的更新映射信息UM2的大小为1单位。Referring to FIG. 7C, the memory control circuit unit 404 (or the memory management circuit 502) selects the physical erasing unit 410(2) as the active physical erasing unit, and programs data into the physical erasing unit 410(2). The memory control circuit unit 404 (or the memory management circuit 502) establishes update mapping information according to the mapping relationship between the programmed physical programming unit in the physical erasing unit 410(2) and the logical programming unit to which the data belongs, and stores the update mapping information in In the mapping table storage space 701. When the entity erasing unit 410 (2) is full, the memory control circuit unit 404 (or the memory management circuit 502) calculates the updated mapping information UM2 corresponding to the programmed entity erasing unit 410 (2) in the mapping table storage space 701 The size is 1 unit.

此时,映射表存储空间701已存储有对应实体擦除单元410(0)的更新映射信息UM0、对应实体擦除单元410(1)的更新映射信息UM1与对应实体擦除单元410(2)的更新映射信息UM2,其中更新映射信息UM0的大小为1单位,更新映射信息UM1的大小为1.5单位,更新映射信息UM2的大小为1单位。存储器控制电路单元404(或存储器管理电路502)并计算映射表存储空间701的剩余存储空间为0.5单位。在选取新的作动实体擦除单元之前最后一个编程的实体擦除单元为实体擦除单元410(2)。因此,存储器控制电路单元404(或存储器管理电路502)设定实体擦除单元410(2)的更新映射信息UM1的大小(即1单位)作为第一门槛值。进一步地,存储器控制电路单元404(或存储器管理电路502)判断剩余存储空间(即0.5单位)小于第一门槛值(即1单位),需更新逻辑地址-实体地址映射表。也就是说,映射表存储空间701可能无法完整存储对应一个新的作动实体擦除单元的更新映射信息,而需将存储在映射表存储空间701中的实体地址-逻辑地址映射表的映射信息存储至逻辑地址-实体地址映射表,并清除映射表存储空间701中的实体地址-逻辑地址映射表的映射信息。At this time, the mapping table storage space 701 has stored the updated mapping information UM0 corresponding to the physical erasing unit 410 (0), the updated mapping information UM1 corresponding to the physical erasing unit 410 (1) and the corresponding physical erasing unit 410 (2) The size of the update mapping information UM2 is 1 unit, the size of the update mapping information UM1 is 1.5 units, and the size of the update mapping information UM2 is 1 unit. The memory control circuit unit 404 (or the memory management circuit 502 ) calculates that the remaining storage space of the mapping table storage space 701 is 0.5 units. The last programmed physical erase unit before selecting a new active physical erase unit is physical erase unit 410(2). Therefore, the memory control circuit unit 404 (or the memory management circuit 502 ) sets the size (ie, 1 unit) of the update mapping information UM1 of the physical erasing unit 410(2) as the first threshold value. Further, the memory control circuit unit 404 (or the memory management circuit 502 ) judges that the remaining storage space (ie 0.5 units) is less than the first threshold (ie 1 unit), and needs to update the logical address-physical address mapping table. That is to say, the mapping table storage space 701 may not be able to completely store the update mapping information corresponding to a new actuating entity erasing unit, and the mapping information of the physical address-logical address mapping table stored in the mapping table storage space 701 needs to be Store in the logical address-physical address mapping table, and clear the mapping information of the physical address-logical address mapping table in the mapping table storage space 701 .

在本发明的另一实施例中,第一门槛值还可设定为映射表存储空间中所存储的对应各已编程实体擦除单元的更新映射信息的大小之中的最大值。In another embodiment of the present invention, the first threshold value can also be set as the maximum value among the sizes of the updated mapping information corresponding to each programmed physical erase unit stored in the mapping table storage space.

例如,请参照图7A,此时,映射表存储空间701只存储了对应实体擦除单元410(0)的更新映射信息UM0,其中更新映射信息UM0的大小为1单位,且映射表存储空间701的剩余存储空间为3单位。存储器控制电路单元404(或存储器管理电路502)识别对应各已编程实体擦除单元的更新映射信息的大小之中,实体擦除单元410(0)的更新映射信息UM0的大小为最大值。因此,存储器控制电路单元404(或存储器管理电路502)设定实体擦除单元410(0)的更新映射信息UM0的大小(即1单位)作为第一门槛值。进一步地,存储器控制电路单元404(或存储器管理电路502)判断映射表存储空间701的剩余存储空间(即3单位)不小于第一门槛值(即1单位),由此不更新逻辑地址-实体地址映射表。For example, referring to FIG. 7A , at this moment, the mapping table storage space 701 only stores the update mapping information UM0 of the corresponding entity erasing unit 410 (0), wherein the size of the update mapping information UM0 is 1 unit, and the mapping table storage space 701 The remaining storage space is 3 units. The memory control circuit unit 404 (or the memory management circuit 502 ) identifies that the size of the update mapping information UM0 of the physical erase unit 410 ( 0 ) is the maximum among the sizes of the update map information corresponding to each programmed physical erase unit. Therefore, the memory control circuit unit 404 (or the memory management circuit 502 ) sets the size (ie, 1 unit) of the update mapping information UM0 of the physical erasing unit 410 ( 0 ) as the first threshold value. Further, the memory control circuit unit 404 (or the memory management circuit 502) judges that the remaining storage space (ie, 3 units) of the mapping table storage space 701 is not less than the first threshold value (ie, 1 unit), thereby not updating the logical address-entity Address mapping table.

例如,请参照图7B,此时,映射表存储空间701已存储了对应实体擦除单元410(0)的更新映射信息UM0与对应实体擦除单元410(1)的更新映射信息UM1,其中更新映射信息UM0的大小为1单位,更新映射信息UM1的大小为1.5单位,且映射表存储空间701的剩余存储空间为1.5单位。存储器控制电路单元404(或存储器管理电路502)识别对应各已编程实体擦除单元的更新映射信息的大小之中,实体擦除单元410(1)的更新映射信息UM1的大小为最大值。因此,存储器控制电路单元404(或存储器管理电路502)设定实体擦除单元410(1)的更新映射信息UM1的大小(即1.5单位)作为第一门槛值。进一步地,存储器控制电路单元404(或存储器管理电路502)判断映射表存储空间701的剩余存储空间(即1.5单位)不小于第一门槛值(即1.5单位),由此不更新逻辑地址-实体地址映射表。For example, please refer to FIG. 7B. At this time, the mapping table storage space 701 has stored the update mapping information UM0 corresponding to the entity erasing unit 410 (0) and the update mapping information UM1 corresponding to the entity erasing unit 410 (1), wherein the update The size of the mapping information UM0 is 1 unit, the size of the update mapping information UM1 is 1.5 units, and the remaining storage space of the mapping table storage space 701 is 1.5 units. The memory control circuit unit 404 (or the memory management circuit 502 ) identifies that the size of the update mapping information UM1 of the physical erase unit 410(1) is the maximum among the sizes of the update map information corresponding to each programmed physical erase unit. Therefore, the memory control circuit unit 404 (or the memory management circuit 502 ) sets the size (ie, 1.5 units) of the update mapping information UM1 of the physical erasing unit 410(1) as the first threshold value. Further, the memory control circuit unit 404 (or the memory management circuit 502) judges that the remaining storage space (ie, 1.5 units) of the mapping table storage space 701 is not less than the first threshold value (ie, 1.5 units), and thus does not update the logical address-entity Address mapping table.

例如,请参照图7C,此时,映射表存储空间701已存储了对应实体擦除单元410(0)的更新映射信息UM0、对应实体擦除单元410(1)的更新映射信息UM1与对应实体擦除单元410(2)的更新映射信息UM2,其中更新映射信息UM0的大小为1单位,更新映射信息UM1的大小为1.5单位,更新映射信息UM2的大小为1单位,且映射表存储空间701的剩余存储空间为0.5单位。存储器控制电路单元404(或存储器管理电路502)识别对应各已编程实体擦除单元的更新映射信息的大小之中,实体擦除单元410(1)的更新映射信息UM1的大小为最大值。因此,存储器控制电路单元404(或存储器管理电路502)设定实体擦除单元410(1)的更新映射信息UM1的大小(即1.5单位)作为第一门槛值。进一步地,存储器控制电路单元404(或存储器管理电路502)判断映射表存储空间701的剩余存储空间(即0.5单位)小于第一门槛值(即1.5单位),而将存储在映射表存储空间701中的实体地址-逻辑地址映射表的映射信息存储至逻辑地址-实体地址映射表,并清除映射表存储空间701中的实体地址-逻辑地址映射表的映射信息。For example, please refer to FIG. 7C. At this time, the mapping table storage space 701 has stored the update mapping information UM0 of the corresponding entity erasing unit 410 (0), the update mapping information UM1 of the corresponding entity erasing unit 410 (1) and the corresponding entity The updated mapping information UM2 of the erasing unit 410 (2), wherein the size of the updated mapping information UM0 is 1 unit, the size of the updated mapping information UM1 is 1.5 units, the size of the updated mapping information UM2 is 1 unit, and the mapping table storage space 701 The remaining storage space of is 0.5 units. The memory control circuit unit 404 (or the memory management circuit 502 ) identifies that the size of the update mapping information UM1 of the physical erase unit 410(1) is the maximum among the sizes of the update map information corresponding to each programmed physical erase unit. Therefore, the memory control circuit unit 404 (or the memory management circuit 502 ) sets the size (ie, 1.5 units) of the update mapping information UM1 of the physical erasing unit 410(1) as the first threshold value. Further, the memory control circuit unit 404 (or the memory management circuit 502) judges that the remaining storage space (ie, 0.5 units) of the mapping table storage space 701 is less than the first threshold value (ie, 1.5 units), and will store in the mapping table storage space 701 The mapping information of the physical address-logical address mapping table in is stored in the logical address-physical address mapping table, and the mapping information of the physical address-logical address mapping table in the mapping table storage space 701 is cleared.

在上述的实施例中,第一门槛值是设定为存储在映射表存储空间701中对应已编程的实体擦除单元的其中一个实体擦除单元的更新映射信息的大小。然而,在本发明的另一实施例中,第一门槛值也可设定为映射表存储空间中所存储的对应各已编程实体擦除单元的更新映射信息的大小的平均值。In the above-mentioned embodiment, the first threshold is set as the size of the update mapping information stored in the mapping table storage space 701 corresponding to one of the programmed physical erasing units. However, in another embodiment of the present invention, the first threshold value may also be set as an average value of the update mapping information corresponding to each programmed physical erase unit stored in the mapping table storage space.

例如,请参照图7A,此时,映射表存储空间701只存储了对应实体擦除单元410(0)的更新映射信息UM0,其中更新映射信息UM0的大小为1单位,且映射表存储空间701的剩余存储空间为3单位。存储器控制电路单元404(或存储器管理电路502)计算对应各已编程实体擦除单元的更新映射信息的大小的平均值为1单位,并将第一门槛值设定为1单位。进一步地,存储器控制电路单元404(或存储器管理电路502)判断映射表存储空间701的剩余存储空间(即3单位)不小于第一门槛值(即1单位),不更新逻辑地址-实体地址映射表。For example, referring to FIG. 7A , at this moment, the mapping table storage space 701 only stores the update mapping information UM0 of the corresponding entity erasing unit 410 (0), wherein the size of the update mapping information UM0 is 1 unit, and the mapping table storage space 701 The remaining storage space is 3 units. The memory control circuit unit 404 (or the memory management circuit 502 ) calculates the average value of the size of the update mapping information corresponding to each programmed physical erase unit as 1 unit, and sets the first threshold as 1 unit. Further, the memory control circuit unit 404 (or the memory management circuit 502) judges that the remaining storage space (ie, 3 units) of the mapping table storage space 701 is not less than the first threshold value (ie, 1 unit), and does not update the logical address-physical address mapping surface.

例如,请参照图7B,此时,映射表存储空间701已存储了对应实体擦除单元410(0)的更新映射信息UM0与对应实体擦除单元410(1)的更新映射信息UM1,其中更新映射信息UM0的大小为1单位,更新映射信息UM1的大小为1.5单位,且映射表存储空间701的剩余存储空间为1.5单位。存储器控制电路单元404(或存储器管理电路502)计算对应各已编程实体擦除单元的更新映射信息的大小的平均值为1.25单位,并将第一门槛值设定为1.25单位。进一步地,存储器控制电路单元404(或存储器管理电路502)判断映射表存储空间701的剩余存储空间(即1.5单位)不小于第一门槛值(即1.25单位),不更新逻辑地址-实体地址映射表。For example, please refer to FIG. 7B. At this time, the mapping table storage space 701 has stored the update mapping information UM0 corresponding to the entity erasing unit 410 (0) and the update mapping information UM1 corresponding to the entity erasing unit 410 (1), wherein the update The size of the mapping information UM0 is 1 unit, the size of the update mapping information UM1 is 1.5 units, and the remaining storage space of the mapping table storage space 701 is 1.5 units. The memory control circuit unit 404 (or the memory management circuit 502 ) calculates the average value of the update mapping information corresponding to each programmed physical erase unit as 1.25 units, and sets the first threshold as 1.25 units. Further, the memory control circuit unit 404 (or the memory management circuit 502) judges that the remaining storage space (ie, 1.5 units) of the mapping table storage space 701 is not less than the first threshold value (ie, 1.25 units), and does not update the logical address-physical address mapping surface.

例如,请参照图7C,此时,映射表存储空间701已存储有对应实体擦除单元410(0)的更新映射信息UM0、对应实体擦除单元410(1)的更新映射信息UM1与对应实体擦除单元410(2)的更新映射信息UM2,其中更新映射信息UM0的大小为1单位,更新映射信息UM1的大小为1.5单位,更新映射信息UM2的大小为1单位,且映射表存储空间701的剩余存储空间为0.5单位。存储器控制电路单元404(或存储器管理电路502)计算对应各已编程实体擦除单元的更新映射信息的大小的平均值为1.17单位,并将第一门槛值设定为1.17单位。进一步地,存储器控制电路单元404(或存储器管理电路502)判断实体地址-逻辑地址映射表701剩余存储空间(即0.5单位)小于第一门槛值(即1.17单位),而将存储在映射表存储空间701中的实体地址-逻辑地址映射表的映射信息存储至逻辑地址-实体地址映射表,并清除映射表存储空间701中的实体地址-逻辑地址映射表的映射信息。For example, please refer to FIG. 7C. At this time, the mapping table storage space 701 has stored the updated mapping information UM0 of the corresponding entity erasing unit 410 (0), the updated mapping information UM1 of the corresponding entity erasing unit 410 (1) and the corresponding entity The updated mapping information UM2 of the erasing unit 410 (2), wherein the size of the updated mapping information UM0 is 1 unit, the size of the updated mapping information UM1 is 1.5 units, the size of the updated mapping information UM2 is 1 unit, and the mapping table storage space 701 The remaining storage space of is 0.5 units. The memory control circuit unit 404 (or the memory management circuit 502 ) calculates the average value of the update mapping information corresponding to each programmed physical erase unit as 1.17 units, and sets the first threshold as 1.17 units. Further, the memory control circuit unit 404 (or the memory management circuit 502) judges that the remaining storage space (that is, 0.5 units) of the physical address-logical address mapping table 701 is less than the first threshold value (that is, 1.17 units), and stores in the mapping table The mapping information of the physical address-logical address mapping table in the space 701 is stored in the logical address-physical address mapping table, and the mapping information of the physical address-logical address mapping table in the mapping table storage space 701 is cleared.

由于,本发明是以映射表存储空间中所存储的对应各已编程实体擦除单元的更新映射信息的大小,来预估映射表存储空间的剩余存储空间是否可完整存储一个新的作动实体擦除单元的更新映射信息。因此,当新的作动实体擦除单元的更新映射信息的大小不如预期,而大于映射表存储空间的剩余存储空间时,会形成作动实体擦除单元还未写满,映射表存储空间仅存储了对应新的作动实体擦除单元的更新映射信息的一部分就已写满的情况。Because, the present invention estimates whether the remaining storage space of the mapping table storage space can completely store a new actuating entity with the size of the update mapping information corresponding to each programmed entity erasing unit stored in the mapping table storage space Update mapping information for erase units. Therefore, when the size of the updated mapping information of the new actuating entity erasing unit is not as expected, but greater than the remaining storage space of the mapping table storage space, it will form that the actuating entity erasing unit is not fully written, and the mapping table storage space is only The case where a part of the update mapping information corresponding to the new active entity erasure unit is stored is already full.

图8是本发明实施例所示出的将作动实体擦除单元的更新映射信息的一部分存储至映射表存储空间的范例示意图。FIG. 8 is a schematic diagram of an example of storing part of the updated mapping information of the erasing unit of the active entity in the storage space of the mapping table shown in the embodiment of the present invention.

请参照图8,实体擦除单元410(0)与实体擦除单元410(1)为已编程的实体擦除单元。当实体擦除单元410(0)与实体擦除单元410(1)已写满时,映射表存储空间801中存储了对应实体擦除单元410(0)的更新映射信息UM0,与对应实体擦除单元410(1)的更新映射信息UM1,其中更新映射信息UM0的大小为1单位,更新映射信息UM1的大小为1.5单位,且剩余存储空间为1.5单位。存储器控制电路单元404(或存储器管理电路502)选取实体擦除单元410(2)作为作动实体擦除单元。存储器控制电路单元404(或存储器管理电路502)设定实体擦除单元410(1)(即选取新的作动实体擦除单元之前最后一个编程的实体擦除单元)的更新映射信息的大小(即1.5单位)作为第一门槛值。进一步地,存储器控制电路单元404(或存储器管理电路502)判断映射表存储空间801的剩余存储空间(即1.5单位),不小于第一门槛值(即1.5单位),不更新逻辑地址-实体地址映射表。因此,存储器控制电路单元404(或存储器管理电路502)将数据编程至实体擦除单元410(2),并根据实体擦除单元410(2)中已编程的实体编程单元与数据所属的逻辑编程单元的映射关系建立更新映射信息,且将更新映射信息存储至映射表存储空间801中。Referring to FIG. 8 , the physical erasing unit 410 ( 0 ) and the physical erasing unit 410 ( 1 ) are programmed physical erasing units. When the physical erasing unit 410 (0) and the physical erasing unit 410 (1) are full, the mapping table storage space 801 stores the update mapping information UM0 of the corresponding physical erasing unit 410 (0), and the corresponding physical erasing unit 410 (0) The updated mapping information UM1 of the dividing unit 410(1), wherein the size of the updated mapping information UM0 is 1 unit, the size of the updated mapping information UM1 is 1.5 units, and the remaining storage space is 1.5 units. The memory control circuit unit 404 (or the memory management circuit 502) selects the physical erasing unit 410(2) as the active physical erasing unit. The memory control circuit unit 404 (or the memory management circuit 502) sets the size ( That is, 1.5 units) as the first threshold. Further, the memory control circuit unit 404 (or the memory management circuit 502) judges that the remaining storage space (ie 1.5 units) of the mapping table storage space 801 is not less than the first threshold value (ie 1.5 units), and does not update the logical address-physical address mapping table. Therefore, the memory control circuit unit 404 (or the memory management circuit 502) programs the data into the physical erasing unit 410(2), and according to the programmed physical programming unit in the physical erasing unit 410(2) and the logical programming to which the data belongs The mapping relationship of the units establishes updated mapping information, and stores the updated mapping information in the mapping table storage space 801 .

在本实施例中,存储器控制电路单元404(或存储器管理电路502)可进一步判断映射表存储空间801的剩余存储空间是否不大于第二门槛值,以决定是否要判断作动实体除抹单元(即实体除抹单元410(2))依序可被编程的实体编程单元是否为上实体编程单元。第二门槛值可小于第一门槛值,或等于零(即映射表存储空间801已写满),或依实际需求设定,本发明不加以限制。以下将以第二门槛值为零的情况进行说明。In this embodiment, the memory control circuit unit 404 (or the memory management circuit 502) can further determine whether the remaining storage space of the mapping table storage space 801 is not greater than the second threshold value, so as to determine whether to determine whether to activate the entity erasing unit ( That is, whether the physical erasing unit 410(2)) can be programmed is the upper physical programming unit in sequence. The second threshold can be smaller than the first threshold, or equal to zero (that is, the mapping table storage space 801 is full), or set according to actual needs, which is not limited by the present invention. The following will describe the case where the second threshold value is zero.

在本实施例中,实际上,当实体擦除单元410(2)写满时,根据实体擦除单元410(2)中已编程的实体编程单元与数据所属的逻辑编程单元的映射关系所建立的更新映射信息的大小为2单位,但映射表存储空间801的剩余存储空间仅能再存储1.5单位大小的更新映射信息。因此,映射表存储空间801仅存储了对应实体擦除单元410(2)的部分的更新映射信息UM3(即,部分的更新映射信息UM3的大小为1.5单位)就已写满,但实体擦除单元410(2)尚未写满。In this embodiment, in fact, when the physical erasing unit 410 (2) is full, according to the mapping relationship between the programmed physical programming unit in the physical erasing unit 410 (2) and the logical programming unit to which the data belongs The size of the updated mapping information is 2 units, but the remaining storage space of the mapping table storage space 801 can only store 1.5 units of updated mapping information. Therefore, the mapping table storage space 801 has only stored the part of the update mapping information UM3 corresponding to the entity erasing unit 410 (2) (that is, the size of the part of the update mapping information UM3 is 1.5 units) has been filled, but the entity erasing Cell 410(2) is not yet full.

当映射表存储空间801已写满时,也就是说,映射表存储空间801已无剩余存储空间可存储更新映射信息,需将存储在映射表存储空间801中的实体地址-逻辑地址映射表的映射信息更新至逻辑地址-实体地址映射表,并将映射表存储空间801中的实体地址-逻辑地址映射表的映射信息清除。但由于作动实体擦除单元(即实体擦除单元410(2))尚未写满,存储器控制电路单元404(或存储器管理电路502)在更新逻辑地址-实体地址映射表之前,会先判断作动实体擦除单元(即实体擦除单元410(2))依序可被编程的实体编程单元是否为上实体编程单元。具体而言,存储器控制电路单元404(或存储器管理电路502)会判断作动实体擦除单元(即实体擦除单元410(2))中是否存在已编程有效数据的下实体编程单元,且此下实体编程单元所对应的上实体编程单元尚未被编程。倘若判断作动实体擦除单元(即实体擦除单元410(2))中存在上述下实体编程单元,存储器控制电路单元404(或存储器管理电路502)会将一虚拟数据(dummy data)编程至上述下实体编程单元所对应的上实体编程单元中。When the mapping table storage space 801 is full, that is to say, there is no remaining storage space in the mapping table storage space 801 to store and update the mapping information, the physical address-logical address mapping table stored in the mapping table storage space 801 The mapping information is updated to the logical address-physical address mapping table, and the mapping information of the physical address-logical address mapping table in the mapping table storage space 801 is cleared. However, since the actuating entity erasing unit (i.e., the entity erasing unit 410(2)) has not been fully written, the memory control circuit unit 404 (or the memory management circuit 502) will first judge the operation before updating the logical address-physical address mapping table. The physical erasing unit (ie, the physical erasing unit 410( 2 )) is determined in order whether the physical programming unit that can be programmed is the upper physical programming unit. Specifically, the memory control circuit unit 404 (or the memory management circuit 502) will determine whether there is a lower physical programming unit programmed with valid data in the active physical erasing unit (that is, the physical erasing unit 410(2)), and this The upper physical programming unit corresponding to the lower physical programming unit has not been programmed yet. If it is judged that the above-mentioned lower physical programming unit exists in the active physical erasing unit (i.e., the physical erasing unit 410(2), the memory control circuit unit 404 (or the memory management circuit 502) will program a dummy data into In the upper physical programming unit corresponding to the above lower physical programming unit.

图9是本发明实施例所示出的实体编程单元的排列顺序的示意图。在此,以实体擦除单元410(2)为例进行说明,其它实体擦除单元的结构也可以此类推。FIG. 9 is a schematic diagram of the arrangement sequence of physical programming units shown in the embodiment of the present invention. Here, the physical erasing unit 410(2) is taken as an example for illustration, and the structures of other physical erasing units can also be deduced in the same way.

请参照图9,实体擦除单元410(2)包括实体编程单元PBA(0-0)~PBA(0-K)。例如,在本实施例中,K为整数。例如,K为255。实体编程单元PBA(0-0)与实体编程单元PBA(0-2)是由字符线W(0)上的存储单元所构成;实体编程单元PBA(0-1)与实体编程单元PBA(0-4)是由字符线W(1)上的存储单元所构成;实体编程单元PBA(0-3)与实体编程单元PBA(0-6)是由字符线W(2)上的存储单元所构成;实体编程单元PBA(0-5)与实体编程单元PBA(0-8)是由字符线W(3)上的存储单元所构成;并且以此类推,实体编程单元PBA(0-(K-4))与实体编程单元PBA(0-(K-1))是由字符线W(L-1)上的存储单元所构成且实体编程单元PBA(0-(K-2))与实体编程单元PBA(0-K)是由字符线W(L)上的存储单元所构成。在此,实体编程单元PBA(0-0)、PBA(0-1)、PBA(0-3)、PBA(0-5)、…、PBA(0-(K-4))、PBA(0-(K-2))为下实体编程单元,而实体编程单元PBA(0-2)、PAB(0-4)、PBA(0-6)、PBA(0-8)、…、PBA(0-(K-1))、PBA(0-K)为上实体编程单元。Referring to FIG. 9, the physical erasing unit 410(2) includes physical programming units PBA(0-0)˜PBA(0-K). For example, in this embodiment, K is an integer. For example, K is 255. Entity programming unit PBA(0-0) and entity programming unit PBA(0-2) are composed of memory cells on the word line W(0); entity programming unit PBA(0-1) and entity programming unit PBA(0 -4) is composed of memory cells on word line W(1); physical programming unit PBA(0-3) and physical programming unit PBA(0-6) are formed by memory cells on word line W(2) Composition; Entity programming unit PBA (0-5) and entity programming unit PBA (0-8) are constituted by memory cells on the word line W (3); and by analogy, entity programming unit PBA (0-(K -4)) and the entity programming unit PBA (0-(K-1)) are composed of memory cells on the word line W (L-1) and the entity programming unit PBA (0-(K-2)) and the entity Program cells PBA(0-K) are composed of memory cells on word line W(L). Here, the entity programming units PBA(0-0), PBA(0-1), PBA(0-3), PBA(0-5), ..., PBA(0-(K-4)), PBA(0 -(K-2)) is the lower entity programming unit, and the entity programming unit PBA (0-2), PAB (0-4), PBA (0-6), PBA (0-8), ..., PBA (0 -(K-1)), PBA(0-K) are the upper entity programming units.

图10A与图10B是本发明实施例所示出的将虚拟数据编程至作动实体擦除单元的上实体编程单元的范例示意图。FIG. 10A and FIG. 10B are exemplary schematic diagrams of programming dummy data into an upper physical programming unit that operates a physical erasing unit according to an embodiment of the present invention.

请参照图10A,当映射表存储空间801已写满时,作动实体擦除单元(即实体擦除单元410(2))已编程有效数据的实体编程单元为下实体编程单元PBA(0-0)、PBA(0-1)、PBA(0-3)与上实体编程单元PBA(0-2)、PBA(0-4)。其中,存储器控制电路单元404(或存储器管理电路502)判断实体擦除单元410(2)的下实体编程单元PBA(0-3)所对应的上实体编程单元PBA(0-6)尚未被编程。基此,存储器控制电路单元404(或存储器管理电路502)会先将虚拟数据编程至实体擦除单元410(2)的上实体编程单元PBA(0-6)后,再将存储在映射表存储空间801中的实体地址-逻辑地址映射表的映射信息更新至逻辑地址-实体地址映射表,并清除映射表存储空间801中的实体地址-逻辑地址映射表的映射信息。Please refer to FIG. 10A, when the mapping table storage space 801 is full, the entity programming unit of the active entity erasing unit (that is, the entity erasing unit 410 (2)) having programmed valid data is the lower entity programming unit PBA (0- 0), PBA(0-1), PBA(0-3) and the upper entity programming units PBA(0-2), PBA(0-4). Wherein, the memory control circuit unit 404 (or the memory management circuit 502) judges that the upper physical programming unit PBA (0-6) corresponding to the lower physical programming unit PBA (0-3) of the physical erasing unit 410 (2) has not been programmed . Based on this, the memory control circuit unit 404 (or the memory management circuit 502) will first program the dummy data to the upper physical programming unit PBA (0-6) of the physical erasing unit 410 (2), and then store the dummy data in the mapping table. The mapping information of the physical address-logical address mapping table in the space 801 is updated to the logical address-physical address mapping table, and the mapping information of the physical address-logical address mapping table in the mapping table storage space 801 is cleared.

请参照图10B,在本发明另一实施例中,当映射表存储空间801已写满时,作动实体擦除单元(即实体擦除单元410(2))已编程有效数据的实体编程单元为下实体编程单元PBA(0-0)、PBA(0-1)、PBA(0-3)、PBA(0-5)与上实体编程单元PBA(0-2)、PBA(0-4)。其中,存储器控制电路单元404(或存储器管理电路502)判断实体擦除单元410(2)的下实体编程单元PBA(0-3)所对应的上实体编程单元PBA(0-6)与下实体编程单元PBA(0-5)所对应的上实体编程单元PBA(0-8)皆尚未被编程。基此,存储器控制电路单元404(或存储器管理电路502)会将虚拟数据编程至实体擦除单元410(2)的上实体编程单元PBA(0-6)与上实体编程单元PBA(0-8)后,再将映射表存储空间801中的实体地址-逻辑地址映射表的映射信息更新至逻辑地址-实体地址映射表,并清除映射表存储空间801中的实体地址-逻辑地址映射表的映射信息。Please refer to FIG. 10B. In another embodiment of the present invention, when the mapping table storage space 801 is full, the physical programming unit that has programmed valid data in the physical erasing unit (i.e., the physical erasing unit 410(2)) is activated. Programming units PBA(0-0), PBA(0-1), PBA(0-3), PBA(0-5) for the lower entity and PBA(0-2), PBA(0-4) for the upper entity . Wherein, the memory control circuit unit 404 (or the memory management circuit 502) judges the upper entity programming unit PBA (0-6) corresponding to the lower entity programming unit PBA (0-3) of the entity erasing unit 410 (2) and the lower entity The upper physical programming units PBA(0-8) corresponding to the programming units PBA(0-5) have not been programmed yet. Based on this, the memory control circuit unit 404 (or the memory management circuit 502) will program dummy data to the upper physical programming unit PBA(0-6) and the upper physical programming unit PBA(0-8) of the physical erasing unit 410(2). ), update the mapping information of the physical address-logical address mapping table in the mapping table storage space 801 to the logical address-physical address mapping table, and clear the mapping of the physical address-logical address mapping table in the mapping table storage space 801 information.

图11为本发明实施例所示出的映射表更新方法的流程图。FIG. 11 is a flowchart of a method for updating a mapping table shown in an embodiment of the present invention.

请参照图11,在步骤S1101中,存储器控制电路单元404(或存储器管理电路502)分配映射表存储空间,以存储实体地址-逻辑地址映射表。具体而言,存储器控制电路单元404(或存储器管理电路502)是在缓冲存储器508中分配映射表存储空间。Referring to FIG. 11 , in step S1101 , the memory control circuit unit 404 (or the memory management circuit 502 ) allocates storage space for the mapping table to store the physical address-logical address mapping table. Specifically, the memory control circuit unit 404 (or the memory management circuit 502 ) allocates the storage space of the mapping table in the buffer memory 508 .

在步骤S1103中,存储器控制电路单元404(或存储器管理电路502)从主机系统11接收多笔写入数据,其中,该些写入数据属于多个逻辑编程单元。In step S1103 , the memory control circuit unit 404 (or the memory management circuit 502 ) receives a plurality of write data from the host system 11 , wherein the write data belongs to a plurality of logic programming units.

在步骤S1105中,存储器控制电路单元404(或存储器管理电路502)选取一个实体擦除单元作为作动实体擦除单元。具体而言,存储器控制电路单元404(或存储器管理电路502)是从可复写式非易失性存储器模块406的多个实体擦除单元中选取其中一个作为作动实体擦除单元。In step S1105, the memory control circuit unit 404 (or the memory management circuit 502) selects a physical erasing unit as an active physical erasing unit. Specifically, the memory control circuit unit 404 (or the memory management circuit 502 ) selects one of the multiple physical erasing units of the rewritable non-volatile memory module 406 as the active physical erasing unit.

在步骤S1107中,存储器控制电路单元404(或存储器管理电路502)判断映射表存储空间的剩余存储空间是否小于第一门槛值。第一门槛值可依实际需求设定为不同的特定值,此部分已于前面的实施例中说明,在此不再赘述。In step S1107, the memory control circuit unit 404 (or the memory management circuit 502) determines whether the remaining storage space of the mapping table storage space is smaller than the first threshold value. The first threshold value can be set to different specific values according to actual needs, this part has been described in the previous embodiments, and will not be repeated here.

倘若映射表存储空间的剩余存储空间小于第一门槛值,在步骤S1109中,存储器控制电路单元404(或存储器管理电路502)将存储在映射表存储空间中的实体地址-逻辑地址映射表中的映射信息更新至至少一逻辑地址-实体地址映射表,并清除存储在映射表存储空间中的实体地址-逻辑地址映射表的映射信息。存储器控制电路单元404(或存储器管理电路502)可在将映射信息更新至至少一逻辑地址-实体地址映射表之后,立即清除存储在映射表存储空间中的实体地址-逻辑地址映射表的映射信息。然而,存储器控制电路单元404(或存储器管理电路502)也可在下次编程作动实体擦除单元之前的任意时间点进行清除,本发明不加以限制。If the remaining storage space of the mapping table storage space is less than the first threshold value, in step S1109, the memory control circuit unit 404 (or the memory management circuit 502) stores the physical address-logical address mapping table in the mapping table storage space The mapping information is updated to at least one logical address-physical address mapping table, and the mapping information of the physical address-logical address mapping table stored in the mapping table storage space is cleared. The memory control circuit unit 404 (or the memory management circuit 502) can immediately clear the mapping information of the physical address-logical address mapping table stored in the mapping table storage space after updating the mapping information to at least one logical address-physical address mapping table . However, the memory control circuit unit 404 (or the memory management circuit 502 ) can also be cleared at any time point before the next program operation entity erases the unit, which is not limited by the present invention.

在步骤S1111中,存储器控制电路单元404(或存储器管理电路502)将该些写入数据编程至作动实体擦除单元的多个实体编程单元,建立编程该些写入数据的多个实体编程单元与该些逻辑编程单元之间的多个更新映射信息,并将该些更新映射信息存储至映射表存储空间中。具体而言,在步骤S1107中,倘若判断映射表存储空间的剩余存储空间不小于第一门槛值,存储器控制电路单元404(或存储器管理电路502)直接执行步骤S1111。相对地,在步骤S1107中,倘若判断映射表存储空间的剩余存储空间小于第一门槛值,存储器控制电路单元404(或存储器管理电路502)则先执行步骤S1109,再执行步骤S1111。需特别说明的是,在本实施例中,是在将写入数据编程至作动实体擦除单元之前,先判断映射表存储空间的剩余存储空间是否小于第一门槛值。然而,在另一实施例中,也可在将写入数据编程之作动实体擦除单元之后,即判断映射表存储空间的剩余存储空间是否小于第一门槛值,本发明不加以限制。In step S1111, the memory control circuit unit 404 (or the memory management circuit 502) programs the write data to a plurality of physical programming units that operate the physical erase unit, and establishes a plurality of physical programming units for programming the write data. A plurality of updated mapping information between the unit and the logic programming units, and store the updated mapping information in the storage space of the mapping table. Specifically, in step S1107, if it is determined that the remaining storage space of the mapping table storage space is not less than the first threshold value, the memory control circuit unit 404 (or the memory management circuit 502) directly executes step S1111. In contrast, in step S1107, if it is determined that the remaining storage space of the mapping table storage space is less than the first threshold value, the memory control circuit unit 404 (or the memory management circuit 502) first executes step S1109, and then executes step S1111. It should be noted that, in this embodiment, before programming the write data into the active entity erasing unit, it is first judged whether the remaining storage space of the mapping table storage space is less than the first threshold value. However, in another embodiment, it is also possible to determine whether the remaining storage space of the mapping table storage space is less than the first threshold value after the active entity for programming the written data erases the unit, which is not limited by the present invention.

图12为本发明实施例所示出的映射表更新方法的另一范例流程图。图12是针对图11的将更新映射信息存储至映射表存储空间的步骤的一范例实施例方法流程图。FIG. 12 is another exemplary flow chart of the method for updating the mapping table shown in the embodiment of the present invention. FIG. 12 is a flow chart of an exemplary embodiment of the step of storing the updated mapping information in the storage space of the mapping table shown in FIG. 11 .

请参照图12,在将作动实体擦除单元的多个更新映射信息存储至映射表存储空间中的步骤中,当仅将该些更新映射信息的一部分存储至映射表存储空间中并且实体地址-逻辑地址映射表不大于第二门槛值时,在步骤S1201中,存储器控制电路单元404(或存储器管理电路502)会判断作动实体擦除单元中是否存有已编程有效数据的至少一下实体编程单元,且此至少一下实体编程单元对应的上实体编程单元未被编程。Please refer to FIG. 12, in the step of storing a plurality of updated mapping information of the actuating entity erasing unit into the storage space of the mapping table, when only a part of the updated mapping information is stored in the storage space of the mapping table and the entity address -When the logical address mapping table is not greater than the second threshold value, in step S1201, the memory control circuit unit 404 (or the memory management circuit 502) will judge whether there are at least the following entities of programmed valid data in the active entity erasing unit programming unit, and the upper physical programming unit corresponding to the at least one lower physical programming unit is not programmed.

倘若判断作动实体擦除单元中存有此至少一下实体编程单元,在步骤S1203中,存储器控制电路单元404(或存储器管理电路502)将一虚拟数据编程至此至少一下实体编程单元对应的上实体编程单元中。If it is determined that the at least one physical programming unit exists in the active physical erasing unit, in step S1203, the memory control circuit unit 404 (or the memory management circuit 502) programs a dummy data to the upper physical unit corresponding to the at least one physical programming unit. in the programming unit.

在步骤S1205中,存储器控制电路单元404(或存储器管理电路502)将存储在映射表存储空间中的实体地址-逻辑地址映射表的映射信息更新至至少一逻辑地址-实体地址映射表。具体而言,在步骤S1201中,倘若判断不存有此至少一下实体编程单元,存储器控制电路单元404(或存储器管理电路502)则直接执行步骤S1205。相对地,在步骤S1201中,倘若判断存有此至少一下实体编程单元,存储器控制电路单元404(或存储器管理电路502)则先执行步骤S1203,再执行步骤S1205。In step S1205, the memory control circuit unit 404 (or the memory management circuit 502) updates the mapping information of the physical address-logical address mapping table stored in the mapping table storage space to at least one logical address-physical address mapping table. Specifically, in step S1201, if it is determined that the at least one physical programming unit does not exist, the memory control circuit unit 404 (or the memory management circuit 502) directly executes step S1205. In contrast, in step S1201, if it is determined that the at least one physical programming unit exists, the memory control circuit unit 404 (or the memory management circuit 502) first executes step S1203, and then executes step S1205.

在步骤S1207中,存储器控制电路单元404(或存储器管理电路502)会清除存储在映射表存储空间中的实体地址-逻辑地址映射表的映射信息,并且将该些更新映射信息的其余部分存储至映射表存储空间中。In step S1207, the memory control circuit unit 404 (or the memory management circuit 502) will clear the mapping information of the physical address-logical address mapping table stored in the mapping table storage space, and store the rest of the updated mapping information in In the mapping table storage space.

综上所述,本发明实施例所提出的映射表更新方法、存储器控制电路单元及存储器存储装置利用映射表存储空间来存储对应于作动实体擦除单元的实体地址-逻辑地址映射表的更新映射信息,并根据映射表存储空间中剩余存储空间的大小,来判断是否要将存储在映射表存储空间中的实体地址-逻辑地址映射表的映射信息更新至逻辑地址-实体地址映射表。当作动实体擦除单元未写满,但已需将存储在映射表存储空间中的实体地址-逻辑地址映射表的映射信息更新至逻辑地址-实体地址映射表的情况下,若判断依序可编程数据的实体编程单元为上实体编程单元,则将虚拟数据写入上实体编程单元中。基此,可以提升更新逻辑地址-实体地址映射表的效率,并避免更新逻辑地址-实体地址映射表后,已编程的数据因其它实体编程单元的编程失败而无法恢复的状况。To sum up, the mapping table update method, memory control circuit unit and memory storage device proposed by the embodiments of the present invention use the mapping table storage space to store the update of the physical address-logical address mapping table corresponding to the actuating entity erasing unit and determine whether to update the mapping information of the physical address-logical address mapping table stored in the mapping table storage space to the logical address-physical address mapping table according to the size of the remaining storage space in the mapping table storage space. When the active physical erase unit is not full, but the mapping information of the physical address-logical address mapping table stored in the mapping table storage space needs to be updated to the logical address-physical address mapping table, if the judgment is in order The physical programming unit of the programmable data is the upper physical programming unit, then the dummy data is written into the upper physical programming unit. Based on this, the efficiency of updating the logical address-physical address mapping table can be improved, and the situation that the programmed data cannot be recovered due to programming failure of other physical programming units after updating the logical address-physical address mapping table can be avoided.

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

Claims (21)

1.一种映射表更新方法,用于一存储器存储装置,其特征在于,所述存储器存储装置具有一可复写式非易失性存储器模块,所述可复写式非易失性存储器模块具有多个实体擦除单元,每一该些实体擦除单元具有多个实体编程单元,所述映射表更新方法包括:1. A mapping table update method for a memory storage device, characterized in that the memory storage device has a rewritable non-volatile memory module, and the rewritable non-volatile memory module has multiple A physical erasing unit, each of these physical erasing units has a plurality of physical programming units, and the mapping table update method includes: 在一缓冲存储器中分配一映射表存储空间,以存储一实体地址-逻辑地址映射表;allocating a mapping table storage space in a buffer memory to store a physical address-logical address mapping table; 判断所述映射表存储空间中的一剩余存储空间是否小于一第一门槛值;judging whether a remaining storage space in the storage space of the mapping table is smaller than a first threshold; 倘若判断所述剩余存储空间小于所述第一门槛值,则将存储在所述映射表存储空间中的所述实体地址-逻辑地址映射表的映射信息更新至至少一逻辑地址-实体地址映射表;If it is judged that the remaining storage space is smaller than the first threshold value, updating the mapping information of the physical address-logical address mapping table stored in the mapping table storage space to at least one logical address-physical address mapping table ; 清除存储在所述映射表存储空间中的所述实体地址-逻辑地址映射表的映射信息;以及clearing the mapping information of the physical address-logical address mapping table stored in the mapping table storage space; and 将属于多个逻辑编程单元的多笔写入数据编程至该些实体擦除单元之中的一作动实体擦除单元的多个实体编程单元,建立编程该些写入数据的该些实体编程单元与该些逻辑编程单元之间的多个更新映射信息,并且将该些更新映射信息存储至所述映射表存储空间中的所述实体地址-逻辑地址映射表。Programming a plurality of writing data belonging to a plurality of logical programming units to a plurality of physical programming units of an actuating physical erasing unit among the physical erasing units, and establishing the physical programming units for programming the writing data and a plurality of updated mapping information between the logical programming units, and store the updated mapping information in the physical address-logical address mapping table in the mapping table storage space. 2.根据权利要求1所述的映射表更新方法,其特征在于,将该些更新映射信息存储至所述映射表存储空间中的步骤包括:2. The method for updating the mapping table according to claim 1, wherein the step of storing the updated mapping information in the storage space of the mapping table comprises: 当将该些更新映射信息的其中一部分存储至所述映射表存储空间并且所述映射表存储空间中的所述剩余存储空间不大于一第二门槛值时,判断所述作动实体擦除单元中是否存有一至少一第一实体编程单元,其中所述至少一第一实体编程单元为一下实体编程单元,所述至少一第一实体编程单元已编程一有效数据且对应所述至少一第一实体编程单元的上实体编程单元未被编程;When a part of the updated mapping information is stored in the mapping table storage space and the remaining storage space in the mapping table storage space is not greater than a second threshold value, it is determined that the actuating entity erasing unit Whether there is at least one first physical programming unit, wherein the at least one first physical programming unit is the following physical programming unit, the at least one first physical programming unit has programmed a valid data and corresponds to the at least one first physical programming unit The upper physical programming unit of the physical programming unit is not programmed; 倘若判断所述作动实体擦除单元中存有所述至少一第一实体编程单元时,则将一虚拟数据编程至对应所述至少一第一实体编程单元的上实体编程单元;If it is determined that the at least one first physical programming unit is stored in the active physical erasing unit, programming a dummy data to an upper physical programming unit corresponding to the at least one first physical programming unit; 在将所述虚拟数据编程至对应所述至少一第一实体编程单元的上实体编程单元之后,将存储在所述映射表存储空间中的所述实体地址-逻辑地址映射表的映射信息更新至所述至少一逻辑地址-实体地址映射表;以及After programming the dummy data to the upper physical programming unit corresponding to the at least one first physical programming unit, updating the mapping information of the physical address-logical address mapping table stored in the mapping table storage space to the at least one logical address-physical address mapping table; and 清除存储在所述映射表存储空间中的所述实体地址-逻辑地址映射表的映射信息并且将该些更新映射信息的其余部分存储至所述映射表存储空间中。Clearing the mapping information of the physical address-logical address mapping table stored in the mapping table storage space and storing the rest of the updated mapping information in the mapping table storage space. 3.根据权利要求1所述的映射表更新方法,其特征在于,所述映射表存储空间中已存储对应多个已编程实体擦除单元的多个更新映射信息。3. The method for updating the mapping table according to claim 1, wherein a plurality of update mapping information corresponding to a plurality of programmed physical erase units has been stored in the storage space of the mapping table. 4.根据权利要求3所述的映射表更新方法,其特征在于,还包括:4. The mapping table update method according to claim 3, further comprising: 计算对应该些已编程实体擦除单元的其中一个已编程实体擦除单元的更新映射信息的大小,其中所述其中一个已编程实体擦除单元为在将该些写入数据编程至所述作动实体擦除单元的多个实体编程单元之前最后编程的实体擦除单元;以及Calculating the size of the update mapping information corresponding to one of the programmed physical erasing units, wherein the one of the programmed physical erasing units is used for programming these write data to the operating Physically erased cells that are programmed last before a plurality of physically programmed cells that move the physically erased cells; and 设定所述其中一个已编程实体擦除单元的更新映射信息的大小作为所述第一门槛值。The size of the update mapping information of the one of the programmed physical erase units is set as the first threshold value. 5.根据权利要求3所述的映射表更新方法,其特征在于,还包括:5. The mapping table update method according to claim 3, further comprising: 计算对应每一该些已编程实体擦除单元的更新映射信息的大小;Calculating the size of the update mapping information corresponding to each of the programmed physical erase units; 计算该些已编程实体擦除单元的更新映射信息的大小的一平均值;以及设定所述平均值作为所述第一门槛值。calculating an average value of the size of the update mapping information of the programmed physical erase units; and setting the average value as the first threshold. 6.根据权利要求3所述的映射表更新方法,其特征在于,还包括:6. The mapping table update method according to claim 3, further comprising: 计算对应每一该些已编程实体擦除单元的更新映射信息的大小;Calculating the size of the update mapping information corresponding to each of the programmed physical erase units; 识别对应该些已编程实体擦除单元的更新映射信息的大小之中的一最大值;以及identifying a maximum value among sizes of update mapping information corresponding to the programmed physically erased cells; and 设定所述最大值作为所述第一门槛值。Set the maximum value as the first threshold value. 7.根据权利要求1所述的映射表更新方法,其特征在于,该些写入数据之中的至少一部分数据是将从一主机系统所接收的多笔原始数据压缩后所产生的数据。7. The mapping table updating method according to claim 1, wherein at least a part of the written data is data generated by compressing multiple pieces of original data received from a host system. 8.一种存储器控制电路单元,用于控制一可复写式非易失性存储器模块,其特征在于,所述可复写式非易失性存储器模块具有多个实体擦除单元,每一该些实体擦除单元具有多个实体编程单元,所述存储器控制电路单元包括:8. A memory control circuit unit, used to control a rewritable nonvolatile memory module, characterized in that, the rewritable nonvolatile memory module has a plurality of entity erasing units, each of which The entity erasing unit has multiple entity programming units, and the memory control circuit unit includes: 一主机接口,用以电性连接至一主机系统;a host interface for electrically connecting to a host system; 一存储器接口,用以电性连接至所述可复写式非易失性存储器模块;以及a memory interface for electrically connecting to the rewritable non-volatile memory module; and 一存储器管理电路,电性连接至所述主机接口与所述存储器接口,a memory management circuit electrically connected to the host interface and the memory interface, 其中,所述存储器管理电路用以在一缓冲存储器中分配一映射表存储空间,以存储一实体地址-逻辑地址映射表,Wherein, the memory management circuit is used to allocate a mapping table storage space in a buffer memory to store a physical address-logical address mapping table, 其中,所述存储器管理电路还用以判断所述映射表存储空间中的一剩余存储空间是否小于一第一门槛值,Wherein, the memory management circuit is also used to judge whether a remaining storage space in the storage space of the mapping table is smaller than a first threshold value, 其中,倘若判断所述剩余存储空间小于该第一门槛值,所述存储器管理电路还用以将存储在所述映射表存储空间中的所述实体地址-逻辑地址映射表的映射信息更新至至少一逻辑地址-实体地址映射表,Wherein, if it is judged that the remaining storage space is smaller than the first threshold value, the memory management circuit is further configured to update the mapping information of the physical address-logical address mapping table stored in the mapping table storage space to at least a logical address-physical address mapping table, 其中,所述存储器管理电路还用以清除存储在所述映射表存储空间中的所述实体地址-逻辑地址映射表的映射信息,Wherein, the memory management circuit is also used to clear the mapping information of the physical address-logical address mapping table stored in the storage space of the mapping table, 其中,所述存储器管理电路还用以将属于多个逻辑编程单元的多笔写入数据编程至该些实体擦除单元之中的一作动实体擦除单元的多个实体编程单元,建立编程该些写入数据的该些实体编程单元与该些逻辑编程单元之间的多个更新映射信息,并且将该些更新映射信息存储至所述映射表存储空间中的所述实体地址-逻辑地址映射表。Wherein, the memory management circuit is also used to program a plurality of writing data belonging to a plurality of logical programming units to a plurality of physical programming units of an actuating physical erasing unit among the physical erasing units, and to establish programming of the physical erasing unit. A plurality of updated mapping information between the physical programming units and the logical programming units of the written data, and store the updated mapping information in the physical address-logical address mapping in the storage space of the mapping table surface. 9.根据权利要求8所述的存储器控制电路单元,其特征在于,当将该些更新映射信息的其中一部分存储至所述映射表存储空间并且所述映射表存储空间中的所述剩余存储空间不大于一第二门槛值时,所述存储器管理电路还用以判断所述作动实体擦除单元中是否存有一至少一第一实体编程单元,其中所述至少一第一实体编程单元为一下实体编程单元,所述至少一第一实体编程单元已编程一有效数据且对应所述至少一第一实体编程单元的上实体编程单元未被编程,9. The memory control circuit unit according to claim 8, wherein when a part of the updated mapping information is stored in the mapping table storage space and the remaining storage space in the mapping table storage space When not greater than a second threshold value, the memory management circuit is also used to determine whether there is at least one first physical programming unit in the active physical erasing unit, wherein the at least one first physical programming unit is as follows A physical programming unit, the at least one first physical programming unit has been programmed with valid data and the upper physical programming unit corresponding to the at least one first physical programming unit has not been programmed, 其中,倘若判断所述作动实体擦除单元中存有所述至少一第一实体编程单元时,所述存储器管理电路还用以将一虚拟数据编程至对应所述至少一第一实体编程单元的上实体编程单元,Wherein, if it is determined that the at least one first physical programming unit is stored in the active physical erasing unit, the memory management circuit is also used to program a dummy data to the corresponding at least one first physical programming unit The upper entity programming unit, 其中,在将所述虚拟数据编程至对应所述至少一第一实体编程单元的上实体编程单元之后,所述存储器管理电路还用以将存储在所述映射表存储空间中的所述实体地址-逻辑地址映射表的映射信息更新至所述至少一逻辑地址-实体地址映射表,Wherein, after programming the dummy data to the upper physical programming unit corresponding to the at least one first physical programming unit, the memory management circuit is also used to write the physical address stored in the storage space of the mapping table to - updating the mapping information of the logical address mapping table to the at least one logical address-physical address mapping table, 其中,所述存储器管理电路还用以清除存储在所述映射表存储空间中的所述实体地址-逻辑地址映射表的映射信息并且将该些更新映射信息的其余部分存储至所述映射表存储空间中。Wherein, the memory management circuit is also used to clear the mapping information of the physical address-logical address mapping table stored in the mapping table storage space and store the rest of the updated mapping information in the mapping table storage space. in space. 10.根据权利要求8所述的存储器控制电路单元,其特征在于,所述映射表存储空间中已存储对应多个已编程实体擦除单元的多个更新映射信息。10 . The memory control circuit unit according to claim 8 , wherein a plurality of updated mapping information corresponding to a plurality of programmed physical erase units has been stored in the storage space of the mapping table. 11 . 11.根据权利要求10所述的存储器控制电路单元,其特征在于,所述存储器管理电路还用以计算对应该些已编程实体擦除单元的其中一个已编程实体擦除单元的更新映射信息的大小,其中所述其中一个已编程实体擦除单元为在将该些写入数据编程至所述作动实体擦除单元的多个实体编程单元之前最后编程的实体擦除单元,11. The memory control circuit unit according to claim 10, wherein the memory management circuit is also used to calculate the update mapping information corresponding to one of the programmed physical erase units. size, wherein said one of the programmed physical erasing units is the last programmed physical erasing unit before programming the write data to the plurality of physical programming units of the actuating physical erasing unit, 其中所述存储器管理电路还用以设定所述其中一个已编程实体擦除单元的更新映射信息的大小作为所述第一门槛值。Wherein the memory management circuit is also used to set the update mapping information size of one of the programmed physical erase units as the first threshold value. 12.根据权利要求10所述的存储器控制电路单元,其特征在于,所述存储器管理电路还用以计算对应每一该些已编程实体擦除单元的更新映射信息的大小,12. The memory control circuit unit according to claim 10, wherein the memory management circuit is also used to calculate the size of the update mapping information corresponding to each of the programmed physical erase units, 其中,所述存储器管理电路还用以计算该些已编程实体擦除单元的更新映射信息的大小的一平均值,Wherein, the memory management circuit is also used to calculate an average value of the size of the update mapping information of the programmed physical erase units, 其中,所述存储器管理电路还用以设定所述平均值作为所述第一门槛值。Wherein, the memory management circuit is further configured to set the average value as the first threshold value. 13.根据权利要求10所述的存储器控制电路单元,其特征在于,所述存储器管理电路还用以计算对应每一该些已编程实体擦除单元的更新映射信息的大小,13. The memory control circuit unit according to claim 10, wherein the memory management circuit is also used to calculate the size of the update mapping information corresponding to each of the programmed physical erase units, 其中所述存储器管理电路还用以识别对应该些已编程实体擦除单元的更新映射信息的大小之中的一最大值,Wherein the memory management circuit is also used to identify a maximum value among the sizes of the update mapping information corresponding to the programmed physical erase units, 其中所述存储器管理电路还用以设定所述最大值作为所述第一门槛值。Wherein the memory management circuit is further configured to set the maximum value as the first threshold value. 14.根据权利要求8所述的存储器控制电路单元,其特征在于,该些写入数据之中的至少一部分数据是通过所述存储器管理电路将从所述主机系统所接收的多笔原始数据压缩后所产生的数据。14. The memory control circuit unit according to claim 8, characterized in that at least a part of the written data is compressed by the memory management circuit from a plurality of original data received from the host system data generated afterwards. 15.一种存储器存储装置,其特征在于,包括:15. A memory storage device, comprising: 一连接接口单元,用以电性连接至一主机系统;a connection interface unit for electrically connecting to a host system; 一可复写式非易失性存储器模块,包括多个实体擦除单元,每一该些实体擦除单元具有多个实体编程单元;以及A rewritable non-volatile memory module, including a plurality of physical erasing units, each of the physical erasing units has a plurality of physical programming units; and 一存储器控制电路单元,电性连接至所述连接接口单元与所述可复写式非易失性存储器模块,a memory control circuit unit electrically connected to the connection interface unit and the rewritable non-volatile memory module, 其中,所述存储器控制电路单元用以在一缓冲存储器中分配一映射表存储空间,用以存储一实体地址-逻辑地址映射表,Wherein, the memory control circuit unit is used to allocate a mapping table storage space in a buffer memory for storing a physical address-logical address mapping table, 其中,所述存储器控制电路单元还用以判断所述映射表存储空间中的一剩余存储空间是否小于一第一门槛值,Wherein, the memory control circuit unit is also used to judge whether a remaining storage space in the storage space of the mapping table is smaller than a first threshold value, 其中,倘若判断所述剩余存储空间小于所述第一门槛值,所述存储器控制电路单元还用以将存储在所述映射表存储空间中的所述实体地址-逻辑地址映射表的映射信息更新至至少一逻辑地址-实体地址映射表,Wherein, if it is judged that the remaining storage space is smaller than the first threshold value, the memory control circuit unit is further configured to update the mapping information of the physical address-logical address mapping table stored in the mapping table storage space to at least one logical address-physical address mapping table, 其中,所述存储器控制电路单元还用以清除存储在所述映射表存储空间中的所述实体地址-逻辑地址映射表的映射信息,Wherein, the memory control circuit unit is also used to clear the mapping information of the physical address-logical address mapping table stored in the mapping table storage space, 其中,所述存储器控制电路单元还用以将属于多个逻辑编程单元的多笔写入数据编程至该些实体擦除单元之中的一作动实体擦除单元的多个实体编程单元,建立编程该些写入数据的该些实体编程单元与该些逻辑编程单元之间的多个更新映射信息,并且将该些更新映射信息存储至所述映射表存储空间中的所述实体地址-逻辑地址映射表。Wherein, the memory control circuit unit is also used to program a plurality of writing data belonging to a plurality of logical programming units to a plurality of physical programming units of an actuating physical erasing unit among the physical erasing units, to establish programming A plurality of updated mapping information between the physical programming units and the logical programming units of the written data, and store the updated mapping information in the physical address-logical address in the storage space of the mapping table mapping table. 16.根据权利要求15所述的存储器存储装置,其特征在于,当将该些更新映射信息的其中一部分存储至所述映射表存储空间并且所述映射表存储空间中的所述剩余存储空间不大于一第二门槛值时,所述存储器控制电路单元还用以判断所述作动实体擦除单元中是否存有一至少一第一实体编程单元,其中所述至少一第一实体编程单元为一下实体编程单元,所述至少一第一实体编程单元已编程一有效数据且对应所述至少一第一实体编程单元的上实体编程单元未被编程,16. The memory storage device according to claim 15, wherein when a part of the updated mapping information is stored in the mapping table storage space and the remaining storage space in the mapping table storage space is not When it is greater than a second threshold value, the memory control circuit unit is also used to judge whether there is at least one first physical programming unit in the active physical erasing unit, wherein the at least one first physical programming unit is: A physical programming unit, the at least one first physical programming unit has been programmed with valid data and the upper physical programming unit corresponding to the at least one first physical programming unit has not been programmed, 其中,倘若判断所述作动实体擦除单元中存有所述至少一第一实体编程单元时,所述存储器控制电路单元还用以将一虚拟数据编程至对应所述至少一第一实体编程单元的上实体编程单元,Wherein, if it is determined that the at least one first physical programming unit exists in the active physical erasing unit, the memory control circuit unit is also used to program a dummy data corresponding to the at least one first physical programming unit. unit's upper entity programming unit, 其中,在将所述虚拟数据编程至对应所述至少一第一实体编程单元的上实体编程单元之后,所述存储器控制电路单元还用以将存储在所述映射表存储空间中的所述实体地址-逻辑地址映射表的映射信息更新至所述至少一逻辑地址-实体地址映射表,Wherein, after programming the dummy data to the upper physical programming unit corresponding to the at least one first physical programming unit, the memory control circuit unit is also used to program the physical programming unit stored in the mapping table storage space updating the mapping information of the address-logical address mapping table to the at least one logical address-physical address mapping table, 其中,所述存储器控制电路单元还用以清除存储在所述映射表存储空间中的所述实体地址-逻辑地址映射表的映射信息并且将该些更新映射信息的其余部分存储至所述映射表存储空间中。Wherein, the memory control circuit unit is also used to clear the mapping information of the physical address-logical address mapping table stored in the mapping table storage space and store the rest of the updated mapping information in the mapping table in storage space. 17.根据权利要求15所述的存储器存储装置,其特征在于,所述映射表存储空间中已存储对应多个已编程实体擦除单元的多个更新映射信息。17. The memory storage device according to claim 15, wherein a plurality of updated mapping information corresponding to a plurality of programmed physical erase units has been stored in the storage space of the mapping table. 18.根据权利要求17所述的存储器存储装置,其特征在于,所述存储器控制电路单元还用以计算对应该些已编程实体擦除单元的其中一个已编程实体擦除单元的更新映射信息的大小,其中所述其中一个已编程实体擦除单元为在将该些写入数据编程至所述作动实体擦除单元的多个实体编程单元之前最后编程的实体擦除单元,18. The memory storage device according to claim 17, wherein the memory control circuit unit is also used to calculate the update mapping information corresponding to one of the programmed physical erasing units. size, wherein said one of the programmed physical erasing units is the last programmed physical erasing unit before programming the write data to the plurality of physical programming units of the actuating physical erasing unit, 其中所述存储器控制电路单元还用以设定所述其中一个已编程实体擦除单元的更新映射信息的大小作为所述第一门槛值。The memory control circuit unit is further configured to set the update mapping information size of one of the programmed physical erase units as the first threshold value. 19.根据权利要求17所述的存储器存储装置,其特征在于,所述存储器控制电路单元还用以计算对应每一该些已编程实体擦除单元的更新映射信息的大小,19. The memory storage device according to claim 17, wherein the memory control circuit unit is also used to calculate the size of the update mapping information corresponding to each of the programmed physical erase units, 其中,所述存储器控制电路单元还用以计算该些已编程实体擦除单元的更新映射信息的大小的一平均值,Wherein, the memory control circuit unit is also used to calculate an average value of the update mapping information of the programmed physical erasing units, 其中,所述存储器控制电路单元还用以设定所述平均值作为所述第一门槛值。Wherein, the memory control circuit unit is further configured to set the average value as the first threshold value. 20.根据权利要求17所述的存储器存储装置,其特征在于,所述存储器控制电路单元还用以计算对应每一该些已编程实体擦除单元的更新映射信息的大小,20. The memory storage device according to claim 17, wherein the memory control circuit unit is also used to calculate the size of the update mapping information corresponding to each of the programmed physical erase units, 其中所述存储器控制电路单元还用以识别对应该些已编程实体擦除单元的更新映射信息的大小之中的一最大值,Wherein the memory control circuit unit is also used to identify a maximum value among the sizes of the update mapping information corresponding to the programmed physical erase units, 其中所述存储器控制电路单元还用以设定所述最大值作为所述第一门槛值。Wherein the memory control circuit unit is further configured to set the maximum value as the first threshold value. 21.根据权利要求15所述的存储器存储装置,其特征在于,该些写入数据之中的至少一部分数据是通过所述存储器控制电路单元将从所述主机系统所接收的多笔原始数据压缩后所产生的数据。21. The memory storage device according to claim 15, wherein at least a part of the written data is compressed by the memory control circuit unit from a plurality of original data received from the host system data generated afterwards.
CN201510425001.5A 2015-07-20 2015-07-20 Mapping table updating method, memory control circuit unit and memory storage device Active CN106372000B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510425001.5A CN106372000B (en) 2015-07-20 2015-07-20 Mapping table updating method, memory control circuit unit and memory storage device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510425001.5A CN106372000B (en) 2015-07-20 2015-07-20 Mapping table updating method, memory control circuit unit and memory storage device

Publications (2)

Publication Number Publication Date
CN106372000A CN106372000A (en) 2017-02-01
CN106372000B true CN106372000B (en) 2019-10-11

Family

ID=57879603

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510425001.5A Active CN106372000B (en) 2015-07-20 2015-07-20 Mapping table updating method, memory control circuit unit and memory storage device

Country Status (1)

Country Link
CN (1) CN106372000B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20180128588A (en) * 2017-05-24 2018-12-04 에스케이하이닉스 주식회사 Memory system and method thereof
CN107844431B (en) * 2017-11-03 2022-01-25 合肥兆芯电子有限公司 Mapping table updating method, memory control circuit unit and memory storage device
CN112313632B (en) * 2018-05-18 2024-05-28 北极星特许集团有限责任公司 Host acceleration operations in managed NAND devices
CN110059021A (en) * 2019-04-18 2019-07-26 深圳市时创意电子有限公司 A kind of algorithm for reducing write-in magnifying power and promoting random writing performance
CN113094307B (en) * 2021-04-06 2023-12-05 深圳宏芯宇电子股份有限公司 Mapping information management method, memory storage device and memory controller
KR20230093914A (en) * 2021-12-20 2023-06-27 삼성전자주식회사 Method of writing data in storage device and method of reading data from storage device using sensor information, and storage device performing the same
CN114327292B (en) * 2021-12-31 2024-02-02 上海移为通信技术股份有限公司 File management method, system, electronic device and storage medium

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005293774A (en) * 2004-04-02 2005-10-20 Hitachi Global Storage Technologies Netherlands Bv Disk unit control method
US8250333B2 (en) * 2009-01-05 2012-08-21 Sandisk Technologies Inc. Mapping address table maintenance in a memory device
US8316182B2 (en) * 2009-08-11 2012-11-20 International Business Machines Corporation Hierarchical storage management for database systems
TWI475387B (en) * 2012-07-19 2015-03-01 Jmicron Technology Corp Memory control method and memory control circuit thereof
CN104077197B (en) * 2013-03-29 2017-03-01 北京联想核芯科技有限公司 System recovery method, device, solid state hard disc and electronic equipment
CN104246721B (en) * 2013-03-29 2017-02-22 株式会社东芝 Storage system, storage controller, and storage method

Also Published As

Publication number Publication date
CN106372000A (en) 2017-02-01

Similar Documents

Publication Publication Date Title
TWI534618B (en) Mapping table updating method, memory control circuit unit and memory storage device
CN106372000B (en) Mapping table updating method, memory control circuit unit and memory storage device
TWI459197B (en) Data writing and reading method, memory controller and memory storage apparatus
US9690490B2 (en) Method for writing data, memory storage device and memory control circuit unit
CN104866429B (en) Memory management method, memory control circuit unit and memory storage device
CN102760099B (en) Data writing method, memory controller and memory storage device
CN104765569B (en) Data writing method, memory control circuit unit and memory storage device
US9304907B2 (en) Data management method, memory control circuit unit and memory storage apparatus
TW201705148A (en) Mapping table accessing method, memory control circuit unit and memory storage device
CN104881240B (en) Data writing method, memory storage device and memory control circuit unit
CN105022695A (en) Data storage method, memory control circuit unit and memory storage device
CN106484307A (en) Memory management method, memory control circuit unit and memory storage device
CN103678162B (en) System data storage method, memory controller and memory storage device
CN110308876B (en) Memory management method, memory storage device and memory control circuit unit
CN105653391B (en) Data access method, memory control circuit unit and memory storage device
CN109273033B (en) Memory management method, memory control circuit unit and memory storage device
CN106959818A (en) Data writing method, memory control circuit unit and memory storage device
CN105630687A (en) Data writing method, memory control circuit unit and memory storage device
CN105335096B (en) Data management method, memory control circuit unit and memory storage device
CN106354651B (en) Average wear method, memory control circuit unit and memory storage device
CN109032957B (en) Memory management method, memory control circuit unit and memory storage device
CN106406746A (en) Mapping table access method, memory control circuit unit and memory storage device
US9941907B2 (en) Memory management method, memory storage device and memory control circuit unit
CN112732199B (en) Data access method, memory control circuit unit and memory storage device
US9600363B2 (en) Data accessing method, memory controlling circuit unit and memory storage apparatus

Legal Events

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