TWI475387B - Memory control method and memory control circuit thereof - Google Patents

Memory control method and memory control circuit thereof Download PDF

Info

Publication number
TWI475387B
TWI475387B TW102118632A TW102118632A TWI475387B TW I475387 B TWI475387 B TW I475387B TW 102118632 A TW102118632 A TW 102118632A TW 102118632 A TW102118632 A TW 102118632A TW I475387 B TWI475387 B TW I475387B
Authority
TW
Taiwan
Prior art keywords
memory
comparison table
read
address
temporary storage
Prior art date
Application number
TW102118632A
Other languages
Chinese (zh)
Other versions
TW201405311A (en
Inventor
Kuo Hua Yuan
Yung Feng Chiu
Hsiu Che Chao
Original Assignee
Jmicron Technology Corp
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 Jmicron Technology Corp filed Critical Jmicron Technology Corp
Priority to US13/944,887 priority Critical patent/US20140025921A1/en
Publication of TW201405311A publication Critical patent/TW201405311A/en
Application granted granted Critical
Publication of TWI475387B publication Critical patent/TWI475387B/en

Links

Description

記憶體控制方法及記憶體控制電路Memory control method and memory control circuit

本發明所揭露的實施例係相關於記憶體控制,尤指一種頁面等級(page-level)的記憶體控制方法以及相關電路。The embodiments disclosed herein relate to memory control, and more particularly to a page-level memory control method and associated circuitry.

近年來固態硬碟(Solid State Drive,SSD)(例如反及閘快閃記憶體(NAND flash))逐漸鞏固其在儲存媒介市場中的地位,並且廣泛地被使用在個人電腦以及各種行動裝置之中。相較於傳統硬碟,固態硬碟不需要任何機械元件,沒有搜尋及轉動所導致的延遲,因此較為省電,然而快閃記憶體的效能會受到資料負載的影響,例如對固態硬碟進行隨機讀寫和連續讀寫具有很大的效能差異。其中,快閃記憶體轉換層(Flash Translation Layer,FTL)負責了虛擬位址和實體位址之間的轉換,因此快閃記憶體轉換層的設計對於固態硬碟的效能來說便相當重要。In recent years, solid state drives (SSDs) (such as NAND flash) have gradually consolidated their position in the storage media market and are widely used in personal computers and various mobile devices. in. Compared with the traditional hard disk, the solid state hard disk does not need any mechanical components, and there is no delay caused by searching and rotating, so it is more power-saving. However, the performance of the flash memory is affected by the data load, for example, the solid state hard disk. Random read and write and continuous read and write have great performance differences. Among them, the Flash Translation Layer (FTL) is responsible for the conversion between the virtual address and the physical address, so the design of the flash memory conversion layer is very important for the performance of the solid state drive.

傳統上,快閃記憶體轉換層當中會使用一個隨機存取記憶體(random access memory,RAM)來記錄虛擬位址和實體位址之間的轉換對照表,然而,隨著快閃記憶體的容量需求越來越高,相對地,快閃記憶體轉換層當中的隨機存取記憶體大小也會跟著增加,尤其是當快閃記憶體轉換層採用的是單位較為細小的頁面等級(page-level)位址對照方式時,會快速地增加產品體積以及製造成本。因此,為了能夠在固態硬碟系統中降低對隨機存取記憶體的需求,又要能夠兼顧固態硬碟進行隨機讀寫時的效能,便需要一種創新的頁面等級記憶體控制方法。Traditionally, a random access memory (RAM) is used in the flash memory translation layer to record the conversion table between the virtual address and the physical address. However, with the flash memory The capacity requirements are getting higher and higher. In contrast, the size of the random access memory in the flash memory conversion layer will also increase, especially when the flash memory conversion layer uses a relatively small page level (page- Level) When the address is compared, it will increase the product volume and manufacturing cost quickly. Therefore, in order to reduce the demand for random access memory in a solid state hard disk system, and to be able to balance the performance of a solid state hard disk for random reading and writing, an innovative page level memory control method is needed.

本發明的目的之一在於提供一種頁面等級記憶體控制方法以及相關電路來改善上述的問題。One of the objects of the present invention is to provide a page level memory control method and related circuitry to improve the above problems.

根據本發明之第一實施例,揭露一種記憶體控制方法。該記憶體控制方法包含有:將具有一邏輯位址的一寫入資料寫入至一寫入資料暫存記憶體中;產生該寫入資料之該邏輯位址相對應於一主要記憶體中的一實體位址的一寫入位址對照表,並將其寫入至一快取資料對照表寫入暫存記憶體中;將該寫入資料依據該寫入位址對照表寫入至該主要記憶體;以及若該快取資料對照表寫入暫存記憶體的可用儲存空間達到一預定臨界值,則將該快取資料對照表寫入暫存記憶體中之該寫入位址對照表寫入至該主要記憶體中,並將相對應的一主要記憶體寫入位址對照表記錄於一整體對照表暫存記憶體中。According to a first embodiment of the present invention, a memory control method is disclosed. The memory control method includes: writing a write data having a logical address to a write data temporary storage memory; and generating the logical address of the write data corresponding to a main memory a write address comparison table of a physical address, and write it to a cache data comparison table to be written into the temporary storage memory; the write data is written according to the write address comparison table to The main memory; and if the available storage space of the cache data comparison table written to the temporary storage memory reaches a predetermined threshold, the cache data comparison table is written into the write address in the temporary storage memory. The comparison table is written into the main memory, and a corresponding primary memory write address comparison table is recorded in a global comparison table temporary storage memory.

根據本發明之第二實施例,揭露一種記憶體控制方法。該記憶體控制方法包含有:在一快取資料對照表寫入暫存記憶體中搜尋所欲讀取的一讀取資料之一邏輯位址相對應於一主要記憶體中的一實體位址的一讀取位址對照表;若該讀取位址對照表存在於該快取資料對照表寫入暫存記憶體中,則將具有該實體位址之該讀取資料從該主要記憶體中讀取出來,並寫入至一讀取資料暫存記憶體中。According to a second embodiment of the present invention, a memory control method is disclosed. The memory control method includes: searching a cache data in a temporary memory to search for one of the read data to be read, and the logical address corresponding to a physical address in a main memory a read address comparison table; if the read address comparison table is present in the cache data comparison table and written in the temporary storage memory, the read data having the physical address is from the primary memory It is read out and written to a read data temporary memory.

根據本發明之第三實施例,揭露一種記憶體控制電路。該記憶體控制電路包含有:一寫入資料暫存記憶體、一快取資料對照表寫入暫存記憶體以及一整體對照表暫存記憶體。其中該寫入資料暫存記憶體係用來儲存具有一邏輯位址的一寫入資料;該快取資料對照表寫入暫存記憶體係用來儲存該寫入資料之該邏輯位址相對應於一主要記憶體中的一實體位址的一寫入位址對照表;以及該整體對照表暫存記憶體係用來在該快取資料對照表寫入暫 存記憶體的可用儲存空間達到一預定臨界值時,儲存被寫入至該主要記憶體中之該快取資料對照表寫入暫存記憶體中之該寫入位址對照表的相對應的一主要記憶體寫入位址對照表。According to a third embodiment of the present invention, a memory control circuit is disclosed. The memory control circuit includes: a write data temporary storage memory, a cache data comparison table write to the temporary storage memory, and a global comparison table temporary storage memory. The write data temporary storage memory system is configured to store a write data having a logical address; the cache data comparison table is written to the temporary memory system for storing the logical data address of the write data corresponding to the a write address comparison table of a physical address in a primary memory; and the overall comparison table temporary storage memory system is used to write the cache data comparison table When the available storage space of the memory reaches a predetermined threshold, storing the cache data read table written in the main memory into the corresponding address of the write address comparison table in the temporary memory A primary memory write address comparison table.

根據本發明之第四實施例,揭露一種記憶體控制電路。該記憶體控制電路包含有:一快取資料對照表讀取暫存記憶體、一讀取資料暫存記憶體以及一整體對照表暫存記憶體。其中該快取資料對照表讀取暫存記憶體係用來儲存所欲讀取的一讀取資料之一邏輯位址相對應於一主要記憶體中的一實體位址的一讀取位址對照表;該讀取資料暫存記憶體係用來儲存從該主要記憶體中所讀取出來的具有該實體位址之該讀取資料;以及該整體對照表暫存記憶體係用來從該主要記憶體中找出該讀取位址對照表。According to a fourth embodiment of the present invention, a memory control circuit is disclosed. The memory control circuit includes: a cache data comparison table read temporary storage memory, a read data temporary storage memory, and a global comparison table temporary storage memory. The cache data comparison table reads a read address of a read data stored in the temporary memory system for storing a read data corresponding to a physical address in a main memory. a read data temporary storage memory system for storing the read data having the physical address read from the primary memory; and the overall comparison table temporary storage memory system for using the primary memory Find the read address comparison table in the body.

本發明在不過度影響隨機資料的讀寫效能的情況下,使用主要記憶體中的一小部分空間來取代傳統的暫存記憶體,一方面可增加硬體的彈性,另一方面又可大幅地減少了成本。The invention replaces the traditional temporary memory by using a small part of the space in the main memory without excessively affecting the read/write performance of the random data, and on the other hand, can increase the elasticity of the hardware, and on the other hand, can greatly increase The ground has reduced costs.

200~204‧‧‧步驟200~204‧‧‧Steps

300‧‧‧記憶體控制裝置300‧‧‧ memory control device

302‧‧‧串行先進技術附件緩衝器302‧‧‧Serial Advanced Technology Attachment Buffer

304‧‧‧第一直接記憶體存取單元304‧‧‧First Direct Memory Access Unit

306‧‧‧處理器306‧‧‧ Processor

308‧‧‧讀取資料暫存記憶體308‧‧‧Read data temporary storage memory

310‧‧‧寫入資料暫存記憶體310‧‧‧Write data temporary storage memory

312‧‧‧快取資料對照表讀取暫存記憶體312‧‧‧ Cache data comparison table to read temporary memory

314‧‧‧快取資料對照表寫入暫存記憶體314‧‧‧Cache data comparison table written to temporary memory

316‧‧‧整體對照表暫存記憶體316‧‧‧Overall comparison table temporary memory

320‧‧‧第二直接記憶體存取單元320‧‧‧Second direct memory access unit

322‧‧‧反及閘快閃記憶體322‧‧‧Anti-gate flash memory

第1圖為本發明記憶體寫入控制方法之一示範性實施例的流程圖。1 is a flow chart of an exemplary embodiment of a memory write control method of the present invention.

第2圖為本發明記憶體讀取控制方法之一示範性實施例的流程圖。2 is a flow chart of an exemplary embodiment of a memory read control method of the present invention.

第3圖為本發明記憶體控制裝置的一示範性實施例的示意圖。Figure 3 is a schematic diagram of an exemplary embodiment of a memory control device of the present invention.

在說明書及後續的申請專利範圍當中使用了某些詞彙來指稱特定的元件。所屬領域中具有通常知識者應可理解,製造商可能會用不同的名詞來稱呼同樣的元件。本說明書及後續的申請專利範圍並不以名稱的差異來作為區分元件的方式,而是以元件在功能上的差異來作為區分的準則。在通篇 說明書及後續的請求項當中所提及的「包含」係為一開放式的用語,故應解釋成「包含但不限定於」。另外,「耦接」一詞在此係包含任何直接及間接的電氣連接手段。因此,若文中描述一第一裝置耦接於一第二裝置,則代表該第一裝置可直接電氣連接於該第二裝置,或透過其他裝置或連接手段間接地電氣連接至該第二裝置。Certain terms are used throughout the description and following claims to refer to particular elements. It should be understood by those of ordinary skill in the art that manufacturers may refer to the same elements by different nouns. The scope of this specification and the subsequent patent application do not use the difference of the names as the means for distinguishing the elements, but the difference in function of the elements as the criterion for distinguishing. Throughout The "contains" mentioned in the specification and subsequent claims are an open term and should be interpreted as "including but not limited to". In addition, the term "coupled" is used herein to include any direct and indirect electrical connection. Therefore, if a first device is coupled to a second device, it means that the first device can be directly electrically connected to the second device or indirectly electrically connected to the second device through other devices or connection means.

請參考第1圖,第1圖為本發明記憶體寫入控制方法之一示範性實施例的流程圖。倘若大體上可達到相同的結果,並不需要一定遵照第1圖所示之流程中的步驟順序來進行,且第1圖所示之步驟不一定要連續進行,亦即其他步驟亦可插入其中,此外,第1圖中的某些步驟亦可根據不同實施例或設計需求省略之。該方法包含有以下步驟:步驟100:將具有一邏輯位址的一寫入資料寫入至一寫入資料暫存記憶體中;步驟102:產生該寫入資料之該邏輯位址相對應於一主要記憶體中的一實體位址的一寫入位址對照表,並將其寫入至一快取資料對照表寫入暫存記憶體中;步驟104:將該寫入資料依據該寫入位址對照表寫入至該主要記憶體;以及步驟106:若該快取資料對照表寫入暫存記憶體的可用儲存空間達到一預定臨界值,則將該快取資料對照表寫入暫存記憶體中之該寫入位址對照表寫入至該主要記憶體中,並將相對應的一主要記憶體寫入位址對照表記錄於一整體對照表暫存記憶體中。Please refer to FIG. 1. FIG. 1 is a flow chart of an exemplary embodiment of a memory write control method according to the present invention. If the same result is substantially achieved, it is not necessary to follow the sequence of steps in the flow shown in FIG. 1, and the steps shown in FIG. 1 do not have to be performed continuously, that is, other steps may be inserted therein. In addition, some of the steps in FIG. 1 may also be omitted in accordance with different embodiments or design requirements. The method includes the following steps: Step 100: Write a write data having a logical address into a write data temporary storage memory; Step 102: Generate the logical address corresponding to the write data corresponding to a write address comparison table of a physical address in a main memory, and writing it to a cache data comparison table to be written into the temporary storage memory; Step 104: writing the data according to the write The address comparison table is written to the main memory; and step 106: if the cache data is written into the temporary storage memory, the available storage space reaches a predetermined threshold, and the cache data comparison table is written. The write address comparison table in the temporary memory is written into the main memory, and a corresponding primary memory write address comparison table is recorded in a global comparison table temporary storage memory.

關於第1圖所示之記憶體寫入控制方法,請一併參考第3圖,第3圖為本發明記憶體控制裝置的一示範性實施例的示意圖。記憶體控制裝置 300係用以將上層的邏輯頁碼(logical page number,LPN)轉換為固態硬碟中的實體頁碼(physical page number,PPN),以及包含有一串行先進技術附件(SATA)緩衝器302、一第一直接記憶體存取單元(Direct Memory Access,DMA)304、一處理器306、一讀取資料暫存記憶體308、一寫入資料暫存記憶體310、一快取資料對照表讀取暫存記憶體312、一快取資料對照表寫入暫存記憶體314、一整體對照表暫存記憶體316、一第二直接記憶體存取單元320以及一反及閘快閃記憶體322。當上層系統欲對反及閘快閃記憶體322進行一特定寫入資料的寫入時,首先將該特定寫入資料經由SATA緩衝器302透過第一直接記憶體存取單元304依序將該特定寫入資料寫入至寫入資料暫存記憶體310中,即步驟100。同時,處理器306會產生該特定寫入資料的一邏輯位址相對應於反及閘快閃記憶體322中的一實體位址的一寫入位址對照表,並將其寫入至快取資料對照表寫入暫存記憶體314中,即步驟102。請注意,本發明之記憶體控制裝置300可針對以頁面等級(page-level)為單位的記憶體資料讀寫及位址對照,舉例來說,若反及閘快閃記憶體322中每一頁面大小係8K位元組,則無論上層SATA的每一單元大小為何,第一直接記憶體存取單元304都會依序將其暫存於寫入資料暫存記憶體310中,至少待集滿一個頁面才會透過第二直接記憶體存取單元320來將其寫入至反及閘快閃記憶體322中,即步驟104。應注意的是,本實施例中之記憶體控制裝置300係用以控制一SATA設備端(即反及閘快閃記憶體322),以及用以透過SATA緩衝器302以及第一直接記憶體存取單元304來連結一SATA主控端,然而實際上本發明並非限定於SATA系統,舉例來說,SATA緩衝器302以及第一直接記憶體存取單元304可以變化為通用序列匯流排3.0(USB 3.0)緩衝器以及符合USB 3.0規範的直接記憶體存取單元,除此之外,反及閘快閃記憶體322亦可以變化為其他種類的固態記憶體。這些設計上的變化均落入本發明的範疇。Regarding the memory write control method shown in Fig. 1, reference is made to Fig. 3, which is a schematic diagram of an exemplary embodiment of the memory control device of the present invention. Memory control device The 300 series is used to convert the upper logical page number (LPN) into a physical page number (PPN) in the solid state hard disk, and includes a serial advanced technology attachment (SATA) buffer 302, a first a direct memory access unit (DMA) 304, a processor 306, a read data temporary storage memory 308, a write data temporary storage memory 310, a cache data comparison table read temporarily The memory 312 and a cache data comparison table are written into the temporary storage memory 314, a global comparison table temporary storage memory 316, a second direct memory access unit 320, and a reverse gate flash memory 322. When the upper layer system wants to write a specific write data to the gate flash memory 322, the specific write data is first sequentially sent to the first direct memory access unit 304 via the SATA buffer 302. The specific write data is written into the write data temporary storage 310, step 100. At the same time, the processor 306 generates a logical address corresponding to the specific write data corresponding to a write address comparison table of a physical address in the gate flash memory 322, and writes it to the fast The data comparison table is written into the temporary storage memory 314, that is, step 102. Please note that the memory control device 300 of the present invention can read and write and address the memory data in units of page-level, for example, if each of the gate flash memory 322 is reversed. The page size is 8K bytes, and regardless of the size of each unit of the upper SATA, the first direct memory access unit 304 temporarily stores it in the write data temporary storage 310, at least to be full. A page is written to the inverse gate flash memory 322 via the second direct memory access unit 320, step 104. It should be noted that the memory control device 300 in this embodiment is used to control a SATA device end (ie, the anti-gate flash memory 322), and to pass through the SATA buffer 302 and the first direct memory. The unit 304 is connected to a SATA host. However, the present invention is not limited to the SATA system. For example, the SATA buffer 302 and the first direct memory access unit 304 can be changed to a universal serial bus 3.0 (USB). 3.0) Buffers and direct memory access units conforming to the USB 3.0 specification, in addition, the gate flash memory 322 can be changed to other types of solid state memory. These design variations are within the scope of the present invention.

