TW201719656A - Method for writing data from memory back to storage device and data accessing system using the same - Google Patents

Method for writing data from memory back to storage device and data accessing system using the same Download PDF

Info

Publication number
TW201719656A
TW201719656A TW105106541A TW105106541A TW201719656A TW 201719656 A TW201719656 A TW 201719656A TW 105106541 A TW105106541 A TW 105106541A TW 105106541 A TW105106541 A TW 105106541A TW 201719656 A TW201719656 A TW 201719656A
Authority
TW
Taiwan
Prior art keywords
data
energy
write back
group
write
Prior art date
Application number
TW105106541A
Other languages
Chinese (zh)
Other versions
TWI611405B (en
Inventor
張弘昇
李祥邦
黃祥智
張原豪
郭大維
Original Assignee
旺宏電子股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 旺宏電子股份有限公司 filed Critical 旺宏電子股份有限公司
Publication of TW201719656A publication Critical patent/TW201719656A/en
Application granted granted Critical
Publication of TWI611405B publication Critical patent/TWI611405B/en

Links

Classifications

    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C13/00Digital stores characterised by the use of storage elements not covered by groups G11C11/00, G11C23/00, or G11C25/00
    • G11C13/0002Digital stores characterised by the use of storage elements not covered by groups G11C11/00, G11C23/00, or G11C25/00 using resistive RAM [RRAM] elements
    • G11C13/0021Auxiliary circuits
    • G11C13/0069Writing or programming circuits or methods
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C11/00Digital stores characterised by the use of particular electric or magnetic storage elements; Storage elements therefor
    • G11C11/56Digital stores characterised by the use of particular electric or magnetic storage elements; Storage elements therefor using storage elements with more than two stable states represented by steps, e.g. of voltage, current, phase, frequency
    • G11C11/5678Digital stores characterised by the use of particular electric or magnetic storage elements; Storage elements therefor using storage elements with more than two stable states represented by steps, e.g. of voltage, current, phase, frequency using amorphous/crystalline phase transition storage elements

Landscapes

  • Chemical & Material Sciences (AREA)
  • Crystallography & Structural Chemistry (AREA)
  • Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)
  • Static Random-Access Memory (AREA)
  • Read Only Memory (AREA)

Abstract

A method for writing data from a memory back to a storage device is provided. The memory includes a plurality of data units for storing data. The method includes steps of: calculating the corresponding write-back energy for each data unit; classifying the data units into a plurality of groups according to the calculated write-back energy, wherein each group corresponds to a write-back energy level; selecting a target group from the groups, wherein one of the groups with a lower write-back energy level is assigned with higher possibility to be chosen as the target group; choosing a target data unit from the target group, and writing the data of the target data unit back to the storage device.

Description

將資料自記憶體寫回儲存裝置的方法及應用其的資料存取系統Method for writing data from memory back to storage device and data access system using same

本發明係關於一種將資料自記憶體寫回(write back)儲存裝置的方法及應用其的資料存取系統。The present invention relates to a method of writing data from a memory back to a storage device and a data access system using the same.

相變化記憶體(Phase-Change Memory, PCM)因具有高速存取以及關閉電源後仍保留資料的特性,故已廣泛地被使用在各式非揮發性(Non-Volatile)儲存裝置當中。實務上,在對相變化記憶體進行寫入/編程操作時,可藉由加熱電極的方式來改變記憶胞中相變化材質的結晶狀態,以使其呈現對應寫入資料的電阻值。舉例來說,相變化記憶體的多階記憶胞(Multi-Level Cell, MLC)可被編程至四種可能的電阻值分佈,以分別表示“11”、“10”、“00”、“01”等二位元資料。Phase-Change Memory (PCM) has been widely used in various non-Volatile storage devices because of its high-speed access and retention of data after power is turned off. In practice, when writing/programming the phase change memory, the crystal state of the phase change material in the memory cell can be changed by heating the electrode so as to present the resistance value corresponding to the written data. For example, a multi-level cell (MLC) of phase change memory can be programmed to four possible resistance value distributions to represent "11", "10", "00", "01, respectively. "Equivalent two-dimensional data.

然而,雖然相變化記憶體的多階記憶胞可儲存較多位元的資料,但在進行編程時,其相較於編程單階記憶胞(Single-Level Cell, SLC)需要花費更多的能量,使得系統能耗增加。However, although multi-level memory cells of phase-change memory can store more bits of data, when programming, it takes more energy than programming a single-level cell (SLC). , so that the system energy consumption increases.

因此,如何降低對儲存裝置寫入資料所需的能量以降低整體系統耗能,乃目前業界所致力的課題之一。Therefore, how to reduce the energy required to write data to the storage device to reduce the overall system energy consumption is one of the current issues in the industry.

本發明係關於一種將資料自記憶體寫回儲存裝置的方法及應用其之資料存取系統,可讓具有較低寫回能量的資料有較高的機率被寫回儲存裝置,藉此降低對儲存裝置寫入資料所需耗費的能量。The invention relates to a method for writing data from a memory back to a storage device and a data access system using the same, which can make the data with lower write back energy have a higher probability of being written back to the storage device, thereby reducing the pair. The energy required to store data in the storage device.

根據本發明之一方面,提出一種將資料自記憶體寫回儲存裝置的方法,記憶體包括多個資料單元以儲存資料,該方法包括以下步驟:針對各資料單元,計算將資料寫回儲存裝置所對應的寫回能量;依據各資料單元所對應的寫回能量,將該些資料單元分類成多個群組,該些群組各自對應一寫回能量等級;自該些群組中挑選一目標群組,其中該些群組中對應較低寫回能量等級的群組係被賦予較高的機率被選為該目標群組;從目標群組中選擇目標資料單元,並將目標資料單元的資料寫回儲存裝置。According to an aspect of the present invention, a method for writing data from a memory back to a storage device is provided. The memory includes a plurality of data units for storing data. The method includes the following steps: calculating, for each data unit, writing data back to the storage device Corresponding write back energy; classifying the data units into a plurality of groups according to the write back energy corresponding to each data unit, and each of the groups corresponds to a write back energy level; selecting one from the groups a target group, wherein the group corresponding to the lower write energy level in the groups is given a higher probability of being selected as the target group; selecting the target data unit from the target group, and the target data unit The information is written back to the storage device.

根據本發明之一方面,提出一種資料存取系統,其包括處理單元、記憶體以及儲存裝置。記憶體包括多個資料單元以儲存資料。儲存裝置耦接記憶體。處理單元耦接記憶體,用以針對各資料單元計算將資料寫回儲存裝置所對應的寫回能量,並依據各資料單元所對應的寫回能量,將該些資料單元分類成多個群組,該些群組各自對應一寫回能量等級,其中處理單元在記憶體空間已滿時係執行一寫回程序,該寫回程序包括:自該些群組中挑選一目標群組,其中該些群組中對應較低寫回能量等級的群組係被賦予較高的機率被選為該目標群組;以及從目標群組中選擇目標資料單元,並將目標資料單元的資料寫回儲存裝置。According to an aspect of the present invention, a data access system is provided that includes a processing unit, a memory, and a storage device. The memory includes a plurality of data units to store data. The storage device is coupled to the memory. The processing unit is coupled to the memory, and is configured to calculate, for each data unit, the write back energy corresponding to the data to be written back to the storage device, and classify the data units into multiple groups according to the write back energy corresponding to each data unit. Each of the groups corresponds to a writeback energy level, wherein the processing unit executes a writeback procedure when the memory space is full, the writeback procedure includes: selecting a target group from the groups, wherein the group The group corresponding to the lower write energy level in the group is given a higher probability to be selected as the target group; and the target data unit is selected from the target group, and the data of the target data unit is written back to the storage. Device.

