TW201435888A - Data storage device and flash memory control method - Google Patents

Data storage device and flash memory control method Download PDF

Info

Publication number
TW201435888A
TW201435888A TW102107205A TW102107205A TW201435888A TW 201435888 A TW201435888 A TW 201435888A TW 102107205 A TW102107205 A TW 102107205A TW 102107205 A TW102107205 A TW 102107205A TW 201435888 A TW201435888 A TW 201435888A
Authority
TW
Taiwan
Prior art keywords
data
flash memory
cache
space
logical address
Prior art date
Application number
TW102107205A
Other languages
Chinese (zh)
Other versions
TWI529730B (en
Inventor
Kuan-Yu Ke
Original Assignee
Silicon Motion Inc
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 Silicon Motion Inc filed Critical Silicon Motion Inc
Priority to TW102107205A priority Critical patent/TWI529730B/en
Priority to CN201310131475.XA priority patent/CN104020959A/en
Priority to US14/100,627 priority patent/US8984171B2/en
Publication of TW201435888A publication Critical patent/TW201435888A/en
Application granted granted Critical
Publication of TWI529730B publication Critical patent/TWI529730B/en

Links

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)

Abstract

A data storage device and a control method for a FLASH memory thereof are disclosed. The control method includes the following steps: dividing a plurality of blocks of the FLASH memory into different groups to be accessed via different channels; allocating cache space in a Random Access Memory, wherein, each cache space is allocated to provide every channel with temporary storage space for write data; separating write data from a host to correspond to the different channels; and, when a latest updated temporary data in the cache space corresponds to a logical address of the write data from the host, the latest updated temporary data in the cache space is overwritten by the write data.

Description

資料儲存裝置與快閃記憶體控制方法 Data storage device and flash memory control method

本發明係有關於以快閃記憶體實現的一種資料儲存裝置、以及快閃記憶體之控制方法。 The present invention relates to a data storage device implemented in a flash memory and a control method for a flash memory.

現今資料儲存裝置常以快閃記憶體(FLASH memory)為儲存媒體。以非及閘型的快閃記憶體(即NAND FLASH)為例,常用作記憶卡(memory card)、通用序列匯流排閃存裝置(USB flash device)、固態硬碟(SSD)...等產品。另外有一種應用是採多晶片封裝、將NAND FLASH晶片與控制晶片包成一顆晶片-稱為嵌入式快閃記憶體模組(eMMC)。 Today's data storage devices often use FLASH memory as the storage medium. For example, NAND FLASH, which is not a gate type, is often used as a memory card, a USB flash device, a solid state drive (SSD), etc. . Another application is to package a NAND FLASH wafer and a control wafer into a single chip package called an embedded flash memory module (eMMC).

快閃記憶體不只應用廣泛,其容量更隨著製程技術發展顯著提升。然而,愈來愈龐大的記憶體容量使得快閃記憶體之控制方式更加顯著影響快閃記憶體的運作效能。 Flash memory is not only widely used, but its capacity has also increased significantly with the development of process technology. However, the ever-increasing memory capacity makes the control mode of the flash memory more significantly affect the operational performance of the flash memory.

本發明揭露一種以快閃記憶體實現的資料儲存裝置,並且揭露一快閃記憶體的控制方法。 The invention discloses a data storage device implemented by flash memory, and discloses a control method of a flash memory.

根據一種實施方式所實現的一資料儲存裝置包括:一快閃記憶體以及耦接該快閃記憶體的一控制器。該快閃記憶體具有複數個區塊,且各區塊具有複數頁。該等區塊係劃分由複數個存取通道作存取。該控制器包括一運算單元、一唯 讀記憶體、以及一隨機存取記憶體。該唯讀記憶體所載程式係由該運算單元執行,作為該資料儲存裝置之韌體。該隨機存取記憶體係在執行該韌體的該運算單元規劃下供應一套快取空間。該套快取空間針對上述複數個存取通道各自提供寫入資料的暫存空間。此外,該運算單元更令一主機下達的寫入資料分散對應上述複數個存取通道。當該寫入資料對映的的邏輯位址與該套快取空間中最新的暫存資料對映的邏輯位址相同時,該運算單元於該套快取空間中,以該寫入資料更新該最新的暫存資料。 A data storage device implemented according to an embodiment includes: a flash memory and a controller coupled to the flash memory. The flash memory has a plurality of blocks, and each block has a plurality of pages. The partitions are divided by a plurality of access channels. The controller includes an arithmetic unit and a unique Read memory, and a random access memory. The program contained in the read-only memory is executed by the arithmetic unit as the firmware of the data storage device. The random access memory system supplies a set of cache space under the computing unit plan for executing the firmware. The set of cache space provides a temporary storage space for writing data for each of the plurality of access channels. In addition, the computing unit further distributes the write data issued by one host to the plurality of access channels. When the logical address mapped by the write data is the same as the logical address mapped by the latest temporary data in the set of cache space, the operation unit is updated in the set of cache space by the write data. The latest temporary data.

