TWI720369B - Method for controlling resistive random-access memory - Google Patents

Method for controlling resistive random-access memory Download PDF

Info

Publication number
TWI720369B
TWI720369B TW107141761A TW107141761A TWI720369B TW I720369 B TWI720369 B TW I720369B TW 107141761 A TW107141761 A TW 107141761A TW 107141761 A TW107141761 A TW 107141761A TW I720369 B TWI720369 B TW I720369B
Authority
TW
Taiwan
Prior art keywords
data
access memory
random access
resistive random
write
Prior art date
Application number
TW107141761A
Other languages
Chinese (zh)
Other versions
TW201907405A (en
Inventor
簡才淦
邱瀝毅
林璟謙
Original Assignee
財團法人工業技術研究院
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 財團法人工業技術研究院 filed Critical 財團法人工業技術研究院
Priority to TW107141761A priority Critical patent/TWI720369B/en
Publication of TW201907405A publication Critical patent/TW201907405A/en
Application granted granted Critical
Publication of TWI720369B publication Critical patent/TWI720369B/en

Links

Images

Landscapes

  • For Increasing The Reliability Of Semiconductor Memories (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

A method for controlling a resistive random-access memory (ReRAM) is proposed. The method includes: calculating the number of a bit value in data when the data is written into the ReRAM; flipping each bit of the data if the number of the bit value is greater than half of the length of the data, and then writing the data into the ReRAM; and writing the data into the ReRAM as it is if the number of thebit values is less than half of the length of the data.

Description

電阻式隨機存取記憶體控制方法Resistive random access memory control method

本發明是有關於一種電阻式隨機存取記憶體(resistive random-access memory,可簡稱為RRAM或ReRAM),且特別是有關於電阻式隨機存取記憶體的控制方法。The present invention relates to a resistive random-access memory (RRAM or ReRAM for short), and particularly relates to a control method of the resistive random-access memory.

電阻式隨機存取記憶體是一種非揮發性記憶體(non-volatile memory)。在嵌入式系統(embedded system)中使用電阻式隨機存取記憶體與使用快閃記憶體(flash memory)相比,系統能夠擁有較高執行速度與較低的功率消耗。因此電阻式隨機存取記憶體有可能取代快閃記憶體成為下一世代的儲存裝置。但是現今的電阻式隨機存取記憶體的元件本身與電路設計都還在發展中,所以仍然有兩個可靠度問題,第一個是因為寫入的電阻式記憶體元件轉態失敗所遭遇到的寫入錯誤,第二個是高溫下元件阻值飄移而產生的資料維持錯誤。Resistive random access memory is a non-volatile memory (non-volatile memory). Compared with using flash memory in an embedded system, using resistive random access memory, the system can have higher execution speed and lower power consumption. Therefore, resistive random access memory may replace flash memory as the next generation storage device. However, the current resistive random access memory components and circuit design are still under development, so there are still two reliability problems. The first one is the failure of the written resistive memory component transition. The second is the data retention error caused by the drift of the component resistance at high temperature.

寫入錯誤指的是資料寫入電阻式隨機存取記憶體之後,裡面的電阻式記憶體元件儲存的值與寫入的值並不一致。會造成這種現象是因為製程變異的影響,使同一塊記憶體裡面的每一個元件所需要的轉態電壓(transition voltage)和轉態能量並不一致。同一塊電阻式隨機存取記憶體在寫入資料時通常使用同樣的轉態電壓和轉態時間,這時需要較大的轉態電壓或是較長的轉態時間的記憶體元件會因為電壓不足或是時間不夠而導致轉態失敗,造成記憶體裡面儲存的值與寫入值並不一致。A write error means that after data is written into the resistive random access memory, the value stored by the resistive memory element and the written value are not consistent. This phenomenon is caused because of the influence of process variation, so that the transition voltage and transition energy required by each element in the same memory are not consistent. The same resistive random access memory usually uses the same transition voltage and transition time when writing data. At this time, memory components that require a larger transition voltage or a longer transition time will suffer from insufficient voltage. Or the time is not enough and the transition fails, causing the value stored in the memory to be inconsistent with the written value.

資料維持錯誤指的是經過一段時間之後,從電阻式隨機存取記憶體讀出來的值與原先儲存的值不一致。之所以會產生這種錯誤是受元件阻值不安定的影響。電阻式隨機存取記憶體的阻值在高溫下會發生飄移現象,這樣導致阻值和原先寫入資料時的阻值不同,造成讀取出來的資料和一開始寫入的不相同。Data maintenance error means that the value read from the resistive random access memory is inconsistent with the originally stored value after a period of time. The reason for this error is due to the instability of the component resistance. The resistance value of the resistive random access memory will drift under high temperature, which causes the resistance value to be different from the resistance value when the data was originally written, and the data read out is different from the data written at the beginning.

本揭露提供一種電阻式隨機存取記憶體控制方法,以解決上述的可靠度問題。The present disclosure provides a resistive random access memory control method to solve the above-mentioned reliability problem.

本揭露的一種電阻式隨機存取記憶體控制方法包括以下步驟:當有一筆資料將要寫入電阻式隨機存取記憶體時,計算上述資料中的一種位元值的數量。若位元值的數量大於上述資料的長度的一半,則翻轉上述資料的每一位元,然後再將上述資料寫入電阻式隨機存取記憶體。若位元值的數量小於上述資料的長度的一半,則將上述資料維持原樣寫入至電阻式隨機存取記憶體。A resistive random access memory control method of the present disclosure includes the following steps: when a piece of data is to be written into the resistive random access memory, calculating the number of a bit value in the data. If the number of bit values is greater than half the length of the data, each bit of the data is flipped, and then the data is written into the resistive random access memory. If the number of bit values is less than half of the length of the data, the data is written to the resistive random access memory as it is.

本揭露的另一種電阻式隨機存取記憶體控制方法包括以下步驟:使用寫入電壓將一筆資料寫入至電阻式隨機存取記憶體。偵測上述資料寫入時的錯誤數量。若錯誤數量大於臨界值,則提高寫入電壓並重複以上步驟。Another resistive random access memory control method of the present disclosure includes the following steps: using a write voltage to write a piece of data into the resistive random access memory. Detect the number of errors when writing the above data. If the number of errors is greater than the critical value, increase the write voltage and repeat the above steps.

本揭露的另一種電阻式隨機存取記憶體控制方法包括以下步驟:使用第一錯誤校正碼編碼一筆資料,然後將上述資料寫入電阻式隨機存取記憶體。偵測上述資料寫入時的錯誤數量。若錯誤數量大於第一錯誤校正碼所對應的臨界值,則以第二錯誤校正碼取代第一錯誤校正碼並重複以上步驟。第二錯誤校正碼能校正的錯誤數量多於第一錯誤校正碼。Another resistive random access memory control method of the present disclosure includes the following steps: encoding a piece of data using a first error correction code, and then writing the data into the resistive random access memory. Detect the number of errors when writing the above data. If the number of errors is greater than the threshold value corresponding to the first error correction code, replace the first error correction code with the second error correction code and repeat the above steps. The second error correction code can correct more errors than the first error correction code.

本揭露的另一種電阻式隨機存取記憶體控制方法包括以下步驟:使用第一組寫入電壓將一筆資料寫入電阻式隨機存取記憶體。偵測上述資料寫入時的錯誤數量。若錯誤數量大於臨界值,則將上述資料存入等待暫存器內。若等待暫存器已經存滿資料,則使用第二組寫入電壓將等待暫存器所儲存的全部資料寫入至電阻式隨機存取記憶體。文中第二組寫入電壓高於第一組寫入電壓。Another resistive random access memory control method of the present disclosure includes the following steps: using a first set of write voltages to write a piece of data into the resistive random access memory. Detect the number of errors when writing the above data. If the number of errors is greater than the critical value, the above data will be stored in the waiting register. If the waiting register is full of data, the second set of write voltages is used to write all the data stored in the waiting register to the resistive random access memory. The writing voltage of the second group is higher than the writing voltage of the first group.

上述的電阻式隨機存取記憶體控制方法可解決資料寫入錯誤與高溫資料維持錯誤,以提高記憶體系統的可靠度與降低位元錯誤率。The above resistive random access memory control method can solve data writing errors and high temperature data maintenance errors, so as to improve the reliability of the memory system and reduce the bit error rate.

為讓本發明的上述特徵和優點能更明顯易懂,下文特舉實施例,並配合所附圖式作詳細說明如下。In order to make the above-mentioned features and advantages of the present invention more comprehensible, the following specific embodiments are described in detail in conjunction with the accompanying drawings.

本揭露的一實施例提供一種電阻式隨機存取記憶體控制方法,此控制方法包括兩種操作模式,也就是一般模式和高溫模式。一般模式適用於室溫環境下的記憶體操作,而高溫模式適用於高溫環境下的記憶體操作。此控制方法會在這兩種模式中為電阻式隨機存取記憶體的感測放大器(sense amplifier)分別設定不同的參考阻值(reference resistance),也會在這兩種模式中分別執行對應的非對稱性編碼。An embodiment of the present disclosure provides a resistive random access memory control method. The control method includes two operation modes, namely a normal mode and a high temperature mode. The general mode is suitable for memory operation in a room temperature environment, and the high temperature mode is suitable for memory operation in a high temperature environment. This control method will set different reference resistances for the sense amplifiers of the resistive random access memory in these two modes, and will also execute the corresponding values in these two modes. Asymmetric coding.

在對應一般模式的室溫下,電阻式記憶體元件的阻值飄移並不嚴重,寫入錯誤為主要的錯誤種類。所以在一般模式底下的操作是針對寫入錯誤去做處理。電阻式隨機存取記憶體的感測放大器的參考阻值是用來區分電阻式記憶體元件的阻值為高阻態(HRS: high resistance state)或是為低阻態(LRS: low resistance state)的阻值。圖1是依照本揭露的一實施例的電阻式隨機存取記憶體的寫入次數與感測放大器的最佳參考阻值的示意圖。圖1繪示在不同寫入次數下的感測放大器的最佳參考阻值。圖1的電阻值R1至R9和寫入次數的X皆由電阻式隨機存取記憶體的製程而決定。這個最佳參考阻值是根據在不同寫入次數下所量測得的高阻態(HRS)和低阻態(LRS)的阻值分佈而找出的。圖1的實驗結果顯示,在不同寫入次數下,感測放大器的最佳參考阻值都非常接近R1。所以可將一般模式的感測放大器的參考阻值定為R1,以得到最佳的良率。At room temperature corresponding to the general mode, the resistance drift of the resistive memory device is not serious, and write errors are the main type of error. Therefore, the operation under the general mode is to deal with write errors. The reference resistance value of the sense amplifier of the resistive random access memory is used to distinguish the resistance of the resistive memory element as high resistance state (HRS: high resistance state) or low resistance state (LRS: low resistance state). ) Resistance value. FIG. 1 is a schematic diagram of the number of write times of a resistive random access memory and the best reference resistance value of a sense amplifier according to an embodiment of the disclosure. Figure 1 shows the best reference resistance of the sense amplifier under different write times. The resistance values R1 to R9 of FIG. 1 and the number of write times X are all determined by the manufacturing process of the resistive random access memory. The best reference resistance value is found based on the resistance value distribution of high resistance state (HRS) and low resistance state (LRS) measured under different write times. The experimental result of Fig. 1 shows, under different writing times, the best reference resistance value of the sense amplifier is very close to R1. Therefore, the reference resistance of the sense amplifier in the general mode can be set as R1 to obtain the best yield.

電阻式隨機存取記憶體的寫入錯誤有不對稱的特性。在室溫下操作時,寫入高阻值操作(也稱作重置操作或reset,即寫入位元值1)的錯誤機率比寫入低阻值操作(也稱作設定操作或set,即寫入位元值0)還要高。在高溫下操作則相反,寫入低阻值的錯誤機率比寫入高阻值還要高。因此需要針對上述的寫入錯誤的不對稱特性執行非對稱性編碼。The write error of resistive random access memory has asymmetric characteristics. When operating at room temperature, the error probability of writing high resistance operation (also called reset operation or reset, that is, writing bit value 1) is higher than writing low resistance operation (also called setting operation or set, That is, the write bit value 0) is even higher. The opposite is true when operating at high temperatures. The error rate of writing a low resistance value is higher than writing a high resistance value. Therefore, it is necessary to perform asymmetric coding for the asymmetric characteristics of the above-mentioned write errors.

以下說明一般模式的非對稱性編碼。圖2A是依照本揭露的一實施例的一般模式的非對稱性編碼的示意圖。當有一筆資料將要寫入電阻式隨機存取記憶體時,計算上述資料中的位元值1的數量。若位元值1的數量小於上述資料的長度的一半,則將上述資料維持原樣寫入電阻式隨機存取記憶體。上述資料的長度也就是上述資料的位元數。例如圖2A之中的資料201是一筆八位元資料,其長度的一半等於4。因為資料201其中位元值1的數量為3,還不到資料201的長度的一半,所以資料201可維持原樣寫入電阻式隨機存取記憶體。旗標位元221是在本實施例中對應資料201的旗標位元。旗標位元221的數值為0表示資料201在寫入電阻式隨機存取記憶體時沒有翻轉(flipping),因此資料201在讀出電阻式隨機存取記憶體時也不必翻轉。The following describes the asymmetric coding of the general mode. FIG. 2A is a schematic diagram of asymmetric coding in a general mode according to an embodiment of the present disclosure. When there is a piece of data to be written into the resistive random access memory, the number of bit values 1 in the above data is calculated. If the number of bit values 1 is less than half of the length of the aforementioned data, the aforementioned data is written in the resistive random access memory as it is. The length of the above data is the number of bits of the above data. For example, the data 201 in FIG. 2A is a piece of octet data, and half of its length is equal to 4. Because the number of bit values 1 in the data 201 is 3, which is less than half the length of the data 201, the data 201 can be written into the resistive random access memory as it is. The flag bit 221 is the flag bit corresponding to the data 201 in this embodiment. The value of the flag bit 221 being 0 means that the data 201 is not flipped when being written into the resistive random access memory, so the data 201 does not need to be flipped when being read from the resistive random access memory.

當有一筆資料將要寫入電阻式隨機存取記憶體時,如果上述資料中的位元值1的數量大於上述資料的長度的一半,則翻轉上述資料的每一位元,也就是將位元值1全翻轉為位元值0,並將位元值0全翻轉為位元值1,然後將此筆資料寫入電阻式隨機存取記憶體。例如圖2A中的資料202,其中位元值1的數量為6,已經超出資料202的長度的一半。所以先將資料202翻轉為資料203,然後將資料203寫入電阻式隨機存取記憶體。因為資料202經過翻轉才寫入電阻式隨機存取記憶體,所以將對應的旗標位元222設立為1,這表示資料203在讀出電阻式隨機存取記憶體時必須翻轉以還原為資料202。旗標位元221和222可儲存在同一個電阻式隨機存取記憶體,或儲存在另一個記憶體。When there is a piece of data to be written into the resistive random access memory, if the number of bit values 1 in the above data is greater than half the length of the above data, each bit of the above data is flipped, that is, the bit The value 1 is fully flipped to the bit value 0, and the bit value 0 is fully flipped to the bit value 1, and then this data is written into the resistive random access memory. For example, the data 202 in FIG. 2A, in which the number of bit values 1 is 6, has exceeded half of the length of the data 202. Therefore, the data 202 is first flipped into the data 203, and then the data 203 is written into the resistive random access memory. Because the data 202 is reversed before being written into the resistive random access memory, the corresponding flag bit 222 is set to 1, which means that the data 203 must be reversed to restore to data when reading the resistive random access memory 202. The flag bits 221 and 222 can be stored in the same resistive random access memory or in another memory.

圖2A所示的非對稱性編碼可降低一筆資料中所含有的高阻態(位元值1)的數量並提高低阻態(位元值0)的數量,以降低此筆資料發生寫入錯誤的機率。The asymmetric encoding shown in Figure 2A can reduce the number of high-impedance states (bit value 1) contained in a piece of data and increase the number of low-impedance states (bit value 0) to reduce the writing of this piece of data. Probability of error.

以下說明上述的電阻式隨機存取記憶體控制方法的高溫模式。高溫模式是為了改善高溫下的阻值飄移所造成的資料維持錯誤。依據實驗現象,低阻值狀態會向高阻值飄移,而高阻值狀態最低飄移到阻值邊界R2。換句話說,電阻式隨機存取記憶體中的阻值大於R2的電阻式記憶體元件在高溫下,不管阻值飄移如何劇烈,最後的阻值一定還是大於R2。從這些高阻態元件讀取出來的位元值仍然為"1",完全不會受到阻值飄移的影響。The high temperature mode of the above-mentioned resistive random access memory control method is described below. The high temperature mode is to improve the data maintenance error caused by the resistance drift at high temperature. According to experimental phenomena, the low-resistance state will drift to the high-resistance value, and the high-resistance state will drift to the resistance boundary R2 the lowest. In other words, a resistive memory device with a resistance greater than R2 in a resistive random access memory will have a final resistance greater than R2 no matter how severe the resistance drift is at high temperatures. The bit value read from these high-resistance devices is still "1" and will not be affected by resistance drift at all.

上述的實施例中,一般模式的感測放大器的參考阻值為R1,高溫模式的參考阻值為R2。在另一實施例中,圖1和表1的實驗結果可能會變動,因此一般模式和高溫模式下的參考阻值可能是其他數值。In the above embodiment, the reference resistance value of the sense amplifier in the general mode is R1, and the reference resistance value in the high temperature mode is R2. In another embodiment, the experimental results of FIG. 1 and Table 1 may vary, so the reference resistance values in the normal mode and the high temperature mode may be other values.

高溫模式下的非對稱性編碼和一般模式是相反的。因為透過感測放大器的參考阻值的調整,高溫下,在低阻態的電阻式記憶體元件較易發生資料維持錯誤。所以高溫模式下的非對稱性編碼的目的是要降低位元值0的數量,以減少資料發生錯誤的機率。The asymmetric coding in the high temperature mode is opposite to the general mode. Because of the adjustment of the reference resistance of the sense amplifier, at high temperatures, resistive memory devices in the low resistance state are more prone to data maintenance errors. Therefore, the purpose of asymmetric coding in high temperature mode is to reduce the number of bit values 0 to reduce the probability of data errors.

圖2B是依照本揭露的一實施例的高溫模式的非對稱性編碼的示意圖。當有一筆資料將要寫入電阻式隨機存取記憶體時,如果上述資料中的位元值0的數量大於上述資料的長度的一半,則翻轉上述資料的每一位元,然後將此筆資料寫入電阻式隨機存取記憶體。例如圖2B中的資料201,其中位元值0的數量為5,已經超出資料201的長度的一半。所以先將資料201翻轉為資料204,然後將資料204寫入電阻式隨機存取記憶體。因為資料201經過翻轉才寫入電阻式隨機存取記憶體,所以將對應的旗標位元223設立為1,這表示資料204在讀出電阻式隨機存取記憶體時必須翻轉以還原為資料201。FIG. 2B is a schematic diagram of asymmetric encoding in a high temperature mode according to an embodiment of the disclosure. When there is a piece of data to be written into the resistive random access memory, if the number of bit values 0 in the above data is greater than half the length of the above data, each bit of the above data is flipped, and then this data Write resistive random access memory. For example, the data 201 in FIG. 2B, in which the number of bit values 0 is 5, has exceeded half of the length of the data 201. Therefore, the data 201 is first flipped into the data 204, and then the data 204 is written into the resistive random access memory. Because the data 201 is reversed before being written into the resistive random access memory, the corresponding flag bit 223 is set to 1, which means that the data 204 must be reversed to be restored to data when reading the resistive random access memory 201.

當有一筆資料將要寫入電阻式隨機存取記憶體時,如果上述資料中的位元值0的數量小於上述資料的長度的一半,則將上述資料維持原樣寫入電阻式隨機存取記憶體。例如圖2B之中的資料202其中位元值0的數量為2,還不到資料202的長度的一半,所以資料202可維持原樣寫入電阻式隨機存取記憶體。旗標位元224是在本實施例中對應資料202的旗標位元。旗標位元224的數值為0表示資料202在寫入電阻式隨機存取記憶體時沒有翻轉,因此資料202在讀出電阻式隨機存取記憶體時也不必翻轉。旗標位元223和224可儲存在同一個電阻式隨機存取記憶體,或儲存在另一個記憶體。When a piece of data is to be written into the resistive random access memory, if the number of bit values 0 in the above data is less than half of the length of the above data, the above data will be written into the resistive random access memory as it is . For example, in the data 202 in FIG. 2B, the number of bit values 0 is 2, which is less than half the length of the data 202, so the data 202 can be written into the resistive random access memory as it is. The flag bit 224 is the flag bit corresponding to the data 202 in this embodiment. The value of the flag bit 224 being 0 means that the data 202 is not flipped when being written into the RRAM. Therefore, the data 202 does not need to be flipped when the RRAM is read. The flag bits 223 and 224 can be stored in the same resistive random access memory, or in another memory.

以下說明用於劃分一般模式和高溫模式的切換溫度是如何設定。圖3繪示依照本揭露的一實施例將電阻式隨機存取記憶體在不同溫度下長時間放置並以兩種不同模式操作的位元錯誤率(BER: bit error rate)和溫度之間的關係。圖3當中的溫度Temp1至Temp6皆由電阻式隨機存取記憶體的製程決定。由圖3可以發現在常溫時高溫模式的位元錯誤率高於一般模式,原因如前面所提到的,因為低溫時的資料飄移錯誤並不嚴重,所以操作在高溫模式底下並沒有得到很多好處,反而是因為感測放大器的參考阻值的改變造成寫入錯誤增加而導致位元錯誤率變高。在圖3可以觀察到Temp3為一般模式和高溫模式的位元錯誤率曲線的交叉點,這是因為在大於Temp3的時候阻值飄移所造成的資料維持錯誤開始變得比寫入錯誤更嚴重,這時切入高溫模式可以降低位元錯誤率。所以本實施例的一般模式和高溫模式的切換溫度可以定在Temp3。在另一實施例中,圖3的實驗結果可能有變動,所以切換溫度可能設定為不同溫度。The following explains how to set the switching temperature for dividing the normal mode and the high temperature mode. FIG. 3 shows the relationship between the bit error rate (BER: bit error rate) and temperature of a resistive random access memory placed at different temperatures for a long time and operating in two different modes according to an embodiment of the present disclosure relationship. The temperatures Temp1 to Temp6 in FIG. 3 are all determined by the manufacturing process of the resistive random access memory. From Figure 3, it can be found that the bit error rate of the high temperature mode is higher than that of the normal mode at normal temperature. The reason is as mentioned above. Because the data drift error at low temperature is not serious, the operation in the high temperature mode does not get many benefits. , On the contrary, the change in the reference resistance of the sense amplifier causes the write error to increase and the bit error rate becomes higher. In Figure 3, it can be observed that Temp3 is the intersection of the bit error rate curves of the normal mode and the high temperature mode. This is because the data maintenance error caused by the resistance drift when it is greater than Temp3 begins to become more serious than the write error. Switching to high temperature mode at this time can reduce the bit error rate. Therefore, the switching temperature between the general mode and the high temperature mode of this embodiment can be set at Temp3. In another embodiment, the experimental result of FIG. 3 may vary, so the switching temperature may be set to a different temperature.

圖4是依照本揭露的一實施例的一種電阻式隨機存取記憶體控制方法的模式切換的流程圖。在步驟410,依照一般模式操作電阻式隨機存取記憶體,也就是使用一般模式所對應的感測放大器的參考阻值和非對稱性編碼。在步驟420,可偵測電阻式隨機存取記憶體的溫度並檢查電阻式隨機存取記憶體的溫度是否大於切換溫度Temp3。如果電阻式隨機存取記憶體的溫度不大於切換溫度,則流程返回步驟410。如果電阻式隨機存取記憶體的溫度大於切換溫度,則在步驟430切換至高溫模式。4 is a flowchart of mode switching of a resistive random access memory control method according to an embodiment of the disclosure. In step 410, the resistive random access memory is operated according to the general mode, that is, the reference resistance and the asymmetric code of the sense amplifier corresponding to the general mode are used. In step 420, the temperature of the resistive random access memory can be detected and check whether the temperature of the resistive random access memory is greater than the switching temperature Temp3. If the temperature of the resistive random access memory is not greater than the switching temperature, the process returns to step 410. If the temperature of the resistive random access memory is greater than the switching temperature, it switches to the high temperature mode in step 430.

在切換模式的時候需要做整塊電阻式隨機存取記憶體的資料刷新。如果舊資料沒有刷新,切換到新的模式去做讀取舊資料的動作,會因為舊的資料儲存時所使用的感測放大器的參考阻值和現在的感測放大器的參考阻值不一樣而導致讀取出來的資料跟原本儲存的資料不一致。因此步驟430包括步驟431~433。在步驟431,沿用一般模式的電阻式隨機存取記憶體的感測放大器的參考阻值(R1)讀出電阻式隨機存取記憶體的全部資料,然後在步驟432依照高溫模式將上述全部資料寫回電阻式隨機存取記憶體,然後在步驟433將電阻式隨機存取記憶體的感測放大器的參考阻值設定為高溫模式所對應的參考阻值(R2)。When switching modes, it is necessary to refresh the data of the entire resistive random access memory. If the old data is not refreshed, switch to the new mode to read the old data. It will be because the reference resistance of the sense amplifier used when storing the old data is different from the reference resistance of the current sense amplifier. As a result, the read data is inconsistent with the original stored data. Therefore, step 430 includes steps 431 to 433. In step 431, the reference resistance value (R1) of the sense amplifier of the resistive random access memory in the normal mode is used to read all the data of the resistive random access memory, and then in step 432, all the data in the above-mentioned Write back to the resistive random access memory, and then set the reference resistance of the sense amplifier of the resistive random access memory to the reference resistance (R2) corresponding to the high temperature mode in step 433.

接下來,在步驟440依照高溫模式操作電阻式隨機存取記憶體,也就是使用高溫模式所對應的感測放大器的參考阻值和非對稱性編碼。在步驟450,可偵測電阻式隨機存取記憶體的溫度並檢查電阻式隨機存取記憶體的溫度是否小於切換溫度Temp3。如果電阻式隨機存取記憶體的溫度不小於切換溫度,則流程返回步驟440。如果電阻式隨機存取記憶體的溫度小於切換溫度,則在步驟460切換至一般模式,然後流程返回步驟410。Next, in step 440, the resistive random access memory is operated according to the high temperature mode, that is, the reference resistance and the asymmetric code of the sense amplifier corresponding to the high temperature mode are used. In step 450, the temperature of the resistive random access memory can be detected and check whether the temperature of the resistive random access memory is less than the switching temperature Temp3. If the temperature of the resistive random access memory is not less than the switching temperature, the process returns to step 440. If the temperature of the resistive random access memory is lower than the switching temperature, the normal mode is switched in step 460, and then the flow returns to step 410.

步驟460類似步驟430,也就是沿用高溫模式的電阻式隨機存取記憶體的感測放大器的參考阻值(R2)讀出電阻式隨機存取記憶體的全部資料,然後依照一般模式將上述全部資料寫回電阻式隨機存取記憶體,然後將電阻式隨機存取記憶體的感測放大器的參考阻值設定為一般模式所對應的參考阻值(R1)。Step 460 is similar to step 430, that is, the reference resistance (R2) of the sense amplifier of the resistive random access memory in the high temperature mode is used to read all the data of the resistive random access memory, and then all the above-mentioned data are read according to the general mode. The data is written back to the resistive random access memory, and then the reference resistance value of the sense amplifier of the resistive random access memory is set to the reference resistance value (R1) corresponding to the normal mode.

在本揭露的另一實施例中,可以等到電阻式隨機存取記憶體的溫度穩定後再做模式切換。例如步驟420可改為當電阻式隨機存取記憶體的溫度大於切換溫度Temp3的時間已達到預設時間長度才進入步驟430以切換至高溫模式。步驟450可改為當電阻式隨機存取記憶體的溫度小於切換溫度Temp3的時間已達到預設時間長度才進入步驟460以切換至一般模式。如此可避免重覆切換模式而發生錯誤或降低記憶體讀寫效率。In another embodiment of the present disclosure, the mode switching can be performed after the temperature of the resistive random access memory stabilizes. For example, step 420 can be changed to enter step 430 to switch to the high temperature mode when the temperature of the resistive random access memory is greater than the switching temperature Temp3 for a preset time period. Step 450 can be changed to enter step 460 to switch to the normal mode when the temperature of the resistive random access memory is less than the switching temperature Temp3 for a preset time period. This can prevent errors from repeatedly switching modes or reduce memory read and write efficiency.

圖5是依照本揭露的一實施例的一種電阻式隨機存取記憶體控制方法的資料寫入的流程圖。圖5的方法流程使用一組依序升高的電壓做資料寫入。對於電阻式隨機存取記憶體來說,使用較高的寫入電壓會有較高的機率使電阻式記憶體元件轉態,但是過高的寫入電壓可能使電阻式記憶體元件過度轉態,導致此元件無法再轉態而固定在位元值0或1,而造成元件的損毀。所以本實施例使用依序提高寫入電壓的方式來提高轉態成功機率。5 is a flowchart of data writing in a resistive random access memory control method according to an embodiment of the disclosure. The method flow of FIG. 5 uses a set of sequentially increasing voltages for data writing. For resistive random access memory, using a higher write voltage has a higher probability of turning the resistive memory device, but too high write voltage may cause the resistive memory device to turn excessively , Resulting in the device can no longer change state and fixed at the bit value of 0 or 1, resulting in damage to the device. Therefore, in this embodiment, a method of sequentially increasing the write voltage is used to increase the probability of successful transition.

以下說明圖5的方法流程。在步驟510,使用預設的寫入電壓將一筆資料寫入電阻式隨機存取記憶體。在步驟520,偵測上述資料的寫入錯誤的數量,也就是從被寫入的電阻式記憶體元件讀出剛才寫入的資料,和原先寫入的值做比較,計算其中數值不一致的位元數量。步驟520的偵測可由電阻式隨機存取記憶體的內部電路執行,或由電阻式隨機存取記憶體的控制器執行。The flow of the method in FIG. 5 is described below. In step 510, a preset write voltage is used to write a piece of data into the resistive random access memory. In step 520, the number of write errors of the above data is detected, that is, the data that has just been written is read from the resistive memory device being written, and compared with the previously written value, the bits with inconsistent values are calculated. The number of yuan. The detection of step 520 can be performed by the internal circuit of the resistive random access memory, or by the controller of the resistive random access memory.

在步驟530,檢查上述的錯誤數量是否大於一個錯誤校正的臨界值。若錯誤數量不大於臨界值,則此筆資料的寫入已經完成。若錯誤數量大於臨界值,則在步驟540提高寫入電壓,然後重複以上步驟。In step 530, it is checked whether the above-mentioned number of errors is greater than a critical value for error correction. If the number of errors is not greater than the critical value, the writing of this data has been completed. If the number of errors is greater than the critical value, the write voltage is increased in step 540, and then the above steps are repeated.

如果上述資料未經過錯誤校正碼(error correction code)的編碼而直接寫入電阻式隨機存取記憶體,則步驟530的臨界值等於0。如果上述資料先經過錯誤校正碼的編碼然後寫入電阻式隨機存取記憶體,則步驟530的臨界值等於該錯誤校正碼能校正的錯誤數量。If the above data is directly written into the resistive random access memory without error correction code encoding, the threshold value of step 530 is equal to zero. If the above data is encoded by the error correction code and then written into the resistive random access memory, the threshold of step 530 is equal to the number of errors that the error correction code can correct.

寫入電壓通常有預設的數量,例如本實施例使用八階的寫入電壓。對於重置操作而言,第一次的寫入電壓為-V1,第二次的寫入電壓為-V2,第三次的寫入電壓為-V3,依此類推。最後的第八次的寫入電壓為-V8。對於設定操作則相反,第一次的寫入電壓為+V1,第二次的寫入電壓為+V2,第三次的寫入電壓為+V3,依此類推。最後的第八次的寫入電壓為+V8。寫入資料時無論是重置操作或設定操作,寫入電壓都是逐次升高。因為這兩種操作的寫入電壓的方向相反,所以這兩種操作的寫入電壓有不同的正負號。如果使用最後一個寫入電壓之後,寫入錯誤的數量仍然大於臨界值,表示資料寫入失敗。The write voltage usually has a preset number. For example, an eight-level write voltage is used in this embodiment. For the reset operation, the first write voltage is -V1, the second write voltage is -V2, the third write voltage is -V3, and so on. The last eighth write voltage is -V8. For the setting operation, the opposite is true, the first writing voltage is +V1, the second writing voltage is +V2, the third writing voltage is +V3, and so on. The last eighth write voltage is +V8. When writing data, whether it is a reset operation or a setting operation, the writing voltage is gradually increased. Because the directions of the write voltages of the two operations are opposite, the write voltages of the two operations have different signs. If the number of write errors is still greater than the critical value after the last write voltage is used, it means that the data write failed.

在另一實施例中,寫入電壓的數量與數值皆可隨電阻式隨機存取記憶體的設計而改變。In another embodiment, the number and value of the write voltage can be changed according to the design of the resistive random access memory.

圖6是依照本揭露的另一實施例的一種電阻式隨機存取記憶體控制方法的資料寫入的流程圖。本實施例使用多種錯誤校正碼來進行資料寫入。先在步驟610使用第一錯誤校正碼編碼一筆資料,然後在步驟620將此筆資料寫入電阻式隨機存取記憶體。在步驟630,偵測此筆資料寫入時的錯誤數量。在步驟640,檢查此錯誤數量是否大於此錯誤校正碼所對應的臨界值。若錯誤數量不大於臨界值,則此筆資料的寫入完成。反之,若錯誤數量大於臨界值,則在步驟650改用另一種校正能力更強(也就是能校正的錯誤數量更多)的第二錯誤校正碼來編碼此筆資料,然後返回步驟620。步驟640的臨界值可以是目前的錯誤校正碼所能校正的錯誤數量。6 is a flowchart of data writing in a resistive random access memory control method according to another embodiment of the disclosure. This embodiment uses multiple error correction codes to write data. First, in step 610, the first error correction code is used to encode a piece of data, and then in step 620, this piece of data is written into the resistive random access memory. In step 630, the number of errors in writing the data is detected. In step 640, it is checked whether the number of errors is greater than the threshold value corresponding to the error correction code. If the number of errors is not greater than the critical value, the writing of this data is completed. Conversely, if the number of errors is greater than the critical value, in step 650, another second error correction code with stronger correction capability (that is, more errors can be corrected) is used to encode the data, and then step 620 is returned. The critical value of step 640 may be the number of errors that can be corrected by the current error correction code.

根據圖6流程,當資料寫入的錯誤數量超出臨界值,則可使用能校正更多錯誤的錯誤校正碼來進行資料寫入,直到錯誤數量小於或等於臨界值為止。錯誤校正碼能校正的錯誤愈多,其編碼和解碼所需的時間就愈長。依照圖6流程,可讓每一筆資料都使用合適的錯誤校正碼來編碼,這樣不僅能確保資料的錯誤校正能力,同時也能避免過長的編碼和解碼時間。According to the process of FIG. 6, when the number of errors in data writing exceeds the threshold, an error correction code that can correct more errors can be used to write data until the number of errors is less than or equal to the threshold. The more errors an error correction code can correct, the longer it takes to encode and decode. According to the process shown in Figure 6, each piece of data can be encoded with an appropriate error correction code, which not only ensures the error correction capability of the data, but also avoids excessive encoding and decoding time.

舉例而言,在某一筆資料的第一次寫入時,第一錯誤校正碼可用漢明碼(Hamming code)。在同一筆資料的第二次寫入時,第二錯誤校正碼則可用BCH碼(BCH code)。漢明碼的規格為(12, 8, 1),也就是輸入資料的長度為8個位元,編碼後的資料長度為12個位元,能夠校正不超出1個位元的錯誤。漢明碼的編碼和解碼所需的時間皆為1個時脈週期。另一方面,BCH碼的規格為(56, 32, 4),也就是輸入資料的長度為32個位元,編碼後的資料長度為56個位元,能夠校正不超出4個位元的錯誤。BCH碼的編碼需要56個時脈週期,解碼則需要159個時脈週期。For example, when writing a certain piece of data for the first time, the first error correction code can be a Hamming code. When the same data is written for the second time, the second error correction code can be BCH code (BCH code). The specification of Hamming code is (12, 8, 1), that is, the length of the input data is 8 bits, and the length of the encoded data is 12 bits, which can correct errors that do not exceed 1 bit. The time required for the encoding and decoding of the Hamming code is 1 clock cycle. On the other hand, the specification of the BCH code is (56, 32, 4), that is, the length of the input data is 32 bits, and the length of the encoded data is 56 bits, which can correct errors that do not exceed 4 bits. . The encoding of the BCH code requires 56 clock cycles, and the decoding requires 159 clock cycles.

在另一實施例中,可結合圖5與圖6的方法流程以執行資料寫入。例如可預設N個逐漸升高的寫入電壓,其中N為大於1的正整數。當有一筆資料將要寫入電阻式隨機存取記憶體,可先用一種錯誤校正碼並依次使用這N個寫入電壓其中之一來寫入此筆資料。如果用到最後一個寫入電壓,寫入錯誤的數量仍然大於臨界值,就改用另一種能校正更多錯誤的錯誤校正碼並依次使用同樣的N個寫入電壓其中之一來寫入此筆資料,依此類推。這樣的寫入流程可用雙層迴圈來表示,內層迴圈對應圖5流程,外層迴圈則對應圖6流程。In another embodiment, the method flow of FIG. 5 and FIG. 6 can be combined to perform data writing. For example, N gradually increasing write voltages can be preset, where N is a positive integer greater than one. When a piece of data is to be written into the resistive random access memory, an error correction code can be used first and one of the N write voltages is used in turn to write the data. If the last write voltage is used, and the number of write errors is still greater than the critical value, use another error correction code that can correct more errors and use one of the same N write voltages to write this in turn Data, and so on. Such a writing process can be represented by a double-layer loop, the inner loop corresponds to the flow in Figure 5, and the outer loop corresponds to the flow in Figure 6.

在高溫模式下,步驟640的臨界值可隨著資料的不同而改變,而不是固定在同一個值。因為在高溫模式下,阻值飄移所產生的資料維持錯誤變成是產生錯誤的主要原因。在常溫下的臨界值只考慮轉態失敗所產生的寫入錯誤,並沒有把阻值飄移所產生的資料維持錯誤考慮進去,結果會導致選用的錯誤校正碼不能有效地同時解決寫入錯誤和資料維持錯誤。In the high temperature mode, the critical value of step 640 can be changed with different data, instead of being fixed at the same value. Because in the high temperature mode, the data maintenance error caused by the resistance drift becomes the main reason for the error. The threshold value at room temperature only considers the write error caused by the transition failure, and does not take into account the data maintenance error caused by the resistance drift. As a result, the selected error correction code cannot effectively solve the write error and the write error at the same time. Data maintenance error.

在高溫模式下,因為高阻值向低阻值飄移有阻值邊界並且加上感測放大器的參考阻值的調整,使得資料維持錯誤在低阻態的電阻式記憶體元件較易發生,所以阻值飄移產生的錯誤機率跟資料中的位元值0的數量成正比。In the high temperature mode, because the high resistance value drifts to the low resistance value, there is a resistance boundary and the adjustment of the reference resistance value of the sense amplifier makes it easier to maintain the data error in the resistance memory device in the low resistance state, so The error probability of resistance drift is proportional to the number of bit values 0 in the data.

步驟630所偵測的錯誤為轉態失敗所造成的寫入錯誤。因為錯誤校正碼能夠校正錯誤的數量是固定的,如果需要校正愈多的寫入錯誤,能校正的資料維持錯誤就愈少。因此,錯誤校正碼可容忍的寫入錯誤數量會隨著資料中的位元值0的數量增加而減少。也就是隨著資料中的位元值0的數量增加,錯誤校正碼就預留更多校正能力給阻值飄移所產生的資料維持錯誤。The error detected in step 630 is a write error caused by a transition failure. Because the number of errors that the error correction code can correct is fixed, if more write errors need to be corrected, the less data can be corrected to maintain errors. Therefore, the number of write errors that the error correction code can tolerate will decrease as the number of bit values 0 in the data increases. That is, as the number of bit values 0 in the data increases, the error correction code reserves more correction capabilities to maintain errors in the data caused by the resistance drift.

基於以上原因,可在高溫模式根據資料中的位元值0的數量調整步驟640的臨界值,如圖7所示。圖7依照本揭露的一實施例繪示兩種錯誤校正碼(漢明碼和BCH碼)所對應的臨界值和將要寫入的資料中的位元值0的數量之間的關係。從圖7可看出,漢明碼對應的臨界值是上述資料其中位元值0的數量的遞減函數,而且此臨界值的上限為漢明碼能校正的錯誤數量,也就是1。BCH碼對應的臨界值也是上述資料其中位元值0的數量的遞減函數,而且此臨界值的上限為BCH碼能校正的錯誤數量,也就是4。這樣的臨界值調整能同時顧及寫入錯誤和資料維持錯誤。For the above reasons, the critical value of step 640 can be adjusted according to the number of bit values 0 in the data in the high temperature mode, as shown in FIG. 7. FIG. 7 illustrates the relationship between the threshold values corresponding to two error correction codes (Hamming code and BCH code) and the number of bit values 0 in the data to be written according to an embodiment of the present disclosure. It can be seen from Fig. 7 that the critical value corresponding to the Hamming code is a decreasing function of the number of bit values 0 in the above data, and the upper limit of this critical value is the number of errors that the Hamming code can correct, which is 1. The critical value corresponding to the BCH code is also a decreasing function of the number of bit values 0 in the above data, and the upper limit of the critical value is the number of errors that the BCH code can correct, which is 4. Such threshold adjustment can take into account write errors and data maintenance errors at the same time.

圖8是依照本揭露的一實施例的一種電阻式隨機存取記憶體控制方法的資料寫入的流程圖。當有一筆資料將要寫入電阻式隨機存取記憶體時,首先在步驟805使用第一錯誤校正碼編碼此筆資料。在步驟810對此筆資料使用非對稱性編碼。在步驟815將經過上述編碼的此筆資料寫入電阻式隨機存取記憶體。在步驟820偵測此筆資料寫入時的錯誤數量。在步驟825檢查此錯誤數量是否大於臨界值T1。若錯誤數量不大於臨界值T1,則此筆資料的寫入完成。若錯誤數量大於臨界值T1,則流程進入步驟830。FIG. 8 is a flowchart of data writing in a resistive random access memory control method according to an embodiment of the disclosure. When there is a piece of data to be written into the resistive random access memory, the first error correction code is used to encode this piece of data in step 805. In step 810, asymmetric coding is used for this piece of data. In step 815, the above-mentioned encoded data is written into the resistive random access memory. In step 820, the number of errors in writing the data is detected. In step 825, it is checked whether the number of errors is greater than the critical value T1. If the number of errors is not greater than the critical value T1, the writing of this data is completed. If the number of errors is greater than the critical value T1, the process proceeds to step 830.

在步驟830使用第二錯誤校正碼編碼此筆資料。在步驟835對此筆資料使用非對稱性編碼。在步驟840將經過上述編碼的此筆資料寫入電阻式隨機存取記憶體。在步驟845偵測此筆資料寫入時的錯誤數量。在步驟850檢查此錯誤數量是否大於臨界值T2。若錯誤數量不大於臨界值T2,則此筆資料的寫入完成。若錯誤數量大於臨界值T2,則流程進入步驟860。In step 830, the second error correction code is used to encode the data. In step 835, asymmetric coding is used for this piece of data. In step 840, the above-mentioned encoded data is written into the resistive random access memory. In step 845, the number of errors in writing the data is detected. In step 850, it is checked whether the number of errors is greater than the critical value T2. If the number of errors is not greater than the critical value T2, the writing of this data is completed. If the number of errors is greater than the critical value T2, the process proceeds to step 860.

一般模式下,步驟810和步驟835的非對稱性編碼是增加資料中位元值0的數量以降低寫入錯誤的發生機率,如圖2A所示。高溫模式下,步驟810和步驟835的非對稱性編碼則是增加資料中位元值1的數量以降低阻值飄移發生的錯誤,如圖2B所示。In the general mode, the asymmetric encoding in step 810 and step 835 is to increase the number of bit values 0 in the data to reduce the probability of writing errors, as shown in FIG. 2A. In the high temperature mode, the asymmetric encoding in step 810 and step 835 is to increase the number of bit values 1 in the data to reduce resistance drift errors, as shown in FIG. 2B.

一般模式下,步驟825的臨界值T1就是第一錯誤校正碼能校正的錯誤數量。高溫模式下,步驟825的臨界值T1則會隨資料中的位元值0的數量而遞減,如圖7所示。同理,一般模式下,步驟850的臨界值T2就是第二錯誤校正碼能校正的錯誤數量。高溫模式下,步驟850的臨界值T2則會隨資料中的位元值0的數量而遞減,如圖7所示。一般模式下的臨界值T1和T2是固定的,只考慮寫入錯誤。高溫模式下的臨界值T1和T2則會同時考慮寫入錯誤和資料維持錯誤,所以會根據資料中位元值0的數量而調整。In the normal mode, the threshold T1 of step 825 is the number of errors that can be corrected by the first error correction code. In the high temperature mode, the threshold T1 of step 825 will decrease with the number of bit values 0 in the data, as shown in FIG. 7. Similarly, in the general mode, the threshold T2 in step 850 is the number of errors that can be corrected by the second error correction code. In the high temperature mode, the threshold T2 of step 850 will decrease with the number of bit values 0 in the data, as shown in FIG. 7. The critical values T1 and T2 in the general mode are fixed, and only write errors are considered. In the high temperature mode, the thresholds T1 and T2 will consider both write errors and data maintenance errors, so they will be adjusted according to the number of bit values 0 in the data.

步驟860是集中先前寫入失敗的資料,也就是未通過步驟825和步驟850的檢查的資料,再使用更高的寫入電壓將這些資料整批寫入電阻式隨機存取記憶體。在某些實施例中,調整寫入電壓需要一段時間,如果每一筆資料都需要調整寫入電壓,會降低記憶體的效率。所以需要步驟860的暫存與整批寫入機制。Step 860 is to concentrate the previously written data, that is, the data that did not pass the checks in step 825 and step 850, and then write these data in batches to the resistive random access memory using a higher writing voltage. In some embodiments, it takes a period of time to adjust the writing voltage. If the writing voltage needs to be adjusted for each piece of data, the efficiency of the memory will be reduced. Therefore, the temporary storage and bulk write mechanism of step 860 is required.

步驟860包括步驟861~865。在步驟861將未通過步驟850的檢查的資料存入一個等待暫存器(waiting register)。在步驟862檢查等待暫存器是否已經存滿資料。如果等待暫存器尚未存滿資料,則此筆資料已經暫存,流程暫時至此結束。如果等待暫存器已經存滿資料,則在步驟863提高寫入電壓,然後在步驟864將等待暫存器所儲存的全部資料寫入電阻式隨機存取記憶體。在步驟864所使用的寫入電壓高於步驟815和步驟840所使用的寫入電壓。然後在步驟865將寫入電壓降低為先前步驟815和步驟840所使用的寫入電壓。資料寫入的流程至此完成。Step 860 includes steps 861 to 865. In step 861, the data that did not pass the check in step 850 are stored in a waiting register. In step 862, it is checked whether the waiting register is full of data. If the waiting register is not full of data, the data has been temporarily stored, and the process ends here temporarily. If the waiting register is full of data, the writing voltage is increased in step 863, and then all the data stored in the waiting register is written into the resistive random access memory in step 864. The write voltage used in step 864 is higher than the write voltage used in step 815 and step 840. Then, in step 865, the write voltage is reduced to the write voltage used in the previous steps 815 and 840. The data writing process is now complete.

從圖8可看出步驟805~825和步驟830~850的差別在於使用不同的錯誤校正碼。步驟805~825對應第一錯誤校正碼。步驟830~850對應第二錯誤校正碼。在另一實施例中,可調整錯誤校正碼的種類與數量。可以只使用一種錯誤校正碼,也可以使用至少三種錯誤校正碼。愈後面使用的錯誤校正碼具有愈高的錯誤校正能力。It can be seen from Figure 8 that the difference between steps 805 to 825 and steps 830 to 850 lies in the use of different error correction codes. Steps 805 to 825 correspond to the first error correction code. Steps 830 to 850 correspond to the second error correction code. In another embodiment, the type and quantity of error correction codes can be adjusted. Only one type of error correction code may be used, or at least three types of error correction codes may be used. The error correction code used later has a higher error correction capability.

在另一實施例中,步驟815、840和864可採用類似圖5流程的多階寫入電壓來寫入資料。可預先定義一個包括M個寫入電壓V1,1 , V1,2 … V1,M 的遞增數列,以及另一個包括N個寫入電壓V2,1 , V2,2 … V2,N 的遞增數列。M和N皆為大於一的整數。M和N可以相同,也可以不同。寫入電壓V2,1 大於寫入電壓V1,M 。步驟815和840可依次使用寫入電壓V1,1 ~V1,M 其中之一來寫入資料。步驟864可依次使用寫入電壓V2,1 ~V2,N 其中之一來寫入資料。In another embodiment, steps 815, 840, and 864 may use multi-level write voltages similar to the process in FIG. 5 to write data. It is possible to predefine an increasing sequence of M writing voltages V 1,1 , V 1,2 … V 1,M , and another including N writing voltages V 2,1 , V 2,2 … V 2, Increasing sequence of N. Both M and N are integers greater than one. M and N can be the same or different. The write voltage V 2,1 is greater than the write voltage V 1,M . Steps 815 and 840 can use one of the writing voltages V 1,1 to V 1,M to write data in sequence. In step 864, one of the writing voltages V 2,1 to V 2,N can be used to write data in sequence.

圖9是依照本揭露的一實施例的一種控制器920與一種電阻式隨機存取記憶體930的示意圖。電阻式隨機存取記憶體930包括電阻式記憶體陣列931和感測放大器932。感測放大器932耦接電阻式記憶體陣列931。電阻式記憶體陣列931包括多個電阻式記憶體元件。這些電阻式記憶體元件可藉由不同阻態以儲存不同數值的資料。感測放大器932可根據參考阻值判斷上述多個電阻式記憶體元件的阻態,以輸出上述多個電阻式記憶體元件儲存的資料。FIG. 9 is a schematic diagram of a controller 920 and a resistive random access memory 930 according to an embodiment of the disclosure. The resistive random access memory 930 includes a resistive memory array 931 and a sense amplifier 932. The sense amplifier 932 is coupled to the resistive memory array 931. The resistive memory array 931 includes a plurality of resistive memory elements. These resistive memory devices can store data of different values through different resistance states. The sense amplifier 932 can determine the resistance state of the plurality of resistive memory devices according to the reference resistance value to output the data stored by the plurality of resistive memory devices.

控制器920是電阻式隨機存取記憶體930的控制器。控制器920耦接處理器910、電阻式隨機存取記憶體930、以及旗標記憶體940。控制器920包括串列耦接的溫度感測器921、模式控制器922、流程控制器923、以及等待暫存器924。溫度感測器921和等待暫存器924是硬體元件。模式控制器922和流程控制器923可以是硬體元件或由控制器920執行的軟體。The controller 920 is a controller of the resistive random access memory 930. The controller 920 is coupled to the processor 910, the resistive random access memory 930, and the flag memory 940. The controller 920 includes a temperature sensor 921, a mode controller 922, a process controller 923, and a waiting register 924 coupled in series. The temperature sensor 921 and the waiting register 924 are hardware components. The mode controller 922 and the process controller 923 may be hardware components or software executed by the controller 920.

溫度感測器921用以偵測電阻式隨機存取記憶體930的溫度。本實施例的控制器920、電阻式隨機存取記憶體930和旗標記憶體940製作成系統單晶片(SoC: system on a chip),所以溫度感測器921可偵測到電阻式隨機存取記憶體930的溫度。如果控制器920和電阻式隨機存取記憶體930不在同一晶片上,則溫度感測器921可以是電阻式隨機存取記憶體930其中的一部份。例如溫度感測器921可以配置在電阻式記憶體陣列931旁邊或配置在電阻式記憶體陣列931之中。The temperature sensor 921 is used to detect the temperature of the resistive random access memory 930. The controller 920, the resistive random access memory 930, and the flag memory 940 of this embodiment are fabricated into a system on a chip (SoC: system on a chip), so the temperature sensor 921 can detect the resistive random access memory. Take the temperature of the memory 930. If the controller 920 and the resistive random access memory 930 are not on the same chip, the temperature sensor 921 may be a part of the resistive random access memory 930. For example, the temperature sensor 921 may be arranged beside or in the resistive memory array 931.

控制器920可根據處理器910發出的命令讀取電阻式隨機存取記憶體930儲存的資料,或將資料寫入電阻式隨機存取記憶體930。等待暫存器924可以是步驟860其中的等待暫存器。旗標記憶體940可儲存圖2A和圖2B其中的旗標位元221~224。The controller 920 can read data stored in the resistive random access memory 930 or write data into the resistive random access memory 930 according to commands issued by the processor 910. The waiting register 924 may be the waiting register in step 860. The flag memory 940 can store the flag bits 221-224 in FIGS. 2A and 2B.

模式控制器922用以控制電阻式隨機存取記憶體930的操作模式,以及切換感測放大器932的參考阻值。也就是說,模式控制器922可執行圖4的方法流程。流程控制器923用以控制電阻式隨機存取記憶體930的資料存取,以及錯誤校正碼的編碼與解碼。換句話說,流程控制器923可執行圖5、圖6與圖8的方法流程。The mode controller 922 is used to control the operation mode of the resistive random access memory 930 and to switch the reference resistance of the sense amplifier 932. That is, the mode controller 922 may perform the method flow of FIG. 4. The process controller 923 is used to control the data access of the resistive random access memory 930 and the encoding and decoding of error correction codes. In other words, the process controller 923 can execute the method processes of FIGS. 5, 6 and 8.

以上的多個實施例提供多種適用於電阻式隨機存取記憶體的溫度感測與控制機制,可解決資料寫入錯誤與高溫資料維持錯誤的問題,彌補電阻式記憶體製程的不良率與元件錯誤,以提高電阻式記憶體系統的可靠度並降低位元錯誤率。The above embodiments provide a variety of temperature sensing and control mechanisms suitable for resistive random access memory, which can solve the problems of data writing errors and high temperature data maintenance errors, and compensate for the defect rate and components of resistive memory systems. Errors to improve the reliability of the resistive memory system and reduce the bit error rate.

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

201~204‧‧‧將寫入電阻式隨機存取記憶體的資料221~224‧‧‧旗標位元410~460、510~540、610~650、805~865‧‧‧方法步驟910‧‧‧處理器920‧‧‧控制器921‧‧‧溫度感測器922‧‧‧模式控制器923‧‧‧流程控制器924‧‧‧等待暫存器930‧‧‧電阻式隨機存取記憶體931‧‧‧電阻式記憶體陣列932‧‧‧感測放大器940‧‧‧旗標記憶體201~204‧‧‧Data written into resistive random access memory 221~224‧‧‧Flag bits 410~460, 510~540, 610~650, 805~865‧‧‧Method step 910‧ ‧‧Processor 920‧‧‧Controller 921‧‧‧Temperature sensor 922‧‧‧Mode controller 923‧‧‧Process controller 924‧‧‧Waiting register 930‧‧‧Resistive random access memory Body 931‧‧‧Resistive memory array 932‧‧‧Sense amplifier 940‧‧‧Flag memory

圖1是依照本揭露的一實施例的電阻式隨機存取記憶體的寫入次數與感測放大器的最佳參考阻值的示意圖。 圖2A是依照本揭露的一實施例的非對稱性編碼的示意圖。 圖2B是依照本揭露的另一實施例的非對稱性編碼的示意圖。 圖3是依照本揭露的一實施例的不同操作模式下的電阻式隨機存取記憶體的位元錯誤率受溫度影響的示意圖。 圖4是依照本揭露的一實施例的一種電阻式隨機存取記憶體控制方法的流程圖。 圖5是依照本揭露的另一實施例的一種電阻式隨機存取記憶體控制方法的流程圖。 圖6是依照本揭露的另一實施例的一種電阻式隨機存取記憶體控制方法的流程圖。 圖7是依照本揭露的一實施例的錯誤校正碼的臨界值的示意圖。 圖8是依照本揭露的一實施例的一種電阻式隨機存取記憶體控制方法的流程圖。 圖9是依照本揭露的一實施例的一種控制器與一種電阻式隨機存取記憶體的示意圖。FIG. 1 is a schematic diagram of the number of write times of a resistive random access memory and the best reference resistance value of a sense amplifier according to an embodiment of the disclosure. FIG. 2A is a schematic diagram of asymmetric encoding according to an embodiment of the present disclosure. FIG. 2B is a schematic diagram of asymmetric encoding according to another embodiment of the present disclosure. FIG. 3 is a schematic diagram of the bit error rate of the resistive random access memory under different operation modes affected by temperature according to an embodiment of the present disclosure. 4 is a flowchart of a resistive random access memory control method according to an embodiment of the disclosure. FIG. 5 is a flowchart of a resistive random access memory control method according to another embodiment of the disclosure. FIG. 6 is a flowchart of a resistive random access memory control method according to another embodiment of the disclosure. FIG. 7 is a schematic diagram of the threshold value of an error correction code according to an embodiment of the disclosure. FIG. 8 is a flowchart of a resistive random access memory control method according to an embodiment of the disclosure. FIG. 9 is a schematic diagram of a controller and a resistive random access memory according to an embodiment of the disclosure.

201、202、203‧‧‧將寫入電阻式隨機存取記憶體的資料 201, 202, 203‧‧‧Data to be written into resistive random access memory

221、222‧‧‧旗標位元 221, 222‧‧‧ flag bit

Claims (1)

一種電阻式隨機存取記憶體控制方法,包括:偵測一電阻式隨機存取記憶體的溫度;根據該溫度設定該電阻式隨機存取記憶體的一感測放大器的一參考阻值;當該電阻式隨機存取記憶體的該溫度小於一切換溫度,則切換至一一般模式,並將該參考阻值設定為對應該一般模式的一第一阻值;當該電阻式隨機存取記憶體的該溫度大於該切換溫度,則切換至一高溫模式,並將該參考阻值設定為對應該高溫模式的一第二阻值,其中該第一阻值大於該第二阻值;當有一筆資料將要寫入該電阻式隨機存取記憶體時,計算該筆資料中的一位元值的數量;若該位元值的該數量大於該筆資料的長度的一半,則翻轉該筆資料的每一位元,然後將該筆資料寫入該電阻式隨機存取記憶體;以及若該位元值的該數量小於該筆資料的長度的一半,則將該筆資料維持原樣寫入該電阻式隨機存取記憶體,其中該位元值在該一般模式等於1,該位元值在該高溫模式等於0。A resistive random access memory control method includes: detecting the temperature of a resistive random access memory; setting a reference resistance value of a sense amplifier of the resistive random access memory according to the temperature; If the temperature of the resistive random access memory is less than a switching temperature, switch to a normal mode, and set the reference resistance value to a first resistance value corresponding to the normal mode; when the resistive random access memory If the temperature of the body is greater than the switching temperature, switch to a high temperature mode, and set the reference resistance value to a second resistance value corresponding to the high temperature mode, where the first resistance value is greater than the second resistance value; When a piece of data is about to be written into the resistive random access memory, calculate the number of bit values in the piece of data; if the number of bit values is greater than half the length of the piece of data, flip the piece of data And then write the data to the resistive random access memory; and if the number of bit values is less than half the length of the data, then write the data as it is Resistive random access memory, wherein the bit value is equal to 1 in the normal mode, and the bit value is equal to 0 in the high temperature mode.
TW107141761A 2015-01-14 2015-01-14 Method for controlling resistive random-access memory TWI720369B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW107141761A TWI720369B (en) 2015-01-14 2015-01-14 Method for controlling resistive random-access memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW107141761A TWI720369B (en) 2015-01-14 2015-01-14 Method for controlling resistive random-access memory

Publications (2)

Publication Number Publication Date
TW201907405A TW201907405A (en) 2019-02-16
TWI720369B true TWI720369B (en) 2021-03-01

Family

ID=66213117

Family Applications (1)

Application Number Title Priority Date Filing Date
TW107141761A TWI720369B (en) 2015-01-14 2015-01-14 Method for controlling resistive random-access memory

Country Status (1)

Country Link
TW (1) TWI720369B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060290542A1 (en) * 2005-05-31 2006-12-28 Hui Liu System for improving memory interface data integrity in plds
US20090091968A1 (en) * 2007-10-08 2009-04-09 Stefan Dietrich Integrated circuit including a memory having a data inversion circuit
US20110080775A1 (en) * 2006-09-05 2011-04-07 Jun-Soo Bae Nonvolatile memory device, storage system having the same, and method of driving the nonvolatile memory device
US20130003438A1 (en) * 2011-06-28 2013-01-03 Rochester Institute Of Technology Thermal management apparatuses with temperature sensing resistive random access memory devices and methods thereof

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060290542A1 (en) * 2005-05-31 2006-12-28 Hui Liu System for improving memory interface data integrity in plds
US20110080775A1 (en) * 2006-09-05 2011-04-07 Jun-Soo Bae Nonvolatile memory device, storage system having the same, and method of driving the nonvolatile memory device
US20090091968A1 (en) * 2007-10-08 2009-04-09 Stefan Dietrich Integrated circuit including a memory having a data inversion circuit
US20130003438A1 (en) * 2011-06-28 2013-01-03 Rochester Institute Of Technology Thermal management apparatuses with temperature sensing resistive random access memory devices and methods thereof

Also Published As

Publication number Publication date
TW201907405A (en) 2019-02-16

Similar Documents

Publication Publication Date Title
US10964384B2 (en) Method for controlling resistive random-access memory
EP3098815B1 (en) Methods and systems for detecting and correcting errors in nonvolatile memory
JP4905866B2 (en) Semiconductor memory device and operation method thereof
JP4905839B2 (en) Operation method of MRAM
US11081178B2 (en) Memory, information processing system, and method of controlling memory
JP5735186B2 (en) Read bias management to reduce read errors in phase change memory
TWI714277B (en) Memory error detection and correction
US10031865B2 (en) Memory system, storage device, and method for controlling memory system
US9530523B2 (en) Thermal disturb as heater in cross-point memory
US20160351259A1 (en) Memristor memory
US10229752B2 (en) Memory device correcting data error of weak cell
KR20210029661A (en) Defective bit line management in connection with a memory access
TWI782302B (en) semiconductor memory device
TWI493562B (en) Memory with error correction configured to prevent overcorrection
US20170249210A1 (en) Memory device and memory system
TWI720369B (en) Method for controlling resistive random-access memory
US11003551B2 (en) Non-volatile storage system with program failure recovery
WO2012015438A1 (en) Memory element and method for determining the data state of a memory element
Hajisadeghi et al. Bit Error Mitigation Using Unequal Resistivity Levels in Memristors
TW201839617A (en) Write algorithm for memory