為了對本發明之上述及其他方面有更佳的瞭解,下文特舉較佳實施例,並配合所附圖式,作詳細說明如下:In order to better understand the above and other aspects of the present invention, the preferred embodiments are described below, and in conjunction with the drawings, the detailed description is as follows:

在本文中,參照所附圖式仔細地描述本發明的一些實施例,但不是所有實施例都有表示在圖示中。實際上,這些發明可使用多種不同的變形,且並不限於本文中的實施例。相對的,本揭露提供這些實施例以滿足應用的法定要求。圖式中相同的參考符號用來表示相同或相似的元件。In the present description, some embodiments of the invention are described in detail with reference to the drawings, but not all embodiments are illustrated in the drawings. In fact, these inventions may use a variety of different variations and are not limited to the embodiments herein. In contrast, the present disclosure provides these embodiments to meet the statutory requirements of the application. The same reference symbols are used in the drawings to refer to the same or similar elements.

第1圖繪示依據本發明一實施例之資料存取系統100之簡化方塊圖。資料存取系統100包括處理單元102、記憶體104以及儲存裝置106。處理單元102例如是中央處理單元(Central Processing Unit, CPU)、處理器、控制器或其它運算控制電路。記憶體104耦接處理單元102。記憶體104例如是系統的主記憶體(Main Memory),可供處理單元102儲存/暫存運算時所需的資料。記憶體104可由動態隨機存取記憶體(Dynamic Random Access Memory, DRAM)或其他形式的揮發性(Volatile)記憶體來實現,亦可透過非揮發性(Non-Volatile)記憶體來實現。儲存裝置106耦接記憶體104。儲存裝置106可例如由非揮發性記憶體來實現,像是相變化記憶體(Phase-Change Memory, PCM)、NAND快閃記憶體、磁阻式隨機存取記憶體(Magnetoresistive Random Access Memory, MRAM)、可變電阻式記憶體(Resistive Random Access Memory、ReRAM)等等,可供永久性地儲存資料。1 is a simplified block diagram of a data access system 100 in accordance with an embodiment of the present invention. The data access system 100 includes a processing unit 102, a memory 104, and a storage device 106. The processing unit 102 is, for example, a central processing unit (CPU), a processor, a controller, or other arithmetic control circuit. The memory 104 is coupled to the processing unit 102. The memory 104 is, for example, the main memory of the system, and is available for the processing unit 102 to store/stage data required for the operation. The memory 104 can be implemented by a dynamic random access memory (DRAM) or other form of volatile memory (Volatile) memory, or by non-volatile (Non-Volatile) memory. The storage device 106 is coupled to the memory 104. The storage device 106 can be implemented, for example, by a non-volatile memory such as a phase change memory (PCM), a NAND flash memory, or a magnetoresistive random access memory (MRAM). ), Resistive Random Access Memory (ReRAM), etc., for permanent storage of data.

在操作上,資料存取系統100可視為一種非對稱的存取架構。舉例來說,程式會先儲存在儲存裝置106當中,接著程式係被載入記憶體104以供處理單元102執行(如路徑A1所示)。處理單元102執行期間所產生的相關運算結果可先暫存至記憶體104。當記憶體104空間被填滿、或是有特定資料必需存回儲存裝置106時,處理單元102將執行寫回(write back)動作,以將資料從記憶體104寫回儲存裝置106 (如路徑A2所示)。由於將資料寫回儲存裝置106需花費一定的寫回能量(例如對相變化記憶體施加熱能以進行編程所花費的能量),倘若能減少執行寫回操作時所需耗費的寫回能量,將能有效降低系統耗能。In operation, data access system 100 can be viewed as an asymmetric access architecture. For example, the program will be stored first in the storage device 106, and then the program will be loaded into the memory 104 for execution by the processing unit 102 (as indicated by path A1). The result of the correlation operation generated during the execution of the processing unit 102 may be temporarily stored in the memory 104. When the memory 104 is filled, or if certain data must be stored back in the storage device 106, the processing unit 102 will perform a write back action to write the data from the memory 104 back to the storage device 106 (eg, path) A2)). Since writing data back to the storage device 106 requires a certain amount of write back energy (for example, the energy required to apply thermal energy to the phase change memory for programming), if the writeback energy required to perform the write back operation can be reduced, Can effectively reduce system energy consumption.

依據本發明之實施例,處理單元102可先對記憶體104中各資料單元的寫回能量作評估,再將該些資料單元依其對應的寫回能量歸類至對應不同寫回能量等級的群組。之後,再配合機率選擇的方式,使得對應低能量等級的群組有較高的機率被選取,進而從所選的群組中找到合適的寫回資料。透過此方式,可讓被選為要寫回儲存裝置106的資料大多是對應低寫回能量,使得系統耗能可有效地被降低。According to an embodiment of the present invention, the processing unit 102 may first evaluate the write back energy of each data unit in the memory 104, and then classify the data units according to their corresponding write back energy to corresponding different write back energy levels. Group. Then, in conjunction with the probability selection method, the group corresponding to the low energy level has a higher probability to be selected, and then the appropriate write back data is found from the selected group. In this way, the data selected to be written back to the storage device 106 is mostly corresponding to low write back energy, so that the system energy consumption can be effectively reduced.

第2圖繪示依據本發明一實施例之將資料自記憶體104寫回儲存裝置106的方法流程圖。在步驟202,處理單元102係針對記憶體104的各資料單元,計算將資料寫回儲存裝置106所對應的寫回能量。所述之資料單元可以是記憶體頁(memory page)或其他的資料管理單位,端視系統的存取架構而定。FIG. 2 is a flow chart of a method for writing data from the memory 104 back to the storage device 106 according to an embodiment of the invention. At step 202, the processing unit 102 calculates, for each data unit of the memory 104, the write back energy corresponding to writing the data back to the storage device 106. The data unit may be a memory page or other data management unit, depending on the access architecture of the system.