根據本發明另一種實施方式,快閃記憶體的控制方法包括:將一快閃記憶體的複數個區塊劃分由複數個存取通道作存取,各區塊具有複數頁;於一隨機存取記憶體中規劃至少一套快取空間,該套快取空間係針對上述複數個存取通道各自提供寫入資料的暫存空間;令一主機下達的寫入資料分散對應上述複數個存取通道;以及,當該寫入資料對映的的邏輯位址與該套快取空間中最新的暫存資料對映的邏輯位址相同時,於該套快取空間中,以該寫入資料更新該最新的暫存資料。 According to another embodiment of the present invention, a method for controlling a flash memory includes: dividing a plurality of blocks of a flash memory by a plurality of access channels, each block having a plurality of pages; At least one set of cache space is planned in the memory, and the set of cache space provides a temporary storage space for writing data for each of the plurality of access channels; and the write data distributed by one host is corresponding to the plurality of accesses. a channel; and, when the logical address mapped by the write data is the same as the logical address of the latest temporary data in the set of cache space, the write data is used in the set of cache space Update the latest temporary data.

為使本發明之上述目的、特徵和優點能更明顯易懂,下文特舉實施例,並配合所附圖示,詳細說明如下。 The above described objects, features, and advantages of the invention will be apparent from the description and appended claims appended claims

102‧‧‧資料儲存裝置 102‧‧‧ data storage device

104‧‧‧主機 104‧‧‧Host

106‧‧‧快閃記憶體 106‧‧‧Flash memory

108‧‧‧控制器 108‧‧‧ Controller

110‧‧‧運算單元 110‧‧‧ arithmetic unit

112‧‧‧唯讀處理器 112‧‧‧Read-only processor

114‧‧‧隨機存取記憶體 114‧‧‧ Random access memory

Cache_CE1、Cache_CE2...Cache_CEi、Cache_CEi+1、 Cache_CEi+2、Caceh_CEN‧‧‧一套快取空間 Cache_CE1, Cache_CE2...Cache_CEi, Cache_CEi+1, Cache_CEi+2, Caceh_CEN‧‧‧ a set of cache space

CE1、CE2...CEN‧‧‧晶片/存取通道 CE1, CE2...CEN‧‧‧ wafer/access channel

HPage1、HPage2...HPageN‧‧‧邏輯位址 HPage1, HPE2...HPageN‧‧‧ logical address

HPage1_Old、HPageN_Old‧‧‧邏輯位址HPage1與HPageN中不需更新的資料 HPage1_Old, HPN_Old‧‧‧ Logical addresses HPage1 and HPageN do not need to be updated

HPageA、HPageB、HPageC、HPageF、HPageG‧‧‧邏輯位址 HPageA, HPPB, HPP, HPageF, HPageG‧‧‧ logical address

PAGE11...PAGE1K、PAGE21...PAGE2K、PAGEN1...PAGENK‧‧‧頁 PAGE11...PAGE1K, PAGE21...PAGE2K, PAGEN1...PAGENK‧‧‧

S502...S510、S602...S612‧‧‧步驟 S502...S510, S602...S612‧‧‧ steps

T1、T2、T3、T4、T5‧‧‧時序 T1, T2, T3, T4, T5‧‧‧ timing

第1圖圖解根據本發明一種實施方式所實現的一資料儲存裝置102,其與一主機104溝通;第2圖圖解本發明一種實施方式,其中,主機104下達的寫 入操作涉及多個邏輯位址HPage1、HPage2...HPageN(不限定為連續邏輯位址),且邏輯位址HPage1、HPage2...HPageN不重複;第3圖圖解本發明另外一種實施方式,其中,主機104下達的寫入操作依序涉及邏輯位址HPageF、HPageG以及HPageF,邏輯位址HPageF非連續地重複出現;第4圖圖解本發明另外一種實施方式,其中,主機104下達的寫入操作依序涉及邏輯位址HPageA、HPageB以及連續重複出現的邏輯位址HPageC;第5圖以流程圖描述實施「邏輯位址檢查」的資料整理操作;以及第6圖以流程圖描述「邏輯位址檢查」之資料整理操作的另外一種實施方式。 1 illustrates a data storage device 102 implemented in accordance with an embodiment of the present invention that communicates with a host 104; FIG. 2 illustrates an embodiment of the present invention in which a write by host 104 is performed. The input operation involves a plurality of logical addresses HPage1, HPage2...HPageN (not limited to consecutive logical addresses), and logical addresses HPage1, HPage2...HPageN are not repeated; FIG. 3 illustrates another embodiment of the present invention, The write operation issued by the host 104 sequentially involves logical addresses HPageF, HPageG, and HPageF, and the logical address HPageF is repeatedly discontinuous; FIG. 4 illustrates another embodiment of the present invention, wherein the write by the host 104 is performed. The operation sequentially involves the logical address HPageA, HPageB and the continuously repeated logical address HPageC; the fifth figure describes the data sorting operation of the "logical address check" by a flowchart; and the sixth figure depicts the logical position by a flowchart Another embodiment of the data sorting operation of the address check.

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

第1圖圖解根據本發明一種實施方式所實現的一資料儲存裝置102,其與一主機104溝通。資料儲存裝置102包括:一快閃記憶體(FLASH memory)106以及一控制器108。 1 illustrates a data storage device 102 implemented in communication with a host 104 in accordance with an embodiment of the present invention. The data storage device 102 includes a flash memory 106 and a controller 108.

