TWI717953B - Storage controller, memory management method and storage device - Google Patents

Storage controller, memory management method and storage device Download PDF

Info

Publication number
TWI717953B
TWI717953B TW108147734A TW108147734A TWI717953B TW I717953 B TWI717953 B TW I717953B TW 108147734 A TW108147734 A TW 108147734A TW 108147734 A TW108147734 A TW 108147734A TW I717953 B TWI717953 B TW I717953B
Authority
TW
Taiwan
Prior art keywords
mapping table
target
sl2p
plane
physical
Prior art date
Application number
TW108147734A
Other languages
Chinese (zh)
Other versions
TW202125263A (en
Inventor
謝宏志
蕭又華
Original Assignee
大陸商深圳大心電子科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 大陸商深圳大心電子科技有限公司 filed Critical 大陸商深圳大心電子科技有限公司
Priority to TW108147734A priority Critical patent/TWI717953B/en
Application granted granted Critical
Publication of TWI717953B publication Critical patent/TWI717953B/en
Publication of TW202125263A publication Critical patent/TW202125263A/en

Links

Images

Abstract

A memory management method, including: maintaining a plurality of segment logical to physical addresses mapping (SL2P) tables in a buffer memory of a storage controller, wherein each of the SL2Ps is configured to record a relationships between a plurality of logical addresses and a plurality of physical addresses; maintaining a segment mapping table list (SMT list) in the buffer memory, wherein the SMT list includes a plurality of entries respectively corresponding to the SL2P tables; in response to a first SL2P table among the SL2P tables is stored into a first system physical address of a rewriteable non-volatile memory module, recording the first system physical address into a first entry among the entries of the SMT list; and storing the SMT list into the rewriteable non-volatile memory module.

Description

儲存控制器、記憶體管理方法與儲存裝置Storage controller, memory management method and storage device

本發明是有關於一種儲存控制器,且特別是有關於配置有可複寫式非揮發性記憶體模組的一種儲存控制器、記憶體管理方法與儲存裝置。 The invention relates to a storage controller, and more particularly to a storage controller, a memory management method and a storage device equipped with a rewritable non-volatile memory module.

一般來說,對於配置有可複寫式非揮發性記憶體模組的儲存裝置,所述儲存裝置的儲存控制器會利用維護在緩衝記憶體中的邏輯轉實體位址映射表來管理所述可複寫式非揮發性記憶體模組的多個實體位址(如,實體頁面的位址)與對應於主機系統的多個邏輯位址(如,邏輯頁面的位址)的映射關係。 Generally speaking, for a storage device configured with a rewritable non-volatile memory module, the storage controller of the storage device uses a logical to physical address mapping table maintained in the buffer memory to manage the The mapping relationship between multiple physical addresses (eg, physical page addresses) of the copy-type non-volatile memory module and multiple logical addresses (eg, logical page addresses) corresponding to the host system.

然而,隨著科技的進展,所述可複寫式非揮發性記憶體模組的容量越來越大(如,單一實體頁面的大小與多個實體頁面的總數量皆增長),維護在緩衝記憶體中的邏輯轉實體位址映射表所佔用的空間也變得越來越大,進而降低了相關於邏輯轉實體位址映射表的管理操作的執行效率與維護效率。 However, with the development of technology, the capacity of the rewritable non-volatile memory module is getting larger and larger (for example, the size of a single physical page and the total number of multiple physical pages both increase), and the maintenance is in the buffer memory The space occupied by the logical-to-physical address mapping table in the body has also become larger, which reduces the execution efficiency and maintenance efficiency of management operations related to the logical-to-physical address mapping table.

本發明提供一種儲存控制器、記憶體管理方法以及儲存裝置,可利用區段映射表清單來有效地管理多個區段邏輯轉實體位址映射表,進而提高多個邏輯位址與多個實體位址之間的映射關係的管理操作的效率。 The present invention provides a storage controller, a memory management method, and a storage device, which can use a section mapping table list to effectively manage multiple section logic to entity address mapping tables, thereby improving multiple logic addresses and multiple entities The efficiency of the management operation of the mapping relationship between addresses.

本發明的一實施例提供用於控制配置有可複寫式非揮發性記憶體模組的儲存裝置的一種儲存控制器。所述儲存控制器包括連接介面電路、緩衝記憶體、記憶體介面控制電路、映射表管理電路單元以及處理器。所述連接介面電路用以耦接至一主機系統。所述記憶體介面控制電路用以耦接至所述可複寫式非揮發性記憶體模組,其中所述可複寫式非揮發性記憶體模組具有多個實體區塊,並且所述多個實體區塊各自具有多個實體頁面。處理器耦接至所述連接介面電路、所述緩衝記憶體、所述記憶體介面控制電路及所述映射表管理電路單元。所述處理器用以維護多個區段邏輯轉實體位址映射(Segment Logical To Physical addresses mapping,SL2P)表於所述緩衝記憶體中,其中所述多個SL2P表各自用以記錄多個邏輯位址以及多個實體位址之間的映射關係,其中所述多個實體位址對應至一部份的所述多個實體頁面,並且所述多個邏輯位址對應至一部份的被配置給所述主機系統的多個邏輯頁面。所述映射表管理電路單元用以維護一區段映射表清單(Segment Mapping Table List,SMT清單)於所述緩衝記憶體中, 其中所述SMT清單包括多個條目,其中所述多個條目分別對應所述多個SL2P表,並且所述多個條目各自包括系統區塊識別碼以及對應所述系統區塊識別碼的系統實體區塊中的系統實體位址,其中反應於所述多個SL2P表中的第一SL2P表被儲存至所述可複寫式非揮發性記憶體模組中的第一系統實體位址,所述映射表管理電路單元更用以記錄所述第一系統實體位址至所述SMT清單的所述多個條目中對應所述第一SL2P表的第一條目。所述處理器更用以儲存所述SMT清單至所述可複寫式非揮發性記憶體模組中。 An embodiment of the present invention provides a storage controller for controlling a storage device equipped with a rewritable non-volatile memory module. The storage controller includes a connection interface circuit, a buffer memory, a memory interface control circuit, a mapping table management circuit unit, and a processor. The connection interface circuit is used for coupling to a host system. The memory interface control circuit is used for coupling to the rewritable non-volatile memory module, wherein the rewritable non-volatile memory module has a plurality of physical blocks, and the plurality of Each physical block has multiple physical pages. The processor is coupled to the connection interface circuit, the buffer memory, the memory interface control circuit, and the mapping table management circuit unit. The processor is used to maintain a plurality of segment logical to physical address mapping (Segment Logical To Physical addresses mapping, SL2P) tables in the buffer memory, wherein each of the plurality of SL2P tables is used to record a plurality of logical bits Mapping relationship between multiple physical addresses and multiple physical addresses, wherein the multiple physical addresses correspond to a portion of the multiple physical pages, and the multiple logical addresses correspond to a portion of the configured Multiple logical pages for the host system. The mapping table management circuit unit is used to maintain a segment mapping table list (Segment Mapping Table List, SMT list) in the buffer memory, The SMT list includes multiple entries, wherein the multiple entries respectively correspond to the multiple SL2P tables, and each of the multiple entries includes a system block identification code and a system entity corresponding to the system block identification code The system physical address in the block, wherein the first SL2P table reflected in the plurality of SL2P tables is stored in the first system physical address in the rewritable non-volatile memory module, the The mapping table management circuit unit is further configured to record the first system physical address to the first entry corresponding to the first SL2P table among the multiple entries in the SMT list. The processor is further used for storing the SMT list in the rewritable non-volatile memory module.

本發明的一實施例提供適用於用以控制配置有一可複寫式非揮發性記憶體模組的一儲存裝置的儲存控制器的一種記憶體管理方法,其中所述可複寫式非揮發性記憶體模組具有多個實體區塊,並且所述多個實體區塊各自具有多個實體頁面。所述方法包括:維護多個區段邏輯轉實體位址映射(Segment Logical To Physical addresses mapping,SL2P)表於所述儲存控制器的緩衝記憶體中,其中所述多個SL2P表各自用以記錄多個邏輯位址以及多個實體位址之間的映射關係,其中所述多個實體位址對應至一部份的所述多個實體頁面,並且所述多個邏輯位址對應至一部份的被配置給所述主機系統的多個邏輯頁面;維護一區段映射表清單(Segment Mapping Table List,SMT清單)於所述緩衝記憶體中,其中所述SMT清單包括多個條目,其中所述多個條目分別對應所述多個SL2P表,並且所述多個條目各自包括系統區塊識別碼以及對應所述系統區塊識別碼的系統實體區塊中的系統實體位址;反 應於所述多個SL2P表中的第一SL2P表被儲存至所述可複寫式非揮發性記憶體模組中的第一系統實體位址,記錄所述第一系統實體位址至所述SMT清單的所述多個條目中對應所述第一SL2P表的第一條目;以及儲存所述SMT清單至所述可複寫式非揮發性記憶體模組中。 An embodiment of the present invention provides a memory management method suitable for a storage controller for controlling a storage device equipped with a rewritable non-volatile memory module, wherein the rewritable non-volatile memory The module has multiple physical blocks, and each of the multiple physical blocks has multiple physical pages. The method includes: maintaining a plurality of segment logical to physical address mapping (Segment Logical To Physical addresses mapping, SL2P) tables in the buffer memory of the storage controller, wherein each of the plurality of SL2P tables is used for recording The mapping relationship between multiple logical addresses and multiple physical addresses, wherein the multiple physical addresses correspond to a portion of the multiple physical pages, and the multiple logical addresses correspond to a portion Copies are configured to multiple logical pages of the host system; maintain a segment mapping table list (Segment Mapping Table List, SMT list) in the buffer memory, wherein the SMT list includes multiple entries, wherein The multiple entries respectively correspond to the multiple SL2P tables, and each of the multiple entries includes a system block identification code and a system entity address in the system entity block corresponding to the system block identification code; reverse The first SL2P table in the plurality of SL2P tables is stored in the first system physical address in the rewritable non-volatile memory module, and the first system physical address is recorded to the The multiple entries of the SMT list correspond to the first entry of the first SL2P table; and the SMT list is stored in the rewritable non-volatile memory module.

本發明的一實施例提供一種儲存裝置。所述儲存裝置包括可複寫式非揮發性記憶體模組以及儲存控制器。所述可複寫式非揮發性記憶體模組具有多個實體區塊,並且所述多個實體區塊各自具有多個實體頁面。所述儲存控制器耦接至所述可複寫式非揮發性記憶體模組。所述儲存控制器用以維護多個區段邏輯轉實體位址映射(Segment Logical To Physical addresses mapping,SL2P)表於所述緩衝記憶體中,其中所述多個SL2P表各自用以記錄多個邏輯位址以及多個實體位址之間的映射關係,其中所述多個實體位址對應至一部份的所述多個實體頁面,並且所述多個邏輯位址對應至一部份的被配置給所述主機系統的多個邏輯頁面,其中所述儲存控制器更用以維護一區段映射表清單(Segment Mapping Table List,SMT清單)於所述緩衝記憶體中,其中所述SMT清單包括多個條目,其中所述多個條目分別對應所述多個SL2P表,並且所述多個條目各自包括系統區塊識別碼以及對應所述系統區塊識別碼的系統實體區塊中的系統實體位址。此外,反應於所述多個SL2P表中的第一SL2P表被儲存至所述可複寫式非揮發性記憶體模組中的第一系統實體位址,所述儲存控制器更用 以記錄所述第一系統實體位址至所述SMT清單的所述多個條目中對應所述第一SL2P表的第一條目,其中所述儲存控制器更用以儲存所述SMT清單至所述可複寫式非揮發性記憶體模組中。 An embodiment of the present invention provides a storage device. The storage device includes a rewritable non-volatile memory module and a storage controller. The rewritable non-volatile memory module has multiple physical blocks, and each of the multiple physical blocks has multiple physical pages. The storage controller is coupled to the rewritable non-volatile memory module. The storage controller is used to maintain a plurality of segment logical to physical address mapping (Segment Logical To Physical addresses mapping, SL2P) tables in the buffer memory, wherein each of the plurality of SL2P tables is used to record a plurality of logic The mapping relationship between addresses and multiple physical addresses, wherein the multiple physical addresses correspond to a part of the multiple physical pages, and the multiple logical addresses correspond to a part of the A plurality of logical pages allocated to the host system, wherein the storage controller is further used to maintain a segment mapping table list (Segment Mapping Table List, SMT list) in the buffer memory, wherein the SMT list It includes multiple entries, wherein the multiple entries respectively correspond to the multiple SL2P tables, and each of the multiple entries includes a system block identification code and a system in the system entity block corresponding to the system block identification code Physical address. In addition, the first SL2P table reflected in the plurality of SL2P tables is stored to the first system physical address in the rewritable non-volatile memory module, and the storage controller further uses To record the physical address of the first system to the first entry of the first SL2P table among the multiple entries in the SMT list, wherein the storage controller is further used to store the SMT list to In the rewritable non-volatile memory module.

綜上所述,本發明的實施例所提供的儲存控制器、記憶體管理方法與儲存裝置,可利用區段映射表清單來產生對應的映射表載入指令佇列,以有效地管理多個區段邏輯轉實體位址映射表,進而提高多個邏輯位址與多個實體位址之間的映射關係的管理操作的效率。 In summary, the storage controller, the memory management method, and the storage device provided by the embodiments of the present invention can use the section mapping table list to generate corresponding mapping table load command queues to effectively manage multiple The section logic is converted to the physical address mapping table, thereby improving the efficiency of the management operation of the mapping relationship between multiple logical addresses and multiple physical addresses.

10:主機系統 10: Host system

20:儲存裝置 20: storage device

110、211:處理器 110, 211: processor

120:主機記憶體 120: host memory

130:資料傳輸介面電路 130: data transmission interface circuit

210:儲存控制器 210: storage controller

212:資料傳輸管理電路 212: Data Transmission Management Circuit

213:記憶體介面控制電路 213: Memory interface control circuit

220:可複寫式非揮發性記憶體模組 220: rewritable non-volatile memory module

230:連接介面電路 230: connection interface circuit

215:映射表管理電路單元 215: Mapping table management circuit unit

2151:映射表清單管理電路 2151: Mapping table list management circuit

2152:映射表載入管理電路 2152: Mapping table loading management circuit

S210、S220、S230、S240:記憶體管理方法的流程步驟 S210, S220, S230, S240: Process steps of the memory management method

SB(1)、B1~B5:系統實體區塊 SB(1), B1~B5: system physical block

PL1、PL2:平面 PL1, PL2: plane

SMT1、SMT2、SMT3:區段映射表清單 SMT1, SMT2, SMT3: Section mapping table list

SL2P(1)~SL2P(11):區段邏輯轉實體位址映射表 SL2P(1)~SL2P(11): Segment logical to physical address mapping table

300、310:邏輯轉實體位址映射表 300, 310: logical to physical address mapping table

LCQ1~LCQ3:映射表載入指令佇列 LCQ1~LCQ3: Mapping table load command queue

PG1~PG3、Page(1.1)~Page(M.P):系統實體頁面/實體頁面 PG1~PG3, Page(1.1)~Page(M.P): System entity page/Entity page

SPA(1)~SPA(N):實體位址 SPA(1)~SPA(N): physical address

LA(0)~LA(2047):邏輯位址 LA(0)~LA(2047): logical address

A31、A32、A41、A61、A71、A72、A81~A88、A91~A97、 A1201:箭頭 A31, A32, A41, A61, A71, A72, A81~A88, A91~A97, A1201: Arrow

BMP_B3、BMP_B4、BMP_B3’、BMP_B4’:映射表位圖 BMP_B3, BMP_B4, BMP_B3’, BMP_B4’: mapping table bit map

BMP_B3.1、BMP_B3.1’、BMP_B3.2、BMP_B3.2’、BMP_B4.1、BMP_B4.1’、BMP_B4.2、BMP_B4.2’:子矩陣 BMP_B3.1, BMP_B3.1’, BMP_B3.2, BMP_B3.2’, BMP_B4.1, BMP_B4.1’, BMP_B4.2, BMP_B4.2’: sub-matrix

S1010、S1020:載入區段邏輯轉實體映射表的流程步驟 S1010, S1020: Process steps for loading the section logic to entity mapping table

S1110、S1120、S1130、S1140:載入區段邏輯轉實體映射表的流程步驟 S1110, S1120, S1130, S1140: Process steps for loading the section logic to entity mapping table

MRI1:映射表記錄資訊 MRI1: Mapping table records information

圖1是根據本發明的一實施例所繪示的主機系統與儲存裝置的方塊示意圖。 FIG. 1 is a block diagram of a host system and a storage device according to an embodiment of the invention.

圖2是根據本發明的一實施例所繪示的記憶體管理方法的流程圖。 Fig. 2 is a flowchart of a memory management method according to an embodiment of the invention.

圖3A是根據本發明的一實施例所繪示的系統實體區塊的架構示意圖。 FIG. 3A is a schematic diagram of the structure of a system physical block according to an embodiment of the invention.

圖3B是根據本發明的一實施例所繪示的儲存區段邏輯轉實體位址映射表至系統實體區塊的示意圖。 FIG. 3B is a schematic diagram illustrating a mapping table from logical to physical address of a storage section to a system physical block according to an embodiment of the present invention.

圖4是習知的載入多個區段邏輯轉實體位址映射表的示意圖。 FIG. 4 is a schematic diagram of a conventional mapping table for loading a logical to physical address of multiple sectors.

圖5A是根據本發明的一實施例所繪示的根據區段映射表清 單來產生映射表載入指令佇列的示意圖。 FIG. 5A is a diagram according to a section mapping table according to an embodiment of the present invention; Single to generate a schematic diagram of the mapping table load command queue.

圖5B是根據本發明的又一實施例所繪示的根據區段映射表清單來產生映射表載入指令佇列的示意圖。 5B is a schematic diagram of generating a mapping table load command queue according to a section mapping table list according to another embodiment of the present invention.

圖6是習知的載入多個區段邏輯轉實體位址映射表的示意圖。 FIG. 6 is a schematic diagram of a conventional mapping table for loading a logical to physical address of multiple sectors.

圖7是根據本發明的一實施例所繪示的根據區段映射表清單來產生映射表位圖的示意圖。 FIG. 7 is a schematic diagram of generating a mapping table bitmap according to a section mapping table list according to an embodiment of the present invention.

圖8A是根據本發明的一實施例所繪示的調整映射表位圖的示意圖。 FIG. 8A is a schematic diagram of an adjustment mapping table bitmap according to an embodiment of the invention.

圖8B是根據本發明的一實施例所繪示的根據已調整映射表位圖來產生映射表載入指令佇列的示意圖。 FIG. 8B is a schematic diagram of generating a mapping table load instruction queue according to an adjusted mapping table bitmap according to an embodiment of the present invention.

圖9A是根據本發明的又一實施例所繪示的調整映射表位圖的示意圖。 FIG. 9A is a schematic diagram illustrating an adjustment mapping table bitmap according to another embodiment of the present invention.

圖9B是根據本發明的又一實施例所繪示的根據已調整映射表位圖來產生映射表載入指令佇列的示意圖。 9B is a schematic diagram of generating a mapping table load instruction queue according to an adjusted mapping table bitmap according to another embodiment of the present invention.

圖10是根據本發明的一實施例所繪示的載入區段邏輯轉實體映射表的流程圖。 FIG. 10 is a flowchart of loading a segment logic to entity mapping table according to an embodiment of the present invention.

圖11是根據本發明的又一實施例所繪示的載入區段邏輯轉實體映射表的流程圖。 FIG. 11 is a flowchart of loading a section logic to entity mapping table according to another embodiment of the present invention.

圖12是根據本發明的一實施例所繪示的映射表記錄資訊的示意圖。 FIG. 12 is a schematic diagram of information recorded in a mapping table according to an embodiment of the present invention.

在本實施例中,儲存裝置包括可複寫式非揮發性記憶體模組(rewritable non-volatile memory module)與儲存裝置控制器(亦稱,儲存控制器或儲存控制電路)。此外,儲存裝置是與主機系統一起使用,以使主機系統可將資料寫入至儲存裝置或從儲存裝置中讀取資料。 In this embodiment, the storage device includes a rewritable non-volatile memory module and a storage device controller (also referred to as a storage controller or a storage control circuit). In addition, the storage device is used with the host system so that the host system can write data to the storage device or read data from the storage device.

圖1是根據本發明的一實施例所繪示的主機系統與儲存裝置的方塊示意圖。請參照圖1,主機系統(Host System)10包括處理器(Processor)110、主機記憶體(Host Memory)120及資料傳輸介面電路(Data Transfer Interface Circuit)130。在本實施例中,資料傳輸介面電路130耦接(亦稱,電性連接)至處理器110與主機記憶體120。在另一實施例中,處理器110、主機記憶體120與資料傳輸介面電路130之間利用系統匯流排(System Bus)彼此耦接。 FIG. 1 is a block diagram of a host system and a storage device according to an embodiment of the invention. 1, the host system (Host System) 10 includes a processor (Processor) 110, a host memory (Host Memory) 120, and a data transfer interface circuit (Data Transfer Interface Circuit) 130. In this embodiment, the data transmission interface circuit 130 is coupled (also referred to as electrically connected) to the processor 110 and the host memory 120. In another embodiment, the processor 110, the host memory 120, and the data transmission interface circuit 130 are coupled to each other by a system bus.

儲存裝置20包括儲存控制器(Storage Controller)210、可複寫式非揮發性記憶體模組(Rewritable Non-Volatile Memory Module)220及連接介面電路(Connection Interface Circuit)230。其中,儲存控制器210包括處理器211、資料管理電路(Data Management Circuit)212與記憶體介面控制電路(Memory Interface Control Circuit)213。 The storage device 20 includes a storage controller (Storage Controller) 210, a rewritable non-volatile memory module (Rewritable Non-Volatile Memory Module) 220 and a connection interface circuit (Connection Interface Circuit) 230. The storage controller 210 includes a processor 211, a data management circuit (Data Management Circuit) 212, and a memory interface control circuit (Memory Interface Control Circuit) 213.

在本實施例中,主機系統10是透過資料傳輸介面電路130與儲存裝置20的連接介面電路230耦接至儲存裝置20來進行資料的存取操作。例如,主機系統10可經由資料傳輸介面電路130 將資料儲存至儲存裝置20或從儲存裝置20中讀取資料。 In this embodiment, the host system 10 is coupled to the storage device 20 through the data transmission interface circuit 130 and the connection interface circuit 230 of the storage device 20 to perform data access operations. For example, the host system 10 can use the data transmission interface circuit 130 Store data to the storage device 20 or read data from the storage device 20.

在本實施例中,處理器110、主機記憶體120及資料傳輸介面電路130可設置在主機系統10的主機板上。資料傳輸介面電路130的數目可以是一或多個。透過資料傳輸介面電路130,主機板可以經由有線或無線方式耦接至儲存裝置20。儲存裝置20可例如是隨身碟、記憶卡、固態硬碟(Solid State Drive,SSD)或無線記憶體儲存裝置。無線記憶體儲存裝置可例如是近距離無線通訊(Near Field Communication,NFC)記憶體儲存裝置、無線傳真(WiFi)記憶體儲存裝置、藍牙(Bluetooth)記憶體儲存裝置或低功耗藍牙記憶體儲存裝置(例如,iBeacon)等以各式無線通訊技術為基礎的記憶體儲存裝置。此外,主機板也可以透過系統匯流排耦接至全球定位系統(Global Positioning System,GPS)模組、網路介面卡、無線傳輸裝置、鍵盤、螢幕、喇叭等各式I/O裝置。 In this embodiment, the processor 110, the host memory 120, and the data transmission interface circuit 130 may be disposed on the main board of the host system 10. The number of the data transmission interface circuit 130 may be one or more. Through the data transmission interface circuit 130, the motherboard can be coupled to the storage device 20 in a wired or wireless manner. The storage device 20 may be, for example, a flash drive, a memory card, a solid state drive (SSD) or a wireless memory storage device. The wireless memory storage device may be, for example, a Near Field Communication (NFC) memory storage device, a wireless fax (WiFi) memory storage device, a Bluetooth (Bluetooth) memory storage device or a Bluetooth low energy memory storage device Devices (for example, iBeacon) and other memory storage devices based on various wireless communication technologies. In addition, the motherboard can also be coupled to various I/O devices such as Global Positioning System (GPS) modules, network interface cards, wireless transmission devices, keyboards, screens, speakers, etc. through the system bus.

在本實施例中,資料傳輸介面電路130與連接介面電路230是相容於高速周邊零件連接介面(Peripheral Component Interconnect Express,PCI Express)標準的介面電路。並且,資料傳輸介面電路130與連接介面電路230之間是利用快速非揮發性記憶體介面標準(Non-Volatile Memory express,NVMe)通訊協定來進行資料的傳輸。 In this embodiment, the data transmission interface circuit 130 and the connection interface circuit 230 are interface circuits compatible with the Peripheral Component Interconnect Express (PCI Express) standard. In addition, the data transmission interface circuit 130 and the connection interface circuit 230 use a non-volatile memory interface standard (Non-Volatile Memory express, NVMe) communication protocol for data transmission.

然而,必須瞭解的是,本發明不限於此,資料傳輸介面電路130與連接介面電路230亦可以是符合並列先進附件(Parallel Advanced Technology Attachment,PATA)標準、電氣和電子工程師 協會(Institute of Electrical and Electronic Engineers,IEEE)1394標準、序列先進附件(Serial Advanced Technology Attachment,SATA)標準、通用序列匯流排(Universal Serial Bus,USB)標準、SD介面標準、超高速一代(Ultra High Speed-I,UHS-I)介面標準、超高速二代(Ultra High Speed-II,UHS-II)介面標準、記憶棒(Memory Stick,MS)介面標準、多晶片封裝(Multi-Chip Package)介面標準、多媒體儲存卡(Multi Media Card,MMC)介面標準、eMMC介面標準、通用快閃記憶體(Universal Flash Storage,UFS)介面標準、eMCP介面標準、CF介面標準、整合式驅動電子介面(Integrated Device Electronics,IDE)標準或其他適合的標準。此外,在另一實施例中,連接介面電路230可與儲存控制器210封裝在一個晶片中,或者連接介面電路230是佈設於一包含儲存控制器210之晶片外。 However, it must be understood that the present invention is not limited to this, and the data transmission interface circuit 130 and the connection interface circuit 230 may also conform to the Parallel Advanced Technology Attachment (PATA) standard, electrical and electronic engineers Association (Institute of Electrical and Electronic Engineers, IEEE) 1394 standard, serial advanced attachment (Serial Advanced Technology Attachment, SATA) standard, universal serial bus (Universal Serial Bus, USB) standard, SD interface standard, Ultra High Speed-I, UHS-I) interface standard, Ultra High Speed-II (UHS-II) interface standard, Memory Stick (MS) interface standard, Multi-Chip Package interface Standard, Multi Media Card (MMC) interface standard, eMMC interface standard, Universal Flash Storage (UFS) interface standard, eMCP interface standard, CF interface standard, integrated drive electronic interface (Integrated Device) Electronics, IDE) standards or other suitable standards. In addition, in another embodiment, the connection interface circuit 230 and the storage controller 210 may be packaged in a chip, or the connection interface circuit 230 may be arranged outside a chip including the storage controller 210.