在一實施例中,可透過計數各資料單元中高能階資料的數目,以決定各資料單元所對應的寫回能量。所述之高能階資料係指須花費較多能量進行編程才能達到目標資料位準的資料,其例如對應一或多個特定位元樣式(bit pattern)。舉例來說,在對相變化記憶體的記憶胞進行編程時,可先基於類似編程單階記憶胞(Single-Level Cell, SLC)的方式來寫入資料的第一個位元,以形成對應資料“1”(或“11”)、“0” (或“00”)的電阻值分佈。之後若要再寫入第二個位元,則需進行較精準的編程控制,以進一步分出對應資料“10”、“01”的電阻值分佈。因此,寫入資料“10”、“01”所需花費的能量將明顯高於寫入資料“11”、“00”所需花費的能量。故在此例中,位元樣式為“10”、“01”的資料將被視為高能階資料,處理單元102可透過計數資料單元中包含多少個位元樣式為“10”及“01”的資料來估計該資料單元所對應的寫回能量。In an embodiment, the number of high-level data in each data unit can be counted to determine the write back energy corresponding to each data unit. The high energy level data refers to data that requires more energy to be programmed to reach the target data level, for example, corresponding to one or more specific bit patterns. For example, when programming a memory cell of a phase change memory, the first bit of the data may be written based on a similarly programmed single-level cell (SLC) to form a corresponding The resistance value distribution of the data "1" (or "11"), "0" (or "00"). If you want to write the second bit again, you need to perform more precise programming control to further separate the resistance value distribution of the corresponding data "10" and "01". Therefore, the energy required to write the data "10", "01" will be significantly higher than the energy required to write the data "11", "00". Therefore, in this example, the data of the bit pattern of "10" and "01" will be regarded as high-level data, and the processing unit 102 can transmit the number of bit patterns included in the counting data unit to "10" and "01". The data is used to estimate the write back energy corresponding to the data unit.

可理解本發明並不以上述例示為限,不同記憶胞分佈所對應的資料當可視不同的設計而調整,使得高能階資料所對應的位元樣式有所不同。在其他例子中,處理單元102亦可進一步考量其他因素來計算資料單元所對應的寫回能量。相關敘述將配合第3圖進行說明。It can be understood that the present invention is not limited to the above examples, and the data corresponding to different memory cell distributions may be adjusted according to different designs, so that the bit pattern corresponding to the high energy level data is different. In other examples, processing unit 102 may further consider other factors to calculate the writeback energy corresponding to the data unit. The related description will be described with reference to Fig. 3.

在步驟204,處理單元102可依據各資料單元所對應的寫回能量,將該些資料單元分類成多個群組,其中該些群組係各自對應一寫回能量等級。舉例來說,處理單元102可將寫回能量位於第一寫回能量區間(如50焦耳至150焦耳)的資料單元歸類至第一群組,並將寫回能量位於第二寫回能量區間(如150焦耳至250焦耳)的資料單元歸類至第二群組,以此類推,直到將所有的資料單元皆分類至合適的群組。此時,第一群組相當於對應一較低的寫回能量等級,其中包含寫回能量落在50焦耳至150焦耳之間的資料單元,而第二群組則相當於對應一較高的寫回能量等級,其中包含寫回能量落在150焦耳至250焦耳之間的資料單元。換言之,所謂對應相對低寫回能量等級的群組,係指該群組中所包含的資料單元的寫回能量係落在一相對低的寫回能量區間;而所謂對應相對高寫回能量等級的群組,係指該群組中所包含的資料單元的寫回能量係落在一相對高的寫回能量區間。In step 204, the processing unit 102 may classify the data units into a plurality of groups according to the write back energy corresponding to each data unit, wherein each of the groups corresponds to a write back energy level. For example, the processing unit 102 can classify the data unit whose write back energy is located in the first write back energy interval (eg, 50 joules to 150 joules) to the first group, and write the write back energy in the second write back energy interval. Data units (eg, 150 joules to 250 joules) are classified into the second group, and so on, until all of the data units are sorted into the appropriate group. At this time, the first group corresponds to a lower write energy level, which includes a data unit whose write back energy falls between 50 joules and 150 joules, and the second group corresponds to a corresponding higher one. Write back the energy level, which contains the data unit that writes back energy between 150 joules and 250 joules. In other words, the group corresponding to the relatively low write energy level means that the write back energy of the data unit included in the group falls in a relatively low write back energy interval; and the corresponding relatively high write back energy level The group refers to the write back energy of the data unit contained in the group is in a relatively high write back energy interval.

在步驟206,處理單元102係自該些群組中挑選一目標群組,其中該些群組中對應較低寫回能量等級的群組係被賦予較高的機率被選為該目標群組。舉例來說,若處理單元102係以隨機方式來挑選目標群組,則可在隨機選擇的樣本空間中增加對應低寫回能量等級群組的樣本數,並減少對應高寫回能量等級群組的樣本數,藉此提高低寫回能量等級群組被選為目標群組的機率。舉例來說,假設有三個群組A、B、C,其所對應的寫回能量範圍例如分別是0~100焦耳、200~300焦耳、300~400焦耳,且此三個群組A、B、C分別被賦予不同的權重,例如分別為4、2、1,此時,挑選到群組A的機率為4/7,挑選到群組B的機率是2/7,而挑選到群組C的機率是1/7。因此,具有相對低寫回能量的群組A被挑到的機率將相較於其他群組B、C來得高。透過此方式,儲存裝置106將有較大的機率是被寫回低寫回能量的資料,進而降低對儲存裝置106執行寫回操作所需耗費的能量。At step 206, the processing unit 102 selects a target group from the groups, wherein the groups corresponding to the lower write energy levels in the groups are given a higher probability of being selected as the target group. . For example, if the processing unit 102 selects a target group in a random manner, the number of samples corresponding to the low write back energy level group may be increased in the randomly selected sample space, and the corresponding high write back energy level group may be reduced. The number of samples, thereby increasing the probability that the low write back energy level group is selected as the target group. For example, suppose there are three groups A, B, and C, and the corresponding write back energy ranges are, for example, 0 to 100 joules, 200 to 300 joules, 300 to 400 joules, and the three groups A and B. C and C are given different weights, for example, 4, 2, and 1, respectively. At this time, the probability of picking to group A is 4/7, and the probability of picking to group B is 2/7, and the group is selected. The probability of C is 1/7. Therefore, the probability that group A with relatively low write back energy will be picked up will be higher than other groups B, C. In this manner, the storage device 106 will have a greater chance of being written back to the lower write back energy, thereby reducing the amount of energy required to perform a write back operation on the storage device 106.

在一實施例中,機率挑選群組的權重設定可以是從對應最高寫回能量等級的群組開始,指定其權重為1,第二高的為2,第三高的為4,以此類推,之後再把這些權重加起來當作分母,分子為對應的群組之權重(即,對應群組之權重除以權重總和),以得到該群組所對應的被挑選機率。如此一來,具有相對低寫回能量的群組將具有較高的被挑選機率。可理解上述例示所採用的權重值設定僅是作為說明用途,並非用以限制本發明。在其他實施例中,權重值的設定亦可視不同應用而作調整。In an embodiment, the weight selection of the probability picking group may be started from a group corresponding to the highest write back energy level, and the weight is set to 1, the second highest is 2, the third highest is 4, and so on. Then, these weights are added together as a denominator, and the numerator is the weight of the corresponding group (ie, the weight of the corresponding group is divided by the sum of the weights) to obtain the selected probability corresponding to the group. As a result, groups with relatively low writeback energy will have a higher probability of being picked. It is to be understood that the weight values set forth in the above description are for illustrative purposes only and are not intended to limit the invention. In other embodiments, the setting of the weight value can also be adjusted depending on the application.

