TWI570559B - Flash memory and accessing method thereof - Google Patents

Flash memory and accessing method thereof Download PDF

Info

Publication number
TWI570559B
TWI570559B TW104144003A TW104144003A TWI570559B TW I570559 B TWI570559 B TW I570559B TW 104144003 A TW104144003 A TW 104144003A TW 104144003 A TW104144003 A TW 104144003A TW I570559 B TWI570559 B TW I570559B
Authority
TW
Taiwan
Prior art keywords
page
address
block
physical memory
mapping table
Prior art date
Application number
TW104144003A
Other languages
Chinese (zh)
Other versions
TW201723850A (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 TW104144003A priority Critical patent/TWI570559B/en
Priority to CN201610093907.6A priority patent/CN106919517B/en
Application granted granted Critical
Publication of TWI570559B publication Critical patent/TWI570559B/en
Publication of TW201723850A publication Critical patent/TW201723850A/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/06Addressing a physical block of locations, e.g. base addressing, module addressing, memory dedication
    • 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/7201Logical to physical mapping or translation of blocks or pages

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Memory System (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Description

快閃記憶體及其存取方法Flash memory and its access method

本發明是有關於一種快閃記憶體及其存取方法,且特別是有關於一種快閃記憶體的全區域的頁位址映射方法。The present invention relates to a flash memory and an access method thereof, and more particularly to a page address mapping method for a full area of a flash memory.

隨著資訊時代的來臨,在電子裝置中設置大量的記憶體成為一種趨勢。在現今的技術中,具有非揮發性記憶能力的快閃記憶體成為最受歡迎的選項之一。With the advent of the information age, it has become a trend to place a large amount of memory in electronic devices. In today's technology, flash memory with non-volatile memory is one of the most popular options.

隨著資料量需求變大,且需快速存取的條件下,針對快閃記憶體所進行的邏輯位址與實體位址間的映射動作,成為關鍵的技術。在習知的技術領域中,有提出區塊映射(block mapping)、頁映射(page mapping)以及混合式映射(Hybrid mapping)等方式。其中,頁映射的方式需要很大尺寸的記憶空間來儲存映射資料庫,而區塊映射在隨機存取時所呈現的效能較差。並且,混合式映射透過一個邏輯區塊位址對應一個實體區塊位址的方式,同樣的在隨機存取時所呈現的效能並不佳,且當所存取的資料不全在相同的實體記憶區塊中時,需要進行額外的垃圾蒐集的動作,造成系統額外的負擔。As the volume of data becomes larger and the need for fast access, the mapping between the logical address and the physical address of the flash memory becomes a key technology. In the conventional technical field, there are proposed methods such as block mapping, page mapping, and hybrid mapping. Among them, the way of page mapping requires a large size of memory space to store the mapping database, and the block mapping is less effective in random access. Moreover, the hybrid mapping through a logical block address corresponds to a physical block address, the same performance is not good in random access, and when the accessed data is not all in the same physical memory When the block is in the middle, additional garbage collection is required, which causes an extra burden on the system.

本發明提供一種快閃記憶體及其存取方法,有效增進快閃記憶體的使用效率。The invention provides a flash memory and an access method thereof, which effectively improve the use efficiency of the flash memory.

本發明的快閃記憶體的存取方法,包括:建立全位址映射資料庫,全位址映射資料庫包括多數個頁映射表,各頁映射表被區分為多數個邏輯位址區,且各邏輯位址區包括分別對應多個邏輯頁位址的多數個儲存欄位,各儲存欄位用來儲存對應的邏輯頁位址映射的實體區塊位址以及實體頁位址;建立管理區塊,並對管理區塊寫入頁映射表索引資料;依據頁映射表索引資料以載入頁映射表的其中之一,並依據被載入的頁映射表獲得對應實體記憶區塊;以及,針對對應實體記憶區塊進行資料存取動作。The method for accessing the flash memory of the present invention comprises: establishing a full address mapping database, the full address mapping database includes a plurality of page mapping tables, and each page mapping table is divided into a plurality of logical address regions, and Each logical address area includes a plurality of storage fields corresponding to a plurality of logical page addresses, each storage field is used for storing a physical block address and a physical page address of the corresponding logical page address mapping; establishing a management area Blocking, and writing the page mapping table index data to the management block; indexing the data according to the page mapping table to load one of the page mapping tables, and obtaining the corresponding physical memory block according to the loaded page mapping table; Data access actions are performed for corresponding physical memory blocks.

本發明的快閃記憶體則包括多數個實體記憶區塊以及記憶體控制器。各實體記憶區塊包括多數個實體記憶頁,記憶體控制器耦接實體記憶區塊。記憶體控制器執行:建立全位址映射資料庫,全位址映射資料庫包括多數個頁映射表,各頁映射表被區分為多數個邏輯位址區,且各邏輯位址區包括分別對應多個邏輯頁位址的多數個儲存欄位,各儲存欄位用來儲存對應的邏輯頁位址映射的實體區塊位址以及實體頁位址;建立管理區塊,並對管理區塊寫入頁映射表索引資料;依據頁映射表索引資料以載入頁映射表的其中之一,並依據被載入的頁映射表獲得對應實體記憶區塊;以及,針對對應實體記憶區塊進行資料存取動作。The flash memory of the present invention includes a plurality of physical memory blocks and a memory controller. Each physical memory block includes a plurality of physical memory pages, and the memory controller is coupled to the physical memory blocks. Memory controller execution: establish a full address mapping database, the full address mapping database includes a plurality of page mapping tables, each page mapping table is divided into a plurality of logical address regions, and each logical address region includes a corresponding correspondence a plurality of storage fields of a plurality of logical page addresses, each storage field is used to store a physical block address and a physical page address of the corresponding logical page address mapping; a management block is created, and the management block is written The page mapping table index data; according to the page mapping table index data to load one of the page mapping table, and obtain the corresponding entity memory block according to the loaded page mapping table; and, for the corresponding entity memory block data Access action.

基於上述,本發明提供全位址映射資料庫,透過打破記憶區塊限制,利用多個邏輯位址區分別對應全位址映射資料庫中的多數個頁映射表的方式,來使邏輯頁位址可以快速的映射到對映的實體記憶區塊的實體記憶頁,並完成資料的存取動作。如此一來,快閃記憶體的使用效率可以得到提昇,且執行隨機存取動作時的表現度也可以得到提昇。Based on the above, the present invention provides a full address mapping database, by breaking the memory block limit, using multiple logical address regions corresponding to a plurality of page mapping tables in the full address mapping database to make logical page bits The address can be quickly mapped to the physical memory page of the mapped physical memory block, and the data access action is completed. As a result, the use efficiency of the flash memory can be improved, and the performance when performing random access operations can be improved.

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

請參照圖1,圖1繪示本發明一實施例的快閃記憶體的存取方法的流程圖。其中,步驟S110建立全位址映射資料庫。此全位址映射資料庫包括多數個頁映射表,各頁映射表被區分為多數個邏輯位址區,且各邏輯位址區包括分別對應多個邏輯頁位址的多數個儲存欄位,各儲存欄位用來儲存對應的邏輯頁位址映射的實體區塊位址以及實體頁位址。在此,請同步參照圖2,圖2繪示本發明一實施例的全位址映射資料庫的示意圖。全位址映射資料庫200包括多數個頁映射表PMT0~PMTN,各頁映射表PMT0~PMTN都可以分為多個邏輯位址區LA0~LAM。在各頁映射表PMT0~PMTN的各個邏輯位址區LA0~LAM中均包括多個儲存欄位,這些儲存欄位分別對應至多個邏輯頁位址LPA0、LPA1~LPAP。以頁映射表PMT0的邏輯位址區LA0為範例,頁映射表PMT0的邏輯位址區LA0中包括儲存欄位F0~FP,儲存欄位F0~FP分別對應邏輯頁位址LPA0 ~LPAP。Please refer to FIG. 1. FIG. 1 is a flow chart of a method for accessing a flash memory according to an embodiment of the present invention. Wherein, step S110 establishes a full address mapping database. The full address mapping database includes a plurality of page mapping tables, each page mapping table is divided into a plurality of logical address regions, and each logical address region includes a plurality of storage fields corresponding to a plurality of logical page addresses, respectively. Each storage field is used to store the physical block address and the physical page address of the corresponding logical page address mapping. Here, please refer to FIG. 2 in synchronization. FIG. 2 is a schematic diagram of a full address mapping database according to an embodiment of the present invention. The full address mapping database 200 includes a plurality of page mapping tables PMT0~PMTN, and each page mapping table PMT0~PMTN can be divided into a plurality of logical address regions LA0~LAM. Each of the logical address areas LA0~LAM of each page mapping table PMT0~PMTN includes a plurality of storage fields, and the storage fields correspond to a plurality of logical page addresses LPA0, LPA1~LPAP, respectively. Taking the logical address area LA0 of the page mapping table PMT0 as an example, the logical address area LA0 of the page mapping table PMT0 includes the storage fields F0~FP, and the storage fields F0~FP correspond to the logical page addresses LPA0 ~LPAP, respectively.

值得一提的,本發明實施例的各儲存欄位中記錄對應邏輯頁位址的實體區塊位址以及實體頁位址。以儲存欄位F0、F1為範例,儲存欄位F0儲存實體區塊位址PBA1以及實體頁位址PPA1,儲存欄位F1則儲存實體區塊位址PBA2以及實體頁位址PPA2。It is to be noted that, in each storage field of the embodiment of the present invention, a physical block address corresponding to a logical page address and a physical page address are recorded. Taking the storage fields F0 and F1 as an example, the storage field F0 stores the physical block address PBA1 and the physical page address PPA1, and the storage field F1 stores the physical block address PBA2 and the physical page address PPA2.

請重新參照圖1,步驟S120則建立管理區塊,並對管理區塊寫入一頁映射表索引資料。在此,請同步參照圖3,圖3繪示本發明一實施例的管理區塊的示意圖。管理區塊300包括頁映射表索引資料310以及邏輯存取位址320。頁映射表索引資料310可用來對應至頁映射表0 PMT0至頁映射表3 PMT3的其中之一。Referring back to FIG. 1, step S120 establishes a management block and writes a page mapping table index data to the management block. Here, please refer to FIG. 3 in synchronization, and FIG. 3 is a schematic diagram of a management block according to an embodiment of the present invention. Management block 300 includes page mapping table index material 310 and logical access address 320. The page mapping table index material 310 can be used to correspond to one of the page mapping table 0 PMT0 to the page mapping table 3 PMT3.

在本實施例中,頁映射表索引資料310對應至頁映射表3 PMT3,並且,在步驟S130,則依據頁映射表索引資料310來載入頁映射表PMT0~PMT3的其中之一,並依據被載入的頁映射表PMT3,且依據邏輯存取位址320來獲得對應實體記憶區塊。接著,在步驟S140,則可針對對應實體記憶區塊進行資料存取動作。In this embodiment, the page mapping table index data 310 corresponds to the page mapping table 3 PMT3, and in step S130, one of the page mapping tables PMT0~PMT3 is loaded according to the page mapping table index data 310, and according to The loaded page mapping table PMT3, and the corresponding physical memory block is obtained according to the logical access address 320. Next, in step S140, a data access action can be performed for the corresponding physical memory block.

由上述的說明不難得知,透過本發明實施例的全位址映射資料庫200,各個邏輯位址區中的各個邏輯頁位址可以依據儲存欄位直接映射到任意實體記憶區塊中的任意實體記憶頁,並快速的完成資料存取的動作,有效提昇快閃記憶體的存取效率。It is not difficult to know from the above description that, through the full address mapping database 200 of the embodiment of the present invention, each logical page address in each logical address area can be directly mapped to any of the arbitrary physical memory blocks according to the storage field. The physical memory page, and quickly complete the data access action, effectively improve the access efficiency of the flash memory.

以下請參照圖4,圖4繪示本發明實施例的全位址映射資料庫的實施方式的示意圖。全位址映射資料庫中所包括的頁映射表0 PMT0~頁映射表N PMTN被分成多個頁映射表群組,且這些頁映射表群組被分別儲存在快閃記憶體中的多個實體記憶區塊PMTB0~PMBTN中。在本實施方式中,頁映射表0~頁映射表3為相同的頁映射表群組,並被儲存在實體記憶區塊PMTB0中,頁映射表4~頁映射表7為相同的頁映射表群組,並被儲存在實體記憶區塊PMTB1中,另外,頁映射表N-3~頁映射表N為相同的頁映射表群組,並被儲存在實體記憶區塊PMTBN中。Referring to FIG. 4, FIG. 4 is a schematic diagram of an implementation manner of a full address mapping database according to an embodiment of the present invention. The page mapping table 0 PMT0~page mapping table N PMTN included in the full address mapping database is divided into a plurality of page mapping table groups, and these page mapping table groups are respectively stored in the flash memory. The physical memory block is in PMTB0~PMBTN. In the present embodiment, the page mapping table 0 to the page mapping table 3 are the same page mapping table group, and are stored in the physical memory block PMTB0, and the page mapping table 4 to the page mapping table 7 are the same page mapping table. The group is stored in the physical memory block PMTB1. In addition, the page mapping table N-3~page mapping table N is the same page mapping table group and is stored in the physical memory block PMTBN.

值得一提的,為確保儲存頁映射表的資料穩定,且可快速的提供存取,儲存頁映射表的記憶體可使用單階儲存單元(Single-level cell, SLC)的記憶胞來實施。It is worth mentioning that in order to ensure that the data of the storage page mapping table is stable and can be quickly accessed, the memory of the storage page mapping table can be implemented by using a single-level cell (SLC) memory cell.

以下請參照圖5,圖5繪示本發明實施例的頁映射表進行整合的動作示意圖。當頁映射表需要被更新時,被更新的頁映射表會被寫入至與原頁映射表相同的實體記憶區塊中。如圖5所示,頁映射表0發生四次的更新動作,因此,更新頁映射表A1~A4依序被寫入與原頁映射表A0相同的實體記憶區塊PMTB0中。在當更新頁映射表A4被填入實體記憶區塊PMTB0後,實體記憶區塊PMTB0的可儲存空間少於一預設值,在此時,頁映射表整合動作就可以被執行。具體來說明,當頁映射表整合動作被執行時,一個新的置換實體記憶區塊NPMTB0可以被建立。並且,實體記憶區塊PMTB0中最新版本的頁映射表0 A4以及頁映射表1~頁映射表3可以被複製到置換實體記憶區塊NPMTB0中。而在完成上述的複製動作後,實體記憶區塊PMTB0可以被釋出。Referring to FIG. 5, FIG. 5 is a schematic diagram of an operation of integrating a page mapping table according to an embodiment of the present invention. When the page mapping table needs to be updated, the updated page mapping table is written to the same physical memory block as the original page mapping table. As shown in FIG. 5, the page mapping table 0 is updated four times. Therefore, the updated page mapping tables A1 to A4 are sequentially written in the same physical memory block PMTB0 as the original page mapping table A0. After the update page mapping table A4 is filled in the physical memory block PMTB0, the storable space of the physical memory block PMTB0 is less than a preset value, and at this time, the page mapping table integration action can be performed. Specifically, when a page mapping table integration action is performed, a new replacement entity memory block NPMBT0 can be established. Moreover, the latest version of the page mapping table 0 A4 and the page mapping table 1 to page mapping table 3 in the physical memory block PMTB0 can be copied into the replacement entity memory block NPTTB0. After the above copying operation is completed, the physical memory block PMTB0 can be released.

透過上述的頁映射表整合動作,快閃記憶體的記憶空間不會發生浪費,且頁映射表的更新動作也可以持續被進行,提升快閃記憶體的存取效率。Through the above-mentioned page mapping table integration action, the memory space of the flash memory is not wasted, and the update operation of the page mapping table can be continuously performed to improve the access efficiency of the flash memory.

附帶一提的,上述的預設值可以由工程人員預先設定,並透過軟體或硬體的實施方式來告知記憶體控制器以進行相對映的檢查及頁映射表的整合動作。Incidentally, the above preset value may be preset by an engineering staff, and the memory controller is informed by a software or hardware implementation to perform a relative mapping check and a page mapping table integration action.

接著請參照圖6,圖6繪示本發明實施例的管理區塊的另一實施方式的示意圖。管理區塊600除包括頁映射表索引資料610、邏輯存取位址620外,另包括至少一個空白佇列631、632(圖6繪示兩個僅只是示範性的範例)。其中,空白佇列631及632可以儲存兩個空白實體記憶區塊或無有效資料記憶區塊。當發生對快閃記憶體執行資料寫入動作時,記憶體控制器可接收到寫入資料及對應的寫入邏輯位址,並將寫入資料寫入至空白佇列631中的空白實體記憶區塊中。並且,記憶體控制器可依據寫入邏輯位址以及空白實體記憶區塊以同步更新對應的頁映射表。Please refer to FIG. 6. FIG. 6 is a schematic diagram of another embodiment of a management block according to an embodiment of the present invention. The management block 600 includes at least one blank queue 631, 632 in addition to the page mapping table index data 610 and the logical access address 620 (FIG. 6 shows only two exemplary examples). The blank queues 631 and 632 can store two blank physical memory blocks or no valid data memory blocks. When a data write operation is performed on the flash memory, the memory controller can receive the write data and the corresponding write logical address, and write the write data to the blank physical memory in the blank queue 631. In the block. Moreover, the memory controller can synchronously update the corresponding page mapping table according to the write logical address and the blank physical memory block.

在空白佇列631中的空白實體記憶區塊對應的實體記憶頁有資料被寫入後,空白佇列可以被更新。After the physical memory page corresponding to the blank physical memory block in the blank queue 631 has data to be written, the blank queue can be updated.

在另一方面,管理區塊600更包括有效計數值欄位640。有效計數值欄位640記錄對應實體記憶區塊中的有效記憶頁數量。透過有效計數值可以得知實體記憶區塊中有效的實體記憶頁的數量。當實體記憶區塊不敷使用時,有效計數值可以提供記憶體控制器選擇哪一個實體記憶區塊來執行垃圾整理動作。例如,當有效計數值指示某第一實體記憶區塊有效的實體記憶頁的數量只有一個時,記憶體控制器只需要整理一個實體記憶頁就可以將此第一實體記憶區塊釋放出來提供使用。In another aspect, management block 600 further includes a valid count value field 640. The valid count value field 640 records the number of valid memory pages in the corresponding physical memory block. The effective count value can be used to know the number of valid physical memory pages in the physical memory block. When the physical memory block is not enough, the effective count value can provide which physical memory block the memory controller selects to perform the garbage sorting action. For example, when the effective count value indicates that the number of physical memory pages valid for a certain first physical memory block is only one, the memory controller only needs to organize one physical memory page to release the first physical memory block for use. .

在上述的實施方式中,記憶體控制器可以判斷有效記憶頁數量是否小於一個預設的設定值,並在當有效記憶頁數量小於預設的設定值,轉存其中的有效記憶頁的資料至其他實體記憶區塊,並釋放對應實體記憶區塊。In the above embodiment, the memory controller can determine whether the number of valid memory pages is less than a preset set value, and when the number of valid memory pages is less than a preset set value, the data of the valid memory page is transferred to Other entities memorize the block and release the corresponding physical memory block.

請參照圖7,圖7繪示本發明一實施例的快閃記憶體的示意圖。快閃記憶體710包括多數個實體記憶區塊711~71N、記憶體控制器720以及靜態記憶體721。其中,各實體記憶區塊711~71N包括多數個實體記憶頁。實體記憶區塊711~71N並耦接至記憶體控制器720。Please refer to FIG. 7. FIG. 7 is a schematic diagram of a flash memory according to an embodiment of the present invention. The flash memory 710 includes a plurality of physical memory blocks 711 to 71N, a memory controller 720, and a static memory 721. The physical memory blocks 711~71N include a plurality of physical memory pages. The physical memory blocks 711 to 71N are coupled to the memory controller 720.

記憶體控制器720用來執行多個動作,其中,在本實施例中,記憶體控制器720建立全位址映射資料庫,其中,全位址映射資料庫包括多數個頁映射表,各頁映射表被區分為多數個邏輯位址區,且各邏輯位址區包括分別對應多個邏輯頁位址的多數個儲存欄位,各儲存欄位用來儲存對應的邏輯頁位址映射的實體區塊位址以及實體頁位址;並且,記憶體控制器720建立管理區塊,並對管理區塊寫入頁映射表索引資料;記憶體控制器720另依據頁映射表索引資料以載入頁映射表的其中之一,並依據被載入的頁映射表獲得對應實體記憶區塊;再依據寫入邏輯位址以及空白頁位址更新對應的頁映射表。The memory controller 720 is configured to perform a plurality of actions. In the embodiment, the memory controller 720 establishes a full address mapping database, wherein the full address mapping database includes a plurality of page mapping tables, and each page The mapping table is divided into a plurality of logical address regions, and each logical address region includes a plurality of storage fields corresponding to a plurality of logical page addresses, and each storage field is used to store an entity of the corresponding logical page address mapping. The block address and the physical page address; and the memory controller 720 establishes the management block and writes the page mapping table index data to the management block; the memory controller 720 further loads the data according to the page mapping table. One of the page mapping tables obtains the corresponding physical memory block according to the loaded page mapping table; and updates the corresponding page mapping table according to the written logical address and the blank page address.

附帶一提的,記憶體控制器720可將被載入的頁映射表暫存在靜態記憶體721中。而靜態記憶體721可以內建在記憶體控制器720中,也可以外掛於記憶體控制器720之外。Incidentally, the memory controller 720 can temporarily store the loaded page mapping table in the static memory 721. The static memory 721 can be built in the memory controller 720 or external to the memory controller 720.

關於記憶體控制器720執行各項動作的細節,在前述多個實施例及實施方式都有詳盡的介紹,在此恕不多贅述。The details of the various operations performed by the memory controller 720 are described in detail in the foregoing various embodiments and implementations, and will not be further described herein.

綜上所述,本發明透過建立全位址映射資料庫,並打破記憶體的區塊限制以進行位址映射,並進一步完成資料存取的動作。如此一來,快閃記憶體的存取動作可以更為快速,且動態的存取動作也可以順利的被完成,快閃記憶體的整體效率都可以有效的被提升。In summary, the present invention further completes the data access operation by establishing a full address mapping database and breaking the block restriction of the memory for address mapping. In this way, the access operation of the flash memory can be faster, and the dynamic access operation can be successfully completed, and the overall efficiency of the flash memory can be effectively improved.

雖然本發明已以實施例揭露如上,然其並非用以限定本發明,任何所屬技術領域中具有通常知識者,在不脫離本發明的精神和範圍內,當可作些許的更動與潤飾,故本發明的保護範圍當視後附的申請專利範圍所界定者為準。Although the present invention has been disclosed in the above embodiments, it is not intended to limit the present invention, and any one of ordinary skill in the art can make some changes and refinements without departing from the spirit and scope of the present invention. The scope of the invention is defined by the scope of the appended claims.

S110~S140‧‧‧快閃記憶體的存取步驟
PMT0~PMTN‧‧‧頁映射表
200‧‧‧全位址映射資料庫
LA0~LAM‧‧‧邏輯位址區
LPA0、LPA1~LPAP‧‧‧邏輯頁位址
F0~FP‧‧‧儲存欄位
PPA1、PPA2‧‧‧實體頁位址
PBA1、PBA2‧‧‧實體區塊位址
300、600‧‧‧管理區塊
310‧‧‧頁映射表索引資料
320‧‧‧邏輯存取位址
PMTB1~PMTBN‧‧‧實體記憶區塊
A1~A4‧‧‧更新頁映射表
NPMTB0‧‧‧置換實體記憶區塊
610‧‧‧頁映射表索引資料
620‧‧‧邏輯存取位址外
631、632‧‧‧空白佇列
640‧‧‧有效計數值欄位
710‧‧‧快閃記憶體
711~71N‧‧‧實體記憶區塊
720‧‧‧記憶體控制器
721‧‧‧靜態記憶體
S110~S140‧‧‧ flash memory access steps
PMT0~PMTN‧‧‧ page mapping table
200‧‧‧ Full Address Mapping Database
LA0~LAM‧‧‧Logical Address Area
LPA0, LPA1~LPAP‧‧‧ logical page address
F0~FP‧‧‧Storage field
PPA1, PPA2‧‧‧ physical page address
PBA1, PBA2‧‧‧ physical block address
300, 600‧‧‧Management block
310‧‧Page mapping table index data
320‧‧‧Logical Access Address
PMTB1~PMTBN‧‧‧ physical memory block
A1~A4‧‧‧Update Page Mapping Table
NPMTB0‧‧‧Replacement physical memory block
610‧‧Page mapping table index data
620‧‧‧Outside the logical access address
631, 632‧‧‧ blank queue
640‧‧‧ effective count value field
710‧‧‧Flash memory
711~71N‧‧‧ physical memory block
720‧‧‧ memory controller
721‧‧‧ static memory

圖1繪示本發明一實施例的快閃記憶體的存取方法的流程圖。 圖2繪示本發明一實施例的全位址映射資料庫的示意圖。 圖3繪示本發明一實施例的管理區塊的示意圖。 圖4繪示本發明實施例的全位址映射資料庫的實施方式的示意圖。 圖5繪示本發明實施例的頁映射表進行整合的動作示意圖。 圖6繪示本發明實施例的管理區塊的另一實施方式的示意圖。 圖7繪示本發明一實施例的快閃記憶體的示意圖。FIG. 1 is a flow chart of a method for accessing a flash memory according to an embodiment of the invention. 2 is a schematic diagram of a full address mapping database according to an embodiment of the present invention. FIG. 3 is a schematic diagram of a management block according to an embodiment of the present invention. 4 is a schematic diagram of an implementation of a full address mapping database according to an embodiment of the present invention. FIG. 5 is a schematic diagram of an operation of integrating a page mapping table according to an embodiment of the present invention. FIG. 6 is a schematic diagram of another embodiment of a management block according to an embodiment of the present invention. FIG. 7 is a schematic diagram of a flash memory according to an embodiment of the invention.

S110~S140‧‧‧快閃記憶體的存取步驟 S110~S140‧‧‧ flash memory access steps

Claims (8)

一種快閃記憶體的存取方法,包括:建立一全位址映射資料庫,該全位址映射資料庫包括多數個頁映射表,各該頁映射表被區分為多數個邏輯位址區,且各邏輯位址區包括分別對應多個邏輯頁位址的多數個儲存欄位,各儲存欄位用來儲存對應的邏輯頁位址映射的一實體區塊位址以及一實體頁位址;建立一管理區塊,並對該管理區塊寫入一頁映射表索引資料;依據該頁映射表索引資料以載入該些頁映射表的其中之一,並依據被載入的頁映射表獲得一對應實體記憶區塊;以及針對該對應實體記憶區塊進行資料存取動作,其中該些頁映射表被區分為多數個頁映射表群組,該些頁映射表群組分別被儲存在多數個實體記憶區塊中,當各該頁映射表群組的中的頁映射表的至少其一被更新時,一更新頁映射表被寫入對應的實體記憶區塊中,當各該頁映射表群組對應的實體記憶區塊的可儲存空間少於一預設值時,更包括:建立一置換實體記憶區塊;複製該對應的實體記憶區塊中最新的該些頁映射表至該置換實體記憶區塊中;以及釋放該對應的實體記憶區塊。 A method for accessing a flash memory, comprising: establishing an all-address mapping database, wherein the full-address mapping database includes a plurality of page mapping tables, and each page mapping table is divided into a plurality of logical address regions, Each logical address area includes a plurality of storage fields corresponding to a plurality of logical page addresses, and each storage field is used to store a physical block address and a physical page address of the corresponding logical page address mapping; Establishing a management block, and writing a page mapping table index data to the management block; according to the page mapping table index data to load one of the page mapping tables, and according to the loaded page mapping table Obtaining a corresponding physical memory block; and performing data access operations on the corresponding physical memory block, wherein the page mapping tables are divided into a plurality of page mapping table groups, and the page mapping table groups are respectively stored in In a plurality of physical memory blocks, when at least one of the page mapping tables in each of the page mapping table groups is updated, an updated page mapping table is written into the corresponding physical memory block, and each page is Mapping table group pair When the storable space of the physical memory block is less than a preset value, the method further includes: creating a replacement physical memory block; and copying the latest page mapping table in the corresponding physical memory block to the replacement physical memory area In the block; and releasing the corresponding physical memory block. 如申請專利範圍第1項所述的快閃記憶體的存取方法,其中該管理區塊中並記錄一邏輯存取位址,且其中依據該頁映射 表索引資料以載入該些頁映射表的其中之一,並依據該被載入的頁映射表獲得該對應實體記憶區塊的步驟包括:依據該邏輯存取位址以透過該被載入的頁映射表來獲得該對應實體記憶區塊的一存取實體位址。 The method for accessing a flash memory according to claim 1, wherein a logical access address is recorded in the management block, and wherein the map is mapped according to the page The step index data is loaded into one of the page mapping tables, and the step of obtaining the corresponding physical memory block according to the loaded page mapping table comprises: loading the address according to the logical access address The page mapping table obtains an access entity address of the corresponding physical memory block. 一種快閃記憶體的存取方法,包括:建立一全位址映射資料庫,該全位址映射資料庫包括多數個頁映射表,各該頁映射表被區分為多數個邏輯位址區,且各邏輯位址區包括分別對應多個邏輯頁位址的多數個儲存欄位,各儲存欄位用來儲存對應的邏輯頁位址映射的一實體區塊位址以及一實體頁位址;建立一管理區塊,並對該管理區塊寫入一頁映射表索引資料;依據該頁映射表索引資料以載入該些頁映射表的其中之一,並依據被載入的頁映射表獲得一對應實體記憶區塊;針對該對應實體記憶區塊進行資料存取動作;在該管理區塊中設置至少一空白佇列,其中該至少一空白佇列儲存一空白實體記憶區塊;接收一寫入資料及對應的一寫入邏輯位址,並將該寫入資料寫入至該空白實體記憶區塊的空白實體記憶頁;以及依據該寫入邏輯位址以及該空白實體記憶區塊更新對應的頁映射表。 A method for accessing a flash memory, comprising: establishing an all-address mapping database, wherein the full-address mapping database includes a plurality of page mapping tables, and each page mapping table is divided into a plurality of logical address regions, Each logical address area includes a plurality of storage fields corresponding to a plurality of logical page addresses, and each storage field is used to store a physical block address and a physical page address of the corresponding logical page address mapping; Establishing a management block, and writing a page mapping table index data to the management block; according to the page mapping table index data to load one of the page mapping tables, and according to the loaded page mapping table Obtaining a corresponding physical memory block; performing a data access operation on the corresponding physical memory block; and setting at least one blank queue in the management block, wherein the at least one blank queue stores a blank physical memory block; receiving Writing a data and a corresponding write logical address, and writing the write data to the blank physical memory page of the blank physical memory block; and according to the write logical address and the blank physical memory Block updates the corresponding page mapping table. 一種快閃記憶體的存取方法,包括: 建立一全位址映射資料庫,該全位址映射資料庫包括多數個頁映射表,各該頁映射表被區分為多數個邏輯位址區,且各邏輯位址區包括分別對應多個邏輯頁位址的多數個儲存欄位,各儲存欄位用來儲存對應的邏輯頁位址映射的一實體區塊位址以及一實體頁位址;建立一管理區塊,並對該管理區塊寫入一頁映射表索引資料;依據該頁映射表索引資料以載入該些頁映射表的其中之一,並依據被載入的頁映射表獲得一對應實體記憶區塊;針對該對應實體記憶區塊進行資料存取動作;在該管理區塊中設置一有效計數值欄位,其中,該有效計數值欄位記錄該對應實體記憶區塊的一有效記憶頁數量;以及在當該有效記憶頁數量小於一設定值時,轉存該對應實體記憶區塊中的有效記憶頁的資料至其他實體記憶區塊,並釋放該對應實體記憶區塊。 A method for accessing flash memory, comprising: Establishing a full address mapping database, the full address mapping database includes a plurality of page mapping tables, each page mapping table is divided into a plurality of logical address regions, and each logical address region includes multiple logics respectively a plurality of storage fields of the page address, each storage field is used to store a physical block address and a physical page address of the corresponding logical page address mapping; a management block is created, and the management block is Writing a page of mapping table index data; according to the page mapping table index data to load one of the page mapping tables, and obtaining a corresponding entity memory block according to the loaded page mapping table; for the corresponding entity The memory block performs a data access operation; setting a valid count value field in the management block, wherein the valid count value field records a valid memory page number of the corresponding physical memory block; and when the valid When the number of memory pages is less than a set value, the data of the valid memory page in the corresponding physical memory block is transferred to other physical memory blocks, and the corresponding physical memory block is released. 一種快閃記憶體,包括:多數個實體記憶區塊,各該實體記憶區塊包括多數個實體記憶頁;以及一記憶體控制器,耦接該些實體記憶區塊,其中該記憶體控制器執行:建立一全位址映射資料庫,該全位址映射資料庫包括多數個頁映射表,各該頁映射表被區分為多數個邏輯位址區,且 各該邏輯位址區包括分別對應多個邏輯頁位址的多數個儲存欄位,各該儲存欄位用來儲存對應的邏輯頁位址映射的一實體區塊位址以及一實體頁位址;建立一管理區塊,並對該管理區塊寫入一頁映射表索引資料;依據該頁映射表索引資料以載入該些頁映射表的其中之一,並依據被載入的頁映射表獲得一對應實體記憶區塊;以及針對該對應實體記憶區塊進行資料存取動作,其中,該記憶體控制器更區分該些頁映射表被為多數個頁映射表群組,該些頁映射表群組分別被儲存在該些實體記憶區塊中,當各該頁映射表群組的中的頁映射表的至少其一被更新時,一更新頁映射表被寫入對應的實體記憶區塊中,該記憶體控制器更複製該對應的實體記憶區塊中最新的該些頁映射表至該置換實體記憶區塊中,並釋放該對應的實體記憶區塊。 A flash memory, comprising: a plurality of physical memory blocks, each of the physical memory blocks comprising a plurality of physical memory pages; and a memory controller coupled to the physical memory blocks, wherein the memory controller Execution: establishing a full address mapping database, the full address mapping database includes a plurality of page mapping tables, each page mapping table is divided into a plurality of logical address regions, and Each of the logical address regions includes a plurality of storage fields corresponding to a plurality of logical page addresses, each of the storage fields for storing a physical block address and a physical page address of the corresponding logical page address mapping. Establishing a management block, and writing a page mapping table index data to the management block; according to the page mapping table index data to load one of the page mapping tables, and according to the loaded page mapping Obtaining a corresponding physical memory block; and performing a data access operation on the corresponding physical memory block, wherein the memory controller further distinguishes the page mapping tables from being a plurality of page mapping table groups, the pages The mapping table groups are respectively stored in the physical memory blocks, and when at least one of the page mapping tables in each page mapping table group is updated, an updated page mapping table is written into the corresponding physical memory. In the block, the memory controller further copies the latest page mapping tables in the corresponding physical memory block into the replacement entity memory block, and releases the corresponding physical memory block. 如申請專利範圍第5項所述的快閃記憶體,其中該記憶體控制器依據該邏輯存取位址以透過該被載入的頁映射表來獲得該對應實體記憶區塊的一存取實體位址。 The flash memory of claim 5, wherein the memory controller obtains an access of the corresponding physical memory block according to the logical access address to transmit the loaded page mapping table. Physical address. 一種快閃記憶體,包括:多數個實體記憶區塊,各該實體記憶區塊包括多數個實體記憶頁;以及一記憶體控制器,耦接該些實體記憶區塊,其中該記憶體控制器執行: 建立一全位址映射資料庫,該全位址映射資料庫包括多數個頁映射表,各該頁映射表被區分為多數個邏輯位址區,且各該邏輯位址區包括分別對應多個邏輯頁位址的多數個儲存欄位,各該儲存欄位用來儲存對應的邏輯頁位址映射的一實體區塊位址以及一實體頁位址;建立一管理區塊,並對該管理區塊寫入一頁映射表索引資料;依據該頁映射表索引資料以載入該些頁映射表的其中之一,並依據被載入的頁映射表獲得一對應實體記憶區塊;針對該對應實體記憶區塊進行資料存取動作;以及在該管理區塊中設置至少一空白佇列,其中該至少一空白佇列儲存一空白實體記憶區塊,並接收一寫入資料及對應的一寫入邏輯位址,並將該寫入資料寫入至該空白實體記憶區塊的空白實體記憶頁,且依據該寫入邏輯位址以及該空白實體記憶區塊更新對應的頁映射表。 A flash memory, comprising: a plurality of physical memory blocks, each of the physical memory blocks comprising a plurality of physical memory pages; and a memory controller coupled to the physical memory blocks, wherein the memory controller carried out: Establishing a full address mapping database, the full address mapping database includes a plurality of page mapping tables, each page mapping table is divided into a plurality of logical address regions, and each of the logical address regions includes a plurality of corresponding a plurality of storage fields of the logical page address, each of the storage fields is used to store a physical block address and a physical page address of the corresponding logical page address mapping; establishing a management block and managing the same The block writes a page mapping table index data; according to the page mapping table index data to load one of the page mapping tables, and obtain a corresponding entity memory block according to the loaded page mapping table; Performing a data access operation corresponding to the physical memory block; and setting at least one blank queue in the management block, wherein the at least one blank queue stores a blank physical memory block, and receives a write data and a corresponding one Writing a logical address, and writing the write data to the blank physical memory page of the blank physical memory block, and updating the corresponding page mapping table according to the write logical address and the blank physical memory block. 一種快閃記憶體,包括:多數個實體記憶區塊,各該實體記憶區塊包括多數個實體記憶頁;以及一記憶體控制器,耦接該些實體記憶區塊,其中該記憶體控制器執行:建立一全位址映射資料庫,該全位址映射資料庫包括多數個頁映射表,各該頁映射表被區分為多數個邏輯位址區,且 各該邏輯位址區包括分別對應多個邏輯頁位址的多數個儲存欄位,各該儲存欄位用來儲存對應的邏輯頁位址映射的一實體區塊位址以及一實體頁位址;建立一管理區塊,並對該管理區塊寫入一頁映射表索引資料;依據該頁映射表索引資料以載入該些頁映射表的其中之一,並依據被載入的頁映射表獲得一對應實體記憶區塊;針對該對應實體記憶區塊進行資料存取動作;以及在該管理區塊中設置一有效計數值欄位,其中,該有效計數值欄位記錄該對應實體記憶區塊的一有效記憶頁數量,並在當該有效記憶頁數量小於一設定值時,轉存該對應實體記憶區塊中的有效記憶頁的資料至其他實體記憶區塊,並釋放該對應實體記憶區塊。 A flash memory, comprising: a plurality of physical memory blocks, each of the physical memory blocks comprising a plurality of physical memory pages; and a memory controller coupled to the physical memory blocks, wherein the memory controller Execution: establishing a full address mapping database, the full address mapping database includes a plurality of page mapping tables, each page mapping table is divided into a plurality of logical address regions, and Each of the logical address regions includes a plurality of storage fields corresponding to a plurality of logical page addresses, each of the storage fields for storing a physical block address and a physical page address of the corresponding logical page address mapping. Establishing a management block, and writing a page mapping table index data to the management block; according to the page mapping table index data to load one of the page mapping tables, and according to the loaded page mapping Obtaining a corresponding physical memory block; performing a data access action on the corresponding physical memory block; and setting a valid count value field in the management block, wherein the valid count value field records the corresponding physical memory The number of valid memory pages of the block, and when the number of valid memory pages is less than a set value, the data of the valid memory page in the corresponding physical memory block is transferred to other physical memory blocks, and the corresponding entity is released. Memory block.
TW104144003A 2015-12-28 2015-12-28 Flash memory and accessing method thereof TWI570559B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
TW104144003A TWI570559B (en) 2015-12-28 2015-12-28 Flash memory and accessing method thereof
CN201610093907.6A CN106919517B (en) 2015-12-28 2016-02-19 Flash memory and access method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW104144003A TWI570559B (en) 2015-12-28 2015-12-28 Flash memory and accessing method thereof

Publications (2)

Publication Number Publication Date
TWI570559B true TWI570559B (en) 2017-02-11
TW201723850A TW201723850A (en) 2017-07-01

Family

ID=58608261

Family Applications (1)

Application Number Title Priority Date Filing Date
TW104144003A TWI570559B (en) 2015-12-28 2015-12-28 Flash memory and accessing method thereof

Country Status (2)

Country Link
CN (1) CN106919517B (en)
TW (1) TWI570559B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI629591B (en) * 2017-08-30 2018-07-11 慧榮科技股份有限公司 Method for accessing flash memory module and associated flash memory controller and electronic device
TWI661303B (en) * 2017-11-13 2019-06-01 慧榮科技股份有限公司 Method for accessing flash memory module and associated flash memory controller and electronic device
TWI650644B (en) * 2018-01-05 2019-02-11 慧榮科技股份有限公司 Method for managing flash memory module and related flash memory controller and electronic device
TWI761440B (en) * 2018-01-30 2022-04-21 韓商愛思開海力士有限公司 memory access method
CN109445699A (en) * 2018-10-23 2019-03-08 江苏华存电子科技有限公司 A kind of system of quick response blank data area read action
CN109446109B (en) * 2018-10-25 2021-06-29 江苏华存电子科技有限公司 Method for hybrid recording entity mapping table

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6898669B2 (en) * 2001-12-18 2005-05-24 Kabushiki Kaisha Toshiba Disk array apparatus and data backup method used therein
US20080183955A1 (en) * 2007-01-25 2008-07-31 Genesys Logic, Inc. Flash translation layer apparatus
TW201101030A (en) * 2009-06-29 2011-01-01 Mediatek Inc Memory system and mapping methods thereof
TW201508485A (en) * 2013-08-30 2015-03-01 Silicon Motion Inc Data storage device and FLASH memory control method

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8677098B2 (en) * 2008-01-11 2014-03-18 International Business Machines Corporation Dynamic address translation with fetch protection
CN101727295B (en) * 2008-10-31 2012-01-04 西安奇维测控科技有限公司 Method for writing in and reading out data based on virtual block flash memory address mapping
US8285970B2 (en) * 2008-11-06 2012-10-09 Silicon Motion Inc. Method for managing a memory apparatus, and associated memory apparatus thereof
CN102479154B (en) * 2010-11-30 2015-03-11 慧荣科技股份有限公司 Superblock management method, memory device and controller of memory device
TWI486767B (en) * 2012-06-22 2015-06-01 Phison Electronics Corp Data storing method, and memory controller and memory storage apparatus using the same
US9563551B2 (en) * 2013-06-20 2017-02-07 Silicon Motion, Inc. Data storage device and data fetching method for flash memory

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6898669B2 (en) * 2001-12-18 2005-05-24 Kabushiki Kaisha Toshiba Disk array apparatus and data backup method used therein
US20080183955A1 (en) * 2007-01-25 2008-07-31 Genesys Logic, Inc. Flash translation layer apparatus
TW201101030A (en) * 2009-06-29 2011-01-01 Mediatek Inc Memory system and mapping methods thereof
TW201508485A (en) * 2013-08-30 2015-03-01 Silicon Motion Inc Data storage device and FLASH memory control method

Also Published As

Publication number Publication date
CN106919517B (en) 2021-01-26
CN106919517A (en) 2017-07-04
TW201723850A (en) 2017-07-01

Similar Documents

Publication Publication Date Title
TWI570559B (en) Flash memory and accessing method thereof
US10318434B2 (en) Optimized hopscotch multiple hash tables for efficient memory in-line deduplication application
JP6778170B2 (en) Methods and systems for reading data from persistent storage, as well as non-temporary storage media
TWI683217B (en) Deduplication memory module using dedupe dram system algorithm architecture and method thereof
US7844772B2 (en) Device driver including a flash memory file system and method thereof and a flash memory device and method thereof
JP6385468B2 (en) File access method and related device
JP6343438B2 (en) Computer system and data management method for computer system
US10296250B2 (en) Method and apparatus for improving performance of sequential logging in a storage device
US10437738B2 (en) Storage device performing hashing-based translation between logical address and physical address
US10496543B2 (en) Virtual bucket multiple hash tables for efficient memory in-line deduplication application
JP2008192154A (en) Memory mapping method and memory mapping system
CN107817946B (en) Method and device for reading and writing data of hybrid storage device
WO2021027340A1 (en) Storage method and apparatus for key value (kv) and storage device
JP5932171B2 (en) Method and system for object-based transactions in a storage system
JP2015001909A (en) Information processor, control circuit, control program, and control method
JP2018160189A (en) Memory system
CN109213450B (en) Associated metadata deleting method, device and equipment based on flash memory array
WO2021232743A1 (en) Cache management method and apparatus, storage medium, and solid-state non-volatile storage device
WO2016206070A1 (en) File updating method and storage device
JP2015191294A (en) Memory controller, memory system, and memory control method
US9524124B2 (en) Semiconductor device
TWI635391B (en) Flash memory and management method thereof
US10169250B2 (en) Method and apparatus method and apparatus for controlling access to a hash-based disk
US20220164135A1 (en) Apparatus, method and computer program for managing memory page updates within non-volatile memory