TW202121176A - Data storage device and non-volatile memory control method - Google Patents

Data storage device and non-volatile memory control method Download PDF

Info

Publication number
TW202121176A
TW202121176A TW109117980A TW109117980A TW202121176A TW 202121176 A TW202121176 A TW 202121176A TW 109117980 A TW109117980 A TW 109117980A TW 109117980 A TW109117980 A TW 109117980A TW 202121176 A TW202121176 A TW 202121176A
Authority
TW
Taiwan
Prior art keywords
trimming
length
bit
volatile memory
information
Prior art date
Application number
TW109117980A
Other languages
Chinese (zh)
Other versions
TWI745987B (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 US17/025,004 priority Critical patent/US11748023B2/en
Priority to CN202011173409.5A priority patent/CN112885397B/en
Publication of TW202121176A publication Critical patent/TW202121176A/en
Application granted granted Critical
Publication of TWI745987B publication Critical patent/TWI745987B/en

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

Power recovery for an efficient trimming technology of data storage device is shown. A controller scans a non-volatile memory according to a programming order, collects a sequence of trimming information flags, and interprets a sequence of storage information scanned from the non-volatile memory to identify logical addresses and trimming codes. Based on the logical addresses, a host-to-device mapping (H2F) table is rebuilt. Based on the trimming codes, information of medium-length trimming and information of large-scale trimming are recognized from the corresponding storage space of the non-volatile memory. According to the information of medium-length trimming, dummy mapping data is programmed to the H2F table. According to the information of large-scale trimming, a trimming bit map (TBM) table is rebuilt. Each bit in the TBM table corresponds to trimming of a first length.

Description

資料儲存裝置以及非揮發式記憶體控制方法Data storage device and non-volatile memory control method

本案係有關於資料儲存裝置之修整(trimming)技術。This case is related to the trimming technology of data storage devices.

非揮發式記憶體有多種形式─例如,快閃記憶體(flash memory)、磁阻式隨機存取記憶體(Magnetoresistive RAM)、鐵電隨機存取記憶體(Ferroelectric RAM)、電阻式隨機存取記憶體(Resistive  RAM)、自旋轉移力矩隨機存取記憶體(Spin Transfer Torque-RAM, STT-RAM)…等,用於長時間資料保存,可做為儲存媒體實現一資料儲存裝置。Non-volatile memory has many forms-for example, flash memory, magnetoresistive RAM, ferroelectric RAM, resistive random access Memory (Resistive RAM), Spin Transfer Torque-RAM (STT-RAM), etc., are used for long-term data storage and can be used as storage media to realize a data storage device.

非揮發式記憶體通常有其特殊的儲存特性。本技術領域需要相應非揮發式記憶體的儲存特性發展相應的控制技術。例如,符合非揮發式記憶體儲存特性的修整(trimming)技術。Non-volatile memory usually has its special storage characteristics. The technical field needs to develop corresponding control technology corresponding to the storage characteristics of non-volatile memory. For example, a trimming technology that meets the storage characteristics of non-volatile memory.

本案相應一種高效修整技術,提出一種復電技術。Corresponding to a high-efficiency repairing technology, this case proposes a power recovery technology.

根據本案一種實施方式實現的一資料儲存裝置包括一非揮發式記憶體、以及耦接該非揮發式記憶體的一控制器以及一暫存記憶體。該控制器係建構來在該暫存記憶體上重建該非揮發式記憶體的修整狀況。該控制器根據一程式化順序掃描該非揮發式記憶體,收集一串修整資訊旗標,據以解讀自該非揮發式記憶體掃描出的一串儲存資訊為邏輯位址、或是修整代號。該控制器根據解讀出的邏輯位址重建一主機-裝置映射表。該控制器根據解讀出的修整代號,判斷該非揮發式記憶體相應儲存空間係儲存中等長度修整之資訊、或大量修整之資訊。根據中等長度修整之資訊,該控制器將虛置映射資料填入該主機-裝置映射表。根據大量修整之資訊,該控制器重建一修整位元總表,該修整位元總表各位元對應一第一長度之修整。A data storage device implemented according to an embodiment of the present application includes a non-volatile memory, a controller coupled to the non-volatile memory, and a temporary memory. The controller is constructed to reconstruct the trim condition of the non-volatile memory on the temporary memory. The controller scans the non-volatile memory according to a programmed sequence, collects a series of trimming information flags, and interprets the series of stored information scanned from the non-volatile memory as logical addresses or trim codes. The controller reconstructs a host-device mapping table according to the decoded logical address. The controller determines whether the corresponding storage space of the non-volatile memory stores medium-length trimmed information or a large amount of trimmed information based on the decoded trim code. Based on the medium-length trimmed information, the controller fills the host-device mapping table with dummy mapping data. According to a large amount of trimming information, the controller rebuilds a trimming bit summary table, and each bit of the trimming bit summary table corresponds to a trimming of a first length.

一種實施方式中,一筆中等長度修整不超過該第一長度,且對齊一第二長度之分界。一筆中等長度修整之資訊包括該筆中等長度修整的起始邏輯位址以及長度。上述修整代號為一中等長度修整代號時,該控制器判斷該非揮發式記憶體相應儲存空間係儲存一筆中等長度修整的起始邏輯位址以及長度。In one embodiment, a stroke of intermediate length trimming does not exceed the first length, and is aligned with a boundary of a second length. The information of a mid-length trim includes the starting logical address and length of the mid-length trim. When the above-mentioned trimming code is a medium-length trimming code, the controller determines that the corresponding storage space of the non-volatile memory stores a medium-length trimmed initial logical address and length.

一種實施方式中,一筆大量修整對齊該第一長度之分界、且為該第一長度之N倍,對應該修整位元總表的N個位元,N為正整數。該修整位元總表包括複數個修整位元子表。上述N個位元對應到該等修整位元子表其中M個修整位元子表,M為正整數。該筆大量修整之資訊包括上述M個修整位元子表。上述修整代號為上述M個修整位元子表的M個子表編號時,該控制器判斷該非揮發式記憶體相應儲存空間係儲存上述M個修整位元子表。In one embodiment, a large amount of trimming is aligned with the boundary of the first length and is N times the first length, corresponding to N bits of the trimming bit table, and N is a positive integer. The total table of trimming bits includes a plurality of sub-tables of trimming bits. The above-mentioned N bits correspond to the M trimming bit subtables among the trimming bit subtables, and M is a positive integer. The large amount of trimmed information includes the above-mentioned M trimming bit subtables. When the dressing code is the M sub-table numbers of the M dressing bit sub-tables, the controller determines that the corresponding storage space of the non-volatile memory stores the M dressing bit sub-tables.

一種實施方式中,該主機-裝置映射表包括複數個映射子表。各映射子表以該第二長度為單位,管理該第一長度之邏輯位址區間的映射資料。In one embodiment, the host-device mapping table includes a plurality of mapping sub-tables. Each mapping sub-table uses the second length as a unit to manage the mapping data of the logical address interval of the first length.

以上控制該非揮發式記憶體的控制器也可以由其他架構實現。本案更可以前述概念實現非揮發式記憶體的控制方法。The above controller for controlling the non-volatile memory can also be implemented by other architectures. In this case, the aforementioned concept can be used to realize the control method of non-volatile memory.

下文特舉實施例,並配合所附圖示,詳細說明本發明內容。Hereinafter, specific embodiments are given in conjunction with the accompanying drawings to illustrate the content of the present invention in detail.

以下敘述列舉本發明的多種實施例。以下敘述介紹本發明的基本概念,且並非意圖限制本發明內容。實際發明範圍應依照申請專利範圍界定之。The following description lists various embodiments of the present invention. The following description introduces the basic concept of the present invention, and is not intended to limit the content of the present invention. The actual scope of the invention should be defined in accordance with the scope of the patent application.

非揮發式記憶體可以是快閃記憶體(Flash Memory)、磁阻式隨機存取記憶體(Magnetoresistive RAM)、鐵電隨機存取記憶體(Ferroelectric RAM)、電阻式記憶體(Resistive RAM,RRAM)、自旋轉移力矩隨機存取記憶體(Spin Transfer Torque-RAM, STT-RAM)…等,提供長時間資料保存之儲存媒體。以下特別以快閃記憶體為例進行討論。Non-volatile memory can be Flash Memory, Magnetoresistive RAM, Ferroelectric RAM, Resistive RAM, RRAM ), Spin Transfer Torque-RAM (STT-RAM), etc., provide storage media for long-term data storage. The following discussion takes the flash memory as an example.

現今資料儲存裝置常以快閃記憶體為儲存媒體,實現記憶卡(Memory Card)、通用序列匯流排閃存裝置(USB Flash Device)、固態硬碟(SSD) …等產品。有一種應用是採多晶片封裝、將快閃記憶體與其控制器包裝在一起─稱為嵌入式快閃記憶體模組(如eMMC)。Nowadays, data storage devices often use flash memory as storage media to realize products such as Memory Card, USB Flash Device, and Solid State Drive (SSD). One application is to use multi-chip packaging to package flash memory and its controller together-called embedded flash memory modules (such as eMMC).

以快閃記憶體為儲存媒體的資料儲存裝置可應用於多種電子裝置中。所述電子裝置包括智慧型手機、穿戴裝置、平板電腦、虛擬實境設備…等。電子裝置的運算模塊可視為主機(Host),操作所使用的資料儲存裝置,以存取其中快閃記憶體。The data storage device using flash memory as the storage medium can be applied to a variety of electronic devices. The electronic devices include smart phones, wearable devices, tablet computers, virtual reality equipment, etc. The computing module of the electronic device can be regarded as a host, which operates the data storage device used to access the flash memory therein.

以快閃記憶體為儲存媒體的資料儲存裝置也可用於建構資料中心。例如,伺服器可操作固態硬碟(SSD)陣列形成資料中心。伺服器即可視為主機,操作所連結之固態硬碟,以存取其中快閃記憶體。Data storage devices using flash memory as storage media can also be used to construct data centers. For example, the server can operate a solid state drive (SSD) array to form a data center. The server can be regarded as the host, operating the connected solid-state drive to access the flash memory.

快閃記憶體有其特殊的儲存特性,以下敘述之。Flash memory has its special storage characteristics, which are described below.

主機(Host)端是以邏輯位址(例如,邏輯區塊位址LBA或全域主機頁編號GHP…等)來區別資料。至於資料實際儲存在快閃記憶體何處,則是以映射方式管理。The host side uses logical addresses (for example, logical block address LBA or global host page number GHP... etc.) to distinguish data. As for where the data is actually stored in the flash memory, it is managed by mapping.

快閃記憶體之物理空間是劃分為複數個區塊(Blocks)配置使用。第1圖圖解快閃記憶體中區塊Blk之結構。The physical space of the flash memory is divided into a plurality of blocks (Blocks) for allocation. Figure 1 illustrates the structure of the block Blk in the flash memory.

區塊Blk包括複數頁面(Pages),例如,頁面0…頁面255。各頁面包括複數個區段(Sectors),例如32個區段。每一區段可儲存512B長度的使用者資料;一頁面可供應16KB儲存空間。一種實施方式係根據頁面編號─由低編號至高編號─循序使用一區塊(Blk)的儲存空間。或者,某些實施方式使用的是數據吞吐量大幅提升的多通道技術,係將不同通道存取的區塊視為一個超級區塊(Super Block),將不同通道之間的頁面視為超級頁面(Super Page)。多通道技術可根據超級頁面編號─由低編號至高編號─循序使用一超級區塊的儲存空間。以下討論所指區塊也可以是超級區塊。The block Blk includes a plurality of pages (Pages), for example, page 0...page 255. Each page includes a plurality of sectors (Sectors), for example, 32 sectors. Each section can store 512B of user data; one page can provide 16KB of storage space. One implementation method is to sequentially use a block (Blk) of storage space according to the page number-from low number to high number -. Or, some implementations use a multi-channel technology with greatly improved data throughput, which regards blocks accessed by different channels as a super block, and treats pages between different channels as super pages. (Super Page). Multi-channel technology can use the storage space of a super block sequentially according to the super page number-from low number to high number. The block referred to in the following discussion can also be a super block.