本實施例中的快取資料對照表寫入暫存記憶體314的大小係64k 位元組,然而此僅係作為範例說明之用,並非本發明的限制所在。若快取資料對照表寫入暫存記憶體314的可用儲存空間達到一寫入預定臨界值T1時,則先將快取資料對照表寫入暫存記憶體314中之寫入位址對照表依其邏輯位址按固定大小(例如8M位元組)為間隔單位予以群組,再依組別將其寫入至反及閘快閃記憶體322中,最後並將相對應的一主要記憶體寫入位址對照表記錄於整體對照表暫存記憶體316中,即步驟106。應注意的是,在本實施例中,反及閘快閃記憶體322中會保留千分之一的空間(不以此為限)供該寫入位址對照表的存放,然而將快取資料對照表寫入暫存記憶體314中之該寫入位址對照表寫入至反及閘快閃記憶體322時,並不需要將其寫入至反及閘快閃記憶體322中與一般資料有所區別的特定區域中,換句話說,反及閘快閃記憶體322中之該寫入位址對照表至可混合於一般資料中(亦即當作一般資料來進行資料寫入處理),之後需要使用的時候可以依據整體對照表暫存記憶體316中所記錄之該主要記憶體寫入位址對照表來找到相對應之該寫入位址對照表,如此一來,可以避免反及閘快閃記憶體322中特定區域的存取次數高於一般資料區域的情況而造成記憶體元件的早衰,另一方面,傳統的作法中,需要將所有的寫入位址對照表記錄於暫存記憶體中,而隨著記憶體的增加,往往需要將佔存記憶體的尺寸增加到數十個或是數百個百萬位元組以上;本發明借用反及閘快閃記憶體322中的一小部分的空間,一方面可增加硬體的彈性,另一方面又可大幅地減少了成本。The cache data comparison table in this embodiment is written into the size 64k of the temporary storage memory 314. Bytes, however, are for illustrative purposes only and are not limiting of the invention. If the available storage space of the cache data comparison table written to the temporary storage memory 314 reaches a write predetermined threshold T1, the cache data comparison table is first written into the write address comparison table in the temporary storage memory 314. According to the logical address, the group is grouped according to a fixed size (for example, 8M bytes), and then written into the anti-gate flash memory 322 according to the group, and finally a corresponding main memory The body write address comparison table is recorded in the overall lookup table temporary storage memory 316, step 106. It should be noted that, in this embodiment, one thousandth of the space is reserved in the anti-gate flash memory 322 (not limited thereto) for the storage of the write address comparison table, but the cache will be cached. When the data comparison table is written to the write address comparison table in the temporary memory 314, the write to the flash memory 322 does not need to be written into the inverse flash memory 322. In a specific area where the general information is different, in other words, the write address comparison table in the gate flash memory 322 can be mixed into the general data (that is, as general data for data writing). Processing), after the need to use, according to the main memory write address comparison table recorded in the overall comparison table temporary storage memory 316 to find the corresponding write address comparison table, so that It is avoided that the number of accesses of a specific area in the gate flash memory 322 is higher than that of the general data area, resulting in premature fading of the memory element. On the other hand, in the conventional method, all the write address comparison tables are required. Recorded in the temporary memory, and as the memory increases In addition, it is often necessary to increase the size of the occupied memory to several tens or hundreds of megabytes; the present invention borrows a small portion of the space in the gate flash memory 322, on the one hand Increase the flexibility of the hardware, on the other hand, the cost can be greatly reduced.