此外,透過機率的散佈性,可消除因為冷資料(Cold Data)、熱資料(Hot Data)對能耗的影響。進一步說,有些資料雖然具備低寫回能量,但其被寫回的頻率高(熱資料),使得整體的寫回能量仍是高的。透過機率選擇方式,將可使部分寫回能量雖高、但寫回頻率低的資料(冷資料)有機會被選擇寫回,藉此減緩冷、熱資料對能耗的影響。In addition, through the spread of probability, the impact of cold data (Cold Data) and hot data (Hot Data) on energy consumption can be eliminated. Further, although some materials have low write back energy, they are written back at a high frequency (thermal data), so that the overall write back energy is still high. Through the probability selection method, some data (cold data) with high energy but low write frequency can be written back, which can slow down the influence of cold and hot data on energy consumption.

在步驟208,處理單元102係從所選的目標群組中選擇目標資料單元,並將目標資料單元的資料寫回儲存裝置106。處理單元102可基於隨機方式或是一定規則來挑選目標資料單元。由於各資料單元已經過分類,且對應低寫回能量等級的群組係被賦予較高的被選機率,故處理單元102並不需一一比較各資料單元的寫回能量以找出相對低寫回能量的資料後再將其寫回。因此,處理單元102可透過此方式快速地挑選出欲寫回儲存裝置106的資料,藉此縮短整體編程時間。At step 208, the processing unit 102 selects the target data unit from the selected target group and writes the data of the target data unit back to the storage device 106. Processing unit 102 may select the target data unit based on a random manner or a certain rule. Since each data unit has been classified, and the group corresponding to the low write back energy level is given a higher probability of being selected, the processing unit 102 does not need to compare the write back energy of each data unit to find a relatively low one. Write back the energy data and then write it back. Therefore, the processing unit 102 can quickly pick out the data to be written back to the storage device 106 in this way, thereby shortening the overall programming time.

在一實施例中,處理單元102在對記憶體104執行寫入操作後即會對相關的資料單元進行如步驟202及204的管理及分類,並在記憶體104空間被填滿時,執行如步驟206及208的寫回程序。In an embodiment, after performing a write operation on the memory 104, the processing unit 102 performs management and classification of the related data units as in steps 202 and 204, and when the memory 104 space is filled, The write back procedure of steps 206 and 208.

第3圖繪示依據本發明一實施例之記憶體之資料結構之示意圖。為方便說明,此處所述之記憶體係以第1圖之記憶體104為例,但並不以此限制本發明。FIG. 3 is a schematic diagram showing the data structure of a memory according to an embodiment of the invention. For convenience of explanation, the memory system described herein is exemplified by the memory 104 of FIG. 1, but the present invention is not limited thereto.

在第3圖的例子中,記憶體104包括多個資料單元DU,各資料單元DU係包括多條快取線CL。資料單元DU例如是一資料頁,其大小例如是4K位元組(Byte)或4M位元組,而一條快取線CL的大小例如是64位元組或128位元組,端視實際應用而定。In the example of FIG. 3, the memory 104 includes a plurality of data units DU, and each of the data units DU includes a plurality of cache lines CL. The data unit DU is, for example, a data page whose size is, for example, 4K Bytes or 4M bytes, and the size of one cache line CL is, for example, 64-bit or 128-bit, depending on the actual application. And set.

各資料單元DU分別被賦予一個資料計數器302,各資料計數器302用以計算對應之資料單元DU中有多少個高耗能資料(如位元樣式為“10”及“01”的資料),以供處理單元102估算各資料單元DU所對應的寫回能量。Each data unit DU is respectively assigned a data counter 302, and each data counter 302 is used to calculate how many high energy-consuming data (such as the bit pattern "10" and "01") in the corresponding data unit DU, The processing unit 102 estimates the write back energy corresponding to each data unit DU.

在一實施例中,資料計數器302並不需計數對應資料單元DU中所有快取線CL所包含的高耗能資料數量,而僅需計數曾被修改過資料的快取線CL中的高耗能資料數量即可。進一步說,各快取線CL係被賦予一個髒位元(dirty bit)DB以指示其是否曾被修改過資料/被寫入。當一快取線CL被髒位元DB標記(例如髒位元DB的值=1),係表示該快取線CL曾被修改過資料。反之,當快取線CL未被髒位元DB標記(例如髒位元DB的值=0),則表示該快取線CL未曾被修改過資料。一般而言,只有被修改過的資料才可能有寫回儲存裝置106的需要,故資料計數器302可透過計數各資料單元DU中被髒位元DB標記之快取線CL所包含的高能階資料的數目,以供處理單元102計算各資料單元DU所對應的寫回能量。舉例來說,處理單元102可基於以下公式計算資料單元DU所對應的寫回能量:In an embodiment, the data counter 302 does not need to count the amount of high energy-consuming data contained in all the cache lines CL in the corresponding data unit DU, but only needs to count the high consumption in the cache line CL of the data that has been modified. The amount of information can be. Further, each cache line CL is assigned a dirty bit DB to indicate whether it has been modified/written. When a cache line CL is marked by the dirty bit DB (for example, the value of the dirty bit DB = 1), it indicates that the cache line CL has been modified. On the other hand, when the cache line CL is not marked by the dirty bit DB (for example, the value of the dirty bit DB = 0), it means that the cache line CL has not been modified. In general, only the modified data may have the need to write back to the storage device 106. Therefore, the data counter 302 can count the high-level data contained in the cache line CL marked by the dirty bit DB in each data unit DU. The number is used by the processing unit 102 to calculate the write back energy corresponding to each data unit DU. For example, the processing unit 102 can calculate the write back energy corresponding to the data unit DU based on the following formula:

(式一) (Formula 1)

其中Epf表示一資料單元DU所對應的寫回能量,Cpc表示資料計數器302的計數結果,Cdirty表示資料單元DU中被髒位元DB標記之快取線CL之數量,Ncl表示一快取線CL中的位元數,Ehe表示寫入高能階資料(如資料“01”或“10”)的平均寫回能量,Ele表示寫入低能階資料(如資料“00”或“11”)的平均寫回能量。Where Epf represents the write back energy corresponding to a data unit DU, Cpc represents the count result of the data counter 302, Cdirty represents the number of cache lines CL marked by the dirty bit DB in the data unit DU, and Ncl represents a cache line CL. In the number of bits in the box, Ehe represents the average write back energy written to high-level data (such as data "01" or "10"), and Ele represents the average written in low-level data (such as data "00" or "11"). Write back energy.