一種實施方式中,一區段(512B) 可對應一個邏輯區塊位址LBA。以4KB資料管理模式為例,八個連續區段組成的4KB空間為一資料管理單元,對應八個連續邏輯區塊位址LBAs之數據儲存,即對應一個全域主機頁編號GHP。一頁面的四段資料管理單元(共16KB)可對應四個全域主機頁編號GHPs。如第1圖所示,區塊Blk包括一閒置區域(spare area)Spare_Area,由各頁末端閒置空間組成,其中可標註對應頁面的四段資料管理單元所對應的四個全域主機頁編號GHPs。一種實施方式是在閒置區域Spare_Area為各段4KB資料管理單元規劃4B的全域主機頁編號GHP欄位(GHP entry)。除了載於該閒置區域Spare_Area,整個區塊Blk空間所映射的全域主機頁編號GHPs也可編排為區塊結尾資訊(end-of-block information,簡稱EoB),載於該區塊Blk最末的頁面255。閒置區域Spare_Area、或區塊結尾資訊(EoB)之全域主機頁編號GHPs記錄就是用於追蹤物理空間以及邏輯位址之間複雜的映射關係。In one embodiment, one sector (512B) can correspond to one logical block address LBA. Taking the 4KB data management mode as an example, a 4KB space composed of eight consecutive sections is a data management unit, corresponding to the data storage of eight consecutive logical block addresses LBAs, which corresponds to a global host page number GHP. One page of four-segment data management unit (16KB in total) can correspond to four global host page numbers GHPs. As shown in Figure 1, the block Blk includes a spare area Spare_Area, which is composed of spare spaces at the end of each page, and four global host page numbers GHPs corresponding to the four-segment data management unit of the corresponding page can be marked. One implementation is to plan a 4B global host page number GHP entry (GHP entry) for each section of 4KB data management unit in the spare area Spare_Area. In addition to being contained in the spare area Spare_Area, the global host page numbers GHPs mapped to the entire block Blk space can also be arranged as end-of-block information (EoB), which is contained in the last Blk of the block Page 255. Spare_Area, or the global host page number GHPs record of the end of block information (EoB) is used to track the complex mapping relationship between the physical space and the logical address.

特別是,快閃記憶體有一項重要特性,就是同樣邏輯位址的資料更新並非覆寫至舊資料的儲存空間。新版本的資料須寫入空白的空間。舊空間的內容無效。一區塊可能僅零星留存有效資料。由於快閃記憶體的儲存空間需抹除(erase)後方能再次使用,備用區塊逐漸消耗。備用區塊數量不足時(如,低於閥值),垃圾回收(Garbage Collection)需求產生。一區塊留存的零星有效資料經垃圾回收集中到其他空間。徒留無效資料的區塊則抹除釋出,拉升備用區塊數量,確保快閃記憶體之正常使用。垃圾回收也可能使得同區塊內容的邏輯順序更跳躍。In particular, an important feature of flash memory is that data updates with the same logical address are not overwritten to the storage space of the old data. The data of the new version must be written into the blank space. The content of the old space is invalid. A block may only retain valid data sporadically. Since the storage space of the flash memory needs to be erased before it can be used again, the spare blocks are gradually consumed. When the number of spare blocks is insufficient (for example, lower than the threshold), garbage collection (Garbage Collection) is required. The scattered valid data stored in one block is collected in other spaces through garbage collection. Blocks with invalid data are erased and released, increasing the number of spare blocks to ensure the normal use of flash memory. Garbage collection may also make the logical order of the contents of the same block jump more.

由前述內容可知,快閃記憶體的空間配置相當複雜。一種實施方式是除了維護前述物理至邏輯映射的資訊外(例如,為各4KB資料管理單元所儲存的4B全域主機頁編號GHP),更反向建立一主機-裝置映射表;如,一主機-快閃記憶體映射表(host-to-flash mapping table,H2F映射表),顯示主機操作用之全域主機頁編號GHP是映射到快閃記憶體哪些實體位址。It can be seen from the foregoing that the spatial configuration of flash memory is quite complicated. One implementation is to maintain the aforementioned physical-to-logical mapping information (for example, the 4B global host page number GHP stored for each 4KB data management unit), and create a host-device mapping table in the reverse direction; for example, a host- The host-to-flash mapping table (host-to-flash mapping table, H2F mapping table) shows which physical addresses of the flash memory the global host page number GHP used for host operation is mapped to.

然而,隨著製程進步,快閃記憶體尺寸越來越大。4TB的快閃記憶體,其主機-快閃記憶體映射表H2F會達4GB。8TB的快閃記憶體,其主機-快閃記憶體映射表H2F會達8GB。過分龐大的主機-快閃記憶體映射表H2F不容易動態管理。However, as the manufacturing process progresses, the size of the flash memory is getting larger and larger. For 4TB flash memory, the host-flash memory mapping table H2F will reach 4GB. For 8TB flash memory, the host-flash memory mapping table H2F will reach 8GB. The oversized host-flash memory mapping table H2F is not easy to dynamically manage.

一種解決方案是將主機-快閃記憶體映射表H2F切分為較小尺寸的映射子表,例如,對應不同邏輯位址群組G#(#為編號)的映射子表H2F_G#。被呼叫到的映射子表H2F_G#才載出參考或更新。相較於完整的主機-快閃記憶體映射表H2F,映射子表H2F_G#的動態更新只耗費少量系統資源。One solution is to divide the host-flash memory mapping table H2F into smaller-sized mapping sub-tables, for example, mapping sub-tables H2F_G# corresponding to different logical address groups G# (# is a number). Only the called mapping sub-table H2F_G# can be referenced or updated. Compared with the complete host-flash memory mapping table H2F, the dynamic update of the mapping sub-table H2F_G# only consumes a small amount of system resources.

本案特別討論快閃記憶體的修整(trim)操作。修整操作是用於無效所指定之邏輯位址區間。由於修整的邏輯位址區間常常尺寸可觀,涉及數量龐大的映射子表H2F_G#更新(載出填入虛置映射資料),非常耗時。本案提出一種新的修整方案,使得該主機-快閃記憶體映射表H2F可部分在修整完成後,再以背景方式更新。以下討論之。This case specifically discusses the trim operation of the flash memory. The trimming operation is used to invalidate the specified logical address range. Since the modified logical address range is often of considerable size, it involves a huge number of mapping sub-table H2F_G# updates (loading out and filling in dummy mapping data), which is very time-consuming. This case proposes a new trimming scheme, so that the host-flash memory mapping table H2F can be partially updated in the background after the trimming is completed. Discuss it below.

第2圖圖解根據本案一種實施方式所實現的一資料儲存裝置200,包括一快閃記憶體202、一控制器204以及一動態隨機存取記憶體(DRAM)206。主機208透過控制器204操作快閃記憶體202。資料儲存裝置200內部也可經控制器204發動快閃記憶體202之最佳化操作;例如,整理快閃記憶體202空間,使其發揮最大儲存效能。控制器204進行運算時是以動態隨機存取記憶體206暫存資料。動態隨機存取記憶體206也可以其他暫存記憶體取代,如靜態隨機存取記憶體SRAM,或其他控制器204得以高速存取的儲存空間。FIG. 2 illustrates a data storage device 200 implemented according to an embodiment of the present invention, which includes a flash memory 202, a controller 204, and a dynamic random access memory (DRAM) 206. The host 208 operates the flash memory 202 through the controller 204. The inside of the data storage device 200 can also be activated by the controller 204 to optimize the flash memory 202; for example, to organize the space of the flash memory 202 to maximize its storage performance. When the controller 204 performs operations, the dynamic random access memory 206 temporarily stores data. The dynamic random access memory 206 can also be replaced by other temporary memory, such as static random access memory SRAM, or other storage space that the controller 204 can access at a high speed.

動態隨機存取記憶體206有多種規劃,包括提供快取區Data_Cache,將資料收集成資料管理單元4KB大小後,再一一沖至(flush)快閃記憶體202的主動區塊A_Blk中。主動區塊A_Blk係選自閒置區塊,待完成寫入則視為資料區塊。完整的主機-快閃記憶體映射表H2F一般保存在快閃記憶體202的系統資訊區塊Info_Blk。資料自快取區Data_Cache沖至主動區塊A_Blk時,相關的映射子表H2F_G#自快閃記憶體202載出修正,再回存快閃記憶體202更新總表H2F。傳統修整也包括映射子表H2F_G#的載出修正以及回存。但大量修整涉及到複數個映射子表H2F_G#更新,非常耗時。本案提出替代方案。根據主機208發出的一修整指令(trim command),控制器204編寫該快取區Data_Cache快取一修整標籤Trim_Tag,反映修整狀況,使修整狀況也會沖至主動區塊A_Blk作非揮發式儲存。修整標籤Trim_Tag註明主機-快閃記憶體映射表H2F還有哪些部分沒有隨著修整指令更新。控制器204可以在填寫指令完成佇列(completion queue)回報主機208修整指令完成後,再找機會,根據修整標籤Trim_Tag,將映射子表H2F_G#一一載出更新,符合修整需求。如此一來,控制器204不會被修整指令困住。資料儲存裝置200效能顯著提升。The dynamic random access memory 206 has a variety of plans, including providing a cache area Data_Cache, collecting data into a data management unit of 4KB in size, and then flushing them to the active block A_Blk of the flash memory 202 one by one. The active block A_Blk is selected from the idle block, and is regarded as a data block when the writing is completed. The complete host-flash memory mapping table H2F is generally stored in the system information block Info_Blk of the flash memory 202. When the data is flushed from the cache Data_Cache to the active block A_Blk, the related mapping sub-table H2F_G# is loaded from the flash memory 202 and corrected, and then the flash memory 202 is restored to update the master table H2F. The traditional trimming also includes the uploading, correcting and restoring of the mapping sub-table H2F_G#. However, a large amount of modification involves updating multiple mapping sub-tables H2F_G#, which is very time-consuming. This case proposes an alternative plan. According to a trim command (trim command) sent by the host 208, the controller 204 writes the cache area Data_Cache to cache a trim tag Trim_Tag to reflect the trim status, so that the trim status will also be flushed to the active block A_Blk for non-volatile storage. Trim tag Trim_Tag indicates which parts of the host-flash memory mapping table H2F have not been updated with the trim command. The controller 204 may fill in the instruction completion queue (completion queue) to report the completion of the trimming instruction to the host 208, and then find an opportunity to upload and update the mapping sub-table H2F_G# one by one according to the trimming tag Trim_Tag to meet the trimming requirements. In this way, the controller 204 will not be trapped by the trimming instructions. The performance of the data storage device 200 is significantly improved.

為了幫助解讀該修整標籤Trim_Tag,控制器204更在該動態隨機存取記憶體206上維護修整資訊旗標表TIFM、修整代號Trim_Code、以及修整位元總表TBM。修整資訊旗標表TIFM以及修整代號Trim_Code的內容也會沖至主動區塊A_Blk的閒置區域210作非揮發式儲存,後續若有復電重建需求,就可以根據閒置區域210解讀出快閃記憶體202相對頁面是儲存修整標籤Trim_Tag。修整位元總表TBM是以簡單位元方式標註主機-快閃記憶體映射表H2F中未同步處,使控制器204正確回復主機208讀、寫指令。To help interpret the trim tag Trim_Tag, the controller 204 further maintains a trim information flag table TIFM, trim code Trim_Code, and trim bit summary table TBM on the dynamic random access memory 206. The contents of the trimming information flag table TIFM and trimming code Trim_Code will also be flushed to the idle area 210 of the active block A_Blk for non-volatile storage. If there is a need for subsequent power recovery and reconstruction, the flash memory can be interpreted according to the idle area 210 The 202 relative page is to store the trimming tag Trim_Tag. The trimming bit summary table TBM is to mark the unsynchronized locations in the host-flash memory mapping table H2F in a simple bit manner, so that the controller 204 can correctly reply the host 208 read and write commands.

本案將修整分為三種類型:大量修整;中等長度修整;以及少量修整。大量修整對齊一第一長度之分界、且為該第一長度之N倍,N為正整數。中等長度修整不超過該第一長度,且對齊一第二長度之分界。少量修整短於該第二長度。一種實施方式中,映射子表H2F_G#管理的邏輯位址長度即該第一長度,例如2MB。一種實施方式中,資料管理單元尺寸(即快取區Data_Cache各儲存格尺寸)即該第二長度,例如4KB。三種尺寸的修整技術不同。少量修整是直接填虛置資料(dummy data)代表該段邏輯位址區間已修整。中等長度修整是快取起始邏輯位址以及長度。大量修整是快取該修整位元總表TBM的相關部分。In this case, the trimming is divided into three types: heavy trimming; medium length trimming; and small trimming. Mass trimming aligns to a boundary of a first length and is N times the first length, where N is a positive integer. The medium length trimming does not exceed the first length, and is aligned with the boundary of a second length. A small amount of trimming is shorter than this second length. In an implementation manner, the length of the logical address managed by the mapping sub-table H2F_G# is the first length, for example, 2MB. In one embodiment, the size of the data management unit (that is, the size of each cell in the cache area Data_Cache) is the second length, for example, 4KB. The trimming techniques for the three sizes are different. A small amount of trimming is to fill in dummy data directly, which means that the logical address range of the segment has been trimmed. The medium length trimming is to cache the starting logical address and length. A large number of trimming is to cache the relevant part of the trimming bit table TBM.