此段落討論快閃記憶體106的設計。為了同時處理一個以上的操作指令,快閃記憶體106係採用多存取通道技術,其中,快閃記憶體106的複數個區塊(blocks)係劃分由複數個存取通道作存取。如圖中所示實施方式,快閃記憶體106是 以多個晶片CE1、CE2...CEN(涉及chip enabled技術)實現多存取通道。單一晶片對應單一存取通道,以下將該些存取通道相應該些晶片CE1、CE2...CEN作同樣標號。各晶片提供有複數個區塊(blocks)。各區塊具有複數頁(pages,標號PAGE11~PAGENK所示即「頁」)。儘管單一晶片同時段僅允許單一存取操作,但多晶片所形成的多存取通道設計使得快閃記憶體106同時可應付多個存取操作。 This paragraph discusses the design of the flash memory 106. In order to process more than one operation command at the same time, the flash memory 106 adopts a multi-access channel technology, wherein a plurality of blocks of the flash memory 106 are divided by a plurality of access channels for access. As shown in the embodiment shown, the flash memory 106 is Multiple access channels are implemented with multiple wafers CE1, CE2...CEN (involving chip enabled technology). A single wafer corresponds to a single access channel, and the access channels are labeled with the same reference numerals CE1, CE2, ... CEN. Each wafer is provided with a plurality of blocks. Each block has a plurality of pages (pages, PAGE11~PAGENK, that is, "pages"). Although a single wafer simultaneous segment allows only a single access operation, the multiple access channel design formed by the multi-chip allows the flash memory 106 to cope with multiple access operations simultaneously.

以下接著討論控制器108之設計。 The design of the controller 108 is discussed below.

控制器108耦接該快閃記憶體106,且包括:一運算單元110、一唯讀記憶體112以及一隨機存取記憶體114。唯讀記憶體112所載程式係由該運算單元110執行,作為該資料儲存裝置102之韌體(firmware)。隨機存取記憶體114在執行該韌體的該運算單元110規劃下供應一套快取空間(Cache Space),包括空間Cache_CE1、Cache_CE2...Cache_CEN,分別對應上述複數個存取通道CE1、CE2...CEN作資料整理使用。執行所述韌體的運算單元110係令主機104下達的寫入資料分散對應上述複數個存取通道CE1、CE2...CEN,以對應暫存至該套快取空間Cache_CE1、Cache_CE2...Cache_CEN與讀自該快閃記憶體106的資料作整併。整併完成的資料將根據其空間所對應的存取通道寫入該快閃記憶體106。在一種實施方式中,空間Cache_CE1、Cache_CE2...Cache_CEN各自佔據一「寫入頁(super page)」的大小,尺寸為K個「頁(page)」,K為一數量值。空間Cache_CE1的內容可經存取通道CE1寫入分散於K區塊上的頁PAGE11...頁PAGE1K,空間Cache_CE2的內容可經存取通 道CE2寫入分散於K區塊上的頁PAGE21...頁PAGE2K,以此類推,空間Cache_CEN的內容可經存取通道CEN寫入分散於K區塊上的頁PAGEN1...頁PAGENK。「寫入頁(super page)」設計使得K頁之寫入得以由單一寫入指令實現,有效減少指令數量。 The controller 108 is coupled to the flash memory 106 and includes an operation unit 110, a read-only memory 112, and a random access memory 114. The program contained in the read-only memory 112 is executed by the arithmetic unit 110 as the firmware of the data storage device 102. The random access memory 114 supplies a set of cache space (Cache Space), including a space Cache_CE1, Cache_CE2, ... Cache_CEN, corresponding to the plurality of access channels CE1, CE2, respectively, under the planning of the computing unit 110 executing the firmware. ...CEN for data collation. The computing unit 110 executing the firmware causes the write data distributed by the host 104 to be distributed corresponding to the plurality of access channels CE1, CE2, . . . CEN to be temporarily stored in the cache space Cache_CE1, Cache_CE2... The Cache_CEN is merged with the data read from the flash memory 106. The completed data will be written to the flash memory 106 according to the access channel corresponding to its space. In one embodiment, the space Cache_CE1, Cache_CE2, ... Cache_CEN each occupy a "super page" size, the size is K "pages", and K is a quantity value. The content of the space Cache_CE1 can be written to the page PAGE11...page PAGE1K dispersed on the K block via the access channel CE1, and the content of the space Cache_CE2 can be accessed. The channel CE2 writes the page PAGE21...page PAGE2K dispersed on the K block, and so on, the content of the space Cache_CEN can be written to the page PAGEN1 ... PAGENK scattered on the K block via the access channel CEN. The "super page" design allows the writing of K pages to be implemented by a single write command, effectively reducing the number of instructions.

本發明包括在快取空間Cache_CE1、Cache_CE2...Cache_CEN的利用上更考慮主機104所下達的邏輯位址。圖中實施方式是在韌體中設計一邏輯位址檢查機制。第2圖、第3圖以及第4圖則圖解不同邏輯位址所對應的快取空間使用方式。 The present invention includes considering the logical address of the host 104 in the utilization of the cache space Cache_CE1, Cache_CE2, ... Cache_CEN. The implementation in the figure is to design a logical address checking mechanism in the firmware. Figure 2, Figure 3, and Figure 4 illustrate the use of cache space for different logical addresses.