請參考第2圖,第2圖為本發明記憶體讀取控制方法之一示範性實施例的流程圖。倘若大體上可達到相同的結果,並不需要一定遵照第2圖所示之流程中的步驟順序來進行,且第2圖所示之步驟不一定要連續進行,亦即其他步驟亦可插入其中,此外,第2圖中的某些步驟亦可根據不同實施例或設計需求省略之。該方法包含有以下步驟: 步驟200:在一快取資料對照表讀取暫存記憶體中搜尋所欲讀取的一讀取資料之一邏輯位址相對應於一主要記憶體中的一實體位址的一讀取位址對照表;步驟202:若該讀取位址對照表存在於該快取資料對照表寫入暫存記憶體中,則將具有該實體位址之該讀取資料從該主要記憶體中讀取出來,並寫入至一讀取資料暫存記憶體中;步驟204:若該讀取位址對照表不存在於該快取資料對照表寫入暫存記憶體中,則搜尋一快取資料對照表讀取暫存記憶體;步驟206:若該讀取位址對照表存在於該快取資料對照表讀取暫存記憶體中,則將具有該實體位址之該讀取資料從該主要記憶體中讀取出來,並寫入至該讀取資料暫存記憶體中;步驟208:若該讀取位址對照表不存在於該快取資料對照表寫入暫存記憶體以及該快取資料對照表讀取暫存記憶體中,則搜尋一整體對照表暫存記憶體;以及步驟210:藉由該整體對照表暫存記憶體來將該讀取位址對照表從該主要記憶體中讀取至該快取資料對照表讀取暫存記憶體中,並且將具有該實體位址之該讀取資料從該主要記憶體中讀取出來,並寫入至該讀取資料暫存記憶體中。Please refer to FIG. 2, which is a flow chart of an exemplary embodiment of a memory read control method according to the present invention. If the same result is generally achieved, it is not necessary to follow the sequence of steps in the flow shown in FIG. 2, and the steps shown in FIG. 2 do not have to be performed continuously, that is, other steps may be inserted therein. In addition, some of the steps in FIG. 2 may also be omitted according to different embodiments or design requirements. The method includes the following steps: Step 200: Searching the temporary memory in a cache data comparison table to search for a read bit of a read data to be read. A logical address corresponding to a physical address in a main memory Address comparison table; Step 202: If the read address comparison table exists in the cache data comparison table and writes to the temporary storage memory, the read data having the physical address is read from the primary memory Extracting and writing to a read data temporary storage memory; Step 204: If the read address comparison table does not exist in the cache data comparison table and writing to the temporary storage memory, searching for a cache The data comparison table reads the temporary storage memory; step 206: if the read address comparison table exists in the cache data comparison table and reads the temporary storage memory, the read data having the physical address is The main memory is read out and written into the read data temporary storage memory; step 208: if the read address comparison table does not exist in the cache data comparison table and written into the temporary storage memory and The cache data comparison table is read into the temporary memory, and then a global comparison table is searched. And storing the memory; and reading the read address comparison table from the main memory to the cache data comparison table to read the temporary storage memory by using the overall comparison table temporary storage memory, And the read data having the physical address is read from the main memory and written into the read data temporary storage memory.