在本實施例中,主機記憶體120用以暫存處理器110所執行的指令或資料。例如,在本範例實施例中,主機記憶體120可以是動態隨機存取記憶體(Dynamic Random Access Memory,DRAM)、靜態隨機存取記憶體(Static Random Access Memory,SRAM)等。然而,必須瞭解的是,本發明不限於此,主機記憶體120也可以是其他適合的記憶體。 In this embodiment, the host memory 120 is used to temporarily store commands or data executed by the processor 110. For example, in this exemplary embodiment, the host memory 120 may be a dynamic random access memory (Dynamic Random Access Memory, DRAM), a static random access memory (Static Random Access Memory, SRAM), etc. However, it must be understood that the present invention is not limited to this, and the host memory 120 may also be other suitable memory.

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

更詳細來說,儲存控制器210中的處理器211為具備運 算能力的硬體,其用以控制儲存控制器210的整體運作。具體來說,處理器211具有多個控制指令,並且在儲存裝置20運作時,此些控制指令會被執行以進行資料的寫入、讀取與抹除等運作。 In more detail, the processor 211 in the storage controller 210 is capable of operating Computing power hardware, which is used to control the overall operation of the storage controller 210. Specifically, the processor 211 has a plurality of control commands, and when the storage device 20 is operating, these control commands are executed to perform operations such as writing, reading, and erasing data.

值得一提的是,在本實施例中,處理器110與處理器211例如是中央處理單元(Central Processing Unit,CPU)、微處理器(micro-processor)、或是其他可程式化之處理單元(Microprocessor)、數位訊號處理器(Digital Signal Processor,DSP)、可程式化控制器、特殊應用積體電路(Application Specific Integrated Circuits,ASIC)、可程式化邏輯裝置(Programmable Logic Device,PLD)或其他類似電路元件,本發明並不限於此。 It is worth mentioning that, in this embodiment, the processor 110 and the processor 211 are, for example, a central processing unit (CPU), a microprocessor (micro-processor), or other programmable processing units. (Microprocessor), Digital Signal Processor (DSP), Programmable Controller, Application Specific Integrated Circuits (ASIC), Programmable Logic Device (PLD) or other Similar to circuit elements, the present invention is not limited to this.

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

在本實施例中,如上所述,儲存控制器210還包括資料管理電路212與記憶體介面控制電路213。應注意的是,儲存控制 器210各部件所執行的操作亦可視為儲存控制器210所執行的操作。 In this embodiment, as described above, the storage controller 210 further includes a data management circuit 212 and a memory interface control circuit 213. It should be noted that storage control The operations performed by the components of the controller 210 can also be regarded as operations performed by the storage controller 210.

其中,資料管理電路212耦接至處理器211、記憶體介面控制電路213與連接介面電路230。資料管理電路212用以接受處理器211的指示來進行資料的傳輸。例如,經由連接介面電路230從主機系統10(如,主機記憶體120)讀取資料,並且將所讀取的資料經由記憶體介面控制電路213寫入至可複寫式非揮發性記憶體模組220中(如,根據來自主機系統10的寫入指令來進行寫入操作)。又例如,經由記憶體介面控制電路213從可複寫式非揮發性記憶體模組220的一或多個實體單元中讀取資料(資料可讀取自一或多個實體單元中的一或多個記憶胞),並且將所讀取的資料經由連接介面電路230寫入至主機系統10(如,主機記憶體120)中(如,根據來自主機系統10的讀取指令來進行讀取操作)。在另一實施例中,資料管理電路212亦可整合至處理器211中。 The data management circuit 212 is coupled to the processor 211, the memory interface control circuit 213 and the connection interface circuit 230. The data management circuit 212 is used for receiving instructions from the processor 211 to transmit data. For example, read data from the host system 10 (eg, the host memory 120) via the connection interface circuit 230, and write the read data to the rewritable non-volatile memory module via the memory interface control circuit 213 220 (for example, the write operation is performed according to the write command from the host system 10). For another example, data can be read from one or more physical units of the rewritable non-volatile memory module 220 through the memory interface control circuit 213 (data can be read from one or more of the one or more physical units). Memory cells), and write the read data to the host system 10 (for example, the host memory 120) via the connection interface circuit 230 (for example, perform a read operation according to a read command from the host system 10) . In another embodiment, the data management circuit 212 can also be integrated into the processor 211.

記憶體介面控制電路213用以接受處理器211的指示,配合資料管理電路212來進行對於可複寫式非揮發性記憶體模組220的寫入(亦稱,程式化,Programming)操作、讀取操作或抹除操作。 The memory interface control circuit 213 is used to receive instructions from the processor 211, and cooperate with the data management circuit 212 to perform writing (also known as programming) operations and reading to the rewritable non-volatile memory module 220 Operate or erase operation.

舉例來說,處理器211可執行寫入指令序列,以指示記憶體介面控制電路213將資料寫入至可複寫式非揮發性記憶體模組220中;處理器211可執行讀取指令序列,以指示記憶體介面控制電路213從可複寫式非揮發性記憶體模組220的對應讀取指 令的一或多個實體單元(亦稱,目標實體單元)中讀取資料;處理器211可執行抹除指令序列,以指示記憶體介面控制電路213對可複寫式非揮發性記憶體模組220進行抹除操作。寫入指令序列、讀取指令序列及抹除指令序列可各別包括一或多個程式碼或指令碼並且用以指示對可複寫式非揮發性記憶體模組220執行相對應的寫入、讀取及抹除等操作。在一實施例中,處理器211還可以下達其他類型的指令序列給記憶體介面控制電路213,以對可複寫式非揮發性記憶體模組220執行相對應的操作。 For example, the processor 211 can execute a write instruction sequence to instruct the memory interface control circuit 213 to write data into the rewritable non-volatile memory module 220; the processor 211 can execute a read instruction sequence, To instruct the memory interface control circuit 213 to read the corresponding read instructions from the rewritable non-volatile memory module 220 Order to read data from one or more physical units (also known as target physical units); the processor 211 can execute an erase instruction sequence to instruct the memory interface control circuit 213 to perform an operation on the rewritable non-volatile memory module 220 performs an erasing operation. The write command sequence, the read command sequence, and the erase command sequence may each include one or more program codes or command codes and are used to instruct to perform corresponding writing, writing, and writing to the rewritable non-volatile memory module 220. Read and erase operations. In one embodiment, the processor 211 may also send other types of instruction sequences to the memory interface control circuit 213 to perform corresponding operations on the rewritable non-volatile memory module 220.

此外,欲寫入至可複寫式非揮發性記憶體模組220的資料會經由記憶體介面控制電路213轉換為可複寫式非揮發性記憶體模組220所能接受的格式。具體來說,若處理器211要存取可複寫式非揮發性記憶體模組220,處理器211會傳送對應的指令序列給記憶體介面控制電路213以指示記憶體介面控制電路213執行對應的操作。例如,這些指令序列可包括指示寫入資料的寫入指令序列、指示讀取資料的讀取指令序列、指示抹除資料的抹除指令序列、以及用以指示各種記憶體操作(例如,改變預設讀取電壓組的多個預設讀取電壓值以進行讀取操作,或執行垃圾回收程序等等)的相對應的指令序列。這些指令序列可包括一或多個訊號,或是在匯流排上的資料。這些訊號或資料可包括指令碼或程式碼。例如,在讀取指令序列中,會包括讀取的辨識碼、記憶體位址等資訊。 In addition, the data to be written into the rewritable non-volatile memory module 220 is converted into a format acceptable by the rewritable non-volatile memory module 220 through the memory interface control circuit 213. Specifically, if the processor 211 wants to access the rewritable non-volatile memory module 220, the processor 211 will send a corresponding command sequence to the memory interface control circuit 213 to instruct the memory interface control circuit 213 to execute the corresponding operating. For example, these command sequences may include a write command sequence instructing to write data, a read command sequence instructing to read data, an erase command sequence instructing to erase data, and various memory operations (for example, changing presets). It is assumed that a plurality of preset read voltage values of the read voltage group are used to perform a read operation, or execute a garbage collection program, etc.). These command sequences can include one or more signals, or data on the bus. These signals or data may include script or program code. For example, in the read command sequence, information such as the read identification code and memory address will be included.

可複寫式非揮發性記憶體模組220是耦接至儲存控制器 210(記憶體介面控制電路213)並且用以儲存主機系統10所寫入之資料。可複寫式非揮發性記憶體模組220可以是單階記憶胞(Single Level Cell,SLC)NAND型快閃記憶體模組(即,一個記憶胞中可儲存1個位元的快閃記憶體模組)、多階記憶胞(Multi Level Cell,MLC)NAND型快閃記憶體模組(即,一個記憶胞中可儲存2個位元的快閃記憶體模組)、三階記憶胞(Triple Level Cell,TLC)NAND型快閃記憶體模組(即,一個記憶胞中可儲存3個位元的快閃記憶體模組)、四階記憶胞(Quadruple Level Cell,QLC)NAND型快閃記憶體模組(即,一個記憶胞中可儲存4個位元的快閃記憶體模組)、三維NAND型快閃記憶體模組(3D NAND flash memory module)或垂直NAND型快閃記憶體模組(Vertical NAND flash memory module)等其他快閃記憶體模組或其他具有相同特性的記憶體模組。可複寫式非揮發性記憶體模組220中的記憶胞是以陣列的方式設置。 The rewritable non-volatile memory module 220 is coupled to the storage controller 210 (memory interface control circuit 213) and used to store data written by the host system 10. The rewritable non-volatile memory module 220 can be a single level cell (SLC) NAND flash memory module (that is, a flash memory that can store 1 bit in a memory cell). Module), Multi Level Cell (MLC) NAND flash memory module (that is, a flash memory module that can store 2 bits in a memory cell), Three-level memory cell ( Triple Level Cell (TLC) NAND flash memory modules (that is, a flash memory module that can store 3 bits in a memory cell), Quadruple Level Cell (QLC) NAND flash memory modules Flash memory module (ie, a flash memory module that can store 4 bits in a memory cell), 3D NAND flash memory module, or vertical NAND flash memory Other flash memory modules such as Vertical NAND flash memory module or other memory modules with the same characteristics. The memory cells in the rewritable non-volatile memory module 220 are arranged in an array.

在本實施例中,可複寫式非揮發性記憶體模組220具有多個字元線,其中所述多個字元線的每一個字元線耦接至多個記憶胞。同一條字元線上的多個記憶胞會組成一或多個實體程式化單元。此外,多個實體程式化單元可組成一個實體單元(實體區塊或實體抹除單元)。 In this embodiment, the rewritable non-volatile memory module 220 has a plurality of character lines, and each of the plurality of character lines is coupled to a plurality of memory cells. Multiple memory cells on the same character line form one or more physical programming units. In addition, multiple physical programming units can form a physical unit (physical block or physical erase unit).

在本實施例中,是以記憶胞作為寫入(程式化)資料的最小單位。實體單元為抹除之最小單位,即,每一實體單元含有最小數目之一併被抹除之記憶胞。 In this embodiment, the memory cell is used as the smallest unit for writing (programming) data. The physical unit is the smallest unit of erasure, that is, each physical unit contains one of the smallest number of memory cells that are erased.

每一實體單元會具有多個實體子單元。實體子單元可為實體頁面(page)或是實體扇(sector)。在本實施例中,實體子單元包括資料位元區與冗餘(redundancy)位元區。資料位元區用以儲存使用者資料,而冗餘位元區用以儲存系統資料。系統資料例如為錯誤更正碼、錯誤檢查碼或元資料(Meta Data)。 Each physical unit will have multiple physical sub-units. The physical subunit can be a physical page (page) or a physical sector (sector). In this embodiment, the physical subunit includes a data bit area and a redundancy bit area. The data bit area is used to store user data, and the redundant bit area is used to store system data. The system data is, for example, error correction code, error check code, or metadata (Meta Data).

應注意的是,在本實施例中,用以記錄一實體單元的資訊的系統資料可利用該實體單元中的一或多個實體子單元來記錄,或是利用一個系統區中用以記錄所有系統資料的特定實體單元(亦稱,系統實體區塊)的一或多個實體子單元來記錄。在本實施例中,所述對應一實體單元的系統資料包括該實體單元的抹除次數值(Program erase cycle,PEC)、區塊識別碼、區塊實體轉邏輯映射表等資訊。 It should be noted that, in this embodiment, the system data used to record the information of a physical unit can be recorded by one or more physical subunits in the physical unit, or can be recorded in a system area for recording all One or more physical sub-units of a specific physical unit (also known as a system physical block) of the system data are recorded. In this embodiment, the system data corresponding to a physical unit includes information such as a program erase cycle (PEC) of the physical unit, a block identification code, and a block physical to logic mapping table.

圖3A是根據本發明的一實施例所繪示的系統實體區塊的架構示意圖。請參照圖3A,在本實施例中,一個系統實體區塊(如,第一系統實體區塊SB(1))可具有各自屬於多個平面(如,Plane(1)~Plane(M))的多個實體頁面(亦稱,系統實體頁面),如,屬於平面Plane(1)的系統實體頁面Page(1.1)、(1.2)~(1.P);屬於平面Plane(M)的系統實體頁面Page(M.1)、(M.2)~(M.P)。M表示一個系統實體區塊所具有的平面的總數量,為大於1的正整數;P表示每個平面所具有的系統實體頁面的總數量,為正整數。此外,每個系統實體頁面用以儲存多個碼字,並且每個碼字對應至一個系統實體位址。例如,系統實體頁面Page(1.1)可依序儲存N個碼 字,並且所述N個碼字各自被儲存至系統實體頁面Page(1.1)的多個系統實體位址SPA(1)~SPA(N)中。N為預先設定之正整數。應注意的是,本發明並不限於上述N、P、M的具體數值,並且廠商或本領域人員可依據需求或可複寫式非揮發性記憶體模組220的硬體規格來預先設定N、P、M的具體數值。 FIG. 3A is a schematic diagram of the structure of a system physical block according to an embodiment of the invention. Please refer to FIG. 3A. In this embodiment, a system physical block (eg, the first system physical block SB(1)) may have multiple planes (eg, Plane(1)~Plane(M)). Multiple physical pages (also known as system physical pages), such as system physical pages Page(1.1), (1.2)~(1.P) belonging to Plane(1); system entities belonging to Plane(M) Page (M.1), (M.2)~(MP). M represents the total number of planes of a system physical block, which is a positive integer greater than 1, and P represents the total number of system physical pages of each plane, which is a positive integer. In addition, each system physical page is used to store multiple code words, and each code word corresponds to a system physical address. For example, the system physical page Page (1.1) can store N codes in sequence Each of the N codewords is stored in multiple system entity addresses SPA(1)~SPA(N) of the system entity page Page(1.1). N is a preset positive integer. It should be noted that the present invention is not limited to the above-mentioned specific values of N, P, and M, and manufacturers or those skilled in the art can preset N, P, and M according to requirements or the hardware specifications of the rewritable non-volatile memory module 220. The specific values of P and M.

在以下實施例中,是以一個實體區塊作為一個實體單元的範例。然而,在另一實施例中,一個實體單元亦可以是指任意數目的記憶胞組成,視實務上的需求而定。此外,必須瞭解的是,當儲存控制器211對可複寫式非揮發性記憶體模組220中的記憶胞(或實體單元)進行分組以執行對應的管理操作時,此些記憶胞(或實體單元)是被邏輯地分組,而其實際位置並未更動。 In the following embodiments, a physical block is used as an example of a physical unit. However, in another embodiment, a physical unit can also refer to any number of memory cells, depending on practical requirements. In addition, it must be understood that when the storage controller 211 groups the memory cells (or physical units) in the rewritable non-volatile memory module 220 to perform corresponding management operations, these memory cells (or physical units) Units) are logically grouped, and their actual locations have not changed.

儲存控制器210會配置多個邏輯單元給可複寫式非揮發性記憶體模組220。主機系統10是透過所配置的多個邏輯單元來存取儲存在多個實體單元中的使用者資料(所配置所述多個邏輯單元對應所述主機系統10)。在此,每一個邏輯單元可以是由一或多個邏輯位址組成。例如,邏輯單元可以是邏輯區塊(Logical Block)、邏輯頁面(Logical Page)或是邏輯扇區(Logical Sector)。一個邏輯單元可以是映射至一或多個實體單元,其中實體單元可以是一或多個實體位址、一或多個實體扇、一或多個實體程式化單元或者一或多個實體抹除單元。在本實施例中,邏輯單元為邏輯區塊,並且邏輯子單元為邏輯頁面。每一邏輯單元具有多個邏輯子單元。 The storage controller 210 allocates a plurality of logic units to the rewritable non-volatile memory module 220. The host system 10 accesses user data stored in multiple physical units through a plurality of configured logical units (the configured multiple logical units correspond to the host system 10). Here, each logical unit can be composed of one or more logical addresses. For example, the logical unit may be a logical block (Logical Block), a logical page (Logical Page) or a logical sector (Logical Sector). A logical unit can be mapped to one or more physical units, where the physical unit can be one or more physical addresses, one or more physical sectors, one or more physical programming units, or one or more physical erasures unit. In this embodiment, the logical unit is a logical block, and the logical sub-unit is a logical page. Each logic unit has multiple logic sub-units.

此外,儲存控制器210會建立邏輯轉實體位址映射表(Logical To Physical address mapping table)與實體轉邏輯位址映射表(Physical To Logical address mapping table),以記錄配置給可複寫式非揮發性記憶體模組220的邏輯單元(如,邏輯區塊、邏輯頁面或邏輯扇區)與實體單元(如,實體抹除單元、實體程式化單元、實體扇區)之間的位址映射關係。換言之,儲存控制器210可藉由邏輯轉實體位址映射表來查找一邏輯單元所映射的實體單元,並且儲存控制器210可藉由實體轉邏輯位址映射表來查找一實體單元所映射的邏輯單元。例如,主機系統10可配置多個邏輯頁面,並且所述多個邏輯頁面可被映射至多個實體頁面。 In addition, the storage controller 210 creates a logical to physical address mapping table (Logical To Physical address mapping table) and a physical to logical address mapping table (Physical To Logical address mapping table) to record the configuration to the rewritable non-volatile The address mapping relationship between logical units (eg, logical blocks, logical pages, or logical sectors) of the memory module 220 and physical units (eg, physical erase units, physical programming units, and physical sectors). In other words, the storage controller 210 can use the logical-to-physical address mapping table to find the physical unit to which a logical unit is mapped, and the storage controller 210 can use the physical-to-logical address mapping table to find the physical unit to which a physical unit is mapped. Logical unit. For example, the host system 10 may be configured with multiple logical pages, and the multiple logical pages may be mapped to multiple physical pages.