參考第2圖,其中,主機104下達的寫入操作涉及多個邏輯位址HPage1、HPage2...HPageN(不限定為連續邏輯位址),且邏輯位址HPage1、HPage2...HPageN不重複。運算單元110係令該些邏輯位址HPage1、HPage2...HPageN分散對應不同的存取通道CE1、CE2...CEN,並據以將主機104所下達、關於該些邏輯位址HPage1、HPage2...HPageN的寫入資料對應暫存至所述該套快取空間Cache_CE1、Cache_CE2...Cache_CEN。如圖所示,邏輯位址HPage1之寫入資料由空間Cache_CE1暫存,邏輯位址HPage2之寫入資料由空間Cache_CE2暫存...邏輯位址HPageN之寫入資料由空間Cache_CEN暫存。至於僅需要局部寫入的邏輯位址-例如,一寫入操作之起始邏輯位址HPage1與終止邏輯位址HPageN-其無須更新之資料HPage1_Old、HPageN_Old係由快閃記憶體106複製至隨機存取記憶體114上對應的空間Cache_CE1、Cache_CEN與主機104下達之寫入資料作整併。如此一來,邏輯位址HPage1、HPage2...HPageN各自 完整的資料整理於所揭露之該套快取空間Cache_CE1、Cache_CE2...Cache_CEN,得以於該套快取空間Cache_CE1、Cache_CE2...Cache_CEN寫滿後依照所屬之存取通道CE1、CE2...CEN寫入該快閃記憶體106。 Referring to FIG. 2, the write operation issued by the host 104 involves a plurality of logical addresses HPage1, HPage2...HPageN (not limited to consecutive logical addresses), and the logical addresses HPage1, HPage2...HPageN are not repeated. . The operation unit 110 is configured to distribute the logical addresses HPage1, HPage2, ...HPageN corresponding to different access channels CE1, CE2, ..., CEN, and according to the host 104, about the logical addresses HPage1, HPage2 The write data of HPageN is temporarily stored in the cache space Cache_CE1, Cache_CE2, ... Cache_CEN. As shown in the figure, the write data of the logical address HPage1 is temporarily stored by the space Cache_CE1, and the write data of the logical address HPage2 is temporarily stored by the space Cache_CE2... The write data of the logical address HPageN is temporarily stored by the space Cache_CEN. As for the logical address that only needs to be locally written - for example, the start logical address HPage1 and the end logical address HPageN of a write operation - the data that does not need to be updated, HPage1_Old, and HPen_Old are copied from the flash memory 106 to the random memory. The corresponding spaces Cache_CE1 and Cache_CEN on the memory 114 are combined with the write data issued by the host 104. In this way, the logical addresses HPage1, HPage2...HPageN are each The complete data is organized in the cache space Cache_CE1, Cache_CE2, ... Cache_CEN, which can be exposed according to the access channels CE1, CE2 of the cache space Cache_CE1, Cache_CE2, Cache_CEN... CEN is written to the flash memory 106.