同樣地,請一併參考第2圖與第3圖。當上層系統欲讀取反及閘快閃記憶體322中一特定讀取資料時,處理器306會要求在一快取資料對照表寫入暫存記憶體314中搜尋所欲讀取的一讀取資料之一邏輯位址相對應於一主要記憶體中的一實體位址的一讀取位址對照表,即步驟200。若該讀取位址對照表存在於該快取資料對照表寫入暫存記憶體314中,則第二直接記憶體存取單元320會將具有該實體位址之該讀取資料從反及閘快閃記憶體322中讀取出來,並寫入至一讀取資料暫存記憶體中308中,即步驟202。若 該讀取位址對照表不存在於快取資料對照表寫入暫存記憶體314中,則搜尋一快取資料對照表讀取暫存記憶體312,即步驟204。接下來,若該讀取位址對照表存在於快取資料對照表讀取暫存記憶體312中,則第二直接記憶體存取單元320會將具有該實體位址之該讀取資料從反及閘快閃記憶體322中讀取出來,並寫入至讀取資料暫存記憶體308中,即步驟206。然而,若該讀取位址對照表不存在於快取資料對照表寫入暫存記憶體314以及快取資料對照表讀取暫存記憶體312中,則搜尋一整體對照表暫存記憶體316,即步驟208。最後,在步驟210中,藉由整體對照表暫存記憶體316來將該讀取位址對照表從反及閘快閃記憶體322中讀取至快取資料對照表讀取暫存記憶體312中,並且將具有該實體位址之該讀取資料從反及閘快閃記憶體322中讀取出來,並寫入至讀取資料暫存記憶體308中。此外,本實施例中的快取資料對照表讀取暫存記憶體312的大小係16k位元組,然而此僅係作為範例說明之用,並非本發明的限制所在。本發明在不過度影響隨機資料的讀寫效能的情況下,使用主要記憶體中的一小部分空間來取代傳統的暫存記憶體,一方面增加硬體的彈性,另一方面又大幅地減少了成本。Similarly, please refer to Figures 2 and 3 together. When the upper layer system wants to read a specific read data in the anti-gate flash memory 322, the processor 306 may request a cache data comparison table to be written into the temporary memory 314 to search for the read to be read. One of the logical addresses of the data corresponds to a read address comparison table of a physical address in a primary memory, step 200. If the read address comparison table is stored in the cache data comparison table and written in the temporary storage memory 314, the second direct memory access unit 320 will reverse the read data having the physical address. The gate flash memory 322 reads out and writes it into a read data temporary storage memory 308, step 202. If If the read address comparison table is not present in the cache data comparison table and is written in the temporary storage memory 314, the cache data comparison table is searched for the temporary storage memory 312, that is, step 204. Next, if the read address comparison table exists in the cache data comparison table read temporary storage memory 312, the second direct memory access unit 320 will read the read data having the physical address from The gate flash memory 322 is read out and written to the read data temporary storage memory 308, step 206. However, if the read address comparison table does not exist in the cache data comparison table write temporary storage memory 314 and the cache data comparison table read temporary storage memory 312, then search for a global comparison table temporary storage memory 316, step 208. Finally, in step 210, the read address comparison table is read from the inverse gate flash memory 322 by the overall lookup table temporary storage memory 316 to the cache data comparison table to read the temporary storage memory. In 312, the read data having the physical address is read from the inverse gate flash memory 322 and written into the read data temporary storage memory 308. In addition, the cache data comparison table in this embodiment reads the size of the temporary storage memory 312 by 16k bytes. However, this is for illustrative purposes only and is not a limitation of the present invention. The invention replaces the traditional temporary storage memory by using a small part of the space in the main memory without excessively affecting the read/write performance of the random data, thereby increasing the elasticity of the hardware and greatly reducing the elasticity on the other hand. The cost.