進一步說,項次Ncl´Cdirty為所有被髒位元DB標記之快取線CL所包含的位元數目,而對於多階記憶胞(MLC)來說,由於每次寫入操作都是寫入兩個位元的資訊,故在(式一)中,係將項次Ncl´Cdirty除以2以計算其實際寫入的動作。另外,在(式一)中未將項次Cpc´Ehe除以2的原因係在於Cpc本身即記錄了高能階資料(如資料“01”或“10”)的個數,而不是分別紀錄有幾個位元,故不需除以2。Further, the item Ncl ́Cdirty is the number of bits included in all cache lines CL marked by the dirty bit DB, and for multi-level memory cells (MLC), it is written for each write operation. The information of two bits, so in (Formula 1), the item Ncl ́Cdirty is divided by 2 to calculate the actual written action. In addition, the reason why the item Cpc ́Ehe is not divided by 2 in (Formula 1) is that Cpc itself records the number of high-energy data (such as data "01" or "10") instead of separately recording A few bits, so there is no need to divide by 2.

可理解本發明並不以上述例示為限,凡是基於資料單元中高能階資料的數量來評估對應資料單元的寫回能量,皆屬本發明精神之範疇。It can be understood that the present invention is not limited to the above examples. It is within the spirit of the present invention to evaluate the write back energy of the corresponding data unit based on the number of high energy level data in the data unit.

第4圖繪示依據本發明一實施例之對應不同寫回能量等級之群組之示意圖。在第4圖的例子中,係設有n個群組G1~Gn,其中n為正整數。群組G1~Gn分別對應至寫回能量等級LV1~LVn,並由低寫回能量至高寫回能量依序排列。對應同一寫回能量等級/寫回能量區間的資料群組係被歸類至同一群組。如第4圖所示,對應寫回能量等級LV1的資料單元DU11~DU1i係被歸類至群組G1;對應寫回能量等級LV2的資料單元DU21~DU2j係被歸類至群組G2;對應寫回能量等級LVn的資料單元DUn1~DUnk係被歸類至群組Gn,其中i、j、k為正整數。舉例來說,假設寫回能量等級LV1係表示寫回能量為100焦耳至200焦耳的等級,而寫回能量等級LV2係表示寫回能量為200焦耳至400焦耳的等級,此時,若第一資料單元、第二資料單元以及第三資料單元被寫回儲存裝置106所需耗費的能量分別為130焦耳、180焦耳以及300焦耳,則第一、二資料單元將被分類至同一群組G1,而第三資料單元將被分類至群組G2。FIG. 4 is a schematic diagram of a group corresponding to different write back energy levels according to an embodiment of the invention. In the example of Fig. 4, there are n groups G1 to Gn, where n is a positive integer. The groups G1~Gn correspond to the write back energy levels LV1~LVn, respectively, and are sequentially arranged from low write back energy to high write back energy. The data groups corresponding to the same write back energy level/write back energy interval are classified into the same group. As shown in FIG. 4, the data units DU11~DU1i corresponding to the write back energy level LV1 are classified into the group G1; the data units DU21~DU2j corresponding to the write back energy level LV2 are classified into the group G2; The data units DUn1~DUnk written back to the energy level LVn are classified into the group Gn, where i, j, k are positive integers. For example, suppose that the write back energy level LV1 represents a write back energy level of 100 joules to 200 joules, and the write back energy level LV2 represents a write back energy level of 200 joules to 400 joules, at this time, if the first The energy required to write the data unit, the second data unit, and the third data unit back to the storage device 106 is 130 joules, 180 joules, and 300 joules, respectively, and the first and second data units are classified into the same group G1. The third data unit will be classified to group G2.

在一實施例中,各群組G1~Gn所對應的寫回能量區間可以是平均劃分。舉例來說,若最大寫回能量為E,則各群組G1~Gn所對應的寫回能量區間的區間寬度可以皆設定為E/n。此時,群組G1係對應0至的寫回能量區間,群組G2係對應的寫回能量區間,群組G3係對應的寫回能量區間,以此類推。In an embodiment, the write back energy interval corresponding to each group G1 G Gn may be an average division. For example, if the maximum write back energy is E, the interval width of the write back energy interval corresponding to each group G1~Gn may be set to E/n. At this time, the group G1 corresponds to 0 to Write back energy interval, group G2 corresponds to Write back energy interval, group G3 corresponds to Write back to the energy interval, and so on.

又一實施例中,各群組G1~Gn所對應的寫回能量區間可以是非平均劃分。舉例來說,若最大寫回能量為E,則各群組G1~Gn所對應的寫回能量區間可基於一特定底數Q的冪次方來劃分。以底數Q等於2為例,群組G1係對應0至的寫回能量區間,群組G2係對應的寫回能量區間,群組G3係對應的寫回能量區間,以此類推。若群組G1~Gn係按照寫回能量的高低由低至高依序排列,低寫回能量群組所對應的寫回能量區間寬度係高寫回能量群組所對應的寫回能量區間寬度的QR 倍,其中Q表示冪次方劃分最大寫回能量E的底數,R表示兩群組間的序數差,Q、R皆為正整數。以前述例子為例,在底數Q等於2的情況下,群組G1(對應序數為1)的寫回能量區間寬度係群組G3(對應序數為3)的寫回能量區間寬度的2(3-1) 倍。In another embodiment, the write back energy interval corresponding to each group G1 G Gn may be a non-average partition. For example, if the maximum write back energy is E, the write back energy interval corresponding to each group G1~Gn may be divided based on a power of a specific base Q. Taking the base Q equal to 2 as an example, the group G1 corresponds to 0 to Write back energy interval, group G2 corresponds to Write back energy interval, group G3 corresponds to Write back to the energy interval, and so on. If the groups G1~Gn are sequentially arranged from low to high according to the level of the write back energy, the write back energy interval width corresponding to the low write back energy group is the write back energy interval width corresponding to the high write back energy group. Q R times, where Q represents the base of the maximum write back energy E, and R represents the ordinal difference between the two groups, and both Q and R are positive integers. Taking the foregoing example as an example, in the case where the base Q is equal to 2, the write back energy interval width group G3 (corresponding to the ordinal number 3) of the group G1 (corresponding to the ordinal number is 1) is 2 (3 of the write back energy interval width). -1) times.

可理解本發明並不以上述例示為限。各群組所對應的寫回能量區間亦可基於其他規則來劃分,端視不同應用而定。It is to be understood that the invention is not limited to the above examples. The writeback energy interval corresponding to each group can also be divided based on other rules, depending on different applications.

第5圖繪示依據本發明一實施例之資料存取系統之操作流程圖。為方便說明,此處所述之資料存取系統係以第1圖之資料存取系統100為例,但並不以此限制本發明。FIG. 5 is a flow chart showing the operation of the data access system according to an embodiment of the invention. For convenience of explanation, the data access system described herein is exemplified by the data access system 100 of FIG. 1, but the present invention is not limited thereto.