圖3B是根據本發明的一實施例所繪示的儲存區段邏輯轉實體位址映射表至系統實體區塊的示意圖。請參照圖3B,在本實施例中,處理器211更將邏輯轉實體位址映射表300分割為多個區段邏輯轉實體位址映射表(如圖3B所示的多個區段邏輯轉實體位址映射表SL2P(1)、SL2P(2)...)。本發明並不限定於從一個邏輯轉實體位址映射表所分割的所述多個區段邏輯轉實體位址映射表的總數量。此外,每一個區段邏輯轉實體位址映射表所記錄的多個邏輯位址及所對應的多個實體位址的總數量也可被預先設定,並且本發明不限於此。例如,在本實施例中,一個區段邏輯轉實體位址映射表(如,區段邏輯轉實體位址映射表SL2P(1))用以記錄1024個邏輯位址(如,邏輯位址LA(0)~(1023))所映射的1024個實體位址(如,實體位址“PA(XXXX)”~“PA(XYXX)”)。然 而,在其他實施例中,每一個區段邏輯轉實體位址映射表所記錄的邏輯位址及實體位址的總數量也可大於或小於1024個。 FIG. 3B is a schematic diagram illustrating a mapping table from logical to physical address of a storage section to a system physical block according to an embodiment of the present invention. Referring to FIG. 3B, in this embodiment, the processor 211 further divides the logical-to-physical address mapping table 300 into a plurality of section logical-to-physical address mapping tables (as shown in FIG. 3B). Physical address mapping table SL2P(1), SL2P(2)...). The present invention is not limited to the total number of logical-to-physical address mapping tables divided from one logical-to-physical address mapping table. In addition, the total number of multiple logical addresses and corresponding multiple physical addresses recorded in the logical-to-physical address mapping table of each section can also be preset, and the present invention is not limited to this. For example, in this embodiment, a sector logic-to-physical address mapping table (eg, sector logic-to-physical address mapping table SL2P(1)) is used to record 1024 logical addresses (eg, logical address LA (0)~(1023)) are mapped to 1024 physical addresses (for example, physical addresses "PA(XXXX)"~"PA(XYXX)"). Of course However, in other embodiments, the total number of logical addresses and physical addresses recorded in the logical-to-physical address mapping table of each sector may be greater than or less than 1024.

此外,在本實施例中,當一個邏輯位址所映射的實體位址被改動時,處理器211可對應地更新維護在緩衝記憶體216中的所述邏輯位址所屬的區段邏輯轉實體位址映射表中所記錄的對應所述邏輯位址的實體位址的資訊/條目。在另一實施例中,反應於一個區段邏輯轉實體位址映射表被更新,處理器211更會將對應至所述區段邏輯轉實體位址映射表的一個更新標記的數值從第一數值(如,“0”)調整為第二數值(如,“1”)。藉此,處理器211可根據更新標記來識別出在緩衝記憶體216中已經被更新過的一或多個區段邏輯轉實體位址映射表。如此一來,在一些特定條件(如,執行正常關閉操作時,或判定儲存裝置已經閒置一段預定時間)下,處理器211可經由更新標記來識別出已被更新過的一或多個區段邏輯轉實體位址映射表,並且僅儲存於緩衝記憶體216中的已被更新過的一或多個區段邏輯轉實體位址映射表至可複寫式非揮發性記憶體模組220中的系統實體區塊(如,箭頭A31所示),以備份已被更新過的所述一或多個區段邏輯轉實體位址映射表,進而避免因去備份沒有被更新過的其他區段邏輯轉實體位址映射表所導致的時間/空間耗費。 In addition, in this embodiment, when the physical address mapped by a logical address is changed, the processor 211 can correspondingly update the logical conversion entity of the section to which the logical address belongs and maintained in the buffer memory 216 The information/entry corresponding to the physical address of the logical address recorded in the address mapping table. In another embodiment, in response to a segment logical-to-physical address mapping table is updated, the processor 211 further changes the value of an update flag corresponding to the segment logical-to-physical address mapping table from the first The value (for example, "0") is adjusted to the second value (for example, "1"). In this way, the processor 211 can identify one or more segment logical to physical address mapping tables that have been updated in the buffer memory 216 according to the update flag. In this way, under certain conditions (for example, when performing a normal shutdown operation, or determining that the storage device has been idle for a predetermined period of time), the processor 211 can identify one or more sections that have been updated through the update flag Logical-to-physical address mapping table, and only one or more segments of the updated logical-to-physical address mapping table stored in the buffer memory 216 to the rewritable non-volatile memory module 220 The system physical block (as shown by arrow A31) to back up the one or more sector logic to physical address mapping tables that have been updated to avoid backing up other sector logic that has not been updated. The time/space cost caused by the conversion of the physical address mapping table.

在本實施例中,錯誤檢查與校正電路214是耦接至處理器211並且用以執行錯誤檢查與校正程序以確保資料的正確性。具體來說,當處理器211從主機系統10中接收到寫入指令時,錯 誤檢查與校正電路214會為對應此寫入指令的資料產生對應的錯誤更正碼(error correcting code,ECC)及/或錯誤檢查碼(error detecting code,EDC),並且處理器211會將對應此寫入指令的資料與對應的錯誤更正碼及/或錯誤檢查碼寫入至可複寫式非揮發性記憶體模組220中。之後,當處理器211從可複寫式非揮發性記憶體模組220中讀取資料時會同時讀取此資料對應的錯誤更正碼及/或錯誤檢查碼,並且錯誤檢查與校正電路214會依據此錯誤更正碼及/或錯誤檢查碼對所讀取的資料執行錯誤檢查與校正程序。 In this embodiment, the error checking and correcting circuit 214 is coupled to the processor 211 and used to perform error checking and correcting procedures to ensure the correctness of the data. Specifically, when the processor 211 receives a write command from the host system 10, the error The error checking and correction circuit 214 will generate corresponding error correcting code (ECC) and/or error detecting code (EDC) for the data corresponding to the write command, and the processor 211 will correspond to this The data of the write command and the corresponding error correction code and/or error check code are written into the rewritable non-volatile memory module 220. After that, when the processor 211 reads data from the rewritable non-volatile memory module 220, it will also read the error correction code and/or error check code corresponding to the data, and the error check and correction circuit 214 will follow This error correction code and/or error check code performs error checking and correction procedures on the read data.

在一實施例中,儲存控制器210還包括緩衝記憶體216與電源管理電路217。緩衝記憶體216例如是靜態隨機存取記憶體、動態隨機存取記憶體或其他適合的高速記憶體。緩衝記憶體216是耦接至處理器211並且用以暫存來自於主機系統10的資料與指令、來自於可複寫式非揮發性記憶體模組220的資料或其他用以管理儲存裝置20的系統資料(如,多個區段邏輯轉實體位址映射表、區塊實體轉邏輯位址映射表、區段映射表清單、映射表位圖、映射表載入指令佇列等),以讓處理器211可快速地從緩衝記憶體216中存取所述資料、指令或系統資料。電源管理電路217是耦接至處理器211並且用以控制儲存裝置20的電源。 In an embodiment, the storage controller 210 further includes a buffer memory 216 and a power management circuit 217. The buffer memory 216 is, for example, a static random access memory, a dynamic random access memory, or other suitable high-speed memory. The buffer memory 216 is coupled to the processor 211 and used to temporarily store data and instructions from the host system 10, data from the rewritable non-volatile memory module 220, or other storage devices 20 System data (such as multiple section logic to physical address mapping table, block entity to logical address mapping table, section mapping table list, mapping table bitmap, mapping table load command queue, etc.) to allow The processor 211 can quickly access the data, instructions or system data from the buffer memory 216. The power management circuit 217 is coupled to the processor 211 and used to control the power of the storage device 20.

在本實施例中,映射表管理電路單元215包括映射表管理電路單元2151與映射表載入管理電路2152。所述映射表管理電路單元215用以管理對應可複寫式非揮發性記憶體模組220的邏輯轉實體位址映射表(或多個區段邏輯轉實體位址映射表)的資 訊。映射表管理電路單元215各部件的運作也可代表映射表管理電路單元215的運作。以下利用圖2來說明映射表管理電路單元215的功用以及對應的本實施例所提供的記憶體管理方法。 In this embodiment, the mapping table management circuit unit 215 includes a mapping table management circuit unit 2151 and a mapping table loading management circuit 2152. The mapping table management circuit unit 215 is used to manage the data corresponding to the logical-to-physical address mapping table (or multiple sector logical-to-physical address mapping tables) of the rewritable non-volatile memory module 220 News. The operations of the components of the mapping table management circuit unit 215 may also represent the operations of the mapping table management circuit unit 215. The function of the mapping table management circuit unit 215 and the corresponding memory management method provided in this embodiment are described below using FIG. 2.

圖2是根據本發明的一實施例所繪示的記憶體管理方法的流程圖。請參照圖2,在步驟S210中,處理器211用以維護多個區段邏輯轉實體位址映射(Segment Logical To Physical addresses mapping,SL2P)表於緩衝記憶體216中,其中所述多個SL2P表各自用以記錄多個邏輯位址以及多個實體位址之間的映射關係,其中所述多個實體位址對應至可複寫式非揮發性記憶體模組的多個實體頁面中的一部分,並且所述多個邏輯位址對應至被配置給主機系統的多個邏輯頁面中的一部分(如,圖3B所示)。 Fig. 2 is a flowchart of a memory management method according to an embodiment of the invention. Please refer to FIG. 2, in step S210, the processor 211 is configured to maintain a plurality of segment logical to physical address mapping (Segment Logical To Physical addresses mapping, SL2P) tables in the buffer memory 216, wherein the plurality of SL2P Each table is used to record the mapping relationship between multiple logical addresses and multiple physical addresses, where the multiple physical addresses correspond to a part of the multiple physical pages of the rewritable non-volatile memory module , And the multiple logical addresses correspond to a part of multiple logical pages configured to the host system (for example, as shown in FIG. 3B).

接著,映射表管理電路單元215(或映射表清單管理電路2151)用以維護一區段映射表清單(Segment Mapping Table List,SMT清單)於所述緩衝記憶體216中,其中所述SMT清單包括多個條目,其中所述多個條目分別對應所述多個SL2P表,並且所述多個條目各自包括系統區塊識別碼以及對應所述系統區塊識別碼的系統實體區塊中的系統實體位址。 Next, the mapping table management circuit unit 215 (or the mapping table list management circuit 2151) is used to maintain a segment mapping table list (Segment Mapping Table List, SMT list) in the buffer memory 216, wherein the SMT list includes Multiple entries, wherein the multiple entries respectively correspond to the multiple SL2P tables, and each of the multiple entries includes a system block identification code and a system entity in the system entity block corresponding to the system block identification code Address.

具體來說,在本實施例中。每當處理器211將一個SL2P表寫入至可複寫式非揮發性記憶體模組220中的一個系統實體區塊的一個系統實體位址時,映射表管理電路單元215會記錄對應所述系統實體區塊的資訊(如,系統區塊識別碼)以及對應所述 系統實體位址的資訊至所述SMT清單300。如,在步驟S230中,反應於所述多個SL2P表中的多個第一SL2P表被儲存至所述可複寫式非揮發性記憶體模組中的多個第一系統實體位址,映射表管理電路單元215(或映射表清單管理電路2151)記錄所述多個第一系統實體位址至所述SMT清單的所述多個條目中對應所述多個第一SL2P表的多個第一條目 Specifically, in this embodiment. Whenever the processor 211 writes an SL2P table to a system physical address of a system physical block in the rewritable non-volatile memory module 220, the mapping table management circuit unit 215 records the corresponding system The information of the physical block (such as the system block ID) and the corresponding The information of the system physical address is sent to the SMT list 300. For example, in step S230, the plurality of first SL2P tables reflected in the plurality of SL2P tables are stored to the plurality of first system physical addresses in the rewritable non-volatile memory module, and map The table management circuit unit 215 (or the mapping table list management circuit 2151) records the plurality of first system physical addresses to the plurality of entries of the plurality of first SL2P tables in the SMT list. One entry

請參照圖3B,舉例來說,如箭頭A31所示,假設處理器寫入區段邏輯轉實體位址映射表SL2P(1)至系統實體區塊SB(1)的系統實體頁面Page(1.1)中的系統實體位址SPA(1)中。如箭頭A42所示,在區段邏輯轉實體位址映射表SL2P(1)被寫入至系統實體區塊SB(1)的系統實體頁面Page(1.1)中的系統實體位址SPA(1)後,映射表管理電路單元215可辨識相關於所述系統實體位址SPA(1)的資訊,如,“system block(1),plane(1),page(1.1),SPA(1)”或“B1,PL1,PG1,CD1”,所述資訊的各個內容分別表示:系統實體區塊識別碼(System Block ID),平面識別碼(Plane ID),系統實體頁面識別碼(Page ID)以及碼字順序識別碼(Codeword ID)。所述映射表管理電路單元215(或處理器211)可藉由所述資訊中的系統實體區塊識別碼定位所述區段邏輯轉實體位址映射表SL2P(1)的儲存位置。所述資訊會經由映射表管理電路單元215(或處理器211)被記錄至SMT清單中對應至所述區段邏輯轉實體位址映射表SL2P(1)的條目。應注意的是,本發明並不限定於相關於用以儲存SL2P表的系統實體位址的資訊的具體格式/態樣。 Please refer to FIG. 3B. For example, as shown by arrow A31, suppose the processor writes the segment logic to the physical address mapping table SL2P(1) to the system physical page Page(1.1) of the system physical block SB(1) The system entity address in SPA(1). As indicated by arrow A42, the logical to physical address mapping table SL2P(1) is written to the system physical address SPA(1) in the system physical page Page(1.1) of the system physical block SB(1) Afterwards, the mapping table management circuit unit 215 can identify the information related to the system physical address SPA(1), such as "system block(1), plane(1), page(1.1), SPA(1)" or "B1, PL1, PG1, CD1", each content of the information respectively represents: System Block ID, Plane ID, Page ID and Code Codeword ID. The mapping table management circuit unit 215 (or the processor 211) can locate the storage location of the segment logical-to-physical address mapping table SL2P(1) according to the system entity block identification code in the information. The information is recorded in the SMT list through the mapping table management circuit unit 215 (or the processor 211) to the entry corresponding to the segment logical to physical address mapping table SL2P(1). It should be noted that the present invention is not limited to the specific format/aspect of information related to the physical address of the system used to store the SL2P table.

接著,在步驟S240中,處理器211儲存所述SMT清單至所述可複寫式非揮發性記憶體模組220中。具體來說,在一些特定條件(如,執行正常關閉操作時,或判定儲存裝置已經閒置一段預定時間)下,處理器211可儲存所述SMT清單至所述可複寫式非揮發性記憶體模組220的預先設定的特定的系統實體位址/系統實體區塊中(在所有的區段邏輯轉實體映射表皆已備份至所述可複寫式非揮發性記憶體模組220後)。此外,在另一實施例中,當儲存裝置20發生不正常斷電事件時,處理器211也可將緩衝記憶體216中的SMT清單強制儲存至所述可複寫式非揮發性記憶體模組220的所述特定的系統實體位址/系統實體區塊中。如此一來,在儲存裝置20開啟時或儲存裝置20執行不正常斷電恢復操作時,映射表管理電路單元215(或映射表載入管理電路2152)可從所述特定的系統實體位址/系統實體區塊中讀取所儲存的最新的SMT清單。接著,映射表管理電路單元215(或映射表載入管理電路2152)可根據所述SMT清單產生一映射表載入指令佇列,以經由依序執行所產生的所述映射表載入指令佇列中的多個映射表載入指令來載入多個SL2P表至緩衝記憶體216(從所述可複寫式非揮發性記憶體模組220讀取所述多個SL2P表至緩衝記憶體216)。所載入的所述多個SL2P表可被組合為一個完整的對應所述可複寫式非揮發性記憶體模組220的邏輯轉實體位址映射表。 Then, in step S240, the processor 211 stores the SMT list in the rewritable non-volatile memory module 220. Specifically, under some specific conditions (such as performing a normal shutdown operation, or determining that the storage device has been idle for a predetermined period of time), the processor 211 may store the SMT list in the rewritable non-volatile memory model In the preset specific system physical address/system physical block of the group 220 (after all the segment logical to physical mapping tables have been backed up to the rewritable non-volatile memory module 220). In addition, in another embodiment, when an abnormal power-off event occurs in the storage device 20, the processor 211 can also forcefully store the SMT list in the buffer memory 216 to the rewritable non-volatile memory module 220 in the specific system entity address/system entity block. In this way, when the storage device 20 is turned on or the storage device 20 performs an abnormal power-off recovery operation, the mapping table management circuit unit 215 (or the mapping table load management circuit 2152) can obtain the specific system physical address/ Read the latest SMT list stored in the system entity block. Then, the mapping table management circuit unit 215 (or the mapping table load management circuit 2152) may generate a mapping table load command queue according to the SMT list, so as to execute the generated mapping table load command queue in sequence. Load a plurality of mapping table instructions in the row to load a plurality of SL2P tables to the buffer memory 216 (read the plurality of SL2P tables from the rewritable non-volatile memory module 220 to the buffer memory 216 ). The loaded SL2P tables can be combined into a complete logical to physical address mapping table corresponding to the rewritable non-volatile memory module 220.

圖4是習知的載入多個區段邏輯轉實體位址映射表的示意圖。請參照圖4,假設邏輯轉實體位址映射表被分割為多個區段 邏輯轉實體位址映射表SL2P(1)~SL2P(6),系統實體區塊B1、B2中所儲存的有效的多個SL2P表(如圖4中的灰色區塊所示的區段邏輯轉實體位址映射表SL2P(1)~SL2P(6)),並且區段映射表清單SMT1的多個條目也記錄了用以儲存區段邏輯轉實體位址映射表SL2P(1)~SL2P(6)的系統實體位址的資訊。應注意的是,區段映射表清單SMT1的多個條目的順序被設定為區段邏輯轉實體位址映射表SL2P(1)~SL2P(6)於所屬的邏輯轉實體位址映射表的排列順序。如,區段映射表清單SMT1的第一個條目對應至邏輯轉實體位址映射表的第一個區段邏輯轉實體位址映射表SL2P(1)。又例如,區段映射表清單SMT1的最後一個條目對應至邏輯轉實體位址映射表的最後一個區段邏輯轉實體位址映射表SL2P(6)。 FIG. 4 is a schematic diagram of a conventional mapping table for loading a logical to physical address of multiple sectors. Please refer to Figure 4, assuming that the logical to physical address mapping table is divided into multiple sections The logical to physical address mapping table SL2P(1)~SL2P(6), the effective multiple SL2P tables stored in the system physical blocks B1 and B2 (the logical conversion of the section shown in the gray block in Figure 4) Physical address mapping table SL2P(1)~SL2P(6)), and multiple entries in the section mapping table list SMT1 are also recorded to store the logical to physical address mapping table SL2P(1)~SL2P(6 ) System physical address information. It should be noted that the order of the multiple entries in the section mapping table list SMT1 is set as the arrangement of the section logical-to-physical address mapping table SL2P(1)~SL2P(6) in the corresponding logical-to-physical address mapping table order. For example, the first entry of the section mapping table list SMT1 corresponds to the first section logical-to-physical address mapping table SL2P(1) of the logical-to-physical address mapping table. For another example, the last entry of the section mapping table list SMT1 corresponds to the last section logic-to-physical address mapping table SL2P(6) of the logical-to-physical address mapping table.

一般來說,如箭頭A41所示,傳統作法為,處理器211依據每個條目所記錄的區段邏輯轉實體位址映射表SL2P(1)~SL2P(6)各自的系統實體位址,直接產生多個對應的單平面映射表載入指令(經由單平面讀取的方式來讀取每一個SL2P表)。接著,處理器211依序執行所產生的所述多個單平面映射表載入指令,以從系統實體區塊B1、B2中讀取對應的區段邏輯轉實體位址映射表SL2P(1)~SL2P(6)至緩衝記憶體216。此外,所述多個區段邏輯轉實體位址映射表SL2P(1)~SL2P(6)可被組合成一整體的邏輯轉實體位址映射表310。 Generally speaking, as indicated by arrow A41, the traditional method is that the processor 211 converts the physical address of the respective system into the physical address mapping table SL2P(1)~SL2P(6) according to the logical segment recorded in each entry, and directly Generate multiple corresponding single-plane mapping table load instructions (read each SL2P table via a single-plane read method). Then, the processor 211 sequentially executes the generated multiple single-plane mapping table load instructions to read the corresponding segment logical-to-physical address mapping table SL2P(1) from the system physical blocks B1 and B2. ~SL2P(6) to the buffer memory 216. In addition, the multiple segment logical-to-physical address mapping tables SL2P(1)-SL2P(6) can be combined into a whole logical-to-physical address mapping table 310.

然而,在圖4的例子中,由於所產生的所述多個單平面映射表載入指令是經由單平面讀取的方式而非利用多平面讀取的 方式來讀取對應的一個SL2P表,整體的載入區段邏輯轉實體位址映射表SL2P(1)~SL2P(6)至緩衝記憶體216的效率是不高的。 However, in the example of FIG. 4, since the multiple single-plane mapping table load instructions generated are read through a single-plane instead of using a multi-plane read To read a corresponding SL2P table, the overall efficiency of loading the segment logical to physical address mapping table SL2P(1)~SL2P(6) to the buffer memory 216 is not high.

基此,本發明的一實施例中,所述映射表管理電路單元215(或映射表載入管理電路2152)可根據SMT清單中所記錄的多個條目,以對應地產生單平面映射表載入指令(Single plane mapping table loading command,SPLC)或多平面映射表載入指令(Multiple planes mapping table loading command,MPLC)。所述單平面映射表載入指令用以指示經由單平面讀取的方式,從對應的系統實體位址讀取所儲存的一個SL2P表。所述多平面映射表載入指令用以指示經由多平面讀取的方式,一同從對應的分別屬於M個平面的多個系統實體位址讀取所儲存的多個SL2P表。M為大於1的正整數,用以表示系統實體區塊所具有的多個平面的總數量。如此一來,可經由執行所產生的多平面映射表載入指令來更有效率地載入對應的多個SL2P表。以下利用多個圖式來進行說明。 Based on this, in an embodiment of the present invention, the mapping table management circuit unit 215 (or the mapping table load management circuit 2152) can correspondingly generate a single-plane mapping table load based on multiple entries recorded in the SMT list. Input command (Single plane mapping table loading command, SPLC) or multiple planes mapping table loading command (MPLC). The single-plane mapping table load instruction is used to instruct to read a stored SL2P table from the corresponding system physical address via a single-plane reading method. The multi-plane mapping table load instruction is used to instruct the read method via multi-plane to read the stored multiple SL2P tables from corresponding multiple system physical addresses respectively belonging to M planes. M is a positive integer greater than 1, used to represent the total number of multiple planes of the system physical block. In this way, the corresponding multiple SL2P tables can be loaded more efficiently by executing the generated multi-plane mapping table load instruction. The following uses a plurality of drawings for description.