參考第3圖,其中,主機104下達的寫入操作依序涉及邏輯位址HPageF、HPageG以及HPageF,邏輯位址HPageF非連續地重複出現。以下依照時間順序討論運算單元110之動作。時序T1,邏輯位址HPageF的資料係整理於空間Cache_CEi。時序T2,邏輯位址HPageG的資料係整理於空間Cache_CEi+1。時序T3,主機104再次下達邏輯位址HPageF之寫入指令,執行該韌體的運算單元110將檢查到邏輯位址HPageF已在該套快取空間之非最新使用處(最新使用處為Cache_CEi+1,非最新使用處包括Cache_CE1...Cache_CEi)有對應配置的資料整理空間Caceh_CEi,於是,時序T4下,該套快取空間已暫存有的內容(即空間Cache-CE1...Cache-CEi+1的內容)係依照所屬之存取通道CE1...CEi+1寫入該快閃記憶體106。至於主機104於時序T3所下達的邏輯位址HPageF寫入操作則是於時序T5以該套快閃空間內一接續空間Cache_CEi+2作資料整理。關於非預期的斷電事件,如此設計可確保快閃記憶體106的內容是遵循主機104下達之寫入操作之時序作更新,各邏輯位址的更新時序正確。至於Cache_CEi+2以及其後之空間(至...Cache_CEN),可在該套快取空間最尾端空間(即Cache_CEN)填滿後依照所屬之存取通道CEi+2...CEN寫入該快閃記憶體106。 Referring to FIG. 3, the write operation issued by the host 104 sequentially involves logical addresses HPageF, HPageG, and HPageF, and the logical address HPageF is repeatedly discontinuously. The actions of the arithmetic unit 110 are discussed below in chronological order. At time T1, the data of the logical address HPageF is organized in the space Cache_CEi. At time T2, the data of the logical address HPageG is organized in the space Cache_CEi+1. At time sequence T3, the host 104 again issues a write command of the logical address HPageF, and the arithmetic unit 110 executing the firmware will check that the logical address HPageF is already in the latest use of the set of cache space (the latest use is Cache_CEi+) 1, non-latest use includes Cache_CE1...Cache_CEi) There is a corresponding configuration data space Caceh_CEi, then, under the timing T4, the set of cache space has temporary storage content (ie space Cache-CE1...Cache- The content of CEi+1 is written to the flash memory 106 in accordance with the associated access channel CE1...CEi+1. As for the logical address HPageF write operation of the host 104 at the timing T3, the data is sorted by a contiguous space Cache_CEi+2 in the set of flash space at the timing T5. Regarding the unexpected power down event, the design is such that the content of the flash memory 106 is updated in accordance with the timing of the write operation issued by the host 104, and the update timing of each logical address is correct. As for Cache_CEi+2 and the following space (to Cache_CEN), it can be written according to the access channel CEi+2...CEN after the end space of the set of cache space (ie Cache_CEN) is filled. The flash memory 106.

參考第4圖,其中,主機104下達的寫入操作依序涉及邏輯位址HPageA、HPageB、以及重複兩次的HPageC。邏輯位址HPageC連續地重複出現。以下依照時間順序討論運算單元110之動作。時序T1,邏輯位址HPageA的資料係整理於空間Cache_CEi。時序T2,邏輯位址HPageB的資料係整理於空間Cache_CEi+1。時序T3,邏輯位址HPageC的資料係整理於空間Cache_CEi+2。時序T4,主機104再次下達邏輯位址HPageC之寫入指令,執行該韌體的運算單元110將檢查到邏輯位址HPageC已在該套快取空間之最新使用處Cache_CEi+2對應配置,於是,時序T5下,執行該韌體的該運算單元110重複利用該最新使用處Cache_CEi+2為該邏輯位址HPageC作資料整理。如此設計可有效提升該套快取空間Cache_CE1、Cache_CE2...Cache_CEN之使用效能。 Referring to FIG. 4, the write operation issued by the host 104 sequentially involves the logical address HPageA, the HPageB, and the HPageC repeated twice. The logical address HPageC is repeated continuously. The actions of the arithmetic unit 110 are discussed below in chronological order. Timing T1, the data of the logical address HPageA is organized in the space Cache_CEi. At time T2, the data of the logical address HPageB is organized in the space Cache_CEi+1. At time T3, the data of the logical address HPageC is organized in the space Cache_CEi+2. At time sequence T4, the host 104 again issues a write instruction to the logical address HPageC, and the operation unit 110 executing the firmware will check that the logical address HPageC has been configured correspondingly to the latest use location Cache_CEi+2 of the set of cache space, thus, At time sequence T5, the computing unit 110 executing the firmware repeatedly uses the latest usage location Cache_CEi+2 to organize the logical address HPageC. This design can effectively improve the performance of the cache space Cache_CE1, Cache_CE2...Cache_CEN.

第5圖以流程圖描述實施「邏輯位址檢查」的資料整理操作。關於主機104所下達的寫入操作,其中待整理的一邏輯位址為HPagej。步驟S502係比對邏輯位址HPagej是否與該套快取空間中最新使用處(Cache_CEj-1)所配置對應的邏輯位址HPagej-1相同。若邏輯位址HPagej同邏輯位址HPagej-1,則進行步驟S504,重複利用空間Cache_CEj-1作邏輯位址HPagej之資料整理。若邏輯位址HPagej不同於邏輯位址HPagej-1,則進行步驟S506,更將待整理之邏輯位址HPagej與該套快取空間中非最新使用處(Cache_CE1...Cache_CEj-2)所配置對應的邏輯位址HPage1...HPagej-2作比對。若邏輯位址HPagej與邏輯位址HPage1...HPagej-2無任何重複,則進行步驟S508,以該套快取 空間中的接續空間Cache_CEj作邏輯位址HPagej之資料整理。若邏輯位址HPagej與邏輯位址HPage1...HPagej-2任一重複,則進行步驟S510,將該套快取空間已暫存有內容的部分Cache_CE1...Cache_CEj-1依照所屬之存取通道CE1...CEj-1寫入該快閃記憶體106,並於之後進行步驟S508,以該套快取空間中的接續空間Cache_CEj作邏輯位址HPagej之資料整理。 Figure 5 is a flow chart describing the data sorting operation of the "logical address check". Regarding the write operation issued by the host 104, a logical address to be collated is HPagej. Step S502 is to compare whether the logical address HPagej is the same as the logical address HPagej-1 corresponding to the configuration of the latest use location (Cache_CEj-1) in the set of cache spaces. If the logical address HPagej is the same as the logical address HPagej-1, then step S504 is performed to repeatedly use the space Cache_CEj-1 as the data of the logical address HPagej. If the logical address HPagej is different from the logical address HPagej-1, proceed to step S506, and further configure the logical address HPagej to be collated and the non-latest use location (Cache_CE1...Cache_CEj-2) in the set of cache space. Corresponding logical addresses HPage1...HPagej-2 are compared. If there is no duplication between the logical address HPagej and the logical addresses HPage1...HPagej-2, proceed to step S508 to cache the set The splicing space Cache_CEj in the space is used as the data of the logical address HPagej. If the logical address HPagej is repeated with any of the logical addresses HPage1...HPagej-2, then step S510 is performed, and the portion Cache_CE1...Cache_CEj-1 in which the set of cache space has been temporarily stored has the access according to the access. The channel CE1...CEj-1 is written into the flash memory 106, and then proceeds to step S508 to organize the data of the logical address HPagej with the connection space Cache_CEj in the set of cache space.

第6圖以流程圖描述「邏輯位址檢查」之資料整理操作的另外一種實施方式。步驟S602用於判斷該寫入資料對映的的邏輯位址與該套快取空間中最新的暫存資料對映的邏輯位址是否相同;若相同,流程進入步驟S604,於該套快取空間中,以該寫入資料更新該最新的暫存資料。若步驟S602判斷結果為不相同,則流程進入步驟S606,判斷該寫入資料對映的的邏輯位址與該套快取空間中非最新的暫存資料對映的邏輯位址是否相同。若步驟S606判斷結果為不相同,流程進入步驟S608,於該套快取空間中儲存該寫入資料,反之,則進行步驟S610,將該套快取空間中與該寫入資料對映相同邏輯位址的該非最新之暫存資料寫入該快閃記憶體。隨後,流程進入步驟S612,於該套快取空間中儲存該寫入資料。 Fig. 6 is a flow chart showing another embodiment of the data sorting operation of "logical address check". Step S602 is used to determine whether the logical address of the data to be mapped is the same as the logical address of the latest temporary data in the set of cache data; if the same, the flow proceeds to step S604, where the cache is set. In the space, the latest temporary data is updated with the written data. If the result of the determination in step S602 is not the same, the flow proceeds to step S606, and it is determined whether the logical address mapped by the written data is the same as the logical address mapped by the non-latest temporary data in the set of cached space. If the result of the determination in step S606 is different, the process proceeds to step S608, and the write data is stored in the set of cache space. Otherwise, the process proceeds to step S610, and the same logic is mapped to the write data in the set of cache space. The non-latest temporary data of the address is written to the flash memory. Then, the process proceeds to step S612, where the written data is stored in the set of cache space.

以上實施例所揭露之資料儲存裝置可實現為記憶卡(memory card)、通用序列匯流排閃存裝置(USB flash device)、固態硬碟(SSD)...等產品。另外有一種實施方式是採多晶片封裝、將NAND FLASH晶片與控制晶片包成一顆晶片-稱為嵌入式快閃記憶體模組(eMMC)。 The data storage device disclosed in the above embodiments can be implemented as a memory card, a universal flash memory device (USB flash device), a solid state hard disk (SSD), and the like. In another embodiment, a multi-chip package is used to package a NAND FLASH wafer and a control chip into a single chip - called an embedded flash memory module (eMMC).

以上所揭露之內容可以程式化方式呈韌體實現。 相關程式碼可載於唯讀記憶體112中,由運算單元110執行之。此外,除了以上所揭露之控制器108結構,其他採用同樣概念控制快閃記憶體的技術都屬於本案所欲保護的範圍。本案更涉及快閃記憶體的控制方法,不限定以第1圖所示之控制器108結構實現。 The above disclosed content can be implemented in firmware in a stylized manner. The associated code can be carried in the read-only memory 112 and executed by the arithmetic unit 110. In addition, in addition to the structure of the controller 108 disclosed above, other techniques for controlling the flash memory using the same concept are within the scope of the present invention. The present invention further relates to a method of controlling a flash memory, and is not limited to the configuration of the controller 108 shown in FIG.

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

102‧‧‧資料儲存裝置 102‧‧‧ data storage device

104‧‧‧主機 104‧‧‧Host

106‧‧‧快閃記憶體 106‧‧‧Flash memory

10‧‧‧控制器 10‧‧‧ Controller

110‧‧‧運算單元 110‧‧‧ arithmetic unit

112‧‧‧唯讀處理器 112‧‧‧Read-only processor

114‧‧‧隨機存取記憶體 114‧‧‧ Random access memory

Cache_CE1、Cache_CE2...Caceh_CEN‧‧‧一套快取空間 Cache_CE1, Cache_CE2...Caceh_CEN‧‧‧ a set of cache space

CE1、CE2...CEN‧‧‧晶片/存取通道 CE1, CE2...CEN‧‧‧ wafer/access channel

PAGE11...PAGE1K、PAGE21...PAGE2K、 PAGEN1...PAGENK‧‧‧頁 PAGE11...PAGE1K, PAGE21...PAGE2K, PAGEN1...PAGENK‧‧‧Page

Claims (12)

一種資料儲存裝置,包括:一快閃記憶體,具有複數個區塊、且各區塊具有複數頁,該等區塊係劃分由複數個存取通道作存取;以及耦接該快閃記憶體的一控制器,包括:一運算單元;一唯讀記憶體,所載程式由該運算單元執行,作為該資料儲存裝置之韌體;以及一隨機存取記憶體,在執行該韌體的該運算單元規劃下供應一套快取空間,該套快取空間針對上述複數個存取通道各自提供寫入資料的暫存空間;其中:執行該韌體的該運算單元係令一主機下達的寫入資料分散對應上述複數個存取通道;並且當該寫入資料對映的的邏輯位址與該套快取空間中最新的暫存資料對映的邏輯位址相同時,該運算單元於該套快取空間中,以該寫入資料更新該最新的暫存資料。 A data storage device comprising: a flash memory having a plurality of blocks, each block having a plurality of pages, the blocks being divided by a plurality of access channels; and coupled to the flash memory a controller of the body, comprising: an arithmetic unit; a read-only memory, the program is executed by the computing unit as a firmware of the data storage device; and a random access memory is executed in the firmware The operating unit is configured to supply a set of cache space, and the set of cache space provides a temporary storage space for writing data for each of the plurality of access channels; wherein: the computing unit that executes the firmware is issued by a host The write data is distributed corresponding to the plurality of access channels; and when the logical address mapped by the write data is the same as the logical address mapped by the latest temporary data in the set of cache space, the operation unit is In the set of cache space, the latest temporary data is updated by the written data. 如申請專利範圍第1項所述之資料儲存裝置,其中,當該寫入資料對映的的邏輯位址與該套快取空間中非最新的暫存資料對映的邏輯位址相同時,該運算單元將該套快取空間中與該寫入資料對映相同邏輯位址的暫存資料寫入該快閃記憶體。 The data storage device of claim 1, wherein when the logical address of the written data is the same as the logical address of the non-latest temporary data in the set of cache spaces, The operation unit writes the temporary storage data in the set of cache space and the same logical address as the write data into the flash memory. 如申請專利範圍第2項所述之資料儲存裝置,其中,該運算單元將該套快取空間中與該寫入資料對映相同邏輯位 址的暫存資料寫入該快閃記憶體後,將該寫入資料存於該套快取空間。 The data storage device of claim 2, wherein the computing unit maps the same logical bit in the cache space to the write data. After the temporary storage data of the address is written into the flash memory, the written data is stored in the set of cache space. 如申請專利範圍第1項所述之資料儲存裝置,其中:執行該韌體的該運算單元更於該套快取空間最尾端空間填滿後將該套快取空間已暫存有的內容依照所屬之存取通道寫入該快閃記憶體。 The data storage device of claim 1, wherein: the computing unit that executes the firmware further stores the cached space after the end space of the set of cache space is filled. The flash memory is written according to the access channel to which it belongs. 如申請專利範圍第1項所述之資料儲存裝置,其中:當該邏輯位址已在該套快取空間最新使用處有對應配置的資料整理空間時,執行該韌體的該運算單元重複利用該最新使用處為該邏輯位址作資料整理。 The data storage device of claim 1, wherein: when the logical address has a corresponding data collation space at the latest use of the cache space, the computing unit that executes the firmware reuses The latest use is for the logical address of the data. 如申請專利範圍第1項所述之資料儲存裝置,其中,該運算單元係令該寫入資料分散對應上述複數個存取通道,並對應一套暫存於上述快取空間的資料作整併。 The data storage device of claim 1, wherein the computing unit is configured to distribute the written data corresponding to the plurality of access channels, and corresponding to a set of data temporarily stored in the cache space. . 一種快閃記憶體控制方法,包括:將一快閃記憶體的複數個區塊劃分由複數個存取通道作存取,各區塊具有複數頁;於一隨機存取記憶體中規劃至少一套快取空間,該套快取空間係針對上述複數個存取通道各自提供寫入資料的暫存空間;令一主機下達的寫入資料分散對應上述複數個存取通道;且當該寫入資料對映的的邏輯位址與該套快取空間中最新的暫存資料對映的邏輯位址相同時,於該套快取空間中,以該寫入資料更新該最新的暫存資料。 A flash memory control method includes: dividing a plurality of blocks of a flash memory by a plurality of access channels, each block having a plurality of pages; planning at least one in a random access memory a set of cache space, the set of cache space for each of the plurality of access channels provides a temporary storage space for writing data; the write data released by a host is distributed corresponding to the plurality of access channels; and when the write When the logical address of the data mapping is the same as the logical address of the latest temporary data in the set of cache space, the latest temporary data is updated by the written data in the set of cache space. 如申請專利範圍第7項所述之快閃記憶體控制方法,更包括:當該寫入資料對映的的邏輯位址與該套快取空間中非最新的暫存資料對映的邏輯位址相同時,將該套快取空間中與該寫入資料對映相同邏輯位址的暫存資料寫入該快閃記憶體。 The flash memory control method as described in claim 7 further includes: a logical bit mapped to the non-latest temporary data in the set of cache spaces when the logical address of the write data is mapped When the address is the same, the temporary data in the set of cache space and the same logical address as the write data is written into the flash memory. 如申請專利範圍第8項所述之快閃記憶體控制方法,更包括:該套快取空間中與該寫入資料對映相同邏輯位址的暫存資料寫入該快閃記憶體後,將該寫入資料存於該套快取空間。 The flash memory control method of claim 8, further comprising: writing, to the flash memory, the temporary data in the cache space that is the same logical address as the write data; The write data is stored in the set of cache space. 如申請專利範圍第7項所述之快閃記憶體控制方法,更包括:於該套快取空間最尾端空間填滿後將該套快取空間已暫存有的內容依照所屬之存取通道寫入該快閃記憶體。 The method for controlling the flash memory according to the seventh aspect of the patent application further includes: after the space at the end of the set of the cache space is filled, the content temporarily stored in the cache space is stored according to the access The channel is written to the flash memory. 如申請專利範圍第7項所述之快閃記憶體控制方法,更包括:於該邏輯位址已在該套快取空間最新使用處有對應配置的資料整理空間時,重複利用該最新使用處為該邏輯位址作資料整理。 The flash memory control method of claim 7, further comprising: reusing the latest use location when the logical address has a correspondingly configured data sorting space at the latest use of the set of cache space Make data for this logical address. 如申請專利範圍第7項所述之快閃記憶體控制方法,其中該寫入資料分散對應上述複數個存取通道,並對應一套暫存於上述快取空間的資料作整併。 The flash memory control method of claim 7, wherein the written data is distributed corresponding to the plurality of access channels, and is integrated with a set of data temporarily stored in the cache space.
TW102107205A 2013-03-01 2013-03-01 Data storage device and flash memory control method TWI529730B (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
TW102107205A TWI529730B (en) 2013-03-01 2013-03-01 Data storage device and flash memory control method
CN201310131475.XA CN104020959A (en) 2013-03-01 2013-04-16 Data storage device and flash memory control method
US14/100,627 US8984171B2 (en) 2013-03-01 2013-12-09 Data storage device and flash memory control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW102107205A TWI529730B (en) 2013-03-01 2013-03-01 Data storage device and flash memory control method

Publications (2)

Publication Number Publication Date
TW201435888A true TW201435888A (en) 2014-09-16
TWI529730B TWI529730B (en) 2016-04-11

Family

ID=51437742

Family Applications (1)

Application Number Title Priority Date Filing Date
TW102107205A TWI529730B (en) 2013-03-01 2013-03-01 Data storage device and flash memory control method

Country Status (2)

Country Link
CN (1) CN104020959A (en)
TW (1) TWI529730B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI520152B (en) * 2013-03-01 2016-02-01 慧榮科技股份有限公司 Data storage device and flash memory control method
TWI544487B (en) * 2015-01-22 2016-08-01 慧榮科技股份有限公司 Data storage device and flash memory control method
TWI650643B (en) * 2018-01-25 2019-02-11 瑞昱半導體股份有限公司 Data storage chip and data access method
CN110647288A (en) * 2018-06-26 2020-01-03 上海宝存信息科技有限公司 Data storage device and cache shunting method thereof
CN109710189A (en) * 2018-12-26 2019-05-03 杭州华澜微电子股份有限公司 A kind of data storage and management method and device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7386768B2 (en) * 2003-06-05 2008-06-10 Intel Corporation Memory channel with bit lane fail-over
CN102004696A (en) * 2009-08-28 2011-04-06 先进国际有限公司 Memory access method used in microcontroller
TWI506422B (en) * 2009-09-23 2015-11-01 Silicon Motion Inc Method for managing a memory device having multiple channels and multiple ways, and associated memory device and controller thereof
TWI434175B (en) * 2010-09-27 2014-04-11 Silicon Motion Inc Method for performing block management, and associated memory device and controller thereof

Also Published As

Publication number Publication date
TWI529730B (en) 2016-04-11
CN104020959A (en) 2014-09-03

Similar Documents

Publication Publication Date Title
US10817415B2 (en) Data storage device and method including device or controller-based space allocation and host-based mapping table searching
US10296224B2 (en) Apparatus, system and method for increasing the capacity of a storage device available to store user data
US8595414B2 (en) Selectively combining commands for a system having non-volatile memory
US10678476B2 (en) Memory system with host address translation capability and operating method thereof
CN104423894B (en) Data memory device and method for controlling flash memory
US9025375B2 (en) Memory disturb reduction for nonvolatile memory
CN110928807B (en) Apparatus and method for checking valid data in a memory system
US8055859B2 (en) Apparatus and method for providing atomicity with respect to request of write operation for successive sector
TWI529730B (en) Data storage device and flash memory control method
US11762591B2 (en) Memory system and method of controlling nonvolatile memory by controlling the writing of data to and reading of data from a plurality of blocks in the nonvolatile memory
CN102279712A (en) Storage control method, system and device applied to network storage system
US10649893B2 (en) Namespace planning of non-volatile memory of data storage device
CN112201292A (en) Controller and operation method thereof
TWI520152B (en) Data storage device and flash memory control method
US11543986B2 (en) Electronic system including host, memory controller and memory device and method of operating the same
US8185687B2 (en) Semiconductor storage device and method of controlling semiconductor storage device
US20150178194A1 (en) Systems and methods of address-aware garbage collection
US20230244394A1 (en) Gradually Reclaim Storage Space Occupied by a Proof of Space Plot in a Solid State Drive
WO2017151262A1 (en) Method and apparatus for providing a contiguously addressable memory region by remapping an address space
US10528285B2 (en) Data storage device and method for operating non-volatile memory
CN110888825A (en) Apparatus and method for processing data in memory system
US8671257B2 (en) Memory system having multiple channels and method of generating read commands for compaction in memory system
WO2017000821A1 (en) Storage system, storage management device, storage device, hybrid storage device, and storage management method
US20180089082A1 (en) Cooperative write-back cache flushing for storage devices
US11762680B2 (en) Method and system of host resource utilization reduction