在步驟502,處理單元102先是判斷所欲存取的資料單元(例如資料頁)是否存在記憶體104中。若是,則接續步驟504,處理單元102將判斷是對該資料單元進行讀取或寫入操作。若否,則接續步驟516,處理單元102接著判斷記憶體104是否空間已滿。若是,則進入步驟506,處理單元102執行寫回資料挑選程序,以自記憶體104選取合適的寫回資料並將其寫回儲存裝置106當中。所述挑選程序的一例示性細部流程將配合第6圖進行說明。At step 502, the processing unit 102 first determines whether the data unit (e.g., material page) to be accessed is present in the memory 104. If so, then proceeding to step 504, processing unit 102 will determine to perform a read or write operation on the data unit. If not, then proceeding to step 516, processing unit 102 then determines if memory 104 is full. If so, proceeding to step 506, processing unit 102 executes a write back data picking process to select the appropriate write back data from memory 104 and write it back to storage device 106. An exemplary detail flow of the selection procedure will be described with reference to Fig. 6.

若步驟516的判斷結果為否,也就是記憶體104的空間尚未被填滿,處理單元102將執行步驟518,以在記憶體104中建立欲存取的資料單元。舉例來說,處理單元102可以從儲存裝置106讀出或者是直接在記憶體104上建立內容為空的記憶體頁面以供讀寫。If the result of the determination in step 516 is no, that is, the space of the memory 104 has not been filled, the processing unit 102 will execute step 518 to establish a data unit to be accessed in the memory 104. For example, the processing unit 102 can read from the storage device 106 or directly create a memory page with empty content on the memory 104 for reading and writing.

在步驟510,當處理單元102判斷出欲對資料單元進行讀取操作,處理單元102將自該資料單元讀取資料。At step 510, when the processing unit 102 determines that a read operation is to be performed on the data unit, the processing unit 102 will read the data from the data unit.

在步驟508,當處理單元102判斷出欲對資料單元進行寫入操作,處理單元102將對該資料單元寫入資料。接著如步驟512及514所示,針對寫入後的資料單元,處理單元102將計算其對應的寫回能量,並依據求得的寫回能量將其歸類至對應的群組,以便之後寫回資料的挑選。At step 508, when the processing unit 102 determines that a write operation is to be performed on the data unit, the processing unit 102 will write the data to the data unit. Then, as shown in steps 512 and 514, for the data unit after the writing, the processing unit 102 will calculate the corresponding write back energy, and classify it according to the obtained write back energy to the corresponding group, so as to write later. Back to the selection of information.

第6圖繪示依據本發明一實施例之寫回資料挑選程序之操作流程圖。此操作流程圖可例如作為第5圖中步驟506的細部流程圖,但本發明並不以此為限。FIG. 6 is a flow chart showing the operation of the write back data selection program according to an embodiment of the invention. This operational flowchart can be used, for example, as a detailed flowchart of step 506 in FIG. 5, but the invention is not limited thereto.

在步驟602,處理單元102先是初始化一迴圈計數器的值,例如將其重置為0。At step 602, processing unit 102 first initializes the value of a loop counter, such as resetting it to zero.

在步驟604,處理單元102係以隨機方式選取群組。各群組例如被賦予不同的被選機率,使得低能量等級的群組相較於高能量等級的群組更容易被挑選到。At step 604, processing unit 102 selects the group in a random manner. Each group is given, for example, a different probability of being selected, such that groups of low energy levels are more easily selected than groups of high energy levels.

在步驟606,處理單元102調整迴圈計數器的值,以計數處理單元102隨機選取群組的次數。舉例來說,可基於以下公式來調整迴圈計數器的值:At step 606, processing unit 102 adjusts the value of the loop counter to count the number of times the processing unit 102 randomly selected the group. For example, the value of the loop counter can be adjusted based on the following formula:

i=i+1   (式二)i=i+1 (Formula 2)

其中i表示迴圈計數器的值。Where i represents the value of the loop counter.

在步驟608,處理單元102係判斷所選的群組中是否有任何資料單元。若否,則表示處理單元102需重新選取群組。如步驟612所示,處理單元102將判斷迴圈計數器的值是否超過一預定閥值,並在判斷出迴圈計數器的值尚未超過該預定閥值時,再次地執行步驟604以重新挑選群組。反之,當迴圈計數器的值超過該預定閥值,表示處理單元102已進行多次隨機選取程序仍無法挑選到有效的群組(即當中有存放資料單元的群組),此時,處理單元102將執行步驟614,改以一固定順序搜尋有效的群組,例如從對應最低寫回能量等級的群組開始尋找第一個具有資料單元的群組。At step 608, processing unit 102 determines if there are any data units in the selected group. If not, it indicates that the processing unit 102 needs to reselect the group. As shown in step 612, the processing unit 102 will determine whether the value of the loop counter exceeds a predetermined threshold, and when it is determined that the value of the loop counter has not exceeded the predetermined threshold, perform step 604 again to re-select the group. . On the other hand, when the value of the loop counter exceeds the predetermined threshold, it indicates that the processing unit 102 has performed multiple random selection procedures and still cannot select a valid group (ie, a group in which the data unit is stored). At this time, the processing unit 102 will perform step 614 to search for a valid group in a fixed order, for example, starting from the group corresponding to the lowest write energy level to find the first group with the data unit.

被挑選到的有效群組可視為目標群組。在挑選出目標群組後,處理單元102將自所選的目標群組中挑選出目標資料單元,並將該目標資料單元寫回儲存裝置106,如步驟610及616所示。在完成如第6圖所示的寫回資料挑選程序後,處理單元102可例如接續如第5圖的步驟518,以執行後續對記憶體104的相關操作。The selected valid group can be regarded as the target group. After the target group is selected, the processing unit 102 will select the target data unit from the selected target group and write the target data unit back to the storage device 106, as shown in steps 610 and 616. Upon completion of the write back data picking procedure as shown in FIG. 6, processing unit 102 may, for example, continue with step 518 of FIG. 5 to perform subsequent operations on memory 104.

綜上所述,本發明所提出之將資料自記憶體寫回儲存裝置的方法及應用其的資料存取系統,可先對記憶體中各資料單元的寫回能量作估計,再將該些資料單元依其對應的寫回能量歸類至對應不同寫回能量等級的群組。之後,再配合機率選擇的方式,使得對應低能量等級的群組有較高的機率被選取,進而從所選的群組中找到合適的寫回資料。透過此方式,不僅可以有效地降低系統耗能,更可提升選取合適寫回資料的速度,進而縮短整體編程時間。In summary, the method for writing data from a memory back to a storage device and the data access system using the same may first estimate the write back energy of each data unit in the memory, and then The data unit is classified according to its corresponding write back energy to a group corresponding to different write back energy levels. Then, in conjunction with the probability selection method, the group corresponding to the low energy level has a higher probability to be selected, and then the appropriate write back data is found from the selected group. In this way, not only can the system energy consumption be effectively reduced, but also the speed of selecting suitable data to be written back can be improved, thereby shortening the overall programming time.

雖然本發明已以較佳實施例揭露如上,然其並非用以限定本發明。本發明所屬技術領域中具有通常知識者,在不脫離本發明之精神和範圍內,當可作各種之更動與潤飾。因此,本發明之保護範圍當視後附之申請專利範圍所界定者為準。While the invention has been described above in the preferred embodiments, it is not intended to limit the invention. A person skilled in the art can make various changes and modifications without departing from the spirit and scope of the invention. Therefore, the scope of the invention is defined by the scope of the appended claims.