100~106‧‧‧步驟100~106‧‧‧Steps

Claims (13)

一種記憶體控制方法,包含有:將具有一邏輯位址的一寫入資料寫入至一寫入資料暫存記憶體中;產生該寫入資料之該邏輯位址相對應於一主要記憶體中的一實體位址的一寫入位址對照表,並將其寫入至一快取資料對照表寫入暫存記憶體中;將該寫入資料依據該寫入位址對照表寫入至該主要記憶體;以及若該快取資料對照表寫入暫存記憶體的可用儲存空間達到一預定臨界值,則將該快取資料對照表寫入暫存記憶體中之該寫入位址對照表寫入至該主要記憶體中,並將相對應的一主要記憶體寫入位址對照表記錄於一整體對照表暫存記憶體中。A memory control method includes: writing a write data having a logical address to a write data temporary storage memory; and generating the logical address of the write data corresponding to a main memory a write address comparison table of a physical address in the medium and write it to a cache data comparison table to be written into the temporary storage memory; the write data is written according to the write address comparison table And to the main memory; and if the available storage space of the cache data comparison table written to the temporary storage memory reaches a predetermined threshold, writing the cache data comparison table to the write bit in the temporary storage memory The address comparison table is written into the main memory, and a corresponding primary memory write address comparison table is recorded in a global comparison table temporary storage memory. 如申請專利範圍第1項所述的記憶體控制方法,其中該主要記憶體係一反及閘快閃記憶體。The memory control method according to claim 1, wherein the main memory system is opposite to the gate flash memory. 如申請專利範圍第1項所述的記憶體控制方法,其係基於頁面等級的控制方法。The memory control method according to claim 1, which is based on a page level control method. 如申請專利範圍第1項所述的記憶體控制方法,其中將該快取資料對照表寫入暫存記憶體中之該寫入位址對照表寫入至該主要記憶體中的步驟包含有:將該快取資料對照表寫入暫存記憶體中之該寫入位址對照表寫入至該主要記憶體中,而無需將其寫入至該主要記憶體中與一般資料有所區別的特定區域中。The memory control method according to claim 1, wherein the step of writing the cache data comparison table to the write address in the temporary memory includes: : writing the cache data comparison table to the write address comparison table in the temporary memory to be written into the main memory without writing to the main memory to distinguish from the general data In a specific area. 一種記憶體控制方法,包含有: 在一快取資料對照表寫入暫存記憶體中搜尋所欲讀取的一讀取資料之一邏輯位址相對應於一主要記憶體中的一實體位址的一讀取位址對照表;若該讀取位址對照表存在於該快取資料對照表寫入暫存記憶體中,則將具有該實體位址之該讀取資料從該主要記憶體中讀取出來,並寫入至一讀取資料暫存記憶體中。A memory control method comprising: Writing a cached data comparison table to the temporary storage memory to search for a read address of a read data corresponding to a physical address of a read address in a main memory If the read address comparison table exists in the cache data comparison table and is written in the temporary storage memory, the read data having the physical address is read from the main memory and written Read the data in the temporary storage memory. 如申請專利第5項所述的記憶體控制方法,另包含有:若該讀取位址對照表不存在於該快取資料對照表寫入暫存記憶體中,則搜尋一快取資料對照表讀取暫存記憶體;若該讀取位址對照表存在於該快取資料對照表讀取暫存記憶體中,則將具有該實體位址之該讀取資料從該主要記憶體中讀取出來,並寫入至該讀取資料暫存記憶體中。The memory control method according to claim 5, further comprising: if the read address comparison table is not present in the cache data comparison table and written in the temporary storage memory, searching for a cache data comparison The table reads the temporary storage memory; if the read address comparison table exists in the cache data comparison table and reads the temporary storage memory, the read data having the physical address is from the primary memory Read out and write to the read data temporary memory. 如申請專利第5項所述的記憶體控制方法,另包含有:若該讀取位址對照表不存在於該快取資料對照表寫入暫存記憶體以及該快取資料對照表讀取暫存記憶體中,則搜尋一整體對照表暫存記憶體;藉由該整體對照表暫存記憶體來將該讀取位址對照表從該主要記憶體中讀取至該快取資料對照表讀取暫存記憶體中,並且將具有該實體位址之該讀取資料從該主要記憶體中讀取出來,並寫入至該讀取資料暫存記憶體中。The memory control method according to claim 5, further comprising: if the read address comparison table is not present in the cache data comparison table, the temporary memory is read, and the cache data comparison table is read. In the temporary memory, searching for a global comparison table temporary storage memory; reading the read address comparison table from the primary memory to the cache data comparison by using the overall comparison table temporary storage memory The table is read into the scratch memory, and the read data having the physical address is read from the main memory and written into the read data temporary storage memory. 如申請專利第5項所述的記憶體控制方法,其中該主要記憶體係一反及閘快閃記憶體。The memory control method according to claim 5, wherein the main memory system is opposite to the gate flash memory. 如申請專利範圍第5項所述的記憶體控制方法,其係基於頁面等級的控制方法。The memory control method according to claim 5, which is based on a page level control method. 一種記憶體控制電路,包含有:一寫入資料暫存記憶體,用來儲存具有一邏輯位址的一寫入資料;一快取資料對照表寫入暫存記憶體,用來儲存該寫入資料之該邏輯位址相對應於一主要記憶體中的一實體位址的一寫入位址對照表;以及一整體對照表暫存記憶體,用來在該快取資料對照表寫入暫存記憶體的可用儲存空間達到一預定臨界值時,儲存被寫入至該主要記憶體中之該快取資料對照表寫入暫存記憶體中之該寫入位址對照表的相對應的一主要記憶體寫入位址對照表。A memory control circuit includes: a write data temporary storage memory for storing a write data having a logical address; a cache data comparison table is written to the temporary storage memory for storing the write The logical address of the incoming data corresponds to a write address comparison table of a physical address in a primary memory; and a global comparison table temporary storage memory for writing in the cache data comparison table When the available storage space of the temporary storage memory reaches a predetermined threshold, storing the cached data comparison table written in the primary memory into the corresponding address of the write address comparison table in the temporary storage memory A primary memory is written to the address comparison table. 如申請專利範圍第10項所述的記憶體控制電路,其係基於頁面等級的記憶體控制電路。The memory control circuit according to claim 10, which is based on a page level memory control circuit. 一種記憶體控制電路,包含有:一快取資料對照表讀取暫存記憶體,用來儲存所欲讀取的一讀取資料之一邏輯位址相對應於一主要記憶體中的一實體位址的一讀取位址對照表;一讀取資料暫存記憶體,用來儲存從該主要記憶體中所讀取出來的具有該實體位址之該讀取資料;以及一整體對照表暫存記憶體,用來從該主要記憶體中找出該讀取位址對照表。A memory control circuit includes: a cache data comparison table for reading a temporary memory for storing a logical address of a read data to be read corresponding to an entity in a primary memory a read address comparison table of the address; a read data temporary storage memory for storing the read data having the physical address read from the main memory; and a global comparison table The temporary memory is used to find the read address comparison table from the main memory. 如申請專利範圍第12項所述的記憶體控制電路,其係基於頁面等級的記憶體控制電路。The memory control circuit according to claim 12, which is based on a page level memory control circuit.
TW102118632A 2012-07-19 2013-05-27 Memory control method and memory control circuit thereof TWI475387B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US13/944,887 US20140025921A1 (en) 2012-07-19 2013-07-18 Memory control method utilizing main memory for address mapping and related memory control circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
US201261673706P 2012-07-19 2012-07-19