圖5A是根據本發明的一實施例所繪示的根據區段映射表清單來產生映射表載入指令佇列的示意圖。請參照圖5A,假設每個系統實體區塊具有2個平面(M=2),並且每個系統實體頁面可儲存2個SL2P表(N=2)。此外,假設邏輯轉實體位址映射表被分割為多個區段邏輯轉實體位址映射表SL2P(1)~SL2P(6),系統實體區塊B1、B2中所儲存的有效的多個SL2P表如圖5A中的灰色區塊所示的區段邏輯轉實體位址映射表SL2P(1)~SL2P(6),並且系統實體區塊B1、B2中所儲存的有效的多個SL2P表(如圖5A中的灰 色區塊所示的區段邏輯轉實體位址映射表SL2P(1)~SL2P(6)),並且映射表管理電路單元215(或映射表清單管理電路2151)也根據所儲存的區段邏輯轉實體位址映射表SL2P(1)~SL2P(6)產生了圖5A中的區段映射表清單SMT1。此外,所述區段映射表清單SMT1被儲存在可複寫式非揮發性記憶體模組220中的預先設定的特定系統實體區塊的特定系統實體位址中。 5A is a schematic diagram of generating a mapping table load command queue according to a section mapping table list according to an embodiment of the present invention. Referring to FIG. 5A, it is assumed that each system physical block has 2 planes (M=2), and each system physical page can store 2 SL2P tables (N=2). In addition, assuming that the logical-to-physical address mapping table is divided into multiple sections, the logical-to-physical address mapping table SL2P(1)~SL2P(6), the effective multiple SL2Ps stored in the system entity blocks B1 and B2 Table is shown in the gray block in Figure 5A. The logical to physical address mapping table SL2P(1)~SL2P(6), and the effective multiple SL2P tables stored in the system physical blocks B1 and B2 ( As shown in Figure 5A The section logic shown in the color block is converted to the physical address mapping table SL2P(1)~SL2P(6)), and the mapping table management circuit unit 215 (or the mapping table list management circuit 2151) is also based on the stored section logic The entity address mapping tables SL2P(1)~SL2P(6) produce the section mapping table list SMT1 in FIG. 5A. In addition, the segment mapping table list SMT1 is stored in a specific system physical address of a predetermined specific system physical block in the rewritable non-volatile memory module 220.

在此例子中,反應於儲存裝置20的開啟或處理器211執行不正常斷電恢復操作,所述映射表管理電路單元215(或映射表載入管理電路2152)從所述特定系統實體區塊的所述特定系統實體位址中讀取所述區段映射表清單SMT1,並且所述映射表管理電路單元215(或映射表載入管理電路2152)根據所述區段映射表清單SMT1產生所述映射表載入指令佇列(Mapping table loading command queue)LCQ1。 In this example, in response to the storage device 20 being turned on or the processor 211 performing an abnormal power-off recovery operation, the mapping table management circuit unit 215 (or the mapping table load management circuit 2152) obtains data from the specific system entity block The section mapping table list SMT1 is read from the specific system physical address, and the mapping table management circuit unit 215 (or mapping table load management circuit 2152) generates all the data according to the section mapping table list SMT1 The mapping table loading command queue (Mapping table loading command queue) LCQ1.

具體來說,在本實施例中,在所述根據所述SMT清單產生所述映射表載入指令佇列的運作中,映射表管理電路單元215(或映射表載入管理電路2152)辨識區段映射表清單SMT1的所述多個條目的所述多個系統實體位址各自所屬的平面為M個平面中的其中之一。例如,映射表管理電路單元215(或映射表載入管理電路2152)根據分別對應至區段邏輯轉實體位址映射表SL2P(1)~SL2P(6)的所述多個條目,辨識出儲存在可複寫式非揮發性記憶體模組220中的區段邏輯轉實體位址映射表SL2P(1)、SL2P(2)、SL2P(3)、SL2P(4)、SL2P(5)、SL2P(6)分別屬於系統實 體區塊B1的平面PL1、系統實體區塊B2的平面PL1、系統實體區塊B1的平面PL1、系統實體區塊B1的平面PL2、系統實體區塊B1的平面PL2、系統實體區塊B1的平面PL1以及系統實體區塊B1的平面PL1。 Specifically, in this embodiment, in the operation of generating the mapping table load instruction queue according to the SMT list, the mapping table management circuit unit 215 (or the mapping table load management circuit 2152) identifies the area The plane to which the plurality of system entity addresses of the plurality of entries of the segment mapping table list SMT1 belong is one of M planes. For example, the mapping table management circuit unit 215 (or the mapping table loading management circuit 2152) recognizes the storage based on the multiple entries corresponding to the segment logical-to-physical address mapping tables SL2P(1)~SL2P(6) respectively. The segment logic-to-physical address mapping table in the rewritable non-volatile memory module 220 SL2P(1), SL2P(2), SL2P(3), SL2P(4), SL2P(5), SL2P( 6) Respectively belong to the system The plane PL1 of the volume block B1, the plane PL1 of the system entity block B2, the plane PL1 of the system entity block B1, the plane PL2 of the system entity block B1, the plane PL2 of the system entity block B1, the plane PL2 of the system entity block B1 The plane PL1 and the plane PL1 of the system physical block B1.

接著,映射表管理電路單元215(或映射表載入管理電路2152)根據所述多個條目的排列順序,判斷鄰接在一第一目標條目後是否有一或多個第二目標條目,其中所述第一目標條目所對應的第一系統實體位址與所述一或多個第二目標條目所對應的一或多個第二系統實體位址分別屬於一個系統實體區塊的M個平面的M個實體頁面。 Next, the mapping table management circuit unit 215 (or the mapping table loading management circuit 2152) determines whether there are one or more second target entries adjacent to the first target entry according to the arrangement order of the multiple entries. The first system physical address corresponding to the first target entry and the one or more second system physical addresses corresponding to the one or more second target entries belong to M planes of a system physical block. Physical pages.

反應於判定鄰接在所述第一目標條目後沒有所述一或多個第二目標條目,所述映射表管理電路單元記錄至所述第一系統實體位址至一個所述單平面映射表載入指令 In response to determining that there is no one or more second target entries adjacent to the first target entry, the mapping table management circuit unit records the physical address of the first system to a single-plane mapping table. Instruction