以下以邏輯區塊位址LBA 5~LBA 100664323之修整為例,討論本案控制器204之操作細節。The following takes the modification of the logical block addresses LBA 5~LBA 100664323 as an example to discuss the operation details of the controller 204 in this case.

第3圖圖解修整之分類。主機208對邏輯區塊位址LBA 5~LBA 100664323發出修整指令。控制器204分類該修整指令指定的修整範圍LBA 5~LBA 100664323,將之分為區間302、304、306、308以及310。區間306為大量修整,位於邏輯區塊位址LBA 4096~LBA 100663295,對齊2MB分界,儘可能的在整體修整範圍中,切出2MB倍數的最大修整。區間306之前包括:小於4KB的區間302,位於邏輯區塊位址LBA 5~LBA 7,對應首位少量修整;以及對齊4KB分界、但不足2MB的區間304,位於邏輯區塊位址LBA 8~LBA 4095,對應首位中等長度修整。區間306之後包括:對齊4KB分界但不足2MB的區間308,位於邏輯區塊位址LBA 100663296~LBA 100664319,對應末位中等長度修整;以及小於4KB的區間310,位於邏輯區塊位址LBA 100664320~LBA 100664323,對應末位少量修整。Figure 3 illustrates the classification of trimmings. The host 208 sends a trimming command to the logical block address LBA 5~LBA 100664323. The controller 204 classifies the dressing range LBA 5 to LBA 100664323 specified by the dressing instruction, and divides them into sections 302, 304, 306, 308, and 310. The interval 306 is extensively trimmed, located at the logical block addresses LBA 4096~LBA 100663295, aligned with the 2MB boundary, and cut out the largest trimming multiple of 2MB in the overall trimming range as much as possible. The section 306 before includes: section 302, which is less than 4KB, located at logical block addresses LBA 5~LBA 7, corresponding to a small amount of trimming at the first place; and section 304, which is aligned to the 4KB boundary but less than 2MB, is located at logical block addresses LBA 8~LBA 4095, corresponding to the first medium length trimming. After the interval 306, the interval 308 aligned with the 4KB boundary but less than 2MB is located at the logical block address LBA 100663296~LBA 100664319, which corresponds to the last mid-length trimming; and the interval 310 less than 4KB is located at the logical block address LBA 100664320~ LBA 100664323, a small amount of trimming corresponding to the last position.

第4圖圖解首位少量修整(302),其中修整邏輯區塊位址LBA 5~LBA 7,包括:步驟1,填寫4KB內容進快取區Data_Cache;以及,步驟2,更新主機-快閃記憶體映射表H2F。Figure 4 illustrates the first minor trimming (302), in which the logic block address LBA 5~LBA 7 is trimmed, including: Step 1, fill in 4KB content into the cache area Data_Cache; and, Step 2, update the host-flash memory Mapping table H2F.

步驟1,控制器204將邏輯區塊位址LBA 0~LBA 4(不修整區間)的原本資料填入快取區Data_Cache的區間402,並對應要修整的邏輯區塊位址LBA 5~LBA 7填寫虛置資料(dummy data例如,零)至快取區Data_Cache的區間404。區間402中關於邏輯區塊位址LBA 0~LBA 4的2.5KB不修整資料、以及區間404中1.5KB的虛置資料組合成4KB資料,符合4KB資料管理單元,由快取區Data_Cache一個儲存格快取。Step 1. The controller 204 fills the original data of the logical block addresses LBA 0~LBA 4 (the interval without trimming) into the interval 402 of the Data_Cache of the cache area, and corresponds to the logical block addresses LBA 5~LBA 7 to be trimmed Fill in the dummy data (for example, zero) to the interval 404 of the Data_Cache in the cache area. The 2.5KB unrefined data of the logical block addresses LBA 0~LBA 4 in the interval 402, and the 1.5KB dummy data in the interval 404 are combined into 4KB data, which conforms to the 4KB data management unit, and a storage cell in the cache area Data_Cache Cache.

步驟2,控制器204在動態隨機記憶體206上更新邏輯區塊位址LBA 0~LBA 7(即GHP 0)對應的映射子表H2F_G0,以更新該主機-快閃記憶體映射表H2F。控制器204將全域主機頁編號GHP 0的映射資料指向該快取區Data_Cache上述區間402以及404組成的該4KB儲存格。如此一來,全域主機頁編號GHP 0的映射綁定此4KB內容。虛置資料代表邏輯區塊位址LBA 5~LBA 7的修整狀態。對應該快取區Data_Cache的複數個儲存格,控制器204會在動態隨機存取記憶體206上更維護一儲存資訊表(未繪製在此圖),在對應儲存格快取的是使用者資料時,記錄一邏輯位址;此例即記錄全域主機編號GHP 0,將與快取區Data_Cache儲存格內容一起沖至主動區塊A_Blk作為儲存資訊,例如,用作日後主機-快閃記憶體映射表H2F重建。後面討論的應用中,快取區Data_Cache儲存格儲存的可以不是使用者資訊,而是修整資訊,則該儲存資訊表可對應儲存其他內容,例如:修整代號。Step 2: The controller 204 updates the mapping sub-table H2F_G0 corresponding to the logical block addresses LBA 0 to LBA 7 (ie, GHP 0) on the dynamic random memory 206 to update the host-flash memory mapping table H2F. The controller 204 points the mapping data of the global host page number GHP 0 to the 4KB storage cell composed of the aforementioned intervals 402 and 404 of the Data_Cache of the cache area. In this way, the mapping of the global host page number GHP 0 is bound to this 4KB content. The dummy data represents the trimming status of the logical block addresses LBA 5~LBA 7. Corresponding to a plurality of cells in the Data_Cache in the cache area, the controller 204 maintains a storage information table (not shown in this figure) on the dynamic random access memory 206, and the corresponding cell cache is the user data Record a logical address; in this example, record the global host number GHP 0, which will be flushed to the active block A_Blk along with the contents of the Data_Cache cell in the cache area as storage information, for example, for future host-flash memory mapping Table H2F reconstruction. In the application discussed later, the Data_Cache cell in the cache area may not store user information but trim information, and the stored information table can store other contents, such as trim code.

第5圖圖解首位中等長度修整(304) ,其中修整邏輯區塊位址LBA 8~LBA 4095,包括:步驟1,更新主機-快閃記憶體映射表H2F;步驟2,編寫修整資訊旗標表TIFM、以及修整代號Trim_Code;以及,步驟3,將修整資訊填入快取區Data_Cache。Figure 5 illustrates the first medium-length trimming (304), in which the logic block address is LBA 8~LBA 4095, including: Step 1, update the host-flash memory mapping table H2F; Step 2, write the trimming information flag table TIFM, and the trim code Trim_Code; and, step 3, fill the trim information into the cache Data_Cache.

步驟1,控制器204在動態隨機記憶體206上更新邏輯區塊位址LBA 8~LBA 4095 (即GHP 1~GHP 511)對應的映射子表H2F_G0,以更新該主機-快閃記憶體映射表H2F。控制器204填入虛置映射資料(如,零)作為全域主機頁編號GHP 1~GHP 511的映射資料。不同於少量修整是填充虛置資料,中等長度資料修整是填充虛置映射資料。Step 1. The controller 204 updates the mapping sub-table H2F_G0 corresponding to the logical block address LBA 8~LBA 4095 (ie GHP 1~GHP 511) on the dynamic random memory 206 to update the host-flash memory mapping table H2F. The controller 204 fills in dummy mapping data (eg, zero) as the mapping data of the global host page numbers GHP 1~GHP 511. Different from the small amount of trimming that fills dummy data, the medium-length trimming is to fill dummy mapping data.

步驟2,控制器204編寫修整資訊旗標表TIFM、以及修整代號Trim_Code。修整資訊旗標表TIFM各位元對應該快取區Data_Cache一個4KB儲存格。修整代號Trim_Code則是填入前述儲存資訊表中。接續在區間404後的4KB儲存格所對應的修整資訊旗標表TIFM位元設立為”1”,表示該儲存格4KB內容要解讀為修整資訊,不可當使用者資料解讀。控制器204是在上述儲存資訊表對應填寫4B的修整代號Trim_Code,包括:2B的數據”0xAAAA”;以及2B的虛置代號(例如全零)。此實施方式中,修整代號Trim_Code是以2B編寫。快取區Data_Cache是以切半的儲存格,用2KB空間儲存修整資訊。2KB”0xAAAA”代表2KB區間502所填寫的修整資訊係中等長度修整的起始邏輯位址以及長度。Step 2: The controller 204 compiles the trimming information flag table TIFM and the trimming code Trim_Code. Each element of the trimming information flag table TIFM corresponds to a 4KB cell in the Data_Cache of the cache area. The trim code Trim_Code is filled in the aforementioned storage information table. The TIFM bit of the trimming information flag table corresponding to the 4KB cell following the interval 404 is set to "1", which means that the 4KB content of the cell should be interpreted as trimming information and cannot be interpreted as user data. The controller 204 fills in the 4B trim code Trim_Code corresponding to the storage information table, including: 2B data "0xAAAA"; and 2B dummy code (for example, all zeros). In this embodiment, the trim code Trim_Code is written in 2B. The Data_Cache in the cache area is a halved cell that uses 2KB of space to store trimming information. 2KB "0xAAAA" represents the starting logical address and length of the medium-length trimming of the trimming information filled in the 2KB interval 502.

步驟3,控制器204將修整資訊填入快取區Data_Cache,在2KB區間502中填入起始邏輯位址GHP 1以及修整長度511,註明修整範圍為GHP 1~GHP 511,即首位中等長度修整(304)要求修整的邏輯區塊位址LBA 8~LBA 4095。如圖所示,2KB區間502其他未使用到的地方是填入虛置資料。Step 3. The controller 204 fills the trimming information into the cache area Data_Cache, and fills in the starting logical address GHP 1 and trimming length 511 in the 2KB interval 502, indicating that the trimming range is GHP 1~GHP 511, that is, the first medium-length trimming (304) The address of the logic block requiring trimming is LBA 8~LBA 4095. As shown in the figure, the other unused part of the 2KB interval 502 is to fill in dummy data.

大量修整(306)則用到修整位元總表(trim bit map,TBM),其中每1位元對應邏輯空間上2MB長度;”1”代表修整。4TB容量的裝置需建構256KB(=4TB/2MB)的修整位元總表TBM。如此龐大的修整位元總表TBM更可以2KB為單位分組,分為128個修整位元子表TBM_G#(#為子表編號)。完整256KB修整位元總表TBM可載於動態隨機存取記憶體206上動態管理。但寫入快取區 Data_Cache作為修整資訊沖至主動區塊A_Blk的可以只是修整位元子表TBM_G#。Mass trimming (306) uses trim bit map (TBM), where each bit corresponds to a length of 2MB in the logical space; "1" represents trimming. A 4TB capacity device needs to build a 256KB (=4TB/2MB) trimmed bit table TBM. Such a huge trimming bit total table TBM can be grouped in units of 2KB and divided into 128 trimming bit sub-tables TBM_G# (# is the sub-table number). The complete 256KB trimmed bit summary table TBM can be loaded on the dynamic random access memory 206 for dynamic management. However, what is written into the Data_Cache in the cache area as the trimming information to flush to the active block A_Blk can only be the trimming bit subtable TBM_G#.

第6A圖以及第6B圖圖解大量修整(306),其中修整邏輯區塊位址LBA 4096~LBA 100663295,包括:步驟1,更新修整位元總表TBM;步驟2,編寫修整資訊旗標表TIFM、以及修整代號Trim_Code;以及,步驟3,將修整資訊填入快取區Data_Cache。Figure 6A and Figure 6B illustrate a large number of trimming (306), in which the logic block address of the trimming is LBA 4096~LBA 100663295, including: step 1, update the trimming bit table TBM; step 2, compile the trimming information flag table TIFM , And trim code Trim_Code; and, step 3, fill the trim information into the cache Data_Cache.

步驟1,控制器204對動態隨機記憶體206上暫存的256KB修整位元總表TBM進行更新。邏輯區塊位址LBA 4096~LBA 100663295即LBA 2MB~49152MB,對應修整位元總表TBM中的位元1~24596,屬修整位元總表TBM前3KB的內容。如圖所示,控制器204將修整位元總表TBM中的位元1~24596翻成”1”,其中涉及兩個修整位元子表:TBM_G0(第一段2KB內容);以及TBM_G1(第二段2KB內容)。Step 1. The controller 204 updates the 256KB trimmed bit total table TBM temporarily stored in the dynamic random memory 206. The logical block address LBA 4096~LBA 100663295 means LBA 2MB~49152MB, corresponding to bits 1~24596 in the trimming bit table TBM, which belongs to the content of the first 3KB of the trimming bit table TBM. As shown in the figure, the controller 204 turns bits 1-24,596 in the trimming bit summary table TBM into "1", which involves two trimming bit subtables: TBM_G0 (the first paragraph of 2KB content); and TBM_G1( 2KB content of the second paragraph).