100‧‧‧資料存取系統
102‧‧‧處理單元
104‧‧‧記憶體
106‧‧‧儲存裝置
A1、A2‧‧‧路徑
202、204、206、208、502、504、506、508、510、512、514、516、518、602、604、606、608、610、612、614、616‧‧‧步驟
302‧‧‧資料計數器
DU、DU11~DU1i、DU21~DU2j、DUn1~DUnk‧‧‧資料單元
CL‧‧‧快取線
DB‧‧‧髒位元
G1~Gn‧‧‧群組
LV1~LVn‧‧‧寫回能量等級
E‧‧‧最大寫回能量
100‧‧‧Data Access System
102‧‧‧Processing unit
104‧‧‧ memory
106‧‧‧Storage device
A1, A2‧‧‧ Path
202, 204, 206, 208, 502, 504, 506, 508, 510, 512, 514, 516, 518, 602, 604, 606, 608, 610, 612, 614, 616 ‧ ‧ steps
302‧‧‧ data counter
DU, DU11~DU1i, DU21~DU2j, DUn1~DUnk‧‧‧data unit
CL‧‧‧Cache line
DB‧‧‧ dirty bit
G1~Gn‧‧‧Group
LV1~LVn‧‧‧Write back energy level
E‧‧‧Maximum write back energy

第1圖繪示依據本發明一實施例之資料存取系統之簡化方塊圖。 第2圖繪示依據本發明一實施例之將資料自記憶體寫回儲存裝置的方法流程圖。 第3圖繪示依據本發明一實施例之記憶體之資料結構之示意圖。 第4圖繪示依據本發明一實施例之對應不同寫回能量等級之群組之示意圖。 第5圖繪示依據本發明一實施例之資料存取系統之操作流程圖。 第6圖繪示依據本發明一實施例之寫回資料挑選程序之操作流程圖。1 is a simplified block diagram of a data access system in accordance with an embodiment of the present invention. FIG. 2 is a flow chart showing a method for writing data from a memory back to a storage device according to an embodiment of the invention. FIG. 3 is a schematic diagram showing the data structure of a memory according to an embodiment of the invention. FIG. 4 is a schematic diagram of a group corresponding to different write back energy levels according to an embodiment of the invention. FIG. 5 is a flow chart showing the operation of the data access system according to an embodiment of the invention. FIG. 6 is a flow chart showing the operation of the write back data selection program according to an embodiment of the invention.

202、204、206、208‧‧‧步驟 202, 204, 206, 208‧‧ steps

Claims (10)

