[go: up one dir, main page]

TW202001565A - Method for managing flash memory module and associated flash memory controller and electronic device - Google Patents

Method for managing flash memory module and associated flash memory controller and electronic device Download PDF

Info

Publication number
TW202001565A
TW202001565A TW107121232A TW107121232A TW202001565A TW 202001565 A TW202001565 A TW 202001565A TW 107121232 A TW107121232 A TW 107121232A TW 107121232 A TW107121232 A TW 107121232A TW 202001565 A TW202001565 A TW 202001565A
Authority
TW
Taiwan
Prior art keywords
data table
garbage collection
demand data
flash memory
read
Prior art date
Application number
TW107121232A
Other languages
Chinese (zh)
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 TW107121232A priority Critical patent/TW202001565A/en
Priority to CN201810750679.4A priority patent/CN110633047A/en
Priority to US16/260,011 priority patent/US20190391916A1/en
Publication of TW202001565A publication Critical patent/TW202001565A/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/023Free address space management
    • G06F12/0253Garbage collection, i.e. reclamation of unreferenced memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0751Error or fault detection not based on redundancy
    • G06F11/0754Error or fault detection not based on redundancy by exceeding limits
    • G06F11/076Error or fault detection not based on redundancy by exceeding limits by exceeding a count or rate limit, e.g. word- or bit count limit
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/0292User address space allocation, e.g. contiguous or non contiguous base addressing using tables or multilevel address translation means
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0608Saving storage space on storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/064Management of blocks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • G06F3/0658Controller construction arrangements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0679Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/023Free address space management
    • G06F12/0238Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory
    • G06F12/0246Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory in block erasable memory, e.g. flash memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/10Providing a specific technical effect
    • G06F2212/1041Resource optimization
    • G06F2212/1044Space efficiency improvement
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/72Details relating to flash memory management
    • G06F2212/7205Cleaning, compaction, garbage collection, erase control

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Quality & Reliability (AREA)
  • Memory System (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

The present invention provides a method for managing a flash memory module, wherein the flash memory module includes a plurality of blocks, and the method includes the steps of: building a garbage collection table, wherein the garbage collection records a plurality of importance information corresponding to the plurality of blocks, respectively, and each importance information is used to represent a garbage collection priority of the corresponding block; and when the flash memory module requires garbage collection operations, referring to the garbage collection table to select a specific block that has a top priority of the garbage collection operations, and using the specific block to start the garbage collection operations.

Description

管理快閃記憶體模組的方法及相關的快閃記憶體控制器及電子裝置Method for managing flash memory module and related flash memory controller and electronic device

本發明係有關於快閃記憶體,尤指一種管理快閃記憶體模組的方法及相關的快閃記憶體控制器及電子裝置。The present invention relates to flash memory, in particular to a method for managing flash memory modules and related flash memory controllers and electronic devices.

在傳統的快閃記憶體控制器中,若是在短時間內很多區塊有垃圾收集(garbage collection)的需求時,快閃記憶體控制器會根據預設的優先性順序來依序對區塊進行垃圾收集操作,例如先對有耗損平均(wear-leveling)需求的區塊進行垃圾收集操作…等等。然而,由於每一個區塊需要進行垃圾收集操作的考慮因素很多,除了耗損平均需求之外可能還有讀取回收(read reclaim)需求或是讀取更新(read refresh)需求,因此,先前技術中單純根據預設的優先性來決定區塊進行垃圾收集操作的順序並無法考慮到區塊的實際的需求。另外,由於垃圾收集操作所需的時間較多,因此一般來說不可能一次就將所有具有垃圾收集需求的區塊全部完成,因此先前技術中的做法很有可能會使得部分預設優先性順序較低的區塊一直無法進行垃圾收集操作,因而導致可能的資料損失(data loss)。In a traditional flash memory controller, if many blocks have garbage collection requirements in a short time, the flash memory controller will sequentially order the blocks according to the preset priority order Carry out garbage collection operations, such as first performing garbage collection operations on blocks with wear-leveling requirements...etc. However, because there are many considerations for each block that requires garbage collection operations, in addition to the average wear and tear requirements, there may be read reclaim or read refresh requirements. Therefore, in the prior art Simply determining the order in which blocks perform garbage collection operations based on preset priorities does not take into account the actual needs of the blocks. In addition, because the garbage collection operation requires more time, it is generally impossible to complete all blocks with garbage collection requirements at one time, so the practice in the prior art is likely to make some preset priorities The lower blocks have been unable to perform garbage collection operations, resulting in possible data loss.

因此,本發明的目的之一在於設計一種管理快閃記憶體模組的方法,其透過建立一垃圾收集對照表,以記錄每一個區塊目前需要進行垃圾收集操作的優先性,以供快閃記憶體控制器進行垃圾收集操作時的參考,以解決先前技術中的問題。Therefore, one of the objects of the present invention is to design a method for managing flash memory modules by establishing a garbage collection comparison table to record the priority of each block currently required for garbage collection operations for flash The memory controller refers to the garbage collection operation to solve the problems in the prior art.

在本發明的一個實施例中,揭露了一種管理一快閃記憶體模組的方法,其中該快閃記憶體模組包含了多個區塊,以及該方法包含有:建立一垃圾收集對照表,其中該垃圾收集對照表記錄了分別對應到該多個區塊的多個重要性資訊,其中每一個重要性資訊用以表示所對應之區塊需要進行一垃圾收集操作的優先性;以及當該快閃記憶體模組需要進行該垃圾收集操作時,參考該垃圾收集對照表以決定出需要優先進行該垃圾收集操作的一特定區塊,並由該特定區塊開始進行該垃圾收集操作。In one embodiment of the present invention, a method for managing a flash memory module is disclosed, wherein the flash memory module includes a plurality of blocks, and the method includes: establishing a garbage collection comparison table , Where the garbage collection comparison table records multiple pieces of importance information corresponding to the multiple blocks, where each piece of importance information is used to indicate the priority of the corresponding block for a garbage collection operation; and When the flash memory module needs to perform the garbage collection operation, it refers to the garbage collection comparison table to determine a specific block that needs to be prioritized for the garbage collection operation, and starts the garbage collection operation from the specific block.

在本發明的另一個實施例中,揭露了一種快閃記憶體控制器,其中該快閃記憶體控制器係用來存取一快閃記憶體模組,該快閃記憶體模組包含了多個區塊,且該快閃記憶體控制器包含有用來執行該程式碼的一唯讀記憶體以及用來執行該程式碼以控制對該快閃記憶體模組之存取的一微處理器。在該快閃記憶體控制器的操作中,該微處理器建立一垃圾收集對照表,其中該垃圾收集對照表記錄了分別對應到該多個區塊的多個重要性資訊,其中每一個重要性資訊用以表示所對應之區塊需要進行一垃圾收集操作的優先性;以及當該快閃記憶體模組需要進行該垃圾收集操作時,該微處理器參考該垃圾收集對照表以決定出需要優先進行該垃圾收集操作的一特定區塊,並由該特定區塊開始進行該垃圾收集操作。In another embodiment of the invention, a flash memory controller is disclosed, wherein the flash memory controller is used to access a flash memory module, the flash memory module includes Multiple blocks, and the flash memory controller includes a read-only memory for executing the code and a micro-processing for executing the code to control access to the flash memory module Device. In the operation of the flash memory controller, the microprocessor establishes a garbage collection comparison table, wherein the garbage collection comparison table records a plurality of importance information corresponding to the plurality of blocks, each of which is important Sex information is used to indicate the priority of a garbage collection operation for the corresponding block; and when the flash memory module needs to perform the garbage collection operation, the microprocessor refers to the garbage collection comparison table to determine It is necessary to prioritize a specific block of the garbage collection operation, and start the garbage collection operation from the specific block.

在本發明的另一個實施例中,揭露了一種電子裝置,其包含有包含多個區塊的一快閃記憶體模組以及用來存取該快閃記憶體模組的一快閃記憶體控制器。在該電子裝置的操作中,該快閃記憶體控制器建立一垃圾收集對照表,其中該垃圾收集對照表記錄了分別對應到該多個區塊的多個重要性資訊,其中每一個重要性資訊用以表示所對應之區塊需要進行一垃圾收集操作的優先性;以及當該快閃記憶體模組需要進行該垃圾收集操作時,該快閃記憶體控制器參考該垃圾收集對照表以決定出需要優先進行該垃圾收集操作的一特定區塊,並由該特定區塊開始進行該垃圾收集操作。In another embodiment of the present invention, an electronic device is disclosed, which includes a flash memory module including a plurality of blocks and a flash memory for accessing the flash memory module Controller. During the operation of the electronic device, the flash memory controller creates a garbage collection comparison table, wherein the garbage collection comparison table records a plurality of importance information corresponding to the plurality of blocks, each of which is important The information is used to indicate the priority of a garbage collection operation for the corresponding block; and when the flash memory module needs to perform the garbage collection operation, the flash memory controller refers to the garbage collection comparison table to It is determined that a specific block that needs to be prioritized for the garbage collection operation is started from the specific block.

第1圖為依據本發明一實施例之一種記憶裝置100的示意圖。記憶裝置100包含有一快閃記憶體(Flash Memory)模組120以及一快閃記憶體控制器110,且快閃記憶體控制器110用來存取快閃記憶體模組120。依據本實施例,快閃記憶體控制器110包含一微處理器112、一唯讀記憶體(Read Only Memory, ROM)112M、一控制邏輯114、一緩衝記憶體116、與一介面邏輯118。唯讀記憶體112M係用來儲存一程式碼112C,而微處理器112則用來執行程式碼112C以控制對快閃記憶體模組120之存取(Access)。控制邏輯114包含了一編碼器132以及一解碼器134,其中編碼器132用來對寫入到快閃記憶體模組120中的資料進行編碼以產生對應的校驗碼(或稱,錯誤更正碼(Error Correction Code),ECC),而解碼器134用來將從快閃記憶體模組120所讀出的資料進行解碼。FIG. 1 is a schematic diagram of a memory device 100 according to an embodiment of the invention. The memory device 100 includes a flash memory module 120 and a flash memory controller 110, and the flash memory controller 110 is used to access the flash memory module 120. According to this embodiment, the flash memory controller 110 includes a microprocessor 112, a read only memory (Read Only Memory, ROM) 112M, a control logic 114, a buffer memory 116, and an interface logic 118. The read-only memory 112M is used to store a program code 112C, and the microprocessor 112 is used to execute the program code 112C to control access to the flash memory module 120 (Access). The control logic 114 includes an encoder 132 and a decoder 134, wherein the encoder 132 is used to encode the data written into the flash memory module 120 to generate a corresponding check code (or, error correction) Error Correction Code (ECC), and the decoder 134 is used to decode the data read from the flash memory module 120.

於典型狀況下,快閃記憶體模組120包含了多個快閃記憶體晶片,而每一個快閃記憶體晶片包含複數個區塊(Block),而快閃記憶體控制器110對快閃記憶體模組120進行抹除資料運作係以區塊為單位來進行。另外,一區塊可記錄特定數量的資料頁(Page),其中快閃記憶體控制器110對快閃記憶體模組120進行寫入資料之運作係以資料頁為單位來進行寫入。在本實施例中,快閃記憶體模組120為一立體NAND型快閃記憶體(3D NAND-type flash)模組。Under typical conditions, the flash memory module 120 includes a plurality of flash memory chips, and each flash memory chip includes a plurality of blocks, and the flash memory controller 110 flashes the flash memory. The operation of erasing data by the memory module 120 is performed in units of blocks. In addition, a block can record a specific number of data pages (Page), in which the flash memory controller 110 writes data to the flash memory module 120 in units of data pages. In this embodiment, the flash memory module 120 is a three-dimensional NAND-type flash memory (3D NAND-type flash) module.

實作上,透過微處理器112執行程式碼112C之快閃記憶體控制器110可利用其本身內部之元件來進行諸多控制運作,例如:利用控制邏輯114來控制快閃記憶體模組120之存取運作(尤其是對至少一區塊或至少一資料頁之存取運作)、利用緩衝記憶體116進行所需之緩衝處理、以及利用介面邏輯118來與一主裝置(Host Device)130溝通。緩衝記憶體116係以隨機存取記憶體(Random Access Memory,RAM)來實施。例如,緩衝記憶體116可以是靜態隨機存取記憶體(Static RAM,SRAM),但本發明不限於此。In practice, the flash memory controller 110 that executes the program code 112C through the microprocessor 112 can use its own internal components to perform many control operations, such as: using the control logic 114 to control the flash memory module 120 Access operations (especially access operations on at least one block or at least one data page), using buffer memory 116 to perform required buffer processing, and using interface logic 118 to communicate with a host device 130 . The buffer memory 116 is implemented by random access memory (Random Access Memory, RAM). For example, the buffer memory 116 may be static random access memory (Static RAM, SRAM), but the present invention is not limited thereto.

在一實施例中,記憶裝置100可以是可攜式記憶裝置(例如:符合SD/MMC、CF、MS、XD標準之記憶卡),且主裝置130為一可與記憶裝置連接的電子裝置,例如手機、筆記型電腦、桌上型電腦…等等。而在另一實施例中,記憶裝置100可以是固態硬碟或符合通用快閃記憶體儲存(Universal Flash Storage,UFS)或嵌入式多媒體記憶卡(Embedded Multi Media Card,EMMC)規格之嵌入式儲存裝置,以設置在一電子裝置中,例如設置在手機、筆記型電腦、桌上型電腦之中,而此時主裝置130可以是該電子裝置的一處理器。In one embodiment, the memory device 100 may be a portable memory device (for example, a memory card that conforms to SD/MMC, CF, MS, XD standards), and the main device 130 is an electronic device that can be connected to the memory device. For example, mobile phones, notebook computers, desktop computers... and so on. In another embodiment, the memory device 100 may be a solid-state hard disk or an embedded storage that conforms to Universal Flash Storage (UFS) or Embedded Multi Media Card (EMMC) specifications The device may be installed in an electronic device, such as a mobile phone, a notebook computer, or a desktop computer, and the main device 130 may be a processor of the electronic device.

在快閃記憶體控制器110讀取快閃記憶體模組120的過程中,快閃記憶體控制器110會根據存取過程所得到的資訊以建立/更新一耗損平均需求資料表、一讀取回收需求資料表以及一讀取更新需求資料表。具體來說,先參考第2圖,其為根據本發明一實施例之耗損平均需求資料表200的示意圖。參考第2圖,假設快閃記憶體模組120中具有多個區塊B1、B2、B3、…,則耗損平均需求資料表200便可以記錄該多個區塊中抹除次數高於一第一臨界值的區塊及其抹除次數,其中該抹除次數指的是從快閃記憶體控制器110與快閃記憶體模組120連結後開始運作便開始計算的總抹除次數。舉例來說,假設該第一臨界值為60,則由於區塊B9、B6、B1、B7的抹除次數分別為高於60次的86、62、95、63次,則耗損平均需求資料表200便會將區塊B9、B6、B1、B7及其抹除次數記錄在其中,而其餘的區塊由於抹除次數不高於60次或是屬於空白區塊,因此並未記錄在耗損平均需求資料表200中。During the process of the flash memory controller 110 reading the flash memory module 120, the flash memory controller 110 creates/updates a consumption average demand data table based on the information obtained during the access process. Retrieve the demand data table and read the update demand data table. Specifically, referring first to FIG. 2, which is a schematic diagram of a wear-out average demand data table 200 according to an embodiment of the present invention. Referring to FIG. 2, assuming that the flash memory module 120 has a plurality of blocks B1, B2, B3, ..., the average consumption demand data table 200 can record that the number of erasures in the plurality of blocks is higher than a first A threshold value block and the number of erasing times, wherein the number of erasing times refers to the total number of erasing counts after the flash memory controller 110 and the flash memory module 120 are connected and started to operate. For example, assuming that the first critical value is 60, since the erase times of blocks B9, B6, B1, and B7 are respectively 86, 62, 95, and 63 times higher than 60, the average demand data table is consumed 200 will record the blocks B9, B6, B1, B7 and the number of erasures in it, and the remaining blocks are not recorded in the average wear and tear because the number of erasures is not higher than 60 or is a blank block. Demand data table 200.

第3圖為根據本發明一實施例之讀取回收需求資料表300的示意圖。參考第3圖,假設快閃記憶體模組120中具有如第2圖所示的多個區塊B1、B2、B3、…,則讀取回收需求資料表300便可以記錄該多個區塊中位元錯誤量高於一第二臨界值的區塊及其位元錯誤量。舉例來說,假設該第二臨界值為50個位元,則由於區塊B3、B9、B2、B5、B1的位元錯誤量分別為高於50次的56、58、65、68、52次,則讀取回收需求資料表300便會將區塊B3、B9、B2、B5、B1及其位元錯誤量記錄在其中。在本實施例中,讀取回收需求資料表300係為一佇列(queue),而上述的位元錯誤量係由快閃記憶體控制器110在讀取一區塊中任一資料頁的一區段(sector)或是一組塊(chunk)後進行解碼所得到,亦即當快閃記憶體控制器110在讀取區塊時若是發現所解碼之區段/組塊的位元錯誤量高於50,快閃記憶體控制器110才會將該區塊加入到讀取回收需求資料表300。FIG. 3 is a schematic diagram of reading a recycling demand data table 300 according to an embodiment of the invention. Referring to FIG. 3, assuming that the flash memory module 120 has a plurality of blocks B1, B2, B3, ... as shown in FIG. 2, reading the recycling demand data table 300 can record the plurality of blocks A block with a median bit error amount higher than a second threshold and its bit error amount. For example, assuming that the second critical value is 50 bits, the amount of bit errors in blocks B3, B9, B2, B5, and B1 are 56, 58, 65, 68, and 52, which are higher than 50 times, respectively. Then, reading the recycling demand data table 300 will record the blocks B3, B9, B2, B5, B1 and their bit error amounts in them. In this embodiment, the read and recycle request data table 300 is a queue, and the above-mentioned bit error amount is read by the flash memory controller 110 in any data page in a block. It is obtained after decoding a sector or a group of chunks, that is, if the flash memory controller 110 finds a bit error in the decoded sector/chunk when reading the block If the amount is higher than 50, the flash memory controller 110 will add the block to the read recycling demand data table 300.

第4圖為根據本發明一實施例之讀取更新需求資料表400的示意圖。參考第4圖,假設快閃記憶體模組120中具有如第2圖所示的多個區塊B1、B2、B3、…,則讀取更新需求資料表400便可以記錄該多個區塊中讀取次數高於一第三臨界值的區塊及其讀取次數。舉例來說,假設該第三臨界值為8000,則由於區塊B1、B4、B3的讀取次數分別為高於8000次的8012、8045、11210次,則讀取更新需求資料表400便會將區塊B1、B4、B3及其讀取次數記錄在其中。在本實施例中,更新需求資料表400僅繪示了佇列的部分,而在實作上更新需求資料表400亦可包含記錄了每一個區塊之讀取次數的一記錄表,而當快閃記憶體控制器110發出一讀取命令以要求讀取一區塊的資料時,便會將該區塊的讀取次數加上“1”,而當該區塊的內容被抹除後重新寫入資料時,該記錄表中該區塊的讀取次數便會重新開始計算。FIG. 4 is a schematic diagram of reading the update requirement data table 400 according to an embodiment of the invention. Referring to FIG. 4, assuming that the flash memory module 120 has a plurality of blocks B1, B2, B3, ... as shown in FIG. 2, reading the update requirement data table 400 can record the plurality of blocks Blocks with medium read times higher than a third threshold and their read times. For example, assuming that the third critical value is 8000, since the read times of blocks B1, B4, and B3 are 8012, 8045, and 11210 times higher than 8000, respectively, reading the update demand data table 400 will Record the blocks B1, B4, B3 and their reading times in it. In this embodiment, the update demand data table 400 only shows part of the queue, and in practice the update demand data table 400 may also include a record table that records the number of reads for each block. When the flash memory controller 110 issues a read command to read a block of data, it will add "1" to the number of reads of the block, and when the content of the block is erased When rewriting the data, the number of reads of the block in the record table will be restarted.

在本實施例中,上述的耗損平均需求資料表200、讀取回收需求資料表300以及讀取更新需求資料表400係隨著快閃記憶體控制器110存取快閃記憶體模組120的過程中不斷地更新於快閃記憶體模組120中,並且可暫存一份在緩衝記憶體116中。In the present embodiment, the above-mentioned wear-out average demand data table 200, read recycling demand data table 300, and read update demand data table 400 are used by the flash memory controller 110 to access the flash memory module 120 The flash memory module 120 is continuously updated during the process, and a copy can be temporarily stored in the buffer memory 116.

在本實施例中,快閃記憶體控制器110會根據上述耗損平均需求資料表200、讀取回收需求資料表300以及讀取更新需求資料表400的內容來建立一垃圾收集對照表,其中該垃圾收集對照表記錄了分別對應到該多個區塊的多個重要性資訊,其中每一個重要性資訊用以表示所對應之區塊需要進行一垃圾收集操作的優先性。參考第5圖,其為根據本發明一實施例之垃圾收集對照表500的示意圖。如第5圖所示,垃圾收集對照表500可以記錄每一個區塊B1、B2、B3、…的重要性資訊,其中該重要性資訊係由每一個區塊在耗損平均需求資料表200、讀取回收需求資料表300以及讀取更新需求資料表400內的資訊所計算得到。具體來說,本實施例中係假設耗損平均需求的重要性大於讀取回收需求,且讀取回收需求的重要性大於讀取更新需求,因此假設耗損平均需求、讀取回收需求以及讀取更新需求的權重分別為4、2、1。因此,以區塊B1為例,由於在耗損平均需求資料表200、讀取回收需求資料表300以及讀取更新需求資料表400都有記錄區塊B1,亦即區塊B1同時具有耗損平均需求、讀取回收需求以及讀取更新需求,因此區塊B1的重要性資訊可以計算如下:4*1+2*1+1*1=7;另外以區塊B3為例,由於區塊B3僅被記錄在讀取回收需求資料表300以及讀取更新需求資料表400中,亦即區塊B3僅具讀取回收需求以及讀取更新需求,因此區塊B3的重要性資訊可以計算如下:4*0+2*1+1*1=3。如上所述,由於每一個區塊的重要性資訊係同時參考耗損平均需求、讀取回收需求以及讀取更新需求來計算出來,因此可以確實反映出每一個區塊需要進行垃圾收集操作的優先性,亦即第5圖所示之重要性資訊的數值越高的需要優先進行垃圾收集操作。In this embodiment, the flash memory controller 110 creates a garbage collection comparison table based on the contents of the above-mentioned wear-out average demand data table 200, read recycling demand data table 300, and read update demand data table 400. The garbage collection comparison table records multiple pieces of importance information respectively corresponding to the multiple blocks, wherein each piece of importance information is used to indicate the priority of a garbage collection operation for the corresponding block. Refer to FIG. 5, which is a schematic diagram of a garbage collection comparison table 500 according to an embodiment of the present invention. As shown in FIG. 5, the garbage collection comparison table 500 can record the importance information of each block B1, B2, B3, ..., where the importance information is obtained from each block in the average demand data table 200, read It is calculated by fetching the demand data table 300 and reading and updating the information in the demand data table 400. Specifically, in this embodiment, it is assumed that the importance of the average wear and tear demand is greater than the read and recycle demand, and the importance of the read and recycle demand is greater than the read and update demand, so it is assumed that the average wear and tear demand, read and recycle demand, and read and update The weights of demand are 4, 2, and 1, respectively. Therefore, taking block B1 as an example, since the consumption average demand data table 200, the read recovery demand data table 300, and the read update demand data table 400 all have a record block B1, that is, block B1 also has an average wear and tear demand , Read recycling requirements and read update requirements, so the importance information of block B1 can be calculated as follows: 4*1+2*1+1*1=7; in addition to block B3 as an example, because block B3 is only It is recorded in the read and recycle demand data table 300 and the read and update demand data table 400, that is, block B3 only has read and recycle requirements and read and update requirements, so the importance information of block B3 can be calculated as follows: 4 *0+2*1+1*1=3. As mentioned above, because the importance information of each block is calculated by referring to the average wear and tear requirements, read and recycle requirements, and read and update requirements, it can indeed reflect the priority of each block for garbage collection operations. That is, the higher the value of the importance information shown in Figure 5, the higher the garbage collection operation.

在本實施例中,若是有兩個區塊的重要性資訊相同,例如第5圖的區塊B6、B7的重要性資訊都是“4”,則需要重新參考耗損平均需求資料表200、讀取回收需求資料表300及/或讀取更新需求資料表400的內容來決定出其優先順序。舉例來說,由於在第2圖中的耗損平均需求資料表200記錄了區塊B7的抹除次數高於區塊B6的抹除次數,因此快閃記憶體控制器110會判斷區塊B7進行垃圾收集操作的優先性會高於區塊B6。In this embodiment, if the importance information of two blocks is the same, for example, the importance information of blocks B6 and B7 in FIG. 5 are both "4", then it is necessary to refer again to the average wear and tear demand data table 200, read Retrieve the demand data table 300 and/or read the contents of the updated demand data table 400 to determine its priority. For example, since the wear-out average demand data table 200 in FIG. 2 records that the number of erases of block B7 is higher than the number of erases of block B6, the flash memory controller 110 determines that block B7 performs The garbage collection operation will take priority over block B6.

在本實施例中,當快閃記憶體控制器110需要對快閃記憶體模組120進行垃圾收集操作時,其會根據垃圾收集對照表500所記錄的重要性資訊來依序對區塊B1、B9、B7、B6、B3、B5、B2、B4進行垃圾收集操作,亦即將其中的有效資料搬移到另外的空白區塊當中,並在一區塊內的所有有效資料都完成搬移之後將該區塊抹除或是標記為無效。In this embodiment, when the flash memory controller 110 needs to perform a garbage collection operation on the flash memory module 120, it will sequentially block B1 according to the importance information recorded in the garbage collection comparison table 500 , B9, B7, B6, B3, B5, B2, B4 garbage collection operation, that is, the valid data in it will be moved to another blank block, and after all the valid data in a block has been moved, the Block erase or mark as invalid.

如上所述,由於每一個區塊的重要性資訊係同時參考耗損平均需求、讀取回收需求以及讀取更新需求來計算出來,因此重要性資訊較高的區塊通常會同時具有兩個以上的需求,因此對優先對重要性資訊較高的區塊先進行垃圾收集操作可以同時完成兩個以上的需求,以提升快閃記憶體控制器110的效率。以第5圖為例來說明,由於重要性資訊最高的區塊B1同時具有耗損平均需求、讀取回收需求以及讀取更新需求,因此優先對區塊B1進行垃圾收集操作可以同時完成這三個需求,且也可以快速地釋放出讀取回收需求資料表300以及讀取更新需求資料表400的空間,避免佇列過溢(queue overflow)的情形。As mentioned above, since the importance information of each block is calculated by simultaneously referring to the average consumption demand, read recycling demand, and read update demand, a block with higher importance information usually has more than two Therefore, more than two requirements can be fulfilled at the same time by first performing garbage collection operations on the blocks with higher priority information to improve the efficiency of the flash memory controller 110. Taking Figure 5 as an example to illustrate, since the block B1 with the highest importance information also has the average wear-out demand, the read-recovery demand, and the read-update demand, it is possible to complete these three at the same time by performing a garbage collection operation on block B1 Demand, and can also quickly release the space for reading the recovery demand data table 300 and reading the update demand data table 400 to avoid queue overflow.

在本發明的另一個實施例中,垃圾收集對照表500可以僅根據耗損平均需求資料表200、讀取回收需求資料表300以及讀取更新需求資料表400中其中兩個資料表來建立,亦即垃圾收集對照表500可以僅反應每一個區塊的耗損平均需求以及讀取回收需求、或是僅反應每一個區塊的耗損平均需求以及讀取更新需求、或是僅反應每一個區塊的讀取回收需求以及讀取更新需求,這些設計上的變化均應隸屬於本發明的範疇。In another embodiment of the present invention, the garbage collection comparison table 500 can be created based on only two of the average wear and tear demand data table 200, the read recycling demand data table 300, and the read update demand data table 400. That is, the garbage collection comparison table 500 can only reflect the average wear and tear requirements and read recovery requirements of each block, or only the average wear and tear requirements and read and update requirements of each block, or only the response of each block. Reading and recycling requirements and reading and updating requirements, these design changes should all fall within the scope of the present invention.

需注意的是,第5圖所示之垃圾收集對照表500僅為一範例說明,而並非是作為本發明的限制。在其他的實施例中,垃圾收集對照表500可以僅記錄每一個區塊的編號及其重要性資訊的數值,且該重要性數值可以使用不同的記錄方式,只要垃圾收集對照表500所記錄的內容可以反映出每一個區塊對於垃圾收集操作的優先順序,其記錄方式可以由其他不同方式來呈現。It should be noted that the garbage collection comparison table 500 shown in FIG. 5 is only an example, and is not intended to be a limitation of the present invention. In other embodiments, the garbage collection comparison table 500 may only record the number of each block and the value of its importance information, and the importance value may use different recording methods, as long as the garbage collection comparison table 500 records The content can reflect the priority of each block for the garbage collection operation, and its recording method can be presented in other different ways.

在本發明的一實施例中,上述垃圾收集操作係在快閃記憶體模組120進行一背景掃描(background scan)的過程中進行,亦即快閃記憶體控制器110會週期性地或是根據一排程來決定是否開始進行垃圾收集操作,而當快閃記憶體控制器110決定要進行垃圾收集操作時,快閃記憶體控制器110才會參考第5圖所示之垃圾收集對照表500來決定由那些區塊優先開始進行。需注意的是,垃圾收集操作亦可以由其他機制所觸發,例如當快閃記憶體模組120內的可使用區塊(空白區塊)的數量不足時,而既然本實施例中的垃圾收集操作係在背景掃描中進行,則其區塊的決定順序便僅需要參考垃圾收集對照表500,而不需要考慮到其他類似可使用區塊不足的因素。In an embodiment of the present invention, the above garbage collection operation is performed during a background scan performed by the flash memory module 120, that is, the flash memory controller 110 periodically or Whether to start the garbage collection operation is determined according to a schedule, and when the flash memory controller 110 decides to perform the garbage collection operation, the flash memory controller 110 will refer to the garbage collection comparison table shown in FIG. 5 500 to decide which blocks to start with priority. It should be noted that the garbage collection operation can also be triggered by other mechanisms, for example, when the number of usable blocks (blank blocks) in the flash memory module 120 is insufficient, since the garbage collection in this embodiment The operation is performed in the background scan, and the order of determining the blocks only needs to refer to the garbage collection comparison table 500, and does not need to consider other factors such as insufficient available blocks.

第6圖為根據本發明一實施例之管理一快閃記憶體模組的方法的流程圖。參考以上第1~5圖所揭露的內容,第6圖的流程如下所述:FIG. 6 is a flowchart of a method for managing a flash memory module according to an embodiment of the invention. With reference to the contents disclosed in Figures 1 to 5 above, the flow in Figure 6 is as follows:

步驟600:流程開始。Step 600: The process begins.

步驟602:建立垃圾收集對照表,其中垃圾收集對照表記錄了分別對應到多個區塊的多個重要性資訊。Step 602: Create a garbage collection comparison table, where the garbage collection comparison table records multiple pieces of importance information corresponding to multiple blocks, respectively.

步驟604:當快閃記憶體控制器準備對快閃記憶體模組進行垃圾收集操作時,參考垃圾收集對照表以決定出需要優先進行該垃圾收集操作的特定區塊,並由特定區塊開始進行垃圾收集操作。Step 604: When the flash memory controller prepares to perform a garbage collection operation on the flash memory module, refer to the garbage collection comparison table to determine the specific block that needs to be prioritized for the garbage collection operation, and start from the specific block Perform garbage collection operations.

簡要歸納本發明,在本發明之管理快閃記憶體模組的方法及相關的快閃記憶體控制器中,其透過建立一垃圾收集對照表,以記錄每一個區塊目前需要進行垃圾收集操作的優先性,以供快閃記憶體控制器進行垃圾收集操作時的參考。由於垃圾收集對照表係動態地隨著快閃記憶體控制器存取快閃記憶體模組的過程中不斷地更新,因此垃圾收集對照表可以確實反映出正確的優先順序,以使得垃圾收集操作更有效率。 以上所述僅為本發明之較佳實施例,凡依本發明申請專利範圍所做之均等變化與修飾,皆應屬本發明之涵蓋範圍。To briefly summarize the present invention, in the method for managing flash memory modules and related flash memory controllers of the present invention, it establishes a garbage collection comparison table to record that each block currently needs garbage collection operations The priority of the flash memory controller for the garbage collection operation of the reference. Since the garbage collection comparison table is dynamically updated as the flash memory controller accesses the flash memory module, the garbage collection comparison table can indeed reflect the correct priority order, so that the garbage collection operation more efficient. The above are only the preferred embodiments of the present invention, and all changes and modifications made in accordance with the scope of the patent application of the present invention shall fall within the scope of the present invention.

100‧‧‧記憶裝置 110‧‧‧快閃記憶體控制器 112‧‧‧微處理器 112C‧‧‧程式碼 112M‧‧‧唯讀記憶體 114‧‧‧控制邏輯 116‧‧‧緩衝記憶體 118‧‧‧介面邏輯 120‧‧‧快閃記憶體模組 130‧‧‧主裝置 132‧‧‧編碼器 134‧‧‧解碼器 200‧‧‧耗損平均資料表 300‧‧‧讀取回收資料表 400‧‧‧讀取更新資料表 500‧‧‧垃圾收集對照表 600~604‧‧‧步驟 B0~B9‧‧‧區塊 100‧‧‧memory device 110‧‧‧Flash memory controller 112‧‧‧Microprocessor 112C‧‧‧Code 112M‧‧‧Read-only memory 114‧‧‧Control logic 116‧‧‧buffer memory 118‧‧‧Interface logic 120‧‧‧Flash memory module 130‧‧‧Main device 132‧‧‧Encoder 134‧‧‧decoder 200‧‧‧Average consumption data table 300‧‧‧Read the recycling data table 400‧‧‧Read update data table 500‧‧‧ garbage collection comparison table 600~604‧‧‧step Block B0~B9‧‧‧

第1圖為依據本發明一實施例之一種記憶裝置的示意圖。 第2圖為根據本發明一實施例之耗損平均需求資料表的示意圖。 第3圖為根據本發明一實施例之讀取回收需求資料表的示意圖。 第4圖為根據本發明一實施例之讀取更新需求資料表的示意圖。 第5圖為根據本發明一實施例之垃圾收集對照表的示意圖。 第6圖為根據本發明一實施例之管理一快閃記憶體模組的方法的流程圖。FIG. 1 is a schematic diagram of a memory device according to an embodiment of the invention. FIG. 2 is a schematic diagram of a wear-out average demand data table according to an embodiment of the invention. FIG. 3 is a schematic diagram of reading a recycling demand data table according to an embodiment of the invention. FIG. 4 is a schematic diagram of reading an update requirement data table according to an embodiment of the invention. FIG. 5 is a schematic diagram of a garbage collection comparison table according to an embodiment of the present invention. FIG. 6 is a flowchart of a method for managing a flash memory module according to an embodiment of the invention.

500‧‧‧垃圾收集對照表 500‧‧‧ garbage collection comparison table

B0~B9‧‧‧區塊 Block B0~B9‧‧‧

Claims (20)

一種管理一快閃記憶體模組的方法,其中該快閃記憶體模組包含了多個區塊,以及該方法包含有: 建立一垃圾收集對照表,其中該垃圾收集對照表記錄了分別對應到該多個區塊的多個重要性資訊,其中每一個重要性資訊用以表示所對應之區塊需要進行一垃圾收集操作的優先性;以及 當該快閃記憶體模組需要進行該垃圾收集操作時,參考該垃圾收集對照表以決定出需要優先進行該垃圾收集操作的一特定區塊,並由該特定區塊開始進行該垃圾收集操作。A method for managing a flash memory module, wherein the flash memory module includes multiple blocks, and the method includes: establishing a garbage collection comparison table, wherein the garbage collection comparison table records the corresponding Multiple pieces of importance information to the multiple blocks, where each piece of importance information is used to indicate the priority of a garbage collection operation for the corresponding block; and when the flash memory module needs to carry out the garbage During the collection operation, refer to the garbage collection comparison table to determine a specific block that needs to be prioritized for the garbage collection operation, and start the garbage collection operation from the specific block. 如申請專利範圍第1項所述之方法,其中建立該垃圾收集對照表的步驟包含有: 參考一耗損平均需求資料表、一讀取回收需求資料表以及一讀取更新需求資料表中的至少其二,以建立該垃圾收集對照表。The method as described in item 1 of the patent application scope, wherein the step of creating the garbage collection comparison table includes: referring to at least one of a consumption average demand data table, a read recycling demand data table, and a read update demand data table Second, to establish the garbage collection comparison table. 如申請專利範圍第2項所述之方法,其中建立該垃圾收集對照表的步驟包含有: 同時參考參考該耗損平均需求資料表、讀取回收需求資料表以及該讀取更新需求資料表,以建立該垃圾收集對照表。The method as described in item 2 of the patent application scope, wherein the steps of establishing the garbage collection comparison table include: meanwhile, refer to the wear and tear average demand data table, read the recovery demand data table and read the update demand data table, to Establish the garbage collection comparison table. 如申請專利範圍第3項所述之方法,其中該垃圾收集對照表中每一個區塊的重要性資訊是由該區塊是否出現在該耗損平均需求資料表、讀取回收需求資料表以及該讀取更新需求資料表中來決定。The method as described in item 3 of the patent application scope, wherein the importance information of each block in the garbage collection comparison table is determined by whether the block appears in the worn-out average demand data table, read and recycle demand data table, and the Read the update requirement data table to determine. 如申請專利範圍第4項所述之方法,其中該耗損平均需求資料表、該讀取回收需求資料表以及該讀取更新需求資料表分別具有對應的權重值,以及該垃圾收集對照表中每一個區塊的重要性資訊是由該區塊是否出現在該耗損平均需求資料表、讀取回收需求資料表以及該讀取更新需求資料表中以及所對應的權重值來決定。The method as described in item 4 of the patent application scope, wherein the consumption average demand data table, the read recycling demand data table and the read update demand data table have corresponding weight values, and each The importance information of a block is determined by whether the block appears in the consumption average demand data table, read recycling demand data table, and read update demand data table and the corresponding weight values. 如申請專利範圍第5項所述之方法,其中該耗損平均需求資料表的權重值高於該讀取回收需求資料表以及該讀取更新需求資料表的權重值。The method as described in item 5 of the patent application scope, wherein the weighted value of the average wear and tear demand data table is higher than the weight value of the read recycling demand data table and the read update demand data table. 如申請專利範圍第3項所述之方法,其中該耗損平均需求資料表記錄了抹除次數高於一第一臨界值的區塊及其抹除次數,該讀取回收需求資料表記錄了位元錯誤量高於一第二臨界值的區塊及其位元錯誤量,以及該讀取更新需求資料表記錄了讀取次數高於一第三臨界值的區塊及其讀取次數。The method as described in item 3 of the patent application scope, wherein the wear-out average demand data table records the blocks whose erasure times are higher than a first threshold and their erasure times, and the read-recycling demand data table records the bits The amount of block errors and the amount of bit errors are higher than a second threshold, and the read update request data table records the blocks and the number of read times that are higher than a third threshold. 如申請專利範圍第7項所述之方法,其中參考該垃圾收集對照表以決定出需要優先進行該垃圾收集操作的該特定區塊的步驟包含有: 當有兩個以上的區塊具有相同的重要性資訊時,參考該耗損平均需求資料表所記錄之區塊的抹除次數,或是參考該讀取回收需求資料表所記錄的之區塊的位元錯誤量,或是參考該讀取更新需求資料表所記錄之區塊的讀取次數,以決定出需要優先進行該垃圾收集操作的該特定區塊。The method as described in item 7 of the patent application scope, wherein the step of referring to the garbage collection comparison table to determine the specific block that needs to be prioritized for the garbage collection operation includes: When more than two blocks have the same For importance information, refer to the number of erasures of the blocks recorded in the wear-out average demand data table, or refer to the amount of bit errors in the blocks recorded in the read-recovery demand data table, or refer to the read Update the read times of the blocks recorded in the demand data table to determine the specific block that needs to be prioritized for the garbage collection operation. 如申請專利範圍第1項所述之方法,其中參考該垃圾收集對照表以決定出需要優先進行該垃圾收集操作的該特定區塊,並由該特定區塊開始進行該垃圾收集操作的步驟係在一快閃記憶體控制器對該快閃記憶體模組進行一背景掃描(background scan)的過程中進行。The method as described in item 1 of the patent application scope, wherein the garbage collection comparison table is referred to determine the particular block that needs to be prioritized for the garbage collection operation, and the step of starting the garbage collection operation from the particular block is It is performed during a background scan of the flash memory module by a flash memory controller. 一種快閃記憶體控制器,其中該快閃記憶體控制器係用來存取一快閃記憶體模組,該快閃記憶體模組包含了多個區塊,且該快閃記憶體控制器包含有: 一唯讀記憶體,用來儲存一程式碼;以及 一微處理器,用來執行該程式碼以控制對該快閃記憶體模組之存取; 其中該微處理器建立一垃圾收集對照表,其中該垃圾收集對照表記錄了分別對應到該多個區塊的多個重要性資訊,其中每一個重要性資訊用以表示所對應之區塊需要進行一垃圾收集操作的優先性;以及當該快閃記憶體模組需要進行該垃圾收集操作時,該微處理器參考該垃圾收集對照表以決定出需要優先進行該垃圾收集操作的一特定區塊,並由該特定區塊開始進行該垃圾收集操作。A flash memory controller, wherein the flash memory controller is used to access a flash memory module, the flash memory module includes a plurality of blocks, and the flash memory controls The device includes: a read-only memory for storing a code; and a microprocessor for executing the code to control access to the flash memory module; wherein the microprocessor creates a A garbage collection comparison table, in which the garbage collection comparison table records a plurality of importance information corresponding to the multiple blocks, wherein each importance information is used to indicate that the corresponding block needs to perform a garbage collection priority And when the flash memory module needs to perform the garbage collection operation, the microprocessor refers to the garbage collection comparison table to determine a specific block that needs to be prioritized for the garbage collection operation, and the specific area The block starts the garbage collection operation. 如申請專利範圍第10項所述之快閃記憶體控制器,其中該微處理器參考一耗損平均需求資料表、一讀取回收需求資料表以及一讀取更新需求資料表中的至少其二,以建立該垃圾收集對照表。The flash memory controller as described in item 10 of the patent application scope, wherein the microprocessor refers to at least two of a wear-out average demand data table, a read recycling demand data table, and a read update demand data table To establish the garbage collection comparison table. 如申請專利範圍第11項所述之快閃記憶體控制器,其中該微處理器同時參考參考該耗損平均需求資料表、讀取回收需求資料表以及該讀取更新需求資料表,以建立該垃圾收集對照表。The flash memory controller as described in item 11 of the patent application scope, in which the microprocessor simultaneously refers to and references the wear-out average demand data table, read recovery demand data table, and read update demand data table to create the Garbage collection comparison table. 如申請專利範圍第12項所述之快閃記憶體控制器,其中該垃圾收集對照表中每一個區塊的重要性資訊是由該區塊是否出現在該耗損平均需求資料表、讀取回收需求資料表以及該讀取更新需求資料表中來決定。The flash memory controller as described in item 12 of the patent application scope, wherein the importance information of each block in the garbage collection comparison table is determined by whether the block appears in the worn average demand data table, read and recycle The demand data table and the read update demand data table are determined. 如申請專利範圍第13項所述之快閃記憶體控制器,其中該耗損平均需求資料表、該讀取回收需求資料表以及該讀取更新需求資料表分別具有對應的權重值,以及該垃圾收集對照表中每一個區塊的重要性資訊是由該區塊是否出現在該耗損平均需求資料表、讀取回收需求資料表以及該讀取更新需求資料表中以及所對應的權重值來決定。The flash memory controller as described in item 13 of the patent application scope, wherein the wear and tear average demand data table, the read recycling demand data table and the read update demand data table have corresponding weight values and the garbage The importance information of each block in the collection table is determined by whether the block appears in the wear-out average demand data table, read recycling demand data table, and read update demand data table, and the corresponding weight value. . 如申請專利範圍第14項所述之快閃記憶體控制器,其中該耗損平均需求資料表的權重值高於該讀取回收需求資料表以及該讀取更新需求資料表的權重值。The flash memory controller as described in item 14 of the patent application scope, wherein the weighted value of the average wear-out demand data table is higher than the weight value of the read-recovery demand data table and the read-update demand data table. 如申請專利範圍第12項所述之快閃記憶體控制器,其中該耗損平均需求資料表記錄了抹除次數高於一第一臨界值的區塊及其抹除次數,該讀取回收需求資料表記錄了位元錯誤量高於一第二臨界值的區塊及其位元錯誤量,以及該讀取更新需求資料表記錄了讀取次數高於一第三臨界值的區塊及其讀取次數。The flash memory controller as described in item 12 of the patent application scope, wherein the wear and tear average demand data table records the blocks whose erasure times are higher than a first critical value and the erasure times, and the read recovery demand The data table records the blocks and the amount of bit errors whose bit error amount is higher than a second threshold, and the read update requirement data table records the blocks and the number of read times higher than a third threshold value The number of reads. 如申請專利範圍第16項所述之快閃記憶體控制器,其中當有兩個以上的區塊具有相同的重要性資訊時,該微處理器參考該耗損平均需求資料表所記錄之區塊的抹除次數,或是參考該讀取回收需求資料表所記錄的之區塊的位元錯誤量,或是參考該讀取更新需求資料表所記錄之區塊的讀取次數,以決定出需要優先進行該垃圾收集操作的該特定區塊。The flash memory controller as described in item 16 of the patent application scope, wherein when there are more than two blocks with the same importance information, the microprocessor refers to the blocks recorded in the wear and tear average demand data table The number of erasing times, either refer to the amount of bit errors in the blocks recorded in the read recovery request data table, or refer to the read times of the blocks recorded in the read update request data table to determine The specific block of the garbage collection operation needs to be prioritized. 如申請專利範圍第10項所述之快閃記憶體控制器,其中該微處理器係在對該快閃記憶體模組進行一背景掃描(background scan)的過程時參考該垃圾收集對照表以決定出需要優先進行該垃圾收集操作的該特定區塊,並由該特定區塊開始進行該垃圾收集操作。The flash memory controller as described in item 10 of the patent application scope, wherein the microprocessor refers to the garbage collection comparison table when performing a background scan on the flash memory module Determine the specific block that needs to be prioritized for the garbage collection operation, and start the garbage collection operation from the specific block. 一種電子裝置,包含有: 一快閃記憶體模組,包含多個區塊;以及 一快閃記憶體控制器,用來存取該快閃記憶體模組; 其中該快閃記憶體控制器建立一垃圾收集對照表,其中該垃圾收集對照表記錄了分別對應到該多個區塊的多個重要性資訊,其中每一個重要性資訊用以表示所對應之區塊需要進行一垃圾收集操作的優先性;以及當該快閃記憶體模組需要進行該垃圾收集操作時,該快閃記憶體控制器參考該垃圾收集對照表以決定出需要優先進行該垃圾收集操作的一特定區塊,並由該特定區塊開始進行該垃圾收集操作。An electronic device includes: a flash memory module including multiple blocks; and a flash memory controller for accessing the flash memory module; wherein the flash memory controller A garbage collection comparison table is established, wherein the garbage collection comparison table records a plurality of importance information corresponding to the multiple blocks, wherein each importance information is used to indicate that the corresponding block needs to perform a garbage collection operation Priority; and when the flash memory module needs to perform the garbage collection operation, the flash memory controller refers to the garbage collection comparison table to determine a specific block that needs to be prioritized for the garbage collection operation, And start the garbage collection operation from the specific block. 如申請專利範圍第19項所述之電子裝置,其中該快閃記憶體控制器同時參考參考該耗損平均需求資料表、讀取回收需求資料表以及該讀取更新需求資料表,以建立該垃圾收集對照表。The electronic device as described in item 19 of the patent application range, wherein the flash memory controller simultaneously refers to the wear-out average demand data table, reads the recycle demand data table, and reads the update demand data table to create the garbage Collect the comparison table.
TW107121232A 2018-06-21 2018-06-21 Method for managing flash memory module and associated flash memory controller and electronic device TW202001565A (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
TW107121232A TW202001565A (en) 2018-06-21 2018-06-21 Method for managing flash memory module and associated flash memory controller and electronic device
CN201810750679.4A CN110633047A (en) 2018-06-21 2018-07-10 Method for managing flash memory module and related flash memory controller and electronic device
US16/260,011 US20190391916A1 (en) 2018-06-21 2019-01-28 Method for managing flash memory module and associated flash memory controller and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW107121232A TW202001565A (en) 2018-06-21 2018-06-21 Method for managing flash memory module and associated flash memory controller and electronic device

Publications (1)

Publication Number Publication Date
TW202001565A true TW202001565A (en) 2020-01-01

Family

ID=68968194

Family Applications (1)

Application Number Title Priority Date Filing Date
TW107121232A TW202001565A (en) 2018-06-21 2018-06-21 Method for managing flash memory module and associated flash memory controller and electronic device

Country Status (3)

Country Link
US (1) US20190391916A1 (en)
CN (1) CN110633047A (en)
TW (1) TW202001565A (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102578188B1 (en) * 2018-05-15 2023-09-14 에스케이하이닉스 주식회사 Memory controller and operating method thereof
US11200113B2 (en) * 2020-01-14 2021-12-14 Intel Corporation Auto-increment write count for nonvolatile memory
KR20210111527A (en) * 2020-03-03 2021-09-13 에스케이하이닉스 주식회사 Apparatus and method for performing garbage collection in a memory system
US12061814B2 (en) 2021-01-25 2024-08-13 Pure Storage, Inc. Using data similarity to select segments for garbage collection
KR20220122064A (en) * 2021-02-26 2022-09-02 에스케이하이닉스 주식회사 Data storage device and its operation method
US11961547B2 (en) * 2022-02-09 2024-04-16 Micron Technology, Inc. Techniques for memory system refresh
CN115454710B (en) * 2022-11-10 2023-03-24 珠海妙存科技有限公司 Flash memory data reading method and device, electronic equipment and storage medium

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100789406B1 (en) * 2006-11-03 2007-12-28 삼성전자주식회사 Flash memory system and its garbage collection method
US8595572B2 (en) * 2009-04-08 2013-11-26 Google Inc. Data storage device with metadata command
US8266501B2 (en) * 2009-09-29 2012-09-11 Micron Technology, Inc. Stripe based memory operation
US8626986B2 (en) * 2010-06-30 2014-01-07 Sandisk Technologies Inc. Pre-emptive garbage collection of memory blocks
US8706983B2 (en) * 2010-06-30 2014-04-22 Sandisk Technologies Inc. Garbage collection of memory blocks using volatile memory
KR101774496B1 (en) * 2010-12-08 2017-09-05 삼성전자주식회사 Non-volatile memory device, devices having the same, method of operating the same
US8589761B2 (en) * 2011-05-31 2013-11-19 Micron Technology, Inc. Apparatus and methods for providing data integrity
KR102164630B1 (en) * 2013-06-28 2020-10-12 삼성전자주식회사 Memory controller, and operation method of the memory controller
EP3049962B1 (en) * 2013-09-27 2019-10-23 Intel Corporation Mechanism for facilitating dynamic and proactive data management for computing devices
KR102727958B1 (en) * 2016-12-28 2024-11-11 에스케이하이닉스 주식회사 Memory system and operating method of memory system

Also Published As

Publication number Publication date
US20190391916A1 (en) 2019-12-26
CN110633047A (en) 2019-12-31

Similar Documents

Publication Publication Date Title
CN110908925B (en) High-efficiency garbage collection method, data storage device and controller thereof
TWI692690B (en) Method for accessing flash memory module and associated flash memory controller and electronic device
TW202001565A (en) Method for managing flash memory module and associated flash memory controller and electronic device
US10474573B2 (en) Method for managing flash memory module and associated flash memory controller and electronic device
CN111475425B (en) Method for managing flash memory module and related flash memory controller and electronic device
TWI659304B (en) Method for accessing flash memory module and associated flash memory controller and electronic device
TWI748410B (en) Method and apparatus for performing block management regarding non-volatile memory
CN107590080B (en) Mapping table updating method, memory control circuit unit and memory storage device
CN101630233B (en) Data access method, storage system and controller for flash memory
TWI459198B (en) Memory storage device, memory controller thereof, and method for identifying valid data
CN102890655B (en) Memory storage device, its memory controller and effective data identification method
CN111338562B (en) Data storage device and data processing method
TWI748542B (en) Electronic device, flash memory controller and method for performing garbage collection operation on flash memory module
TW202013183A (en) High efficiency garbage collection method, and associated data storage device and controller thereof
CN111488118A (en) Method for managing flash memory module and related flash memory controller and electronic device
TWI670598B (en) Method for managing flash memory module and associated flash memory controller and electronic device
TWI873852B (en) Flash memory controller, memory device and associated control method
US12147670B2 (en) Method and apparatus for performing data access management of memory device in predetermined communications architecture with aid of unbalanced table regions
TWI864944B (en) Method for controlling flash memory module and associated flash memory controller and memory device
US12130743B2 (en) Method and apparatus for performing data access management of memory device in predetermined communications architecture with aid of unbalanced table search
US20250094058A1 (en) Control method of memory device, and associated flash memory controller and memory device
US20240232074A1 (en) Method and apparatus for performing data access management of memory device in predetermined communications architecture with aid of unbalanced table update
TWI653630B (en) Method for accessing flash memory module and related flash memory controller and electronic device
TW202512194A (en) Flash memory controller, memory device and associated control method