步驟2,控制器204編寫修整資訊旗標表TIFM、以及修整代號Trim_Code。控制器204是規劃修整位元子表TBM_G0(第一段2KB內容)、以及TBM_G1(第二段2KB內容)分別由快取區Data_Cache的2KB區間602、以及2KB區間604快取。區間602所屬該4KB空間(包括區間502以及602)早已由修整資訊旗標表TIFM中對應位元標示(“1”)。控制器204在此步驟是對接續4KB快取空間(包括區間604)進行標示,使修整資訊旗標表TIFM中對應位元也為“1”。控制器204編寫修整代號Trim_Code。對應區間502的0xAAAA之後是對應區間602填寫一子表編號0x0000(為修整位元子表TBM_G0之編號),再對應區間604填寫一子表編號0x0001(為修整位元子表TBM_G1之編號)。Step 2: The controller 204 compiles the trimming information flag table TIFM and the trimming code Trim_Code. The controller 204 plans to modify the bit sub-tables TBM_G0 (the first section of 2KB content) and TBM_G1 (the second section of 2KB content) to be cached by the 2KB interval 602 and the 2KB interval 604 of the cache area Data_Cache, respectively. The 4KB space (including the intervals 502 and 602) to which the interval 602 belongs has already been marked ("1") by the corresponding bit in the trimming information flag table TIFM. In this step, the controller 204 marks the continuous 4KB cache space (including the interval 604) so that the corresponding bit in the trim information flag table TIFM is also "1". The controller 204 writes the trim code Trim_Code. After 0xAAAA of the corresponding interval 502, a sub-table number 0x0000 (the number of the trimming bit sub-table TBM_G0) is filled in the corresponding interval 602, and a sub-table number 0x0001 (the number of the trimming sub-table TBM_G1) is filled in the corresponding interval 604.

步驟3,控制器204將修整資訊填入快取區Data_Cache,在2KB區間602填入修整位元子表TBM_G0,並在2KB區間604填入修整位元子表TBM_G1。Step 3, the controller 204 fills the trimming information into the cache area Data_Cache, fills the trimming bit sub-table TBM_G0 in the 2KB interval 602, and fills the trimming bit sub-table TBM_G1 in the 2KB interval 604.

第6B圖圖解填入快取區Data_Cache區間602、604的修整位元子表TBM_G0、TBM_G1。2KB的修整位元子表TBM_G0中,只有第一個位元(對應首位少量、以及中等長度修整已經處理的GHP 0~GHP 511)為零,其餘位元都是1。2KB的修整位元子表TBM_G1中,頭1KB位元為1,其餘位元都是0。邏輯區塊位址範圍LBA 2MB~49152MB即(LBA 4096~LBA 100663295)被修整。Figure 6B illustrates the trimming bit sub-tables TBM_G0 and TBM_G1 filled in the Data_Cache intervals 602 and 604 of the cache area. In the 2KB trimming bit sub-table TBM_G0, only the first bit (corresponding to the first bit with a small amount and medium length trimming has been completed). The processed GHP 0~GHP 511) are zero, and the remaining bits are all 1. In the 2KB trimming bit sub-table TBM_G1, the first 1KB bit is 1, and the remaining bits are all 0. The logical block address range LBA 2MB~49152MB (LBA 4096~LBA 100663295) is trimmed.

大量修整(306)後,控制器204進行末位中等長度修整(308)。隨後,控制器204進行末位少量修整(310)。After extensive trimming (306), the controller 204 performs a final intermediate trimming (308). Subsequently, the controller 204 performs a small trimming of the last position (310).

第7圖圖解末位中等長度修整(308)。修整邏輯區塊位址LBA 100663296~LBA 100664319,對應全域主機頁編號GHP 0xC00000~GHP 0xC0007F,技術同首位中等長度修整(304)。Figure 7 illustrates the last mid-length trimming (308). The address of the trimming logic block is LBA 100663296~LBA 100664319, corresponding to the global host page number GHP 0xC00000~GHP 0xC0007F, and the technology is the same as the first medium length trimming (304).

步驟1,控制器204在動態隨機記憶體206上更新邏輯區塊位址LBA 100663296~LBA 100664319 (即GHP 0xC00000~GHP 0xC0007F)對應的映射子表H2F_G48,以更新該主機-快閃記憶體映射表H2F。控制器204填入虛置映射資料作為全域主機頁編號GHP 0xC00000~GHP 0xC0007F的映射資料。Step 1. The controller 204 updates the mapping sub-table H2F_G48 corresponding to the logical block address LBA 100663296~LBA 100664319 (ie GHP 0xC00000~GHP 0xC0007F) on the dynamic random memory 206 to update the host-flash memory mapping table H2F. The controller 204 fills in dummy mapping data as the mapping data of the global host page numbers GHP 0xC00000~GHP 0xC0007F.

步驟2,控制器204編寫修整資訊旗標表TIFM、以及修整代號Trim_Code。快取區Data_Cache上,2KB的區間702對應末位中等長度修整(308)。區間702所屬該4KB空間(包括區間604以及702)早已由修整資訊旗標表TIFM中對應位元標示(“1”),故此步驟沒有變動之。至於修整代號Trim_Code,在相應區間604的修整位元子表TBM_G1編號0x0001之後,控制器204相應區間702填上”0xAAAA”,代表2KB區間702所快取的是中等長度修整之修整資訊。Step 2: The controller 204 compiles the trimming information flag table TIFM and the trimming code Trim_Code. On the Data_Cache in the cache area, the 2KB interval 702 corresponds to the last mid-length trimming (308). The 4KB space to which the interval 702 belongs (including the intervals 604 and 702) has already been marked ("1") by the corresponding bit in the trim information flag table TIFM, so this step has not changed. Regarding the trimming code Trim_Code, after the trimming bit sub-table TBM_G1 number 0x0001 of the corresponding interval 604, the controller 204 fills in the corresponding interval 702 with "0xAAAA", which means that the 2KB interval 702 caches the trimming information of medium length trimming.

步驟3,控制器204將修整資訊填入快取區Data_Cache,在2KB區間702中填入起始邏輯位址GHP0xC0000以及修整長度0x80,註明修整範圍為GHP C0000~GHP 0xC0007F,即末位中等長度修整(308)要求修整的邏輯區塊位址LBA 100663296~LBA 100664319。Step 3. The controller 204 fills the trimming information into the cache area Data_Cache, and fills in the starting logical address GHP0xC0000 and trimming length 0x80 in the 2KB interval 702, indicating that the trimming range is GHP C0000~GHP 0xC0007F, that is, the last mid-length trimming (308) The logical block addresses that require trimming are LBA 100663296~LBA 100664319.

第8圖圖解末位少量修整(310),其中修整邏輯區塊位址LBA 100664320~LBA 100664323,對應全域主機頁編號GHP 0xC00080。技術同首位少量修整(302)。Figure 8 illustrates the last bit trimming (310), where the trim logic block address is LBA 100664320~LBA 100664323, corresponding to the global host page number GHP 0xC00080. The technology is the same as the first few trimming (302).

步驟1,控制器204對應修整邏輯區塊位址範圍LBA 100664320~LBA 100664323填寫虛置資料至快取區Data_Cache的區間802,並將邏輯位址LBA 100664324~LBA 100664327(不修整區間)的原本資料填入快取區Data_Cache的區間804。區間802的2KB虛置資料、以及區間804中關於邏輯位址LBA 100664324~LBA 100664327的2KB資料組合成4KB資料,符合4KB資料管理單元,由快取區Data_Cache一個儲存格快取。Step 1. The controller 204 correspondingly trims the logical block address range LBA 100664320~LBA 100664323, fills in the dummy data to the interval 802 of Data_Cache in the cache area, and adds the original data of the logical address LBA 100664324~LBA 100664327 (without trimming interval) Fill in the interval 804 of the Data_Cache of the cache area. The 2KB dummy data in the interval 802 and the 2KB data with the logical addresses LBA 100664324~LBA 100664327 in the interval 804 are combined into 4KB data, which conforms to the 4KB data management unit, and is cached by one cell in the cache area Data_Cache.

步驟2,控制器204在動態隨機記憶體206上更新邏輯區塊位址LBA 100664320~LBA 100664327 (即GHP 0xC00080)對應的映射子表H2F_G48,以更新該主機-快閃記憶體映射表H2F。如此一來,全域主機頁編號GHP 0xC00080的映射綁定此4KB內容。虛置資料代表邏輯區塊位址LBA 100664320~LBA 100664323的修整狀態。Step 2: The controller 204 updates the mapping sub-table H2F_G48 corresponding to the logical block addresses LBA 100664320 to LBA 100664327 (ie, GHP 0xC00080) on the dynamic random memory 206 to update the host-flash memory mapping table H2F. As a result, the mapping of the global host page number GHP 0xC00080 is bound to this 4KB content. The dummy data represents the trimming status of the logical block addresses LBA 100664320~LBA 100664323.

第9圖整理LBA 5~LBA 100664323修整指令執行後,動態隨機存取記憶體206上存在內容。Figure 9 summarizes the contents of the dynamic random access memory 206 after the LBA 5~LBA 100664323 trimming instructions are executed.

快取區Data_Cache上,修整標籤Trim_Tag佔4個儲存格。區間402以及404相應首位少量修整(302),為原始資料(LBA 0~LBA4)以及虛置資料結合的4KB內容。區間502佔2KB,相應首位中等長度修整(304),所載為起始邏輯位址GHP 1以及長度511。區間602以及604各佔2KB,相應大量修等(306),所載為修整位元子表TBM_G0以及TBM_G1。區間702佔2KB,相應末位中等長度修整(308),所載為起始邏輯位址GHP 0xC00000以及修整長度0x80。區間802以及804相應末位少量修整(310),為虛置資料以及LBA 100664324~LBA 100664327原始資料結合的4KB內容。On the Data_Cache in the cache area, the trim tag Trim_Tag occupies 4 cells. The first part of the intervals 402 and 404 is slightly trimmed (302), which is a 4KB content combined with the original data (LBA 0~LBA4) and the dummy data. The interval 502 occupies 2KB, and the corresponding first is trimmed to a medium length (304), and contains the starting logical address GHP 1 and the length 511. The intervals 602 and 604 occupies 2KB each, corresponding to a large number of revisions (306), which are contained in the trimming bit sub-tables TBM_G0 and TBM_G1. The interval 702 occupies 2KB, and the corresponding last bit is trimmed with a medium length (308), which contains the starting logical address GHP 0xC00000 and the trimming length 0x80. The last bits of intervals 802 and 804 are slightly modified (310), which are dummy data and the 4KB content combined with the original data of LBA 100664324~LBA 100664327.

相應該修整標籤Trim_Tag,修整資訊旗標表TIFM載有四個位元”0”、”1”、”1”、”0”。 中間的兩個”1”使得儲存資訊表上對應的8B全域主機頁編號GHP#儲存區域轉而儲存修整代號Trim_Code,為[0xAAAA; 0x0000; 0x0001; 0xAAAA]。Corresponding to the trimming tag Trim_Tag, the trimming information flag table TIFM contains four bits "0", "1", "1", and "0". The two "1"s in the middle make the corresponding 8B global host page number GHP# storage area on the storage information table change to store the trim code Trim_Code, which is [0xAAAA; 0x0000; 0x0001; 0xAAAA].

至於主機-快閃記憶體映射表H2F,動態隨機存取記憶體206上只載有最末少量修整(310)時處理到的映射子表H2F_G48。但結合已封存到系統資訊區塊Info_Blk的主機-快閃記憶體映射表H2F,可知前述修整過程中,映射資訊僅有部分更新,包括:GHP0指向區間402以及404所在4KB空間;GHP1~GHP511、GHP0xC0000~0xC0007F填虛置映射資料;且GHP 0xC00080指向區間802以及804所在4KB空間。未來得及更新的映射資訊載明在修整位元總表TBM。As for the host-flash memory mapping table H2F, the dynamic random access memory 206 only contains the mapping sub-table H2F_G48 processed during the minimum trimming (310). However, in combination with the host-flash memory mapping table H2F that has been sealed in the system information block Info_Blk, it can be seen that during the aforementioned trimming process, the mapping information is only partially updated, including: GHP0 points to the 4KB space in the interval 402 and 404; GHP1~GHP511, GHP0xC0000~0xC0007F fill in dummy mapping data; and GHP 0xC00080 points to the 4KB space where the interval 802 and 804 are located. The mapping information that can be updated in the future is stated in the modified bit table TBM.

如圖所示,修整位元總表TBM則在前3KB處,標示出LBA 2M~49152MB的已修整狀況,彌補主機-快閃記憶體映射表H2F未同步更新的部分。As shown in the figure, the trimming bit summary table TBM is in the first 3KB, indicating the trimmed status of LBA 2M~49152MB, to make up for the part of the host-flash memory mapping table H2F that has not been updated synchronously.