一種將資料自記憶體寫回儲存裝置的方法,該記憶體包括複數個資料單元以儲存資料,該方法包括: 針對各該資料單元,計算將資料寫回該儲存裝置所對應的寫回能量; 依據各該資料單元所對應的寫回能量,將該些資料單元分類成複數個群組,該些群組各自對應一寫回能量等級; 自該些群組中挑選一目標群組,其中該些群組中對應較低寫回能量等級的群組係被賦予較高的機率被選為該目標群組;以及 從該目標群組中選擇一目標資料單元,並將該目標資料單元的資料寫回該儲存裝置。A method for writing data from a memory back to a storage device, the memory comprising a plurality of data units for storing data, the method comprising: calculating, for each of the data units, a write back energy corresponding to writing the data back to the storage device; Sorting the data units into a plurality of groups according to the write back energy corresponding to each of the data units, each of the groups corresponding to a write back energy level; selecting a target group from the groups, wherein the The group corresponding to the lower write energy level in the group is given a higher probability to be selected as the target group; and selecting a target data unit from the target group, and the data of the target data unit Write back to the storage device. 如申請專利範圍第1項所述之方法,更包括: 計數各該資料單元中高能階資料的數目,以決定各該資料單元所對應的寫回能量; 其中該高能階資料係對應一或多個特定位元樣式。The method of claim 1, further comprising: counting the number of high-level data in each of the data units to determine a write-back energy corresponding to each of the data units; wherein the high-energy data corresponds to one or more Specific bit styles. 如申請專利範圍第1項所述之方法,其中該些資料單元分別包括複數條快取線,該方法更包括: 計數各該資料單元中被髒位元(dirty bit)標記之快取線所包含的高能階資料的數目,以決定各該資料單元所對應的寫回能量; 其中該高能階資料係對應一或多個特定位元樣式。The method of claim 1, wherein the data units respectively comprise a plurality of cache lines, the method further comprising: counting cache lines marked by dirty bits in each of the data units The number of high-level data is included to determine the write-back energy corresponding to each of the data units; wherein the high-level data corresponds to one or more specific bit patterns. 如申請專利範圍第1項所述之方法,更包括: 將該些資料單元中寫回能量位於一第一寫回能量區間的資料單元歸類至該些群組中的一第一群組;以及 將該些資料單元中寫回能量位於一第二寫回能量區間的資料單元歸類至該些群組中的一第二群組; 其中該第一寫回能量等級的區間寬度等於該第二寫回能量等級的區間寬度。The method of claim 1, further comprising: classifying, in the data unit, a data unit whose energy is located in a first write back energy interval into a first group of the groups; And storing, in the data unit, the data unit whose write energy is located in a second write back energy interval to a second group of the groups; wherein the interval width of the first write back energy level is equal to the first Second, write back the interval width of the energy level. 如申請專利範圍第1項所述之方法,更包括: 將該些資料單元中寫回能量位於一第一寫回能量區間的資料單元歸類至該些群組中的一第一群組;以及 將該些資料單元中寫回能量位於一第二寫回能量區間的資料單元歸類至該些群組中的一第二群組; 其中該第一寫回能量區間以及該第二寫回能量區間係基於一特定底數的冪次方對一最大寫回能量作劃分而產生。The method of claim 1, further comprising: classifying, in the data unit, a data unit whose energy is located in a first write back energy interval into a first group of the groups; And storing, in the data unit, the data unit whose write energy is located in a second write back energy interval to a second group of the groups; wherein the first write back energy interval and the second write back The energy interval is generated by dividing a maximum write back energy based on a power of a particular base. 一種資料存取系統,包括: 一記憶體,包括複數個資料單元以儲存資料; 一儲存裝置,耦接該記憶體;以及 一處理單元,耦接該記憶體,用以針對各該資料單元,計算將資料寫回該儲存裝置所對應的寫回能量,並依據各該資料單元所對應的寫回能量,將該些資料單元分類成複數個群組,該些群組各自對應一寫回能量等級,其中該處理單元在該記憶體空間已滿時係執行一寫回程序,該寫回程序包括: 自該些群組中挑選一目標群組,其中該些群組中對應較低寫回能量等級的群組係被賦予較高的機率被選為該目標群組;以及 從該目標群組中選擇一目標資料單元,並將該目標資料單元的資料寫回該儲存裝置。A data access system comprising: a memory comprising a plurality of data units for storing data; a storage device coupled to the memory; and a processing unit coupled to the memory for each of the data units Calculating the write back energy corresponding to the data back to the storage device, and classifying the data units into a plurality of groups according to the write back energy corresponding to each data unit, and each of the groups corresponds to a write back energy a level, wherein the processing unit executes a write back procedure when the memory space is full, the write back procedure includes: selecting a target group from the groups, wherein the groups are correspondingly lower write back The energy level group is assigned a higher probability to be selected as the target group; and a target data unit is selected from the target group, and the data of the target data unit is written back to the storage device. 如申請專利範圍第6項所述之資料存取系統,更包括: 複數個資料計數器,用以計數該些資料單元中高能階資料的數目,以供該處理單元計算各該資料單元所對應的寫回能量; 其中該高能階資料係對應一或多個特定位元樣式。The data access system of claim 6, further comprising: a plurality of data counters for counting the number of high-level data in the data units, wherein the processing unit calculates the corresponding data unit Write back energy; wherein the high energy level data corresponds to one or more specific bit patterns. 如申請專利範圍第6項所述之資料存取系統,其中該些資料單元分別包括複數條快取線,該資料存取系統更包括: 複數個資料計數器,用以計數各該資料單元中,被髒位元(dirty bit)標記之快取線所包含的高能階資料的數目,以供該處理單元計算各該資料單元所對應的寫回能量; 其中該高能階資料係對應一或多個特定位元樣式。The data access system of claim 6, wherein the data units respectively comprise a plurality of cache lines, the data access system further comprising: a plurality of data counters for counting each of the data units, a number of high-level data included in a cache line marked by a dirty bit, for the processing unit to calculate a write-back energy corresponding to each of the data units; wherein the high-energy data corresponds to one or more A specific bit style. 如申請專利範圍第6項所述之資料存取系統,其中該處理單元將該些資料單元中寫回能量位於一第一寫回能量區間的資料單元歸類至該些群組中的一第一群組,並將該些資料單元中寫回能量位於一第二寫回能量區間的資料單元歸類至該些群組中的一第二群組; 其中該第一寫回能量等級的區間寬度等於該第二寫回能量等級的區間寬度。The data access system of claim 6, wherein the processing unit classifies the data units in the data units that are written in the first write back energy interval into one of the groups. a group, and classifying, in the data unit, a data unit whose energy is located in a second write back energy interval to a second group of the groups; wherein the first write back energy level interval The width is equal to the interval width of the second write back energy level. 如申請專利範圍第6項所述之資料存取系統,其中該處理單元將該些資料單元中寫回能量位於一第一寫回能量區間的資料單元歸類至該些群組中的一第一群組,並將該些資料單元中寫回能量位於一第二寫回能量區間的資料單元歸類至該些群組中的一第二群組; 其中該第一寫回能量區間以及該第二寫回能量區間係基於一特定底數的冪次方對一最大寫回能量作劃分而產生。The data access system of claim 6, wherein the processing unit classifies the data units in the data units that are written in the first write back energy interval into one of the groups. a group, and classifying, in the data unit, a data unit whose energy is located in a second write back energy interval to a second group of the groups; wherein the first write back energy interval and the The second write back energy interval is generated by dividing a maximum write back energy by a power of a particular base.
TW105106541A 2015-11-25 2016-03-03 Method for writing data from memory back to storage device and data accessing system using the same TWI611405B (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US201562259659P 2015-11-25 2015-11-25
US62/259,659 2015-11-25

Publications (2)

Publication Number Publication Date
TW201719656A true TW201719656A (en) 2017-06-01
TWI611405B TWI611405B (en) 2018-01-11

Family

ID=58972032

Family Applications (1)

Application Number Title Priority Date Filing Date
TW105106541A TWI611405B (en) 2015-11-25 2016-03-03 Method for writing data from memory back to storage device and data accessing system using the same

Country Status (2)

Country Link
CN (1) CN106782646B (en)
TW (1) TWI611405B (en)

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101443231B1 (en) * 2007-11-27 2014-09-19 삼성전자주식회사 Cache memory capable of adjusting burst length of write-back data in write-back operation
KR101472967B1 (en) * 2007-12-14 2014-12-16 삼성전자주식회사 Cache memory and method capable of write-back operation, and system having the same
JP2012033047A (en) * 2010-07-30 2012-02-16 Toshiba Corp Information processor, memory management device, memory management method and program
EP2671155B1 (en) * 2011-01-31 2017-10-11 Everspin Technologies, Inc. Method of reading and writing to a spin torque magnetic random access memory with error correcting code
US8949544B2 (en) * 2012-11-19 2015-02-03 Advanced Micro Devices, Inc. Bypassing a cache when handling memory requests
US9965397B2 (en) * 2013-02-26 2018-05-08 Avago Technologies General Ip (Singapore) Pte. Ltd. Fast read in write-back cached memory
GB2516831B (en) * 2013-07-31 2020-10-21 Advanced Risc Mach Ltd Error code management in systems permitting partial writes
TWI527048B (en) * 2013-11-29 2016-03-21 慧榮科技股份有限公司 Error correction code unit, self-test method and associated controller applied to flash memory device
JP2015111334A (en) * 2013-12-06 2015-06-18 富士通株式会社 Storage controller, storage control program and storage control method

Also Published As

Publication number Publication date
CN106782646B (en) 2019-11-05
CN106782646A (en) 2017-05-31
TWI611405B (en) 2018-01-11

Similar Documents

Publication Publication Date Title
US9501405B2 (en) Flexible wear management for non-volatile memory
US10915442B2 (en) Managing block arrangement of super blocks
TWI647702B (en) Memory controller, memory system, and method for managing data configuration in a memory
CN113015965B (en) Perform hybrid wear-leveling operations based on subtotal write counters
US10739996B1 (en) Enhanced garbage collection
US10228862B2 (en) Capacity-aware wear leveling in solid-state storage devices
KR102174293B1 (en) Proactive corrective action in memory based on probabilistic data structures
CN104572490B (en) Semiconductor devices and its operating method
US9251900B2 (en) Data scrambling based on transition characteristic of the data
CN112230843B (en) Limiting heat-cold exchange wear leveling
JPWO2016088234A1 (en) Storage device, storage device control method, and computer-readable non-volatile storage medium storing program
CN111651371A (en) Asymmetric plane management method, data storage device and controller thereof
TW201939500A (en) Decoding method and storage controller
CN107544915B (en) Storage system and its address mapping method and access method
CN101609431B (en) Operation method of flash memory device and flash memory device
CN112740189A (en) Multi-level wear leveling for non-volatile memory
US9880930B2 (en) Method for operating controller and method for operating device including the same
CN108257642A (en) Read threshold setting method and device
TWI575445B (en) Method, system, and computer-readable recording medium for automated storage tiering
CN109582527A (en) Storage server and solid state disk service life monitoring method thereof
TWI611405B (en) Method for writing data from memory back to storage device and data accessing system using the same
TW201621915A (en) Apparatus using one-time-programmable memory and method thereof