TWI574153B - Method for reducing use of dram in ssd and the ssd using the same - Google Patents
Method for reducing use of dram in ssd and the ssd using the same Download PDFInfo
- Publication number
- TWI574153B TWI574153B TW105122037A TW105122037A TWI574153B TW I574153 B TWI574153 B TW I574153B TW 105122037 A TW105122037 A TW 105122037A TW 105122037 A TW105122037 A TW 105122037A TW I574153 B TWI574153 B TW I574153B
- Authority
- TW
- Taiwan
- Prior art keywords
- address
- logical
- solid state
- hard disk
- physical address
- Prior art date
Links
Landscapes
- Memory System (AREA)
Description
本發明關於一種減少DRAM(Dynamic Random Access Memory)使用的方法,特別是關於一種減少固態硬碟中DRAM使用的方法及使用該方法的固態硬碟。 The present invention relates to a method for reducing the use of DRAM (Dynamic Random Access Memory), and more particularly to a method for reducing the use of DRAM in a solid state hard disk and a solid state hard disk using the same.
近來,快閃記憶體廣泛用於儲存數位化資料,具有許多應用面:快閃記憶體晶片可集結成形成固態硬碟,作為筆記型電腦的主要部件,或製成可攜式儲存裝置,如隨身碟;一顆單一快閃記憶體晶片也可被封裝形成micro SD記憶卡,插入智慧型手機中用來記錄資料。以固態硬碟為例,相較於應傳統硬碟,固態硬碟具有防震、小尺寸、低散熱及快速讀寫等優點。雖然傳統硬碟比固態硬碟有較高的位元成本比,但兩者差異正在縮小中。固態硬碟正取代傳統硬碟,成為儲存設備的主流。 Recently, flash memory is widely used for storing digital data, and has many applications: flash memory chips can be assembled into solid-state hard disks, as a main component of a notebook computer, or as a portable storage device, such as A flash drive; a single flash memory chip can also be packaged to form a micro SD memory card that can be inserted into a smart phone for recording data. Taking a solid-state hard disk as an example, a solid-state hard disk has the advantages of shockproof, small size, low heat dissipation, and fast read and write compared to a conventional hard disk. Although traditional hard drives have a higher bit cost ratio than solid state drives, the difference is shrinking. Solid-state hard drives are replacing traditional hard drives and become the mainstream of storage devices.
在固態硬碟或其它相似的儲存設備中,映射表用來達到讀/寫的特性。通常情況下,映射表非常大,整張或部 分映射表用來執行讀出或寫入的任務。因而,實際上需要儲存整張或部分映射表到一個DRAM模組中,以快速回應讀/寫指令。在DRAM模組初始化下載整張或部分映射表運作前,整張映射表儲存在固態硬碟的快閃記憶體單元(頁或區塊)中。固態硬碟控制器通常與DRAM模組一同設計及製造,DRAM模組的儲存容量約為固態硬碟中全部快閃記憶體的1/1000。舉例來說,如果固態硬碟的容量為512GB,那麼固態硬碟控制器的DRAM模組應不小於512MB。以往,固態硬碟的容量不大,需要的DRAM模組也不大。DRAM模組的成本不顯著。然而隨著固態硬碟容量快速增加,DRAM模組的成本變成了一個問題。 In solid state drives or other similar storage devices, mapping tables are used to achieve read/write characteristics. Usually, the mapping table is very large, whole or The sub-map is used to perform read or write tasks. Therefore, it is actually necessary to store an entire or partial mapping table into a DRAM module to quickly respond to read/write instructions. The entire mapping table is stored in the flash memory unit (page or block) of the solid state drive before the DRAM module initializes the download of the entire or partial mapping table. Solid state hard disk controllers are usually designed and manufactured together with DRAM modules. The storage capacity of DRAM modules is about 1/1000 of that of all flash memory in solid state drives. For example, if the capacity of the solid state drive is 512 GB, then the DRAM module of the solid state drive controller should be no less than 512 MB. In the past, the capacity of solid-state hard disks was not large, and the DRAM modules required were not large. The cost of DRAM modules is not significant. However, as the capacity of solid state hard disks increases rapidly, the cost of DRAM modules becomes a problem.
本發明可為前述問題提出解決方案。 The present invention can provide a solution to the aforementioned problems.
本段文字提取和編譯本發明的某些特點。其他特點將被揭露於後續段落中。其目的在涵蓋附加的申請專利範圍之精神和範圍中,各式的修改和類似的排列。 This paragraph of text extracts and compiles certain features of the present invention. Other features will be revealed in subsequent paragraphs. The intention is to cover various modifications and similar arrangements in the spirit and scope of the appended claims.
為了解決前述問題,本發明揭露一種減少固態硬碟中DRAM使用的方法,該方法包含步驟:A.提供一參照表於一固態硬碟的一DRAM模組中,其中該參照表具有固態硬碟的非揮發性記憶體單元中一映射表的複數個子群的實體位址,其中該映射表具有映射資料,每一映射資料用以映射一邏輯位址至該固態硬碟的一非揮發性記憶體單元的一對應實體位址; 每一子群包含所有映射資料的一部分;B.提供一邏輯對應實體位址表於該固態硬碟的DRAM模組中,其中該邏輯對應實體位址表儲存複數個邏輯位址及DRAM模組的實體位址,其中DRAM模組的每一實體位址對應一邏輯位址且指向具有對應邏輯位址的映射資料之一子群;C.接收一命令,該命令來自固態硬碟的主機,用以對非揮發性記憶體單元的一目標邏輯位址進行存取;D.確認是否對應該目標邏輯位址的DRAM模組的一實體位址儲存於該邏輯對應實體位址表中;E.如果步驟D的結果為是,使用該子群中的映射資料以執行該命令,或如果步驟D的結果為否,將包含該目標邏輯位址的映射資料的一對應子群經該參照表由該映射表複製到該DRAM模組中,以執行該命令;及F.增加該DRAM模組的一目標實體位址到該邏輯對應實體位址表中,該目標邏輯位址的映射資料儲存於該目標實體位址,以便該目標邏輯位址能對應到該目標實體位址。 In order to solve the foregoing problems, the present invention discloses a method for reducing the use of DRAM in a solid state hard disk, the method comprising the steps of: A. providing a reference table in a DRAM module of a solid state hard disk, wherein the reference table has a solid state hard disk a physical address of a plurality of subgroups of a mapping table in a non-volatile memory unit, wherein the mapping table has mapping data, and each mapping data is used to map a logical address to a non-volatile memory of the solid state hard disk a corresponding physical address of the body unit; Each subgroup contains a portion of all mapping data; B. provides a logical corresponding physical address table in the DRAM module of the solid state hard disk, wherein the logical corresponding physical address table stores a plurality of logical addresses and DRAM modules a physical address, wherein each physical address of the DRAM module corresponds to a logical address and points to a subgroup of mapping data having a corresponding logical address; C. receives a command from the host of the solid state hard disk, For accessing a target logical address of the non-volatile memory unit; D. confirming whether a physical address of the DRAM module corresponding to the target logical address is stored in the logical corresponding entity address table; If the result of step D is yes, the mapping data in the subgroup is used to execute the command, or if the result of step D is no, a corresponding subgroup of the mapping material containing the target logical address is passed through the reference table. Copying from the mapping table to the DRAM module to execute the command; and F. adding a target entity address of the DRAM module to the logical corresponding entity address table, the mapping data storage of the target logical address On the target Address, so that the target logical addresses correspond to the target entity can address.
該方法可進一步包含一步驟E1於步驟F之前:E1.當該邏輯對應實體位址表達到最大儲存容量時,將所有目標邏輯位址中具有最低優先性的目標邏輯位址自該邏輯對應實體位址表中移除。該優先性由排序臨時資料存取的命中率、依序排列最近存取紀錄,或排序隨意授予權重而設定。 The method may further include a step E1 before the step F: E1. When the logical corresponding physical address is expressed to the maximum storage capacity, the target logical address having the lowest priority among all the target logical addresses is from the logical corresponding entity. Removed from the address table. The priority is set by the hit rate of the sorted temporary data access, the recent access record in order, or the random weighting of the sort.
該方法可進一步包含一步驟B1於步驟B之後:B1.提供一子群位址至邏輯位址表於該固態硬碟的DRAM模組中,其 中該子群位址至邏輯位址表為對應子群的映射資料儲存邏輯位址與DRAM模組的實體位址。如果該命令是寫入,該方法進一步包含一步驟E2於步驟F之前:E2.依照該子群位址至邏輯位址表,程式化對應該非揮發性記憶體單元中對應實體位址的資料。 The method may further include a step B1 after the step B: B1. providing a subgroup address to the logical address table in the DRAM module of the solid state hard disk, The subgroup address to logical address table is a mapping data storage logical address of the corresponding subgroup and a physical address of the DRAM module. If the command is a write, the method further includes a step E2 before the step F: E2. programmatically corresponding data corresponding to the physical address in the non-volatile memory unit according to the sub-group address to the logical address table .
最好,該非揮發性記憶體單元可為該固態硬碟中的一快閃記憶體晶片。該快閃記憶體晶片可為NAND快閃記憶體晶片、NOR快閃記憶體晶片,或電荷擷取快閃記憶體晶片。 Preferably, the non-volatile memory unit is a flash memory chip in the solid state hard disk. The flash memory chip can be a NAND flash memory chip, a NOR flash memory chip, or a charge capture flash memory chip.
依照本發明,進一步揭露一種使用上述方法的固態硬碟。該固態硬碟,包含:複數個非揮發性記憶體單元;一DRAM模組;及一控制器,用以於該DRAM模組中創建一參照表,其中該參照表具有該些非揮發性記憶體單元中一映射表的複數個子群的實體位址,其中該映射表具有映射資料,每一映射資料用以映射一邏輯位址至該非揮發性記憶體單元的一對應實體位址;每一子群包含所有映射資料的一部分;創建一邏輯對應實體位址表於該DRAM模組中,其中該邏輯對應實體位址表儲存複數個邏輯位址及DRAM模組的實體位址,其中DRAM模組的每一實體位址對應一邏輯位址且指向儲存對應邏輯位址的映射資料之一子群;接收一命令,該命令來自固態硬碟的主機,用以對非揮發性記憶體單元的一目標邏輯位址進行存取;確認是否對應該目標邏輯位址的DRAM模組的一實體位址儲存於該邏輯對應實體位址表中;如果確認結果 為是,使用該子群中的映射資料以執行該命令;如果確認結果為否,將包含該目標邏輯位址的映射資料的一對應子群經該參照表由該映射表複製到該DRAM模組中,以執行該命令;及增加該DRAM模組的一目標實體位址到該邏輯對應實體位址表中,該目標邏輯位址的映射資料儲存於該目標實體位址,以便該目標邏輯位址能對應到該目標實體位址。 In accordance with the present invention, a solid state hard disk using the above method is further disclosed. The solid state hard disk includes: a plurality of non-volatile memory cells; a DRAM module; and a controller for creating a reference table in the DRAM module, wherein the reference table has the non-volatile memory a physical address of a plurality of subgroups of a mapping table, wherein the mapping table has mapping data, and each mapping data is used to map a logical address to a corresponding physical address of the non-volatile memory unit; The subgroup includes a portion of all mapping data; creating a logical corresponding physical address table in the DRAM module, wherein the logical corresponding physical address table stores a plurality of logical addresses and physical addresses of the DRAM module, wherein the DRAM module Each physical address of the group corresponds to a logical address and points to a subgroup of mapping data storing the corresponding logical address; receiving a command from the host of the solid state hard disk for the non-volatile memory unit Accessing a target logical address; confirming whether a physical address of the DRAM module corresponding to the target logical address is stored in the logical corresponding physical address table; if the result is confirmed If yes, the mapping data in the subgroup is used to execute the command; if the confirmation result is no, a corresponding subgroup including the mapping material of the target logical address is copied from the mapping table to the DRAM module through the reference table. In the group, to execute the command; and adding a target entity address of the DRAM module to the logical corresponding entity address table, the mapping data of the target logical address is stored in the target entity address, so that the target logic The address can correspond to the target entity address.
最好,控制器可進一步當該邏輯對應實體位址表達到最大儲存容量時,將所有目標邏輯位址中具有最低優先性的目標邏輯位址自該邏輯對應實體位址表中移除。該優先性可由排序臨時資料存取的命中率、依序排列最近存取紀錄,或排序隨意授予權重而設定。該控制器可進一步用以創建一子群位址至邏輯位址表至該DRAM模組中,其中該子群位址至邏輯位址表為對應子群的映射資料儲存邏輯位址與DRAM模組的實體位址。如果該命令是寫入,該控制器進一步用以依照該子群位址至邏輯位址表,程式化對應該非揮發性記憶體單元中對應實體位址的資料。 Preferably, the controller may further remove the target logical address having the lowest priority among all the target logical addresses from the logical corresponding entity address table when the logical corresponding physical address is expressed to the maximum storage capacity. The priority may be set by the hit rate of sorting temporary data accesses, sequentially arranging the most recent access records, or sorting the weights arbitrarily. The controller may be further configured to create a subgroup address to a logical address table to the DRAM module, wherein the subgroup address to the logical address table is a mapping data storage logical address and a DRAM module of the corresponding subgroup The physical address of the group. If the command is a write, the controller is further configured to program the data corresponding to the corresponding physical address in the non-volatile memory unit according to the sub-group address to the logical address table.
最好,該非揮發性記憶體單元可以是該固態硬碟中的一快閃記憶體晶片。該快閃記憶體晶片可以是NAND快閃記憶體晶片、NOR快閃記憶體晶片,或電荷擷取快閃記憶體晶片。 Preferably, the non-volatile memory unit can be a flash memory chip in the solid state hard disk. The flash memory chip can be a NAND flash memory chip, a NOR flash memory chip, or a charge capture flash memory chip.
與傳統固態硬碟相比較,本發明提供的方法與固態硬碟架構不必自快閃記憶體晶片中複製整個映射表到固態硬碟的DRAM模組。因此,DRAM的容量需求可以減少。 Compared with the conventional solid state hard disk, the method and the solid state hard disk architecture provided by the present invention do not have to copy the entire mapping table from the flash memory chip to the DRAM module of the solid state hard disk. Therefore, the capacity requirements of DRAM can be reduced.
10‧‧‧固態硬碟 10‧‧‧ Solid State Drive
100‧‧‧控制器 100‧‧‧ Controller
20‧‧‧主機 20‧‧‧Host
200‧‧‧DRAM模組 200‧‧‧DRAM Module
202‧‧‧儲存空間 202‧‧‧ storage space
204‧‧‧參照表 204‧‧‧reference table
206‧‧‧邏輯對應實體位址表 206‧‧‧Logical Correspondence Address Table
208‧‧‧子群位址至邏輯位址表 208‧‧‧Subgroup Address to Logical Address Table
301‧‧‧第一快閃記憶體晶片 301‧‧‧First flash memory chip
302‧‧‧第二快閃記憶體晶片 302‧‧‧Second flash memory chip
303‧‧‧第三快閃記憶體晶片 303‧‧‧ Third flash memory chip
304‧‧‧第四快閃記憶體晶片 304‧‧‧fourth flash memory chip
305‧‧‧第五快閃記憶體晶片 305‧‧‧ fifth flash memory chip
306‧‧‧第六快閃記憶體晶片 306‧‧‧ sixth flash memory chip
307‧‧‧第七快閃記憶體晶片 307‧‧‧ seventh flash memory chip
308‧‧‧第八快閃記憶體晶片 308‧‧‧ eighth flash memory chip
第1圖為依照本發明的一固態硬碟的方塊示意圖。 Figure 1 is a block diagram of a solid state hard disk in accordance with the present invention.
第2圖顯示一DRAM模組資料結構的例子。 Figure 2 shows an example of a DRAM module data structure.
第3圖為本發明提供方法的步驟流程圖。 Figure 3 is a flow chart showing the steps of the method of the present invention.
本發明將藉由參照下列的實施方式而更具體地描述。 The invention will be more specifically described by reference to the following embodiments.
請參閱第1圖,該圖揭露依照本發明的一固態硬碟10的實施例,該固態硬碟10具有減少DRAM使用的特性。固態硬碟10用來儲存資料以供存取(寫入與讀取)。因此,固態硬碟10可具有數個非揮發性記憶體單元。非揮發性記憶體單元的數目決定於固態硬碟10的容量,而每一非揮發性記憶體單元的儲存容量並無限定。事實上,非揮發性記憶體單元可以是一個快閃記憶體晶片。最好,快閃記憶體晶片可以是NAND快閃記憶體晶片、NOR快閃記憶體晶片,或電荷擷取快閃記憶體晶片,本發明並未限定之。 Referring to Fig. 1, there is shown an embodiment of a solid state hard disk 10 having characteristics for reducing DRAM use in accordance with the present invention. The solid state drive 10 is used to store data for access (write and read). Therefore, the solid state hard disk 10 can have a plurality of non-volatile memory cells. The number of non-volatile memory cells is determined by the capacity of the solid state hard disk 10, and the storage capacity of each non-volatile memory cell is not limited. In fact, the non-volatile memory unit can be a flash memory chip. Preferably, the flash memory chip may be a NAND flash memory chip, a NOR flash memory chip, or a charge extraction flash memory chip, which is not limited in the present invention.
在本實施例中,固態硬碟10包含8個快閃記憶體晶片(一第一快閃記憶體晶片301、一第二快閃記憶體晶片302、 一第三快閃記憶體晶片303、一第四快閃記憶體晶片304、一第五快閃記憶體晶片305、一第六快閃記憶體晶片306、一第七快閃記憶體晶片307及一第八快閃記憶體晶片308)、一DRAM模組200及一控制器100。控制器100有許多功能。依照本發明,主要的功能為創建一參照表204於DRAM模組200(參照表204具有該些快閃記憶體晶片中一映射表的數個子群的實體位址;該映射表具有映射資料,每一映射資料用以映射一邏輯位址至該快閃記憶體晶片的一對應實體位址;每一子群包含所有映射資料的一部分)中、創建一邏輯對應實體位址表206於DRAM模組200(該邏輯對應實體位址表儲存數個邏輯位址及DRAM模組200的實體位址;DRAM模組200的每一實體位址對應一邏輯位址且指向儲存對應邏輯位址的映射資料之一子群)中、接收一命令,該命令來自固態硬碟10的一主機20,用以對快閃記憶體晶片的一目標邏輯位址進行存取、確認是否對應目標邏輯位址的DRAM模組200的一實體位址儲存於邏輯對應實體位址表206中、如果確認結果為是,使用該子群中的映射資料以執行該命令、如果確認結果為否,將包含該目標邏輯位址的映射資料的一對應子群經該參照表204由映射表複製到該DRAM模組200中,以執行該命令、增加DRAM模組200的一目標實體位址到邏輯對應實體位址表206中,該目標邏輯位址的映射資料儲存於該目標實體位址,以便該目標邏輯位址能對應到該目標實體位址、當該邏輯對應 實體位址表達到最大儲存容量時,將所有目標邏輯位址中具有最低優先性(該優先性可由排序臨時資料存取的命中率、依序排列最近存取紀錄,或排序隨意授予權重而設定)的目標邏輯位址自邏輯對應實體位址表206中移除、創建一子群位址至邏輯位址表208於DRAM模組200中(子群位址至邏輯位址表208為對應子群的映射資料儲存邏輯位址與DRAM模組200的實體位址)及如果該命令是寫入,依照子群位址至邏輯位址表208,程式化對應該些快閃記憶體晶片中對應實體位址的資料。一種減少固態硬碟10中DRAM模組200使用量的方法基本上藉由控制器100而實現。因此,控制器100與固態硬碟10的運作(使用的功能)將於不同場景下的方法說明,詳細地描述。 In this embodiment, the solid state hard disk 10 includes eight flash memory chips (a first flash memory chip 301, a second flash memory chip 302, a third flash memory chip 303, a fourth flash memory chip 304, a fifth flash memory chip 305, a sixth flash memory chip 306, a seventh flash memory chip 307, and An eighth flash memory chip 308), a DRAM module 200 and a controller 100. The controller 100 has many functions. According to the present invention, the main function is to create a reference table 204 in the DRAM module 200 (refer to the table 204 having the physical addresses of a plurality of subgroups of a mapping table in the flash memory chips; the mapping table has mapping data, Each mapping data is used to map a logical address to a corresponding physical address of the flash memory chip; each subgroup contains a portion of all mapping data, and a logical corresponding physical address table 206 is created in the DRAM module. Group 200 (the logical corresponding physical address table stores a plurality of logical addresses and physical addresses of the DRAM module 200; each physical address of the DRAM module 200 corresponds to a logical address and points to a map for storing a corresponding logical address In a subgroup of data, a command is received from a host 20 of the solid state hard disk 10 for accessing a target logical address of the flash memory chip to confirm whether it corresponds to a target logical address. A physical address of the DRAM module 200 is stored in the logical corresponding entity address table 206. If the confirmation result is yes, the mapping data in the subgroup is used to execute the command, and if the confirmation result is no, the target logic is included. A corresponding subgroup of the mapping data of the address is copied from the mapping table to the DRAM module 200 via the reference table 204 to execute the command, and a target entity address of the DRAM module 200 is added to the logical corresponding entity address table. 206, the mapping data of the target logical address is stored in the target entity address, so that the target logical address can correspond to the target physical address, when the logical correspondence When the physical address is expressed to the maximum storage capacity, the lowest priority among all the target logical addresses (the priority can be set by the hit rate of the sorted temporary data access, the latest access record is sequentially arranged, or the sort is randomly given the weight) The target logical address is removed from the logical corresponding entity address table 206, and a subgroup address is created into the logical address table 208 in the DRAM module 200 (the subgroup address to the logical address table 208 is the corresponding sub The mapping data storage logical address of the group and the physical address of the DRAM module 200) and if the command is written, according to the sub-group address to the logical address table 208, the corresponding corresponding flash memory chips are programmed. Information on the physical address. A method of reducing the amount of use of the DRAM module 200 in the solid state hard disk 10 is basically implemented by the controller 100. Therefore, the operation of the controller 100 and the solid state hard disk 10 (function of use) will be described in detail in a different method.
請見第3圖,該圖為本發明所提供方法的步驟流程圖。第一步驟是提供該參照表204於固態硬碟10的DRAM模組200中(S01)。很清楚的是,因為剛開機時DRAM模組200中沒有留存資料,參照表204必須被創建。參照表204固態硬碟10的快閃記憶體晶片中之映射表的數個子群的實體位址,該映射表用來映射邏輯位址到固態硬碟10的快閃記憶體晶片的對應實體位址,相當龐大。因此,該映射表通常拆散成許多的子群,並儲存到數個位址上(快閃記憶體晶片的實體位址)該映射表具有映射資料,每一映射資料用以映射一邏輯位址至該固態硬碟的一非揮發性記憶體單元的一對應實體位址;每 一子群包含所有映射資料的一部分。為了對此有更佳的理解,請見第2圖。第2圖顯示DRAM模組200資料結構的一個例子。參照表204具有兩個區塊。其中一個紀錄固態硬碟10快閃記憶體晶片中映射表的實體位址(第八快閃記憶體晶片308的區塊0頁1、第八快閃記憶體晶片308的區塊0頁2、第八快閃記憶體晶片308的區塊0頁3、第八快閃記憶體晶片308的區塊1頁1與第八快閃記憶體晶片308的區塊1頁2),而另一個指出每一子群映射資料的邏輯位址。舉例來說,“1-10”指的是一第一子群之映射資料的邏輯位址1到邏輯位址10。第八快閃記憶體晶片308的區塊0頁2儲存映射資料的邏輯位址1到邏輯位址10。當然,參照表204的排列可以有一子群中的多個邏輯位址,也可以在每一子群中僅有一個邏輯位址,本發明並未限定之。 Please refer to FIG. 3, which is a flow chart of the steps of the method provided by the present invention. The first step is to provide the reference table 204 in the DRAM module 200 of the solid state hard disk 10 (S01). It is clear that the reference table 204 must be created because there is no data left in the DRAM module 200 just after booting. Referring to the physical addresses of the plurality of subgroups of the mapping table in the flash memory chip of the solid state hard disk 10, the mapping table is used to map the logical address to the corresponding physical bit of the flash memory chip of the solid state hard disk 10. The address is quite large. Therefore, the mapping table is usually broken up into a number of subgroups and stored in a number of addresses (the physical address of the flash memory chip). The mapping table has mapping data, and each mapping data is used to map a logical address. a corresponding physical address to a non-volatile memory unit of the solid state hard disk; A subgroup contains a portion of all mapping data. For a better understanding of this, please see Figure 2. Figure 2 shows an example of the data structure of the DRAM module 200. Reference table 204 has two blocks. One of the physical addresses of the mapping table in the solid state hard disk 10 flash memory chip is recorded (block 0 of the eighth flash memory chip 308, block 0 of the eighth flash memory chip 308, page 2, Block 0 of the eighth flash memory chip 308, block 1 of the eighth flash memory chip 308, and block 1 of the eighth flash memory chip 308 (page 2), and the other indicates The logical address of each subgroup mapping data. For example, "1-10" refers to logical address 1 to logical address 10 of the mapping material of a first subgroup. The block 0 page 2 of the eighth flash memory chip 308 stores the logical address 1 of the mapped data to the logical address 10. Of course, the arrangement of the reference table 204 may have a plurality of logical addresses in a subgroup, or only one logical address in each subgroup, which is not limited by the present invention.
接著,提供該邏輯對應實體位址表206於固態硬碟10的DRAM模組200中(S02)。邏輯對應實體位址表206儲存數個邏輯位址與DRAM模組200的實體位址。在第2圖中,一邏輯位址1對應實體位址0x80000001,一邏輯位址12對應實體位址0x80000002。DRAM模組200的0x80000001紀錄映射資料的邏輯位址1。DRAM模組200的0x80000002紀錄映射資料的邏輯位址12。邏輯位址1屬於第一子群,而邏輯位址12屬於映射表的一第二子群。DRAM模組200的每一實體位址對應一個邏輯位址,並指向具有對應邏輯位址的映射資料之一子群。一儲存空間202包含邏輯對應實體位址表206參照的DRAM模組200之 實體位址,並用來暫時儲存映射資料。此時,儲存空間202具有映射資料1(MD1)與映射資料2(MD2),以粗斜體顯示的映射資料3將於稍後提供。相似地,邏輯對應實體位址表206需要被創建,因為當DRAM模組200通電時它並不存在。 Next, the logical corresponding physical address table 206 is provided in the DRAM module 200 of the solid state hard disk 10 (S02). The logical corresponding physical address table 206 stores a plurality of logical addresses and physical addresses of the DRAM module 200. In FIG. 2, a logical address 1 corresponds to a physical address of 0x80000001, and a logical address 12 corresponds to a physical address of 0x80000002. The 0x80000001 of the DRAM module 200 records the logical address 1 of the mapped data. The 0x80000002 of the DRAM module 200 records the logical address 12 of the mapping material. Logical address 1 belongs to the first subgroup, and logical address 12 belongs to a second subgroup of the mapping table. Each physical address of the DRAM module 200 corresponds to a logical address and points to a subgroup of mapping data having a corresponding logical address. A storage space 202 includes a DRAM module 200 referenced by a logical corresponding physical address table 206. The physical address and used to temporarily store the mapping data. At this time, the storage space 202 has the mapping material 1 (MD1) and the mapping material 2 (MD2), and the mapping material 3 displayed in bold italics will be provided later. Similarly, the logically corresponding physical address table 206 needs to be created because it does not exist when the DRAM module 200 is powered.
第三步驟為接收一命令,該命令來自固態硬碟10的主機20,用以對非揮發性記憶晶片的一目標邏輯位址進行存取(S03)。存取指的是寫入與讀出。對某些步驟來說,寫入與讀出視為相同,其差異會於運作例子中指出。目標邏輯位址的映射資料可以在邏輯對應實體位址表206中找到,例如0x80000001與0x80000002。目標邏輯位址的映射資料可能不會留存於邏輯對應實體位址表206中。如果一個目標邏輯位址,23,要進行存取,因為它不在邏輯對應實體位址表206中,所以要執行進一步的步驟。因此,必須確認是否對應目標邏輯位址的DRAM模組200實體位址儲存在邏輯對應實體位址表206中(S04)。如果步驟S04的結果為是,只需使用該子群中的映射資料以執行該命令(S05)。如果步驟S04的結果為否,將包含該目標邏輯位址的映射資料的一對應子群經該參照表204由該映射表複製到DRAM模組200中,以執行該命令(S06)。也就是說,被參照表204參照的映射表發揮作用,找出對應目標邏輯位址,23,的固態硬碟10的快閃記憶體晶片的實體位址。依照參照表204,固態硬碟10的快閃記憶體晶片的實體位址是在第八快閃記憶體晶片308的區塊0頁3。為了存取目標邏 輯位址,23,控制器100複製映射資料3(MD3)到儲存空間202。最後,如果執行複製,就增加DRAM模組200的一目標實體位址到邏輯對應實體位址表206中,該目標邏輯位址的映射資料儲存於該目標實體位址,以便未來目標邏輯位址能對應到該目標實體位址(S07)。 The third step is to receive a command from the host 20 of the solid state drive 10 for accessing a target logical address of the non-volatile memory chip (S03). Access refers to writing and reading. For some steps, write and read are considered the same, and the differences are noted in the operational examples. The mapping material of the target logical address can be found in the logical corresponding entity address table 206, such as 0x80000001 and 0x80000002. The mapping material of the target logical address may not remain in the logical corresponding entity address table 206. If a target logical address, 23, is to be accessed because it is not in the logical corresponding entity address table 206, further steps are performed. Therefore, it must be confirmed whether the DRAM module 200 physical address corresponding to the target logical address is stored in the logical corresponding entity address table 206 (S04). If the result of step S04 is YES, it is only necessary to use the mapping material in the subgroup to execute the command (S05). If the result of the step S04 is NO, a corresponding subgroup of the mapping material including the target logical address is copied from the reference table 204 to the DRAM module 200 via the reference table 204 to execute the command (S06). That is, the mapping table referenced by the reference table 204 functions to find the physical address of the flash memory chip of the solid state hard disk 10 corresponding to the target logical address. According to the reference table 204, the physical address of the flash memory chip of the solid state hard disk 10 is the block 0 page 3 of the eighth flash memory chip 308. In order to access the target logic The address, 23, the controller 100 copies the mapping material 3 (MD3) to the storage space 202. Finally, if copying is performed, a target entity address of the DRAM module 200 is added to the logical corresponding entity address table 206, and the mapping data of the target logical address is stored in the target entity address for future target logical address. Can correspond to the target entity address (S07).
步驟S07是為了以新的映射資料對目標邏輯位址更新邏輯對應實體位址表206,而在命令接收前,該目標邏輯位址並不在邏輯對應實體位址表206裡。在本實施例中,模組200的實體位址與邏輯對應實體位址表206的對應邏輯位址有3組。雖然在其它的實施例中可能有更多組數,其數量不受限制。當邏輯對應實體位址表206達到最大儲存容量但持續接收到要對新目標邏輯位址存取的命令時,該方法需要進一步的步驟。在其它實施例中,當邏輯對應實體位址表206達到最大儲存容量時,將所有目標邏輯位址中具有最低優先性的目標邏輯位址自邏輯對應實體位址表206中移除。這步驟可以加在步驟S07之前。也就是說以優先性來判定,最少使用或最不重要的目標邏輯位址應自邏輯對應實體位址表206中移除。舉例來說,優先性可以由排序臨時資料存取的命中率(移除最小命中率的臨時資料的目標邏輯位址)來設定,也可以依序排列最近存取紀錄(移除最少被存取的臨時資料的目標邏輯位址)來設定。甚至,優先性可由排序隨意授予每一目標邏輯位址的權重來決定。 Step S07 is for updating the logical corresponding entity address table 206 to the target logical address with the new mapping data, and the target logical address is not in the logical corresponding entity address table 206 before the command is received. In this embodiment, the physical address of the module 200 and the corresponding logical address of the logical corresponding physical address table 206 have three groups. Although there may be more groups in other embodiments, the number is not limited. This method requires further steps when the logical corresponding entity address table 206 reaches the maximum storage capacity but continues to receive commands to access the new target logical address. In other embodiments, when the logically corresponding physical address table 206 reaches the maximum storage capacity, the target logical address with the lowest priority among all of the target logical addresses is removed from the logical corresponding physical address table 206. This step can be added before step S07. That is to say, the least used or least important target logical address should be removed from the logical corresponding entity address table 206 by priority. For example, the priority can be set by the hit rate of the sorted temporary data access (the target logical address of the temporary data with the minimum hit rate removed), or the most recent access record can be sorted in order (the least accessed is removed). The target logical address of the temporary data is set. Even, the priority can be determined by the weight of the random logical address assigned to each target.
如上所述,依照本發明,存取可包含寫入與讀取。如果該命令是個寫入命令,在步驟S02後需要進一步的步驟:提供子群位址至邏輯位址表208於固態硬碟10的DRAM模組200中。子群位址至邏輯位址表208為對應子群的映射資料儲存邏輯位址與DRAM模組200的實體位址。如第2圖所示,子群位址至邏輯位址表208原來儲存邏輯位址1與邏輯位址12,以及子群1與子群2(MD1與MD2)的映射資料。此時,新的邏輯位址3與對應子群3的DRAM模組200的實體位址加到該子群位址至邏輯位址表208中。子群位址至邏輯位址表208的功能是加速程式化資料到快閃記憶體晶片的速度。程式化可以是步驟S07前的獨立步驟:程式化對應到快閃記憶體晶片的對應實體位址的資料是依照子群位址至邏輯位址表204。舉例來說,如果邏輯位址23的內容改變了,改變的資料將被程式化到一個新的實體位址,第三快閃記憶體晶片303的區塊0,頁0到頁3。用來儲存原始資料的前一個實體位址能是第三快閃記憶體晶片303的區塊15,頁0到頁3。新資料的正確實體位址永遠由映射表追蹤及記錄。 As noted above, in accordance with the present invention, access can include both write and read. If the command is a write command, a further step is required after step S02: providing the subgroup address to the logical address table 208 in the DRAM module 200 of the solid state drive 10. The sub-group address to logical address table 208 is a mapping data storage logical address of the corresponding sub-group and a physical address of the DRAM module 200. As shown in FIG. 2, the subgroup address to logical address table 208 originally stores logical address 1 and logical address 12, and mapping data of subgroup 1 and subgroup 2 (MD1 and MD2). At this time, the new logical address 3 and the physical address of the DRAM module 200 of the corresponding subgroup 3 are added to the subgroup address to the logical address table 208. The function of the subgroup address to logical address table 208 is to speed up the programming of the data to the flash memory chip. Stylization may be a separate step prior to step S07: the material that is programmed to correspond to the corresponding physical address of the flash memory chip is in accordance with the subgroup address to logical address table 204. For example, if the contents of logical address 23 are changed, the changed data will be programmed to a new physical address, block 0, page 0 to page 3 of third flash memory chip 303. The previous physical address used to store the original material can be block 15, page 0 through page 3 of the third flash memory chip 303. The correct physical address of the new data is always tracked and recorded by the mapping table.
與傳統固態硬碟相比較,本發明提供的方法與固態硬碟架構不必自快閃記憶體晶片中複製整個映射表到固態硬碟的DRAM模組。因此,DRAM的容量需求可以減少。固態硬碟的成本也可以降低。同時,因為參照表204的使用及快閃記 憶體晶片I/O能力的增加,定位存取命令所要求資料的實體位址之速度,並不會與使用DRAM模組的速度相去太多。 Compared with the conventional solid state hard disk, the method and the solid state hard disk architecture provided by the present invention do not have to copy the entire mapping table from the flash memory chip to the DRAM module of the solid state hard disk. Therefore, the capacity requirements of DRAM can be reduced. The cost of solid state drives can also be reduced. At the same time, because of the use of reference table 204 and flash flash With the increase in I/O capability of the memory chip, the speed of the physical address of the data required to locate the access command does not go too far with the speed of using the DRAM module.
雖然本發明已以實施方式揭露如上,然其並非用以限定本發明,任何所屬技術領域中具有通常知識者,在不脫離本發明之精神和範圍內,當可作些許之更動與潤飾,因此本發明之保護範圍當視後附之申請專利範圍所界定者為準。 Although the present invention has been disclosed in the above embodiments, it is not intended to limit the invention, and those skilled in the art can make some modifications and refinements without departing from the spirit and scope of the invention. The scope of the invention is defined by the scope of the appended claims.
Claims (14)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW105122037A TWI574153B (en) | 2016-07-13 | 2016-07-13 | Method for reducing use of dram in ssd and the ssd using the same |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW105122037A TWI574153B (en) | 2016-07-13 | 2016-07-13 | Method for reducing use of dram in ssd and the ssd using the same |
Publications (2)
Publication Number | Publication Date |
---|---|
TWI574153B true TWI574153B (en) | 2017-03-11 |
TW201802681A TW201802681A (en) | 2018-01-16 |
Family
ID=58766181
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW105122037A TWI574153B (en) | 2016-07-13 | 2016-07-13 | Method for reducing use of dram in ssd and the ssd using the same |
Country Status (1)
Country | Link |
---|---|
TW (1) | TWI574153B (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130205065A1 (en) * | 2012-02-02 | 2013-08-08 | Lsi Corporation | Methods and structure for an improved solid-state drive for use in caching applications |
TW201337606A (en) * | 2012-03-08 | 2013-09-16 | Chih-Pin Tang | User apparatus, system and method for dynamically reclassifying and retrieving target information object |
-
2016
- 2016-07-13 TW TW105122037A patent/TWI574153B/en active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130205065A1 (en) * | 2012-02-02 | 2013-08-08 | Lsi Corporation | Methods and structure for an improved solid-state drive for use in caching applications |
TW201337606A (en) * | 2012-03-08 | 2013-09-16 | Chih-Pin Tang | User apparatus, system and method for dynamically reclassifying and retrieving target information object |
Also Published As
Publication number | Publication date |
---|---|
TW201802681A (en) | 2018-01-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11967369B2 (en) | Lifetime mixed level non-volatile memory system | |
EP3607449B1 (en) | Garbage collection | |
US8055873B2 (en) | Data writing method for flash memory, and controller and system using the same | |
US8185778B2 (en) | Flash management using separate metadata storage | |
US10108342B2 (en) | Method for reducing use of DRAM in SSD and the SSD using the same | |
US8650379B2 (en) | Data processing method for nonvolatile memory system | |
US8533385B2 (en) | Method for preventing read-disturb happened in non-volatile memory and controller thereof | |
US10437512B2 (en) | Techniques for non-volatile memory page retirement | |
US20190163386A1 (en) | Cell block allocation for hybrid dual write | |
KR20100065786A (en) | Cache synchronization method and system for fast power-off | |
TWI523030B (en) | Method for managing buffer memory, memory controllor, and memory storage device | |
TW201941208A (en) | Memory management method and storage controller | |
KR102589609B1 (en) | Snapshot management in partitioned storage | |
US20110087828A1 (en) | Method for enhancing performance of accessing a flash memory, and associated memory device and controller thereof | |
US20090182932A1 (en) | Method for managing flash memory blocks and controller using the same | |
CN107643987B (en) | Method for reducing DRAM (dynamic random Access memory) usage in solid state disk and solid state disk using same | |
TWI574153B (en) | Method for reducing use of dram in ssd and the ssd using the same | |
TWI823649B (en) | Control method of flash memory controller, flash memory controller, and electronic device | |
TWI587212B (en) | High-performance solid state disk and operating method thereof |