一種實施方式中,主機208發出讀取要求時,控制器204可根據主機208要求讀取的邏輯區塊位址區間查詢該修整位元總表TBM。”1”代表對應的2MB已修整。若為”0”,控制器204需再查詢該主機-快閃記憶體映射表H2F。虛置映射資料代表該段空間已修整。若指向虛置資料(如404、802),其解讀同修整空間。In one embodiment, when the host 208 issues a read request, the controller 204 can query the trimming bit table TBM according to the logical block address range requested by the host 208 to read. "1" means that the corresponding 2MB has been trimmed. If it is "0", the controller 204 needs to query the host-flash memory mapping table H2F again. The dummy mapping data represents that the space has been trimmed. If it points to dummy data (such as 404, 802), its interpretation is the same as the modification space.

圖示佔據4個4KB快取儲存格的修整標籤Trim_Tag,需與其相應的修整資訊旗標[0, 1, 1, 0]、以及8B的修整代號Trim_Code([0xAAAA, 0x0000, 0x0001, 0xAAAA])沖 (flush)至快閃記憶體202主動區塊A_Blk做非揮發式儲存,以應付非預期斷電後,於復電程序重建修整狀況的需求。修整標籤Trim_Tag可寫入一頁的資料區。修整代號Trim_Code([0xAAAA, 0x0000, 0x0001, 0xAAAA])可以該頁之閒置區域210中,原本規劃來儲存映射之全域主機頁編號GHP#的地方。修整資訊旗標[0, 1, 1, 0]可在閒置區域210中另外儲存,也可另外編碼結合在修整代號Trim_Code中。The icon occupies 4 trimming tags Trim_Tag of 4KB cache cells, and the trimming information flags [0, 1, 1, 0] and 8B trimming code Trim_Code ([0xAAAA, 0x0000, 0x0001, 0xAAAA]) are required. Flush to the active block A_Blk of the flash memory 202 for non-volatile storage to cope with the need to rebuild and repair the condition after an unexpected power failure. Trim tag Trim_Tag can be written into the data area of one page. The trim code Trim_Code ([0xAAAA, 0x0000, 0x0001, 0xAAAA]) can be used in the idle area 210 of the page, originally planned to store the mapped global host page number GHP#. The trimming information flag [0, 1, 1, 0] can be additionally stored in the idle area 210, or can be additionally coded and combined in the trim code Trim_Code.

以下討論控制器204冗閒時,如何完成主機-快閃記憶體映射表H2F之更新。主機-快閃記憶體映射表H2F更新會一併維護快閃記憶體202各區塊的一有效頁數(valid page count)表。即使以修整位元總表TBM暫時應付修整指令,修整對有效頁數表的影響也能在控制器204冗閒時反應在有效頁數表上。The following discusses how to update the host-flash memory mapping table H2F when the controller 204 is idle. The host-flash memory mapping table H2F update will also maintain a valid page count table of each block of the flash memory 202. Even if the trimming bit table TBM is used to temporarily cope with the trimming command, the effect of trimming on the effective page number table can be reflected on the effective page number table when the controller 204 is idle.

一種實施方式中,控制器204將該修整位元總表TBM的”1”值逐位元翻成”0”。每位元翻轉對應 2MB,係以前述中等長度修整技術(第5或7圖),將此2MB的修整反應在對應的映射子表H2F_G#、以及快取區Data_Cache上,並以前述大量修整區間的修整技術(第6A、6B圖),將有逐位元翻轉的修整位元子表TBM_G#一一快取於快取區Data_Cache。In one embodiment, the controller 204 turns the "1" value of the trimming bit summary table TBM into "0" bit by bit. Each bit flip corresponds to 2MB. Using the aforementioned medium-length trimming technique (Figure 5 or 7), this 2MB trimming is reflected on the corresponding mapping sub-table H2F_G# and the cache area Data_Cache, and the interval is trimmed with the aforementioned large number of trimmings. The trimming technology (figure 6A, 6B), the trimming bit sub-table TBM_G# with bit-by-bit flipping will be cached in the cache Data_Cache one by one.

第10A、10B以及10C圖圖解該修整位元總表TBM一位元之”1”至”0”翻轉。Figures 10A, 10B, and 10C illustrate the "1" to "0" reversal of one bit of the trimming bit table TBM.

第10A圖顯示翻轉的目標位元,即目標修整位元子表TBM_G0頭一個”1”位元,將之翻成”0”,即目標修整GHP 512~GHP 1023。Figure 10A shows the flipped target bit, that is, the first "1" bit in the target trimming bit sub-table TBM_G0, which is turned into "0", that is, the target trimming GHP 512~GHP 1023.

第10B圖採用前述中等長度修整技術(第5或7圖),將目標位元相應的2MB目標修整(GHP 512~GHP 1023)更新至該主機-快閃記憶體映射表H2F,並包括快取區Data_Cache、修整資訊旗標表TIFM、以及修整代號Trim_Code的編寫。Figure 10B uses the aforementioned medium-length trimming technique (Figure 5 or 7) to update the 2MB target trimming (GHP 512~GHP 1023) corresponding to the target bit to the host-flash memory mapping table H2F, and include the cache Compilation of area Data_Cache, trimming information flag table TIFM, and trimming code Trim_Code.

步驟1,控制器204在動態隨機記憶體206上更新該2MB目標修整(GHP 512~GHP 1023)對應的映射子表H2F_G1,以更新該主機-快閃記憶體映射表H2F。控制器204填入虛置映射資料(如,零)作為全域主機頁編號GHP 512~GHP 1023的映射資料。Step 1. The controller 204 updates the mapping sub-table H2F_G1 corresponding to the 2MB target trimming (GHP 512~GHP 1023) on the dynamic random memory 206 to update the host-flash memory mapping table H2F. The controller 204 fills in dummy mapping data (eg, zero) as the mapping data of the global host page numbers GHP 512 ~ GHP 1023.

步驟2,控制器204編寫修整資訊旗標表TIFM、以及修整代號Trim_Code。修整資訊旗標表TIFM的一位元設定“1”,標示此次目標位元翻轉會使用到的快閃區Data_Cache儲存格。控制器204是規劃快取區Data_Cache的2KB區間1002(半個儲存格)儲存此目標修整(GHP 512~GHP 1023)的起始邏輯位址GHP 512以及長度512。對應的4B修整代號Trim_Code即以”0xAAAA”指示區間1002內容的解讀方式。剩餘2B修整代號Trim_Code則暫填虛置數據。Step 2: The controller 204 compiles the trimming information flag table TIFM and the trimming code Trim_Code. The bit setting "1" of the trimming information flag table TIFM indicates the Data_Cache cell in the flash area that will be used for the target bit flip. The controller 204 stores the starting logical address GHP 512 and the length 512 of the target trimming (GHP 512 ~ GHP 1023) in a 2KB interval 1002 (half a cell) of the planned cache area Data_Cache. The corresponding 4B trimming code Trim_Code uses "0xAAAA" to indicate the interpretation of the content of the interval 1002. The remaining 2B trim code Trim_Code is temporarily filled with dummy data.

步驟3,對應”0xAAAA”修整代號,控制器204將目標修整(GHP 512~GHP 1023)起始邏輯位址GHP 512以及長度512填入快取區Data_Cache的2KB半個儲存格1002。Step 3. Corresponding to the “0xAAAA” trim code, the controller 204 fills the target trimming (GHP 512~GHP 1023) starting logical address GHP 512 and the length 512 into the 2KB half cell 1002 of the Data_Cache in the cache area.

第10C圖採用前述大量區間修整技術(第6A、6B圖),將目標位元已翻轉的目標修整位元子表TBM_G0載入快取區Data_Cache。Figure 10C uses the aforementioned mass interval trimming technology (Figures 6A and 6B) to load the target trimming bit sub-table TBM_G0 whose target bit has been flipped into the cache Data_Cache.

步驟1,控制器204對動態隨機記憶體206上暫存的256KB之修整位元總表TBM進行更新。即第二位元翻”0”。Step 1. The controller 204 updates the 256KB trimmed bit total table TBM temporarily stored in the dynamic random access memory 206. That is, the second bit turns "0".

步驟2,控制器204編寫修整資訊旗標表TIFM、以及修整代號Trim_Code。控制器204是規劃區間1004快取該目標修整位元子表TBM_G0。區間1004所屬該4KB空間(包括區間1002以及1004)早已由修整資訊旗標表TIFM中對應位元標示(“1”),此處不再調整。但該修整代號Trim_Code中,控制器204在對應區間1002的0xAAAA之後的2B填寫該目標修整位元子表TBM_G0之目標子表編號0x0000。Step 2: The controller 204 compiles the trimming information flag table TIFM and the trimming code Trim_Code. The controller 204 caches the target trimming bit sub-table TBM_G0 in the planning interval 1004. The 4KB space (including the intervals 1002 and 1004) to which the interval 1004 belongs has already been marked by the corresponding bit ("1") in the trimming information flag table TIFM, and will not be adjusted here. However, in the trimming code Trim_Code, the controller 204 fills in the target subtable number 0x0000 of the target trimming bit subtable TBM_G0 at 2B after 0xAAAA in the corresponding interval 1002.

步驟3,控制器204在2KB區間1004中填入最新版本的該目標修整位元子表TBM_G0。Step 3: The controller 204 fills the latest version of the target trimming bit sub-table TBM_G0 in the 2KB interval 1004.

整理之,控制器204是在填寫一指令完成佇列(completion queue)回報主機208一第一指令完成後,但尚未自一指令佇列(command queue)獲得主機208發出的一第二指令時,利用此閒冗區間,逐位元將修整位元總表TBM狀況更新到主機-快閃記憶體映射表H2F。每位元翻轉指涉及一個映射子表H2F_G#更新,不會過度耗時。In summary, the controller 204 fills in a command completion queue (completion queue) to report to the host 208 after the first command is completed, but has not yet obtained a second command issued by the host 208 from a command queue (command queue), Using this idle interval, the status of the trimming bit summary table TBM is updated to the host-flash memory mapping table H2F bit by bit. Bit flip refers to the update of a mapping sub-table H2F_G#, which will not be excessively time-consuming.

以下更討論主機208的寫入指令。倘若要求寫入的邏輯位址是由該修整位元總表TBM標示成已修整,控制器204需要以前述修整位元總表TBM翻轉技術更新該主機-快閃記憶體映射表H2F(第10A~10C圖),再進行寫入動作。The write command of the host 208 will be discussed below. If the logical address requested to be written is marked as trimmed by the trimming bit list TBM, the controller 204 needs to update the host-flash memory mapping table H2F (10A) using the aforementioned trimming bit list TBM flip technology. ~10C figure), and then perform the write operation.

第11圖圖解LBA 10240(5MB)起始的12KB寫入如何被回應。Figure 11 illustrates how the initial 12KB write of LBA 10240 (5MB) is responded to.

快取區Data_Cache以2KB區間1102以及2KB區間1104反映該修整位元總表TBM相應位元之翻轉。此例中,該修整位元總表TBM的第三個位元(對應5MB,屬修整位元子表TBM_G0)為翻轉的目標位元,對應2MB目標修整GHP 1024~1535,其映射資訊屬映射子表H2F_G3。控制器204將映射子表H2F_G3為全域主機頁GHP 1024~1535全數填上虛置映射資料,並在快取區Data_Cache半個儲存格的2KB空間1102儲存目標修整GHP 1024~1535的起始邏輯位址GHP 1024、以及長度512。隨後,控制器204翻轉該修整位元總表TBM,並將翻轉後的該修整位元子表TBM_G0填入儲存格1104。同前述技術,雖未繪製在圖中,但對應區間1102、1104的填寫,控制器204還將修整資訊旗標表TIFM對應位元設立為”1”,且修整代號Trim_Code為[0xAAAA, 0x0000]。The cache area Data_Cache uses 2KB interval 1102 and 2KB interval 1104 to reflect the inversion of the corresponding bits of the modified bit table TBM. In this example, the third bit of the trimming bit table TBM (corresponding to 5MB, belonging to the trimming bit sub-table TBM_G0) is the flipped target bit, corresponding to the 2MB target trimming GHP 1024~1535, and its mapping information belongs to the mapping information Child table H2F_G3. The controller 204 fills in the mapping subtable H2F_G3 as the global host page GHP 1024~1535 with dummy mapping data, and stores the target in the 2KB space 1102 of the half cell of the Data_Cache in the cache area, trimming the starting logic bits of GHP 1024~1535 Address GHP 1024, and length 512. Subsequently, the controller 204 flips the trimmed bit total table TBM, and fills the trimmed bit sub-table TBM_G0 in the storage cell 1104 after the flipped. The same as the aforementioned technology, although not drawn in the figure, corresponding to the filling of intervals 1102 and 1104, the controller 204 also sets the corresponding bit of the trimming information flag table TIFM to "1", and the trim code Trim_Code is [0xAAAA, 0x0000] .