例如,假設第一目標條目為區段映射表清單SMT1的對應SL2P(1)的條目,映射表管理電路單元215(或映射表載入管理電路2152)判定鄰接在對應SL2P(1)的條目後的對應SL2P(2)的條目所記錄的系統實體位址(如,“B2,PL1,PG1,CD1”)與對應SL2P(1)的條目所記錄的第一系統實體位址(如,“B1,PL1,PG1,CD1”)並非屬於同一個系統實體區塊的2個平面,映射表管理電路單元215(或映射表載入管理電路2152)判定對應SL2P(2)的條目並非第二目標條目,並且直接記錄對應SL2P(1)的條目所記錄的第一系統實體位址(如,“B1,PL1,PG1,CD1”)至映射表載入指令佇列 LCQ1中的一個單平面映射表載入指令(如,單平面映射表載入指令SPLC:“B1,PL1,PG1,CD1”)。 For example, assuming that the first target entry is an entry corresponding to SL2P(1) in the section mapping table list SMT1, the mapping table management circuit unit 215 (or the mapping table loading management circuit 2152) determines that it is adjacent to the entry corresponding to SL2P(1) The system entity address recorded in the entry corresponding to SL2P(2) (e.g., "B2, PL1, PG1, CD1") and the first system entity address recorded in the entry corresponding to SL2P(1) (e.g., "B1 ,PL1,PG1,CD1”) are not two planes belonging to the same system entity block, the mapping table management circuit unit 215 (or the mapping table load management circuit 2152) determines that the entry corresponding to SL2P(2) is not the second target entry , And directly record the first system entity address (such as "B1, PL1, PG1, CD1") recorded in the entry corresponding to SL2P(1) to the mapping table load instruction queue A single-plane mapping table load instruction in LCQ1 (for example, a single-plane mapping table load instruction SPLC: "B1, PL1, PG1, CD1").

反應於判定鄰接在所述第一目標條目後有所述一或多個第二目標條目,所述映射表管理電路單元記錄至所述第一系統實體位址與所述一或多個第二系統實體位址至一個所述多平面映射表載入指令。 In response to determining that the one or more second target entries are adjacent to the first target entry, the mapping table management circuit unit records the first system entity address and the one or more second target entries The system entity addresses to one of the multi-plane mapping table load instructions.

例如,假設第一目標條目為區段映射表清單SMT1的對應SL2P(3)的條目,映射表管理電路單元215(或映射表載入管理電路2152)判定鄰接在對應SL2P(3)的條目後的對應SL2P(4)的條目所記錄的系統實體位址(如,“B1,PL2,PG1,CD2”)與對應SL2P(3)的條目所記錄的第一系統實體位址(如,“B1,PL1,PG1,CD2”)屬於同一個系統實體區塊的2個平面,映射表管理電路單元215(或映射表載入管理電路2152)判定對應SL2P(4)的條目為對應至第一目標條目的第二目標條目,並且判定對應SL2P(4)的條目所記錄的系統實體位址為第二系統實體位址。此外,映射表管理電路單元215(或映射表載入管理電路2152)更記錄第一系統實體位址(如,“B1,PL1,PG1,CD2”)與第二系統實體位址(如,“B1,PL1,PG1,CD2”)至映射表載入指令佇列LCQ1中的一個多平面映射表載入指令(如,多平面映射表載入指令MPLC:“B1,PL1,PG1,CD2”,“B1,PL2,PG1,CD2”)。應注意的是,由於對應SL2P(5)的條目所記錄的系統實體位址與第二系統實體位址非屬於同一個系統實體頁面,對應SL2P(5)的條目所記錄的系統實體位址與第二系統實體位址 不能被多平面讀取操作所一同讀取,進而使映射表管理電路單元215(或映射表載入管理電路2152)判定對應SL2P(5)的條目並非對應第一目標條目的第二目標條目。 For example, assuming that the first target entry is an entry corresponding to SL2P(3) in the section mapping table list SMT1, the mapping table management circuit unit 215 (or the mapping table loading management circuit 2152) determines that it is adjacent to the entry corresponding to SL2P(3) The system entity address recorded in the entry corresponding to SL2P(4) (e.g., "B1, PL2, PG1, CD2") and the first system entity address recorded in the entry corresponding to SL2P(3) (e.g., "B1 ,PL1,PG1,CD2”) belong to two planes of the same system entity block, the mapping table management circuit unit 215 (or the mapping table loading management circuit 2152) determines that the entry corresponding to SL2P(4) corresponds to the first target The second target entry of the entry, and it is determined that the system entity address recorded in the entry corresponding to SL2P(4) is the second system entity address. In addition, the mapping table management circuit unit 215 (or the mapping table load management circuit 2152) further records the first system physical address (e.g., "B1, PL1, PG1, CD2") and the second system physical address (e.g., " B1,PL1,PG1,CD2") to a multi-plane mapping table load instruction in the mapping table load instruction queue LCQ1 (e.g., multi-plane mapping table load instruction MPLC: "B1,PL1,PG1,CD2", "B1, PL2, PG1, CD2"). It should be noted that since the system entity address recorded in the entry corresponding to SL2P(5) and the second system entity address do not belong to the same system entity page, the system entity address recorded in the entry corresponding to SL2P(5) is Physical address of the second system It cannot be read together by the multi-plane read operation, and the mapping table management circuit unit 215 (or the mapping table loading management circuit 2152) determines that the entry corresponding to SL2P(5) is not the second target entry corresponding to the first target entry.

依此類推,在圖5A的例子中,映射表管理電路單元215(或映射表載入管理電路2152)最終依據區段映射表清單SMT1產生了所述映射表載入指令佇列LCQ1。 By analogy, in the example of FIG. 5A, the mapping table management circuit unit 215 (or the mapping table load management circuit 2152) finally generates the mapping table load command queue LCQ1 according to the section mapping table list SMT1.

另一方面,在又一實施例中,在所述根據所述SMT清單產生所述映射表載入指令佇列的運作中,映射表管理電路單元215(或映射表載入管理電路2152)可直接選擇儲存在同一個系統實體區塊的分別屬於不同平面的不同系統實體頁面上的多個SL2P表來產生多平面映射表載入指令。 On the other hand, in another embodiment, in the operation of generating the mapping table load instruction queue according to the SMT list, the mapping table management circuit unit 215 (or the mapping table load management circuit 2152) may Directly select multiple SL2P tables stored in the same system entity block on different system entity pages belonging to different planes to generate a multi-plane mapping table load instruction.

詳細來說,所述映射表管理電路單元215(或映射表載入管理電路2152)辨識所述SMT清單的所述多個條目的所述多個系統實體位址各自所屬的平面為M個平面中的其中之一。所述映射表管理電路單元215(或映射表載入管理電路2152)從所述多個系統實體位址中選擇多組的M個多平面系統實體位址,其中所選擇的每一組的所述M個多平面系統實體位址分別屬於不同的所述M個平面,並且將所選擇的所述多組的所述M個多平面系統實體位址各自記錄至一個所述多平面映射表載入指令,其中M為大於1的正整數。接著,所述映射表管理電路單元215(或映射表載入管理電路2152)將所述多個系統實體位址中尚未被選擇的多個剩餘的系統實體位址各自記錄至一個所述單平面映射表載入指令。 以下利用圖5B來說明。 In detail, the mapping table management circuit unit 215 (or the mapping table load management circuit 2152) recognizes that the planes to which the multiple system entity addresses of the multiple entries of the SMT list belong are M planes. One of them. The mapping table management circuit unit 215 (or the mapping table load management circuit 2152) selects multiple groups of M multi-plane system physical addresses from the multiple system physical addresses, wherein all the selected groups of each group The M multi-plane system physical addresses belong to different M planes, and the M multi-plane system physical addresses of the selected groups are recorded in one of the multi-plane mapping tables. Input command, where M is a positive integer greater than 1. Then, the mapping table management circuit unit 215 (or the mapping table load management circuit 2152) records the remaining system physical addresses that have not been selected among the plurality of system physical addresses to one of the single planes. Mapping table load instruction. This will be explained below using FIG. 5B.

圖5B是根據本發明的又一實施例所繪示的根據區段映射表清單來產生映射表載入指令佇列的示意圖。請參照圖5B,假設每個系統實體區塊具有2個平面(M=2),並且每個系統實體頁面可儲存2個SL2P表(N=2)。此外,假設邏輯轉實體位址映射表被分割為多個區段邏輯轉實體位址映射表SL2P(1)~SL2P(6),系統實體區塊B1、B2中所儲存的有效的多個SL2P表如圖5B中的灰色區塊所示的區段邏輯轉實體位址映射表SL2P(1)~SL2P(6),並且系統實體區塊B1、B2中所儲存的有效的多個SL2P表(如圖5B中的灰色區塊所示的區段邏輯轉實體位址映射表SL2P(1)~SL2P(6)),並且映射表管理電路單元215(或映射表清單管理電路2151)也根據所儲存的區段邏輯轉實體位址映射表SL2P(1)~SL2P(6)產生了圖5B中的區段映射表清單SMT1。此外,所述區段映射表清單SMT1被儲存在可複寫式非揮發性記憶體模組220中的預先設定的特定系統實體區塊的特定系統實體位址中。 5B is a schematic diagram of generating a mapping table load command queue according to a section mapping table list according to another embodiment of the present invention. Referring to FIG. 5B, it is assumed that each system physical block has 2 planes (M=2), and each system physical page can store 2 SL2P tables (N=2). In addition, assuming that the logical-to-physical address mapping table is divided into multiple sections, the logical-to-physical address mapping table SL2P(1)~SL2P(6), the effective multiple SL2Ps stored in the system entity blocks B1 and B2 Table 5B shows the section logical to physical address mapping table SL2P(1)~SL2P(6) as shown in the gray block in Fig. 5B, and the effective multiple SL2P tables stored in the system physical blocks B1 and B2 ( The section logic-to-physical address mapping table SL2P(1)~SL2P(6) as shown in the gray block in FIG. 5B, and the mapping table management circuit unit 215 (or the mapping table list management circuit 2151) is also based on all The stored segment logical to physical address mapping tables SL2P(1)~SL2P(6) generate the segment mapping table list SMT1 in FIG. 5B. In addition, the segment mapping table list SMT1 is stored in a specific system physical address of a predetermined specific system physical block in the rewritable non-volatile memory module 220.

在此例子中,映射表管理電路單元215(或映射表載入管理電路2152)可掃描區段映射表清單SMT1,以找出位於同一個系統區塊的分別屬於2個平面的2個系統實體頁面的多個SL2P表,以將所找到的所述多個SL2P表記錄至一個多平面映射表載入指令。例如,根據圖5B中的區段映射表清單SMT1,映射表管理電路單元215(或映射表載入管理電路2152)判定對應區段邏輯轉實體位址映射表SL2P(1)的條目所記錄的系統實體位址“B1,PL1, PG1,CD1”、對應區段邏輯轉實體位址映射表SL2P(3)的條目所記錄的系統實體位址“B1,PL1,PG1,CD2”與對應區段邏輯轉實體位址映射表SL2P(3)的條目所記錄的系統實體位址“B1,PL2,PG1,CD2”為同一個系統實體區塊中的分別屬於2個平面的2個系統實體頁面上的多個系統實體位址,並且映射表管理電路單元215(或映射表載入管理電路2152)可如圖5B箭頭所示將所述多個系統實體位址“B1,PL1,PG1,CD1”、“B1,PL1,PG1,CD2”以及“B1,PL2,PG1,CD2”一同記錄至映射表載入指令佇列LCQ2中的一個多平面映射表載入指令中(即,多平面映射表載入指令「MPLC:“B1,PL1,PG1,CD1-2”,“B1,PL2,PG1,CD2”」)。其中,多平面映射表載入指令「MPLC:“B1,PL1,PG1,CD1-2”,“B1,PL2,PG1,CD2”」用以指示經由多平面讀取操作的方式,從系統實體區塊B1同時讀取位於平面PL1的系統實體頁面PG1的第一、第二個碼字,以及位於平面PL2的系統實體頁面PG1的第二個碼字。 In this example, the mapping table management circuit unit 215 (or the mapping table load management circuit 2152) can scan the section mapping table list SMT1 to find two system entities that belong to two planes in the same system block. Multiple SL2P tables on the page to record the multiple SL2P tables found to a multi-plane mapping table load instruction. For example, according to the section mapping table list SMT1 in FIG. 5B, the mapping table management circuit unit 215 (or the mapping table load management circuit 2152) determines that the corresponding section logical to physical address mapping table SL2P(1) entry records System physical address "B1, PL1, PG1, CD1", the system physical address recorded by the entry of the corresponding section logical to physical address mapping table SL2P(3) and the corresponding section logical to physical address mapping table SL2P( The system entity addresses "B1, PL2, PG1, CD2" recorded in the entry of 3) are multiple system entity addresses on two system entity pages belonging to two planes in the same system entity block, and The mapping table management circuit unit 215 (or the mapping table loading management circuit 2152) can assign the multiple system entity addresses "B1, PL1, PG1, CD1", "B1, PL1, PG1, CD2" as shown by the arrow in FIG. 5B "And "B1, PL2, PG1, CD2" are recorded together in a multi-plane mapping table load instruction in the mapping table load instruction queue LCQ2 (ie, multi-plane mapping table load instruction "MPLC: "B1, PL1 ,PG1,CD1-2","B1,PL2,PG1,CD2""). Among them, the multi-plane mapping table load instruction "MPLC: "B1, PL1, PG1, CD1-2", "B1, PL2, PG1, CD2"" is used to instruct to read from the system physical area through the multi-plane read operation The block B1 simultaneously reads the first and second codewords of the system physical page PG1 on the plane PL1 and the second codeword of the system physical page PG1 on the plane PL2.

依此類推,映射表管理電路單元215(或映射表載入管理電路2152)可更將所述多個系統實體位址“B1,PL2,PG3,CD1”(對應區段邏輯轉實體位址映射表SL2P(5)的條目)以及“B1,PL1,PG2,CD2”(對應區段邏輯轉實體位址映射表SL2P(6)的條目)一同記錄至映射表載入指令佇列LCQ2中的一個多平面映射表載入指令中(即,多平面映射表載入指令「MPLC:“B1,PL2,PG3,CD1”,“B1,PL1,PG2,CD2”」)。 By analogy, the mapping table management circuit unit 215 (or the mapping table load management circuit 2152) can further map the multiple system physical addresses "B1, PL2, PG3, CD1" (corresponding to the sector logic to physical address mapping Table SL2P (5) entry) and "B1, PL1, PG2, CD2" (corresponding to the segment logical to entity address mapping table SL2P (6) entry) are recorded together in one of the mapping table load instruction queue LCQ2 In the multi-plane mapping table load command (ie, the multi-plane mapping table load command "MPLC: "B1, PL2, PG3, CD1", "B1, PL1, PG2, CD2"").

應注意的是,在產生多平面映射表載入指令「MPLC:“B1, PL1,PG1,CD1-2”,“B1,PL2,PG1,CD2”」以及多平面映射表載入指令「MPLC:“B1,PL2,PG3,CD1”,“B1,PL1,PG2,CD2”」後,映射表管理電路單元215(或映射表載入管理電路2152)辨識到剩餘的對應區段邏輯轉實體位址映射表SL2P(2)的條目,並且將區段邏輯轉實體位址映射表SL2P(2)的條目所記錄的系統實體位址“B2,PL1,PG1,CD1”記錄至映射表載入指令佇列LCQ2中的單平面映射表載入指令(即,多平面映射表載入指令「SPLC:“B2,PL1,PG1,CD1”」。 It should be noted that when generating the multi-plane mapping table load instruction "MPLC:" B1, PL1,PG1,CD1-2","B1,PL2,PG1,CD2"" and multi-plane mapping table loading instructions "MPLC: "B1,PL2,PG3,CD1","B1,PL1,PG2,CD2"" After that, the mapping table management circuit unit 215 (or the mapping table loading management circuit 2152) recognizes the remaining entries in the corresponding section logical to physical address mapping table SL2P(2), and converts the section logic to physical address mapping table The system physical address "B2, PL1, PG1, CD1" recorded in the entry of SL2P(2) is recorded in the single-plane mapping table load command in the mapping table load command queue LCQ2 (ie, multi-plane mapping table load Command "SPLC: "B2,PL1,PG1,CD1"".

值得一提的是,相較於圖4中的多個映射表載入指令,於圖5A、5B所說明的本發明的記憶體管理方法,可有效地減少映射表載入指令的總數量,並且可應用多平面讀取操作來加速SL2P表的載入速度。 It is worth mentioning that, compared with the multiple mapping table load instructions in FIG. 4, the memory management method of the present invention described in FIGS. 5A and 5B can effectively reduce the total number of mapping table load instructions. And can apply multi-plane read operation to accelerate the loading speed of SL2P table.

在一實施例中,映射表管理電路單元215(或映射表載入管理電路2152)更可經由多個映射表位圖來產生對應所述多個系統實體區塊的映射表載入指令佇列。 In one embodiment, the mapping table management circuit unit 215 (or the mapping table load management circuit 2152) may further generate a mapping table load instruction queue corresponding to the plurality of system physical blocks through a plurality of mapping table bitmaps .

具體來說,映射表管理電路單元215(或映射表載入管理電路2152)可根據所述SMT清單,產生一多個映射表位圖,其中所述多個映射表位圖分別對應至多個系統實體區塊。其中,對應一個系統實體區塊的一個映射表位圖記錄分別對應至所述一個系統實體區塊的多個系統實體位址的多個位元值,其中所述多個位元值各自的數值包括0或1,其中為0的所述位元值用以表示所對應的系統實體位址儲存了無效的SL2P表或無效資料,並且為1的 所述位元值用以表示所對應的系統實體位址儲存了有效的SL2P表。 Specifically, the mapping table management circuit unit 215 (or the mapping table load management circuit 2152) can generate a plurality of mapping table bitmaps according to the SMT list, wherein the plurality of mapping table bitmaps respectively correspond to multiple systems Physical block. Wherein, a mapping table bit map corresponding to a system physical block records multiple bit values corresponding to multiple system physical addresses of the one system physical block, wherein respective values of the multiple bit values Including 0 or 1, where the bit value of 0 is used to indicate that the corresponding system physical address stores invalid SL2P tables or invalid data, and is 1 The bit value is used to indicate that the corresponding system physical address stores a valid SL2P table.

此外,映射表管理電路單元215(或映射表載入管理電路2152)更可根據所述多個映射表位圖產生對應所述多個系統實體區塊的映射表載入指令佇列,其中所述映射表載入指令佇列各自具有多個映射表載入指令,其中所述多個映射表載入指令各自包括單平面映射表載入指令與多平面映射表載入指令,其中當所述儲存裝置開啟時,所述映射表管理電路單元執行所述映射表載入指令佇列,以從所述可複寫式非揮發性記憶體模組載入所述多個SL2P表至所述緩衝記憶體中。以下利用圖6~9B來說明。 In addition, the mapping table management circuit unit 215 (or the mapping table load management circuit 2152) may further generate a mapping table load instruction queue corresponding to the plurality of system physical blocks according to the plurality of mapping table bitmaps, wherein The mapping table load instruction queues each have a plurality of mapping table load instructions, wherein each of the plurality of mapping table load instructions includes a single-plane mapping table load instruction and a multi-plane mapping table load instruction, wherein when the When the storage device is turned on, the mapping table management circuit unit executes the mapping table load command queue to load the plurality of SL2P tables from the rewritable non-volatile memory module to the buffer memory Body. The following uses Figures 6-9B to illustrate.

圖6是習知的載入多個區段邏輯轉實體位址映射表的示意圖。請參照圖6,假設邏輯轉實體位址映射表被分割為多個區段邏輯轉實體位址映射表SL2P(1)~SL2P(11),並且所述多個區段邏輯轉實體位址映射表SL2P(1)~SL2P(11)被儲存至系統實體區塊B3、B4中(如圖6中的灰色區塊所示的有效的區段邏輯轉實體位址映射表SL2P(1)~SL2P(11)),並且區段映射表清單SMT2的多個條目也記錄了用以儲存區段邏輯轉實體位址映射表SL2P(1)~SL2P(11)的系統實體位址的資訊。 FIG. 6 is a schematic diagram of a conventional mapping table for loading a logical to physical address of multiple sectors. Please refer to FIG. 6, assuming that the logical-to-physical address mapping table is divided into a plurality of section logical-to-physical address mapping tables SL2P(1)~SL2P(11), and the plurality of sections are mapped Tables SL2P(1)~SL2P(11) are stored in the system physical blocks B3 and B4 (the effective segment logic to physical address mapping table SL2P(1)~SL2P shown in the gray block in Figure 6) (11)), and multiple entries in the section mapping table SMT2 also record the information used to store the system physical addresses of the section logical to physical address mapping tables SL2P(1)~SL2P(11).

一般來說,如箭頭A61所示,傳統作法為,處理器211依據每個條目所記錄的區段邏輯轉實體位址映射表SL2P(1)~SL2P(11)各自的系統實體位址,直接產生多個對應的單平面映射表載入指令(經由單平面讀取的方式來讀取每一個SL2P 表)。處理器211可依序執行所產生的所述多個單平面映射表載入指令,以從系統實體區塊B3、B4中讀取對應的區段邏輯轉實體位址映射表SL2P(1)~SL2P(11)至緩衝記憶體216。 Generally speaking, as indicated by the arrow A61, the traditional method is that the processor 211 converts the physical address of each system into the physical address mapping table SL2P(1)~SL2P(11) directly according to the segment logic recorded in each entry. Generate multiple corresponding single-plane mapping table load instructions (read each SL2P through the single-plane read method table). The processor 211 may sequentially execute the generated multiple single-plane mapping table load instructions to read the corresponding segment logic-to-physical address mapping table SL2P(1) from the system physical blocks B3 and B4. SL2P(11) to the buffer memory 216.

在本實施例中,反應於儲存裝置20的開啟或處理器211執行不正常斷電恢復操作,所述映射表管理電路單元215(或映射表載入管理電路2152)從所述特定系統實體區塊的所述特定系統實體位址中讀取所述區段映射表清單SMT2,並且所述映射表管理電路單元215(或映射表載入管理電路2152)根據所述區段映射表清單SMT2產生對應的多個映射表位圖。在另一實施例中,反應於儲存裝置20的關閉,所述映射表管理電路單元215(或映射表載入管理電路2152)根據緩衝記憶體216中的區段映射表清單SMT2產生對應多個系統實體區塊的多個映射表位圖,並且將所述多個映射表位圖分別儲存至所對應的系統實體區塊中。 In this embodiment, in response to the storage device 20 being turned on or the processor 211 performing an abnormal power-off recovery operation, the mapping table management circuit unit 215 (or the mapping table load management circuit 2152) from the specific system entity area The section mapping table list SMT2 is read from the specific system physical address of the block, and the mapping table management circuit unit 215 (or mapping table load management circuit 2152) generates according to the section mapping table list SMT2 The corresponding multiple mapping table bitmaps. In another embodiment, in response to the shutdown of the storage device 20, the mapping table management circuit unit 215 (or the mapping table load management circuit 2152) generates a plurality of corresponding sections according to the section mapping table list SMT2 in the buffer memory 216 A plurality of mapping table bitmaps of the system entity block, and the plurality of mapping table bitmaps are respectively stored in the corresponding system entity block.

圖7是根據本發明的一實施例所繪示的根據區段映射表清單來產生映射表位圖的示意圖。請參照圖7,所述映射表管理電路單元215(或映射表載入管理電路2152)可根據所述區段映射表清單SMT2辨識出儲存在系統實體區塊B3中的有效的區段邏輯轉實體位址映射表SL2P(1)、SL2P(3)、SL2P(2)、SL2P(4)、SL2P(5)、SL2P(9)、SL2P(10)、SL2P(11)的多個位置,並且如箭頭A71所示,藉由所辨識的所述多個位置來產生對應系統實體區塊B3的映射表位圖BMP_B3。所述映射表位圖BMP_B3中的多個位元值為依據PxQ的矩陣形式排列,每個位元值的數值用以表示所對應的碼 字是否為有效的,如,為0的位元值表示所對應的碼字/SL2P表為無效的(無效碼字/無效SL2P表),並且為1的位元值表示所對應的碼字/SL2P表為有效的(有效碼字/有效SL2P表)。 FIG. 7 is a schematic diagram of generating a mapping table bitmap according to a section mapping table list according to an embodiment of the present invention. Referring to FIG. 7, the mapping table management circuit unit 215 (or the mapping table load management circuit 2152) can identify the valid section logic conversion stored in the system physical block B3 according to the section mapping table list SMT2. Multiple locations of the physical address mapping table SL2P(1), SL2P(3), SL2P(2), SL2P(4), SL2P(5), SL2P(9), SL2P(10), SL2P(11), and As shown by the arrow A71, the mapping table bit map BMP_B3 corresponding to the system physical block B3 is generated by the identified positions. The multiple bit values in the mapping table bitmap BMP_B3 are arranged according to the matrix form of PxQ, and the value of each bit value is used to indicate the corresponding code Whether the word is valid, for example, a bit value of 0 indicates that the corresponding codeword/SL2P table is invalid (invalid codeword/invalid SL2P table), and a bit value of 1 indicates the corresponding codeword/ The SL2P table is valid (valid codeword/valid SL2P table).

依此類推,所述映射表管理電路單元215(或映射表載入管理電路2152)可根據所述區段映射表清單SMT2辨識出儲存在系統實體區塊B4中的有效的區段邏輯轉實體位址映射表SL2P(6)、SL2P(8)、SL2P(7)的多個位置,並且如箭頭A72所示,藉由所辨識的所述多個位置來產生對應系統實體區塊B4的映射表位圖BMP_B4。 By analogy, the mapping table management circuit unit 215 (or the mapping table load management circuit 2152) can identify the valid section logical conversion entity stored in the system entity block B4 according to the section mapping table list SMT2 Multiple locations of the address mapping table SL2P(6), SL2P(8), SL2P(7), and as shown by the arrow A72, the identified multiple locations are used to generate a mapping corresponding to the system entity block B4 The epitope map BMP_B4.

在獲得多個映射表位圖後,所述映射表管理電路單元215(或映射表載入管理電路2152)可根據所述多個映射表位圖產生對應所述多個系統實體區塊的所述映射表載入指令佇列。 After obtaining a plurality of mapping table bitmaps, the mapping table management circuit unit 215 (or mapping table loading management circuit 2152) can generate all corresponding to the plurality of system entity blocks according to the plurality of mapping table bitmaps. The mapping table is loaded into the command queue.

詳細來說,針對所述多個映射表位圖中的對應至目標系統實體區塊的目標映射表位圖(所述目標系統實體區塊為多個系統實體區塊中被選擇用以產生一或多個被輸入至所述映射表載入指令佇列的系統實體區塊),所述映射表管理電路單元215(或映射表載入管理電路2152)辨識依PxQ矩陣形式所排列的所述目標映射表位圖的多個目標位元值,其中P為所述目標系統實體區塊的多個目標系統實體頁面的總數量,並且所述多個目標系統實體頁面各自最多儲存Q個SL2P表至所述多個目標系統實體頁面各自的Q個系統實體位址,其中Q為正整數。所述映射表管理電路單元215(或映射表載入管理電路2152)辨識PxQ矩陣中的M個 子矩陣,其中所述M個子矩陣各自包括PxN個所述目標位元值,其中M*N等於Q。 In detail, for the target mapping table bitmap corresponding to the target system physical block in the plurality of mapping table bitmaps (the target system physical block is selected from the plurality of system physical blocks to generate a Or a plurality of system physical blocks that are input to the mapping table load instruction queue), the mapping table management circuit unit 215 (or the mapping table load management circuit 2152) recognizes the PxQ matrix Multiple target bit values of the target mapping table bitmap, where P is the total number of multiple target system physical pages of the target system physical block, and each of the multiple target system physical pages stores at most Q SL2P tables Q system physical addresses to each of the multiple target system physical pages, where Q is a positive integer. The mapping table management circuit unit 215 (or the mapping table loading management circuit 2152) identifies M in the PxQ matrix A sub-matrix, wherein each of the M sub-matrices includes P×N target bit values, where M*N is equal to Q.

接著,所述映射表管理電路單元215(或映射表載入管理電路2152)根據每一個子矩陣的P個行各自的所有的目標位元值的總和,由大至小,來重新排序每一個子矩陣的所述P個行,以獲得已調整目標映射表位圖。 Next, the mapping table management circuit unit 215 (or the mapping table loading management circuit 2152) reorders each sub-matrix according to the sum of all the target bit values of the P rows of each sub-matrix, from large to small The P rows of the sub-matrix are used to obtain the adjusted target mapping table bitmap.

接著,所述映射表管理電路單元215(或映射表載入管理電路2152)根據所述已調整目標映射表位圖的已排序的P個行來產生對應所述已排序P個行的多個映射表載入指令,並且依序將所產生的所述多個映射表載入指令輸入至所述映射表載入指令佇列中。其中,所述已排序的P個行中的一第一類型行的為1的一或多個位元值分佈於所述M個子矩陣中,並且對應所述第一類型行的為1的所述一或多個位元值的一或多個第一類型目標系統實體位址被記錄至所述映射表載入指令佇列中的一個所述多平面映射表載入指令;所述已排序的P個行中的一第二類型行的為1的一或多個位元值非分佈於所述M個子矩陣中,並且對應所述第二類型行的為1的所述一或多個位元值的一或多個第二類型目標系統實體位址被記錄至所述映射表載入指令佇列中的一個所述單平面映射表載入指令。簡單來說,位於第一類型行中的多個位元值會散佈在所有的子矩陣中(即,所述M個子矩陣的每個子矩陣的所述第一類型行皆具有至少一個為1的位元值)。反之,所述M個子矩陣(對應M個平面)的其中之一或多者的所述第二類型行可 僅具有為0的位元值。 Next, the mapping table management circuit unit 215 (or the mapping table load management circuit 2152) generates a plurality of P rows corresponding to the ordered P rows according to the ordered P rows of the adjusted target mapping table bitmap. Mapping table loading instructions, and sequentially inputting the generated multiple mapping table loading instructions into the mapping table loading instruction queue. Wherein, one or more bit values of 1 in a first type row in the sorted P rows are distributed in the M sub-matrices, and corresponding to all 1 in the first type row The one or more first-type target system physical addresses of the one or more bit values are recorded in one of the multi-plane mapping table load instructions in the mapping table load instruction queue; the sorted One or more bit values of 1 in a second type row of P rows are not distributed in the M sub-matrices, and corresponding to the one or more of 1 in the second type row One or more second-type target system physical addresses of the bit value are recorded to one of the single-plane mapping table load instructions in the mapping table load instruction queue. Simply put, the multiple bit values in the first type row will be scattered in all sub-matrices (that is, the first type row of each sub-matrix of the M sub-matrices has at least one 1 Bit value). Conversely, the second type rows of one or more of the M sub-matrices (corresponding to M planes) may be It only has a bit value of 0.

圖8A是根據本發明的一實施例所繪示的調整映射表位圖的示意圖。請參照圖8A,假設在獲得映射表位圖BMP_B3、BMP_B4後,所述映射表管理電路單元215(或映射表載入管理電路2152)辨識映射表位圖BMP_B3的2個子矩陣(M=2)BMP_B3.1、BMP_B3.2以及映射表位圖BMP_B4的2個子矩陣(M=2)BMP_B4.1、BMP_B4.2。每個子矩陣皆具有對應至三個系統實體頁面的3個行(P=3),每個子矩陣的每個行可儲存2個SL2P表(N=2),並且每個子矩陣對應至1個平面。 FIG. 8A is a schematic diagram of an adjustment mapping table bitmap according to an embodiment of the invention. Referring to FIG. 8A, suppose that after obtaining the mapping table bitmaps BMP_B3 and BMP_B4, the mapping table management circuit unit 215 (or the mapping table loading management circuit 2152) identifies the two sub-matrices (M=2) of the mapping table bitmap BMP_B3 BMP_B3.1, BMP_B3.2 and 2 sub-matrices (M=2) BMP_B4.1, BMP_B4.2 of the mapping table bitmap BMP_B4. Each sub-matrix has 3 rows (P=3) corresponding to the three system physical pages, each row of each sub-matrix can store 2 SL2P tables (N=2), and each sub-matrix corresponds to 1 plane .

在此例子之中,所述映射表管理電路單元215(或映射表載入管理電路2152)根據子矩陣BMP_B3.1的3個行(如,對應系統實體頁面PG1、PG2、PG3)各自的所有的位元值(目標位元值)的總和(如,2、0、1),由大至小,來重新排序子矩陣BMP_B3.1為子矩陣BMP_B3.1’(如箭頭A81所示)。子矩陣BMP_B3.1’的對應系統實體頁面PG1、PG3、PG2的3個行的目標位元值的總和為2、1、0。依此類推,所述映射表管理電路單元215(或映射表載入管理電路2152)重新調整子矩陣BMP_B3.2為子矩陣BMP_B3.2’(如箭頭A82所示);重新調整子矩陣BMP_B4.1為子矩陣BMP_B4.1’(如箭頭A83所示);重新調整子矩陣BMP_B4.2為子矩陣BMP_B4.2’(如箭頭A84所示)。 In this example, the mapping table management circuit unit 215 (or the mapping table loading management circuit 2152) according to the three rows of the sub-matrix BMP_B3.1 (for example, corresponding to the system physical pages PG1, PG2, PG3) The sum of the bit values (target bit values) of (eg, 2, 0, 1), from large to small, reorders the sub-matrix BMP_B3.1 into the sub-matrix BMP_B3.1' (as shown by arrow A81). The sum of the target bit values of the three rows of the corresponding system physical pages PG1, PG3, and PG2 of the sub-matrix BMP_B3.1' is 2, 1, and 0. By analogy, the mapping table management circuit unit 215 (or mapping table loading management circuit 2152) readjusts the sub-matrix BMP_B3.2 to the sub-matrix BMP_B3.2' (as shown by the arrow A82); readjusts the sub-matrix BMP_B4. 1 is the sub-matrix BMP_B4.1' (as shown by the arrow A83); re-adjust the sub-matrix BMP_B4.2 to the sub-matrix BMP_B4.2' (as the arrow A84).

圖8B是根據本發明的一實施例所繪示的根據已調整映射表位圖來產生映射表載入指令佇列的示意圖。請參照圖8B,在 調整每個子矩陣後,已調整子矩陣BMP_B3.1’與已調整子矩陣BMP_B3.2’可結合為已調整映射表位圖BMP_B3’,並且已調整子矩陣BMP_B4.1’與已調整子矩陣BMP_B4.2’可結合為已調整映射表位圖BMP_B4’。 FIG. 8B is a schematic diagram of generating a mapping table load instruction queue according to an adjusted mapping table bitmap according to an embodiment of the present invention. Please refer to Figure 8B, in After adjusting each sub-matrix, the adjusted sub-matrix BMP_B3.1' and the adjusted sub-matrix BMP_B3.2' can be combined into the adjusted mapping table bitmap BMP_B3', and the adjusted sub-matrix BMP_B4.1' and the adjusted sub-matrix BMP_B4 .2' can be combined into the adjusted mapping table bit map BMP_B4'.

所述映射表管理電路單元215(或映射表載入管理電路2152)根據所述已調整目標映射表位圖BMP_B3’的已排序的3個行來產生對應所述已排序3個行的多個映射表載入指令,並且依序將所產生的所述多個映射表載入指令輸入至所述映射表載入指令佇列中。例如,如箭頭A85所示,所述映射表管理電路單元215(或映射表載入管理電路2152)辨識所述已調整目標映射表位圖BMP_B3’的第1行的多個目標位元值的多個位置,並且根據所述多個位置來產生多平面映射表載入指令「MPLC:“B3,PL1,PG1,CD1-2”,“B3,PL2,PG2,CD1-2”」;如箭頭A86所示,所述映射表管理電路單元215(或映射表載入管理電路2152)辨識所述已調整目標映射表位圖BMP_B3’的第2行的多個目標位元值的多個位置,並且根據所述多個位置來產生多平面映射表載入指令「MPLC:“B3,PL1,PG3,CD2”,“B3,PL2,PG3,CD1-2”」;如箭頭A87所示,所述映射表管理電路單元215(或映射表載入管理電路2152)辨識所述已調整目標映射表位圖BMP_B4’的第1行的多個目標位元值的多個位置,並且根據所述多個位置來產生多平面映射表載入指令「MPLC:“B4,PL1,PG3,CD1”,“B4,PL2,PG2,CD1-2”」。應注意的是,對應箭頭A85~87的多個行皆屬於第一類型行,並且 位於所述第一類型行的多個位元值屬於同一個系統實體區塊的2個平面的2個系統實體頁面。 The mapping table management circuit unit 215 (or the mapping table loading management circuit 2152) generates a plurality of rows corresponding to the sorted 3 rows according to the sorted 3 rows of the adjusted target mapping table bitmap BMP_B3' Mapping table loading instructions, and sequentially inputting the generated multiple mapping table loading instructions into the mapping table loading instruction queue. For example, as indicated by arrow A85, the mapping table management circuit unit 215 (or the mapping table loading management circuit 2152) identifies the value of the multiple target bit values in the first row of the adjusted target mapping table bitmap BMP_B3' Multiple locations, and generate a multi-plane mapping table load instruction "MPLC: "B3, PL1, PG1, CD1-2", "B3, PL2, PG2, CD1-2"" according to the multiple positions; such as arrows As shown in A86, the mapping table management circuit unit 215 (or the mapping table load management circuit 2152) recognizes multiple positions of multiple target bit values in the second row of the adjusted target mapping table bitmap BMP_B3', And according to the multiple positions, a multi-plane mapping table load instruction "MPLC: "B3, PL1, PG3, CD2", "B3, PL2, PG3, CD1-2" is generated; as shown by arrow A87, The mapping table management circuit unit 215 (or the mapping table load management circuit 2152) recognizes the positions of the plurality of target bit values in the first row of the adjusted target mapping table bitmap BMP_B4', and according to the plurality of positions Position to generate the multi-plane mapping table load instruction "MPLC: "B4, PL1, PG3, CD1", "B4, PL2, PG2, CD1-2"". It should be noted that the multiple rows corresponding to arrows A85~87 belong to the first type of row, and The multiple bit values located in the first type row belong to two system physical pages on two planes of the same system physical block.

在產生完對應多個第一類型行的多個多平面映射表載入指令後,所述映射表管理電路單元215(或映射表載入管理電路2152)開始根據已調整目標映射表位圖BMP_B3’中的第二類型行來產生單平面映射表載入指令。例如,如箭頭A88所示,所述映射表管理電路單元215(或映射表載入管理電路2152)辨識所述已調整目標映射表位圖BMP_B3’的第3行的多個目標位元值的多個位置,並且根據所述多個位置來產生多平面映射表載入指令「SPLC:“B3,PL2,PG1,CD2”」。如此一來,在所述映射表管理電路單元215(或映射表載入管理電路2152)根據所有的第一類型行與第二類型行的多個位元值來產生相應的多平面映射表載入指令或/及單平面映射表載入指令至映射表載入指令佇列LCQ3後,產生映射表載入指令佇列LCQ3的操作完成。 After generating multiple multi-plane mapping table loading instructions corresponding to multiple rows of the first type, the mapping table management circuit unit 215 (or mapping table loading management circuit 2152) starts to adjust the target mapping table bitmap BMP_B3 'In the second type line to generate a single plane mapping table load instruction. For example, as indicated by arrow A88, the mapping table management circuit unit 215 (or the mapping table loading management circuit 2152) identifies the value of the multiple target bit values in the third row of the adjusted target mapping table bitmap BMP_B3' A plurality of positions, and a multi-plane mapping table load instruction "SPLC: "B3, PL2, PG1, CD2"" is generated according to the plurality of positions. In this way, the mapping table management circuit unit 215 (or the mapping table loading management circuit 2152) generates a corresponding multi-plane mapping table load according to the multiple bit values of all the first type rows and the second type rows. After inputting the instruction or/and the single plane mapping table load instruction to the mapping table load instruction queue LCQ3, the operation of generating the mapping table load instruction queue LCQ3 is completed.

然而,在又一實施例中,所述映射表管理電路單元215(或映射表載入管理電路2152)可不經由調整子矩陣來調整目標映射表位圖。具體來說,針對所述多個映射表位圖中的對應至目標系統實體區塊的目標映射表位圖,所述映射表管理電路單元215(或映射表載入管理電路2152)辨識依PxQ矩陣形式所排列的所述目標映射表位圖的多個目標位元值,其中P為所述目標系統實體區塊的多個目標系統實體頁面的總數量,並且所述多個目標系統實體頁面各自最多儲存Q個SL2P表至所述多個目標系統實體 頁面各自的Q個系統實體位址,其中Q為正整數。所述映射表管理電路單元215(或映射表載入管理電路2152)直接根據所述目標映射表位圖的P個行各自的所有的目標位元值的總和,由大至小,來重新排序所述目標映射表位圖的P個行,以獲得已調整目標映射表位圖。接著,所述映射表管理電路單元215(或映射表載入管理電路2152)根據所述已調整目標映射表位圖的已排序的P個行來產生對應所述已排序P個行的多個映射表載入指令,並且依序將所產生的所述多個映射表載入指令輸入至所述映射表載入指令佇列中。相似地,所述已排序的P個行中的一第一類型行的為1的一或多個位元值分佈於M個平面中,並且對應所述第一類型行的為1的所述一或多個位元值的一或多個第一類型目標系統實體位址被記錄至所述映射表載入指令佇列中的一個所述多平面映射表載入指令;所述已排序的P個行中的一第二類型行的為1的一或多個位元值非分佈於所述M個平面中,並且對應所述第二類型行的為1的所述一或多個位元值的一或多個第二類型目標系統實體位址被記錄至所述映射表載入指令佇列中的一個所述單平面映射表載入指令。以下利用圖9A、9B來說明。 However, in another embodiment, the mapping table management circuit unit 215 (or the mapping table loading management circuit 2152) may not adjust the target mapping table bitmap through adjusting the sub-matrix. Specifically, for the target mapping table bitmap corresponding to the target system physical block in the plurality of mapping table bitmaps, the mapping table management circuit unit 215 (or the mapping table load management circuit 2152) recognizes that it is based on PxQ The multiple target bit values of the target mapping table bitmap arranged in a matrix form, where P is the total number of multiple target system physical pages of the target system physical block, and the multiple target system physical pages Each store up to Q SL2P tables to the multiple target system entities Q system physical addresses of each page, where Q is a positive integer. The mapping table management circuit unit 215 (or the mapping table loading management circuit 2152) directly re-orders according to the sum of all the target bit values of the P rows of the target mapping table bitmap, from large to small The P rows of the target mapping table bitmap are used to obtain the adjusted target mapping table bitmap. Next, the mapping table management circuit unit 215 (or the mapping table load management circuit 2152) generates a plurality of P rows corresponding to the ordered P rows according to the ordered P rows of the adjusted target mapping table bitmap. Mapping table load instructions, and sequentially input the generated mapping table load instructions into the mapping table load instruction queue. Similarly, one or more bit values of 1 of a first type row in the P rows are distributed in M planes, and corresponding to the first type row of 1 One or more first-type target system physical addresses of one or more bit values are recorded in one of the multi-plane mapping table load instructions in the mapping table load instruction queue; the sorted One or more bit values of 1 in a second type row in the P rows are not distributed in the M planes, and correspond to the one or more bit values of 1 in the second type row One or more second-type target system physical addresses of the meta value are recorded to one of the single-plane mapping table load commands in the mapping table load command queue. Hereinafter, it will be described using FIGS. 9A and 9B.

圖9A是根據本發明的又一實施例所繪示的調整映射表位圖的示意圖。請參照圖9A,假設已獲得映射表位圖BMP_B3、BMP_B4。所述映射表管理電路單元215(或映射表載入管理電路2152)可辨識映射表位圖BMP_B3、BMP_B4中的每個行的位元值的總和(亦稱,位元值總和)。例如,映射表位圖BMP_B3的第 1行(對應系統實體頁面PG1)的位元值總和為“3”;映射表位圖BMP_B3的第2行(對應系統實體頁面PG2)的位元值總和為“2”;映射表位圖BMP_B3的第3行(對應系統實體頁面PG1)的位元值總和為“3”。所述映射表管理電路單元215(或映射表載入管理電路2152)可根據映射表位圖BMP_B3的3個行各自的位元值總和的大小順序,由大至小來重新排序所述3個行,以獲得映射表位圖BMP_B3’(如,箭頭A91所示)。依此類推,所述映射表管理電路單元215(或映射表載入管理電路2152)可根據映射表位圖BMP_B4的3個行各自的位元值總和的大小順序,由大至小來重新排序所述3個行,以獲得映射表位圖BMP_B4’(如,箭頭A92所示)。 FIG. 9A is a schematic diagram illustrating an adjustment mapping table bitmap according to another embodiment of the present invention. Please refer to FIG. 9A, assuming that the mapping table bitmaps BMP_B3 and BMP_B4 have been obtained. The mapping table management circuit unit 215 (or the mapping table loading management circuit 2152) can identify the sum of bit values (also known as the sum of bit values) of each row in the bitmaps BMP_B3 and BMP_B4 of the mapping table. For example, the mapping table bitmap BMP_B3 The total bit value of row 1 (corresponding to the system physical page PG1) is "3"; the second row of the mapping table bitmap BMP_B3 (corresponding to the system physical page PG2) has a total bit value of "2"; mapping table bitmap BMP_B3 The total bit value of the third line (corresponding to the system physical page PG1) is "3". The mapping table management circuit unit 215 (or the mapping table loading management circuit 2152) can reorder the three rows from large to small according to the order of the sum of the bit values of the three rows of the mapping table bitmap BMP_B3. Row to obtain the mapping table bitmap BMP_B3' (as shown by arrow A91). By analogy, the mapping table management circuit unit 215 (or the mapping table loading management circuit 2152) can re-sort from large to small according to the order of the sum of the bit values of the three rows of the mapping table bitmap BMP_B4 The three rows are used to obtain the mapping table bitmap BMP_B4' (as shown by arrow A92).

圖9B是根據本發明的又一實施例所繪示的根據已調整映射表位圖來產生映射表載入指令佇列的示意圖。請參照圖9B,在獲得已調整映射表位圖BMP_B3’、BMP_B4’後,所述映射表管理電路單元215(或映射表載入管理電路2152)根據所述已調整目標映射表位圖BMP_B3’的已排序的3個行來產生對應所述已排序3個行的多個映射表載入指令,並且依序將所產生的所述多個映射表載入指令輸入至所述映射表載入指令佇列中。例如,如箭頭A93所示,所述映射表管理電路單元215(或映射表載入管理電路2152)辨識所述已調整目標映射表位圖BMP_B3’的第1行的多個目標位元值的多個位置,並且根據所述多個位置來產生多平面映射表載入指令「MPLC:“B3,PL1,PG1,CD1-2”,“B3,PL2, PG1,CD2”」;如箭頭A94所示,所述映射表管理電路單元215(或映射表載入管理電路2152)辨識所述已調整目標映射表位圖BMP_B3’的第2行的多個目標位元值的多個位置,並且根據所述多個位置來產生多平面映射表載入指令「MPLC:“B3,PL1,PG3,CD2”,“B3,PL2,PG3,CD1-2”」;如箭頭A95所示,所述映射表管理電路單元215(或映射表載入管理電路2152)辨識所述已調整目標映射表位圖BMP_B3’的第3行的多個目標位元值的多個位置,並且根據所述多個位置來產生單平面映射表載入指令「SPLC:“B3,PL2,PG2,CD1-2”」;如箭頭A96所示,所述映射表管理電路單元215(或映射表載入管理電路2152)辨識所述已調整目標映射表位圖BMP_B4’的第1行的多個目標位元值的多個位置,並且根據所述多個位置來產生單平面映射表載入指令「SPLC:“B4,PL2,PG2,CD1-2”」如箭頭A97所示,所述映射表管理電路單元215(或映射表載入管理電路2152)辨識所述已調整目標映射表位圖BMP_B4’的第2行的多個目標位元值的多個位置,並且根據所述多個位置來產生單平面映射表載入指令「SPLC:“B4,PL1,PG3,CD1”」。應注意的是,對應箭頭A93~94的多個行皆屬於第一類型行,並且位於所述第一類型行的多個位元值屬於同一個系統實體區塊的2個平面的2個系統實體頁面。此外,對應箭頭A95~97的多個行皆屬於第二類型行,並且位於所述第二類型行的多個位元值僅屬於同一個系統實體區塊的2個平面中的一個平面的1個系統實體頁面。 9B is a schematic diagram of generating a mapping table load instruction queue according to an adjusted mapping table bitmap according to another embodiment of the present invention. Referring to FIG. 9B, after obtaining the adjusted mapping table bitmaps BMP_B3' and BMP_B4', the mapping table management circuit unit 215 (or the mapping table loading management circuit 2152) according to the adjusted target mapping table bitmap BMP_B3' To generate a plurality of mapping table load instructions corresponding to the sorted 3 rows, and sequentially input the generated mapping table load instructions to the mapping table load In the command queue. For example, as indicated by arrow A93, the mapping table management circuit unit 215 (or the mapping table load management circuit 2152) recognizes the number of target bit values in the first row of the adjusted target mapping table bitmap BMP_B3' Multiple locations, and according to the multiple locations, a multi-plane mapping table load instruction "MPLC: "B3, PL1, PG1, CD1-2", "B3, PL2, PG1, CD2""; as indicated by arrow A94, the mapping table management circuit unit 215 (or the mapping table load management circuit 2152) recognizes multiple targets in the second row of the adjusted target mapping table bitmap BMP_B3' Multiple positions of the bit value, and generate a multi-plane mapping table load instruction "MPLC: "B3, PL1, PG3, CD2", "B3, PL2, PG3, CD1-2"" according to the multiple positions; As indicated by arrow A95, the mapping table management circuit unit 215 (or the mapping table load management circuit 2152) recognizes multiple target bit values in the third row of the adjusted target mapping table bitmap BMP_B3' Position, and generate a single-plane mapping table load instruction "SPLC: "B3, PL2, PG2, CD1-2"" according to the multiple positions; as indicated by arrow A96, the mapping table management circuit unit 215 (or The mapping table load management circuit 2152) recognizes the multiple positions of the multiple target bit values in the first row of the adjusted target mapping table bitmap BMP_B4', and generates a single-plane mapping table load based on the multiple positions The input command "SPLC: "B4, PL2, PG2, CD1-2"" is shown by arrow A97, and the mapping table management circuit unit 215 (or the mapping table load management circuit 2152) recognizes the adjusted target mapping table bit The multiple positions of the multiple target bit values in the second row of Figure BMP_B4', and the single-plane mapping table load instruction "SPLC: "B4, PL1, PG3, CD1"" is generated according to the multiple positions. It should be noted that the multiple rows corresponding to arrows A93 to 94 belong to the first type row, and the multiple bit values located in the first type row belong to two systems in two planes of the same system physical block. Physical page. In addition, the multiple rows corresponding to arrows A95-97 belong to the second type row, and the multiple bit values located in the second type row only belong to one of the two planes of the same system physical block. A system entity page.

如此一來,在所述映射表管理電路單元215(或映射表載入管理電路2152)根據所有的第一類型行與第二類型行的多個位元值來產生相應的多平面映射表載入指令或/及單平面映射表載入指令至映射表載入指令佇列LCQ4後,產生映射表載入指令佇列LCQ4的操作完成。 In this way, the mapping table management circuit unit 215 (or the mapping table loading management circuit 2152) generates a corresponding multi-plane mapping table load according to the multiple bit values of all the first type rows and the second type rows. After inputting the instruction or/and the single plane mapping table load instruction to the mapping table load instruction queue LCQ4, the operation of generating the mapping table load instruction queue LCQ4 is completed.

在本實施例中,反應於映射表載入指令佇列LCQ4已產生完畢,所述映射表管理電路單元215(處理器211或映射表載入管理電路2152)可依序執行映射表載入指令佇列LCQ4中的多個映射表載入指令,以從可複寫式非揮發性記憶體模組220中載入所有的SL2P表至緩衝記憶體216中。如此一來,處理器211便可藉由所載入至緩衝記憶體216的所有的SL2P表來進行後續的管理操作或資料存取操作。 In this embodiment, reflecting that the mapping table load instruction queue LCQ4 has been generated, the mapping table management circuit unit 215 (the processor 211 or the mapping table load management circuit 2152) can sequentially execute the mapping table load instructions A plurality of mapping table load commands in LCQ4 are queued to load all the SL2P tables from the rewritable non-volatile memory module 220 into the buffer memory 216. In this way, the processor 211 can use all the SL2P tables loaded into the buffer memory 216 to perform subsequent management operations or data access operations.

值得一提的是,相較於圖6中的多個映射表載入指令,於圖8B、9B所說明的本發明的記憶體管理方法,可有效地減少映射表載入指令的總數量,並且可應用多平面讀取操作來進一步加速SL2P表的載入速度。 It is worth mentioning that, compared with the multiple mapping table load instructions in FIG. 6, the memory management method of the present invention described in FIGS. 8B and 9B can effectively reduce the total number of mapping table load instructions. And multi-plane read operations can be applied to further accelerate the loading speed of SL2P tables.

此外,在一實施例中,映射表管理電路單元215也可僅更新/維護多個映射表位圖於緩衝記憶體216中(即,不利用SMT清單),以記錄儲存至可複寫式非揮發性記憶體模組220的有效的SL2P表的位置。緩衝記憶體216中的多個映射表位圖也可被備份至可複寫式非揮發性記憶體模組220中。爾後,映射表管理電路單元215可直接讀取所備份的多個映射表位圖,以產生相應的映 射表載入指令佇列,進而載入所有的SL2P表至緩衝記憶體216中。 In addition, in one embodiment, the mapping table management circuit unit 215 can also only update/maintain multiple mapping table bitmaps in the buffer memory 216 (ie, without using the SMT list) to record and store them in a rewritable non-volatile The location of the valid SL2P table of the sexual memory module 220. The multiple mapping table bitmaps in the buffer memory 216 can also be backed up to the rewritable non-volatile memory module 220. Thereafter, the mapping table management circuit unit 215 can directly read the multiple backed up mapping table bitmaps to generate the corresponding mapping table. The firing table is loaded into the command queue, and then all the SL2P tables are loaded into the buffer memory 216.

圖10是根據本發明的一實施例所繪示的載入區段邏輯轉實體映射表的流程圖。請參照圖10,在步驟S1010中,映射表管理電路單元215(或映射表載入管理電路2152)從可複寫式非揮發性記憶體模組220中讀取區段映射表(SMT)清單,並且根據所讀取的SMT清單產生映射表載入指令佇列,其中所述映射表載入指令佇列具有多個映射表載入指令,其中所述多個映射表載入指令包括單平面映射表載入指令與多平面映射表載入指令。 FIG. 10 is a flowchart of loading a segment logic to entity mapping table according to an embodiment of the present invention. 10, in step S1010, the mapping table management circuit unit 215 (or the mapping table loading management circuit 2152) reads the section mapping table (SMT) list from the rewritable non-volatile memory module 220, And generate a mapping table load instruction queue according to the read SMT list, wherein the mapping table load instruction queue has multiple mapping table load instructions, wherein the multiple mapping table load instructions include single plane mapping Table load instructions and multi-plane mapping table load instructions.

接著,在步驟S1020中,映射表管理電路單元215(或映射表載入管理電路2152)根據所述映射表載入指令佇列的所述多個映射表載入指令的排列順序,執行所述多個映射表載入指令,以經由單平面讀取的方式,從對應的系統實體位址讀取所儲存的一個區段邏輯轉實體映射(SL2P)表,或經由多平面讀取的方式,一同從對應的分別屬於M個平面的多個系統實體位址讀取所儲存的多個SL2P表。 Next, in step S1020, the mapping table management circuit unit 215 (or the mapping table load management circuit 2152) executes the mapping table load instructions according to the sequence of the mapping table load instructions in the mapping table load instruction queue. A plurality of mapping table loading instructions reads a stored logical-to-physical mapping (SL2P) table from the corresponding system physical address by reading through a single plane, or reading through multiple planes, At the same time, the stored SL2P tables are read from corresponding multiple system physical addresses respectively belonging to M planes.

圖11是根據本發明的又一實施例所繪示的載入區段邏輯轉實體映射表的流程圖。請參照圖11,在步驟S1110中,映射表管理電路單元215(處理器211或映射表載入管理電路2152)從多個系統實體區塊的每一個系統實體區塊的最後一個系統實體頁面中來讀取映射表記錄資訊,並且根據從每一個系統實體區塊的所讀取所述映射表記錄資訊來產生每一個系統實體區塊的區段映射表(SMT)清單。具體來說,在本實施例中,映射表管理電路單元 215(處理器211或映射表清單管理電路2151)會在儲存裝置關閉時,將每個系統實體區塊的映射表記錄資訊記錄至每個系統實體區塊中排序在最後一個被使用的系統實體頁面後的系統實體頁面(亦稱,特定系統實體頁面)。所述映射表記錄資訊用以記錄儲存於所屬的系統實體區塊中的有效的多個SL2P表的系統實體位址與所述多個SL2P表的識別碼(亦稱,SL2P表識別碼)。處理器211可經由所述SL2P表識別碼辨識到所對應的SL2P表所具有的多個邏輯位址。例如,SL2P表識別碼“ST1”可被用以識別所對應的區段邏輯轉實體位址映射表SL2P(1)(如,“ST1”中的數字部份“2”),並且如圖3B所示,區段邏輯轉實體位址映射表SL2P(1)包含了邏輯位址LA(0)~LA(1023)(即,(1-1)*1024=0,並且1*1024-1=1023)。又例如,SL2P表識別碼“ST2”可被用以識別所對應的區段邏輯轉實體位址映射表SL2P(2)(如,“ST1”中的數字部份“2”),並且如圖3B所示,區段邏輯轉實體位址映射表SL2P(2)包含了邏輯位址LA(1024)~LA(2047)(即,(2-1)*1024=0,並且2*1024-1=2047)。 FIG. 11 is a flowchart of loading a section logic to entity mapping table according to another embodiment of the present invention. Referring to FIG. 11, in step S1110, the mapping table management circuit unit 215 (the processor 211 or the mapping table load management circuit 2152) reads from the last system entity page of each of the multiple system entity blocks To read the mapping table record information, and generate a section mapping table (SMT) list of each system physical block according to the read mapping table record information from each system physical block. Specifically, in this embodiment, the mapping table management circuit unit 215 (the processor 211 or the mapping table list management circuit 2151) will record the mapping table record information of each system entity block to each system entity block when the storage device is turned off, and sort the last used system entity The system entity page behind the page (also known as the specific system entity page). The mapping table record information is used to record the effective system physical addresses of a plurality of SL2P tables and the identification codes of the plurality of SL2P tables (also referred to as SL2P table identification codes) stored in the system entity block to which they belong. The processor 211 can identify multiple logical addresses of the corresponding SL2P table through the SL2P table identification code. For example, the SL2P table identification code "ST1" can be used to identify the corresponding segment logical to physical address mapping table SL2P(1) (for example, the number part "2" in "ST1"), as shown in Figure 3B As shown, the section logical to physical address mapping table SL2P(1) contains logical addresses LA(0)~LA(1023) (that is, (1-1)*1024=0, and 1*1024-1= 1023). For another example, the SL2P table identification code "ST2" can be used to identify the corresponding segment logical to physical address mapping table SL2P(2) (for example, the number part "2" in "ST1"), as shown in the figure As shown in 3B, the section logical to physical address mapping table SL2P(2) contains logical addresses LA(1024)~LA(2047) (ie, (2-1)*1024=0, and 2*1024-1 =2047).

圖12是根據本發明的一實施例所繪示的映射表記錄資訊的示意圖。請參照圖12,在本實施例中,假設系統實體區塊B5儲存了多個有效的區段邏輯轉實體位址映射表SL2P(1)~SL2P(5),並且系統實體區塊B5最後一個被使用的實體頁面為平面PL1的實體頁面PG3(系統實體區塊B5還剩下平面PL2的實體頁面PG3尚未被使用)。映射表管理電路單元215(處 理器211或映射表清單管理電路2151)也對應地記錄了區段映射表清單SMT3。 FIG. 12 is a schematic diagram of information recorded in a mapping table according to an embodiment of the present invention. 12, in this embodiment, assume that the system physical block B5 stores a plurality of valid segment logical to physical address mapping tables SL2P(1)~SL2P(5), and the system physical block B5 is the last one The used physical page is the physical page PG3 of the plane PL1 (the physical page PG3 of the plane PL2 is left unused in the system physical block B5). Mapping table management circuit unit 215 (place The processor 211 or the mapping table list management circuit 2151) also correspondingly records the section mapping table list SMT3.

在一實施例中,映射表管理電路單元215(處理器211或映射表清單管理電路2151)可根據區段映射表清單SMT3識別出相關於系統實體區塊B5的多個條目,並且根據相關於系統實體區塊B5的所述多個條目來產生系統實體區塊的映射表記錄資訊MRI1。在另一實施例中,映射表管理電路單元215(處理器211或映射表清單管理電路2151)不需根據區段映射表清單SMT3來產生系統實體區塊B5的映射表記錄資訊MRI1,並且可直接反應於多個有效的SL2P清單被儲存在系統實體區塊B5而記錄相關的資訊至映射表記錄資訊MRI1。映射表記錄資訊MRI亦可具有預定的標籤,已使映射表管理電路單元215(處理器211或映射表清單管理電路2151)識別所讀取的資料為映射表記錄資訊。 In one embodiment, the mapping table management circuit unit 215 (the processor 211 or the mapping table list management circuit 2151) can identify multiple entries related to the system entity block B5 according to the section mapping table list SMT3, and according to the related The multiple entries of the system entity block B5 are used to generate the mapping table record information MRI1 of the system entity block. In another embodiment, the mapping table management circuit unit 215 (the processor 211 or the mapping table list management circuit 2151) does not need to generate the mapping table record information MRI1 of the system entity block B5 according to the section mapping table list SMT3, and may It directly reflects that multiple valid SL2P lists are stored in the system entity block B5 and the related information is recorded to the mapping table record information MRI1. The mapping table record information MRI may also have a predetermined tag, so that the mapping table management circuit unit 215 (the processor 211 or the mapping table list management circuit 2151) recognizes that the read data is the mapping table record information.

在特定時間點,如箭頭A1201所示,映射表記錄資訊MRI1可被儲存至系統實體區塊中的平面PL2的第1個可用實體位址/碼字。所述特定時間點包括但不限於:儲存裝置20關閉時;以及系統實體區塊B5被關閉時。所述映射表記錄資訊MRI1可被用以重建對應系統實體區塊B5的映射表清單SMT3。 At a specific point in time, as indicated by the arrow A1201, the mapping table record information MRI1 can be stored in the first available physical address/codeword of the plane PL2 in the system physical block. The specific time point includes but is not limited to: when the storage device 20 is closed; and when the system physical block B5 is closed. The mapping table record information MRI1 can be used to reconstruct the mapping table list SMT3 corresponding to the system entity block B5.

接著,在步驟S1120中,反應於所述多個系統實體區塊中的一特定系統實體區塊的所述最後一個系統實體頁面不具有映射表記錄資訊,映射表管理電路單元215(處理器211或映射表載入管理電路2152)掃描所述特定系統實體區塊所儲存的所有的區 段邏輯轉實體位址映射表,以重建所述特定系統實體區塊的所述映射表記錄資訊,並且根據所述特定系統實體區塊的所重建的所述映射表記錄資訊來產生所述特定系統實體區塊的SMT清單。 Then, in step S1120, reflecting that the last system physical page of a specific system physical block of the plurality of system physical blocks does not have mapping table record information, the mapping table management circuit unit 215 (processor 211 Or mapping table load management circuit 2152) scan all the areas stored in the specific system physical block Segment logic into a physical address mapping table to reconstruct the mapping table record information of the specific system physical block, and generate the specific mapping table record information based on the reconstructed mapping table record information of the specific system physical block SMT list of system entity blocks.

具體來說,當映射表管理電路單元215(處理器211或映射表載入管理電路2152)經由所讀取的資料中的標籤來判定從系統實體區塊B5所讀取的最後一筆資料並非是映射表記錄資訊,映射表管理電路單元215(處理器211或映射表載入管理電路2152)需要重新掃描系統實體區塊B5所具有的所有的有效的SL2P表(如,判斷每次所讀取到的SL2P表中的資訊是否是有效的),以重建系統實體區塊B5的映射表記錄資訊MRI1,並且根據所重建的映射表記錄資訊MRI1來產生對應系統實體區塊B5的區段映射表清單SMT3。 Specifically, when the mapping table management circuit unit 215 (the processor 211 or the mapping table load management circuit 2152) determines through the tags in the read data that the last data read from the system physical block B5 is not The mapping table records information, and the mapping table management circuit unit 215 (the processor 211 or the mapping table load management circuit 2152) needs to rescan all the valid SL2P tables in the system physical block B5 (eg, judge every time it is read Whether the information in the obtained SL2P table is valid) to reconstruct the mapping table record information MRI1 of the system entity block B5, and generate the section mapping table corresponding to the system entity block B5 according to the reconstructed mapping table record information MRI1 List SMT3.

接著,在步驟S1130中,映射表管理電路單元215(處理器211或映射表載入管理電路2152)根據所獲得的所有的SMT清單產生映射表載入指令佇列,其中所述映射表載入指令佇列具有多個映射表載入指令,其中所述多個映射表載入指令包括單平面映射表載入指令與多平面映射表載入指令。 Next, in step S1130, the mapping table management circuit unit 215 (the processor 211 or the mapping table load management circuit 2152) generates a mapping table load instruction queue according to all the obtained SMT lists, wherein the mapping table load The instruction queue has a plurality of mapping table load instructions, wherein the plurality of mapping table load instructions includes a single plane mapping table load instruction and a multi-plane mapping table load instruction.

接著,在步驟S1140中,映射表管理電路單元215(處理器211或映射表載入管理電路2152)根據所述映射表載入指令佇列的所述多個映射表載入指令的排列順序,執行所述多個映射表載入指令,以經由單平面讀取的方式,從對應的系統實體位址讀取所儲存的一個區段邏輯轉實體映射(SL2P)表,或經由多平面讀 取的方式,一同從對應的分別屬於M個平面的多個系統實體位址讀取所儲存的多個SL2P表。 Next, in step S1140, the mapping table management circuit unit 215 (the processor 211 or the mapping table load management circuit 2152) according to the sequence of the multiple mapping table load instructions in the mapping table load instruction queue, Execute the multiple mapping table load instructions to read a stored logical-to-physical mapping (SL2P) table from the corresponding system physical address by reading through a single plane, or read through multiple planes In this way, the stored multiple SL2P tables are read together from corresponding multiple system physical addresses belonging to M planes.

值得一提的是,上述映射表管理電路單元215的功能是以硬體電路的方式來實作,但本發明不限於此。例如,在一實施例中,映射表管理電路單元215、映射表清單管理電路2151、映射表載入管理電路2152的功能可分別以軟體或韌體的方式來實作為可被處理器211所執行的程式碼。如,映射表管理電路單元215、映射表清單管理電路2151、映射表載入管理電路2152的功能可被實作為映射表管理程式模組、映射表清單管理程式模組、映射表載入管理程式模組,並且處理器211可載入且執行映射表管理程式模組、映射表清單管理程式模組、映射表載入管理程式模組以實現相應的功能。 It is worth mentioning that the function of the above-mentioned mapping table management circuit unit 215 is implemented in a hardware circuit, but the present invention is not limited to this. For example, in one embodiment, the functions of the mapping table management circuit unit 215, the mapping table list management circuit 2151, and the mapping table load management circuit 2152 can be implemented by the processor 211 in software or firmware, respectively. Code. For example, the functions of the mapping table management circuit unit 215, the mapping table list management circuit 2151, and the mapping table load management circuit 2152 can be implemented as a mapping table management program module, a mapping table list management program module, and a mapping table load management program. Module, and the processor 211 can load and execute the mapping table management program module, the mapping table list management program module, and the mapping table load management program module to realize corresponding functions.

綜上所述,本發明的實施例所提供的儲存控制器、記憶體管理方法與儲存裝置,可利用區段映射表清單來產生對應的映射表載入指令佇列,以有效地管理多個區段邏輯轉實體位址映射表,進而提高多個邏輯位址與多個實體位址之間的映射關係的管理操作的效率。 In summary, the storage controller, the memory management method, and the storage device provided by the embodiments of the present invention can use the section mapping table list to generate corresponding mapping table load command queues to effectively manage multiple The section logic is converted to the physical address mapping table, thereby improving the efficiency of the management operation of the mapping relationship between multiple logical addresses and multiple physical addresses.

S210、S220、S230、S240:記憶體管理方法的流程步驟 S210, S220, S230, S240: Process steps of the memory management method

Claims (21)

一種儲存控制器,用於控制配置有一可複寫式非揮發性記憶體模組的一儲存裝置,所述儲存控制器包括:一連接介面電路,用以耦接至一主機系統;一緩衝記憶體;一記憶體介面控制電路,用以耦接至所述可複寫式非揮發性記憶體模組,其中所述可複寫式非揮發性記憶體模組具有多個實體區塊,並且所述多個實體區塊各自具有多個實體頁面;一映射表管理電路單元,以及一處理器,耦接至所述連接介面電路、所述緩衝記憶體、所述記憶體介面控制電路及所述映射表管理電路單元,其中所述處理器用以維護多個區段邏輯轉實體位址映射(Segment Logical To Physical addresses mapping,SL2P)表於所述緩衝記憶體中,其中所述多個SL2P表各自用以記錄多個邏輯位址以及多個實體位址之間的映射關係,其中所述多個實體位址對應至一部份的所述多個實體頁面,並且所述多個邏輯位址對應至一部份的被配置給所述主機系統的多個邏輯頁面,其中所述映射表管理電路單元用以維護一區段映射表清單(Segment Mapping Table List,SMT清單)於所述緩衝記憶體中,其中所述SMT清單包括多個條目,其中所述多個條目分別對應所述多個SL2P表,並且所述多個條目各自包括系統區塊識別碼以及對應所述系統區塊識別碼的系統實體區塊中的系統實體位址, 其中反應於所述多個SL2P表中的第一SL2P表被儲存至所述可複寫式非揮發性記憶體模組中的第一系統實體位址,所述映射表管理電路單元更用以記錄所述第一系統實體位址至所述SMT清單的所述多個條目中對應所述第一SL2P表的第一條目,其中所述處理器更用以儲存所述SMT清單至所述可複寫式非揮發性記憶體模組中。 A storage controller is used to control a storage device equipped with a rewritable non-volatile memory module. The storage controller includes: a connection interface circuit for coupling to a host system; and a buffer memory ; A memory interface control circuit for coupling to the rewritable non-volatile memory module, wherein the rewritable non-volatile memory module has multiple physical blocks, and the multiple Each physical block has a plurality of physical pages; a mapping table management circuit unit, and a processor, coupled to the connection interface circuit, the buffer memory, the memory interface control circuit, and the mapping table The management circuit unit, wherein the processor is used to maintain a plurality of segment logical to physical address mapping (Segment Logical To Physical addresses mapping, SL2P) tables in the buffer memory, wherein each of the plurality of SL2P tables is used Record the mapping relationship between multiple logical addresses and multiple physical addresses, wherein the multiple physical addresses correspond to a part of the multiple physical pages, and the multiple logical addresses correspond to one Part of it is configured to multiple logical pages of the host system, wherein the mapping table management circuit unit is used to maintain a segment mapping table list (Segment Mapping Table List, SMT list) in the buffer memory, The SMT list includes multiple entries, wherein the multiple entries respectively correspond to the multiple SL2P tables, and each of the multiple entries includes a system block identification code and a system entity corresponding to the system block identification code The physical address of the system in the block, The first SL2P table reflected in the plurality of SL2P tables is stored in the first system physical address in the rewritable non-volatile memory module, and the mapping table management circuit unit is further used for recording The first system entity address corresponds to the first entry of the first SL2P table among the multiple entries in the SMT list, wherein the processor is further configured to store the SMT list to the available In the non-volatile memory module of copy type. 如申請專利範圍第1項所述的儲存控制器,其中所述映射表管理電路單元根據所述SMT清單產生一映射表載入指令佇列,其中所述映射表載入指令佇列具有多個映射表載入指令,其中所述多個映射表載入指令各自包括單平面映射表載入指令與多平面映射表載入指令,其中當所述儲存裝置開啟時,所述映射表管理電路單元執行所述映射表載入指令佇列,以從所述可複寫式非揮發性記憶體模組載入所述多個SL2P表至所述緩衝記憶體中。 According to the storage controller described in claim 1, wherein the mapping table management circuit unit generates a mapping table load instruction queue according to the SMT list, wherein the mapping table load instruction queue has a plurality of A mapping table load instruction, wherein each of the plurality of mapping table load instructions includes a single-plane mapping table load instruction and a multi-plane mapping table load instruction, wherein when the storage device is turned on, the mapping table management circuit unit The mapping table load command queue is executed to load the plurality of SL2P tables from the rewritable non-volatile memory module into the buffer memory. 如申請專利範圍第2項所述的儲存控制器,其中所述單平面映射表載入指令用以指示經由單平面讀取的方式,從對應的系統實體位址讀取所儲存的一個SL2P表,其中所述多平面映射表載入指令用以指示經由多平面讀取的方式,一同從對應的分別屬於M個平面的多個系統實體位址讀取所儲存的多個SL2P表,其中M為大於1的正整數。 The storage controller described in item 2 of the scope of patent application, wherein the single-plane mapping table load instruction is used to instruct to read a stored SL2P table from the corresponding system physical address via a single-plane reading method , Wherein the multi-plane mapping table load instruction is used to instruct to read through the multi-plane, read the stored multiple SL2P tables from the corresponding multiple system physical addresses respectively belonging to M planes, where M It is a positive integer greater than 1. 如申請專利範圍第2項所述的儲存控制器,其中在所述根據所述SMT清單產生所述映射表載入指令佇列的運作中,所述映射表管理電路單元辨識所述SMT清單的所述多個條 目的所述多個系統實體位址各自所屬的平面為M個平面中的其中之一,所述映射表管理電路單元從所述多個系統實體位址中選擇多組的M個多平面系統實體位址,其中所選擇的每一組的所述M個多平面系統實體位址分別屬於不同的所述M個平面,並且將所選擇的所述多組的所述M個多平面系統實體位址各自記錄至一個所述多平面映射表載入指令,其中M為大於1的正整數,所述映射表管理電路單元將所述多個系統實體位址中尚未被選擇的多個剩餘的系統實體位址各自記錄至一個所述單平面映射表載入指令。 The storage controller described in claim 2, wherein in the operation of generating the mapping table load command queue according to the SMT list, the mapping table management circuit unit identifies the SMT list The plurality of bars Purpose The plane to which each of the multiple system entity addresses belongs is one of M planes, and the mapping table management circuit unit selects multiple sets of M multi-plane system entities from the multiple system entity addresses Address, wherein the M multi-plane system physical addresses of each selected group belong to different M planes, and the M multi-plane system physical addresses of the selected groups are Each address is recorded in one of the multi-plane mapping table load instructions, where M is a positive integer greater than 1, and the mapping table management circuit unit records multiple remaining system addresses that have not been selected among the multiple system physical addresses The physical addresses are respectively recorded in one of the single-plane mapping table load instructions. 如申請專利範圍第2項所述的儲存控制器,其中在所述根據所述SMT清單產生所述映射表載入指令佇列的運作中,所述映射表管理電路單元辨識所述SMT清單的所述多個條目的所述多個系統實體位址各自所屬的平面為M個平面中的其中之一,其中所述映射表管理電路單元根據所述多個條目的排列順序,判斷鄰接在一第一目標條目後是否有一或多個第二目標條目,其中所述第一目標條目所對應的第一系統實體位址與所述一或多個第二目標條目所對應的一或多個第二系統實體位址分別屬於一個系統實體區塊的M個平面的M個實體頁面,其中反應於判定鄰接在所述第一目標條目後有所述一或多個第二目標條目,所述映射表管理電路單元記錄所述第一系統實體 位址與所述一或多個第二系統實體位址至一個所述多平面映射表載入指令,其中M為大於1的正整數,其中反應於判定鄰接在所述第一目標條目後沒有所述一或多個第二目標條目,所述映射表管理電路單元記錄所述第一系統實體位址至一個所述單平面映射表載入指令。 The storage controller described in claim 2, wherein in the operation of generating the mapping table load command queue according to the SMT list, the mapping table management circuit unit identifies the SMT list The plane to which the plurality of system entity addresses of the plurality of entries belong is one of the M planes, wherein the mapping table management circuit unit determines that the plurality of entries are adjacent to one another according to the arrangement order of the plurality of entries Whether there are one or more second target entries after the first target entry, wherein the first system entity address corresponding to the first target entry and one or more second target entries corresponding to the one or more second target entries The two system physical addresses respectively belong to M physical pages of M planes of a system physical block, wherein it is reflected in determining that there is one or more second target entries adjacent to the first target entry, and the mapping The table management circuit unit records the first system entity Address and the one or more second system physical addresses to one of the multi-plane mapping table load instructions, where M is a positive integer greater than 1, which is reflected in the determination that there is no adjacent address after the first target entry For the one or more second target entries, the mapping table management circuit unit records the physical address of the first system to a single-plane mapping table load instruction. 如申請專利範圍第1項所述的儲存控制器,其中所述映射表管理電路單元根據所述SMT清單產生一多個映射表位圖,其中所述多個映射表位圖分別對應至多個系統實體區塊,其中對應一個系統實體區塊的一個映射表位圖記錄分別對應至所述一個系統實體區塊的多個系統實體位址的多個位元值,其中所述多個位元值各自的數值包括0或1,其中為0的所述位元值用以表示所對應的系統實體位址儲存了無效的SL2P表或無效資料,並且為1的所述位元值用以表示所對應的系統實體位址儲存了有效的SL2P表。 The storage controller according to the first item of the patent application, wherein the mapping table management circuit unit generates a plurality of mapping table bitmaps according to the SMT list, wherein the plurality of mapping table bitmaps respectively correspond to multiple systems A physical block, wherein a mapping table bitmap corresponding to a system physical block records multiple bit values corresponding to multiple system physical addresses of the one system physical block, wherein the multiple bit values Each value includes 0 or 1, where the bit value of 0 is used to indicate that the corresponding system physical address stores an invalid SL2P table or invalid data, and the bit value of 1 is used to indicate all The corresponding system physical address stores a valid SL2P table. 如申請專利範圍第6項所述的儲存控制器,其中所述映射表管理電路單元根據所述多個映射表位圖產生對應所述多個系統實體區塊的映射表載入指令佇列,其中所述映射表載入指令佇列各自具有多個映射表載入指令,其中所述多個映射表載入指令各自包括單平面映射表載入指令與多平面映射表載入指令,其中當所述儲存裝置開啟時,所述映射表管理電路單元執行所述映射 表載入指令佇列,以從所述可複寫式非揮發性記憶體模組載入所述多個SL2P表至所述緩衝記憶體中。 According to the storage controller described in claim 6, wherein the mapping table management circuit unit generates a mapping table load instruction queue corresponding to the plurality of system physical blocks according to the plurality of mapping table bitmaps, The mapping table load instruction queues each have a plurality of mapping table load instructions, wherein each of the plurality of mapping table load instructions includes a single-plane mapping table load instruction and a multi-plane mapping table load instruction, where When the storage device is turned on, the mapping table management circuit unit executes the mapping A table load command queue is used to load the plurality of SL2P tables from the rewritable non-volatile memory module into the buffer memory. 如申請專利範圍第7項所述的儲存控制器,其中所述單平面映射表載入指令用以指示經由單平面讀取的方式,從對應的系統實體位址讀取所儲存的一個SL2P表,其中所述多平面映射表載入指令用以指示經由多平面讀取的方式,一同從對應的分別屬於M個平面的多個系統實體位址讀取所儲存的多個SL2P表,其中M為大於1的正整數。 The storage controller described in item 7 of the scope of patent application, wherein the single-plane mapping table load instruction is used to instruct to read a stored SL2P table from the corresponding system physical address via a single-plane reading method , Wherein the multi-plane mapping table load instruction is used to instruct to read through the multi-plane, read the stored multiple SL2P tables from the corresponding multiple system physical addresses respectively belonging to M planes, where M It is a positive integer greater than 1. 如申請專利範圍第7項所述的儲存控制器,其中在根據所述多個映射表位圖產生對應所述多個系統實體區塊的所述映射表載入指令佇列的運作中,針對所述多個映射表位圖中的對應至目標系統實體區塊的目標映射表位圖,所述映射表管理電路單元辨識依PxQ矩陣形式所排列的所述目標映射表位圖的多個目標位元值,其中P為所述目標系統實體區塊的多個目標系統實體頁面的總數量,並且所述多個目標系統實體頁面各自最多儲存Q個SL2P表至所述多個目標系統實體頁面各自的Q個系統實體位址,其中Q為正整數,所述映射表管理電路單元辨識PxQ矩陣中的M個子矩陣,其中所述M個子矩陣各自包括PxN個所述目標位元值,其中M*N等於Q,其中所述映射表管理電路單元根據每一個子矩陣的P個 行各自的所有的目標位元值的總和,由大至小,來重新排序每一個子矩陣的所述P個行,以獲得已調整目標映射表位圖,其中所述映射表管理電路單元根據所述已調整目標映射表位圖的已排序的P個行來產生對應所述已排序P個行的多個映射表載入指令,並且依序將所產生的所述多個映射表載入指令輸入至所述映射表載入指令佇列中,其中所述已排序的P個行中的一第一類型行的為1的一或多個位元值分佈於所述M個子矩陣中,並且對應所述第一類型行的為1的所述一或多個位元值的一或多個第一類型目標系統實體位址被記錄至所述映射表載入指令佇列中的一個所述多平面映射表載入指令,其中所述已排序的P個行中的一第二類型行的為1的一或多個位元值非分佈於所述M個子矩陣中,並且對應所述第二類型行的為1的所述一或多個位元值的一或多個第二類型目標系統實體位址被記錄至所述映射表載入指令佇列中的一個所述單平面映射表載入指令。 The storage controller according to item 7 of the scope of patent application, wherein in the operation of generating the mapping table load instruction queue corresponding to the plurality of system physical blocks according to the plurality of mapping table bitmaps, The target mapping table bitmap corresponding to the physical block of the target system in the multiple mapping table bitmaps, and the mapping table management circuit unit recognizes the multiple targets of the target mapping table bitmap arranged in the form of a PxQ matrix Bit value, where P is the total number of multiple target system physical pages of the target system physical block, and each of the multiple target system physical pages stores at most Q SL2P tables to the multiple target system physical pages Respective Q system physical addresses, where Q is a positive integer, the mapping table management circuit unit identifies M sub-matrices in the PxQ matrix, wherein each of the M sub-matrices includes PxN the target bit values, where M *N is equal to Q, where the mapping table management circuit unit is based on the P of each sub-matrix The sum of all the target bit values of each row, from large to small, to reorder the P rows of each sub-matrix to obtain the adjusted target mapping table bitmap, wherein the mapping table management circuit unit is based on The ordered P rows of the adjusted target mapping table bitmap are used to generate a plurality of mapping table load instructions corresponding to the ordered P rows, and the generated mapping tables are loaded in sequence The instruction is input into the mapping table loading instruction queue, wherein one or more bit values of 1 in a first type row among the P rows sorted are distributed in the M sub-matrices, And one or more first type target system physical addresses of the one or more bit values of 1 corresponding to the first type row are recorded in one of the mapping table load instruction queues The multi-plane mapping table load instruction, wherein one or more bit values of 1 in a second type row in the sorted P rows are not distributed in the M sub-matrices and correspond to the One or more second type target system physical addresses of the one or more bit values of the second type row are recorded to one of the single plane mappings in the mapping table load instruction queue Table load instructions. 如申請專利範圍第7項所述的儲存控制器,其中在根據所述多個映射表位圖產生對應所述多個系統實體區塊的多個映射表載入指令佇列的運作中,針對所述多個映射表位圖中的對應至目標系統實體區塊的目標映射表位圖,所述映射表管理電路單元辨識依PxQ矩陣形式所排列的 所述目標映射表位圖的多個目標位元值,其中P為所述目標系統實體區塊的多個目標系統實體頁面的總數量,並且所述多個目標系統實體頁面各自最多儲存Q個SL2P表至所述多個目標系統實體頁面各自的Q個系統實體位址,其中Q為正整數,其中所述映射表管理電路單元根據所述目標映射表位圖的P個行各自的所有的目標位元值的總和,由大至小,來重新排序所述目標映射表位圖的P個行,以獲得已調整目標映射表位圖,其中所述映射表管理電路單元根據所述已調整目標映射表位圖的已排序的P個行來產生對應所述已排序P個行的多個映射表載入指令,並且依序將所產生的所述多個映射表載入指令輸入至所述映射表載入指令佇列中,其中所述已排序的P個行中的一第一類型行的為1的一或多個位元值分佈於M個平面中,並且對應所述第一類型行的為1的所述一或多個位元值的一或多個第一類型目標系統實體位址被記錄至所述映射表載入指令佇列中的一個所述多平面映射表載入指令,其中所述已排序的P個行中的一第二類型行的為1的一或多個位元值非分佈於所述M個平面中,並且對應所述第二類型行的為1的所述一或多個位元值的一或多個第二類型目標系統實體位址被記錄至所述映射表載入指令佇列中的一個所述單平面映射表載入指令。 The storage controller according to item 7 of the scope of patent application, wherein in the operation of generating multiple mapping table load instruction queues corresponding to the multiple system physical blocks according to the multiple mapping table bitmaps, The target mapping table bitmap corresponding to the physical block of the target system among the plurality of mapping table bitmaps, and the mapping table management circuit unit recognizes the ones arranged in the form of PxQ matrix The multiple target bit values of the target mapping table bitmap, where P is the total number of multiple target system physical pages of the target system physical block, and each of the multiple target system physical pages stores at most Q The SL2P table to the Q system entity addresses of the multiple target system entity pages, where Q is a positive integer, and the mapping table management circuit unit is based on all the P rows of the target mapping table bitmap. The P rows of the target mapping table bitmap are reordered to obtain the adjusted target mapping table bitmap by the sum of the target bit values, from large to small, wherein the mapping table management circuit unit is based on the adjusted The sorted P rows of the target mapping table bitmap are used to generate a plurality of mapping table load instructions corresponding to the sorted P rows, and the generated mapping table load instructions are sequentially input to all The mapping table is loaded into the instruction queue, wherein one or more bit values of 1 in a first type row in the sorted P rows are distributed in M planes and correspond to the first The one or more first type target system physical addresses of the one or more bit values of 1 in the type row are recorded in one of the multi-plane mapping table loads in the mapping table load instruction queue Input instruction, wherein one or more bit values of 1 in a second type row in the P rows are not distributed in the M planes, and the row corresponding to the second type is One or more second-type target system physical addresses of the one or more bit values of 1 are recorded to one of the single-plane mapping table load instructions in the mapping table load instruction queue. 一種記憶體管理方法,適用於用以控制配置有一可複寫式非揮發性記憶體模組的一儲存裝置的儲存控制器,其中所述可複寫式非揮發性記憶體模組具有多個實體區塊,並且所述多個實體區塊各自具有多個實體頁面,所述方法包括:維護多個區段邏輯轉實體位址映射(Segment Logical To Physical addresses mapping,SL2P)表於所述儲存控制器的緩衝記憶體中,其中所述多個SL2P表各自用以記錄多個邏輯位址以及多個實體位址之間的映射關係,其中所述多個實體位址對應至一部份的所述多個實體頁面,並且所述多個邏輯位址對應至一部份的被配置給一主機系統的多個邏輯頁面;維護一區段映射表清單(Segment Mapping Table List,SMT清單)於所述緩衝記憶體中,其中所述SMT清單包括多個條目,其中所述多個條目分別對應所述多個SL2P表,並且所述多個條目各自包括系統區塊識別碼以及對應所述系統區塊識別碼的系統實體區塊中的系統實體位址;反應於所述多個SL2P表中的第一SL2P表被儲存至所述可複寫式非揮發性記憶體模組中的第一系統實體位址,記錄所述第一系統實體位址至所述SMT清單的所述多個條目中對應所述第一SL2P表的第一條目;以及儲存所述SMT清單至所述可複寫式非揮發性記憶體模組中。 A memory management method is suitable for a storage controller for controlling a storage device configured with a rewritable non-volatile memory module, wherein the rewritable non-volatile memory module has multiple physical areas Block, and the plurality of physical blocks each have a plurality of physical pages, the method includes: maintaining a plurality of segment logical to physical address mapping (Segment Logical To Physical addresses mapping, SL2P) tables in the storage controller In the buffer memory, each of the plurality of SL2P tables is used to record the mapping relationship between a plurality of logical addresses and a plurality of physical addresses, wherein the plurality of physical addresses correspond to a part of the Multiple physical pages, and the multiple logical addresses correspond to a part of multiple logical pages configured to a host system; maintain a segment mapping table list (Segment Mapping Table List, SMT list) in the In the buffer memory, the SMT list includes multiple entries, wherein the multiple entries respectively correspond to the multiple SL2P tables, and the multiple entries each include a system block identification code and a corresponding system block The system physical address in the system physical block of the identification code; the first SL2P table reflected in the plurality of SL2P tables is stored in the first system physical bit in the rewritable non-volatile memory module Record the address of the first system entity to the first entry of the first SL2P table among the entries in the SMT list; and store the SMT list in the rewritable non-volatile Sexual memory module. 如申請專利範圍第11項所述的記憶體管理方法,更包括: 根據所述SMT清單產生一映射表載入指令佇列,其中所述映射表載入指令佇列具有多個映射表載入指令,其中所述多個映射表載入指令各自包括單平面映射表載入指令與多平面映射表載入指令,其中當所述儲存裝置開啟時,所述映射表管理電路單元執行所述映射表載入指令佇列,以從所述可複寫式非揮發性記憶體模組載入所述多個SL2P表至所述緩衝記憶體中。 The memory management method described in item 11 of the scope of patent application further includes: Generate a mapping table load instruction queue according to the SMT list, wherein the mapping table load instruction queue has a plurality of mapping table load instructions, wherein each of the plurality of mapping table load instructions includes a single plane mapping table Load instruction and multi-plane mapping table load instruction, wherein when the storage device is turned on, the mapping table management circuit unit executes the mapping table load instruction queue to retrieve from the rewritable non-volatile memory The volume module loads the plurality of SL2P tables into the buffer memory. 如申請專利範圍第12項所述的記憶體管理方法,其中所述單平面映射表載入指令用以指示經由單平面讀取的方式,從對應的系統實體位址讀取所儲存的一個SL2P表,其中所述多平面映射表載入指令用以指示經由多平面讀取的方式,一同從對應的分別屬於M個平面的多個系統實體位址讀取所儲存的多個SL2P表,其中M為大於1的正整數。 The memory management method described in item 12 of the scope of the patent application, wherein the single-plane mapping table load instruction is used to instruct to read a stored SL2P from the corresponding system physical address via a single-plane reading method Table, wherein the multi-plane mapping table load instruction is used to instruct to read through the multi-plane mode, and read the stored multiple SL2P tables from corresponding multiple system physical addresses respectively belonging to M planes, wherein M is a positive integer greater than 1. 如申請專利範圍第12項所述的記憶體管理方法,其中所述根據所述SMT清單產生所述映射表載入指令佇列的步驟包括:辨識所述SMT清單的所述多個條目的所述多個系統實體位址各自所屬的平面為M個平面中的其中之一;從所述多個系統實體位址中選擇多組的M個多平面系統實體位址,其中所選擇的每一組的所述M個多平面系統實體位址分別屬於不同的所述M個平面,並且將所選擇的所述多組的所述M個多平面系統實體位址各自記錄至一個所述多平面映射表載入指令,其中M為大於1的正整數;以及 將所述多個系統實體位址中尚未被選擇的多個剩餘的系統實體位址各自記錄至一個所述單平面映射表載入指令。 The memory management method as described in item 12 of the scope of patent application, wherein the step of generating the mapping table load instruction queue according to the SMT list includes: identifying all of the multiple entries of the SMT list The plane to which each of the multiple system physical addresses belongs is one of the M planes; multiple sets of M multi-plane system physical addresses are selected from the multiple system physical addresses, and each of the selected The M multi-plane system physical addresses of the group belong to different M planes, and the M multi-plane system physical addresses of the selected groups are respectively recorded in one of the multi-planes A mapping table load instruction, where M is a positive integer greater than 1; and Recording a plurality of remaining system physical addresses that have not been selected among the plurality of system physical addresses into one single plane mapping table load instruction. 如申請專利範圍第12項所述的記憶體管理方法,其中所述根據所述SMT清單產生所述映射表載入指令佇列的步驟包括:辨識所述SMT清單的所述多個條目的所述多個系統實體位址各自所屬的平面為M個平面中的其中之一;根據所述多個條目的排列順序,判斷鄰接在一第一目標條目後是否有一或多個第二目標條目,其中所述第一目標條目所對應的第一系統實體位址與所述一或多個第二目標條目所對應的一或多個第二系統實體位址分別屬於一個系統實體區塊的M個平面的M個實體頁面;反應於判定鄰接在所述第一目標條目後有所述一或多個第二目標條目,記錄所述第一系統實體位址與所述一或多個第二系統實體位址至一個所述多平面映射表載入指令,其中M為大於1的正整數;以及反應於判定鄰接在所述第一目標條目後沒有所述一或多個第二目標條目,記錄所述第一系統實體位址至一個所述單平面映射表載入指令。 The memory management method as described in item 12 of the scope of patent application, wherein the step of generating the mapping table load instruction queue according to the SMT list includes: identifying all of the multiple entries of the SMT list The plane to which the multiple system entity addresses belong is one of the M planes; according to the arrangement order of the multiple entries, it is determined whether there is one or more second target entries adjacent to the first target entry, The first system physical address corresponding to the first target entry and the one or more second system physical addresses corresponding to the one or more second target entries respectively belong to M of a system physical block M physical pages of the plane; in response to determining that the one or more second target entries are adjacent to the first target entry, recording the physical address of the first system and the one or more second systems Physical address to one of the multi-plane mapping table load instructions, where M is a positive integer greater than 1; and in response to determining that there is no one or more second target entries adjacent to the first target entry, record The first system physical address is to a single plane mapping table load instruction. 如申請專利範圍第11項所述的記憶體管理方法,更包括:根據所述SMT清單產生一多個映射表位圖,其中所述多個映 射表位圖分別對應至多個系統實體區塊,其中對應一個系統實體區塊的一個映射表位圖記錄分別對應至所述一個系統實體區塊的多個系統實體位址的多個位元值,其中所述多個位元值各自的數值包括0或1,其中為0的所述位元值用以表示所對應的系統實體位址儲存了無效的SL2P表或無效資料,並且為1的所述位元值用以表示所對應的系統實體位址儲存了有效的SL2P表。 As described in item 11 of the scope of patent application, the memory management method further includes: generating a plurality of mapping table bitmaps according to the SMT list, wherein the plurality of mapping table The mapping table bitmap corresponds to a plurality of system physical blocks, wherein a mapping table bitmap record corresponding to a system physical block corresponds to a plurality of bit values of a plurality of system physical addresses of the one system physical block. , Wherein the respective values of the multiple bit values include 0 or 1, and the bit value of 0 is used to indicate that the corresponding system physical address stores invalid SL2P tables or invalid data, and is 1 The bit value is used to indicate that the corresponding system physical address stores a valid SL2P table. 如申請專利範圍第16項所述的記憶體管理方法,更包括:根據所述多個映射表位圖產生對應所述多個系統實體區塊的映射表載入指令佇列,其中所述映射表載入指令佇列各自具有多個映射表載入指令,其中所述多個映射表載入指令各自包括單平面映射表載入指令與多平面映射表載入指令,其中當所述儲存裝置開啟時,執行所述映射表載入指令佇列,以從所述可複寫式非揮發性記憶體模組載入所述多個SL2P表至所述緩衝記憶體中。 According to the 16th item of the scope of patent application, the memory management method further includes: generating a mapping table load instruction queue corresponding to the plurality of system physical blocks according to the plurality of mapping table bitmaps, wherein the mapping The table load command queues each have a plurality of mapping table load commands, wherein each of the plurality of mapping table load commands includes a single-plane mapping table load command and a multi-plane mapping table load command, wherein when the storage device When it is turned on, the mapping table loading command queue is executed to load the plurality of SL2P tables from the rewritable non-volatile memory module into the buffer memory. 如申請專利範圍第17項所述的記憶體管理方法,其中所述單平面映射表載入指令用以指示經由單平面讀取的方式,從對應的系統實體位址讀取所儲存的一個SL2P表,其中所述多平面映射表載入指令用以指示經由多平面讀取的方式,一同從對應的分別屬於M個平面的多個系統實體位址讀取所儲存的多個SL2P表,其中M為大於1的正整數。 The memory management method described in item 17 of the scope of patent application, wherein the single-plane mapping table load instruction is used to instruct to read a stored SL2P from the corresponding system physical address via a single-plane reading method Table, wherein the multi-plane mapping table load instruction is used to instruct to read through the multi-plane mode, and read the stored multiple SL2P tables from corresponding multiple system physical addresses respectively belonging to M planes, wherein M is a positive integer greater than 1. 如申請專利範圍第17項所述的記憶體管理方法,其中所述根據所述多個映射表位圖產生對應所述多個系統實體區塊的所述映射表載入指令佇列的步驟包括:針對所述多個映射表位圖中的對應至目標系統實體區塊的目標映射表位圖,辨識依PxQ矩陣形式所排列的所述目標映射表位圖的多個目標位元值,其中P為所述目標系統實體區塊的多個目標系統實體頁面的總數量,並且所述多個目標系統實體頁面各自最多儲存Q個SL2P表至所述多個目標系統實體頁面各自的Q個系統實體位址,其中Q為正整數;辨識PxQ矩陣中的M個子矩陣,其中所述M個子矩陣各自包括PxN個所述目標位元值,其中M*N等於Q;根據每一個子矩陣的P個行各自的所有的目標位元值的總和,由大至小,來重新排序每一個子矩陣的所述P個行,以獲得已調整目標映射表位圖;以及根據所述已調整目標映射表位圖的已排序的P個行來產生對應所述已排序P個行的多個映射表載入指令,並且依序將所產生的所述多個映射表載入指令輸入至所述映射表載入指令佇列,其中所述已排序的P個行中的一第一類型行的為1的一或多個位元值分佈於所述M個子矩陣中,並且對應所述第一類型行的為1的所述一或多個位元值的一或多個第一類型目標系統 實體位址被記錄至所述映射表載入指令佇列中的一個所述多平面映射表載入指令,其中所述已排序的P個行中的一第二類型行的為1的一或多個位元值非分佈於所述M個子矩陣中,並且對應所述第二類型行的為1的所述一或多個位元值的一或多個第二類型目標系統實體位址被記錄至所述映射表載入指令佇列中的一個所述單平面映射表載入指令。 The memory management method according to claim 17, wherein the step of generating the mapping table load instruction queue corresponding to the plurality of system physical blocks according to the plurality of mapping table bitmaps includes : For the target mapping table bitmaps corresponding to the physical block of the target system in the plurality of mapping table bitmaps, identify the multiple target bit values of the target mapping table bitmaps arranged in the form of a PxQ matrix, where P is the total number of multiple target system physical pages of the target system physical block, and each of the multiple target system physical pages stores a maximum of Q SL2P tables to the respective Q systems of the multiple target system physical pages Physical address, where Q is a positive integer; identify the M sub-matrices in the PxQ matrix, wherein each of the M sub-matrices includes PxN the target bit values, where M*N is equal to Q; according to the P of each sub-matrix The sum of all the target bit values of each row, from large to small, to reorder the P rows of each sub-matrix to obtain an adjusted target mapping table bit map; and according to the adjusted target mapping P rows of the epitope map are sorted to generate a plurality of mapping table load instructions corresponding to the sorted P rows, and the generated mapping table load instructions are sequentially input to the mapping The table load command queue, wherein one or more bit values of 1 in a first type row in the P rows are distributed in the M sub-matrices and correspond to the first type One or more target systems of the first type with the one or more bit values of 1 The physical address is recorded in one of the multi-plane mapping table load instructions in the mapping table load instruction queue, wherein one of the second type rows in the ordered P rows is one or Multiple bit values are not distributed in the M sub-matrices, and one or more second type target system physical addresses of the one or more bit values of 1 corresponding to the second type row are One of the single-plane mapping table load instructions recorded in the mapping table load instruction queue. 如申請專利範圍第17項所述的記憶體管理方法,其中所述根據所述多個映射表位圖產生對應所述多個系統實體區塊的所述映射表載入指令佇列的步驟包括:針對所述多個映射表位圖中的對應至目標系統實體區塊的目標映射表位圖,辨識依PxQ矩陣形式所排列的所述目標映射表位圖的多個目標位元值,其中P為所述目標系統實體區塊的多個目標系統實體頁面的總數量,並且所述多個目標系統實體頁面各自最多儲存Q個SL2P表至所述多個目標系統實體頁面各自的Q個系統實體位址,其中Q為正整數;根據所述目標映射表位圖的P個行各自的所有的目標位元值的總和,由大至小,來重新排序所述目標映射表位圖的P個行,以獲得已調整目標映射表位圖;以及根據所述已調整目標映射表位圖的已排序的P個行來產生對應所述已排序P個行的多個映射表載入指令,並且依序將 所產生的所述多個映射表載入指令輸入至所述映射表載入指令佇列,其中所述已排序的P個行中的一第一類型行的為1的一或多個位元值分佈於M個平面中,並且對應所述第一類型行的為1的所述一或多個位元值的一或多個第一類型目標系統實體位址被記錄至所述映射表載入指令佇列中的一個所述多平面映射表載入指令,其中所述已排序的P個行中的一第二類型行的為1的一或多個位元值非分佈於所述M個平面中,並且對應所述第二類型行的為1的所述一或多個位元值的一或多個第二類型目標系統實體位址被記錄至所述映射表載入指令佇列中的一個所述單平面映射表載入指令。 The memory management method according to claim 17, wherein the step of generating the mapping table load instruction queue corresponding to the plurality of system physical blocks according to the plurality of mapping table bitmaps includes : For the target mapping table bitmaps corresponding to the physical block of the target system in the plurality of mapping table bitmaps, identify the multiple target bit values of the target mapping table bitmaps arranged in the form of a PxQ matrix, where P is the total number of multiple target system physical pages of the target system physical block, and each of the multiple target system physical pages stores a maximum of Q SL2P tables to the respective Q systems of the multiple target system physical pages Physical address, where Q is a positive integer; according to the sum of all the target bit values of the P rows of the target mapping table bitmap, from large to small, reorder the P of the target mapping table bitmap Rows to obtain the adjusted target mapping table bitmap; and according to the ordered P rows of the adjusted target mapping table bitmap to generate a plurality of mapping table load instructions corresponding to the ordered P rows, And in turn The generated multiple mapping table load instructions are input to the mapping table load instruction queue, wherein one or more bits of 1 in a first type row in the sorted P rows Values are distributed in M planes, and one or more first-type target system physical addresses corresponding to the one or more bit values of 1 in the first-type row are recorded in the mapping table Enter one of the multi-plane mapping table load instructions in the instruction queue, wherein one or more bit values of 1 in a second type row in the P rows are not distributed in the M One or more second-type target system physical addresses of the one or more bit values of 1 in each plane in the second-type row are recorded in the mapping table load instruction queue One of the single-plane mapping table load instructions. 一種儲存裝置,所述儲存裝置包括:一可複寫式非揮發性記憶體模組,其中所述可複寫式非揮發性記憶體模組具有多個實體區塊,並且所述多個實體區塊各自具有多個實體頁面;以及一儲存控制器,耦接至所述可複寫式非揮發性記憶體模組,其中所述儲存控制器用以維護多個區段邏輯轉實體位址映射(Segment Logical To Physical addresses mapping,SL2P)表於一緩衝記憶體中,其中所述多個SL2P表各自用以記錄多個邏輯位址以及多個實體位址之間的映射關係,其中所述多個實體位址對應至一部份的所述多個實體頁面,並且所述多個邏輯位址對應至一 部份的被配置給一主機系統的多個邏輯頁面,其中所述儲存控制器更用以維護一區段映射表清單(Segment Mapping Table List,SMT清單)於所述緩衝記憶體中,其中所述SMT清單包括多個條目,其中所述多個條目分別對應所述多個SL2P表,並且所述多個條目各自包括系統區塊識別碼以及對應所述系統區塊識別碼的系統實體區塊中的系統實體位址,其中反應於所述多個SL2P表中的第一SL2P表被儲存至所述可複寫式非揮發性記憶體模組中的第一系統實體位址,所述儲存控制器更用以記錄所述第一系統實體位址至所述SMT清單的所述多個條目中對應所述第一SL2P表的第一條目,其中所述儲存控制器更用以儲存所述SMT清單至所述可複寫式非揮發性記憶體模組中。 A storage device, the storage device comprising: a rewritable non-volatile memory module, wherein the rewritable non-volatile memory module has a plurality of physical blocks, and the plurality of physical blocks Each has a plurality of physical pages; and a storage controller coupled to the rewritable non-volatile memory module, wherein the storage controller is used to maintain a plurality of segment logical to physical address mappings (Segment Logical Address Mapping). To Physical addresses mapping (SL2P) table is in a buffer memory, wherein each of the plurality of SL2P tables is used to record a plurality of logical addresses and a mapping relationship between a plurality of physical addresses, wherein the plurality of physical addresses Addresses correspond to a part of the multiple physical pages, and the multiple logical addresses correspond to a Part of it is allocated to multiple logical pages of a host system, wherein the storage controller is further used to maintain a segment mapping table list (Segment Mapping Table List, SMT list) in the buffer memory. The SMT list includes multiple entries, wherein the multiple entries respectively correspond to the multiple SL2P tables, and each of the multiple entries includes a system block identification code and a system entity block corresponding to the system block identification code The first SL2P table reflected in the plurality of SL2P tables is stored to the first system physical address in the rewritable non-volatile memory module, and the storage controls The device is further used to record the first system physical address to the first entry of the first SL2P table in the plurality of entries in the SMT list, wherein the storage controller is further used to store the SMT list to the rewritable non-volatile memory module.
TW108147734A 2019-12-26 2019-12-26 Storage controller, memory management method and storage device TWI717953B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW108147734A TWI717953B (en) 2019-12-26 2019-12-26 Storage controller, memory management method and storage device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW108147734A TWI717953B (en) 2019-12-26 2019-12-26 Storage controller, memory management method and storage device

Publications (2)

Publication Number Publication Date
TWI717953B true TWI717953B (en) 2021-02-01
TW202125263A TW202125263A (en) 2021-07-01

Family

ID=75745577

Family Applications (1)

Application Number Title Priority Date Filing Date
TW108147734A TWI717953B (en) 2019-12-26 2019-12-26 Storage controller, memory management method and storage device

Country Status (1)

Country Link
TW (1) TWI717953B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI817315B (en) * 2021-12-29 2023-10-01 大陸商合肥兆芯電子有限公司 Mapping table management method, memory control circuit unit and memory storage device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW200951711A (en) * 2008-06-02 2009-12-16 A Data Technology Co Ltd Method for memory space management
TW201044170A (en) * 2009-06-06 2010-12-16 A Data Technology Co Ltd An electronic memory device and operation method thereof
WO2012094481A2 (en) * 2011-01-06 2012-07-12 Micron Technology, Inc. Memory address translation
US20170102896A1 (en) * 2015-10-12 2017-04-13 Sandisk Technologies Inc. Systems and methods of storing data

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW200951711A (en) * 2008-06-02 2009-12-16 A Data Technology Co Ltd Method for memory space management
TW201044170A (en) * 2009-06-06 2010-12-16 A Data Technology Co Ltd An electronic memory device and operation method thereof
WO2012094481A2 (en) * 2011-01-06 2012-07-12 Micron Technology, Inc. Memory address translation
US20130227247A1 (en) * 2011-01-06 2013-08-29 Micron Technology, Inc. Memory address translation
US20170102896A1 (en) * 2015-10-12 2017-04-13 Sandisk Technologies Inc. Systems and methods of storing data
WO2017065918A1 (en) * 2015-10-12 2017-04-20 Sandisk Technologies Llc Systems and methods of storing data

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI817315B (en) * 2021-12-29 2023-10-01 大陸商合肥兆芯電子有限公司 Mapping table management method, memory control circuit unit and memory storage device

Also Published As

Publication number Publication date
TW202125263A (en) 2021-07-01

Similar Documents

Publication Publication Date Title
US10120615B2 (en) Memory management method and storage controller using the same
US9983799B2 (en) Trim command processing method, memory control circuit unit and memory storage apparatus
US9940189B2 (en) Method and system for data rebuilding and memory control circuit unit thereof
US9952806B2 (en) Mapping table loading method and memory storage apparatus
US9880742B2 (en) Valid data merging method, memory controller and memory storage apparatus
US9122498B2 (en) Firmware code loading method, memory controller and memory storage apparatus
US10303367B2 (en) Mapping table updating method without updating the first mapping information, memory control circuit unit and memory storage device
TWI661299B (en) Memory management method and storage controller
US10635358B2 (en) Memory management method and storage controller
US8589619B2 (en) Data writing method, memory controller, and memory storage apparatus
US10324651B2 (en) Data transmission method, and storage controller and list management circuit using the same
US20180024738A1 (en) Data reading method, data writing method and storage controller using the same
US9947412B1 (en) Data writing method, memory control circuit unit and memory storage apparatus
US10564899B2 (en) Data writing method for rewritable non-volatile memory modules based on use information, memory storage device and memory control circuit unit
CN106708416B (en) Data reconstruction method and system and memory control circuit unit thereof
US11467758B2 (en) Data writing method using different programming modes based on the number of available physical erasing units, memory control circuit unit and memory storage device
US20150161042A1 (en) Memory management method, memory controlling circuit unit, and memory storage device
CN113900582A (en) Data processing method and corresponding data storage device
US10509583B1 (en) Memory management method and storage controller
CN110471612B (en) Memory management method and memory controller
CN111258505A (en) Data merging method, control circuit unit and storage device of flash memory
US20190243774A1 (en) Memory manage method and storage controller using the same
TWI717953B (en) Storage controller, memory management method and storage device
US10001928B2 (en) Memory management method, memory control circuit unit and memory storage device
US10635583B2 (en) Memory management method and storage controller