Publications (2)

Publication Number Publication Date
TW201405311A TW201405311A (en) 2014-02-01
TWI475387B true TWI475387B (en) 2015-03-01

Family

ID=50049164

Family Applications (1)

Application Number Title Priority Date Filing Date
TW102118632A TWI475387B (en) 2012-07-19 2013-05-27 Memory control method and memory control circuit thereof

Country Status (2)

Country Link
CN (1) CN103577346A (en)
TW (1) TWI475387B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10696783B2 (en) 2017-12-25 2020-06-30 Iteq Corporation Resin composition, prepreg, and copper clad laminate
US10752744B2 (en) 2017-12-25 2020-08-25 Industrial Technology Research Institute Thermally conductive resin, resin composition, prepreg, and copper clad laminate

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI530787B (en) 2014-06-05 2016-04-21 宏碁股份有限公司 Electronic device and method for writing data
CN106372000B (en) * 2015-07-20 2019-10-11 群联电子股份有限公司 Map table updating method, memorizer control circuit unit and memory storage apparatus
TWI664568B (en) * 2016-11-15 2019-07-01 慧榮科技股份有限公司 Operating method of data storage device
US11449244B2 (en) * 2020-08-11 2022-09-20 Silicon Motion, Inc. Method and apparatus for performing access management of memory device in host performance booster architecture with aid of device side table information

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004139503A (en) * 2002-10-21 2004-05-13 Matsushita Electric Ind Co Ltd Storage device and its control method
TW200519595A (en) * 2003-12-02 2005-06-16 Hewlett Packard Development Co Data storage system with error correction code and replaceable defective memory
US20050172207A1 (en) * 2004-01-30 2005-08-04 Radke William H. Error detection and correction scheme for a memory device
TWI244587B (en) * 2002-11-08 2005-12-01 Intel Corp Interleaved mirrored memory systems
TW200821909A (en) * 2006-05-18 2008-05-16 Buffalo Inc Data storage device and data storage method

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2047888A1 (en) * 1990-07-27 1992-01-28 Hirosada Tone Hierarchical memory control system
JP2005293774A (en) * 2004-04-02 2005-10-20 Hitachi Global Storage Technologies Netherlands Bv Control method of disk unit
US7761740B2 (en) * 2007-12-13 2010-07-20 Spansion Llc Power safe translation table operation in flash memory
CN101727395A (en) * 2008-10-17 2010-06-09 深圳市朗科科技股份有限公司 Flash memory device and management system and method thereof

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004139503A (en) * 2002-10-21 2004-05-13 Matsushita Electric Ind Co Ltd Storage device and its control method
TWI244587B (en) * 2002-11-08 2005-12-01 Intel Corp Interleaved mirrored memory systems
TW200519595A (en) * 2003-12-02 2005-06-16 Hewlett Packard Development Co Data storage system with error correction code and replaceable defective memory
US20050172207A1 (en) * 2004-01-30 2005-08-04 Radke William H. Error detection and correction scheme for a memory device
TW200821909A (en) * 2006-05-18 2008-05-16 Buffalo Inc Data storage device and data storage method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10696783B2 (en) 2017-12-25 2020-06-30 Iteq Corporation Resin composition, prepreg, and copper clad laminate
US10752744B2 (en) 2017-12-25 2020-08-25 Industrial Technology Research Institute Thermally conductive resin, resin composition, prepreg, and copper clad laminate