映射子表H2F_G3反映出GHP 1024~1535修整狀況後,控制器204就可以安心進行其上12KB的使用者資料寫入。如圖所示,控制器204將12KB寫入資料快取於區間1106所標示的三個儲存格。此時,本全為虛置映射資料的映射子表H2F_G3,其中全域主機頁編號GHP1279~1281會改成指向區間1106。全域主機頁編號GHP 1024~1278、以及GHP 1282~1535的修整狀態仍可由其虛置映射資訊觀察而得。After the mapping sub-table H2F_G3 reflects the modification status of GHP 1024~1535, the controller 204 can write the user data of 12KB on it with peace of mind. As shown in the figure, the controller 204 caches 12KB of written data in the three cells indicated by the interval 1106. At this time, the mapping sub-table H2F_G3, which is all dummy mapping data, in which the global host page numbers GHP1279~1281 will be changed to point to the interval 1106. The trimming status of the global host page numbers GHP 1024~1278 and GHP 1282~1535 can still be obtained by observing their dummy mapping information.

一種實施方式中,非預期斷電事件發生時,為了善用裝置電力,控制器204可能只會挽救動態隨機存取記憶體206部分內容,例如,只將快取區Data_Cache內容、快取區Data_Cache各儲存格對應資訊(包括標示邏輯位址、或修整代號的各儲存格儲存資訊、以及修整資訊旗標表TIFM)沖至快閃記憶體202。修整位元總表TBM會遺失。主機-快閃記憶體映射表H2F部分內容可能也來不及更新。因此,非預期斷電之復電(sudden power-off recovery,SPOR)需要一個重建機制,重建修整位元總表TBM、以及主機-快閃記憶體映射表H2F。In one embodiment, when an unexpected power failure event occurs, in order to make good use of the device power, the controller 204 may only save part of the content of the dynamic random access memory 206, for example, only the contents of the cache area Data_Cache and the cache area Data_Cache The corresponding information of each cell (including the storage information of each cell indicating the logical address or the trimming code, and the trimming information flag table TIFM) is flushed to the flash memory 202. The trimming bit summary table TBM will be lost. Part of the host-flash memory mapping table H2F may not be updated in time. Therefore, sudden power-off recovery (SPOR) requires a reconstruction mechanism to reconstruct the trimmed bit table TBM and the host-flash memory mapping table H2F.

第12A、12B、12C圖根據本案一種實施方式圖解表格重建機制。Figures 12A, 12B, and 12C illustrate the table reconstruction mechanism according to an embodiment of this case.