Also Published As

Publication number Publication date
TW201405311A (en) 2014-02-01
CN103577346A (en) 2014-02-12

Similar Documents

Publication Publication Date Title
CN111033477B (en) Logical to physical mapping
CN107632939B (en) Mapping table for storage device
US8621141B2 (en) Method and system for wear leveling in a solid state drive
US10101927B2 (en) Data storage device and operating method thereof
TWI475387B (en) Memory control method and memory control circuit thereof
US11126544B2 (en) Method and apparatus for efficient garbage collection based on access probability of data
KR101852668B1 (en) Address mapping
TWI716417B (en) Data storage device and operating method thereof
US20140281361A1 (en) Nonvolatile memory device and related deduplication method
US20110004720A1 (en) Method and apparatus for performing full range random writing on a non-volatile memory
US20140025921A1 (en) Memory control method utilizing main memory for address mapping and related memory control circuit
CN103543955A (en) Method and system for reading cache with solid state disk as equipment and solid state disk
US10599579B2 (en) Dynamic cache partitioning in a persistent memory module
CN108595349B (en) Address translation method and device for mass storage device
TW201441813A (en) Data accessing system, data accessing device and data accessing controller
US11347420B2 (en) Attribute mapping in multiprotocol devices
US8521946B2 (en) Semiconductor disk devices and related methods of randomly accessing data
US10684953B2 (en) Data storage apparatus capable of varying map cache buffer size
US10466938B2 (en) Non-volatile memory system using a plurality of mapping units and operating method thereof
US9990311B2 (en) Peripheral interface circuit
CN111352865B (en) Write caching for memory controllers
TWI616755B (en) Storage device and associated data mapping method
TWI549137B (en) Memory chip, data reading method thereof, and data storage system
CN105575425A (en) Memory chip, data reading method and data storage system thereof
TW201601063A (en) Storage device and address-corresponding method, data-storing and data-reading method, and identifying and storing and reading method thereof