參閱第12A圖,復電時,控制器204掃描快閃記憶體202(例如,根據系統資訊區塊Info_Blk所載的區塊使用順序),於各區塊的區塊結尾資訊EoB中收集到一串修整資訊旗標1202。各位元對應所屬區塊相對位置的4KB資料、以及該4KB資料的4B儲存資訊(為全域主機頁編號GHP#、或是修整代號Trim_Code)。位元值”0”,則對應的該4KB資料被解讀為使用者資料,對應的4B儲存資訊乃映射之全域主機頁編號GHP#。位元值”1”,則對應的該4KB資料被解讀為修整資訊,對應的4B儲存資訊乃修整代號Trim_Code。該串修整資訊旗標1202對應五段各為4KB的資料,且對應的五段各為4B的儲存資訊1204。儲存資訊1204也可以是自區塊結尾資訊EoB取得。Referring to Figure 12A, when power is restored, the controller 204 scans the flash memory 202 (for example, according to the block usage sequence contained in the system information block Info_Blk), and collects a block end information EoB in each block String trimming information flag 1202. Each element corresponds to the 4KB data of the relative position of the block to which it belongs, and the 4B storage information of the 4KB data (the global host page number GHP#, or the trim code Trim_Code). The bit value is "0", the corresponding 4KB data is interpreted as user data, and the corresponding 4B storage information is mapped to the global host page number GHP#. The bit value is "1", the corresponding 4KB data is interpreted as trimming information, and the corresponding 4B storage information is trimming code Trim_Code. The modified information flag 1202 corresponds to five pieces of data of 4KB each, and the corresponding five pieces of data are stored information 1204 of 4B each. The storage information 1204 can also be obtained from the end-of-block information EoB.

如圖所示,該串修整資訊旗標1202中,第一個”1”值對應儲存資訊1204內的4B儲存資訊[0xAAAA, 0X0003],表示其在區塊中對應的4KB資料乃兩種類型的修整資訊。”0xAAAA”表示前端2KB資料乃一中等長度修整的起始邏輯位址、以及長度。非”0xAAAA”的”0x0003”則應當解讀為一子表編號,表示後端2KB資料乃一大量修整的修整位元子表TBM_G3。該串修整資訊旗標1202另有第二個”1”值,對應儲存資訊1204內的4B儲存資訊[0xAAAA, 虛置資料],表示其在區塊中對應的4KB資料只有前端2KB資料有意義。”0xAAAA”表示前端2KB資料乃一中等長度修整的起始邏輯位址、以及長度。以下特別討論該串修整資訊旗標1202中第一個”1”值所涉及的表格重建。As shown in the figure, the first "1" value in the modified information flag 1202 corresponds to the 4B storage information [0xAAAA, 0X0003] in the storage information 1204, indicating that the corresponding 4KB data in the block is of two types Trimming information. "0xAAAA" indicates that the front-end 2KB data is a medium-length trimmed starting logical address and length. "0x0003" that is not "0xAAAA" should be interpreted as a sub-table number, indicating that the back-end 2KB data is a large-scale trimmed bit sub-table TBM_G3. The modified information flag 1202 has a second "1" value, which corresponds to the 4B storage information [0xAAAA, dummy data] in the storage information 1204, which means that the corresponding 4KB data in the block is only meaningful for the front 2KB data. "0xAAAA" indicates that the front-end 2KB data is a medium-length trimmed starting logical address and length. The following specifically discusses the table reconstruction involved in the first "1" value in the series of trimming information flags 1202.

參閱第12B圖,根據”0xAAAA”,區塊中對應的2KB資料乃一中等長度修整的起始邏輯位址GHP0x100、以及長度0x80。控制器204在動態隨機存取記憶體206上,將相應的映射子表H2F_G0載出,令全域主機頁編號GHP0x100~GHP0x17F的映射資料都填虛置映射資料。因此,主機-快閃記憶體映射表H2F更新,確實反映出全域主機頁編號GHP0x100~GHP0x17F的修整狀態。Referring to Figure 12B, according to "0xAAAA", the corresponding 2KB data in the block is a medium-length trimmed starting logical address GHP0x100 and a length of 0x80. The controller 204 loads the corresponding mapping sub-table H2F_G0 on the dynamic random access memory 206, so that the mapping data of the global host page numbers GHP0x100~GHP0x17F are filled with dummy mapping data. Therefore, the host-flash memory mapping table H2F is updated, and it does reflect the trimming status of the global host page numbers GHP0x100~GHP0x17F.

參閱第12C圖,根據” 0x0003”, 區塊中對應的2KB資料乃一大量修整的修整位元子表TBM_G3。控制器204會將此2KB修整位元子表TBM_G3更新到動態隨機存取記憶體206上完整維護的修整位元總表TBM中,重建修整位元總表TBM。Referring to Figure 12C, according to "0x0003", the corresponding 2KB data in the block is a subtable TBM_G3 with a large number of trimming bits. The controller 204 updates the 2KB trimming bit sub-table TBM_G3 to the trimming bit summary table TBM that is completely maintained on the dynamic random access memory 206, and rebuilds the trimming bit summary table TBM.

第13圖根據本案一種實施方式圖解修整指令(trim command)處理方法。步驟S1302接收一修整指令。步驟S1304分類該修整範圍(第3圖)。步驟S1306進行首位少量修整(第4圖),若不存在首位少量修整可跳過此步驟。步驟S1308進行首位中等長度修整(第5圖),若不存在首位中等長度修整可跳過此步驟。步驟S1310進行大量修整(第6A、6B圖),若不存在大量修整可跳過此步驟。步驟S1312進行末位中等長度修整(第7圖),若不存在末位中等長度修整可跳過此步驟。步驟S1314進行末位少量修整(第8圖),若不存在末位少量修整可跳過此步驟。各分類修整完畢後,該修整指令即完成。如,控制器204可回填指令完成佇列(completion queue)告知主機208修整完成,控制器204可再接收主機208其他指令。如前述,流程中大量修整(S1310)並不會耗費資源在主機-快閃記憶體映射表H2F更新上。控制器204以第13圖修整程序快速回應修整指令,進而執行主機208接續其他要求。Figure 13 illustrates a trim command processing method according to an embodiment of the present case. Step S1302 receives a trimming instruction. Step S1304 classifies the trimming range (Figure 3). In step S1306, the first minor trimming is performed (Figure 4). If there is no leading minor trimming, this step can be skipped. In step S1308, the first mid-length trimming is performed (Figure 5). If there is no first mid-length trimming, this step can be skipped. Step S1310 performs a large amount of trimming (Figure 6A, 6B). If there is no large amount of trimming, this step can be skipped. Step S1312 performs last mid-length trimming (Figure 7). If there is no last mid-length trimming, this step can be skipped. Step S1314 performs the last small trimming (Figure 8). If there is no last small trimming, this step can be skipped. After the finishing of each category, the finishing instruction is completed. For example, the controller 204 can backfill a command completion queue to inform the host 208 that the finishing is complete, and the controller 204 can then receive other commands from the host 208. As mentioned above, extensive trimming (S1310) in the process does not consume resources on updating the host-flash memory mapping table H2F. The controller 204 quickly responds to the trimming command with the trimming procedure shown in Figure 13, and then executes the host 208 to continue other requests.

第13圖修整程序後,動態隨機存取記憶體206所維護的內容可如第9圖所示。關於主機208再發出的讀取指令,控制器204會參考該修整位元總表TBM進行,避免漏掉尚未更新到主機-快閃記憶體映射表H2F的修整狀況。非預期斷電時,控制器204會將修整標籤Trim_Tag、TIFM中相應的修整資訊旗標、以及修整代號Trim_Code沖(flush)至快閃記憶體202,以應付復電需求。After the trimming process in FIG. 13, the content maintained by the dynamic random access memory 206 can be as shown in FIG. 9. Regarding the read command issued by the host 208 again, the controller 204 will refer to the trimming bit table TBM to avoid missing the trimming status that has not been updated to the host-flash memory mapping table H2F. When the power is off unexpectedly, the controller 204 flushes the trim tag Trim_Tag, the corresponding trim information flag in the TIFM, and the trim code Trim_Code to the flash memory 202 to meet the power recovery demand.

第14圖為流程圖,根據本案一種實施方式圖解如何根據該修整位元總表TBM背景更新該主機-快閃記憶體映射表H2F。Figure 14 is a flowchart illustrating how to update the host-flash memory mapping table H2F according to the background of the trimming bit summary table TBM according to an embodiment of this case.

步驟S1402,對應一修整位元子表TBM_G#中一位元的”1”à”0”翻轉,控制器204以中等長度修整更新該主機-快閃記憶體映射表H2F(包括相應映射子表H2F_G#填寫虛置映射資料、且將其起始邏輯位址以及長度快取於快取區Data_Cache)。步驟S1404,控制器204以大量修整將新版的該修整位元子表TBM_G#快取於該快取區Data_Cache。步驟S1406判斷控制器204是否閒冗;例如,主機208塞入指令佇列(command queue)中的指令是否都執行完畢。空閒的控制器204可更在步驟S1408確定該修整位元總表TBM尚未完全被”1”à”0”翻轉時,再次進行步驟S1402以及S1404。若控制器204有待應付的主機208指令,則進行步驟S1410回應主機208新發出的指令。Step S1402, corresponding to the one-bit "1"→"0" in the trimming bit sub-table TBM_G#, the controller 204 updates the host-flash memory mapping table H2F (including the corresponding mapping sub-table H2F_G#Fill in dummy mapping data, and cache its starting logical address and length in the cache area Data_Cache). In step S1404, the controller 204 caches the new version of the modified bit sub-table TBM_G# in the cache Data_Cache with a large number of modifications. Step S1406 is to determine whether the controller 204 is idle or redundant; for example, whether all the commands stuffed into the command queue by the host 208 have been executed. The idle controller 204 may further perform steps S1402 and S1404 when it is determined in step S1408 that the trimming bit total table TBM has not been completely flipped by "1"→"0". If the controller 204 has a host 208 command to be dealt with, step S1410 is performed to respond to the newly issued command from the host 208.

第15圖為流程圖,根據本案一種實施方式圖解如何回應主機208發出的寫入指令。FIG. 15 is a flowchart illustrating how to respond to the write command sent by the host 208 according to an embodiment of this case.

步驟S1502,控制器204接收一寫入指令。步驟S1504,控制器204查詢該修整位元總表TBM,確定該寫入指令要求寫入資料的邏輯位址是否被該修整位元總表TBM標註。若是標註在一修整位元子表TBM_G#的一位元Bit#,控制器204進行步驟S1506,對該修整位元子表TBM_G#的該位元Bit#作”1”à”0”翻轉,其中以中等長度修整更新該主機-快閃記憶體映射表H2F(包括相應映射子表H2F_G#填寫虛置映射資料、且將其起始邏輯位址以及長度快取於快取區Data_Cache),再以大量修整將新版的該修整位元子表TBM_G#快取於該快取區Data_Cache。步驟S1508,控制器204將寫入資料快取於該快取區Data_Cache。步驟S1510,控制器204更新主機-快閃記憶體映射表H2F,將寫入資料的映射資訊填為該快取區Data_Cache。以上步驟妥善應付大量修整後發生的少量寫入。In step S1502, the controller 204 receives a write command. In step S1504, the controller 204 queries the trimming bit summary table TBM, and determines whether the logical address of the data to be written by the write command is marked by the trimming bit summary table TBM. If it is marked with a bit Bit# of a trimming bit sub-table TBM_G#, the controller 204 proceeds to step S1506, turning the bit Bit# of the trimming bit sub-table TBM_G# "1"→"0", Among them, update the host-flash memory mapping table H2F with medium length trimming (including corresponding mapping sub-table H2F_G# fill in dummy mapping data, and cache its starting logical address and length in the cache Data_Cache), and then Cache the new version of the modified bit sub-table TBM_G# in the cache area Data_Cache with a large amount of modification. In step S1508, the controller 204 caches the written data in the cache area Data_Cache. In step S1510, the controller 204 updates the host-flash memory mapping table H2F, and fills the mapping information of the written data into the cache area Data_Cache. The above steps properly cope with a small amount of writing that occurs after a large amount of trimming.

第16圖為流程圖,根據本案一種實施方式圖解如何一復電程序。Figure 16 is a flowchart illustrating how to perform a power recovery procedure according to an embodiment of this case.

步驟S1602復電。步驟S1604,控制器204掃描快閃記憶體202(例如,根據程式化順序),獲得一串修整資訊旗標。步驟S1606,控制器204判讀該串修整資訊旗標其中一位元。若為”1”,控制器204以步驟S1608更判讀修整代號。若為”0xAAAA”,控制器204以步驟S1610解讀出一中等長度修整之起始邏輯位址以及修整長度,據以重建該主機-快閃記憶體映射表H2F中對應部分(填虛置映射資料)。步驟S1608若判斷出修整代號為一修整位元子表TBM_G#的子表編號,控制器204以步驟S1612解讀出修整位元子表TBM_G#,據以重建該修整位元總表TBM。步驟S1614判別是否該修整資訊旗標對應的兩個修整代號都完成判讀。若否,控制器204再次進行步驟S1608。若是,控制器204以步驟S1616判斷是否該串修整資訊旗標處理完畢。若否,控制器重回步驟S1606。若是,流程結束。Step S1602 restores power. In step S1604, the controller 204 scans the flash memory 202 (for example, according to a programming sequence) to obtain a series of trimming information flags. In step S1606, the controller 204 judges one bit of the string trimming information flag. If it is "1", the controller 204 further determines the trim code in step S1608. If it is "0xAAAA", the controller 204 interprets a mid-length trimmed starting logical address and trim length in step S1610, and then reconstructs the corresponding part of the host-flash memory mapping table H2F (filling in dummy mapping data) ). If it is determined in step S1608 that the trimming code is a sub-table number of a trimming bit sub-table TBM_G#, the controller 204 interprets the trimming bit sub-table TBM_G# in step S1612 to reconstruct the trimming bit total table TBM. In step S1614, it is judged whether the two refining codes corresponding to the refining information flag have been judged. If not, the controller 204 performs step S1608 again. If yes, the controller 204 determines whether the processing of the string trimming information flag is completed in step S1616. If not, the controller returns to step S1606. If yes, the process ends.

步驟S1606若判讀一修整資訊旗標為”0”,則進行步驟S1618,控制器204解讀出4KB使用者資料對應的全域主機頁編號GHP#,據以更新該主機-快閃記憶體映射表H2F。Step S1606: If it is determined that a trimming information flag is "0", then step S1618 is performed, and the controller 204 interprets the global host page number GHP# corresponding to the 4KB user data, and updates the host-flash memory mapping table H2F accordingly .

以上控制器204對快閃記憶體202之操作設計也可以由其他結構實現。凡是根據前述概念執行修整者,都屬於本案欲保護範圍。本案更可以前述概念實現非揮發式記憶體的控制方法。The operation design of the above controller 204 on the flash memory 202 can also be implemented by other structures. Anyone who implements corrections based on the aforementioned concepts falls within the scope of protection intended by this case. In this case, the aforementioned concept can be used to realize the control method of non-volatile memory.

雖然本發明已以較佳實施例揭露如上,然其並非用以限定本發明,任何熟悉此項技藝者,在不脫離本發明之精神和範圍內,當可做些許更動與潤飾,因此本發明之保護範圍當視後附之申請專利範圍所界定者為準。Although the present invention has been disclosed in preferred embodiments as above, it is not intended to limit the present invention. Anyone familiar with the art can make some changes and modifications without departing from the spirit and scope of the present invention. Therefore, the present invention The scope of protection shall be subject to the scope of the attached patent application.

200:資料儲存裝置 202:快閃記憶體 204:控制器 206:動態隨機存取記憶體(DRAM) 208:主機 210:主動區塊A_Blk的閒置區域 302…310:修整邏輯位址範圍分類區間 402、404、502、602、604、702、802、804、1002、1004、1102、1104、1106:快取區Data_Cache之儲存區間 1202:一串修整資訊旗標 1204:一串儲存資訊 A_Blk:主動區塊 Blk:區塊 Data_Cache:快取區 GHP0、GHP1、GHP511、GHP0x100、GHP0x17F 、GHP0xC00000、GHP0xC0007F、GHP0xC00080:全域主機頁編號的映射資訊 H2F:主機-快閃記憶體映射表 H2F_G0、H2F_G48、H2F_G#:映射子表 Info_Blk:系統資訊區塊 S1302…S1314、S1402…S1410、S1502…S1510、S1602…S1618:步驟 Spare_Area:閒置區域 TBM:修整位元總表 TBM_G0、TBM_G1、TBM_G2、TBM_G3、TBM_G127:修整位元子表 TIFM:修整資訊旗標表 Trim_Code:修整代碼 Trim_Tag:修整標籤200: Data storage device 202: flash memory 204: Controller 206: Dynamic Random Access Memory (DRAM) 208: Host 210: idle area of active block A_Blk 302…310: trim the logical address range classification interval 402, 404, 502, 602, 604, 702, 802, 804, 1002, 1004, 1102, 1104, 1106: the storage interval of Data_Cache in the cache area 1202: A string of trimming information flags 1204: A string of stored information A_Blk: active block Blk: block Data_Cache: Cache area GHP0, GHP1, GHP511, GHP0x100, GHP0x17F, GHP0xC00000, GHP0xC0007F, GHP0xC00080: mapping information for global host page numbers H2F: host-flash memory mapping table H2F_G0, H2F_G48, H2F_G#: mapping sub-table Info_Blk: system information block S1302...S1314, S1402...S1410, S1502...S1510, S1602...S1618: steps Spare_Area: idle area TBM: Total table of trimming bits TBM_G0, TBM_G1, TBM_G2, TBM_G3, TBM_G127: trim bit sub-table TIFM: trimming information flag table Trim_Code: trim code Trim_Tag: Trimming tag

第1圖圖解快閃記憶體中區塊Blk之結構; 第2圖圖解根據本案一種實施方式所實現的一資料儲存裝置200; 第3圖圖解修整之分類; 第4圖圖解首位少量修整(302),其中修整邏輯區塊位址LBA 5~LBA 7; 第5圖圖解首位中等長度修整(304) ,其中修整邏輯區塊位址LBA 8~LBA 4095; 第6A圖以及第6B圖圖解大量修整(306),其中修整邏輯區塊位址LBA 4096~LBA 100663295; 第7圖圖解末位中等長度修整(308); 第8圖圖解末位少量修整(310),其中修整邏輯區塊位址LBA 100664320~LBA 100664323; 第9圖整理LBA 5~LBA 100664323修整指令執行後,動態隨機存取記憶體206上存在內容; 第10A、10B以及10C圖圖解該修整位元總表TBM一位元之”1”至”0”翻轉; 第11圖圖解LBA 10240(5MB)起始的12KB寫入如何被回應; 第12A、12B、12C圖根據本案一種實施方式圖解表格重建機制; 第13圖根據本案一種實施方式圖解修整指令(trim command)處理方法; 第14圖為流程圖,根據本案一種實施方式圖解如何根據該修整位元總表TBM背景更新該主機-快閃記憶體映射表H2F; 第15圖為流程圖,根據本案一種實施方式圖解如何回應主機208發出的寫入指令;以及 第16圖為流程圖,根據本案一種實施方式圖解如何一復電程序。Figure 1 illustrates the structure of block Blk in flash memory; Figure 2 illustrates a data storage device 200 implemented according to an embodiment of the present case; Figure 3 illustrates the classification of trimmings; Figure 4 illustrates the first minor trimming (302), where the trimming logic block addresses are LBA 5~LBA 7; Figure 5 illustrates the first medium-length trimming (304), where the trimming logic block address is LBA 8~LBA 4095; Figures 6A and 6B illustrate a large number of trimming (306), where the trimming logic block addresses are LBA 4096~LBA 100663295; Figure 7 illustrates the last mid-length trimming (308); Figure 8 illustrates the last bit trimming (310), where the trimming logic block addresses are LBA 100664320~LBA 100664323; Figure 9 summarizes the contents of the dynamic random access memory 206 after the LBA 5~LBA 100664323 trimming instructions are executed; Figures 10A, 10B and 10C illustrate the "1" to "0" reversal of one bit of the trimming bit table TBM; Figure 11 illustrates how the initial 12KB write of LBA 10240 (5MB) is responded; Figures 12A, 12B, and 12C illustrate the table reconstruction mechanism according to an implementation of this case; Figure 13 illustrates a trim command processing method according to an embodiment of this case; Figure 14 is a flowchart showing how to update the host-flash memory mapping table H2F according to the background of the trimming bit summary table TBM according to an embodiment of this case; Figure 15 is a flowchart illustrating how to respond to the write command sent by the host 208 according to an embodiment of this case; and Figure 16 is a flowchart illustrating how to perform a power recovery procedure according to an embodiment of this case.

200:資料儲存裝置200: Data storage device

202:快閃記憶體202: flash memory

204:控制器204: Controller

206:動態隨機存取記憶體(DRAM)206: Dynamic Random Access Memory (DRAM)

208:主機208: Host

210:主動區塊A_Blk的閒置區域210: idle area of active block A_Blk

A_Blk:主動區塊A_Blk: active block

Data_Cache:快取區Data_Cache: Cache area

H2F:主機-快閃記憶體映射表H2F: host-flash memory mapping table

H2F_G#:映射子表H2F_G#: Mapping sub-table

Info_Blk:系統資訊區塊Info_Blk: system information block

TBM:修整位元總表TBM: Total table of trimming bits

TIFM:修整資訊旗標表TIFM: trimming information flag table

Trim_Code:修整代碼Trim_Code: trim code

Trim_Tag:修整標籤Trim_Tag: Trimming tag

Claims (16)

一種資料儲存裝置,包括: 一非揮發式記憶體;以及 耦接該非揮發式記憶體的一控制器以及一暫存記憶體,其中,該控制器係建構來在該暫存記憶體上重建該非揮發式記憶體的修整狀況, 其中: 該控制器根據一程式化順序掃描該非揮發式記憶體,收集一串修整資訊旗標,據以解讀自該非揮發式記憶體掃描出的一串儲存資訊為邏輯位址、或是修整代號; 該控制器根據解讀出的邏輯位址重建一主機-裝置映射表; 該控制器根據解讀出的修整代號,判斷該非揮發式記憶體相應儲存空間係儲存中等長度修整之資訊、或大量修整之資訊; 根據中等長度修整之資訊,該控制器將虛置映射資料填入該主機-裝置映射表;且 根據大量修整之資訊,該控制器重建一修整位元總表,該修整位元總表各位元對應一第一長度之修整。A data storage device, including: A non-volatile memory; and A controller coupled to the non-volatile memory and a temporary memory, wherein the controller is constructed to reconstruct the trim condition of the non-volatile memory on the temporary memory, among them: The controller scans the non-volatile memory according to a programmed sequence, collects a string of trimming information flags, and interprets a string of stored information scanned from the non-volatile memory as a logical address or trim code; The controller reconstructs a host-device mapping table according to the decoded logical address; The controller determines whether the corresponding storage space of the non-volatile memory stores medium-length trimmed information or a large amount of trimmed information based on the decoded trim code; According to the medium-length trimmed information, the controller fills the host-device mapping table with dummy mapping data; and According to a large amount of trimming information, the controller rebuilds a trimming bit summary table, and each bit of the trimming bit summary table corresponds to a trimming of a first length. 如請求項1之資料儲存裝置,其中: 一筆中等長度修整不超過該第一長度,且對齊一第二長度之分界。Such as the data storage device of request 1, where: A stroke of mid-length trimming does not exceed the first length, and is aligned with the boundary of a second length. 如請求項2之資料儲存裝置,其中: 一筆中等長度修整之資訊包括該筆中等長度修整的起始邏輯位址以及長度。Such as the data storage device of request 2, in which: The information of a mid-length trim includes the starting logical address and length of the mid-length trim. 如請求項3之資料儲存裝置,其中: 上述修整代號為一中等長度修整代號時,該控制器判斷該非揮發式記憶體相應儲存空間係儲存一筆中等長度修整的起始邏輯位址以及長度。Such as the data storage device of request 3, where: When the above-mentioned trimming code is a mid-length trimming code, the controller determines that the corresponding storage space of the non-volatile memory stores a mid-length trimmed initial logical address and length. 如請求項4之資料儲存裝置,其中: 一筆大量修整對齊該第一長度之分界、且為該第一長度之N倍,對應該修整位元總表的N個位元,N為正整數。Such as the data storage device of request 4, in which: A large amount of trimming is aligned with the boundary of the first length and is N times the first length, corresponding to the N bits of the trimming bit table, where N is a positive integer. 如請求項5之資料儲存裝置,其中: 該修整位元總表包括複數個修整位元子表; 上述N個位元對應到該等修整位元子表其中M個修整位元子表,M為正整數;且 該筆大量修整之資訊包括上述M個修整位元子表。Such as the data storage device of request 5, where: The total table of trimming bits includes a plurality of sub-tables of trimming bits; The above-mentioned N bits correspond to the sub-tables of trimming bits, where M are sub-tables of trimming bits, and M is a positive integer; and The large amount of trimmed information includes the above-mentioned M trimming bit subtables. 如請求項6之資料儲存裝置,其中: 上述修整代號為上述M個修整位元子表的M個子表編號時,該控制器判斷該非揮發式記憶體相應儲存空間係儲存上述M個修整位元子表。Such as the data storage device of request 6, in which: When the dressing code is the M sub-table numbers of the M dressing bit sub-tables, the controller determines that the corresponding storage space of the non-volatile memory stores the M dressing bit sub-tables. 如請求項7之資料儲存裝置,其中: 該主機-裝置映射表包括複數個映射子表;且 各映射子表以該第二長度為單位,管理該第一長度之邏輯位址區間的映射資料。Such as the data storage device of request 7, in which: The host-device mapping table includes a plurality of mapping sub-tables; and Each mapping sub-table uses the second length as a unit to manage the mapping data of the logical address interval of the first length. 一種非揮發式記憶體控制方法,包括: 在一暫存記憶體上重建一非揮發式記憶體的修整狀況; 根據一程式化順序掃描該非揮發式記憶體,收集一串修整資訊旗標,據以解讀自該非揮發式記憶體掃描出的一串儲存資訊為邏輯位址、或是修整代號; 根據解讀出的邏輯位址重建一主機-裝置映射表; 根據解讀出的修整代號,判斷該非揮發式記憶體相應儲存空間係儲存中等長度修整之資訊、或大量修整之資訊; 根據中等長度修整之資訊,將虛置映射資料填入該主機-裝置映射表;且 根據大量修整之資訊,重建一修整位元總表,該修整位元總表各位元對應一第一長度之修整。A non-volatile memory control method, including: Rebuild the trim condition of a non-volatile memory on a temporary memory; Scan the non-volatile memory according to a programmed sequence, collect a string of trimming information flags, and interpret the string of stored information scanned from the non-volatile memory as a logical address or trim code; Rebuild a host-device mapping table according to the decoded logical address; According to the decoded trim code, determine whether the corresponding storage space of the non-volatile memory stores medium-length trimmed information or a large amount of trimmed information; Fill the host-device mapping table with dummy mapping data based on the medium-length trimmed information; and According to the information of a large amount of trimming, reconstruct a trimming bit summary table, and each bit of the trimming bit summary table corresponds to the trimming of a first length. 如請求項9之非揮發式記憶體控制方法,其中: 一筆中等長度修整不超過該第一長度,且對齊一第二長度之分界。Such as the non-volatile memory control method of claim 9, where: A stroke of mid-length trimming does not exceed the first length, and is aligned with the boundary of a second length. 如請求項10之非揮發式記憶體控制方法,其中: 一筆中等長度修整之資訊包括該筆中等長度修整的起始邏輯位址以及長度。Such as the non-volatile memory control method of claim 10, where: The information of a mid-length trim includes the starting logical address and length of the mid-length trim. 如請求項11之非揮發式記憶體控制方法,其中: 上述修整代號為一中等長度修整代號時,該控制器判斷該非揮發式記憶體相應儲存空間係儲存一筆中等長度修整的起始邏輯位址以及長度。Such as the non-volatile memory control method of claim 11, where: When the above-mentioned trimming code is a mid-length trimming code, the controller determines that the corresponding storage space of the non-volatile memory stores a mid-length trimmed initial logical address and length. 如請求項12之非揮發式記憶體控制方法,其中: 一筆大量修整對齊該第一長度之分界、且為該第一長度之N倍,對應該修整位元總表的N個位元,N為正整數。Such as the non-volatile memory control method of claim 12, where: A large amount of trimming is aligned with the boundary of the first length and is N times the first length, corresponding to the N bits of the trimming bit table, where N is a positive integer. 如請求項13之非揮發式記憶體控制方法,其中: 該修整位元總表包括複數個修整位元子表; 上述N個位元對應到該等修整位元子表其中M個修整位元子表,M為正整數;且 該筆大量修整之資訊包括上述M個修整位元子表。Such as the non-volatile memory control method of claim 13, where: The total table of trimming bits includes a plurality of sub-tables of trimming bits; The above-mentioned N bits correspond to the sub-tables of trimming bits, where M are sub-tables of trimming bits, and M is a positive integer; and The large amount of trimmed information includes the above-mentioned M trimming bit subtables. 如請求項14之非揮發式記憶體控制方法,更包括: 上述修整代號為上述M個修整位元子表的M個子表編號時,判斷該非揮發式記憶體相應儲存空間係儲存上述M個修整位元子表。For example, the non-volatile memory control method of claim 14 further includes: When the above-mentioned trim code is the number of the M sub-tables of the M trim-bit sub-tables, it is determined that the corresponding storage space of the non-volatile memory stores the above-mentioned M trim-bit sub-tables. 如請求項15之非揮發式記憶體控制方法,其中: 該主機-裝置映射表包括複數個映射子表;且 各映射子表以該第二長度為單位,管理該第一長度之邏輯位址區間的映射資料。Such as the non-volatile memory control method of claim 15, where: The host-device mapping table includes a plurality of mapping sub-tables; and Each mapping sub-table uses the second length as a unit to manage the mapping data of the logical address interval of the first length.
TW109117980A 2019-11-29 2020-05-29 Data storage device and non-volatile memory control method TWI745987B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
US17/025,004 US11748023B2 (en) 2019-11-29 2020-09-18 Data storage device and non-volatile memory control method
CN202011173409.5A CN112885397B (en) 2019-11-29 2020-10-28 Data storage device and non-volatile memory control method

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US201962941936P 2019-11-29 2019-11-29
US62/941,936 2019-11-29

Publications (2)

Publication Number Publication Date
TW202121176A true TW202121176A (en) 2021-06-01
TWI745987B TWI745987B (en) 2021-11-11

Family

ID=77516515

Family Applications (3)

Application Number Title Priority Date Filing Date
TW109117977A TWI742698B (en) 2019-11-29 2020-05-29 Data storage device and non-volatile memory control method
TW109117980A TWI745987B (en) 2019-11-29 2020-05-29 Data storage device and non-volatile memory control method
TW109117978A TWI745986B (en) 2019-11-29 2020-05-29 Data storage device and non-volatile memory control method

Family Applications Before (1)

Application Number Title Priority Date Filing Date
TW109117977A TWI742698B (en) 2019-11-29 2020-05-29 Data storage device and non-volatile memory control method

Family Applications After (1)

Application Number Title Priority Date Filing Date
TW109117978A TWI745986B (en) 2019-11-29 2020-05-29 Data storage device and non-volatile memory control method

Country Status (1)

Country Link
TW (3) TWI742698B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11669270B1 (en) 2021-12-23 2023-06-06 Hefei Core Storage Electronic Limited Multi-channel memory storage device, memory control circuit unit and data reading method

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI423026B (en) * 2010-10-29 2014-01-11 Phison Electronics Corp Data writing method, memory controller and memory storage apparatus
US9274937B2 (en) * 2011-12-22 2016-03-01 Longitude Enterprise Flash S.A.R.L. Systems, methods, and interfaces for vector input/output operations
US8949512B2 (en) * 2012-02-17 2015-02-03 Apple Inc. Trim token journaling
US10430328B2 (en) * 2014-09-16 2019-10-01 Sandisk Technologies Llc Non-volatile cache and non-volatile storage medium using single bit and multi bit flash memory cells or different programming parameters
US10452532B2 (en) * 2017-01-12 2019-10-22 Micron Technology, Inc. Directed sanitization of memory
CN108733577B (en) * 2017-04-21 2021-10-22 群联电子股份有限公司 Memory management method, memory control circuit unit and memory storage device
TWI634424B (en) * 2017-05-08 2018-09-01 慧榮科技股份有限公司 Data storage device and operating method therefor
TWI639918B (en) * 2017-05-11 2018-11-01 慧榮科技股份有限公司 Data storage device and operating method therefor
TWI672590B (en) * 2017-06-27 2019-09-21 慧榮科技股份有限公司 Data storage device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11669270B1 (en) 2021-12-23 2023-06-06 Hefei Core Storage Electronic Limited Multi-channel memory storage device, memory control circuit unit and data reading method
TWI825551B (en) * 2021-12-23 2023-12-11 大陸商合肥兆芯電子有限公司 Multi-channel memory storage device, memory control circuit unit and data reading method

Also Published As

Publication number Publication date
TWI745987B (en) 2021-11-11
TWI742698B (en) 2021-10-11
TWI745986B (en) 2021-11-11
TW202121425A (en) 2021-06-01
TW202121413A (en) 2021-06-01

Similar Documents

Publication Publication Date Title
CN112882650B (en) Data storage device and non-volatile memory control method
US9792067B2 (en) Trim command processing in a solid state drive
KR101916206B1 (en) Methods, devices and systems for two stage power-on map rebuild with free space accounting in a solid state drive
JP6210570B2 (en) Method, apparatus and system for physical logical mapping in solid state drives
CN100487672C (en) Method and apparatus for splitting a logical block
JP6192024B2 (en) Method, data storage device and system for fragmented firmware table reconstructed in a solid state drive
US9213633B2 (en) Flash translation layer with lower write amplification
KR101562781B1 (en) Self-journaling and hierarchical consistency for non-volatile storage
US8291155B2 (en) Data access method, memory controller and memory storage system
CN107784121B (en) Lowercase optimization method of log file system based on nonvolatile memory
JP6076506B2 (en) Storage device
CN112882649B (en) Data storage device and non-volatile memory control method
DE102009026178A1 (en) Multi-level-control multi-flash device, has smart storage transaction manager managing transactions from host, and set of non-volatile memory blocks storing host data at block location identified by physical block address
KR20060046181A (en) Memory card, semiconductor device, and method of controlling semiconductor memory
US11520696B2 (en) Segregating map data among different die sets in a non-volatile memory
US20170357462A1 (en) Method and apparatus for improving performance of sequential logging in a storage device
KR20180002259A (en) Structure and design method of flash translation layer
JP4460967B2 (en) MEMORY CARD, NONVOLATILE SEMICONDUCTOR MEMORY, AND SEMICONDUCTOR MEMORY CONTROL METHOD
TWI745987B (en) Data storage device and non-volatile memory control method
CN111104345B (en) SSD power-on recovery method, system and host
CN112885397B (en) Data storage device and non-volatile memory control method
CN111610929A (en) Data storage device and non-volatile memory control method
TWI724550B (en) Data storage device and non-volatile memory control method
CN117369715A (en) System, method and apparatus for updating usage reclamation units based on references in storage devices