[go: up one dir, main page]

TWI714192B - Method for detecting operation state and obtaining operation current of flash memory - Google Patents

Method for detecting operation state and obtaining operation current of flash memory Download PDF

Info

Publication number
TWI714192B
TWI714192B TW108127082A TW108127082A TWI714192B TW I714192 B TWI714192 B TW I714192B TW 108127082 A TW108127082 A TW 108127082A TW 108127082 A TW108127082 A TW 108127082A TW I714192 B TWI714192 B TW I714192B
Authority
TW
Taiwan
Prior art keywords
flash memory
current
page
pages
current value
Prior art date
Application number
TW108127082A
Other languages
Chinese (zh)
Other versions
TW202011410A (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 TW108127082A priority Critical patent/TWI714192B/en
Publication of TW202011410A publication Critical patent/TW202011410A/en
Application granted granted Critical
Publication of TWI714192B publication Critical patent/TWI714192B/en

Links

Images

Landscapes

  • Read Only Memory (AREA)

Abstract

A method for detecting operation state of flash memory is provided. The flash memory includes a plurality of blocks and each block includes a plurality of pages. The detecting method includes performing a specific operation on at least one page of the pages of the flash memory, generating a differential voltage corresponding to the at least one page of the pages, outputting a current value according to the differential voltage, and determining the operating state of the at least one page of the pages of the flash memory according to the current value. Herein, the specific operation is one of a block erase, a page program and a read operation, and the outputted current value corresponds to the specific operation on the at least one page of the pages. Therefore, it is instantly decided if the memory works properly.

Description

快閃記憶體的運作狀態的偵測方法及運作電流的獲得方法Method for detecting operating state of flash memory and method for obtaining operating current

本發明是關於一種記憶體控制器,特別是一種NAND快閃記憶體控制器。 The invention relates to a memory controller, particularly a NAND flash memory controller.

NAND快閃記憶體(NAND Flash memory)依其記憶體特性,大多應用於固態硬碟(Solid State Drive,SSD)、隨身碟與記憶卡。 NAND Flash memory is mostly used in solid state drives (SSD), flash drives and memory cards based on its memory characteristics.

NAND快閃記憶體的每個儲存單元(Cell)是依其電壓位準來表示其儲存的資訊。以三階儲存單元(Triple-Level Cell,TLC)為例,每個三階儲存單元可儲存8個不同的內容,包括:111,011,001,101,100,000,010,110,這8個內容各別對應1個抹除位準(Erase State)及7個編程位準(Program States)之一。具體而言,當某個三階儲存單元的記錄電壓落於某一位準,即表示該三階儲存單元所儲存的內容是該位準對應的內容。 Each cell of the NAND flash memory represents its stored information according to its voltage level. Take the Triple-Level Cell (TLC) as an example. Each three-level storage cell can store 8 different contents, including: 111,011,001,101,100,000,010,110. Each of these 8 contents corresponds to an erase level (Erase State). ) And one of 7 programming levels (Program States). Specifically, when the recording voltage of a third-level storage unit falls at a certain level, it means that the content stored in the third-level storage unit is the content corresponding to the level.

NAND快閃記憶體為確保寫入資料的正確性,快閃記憶體內部的控制器會在寫入一儲存單元後,讀取該儲存單元的電壓並判斷該電壓是否達預定電壓範圍(高於對應位準的下限),若未達該預定電壓範圍,則會再寫入一次,直到該儲存單元之電壓達到該預定電壓範圍,此機制一般稱為校驗(Verification)。因此,對於特性較佳或壽命初期的儲存單元,其 操作電壓較低或被寫入的次數仍較少;對於特性較差或已磨耗的儲存單元,即可能已被反覆地寫入,形成NAND快閃記憶體中各儲存單元、記憶頁、記憶區塊被寫入的次數不同,而快閃記憶體的編程與抹除的次數直接影響其使用壽命,業界為了避免NAND快閃記憶體短時間內大量損壞,導致儲存資料流失,因此,提出幾個判斷NAND快閃記憶體是否損壞的方法。 NAND flash memory is to ensure the correctness of written data, after writing a storage unit, the controller inside the flash memory reads the voltage of the storage unit and determines whether the voltage reaches a predetermined voltage range (above Corresponding to the lower limit of the level), if it does not reach the predetermined voltage range, it will be written again until the voltage of the storage cell reaches the predetermined voltage range. This mechanism is generally referred to as verification. Therefore, for the storage unit with better characteristics or early life, its The operating voltage is low or the number of writes is still small; for the storage cells with poor characteristics or worn out, they may have been repeatedly written to form each storage cell, memory page, and memory block in the NAND flash memory The number of writes is different, and the number of flash memory programming and erasing directly affects its service life. In order to avoid a large amount of damage to the NAND flash memory in a short period of time, the industry has made several judgments. Whether the NAND flash memory is damaged.

一種方式是透過監視錯誤更正碼(Error Correct Code,ECC)是否有增加的趨勢來判斷該NAND快閃記憶體之可能壽命。然而,由於快閃記憶體有上述校驗機制,在正常操作狀態下,ECC不會有明顯的變化,因此,若監視ECC,當發現ECC方瞬間飆高,往往已是該快閃記憶體的某一區塊瀕臨壽命終點。故,監視ECC之方法並無法有效地得知快閃記憶體當時的壽命狀態。 One way is to judge the possible life of the NAND flash memory by monitoring whether the Error Correct Code (ECC) has an increasing trend. However, because the flash memory has the above verification mechanism, the ECC will not change significantly under normal operating conditions. Therefore, if you monitor the ECC, when you find that the ECC is so high, it is often the flash memory. A certain block is approaching the end of its life. Therefore, the method of monitoring ECC cannot effectively know the current life status of the flash memory.

一種方式是利用儲存單元電壓分佈圖(Cell Voltage Distribution)進行判斷,門檻電壓分佈圖是指將整個記憶頁(Page)或記憶區塊(Block)中每一儲存單元的記錄電壓繪製於一圖表上,該圖表的水平軸為電壓,垂直軸為儲存單元數量。當快閃記憶體狀態正常時,該電壓分佈圖中各儲存單元之電壓會落在對應的位準。當快閃記憶體狀態異常時,落在對應的位準的儲存單元數量會大幅減少。如同前述,由於快閃記憶體有上述校驗機制,因此,當門檻電壓分佈圖呈現異常時,亦是該快閃記憶體瀕臨壽命終點,故此方法亦未能有效得知快閃記憶體當時的壽命狀態。 One way is to use the cell voltage distribution graph (Cell Voltage Distribution) to make judgments. The threshold voltage distribution graph refers to plotting the recording voltage of each storage cell in the entire page or block on a graph , The horizontal axis of the graph is voltage, and the vertical axis is the number of storage cells. When the flash memory is in normal state, the voltage of each storage cell in the voltage distribution diagram will fall at the corresponding level. When the flash memory is in an abnormal state, the number of storage units falling at the corresponding level will be greatly reduced. As mentioned above, because the flash memory has the above-mentioned verification mechanism, when the threshold voltage distribution graph is abnormal, the flash memory is also near the end of its life. Therefore, this method is not effective in knowing the flash memory at the time. Life state.

前述方法,除了僅具有辨識快閃記憶體瀕臨壽命終點之能力外,已知方法需於離線(將NAND快閃記憶體從儲存裝置或系統取下)方能操作。例如,另一種方式是可透過外部電路或外部儀器(例如:高階示波 器搭配高頻電流勾表)與固態硬碟相連接來進行分析是否異常。然而,此方法必須在離線(offline)的情況下才可以操作並分析,無法做到即時(online)分析的需求。如同前述,當發現異常時,亦是該快閃記憶體瀕臨壽命終點。 The aforementioned method only has the ability to recognize that the flash memory is approaching the end of its life. The known method requires offline (removing the NAND flash memory from the storage device or system) to operate. For example, another way is through external circuits or external instruments (for example: high-order oscilloscope The device is equipped with a high-frequency current check table) and the solid state drive is connected to analyze whether it is abnormal. However, this method can only be operated and analyzed in an offline (offline) situation, and cannot meet the requirements of online analysis. As mentioned above, when an abnormality is found, the flash memory is also approaching the end of its life.

前述該些傳統方法,僅具有辨識快閃記憶體瀕臨壽命終點之能力,並無有效地、即時地得知快閃記憶體當時運作狀態的能力。 The aforementioned traditional methods only have the ability to recognize that the flash memory is approaching the end of its life, but do not have the ability to effectively and instantly know the current operating status of the flash memory.

因此,如何提供一種偵測系統及方法,可以有效地、即時地得知快閃記憶體當時的運作狀態,已經是業界的一個重要課題。 Therefore, how to provide a detection system and method that can effectively and instantly know the current operating status of the flash memory has become an important issue in the industry.

鑑於上述,本案提出一種快閃記憶體的運作狀態的偵測方法。於此,快閃記憶體包括有複數個區塊(Block),且每個區塊包括複數個頁。此偵測方法包括:對此快閃記憶體的複數個頁中的至少一頁進行一特定操作、產生對應於複數個頁中的至少一頁的特定操作的一差分電壓、依據差分電壓輸出一電流值、以及依據電流值判斷快閃記憶體的複數個頁中的至少一頁的運作狀態。其中,特定操作係為一區塊抹除(Block Erase)、一頁編程(Page Program)、以及一讀取操作的至少其一,並且輸出的電流值係對應於複數個頁中的至少一頁的特定操作。 In view of the above, this case proposes a method for detecting the operating status of the flash memory. Here, the flash memory includes a plurality of blocks, and each block includes a plurality of pages. The detection method includes: performing a specific operation on at least one of the plurality of pages of the flash memory, generating a differential voltage corresponding to the specific operation of at least one of the plurality of pages, and outputting a differential voltage according to the differential voltage. The current value and the operating state of at least one page among the plurality of pages of the flash memory are determined according to the current value. Wherein, the specific operation is at least one of a block erase (Block Erase), a page program (Page Program), and a read operation, and the output current value corresponds to at least one of the plurality of pages Specific operations.

本案更提出一種快閃記憶體的運作電流的獲得方法。於此,快閃記憶體包括有複數個區塊(Block),並且每個區塊包括複數個頁。此獲得方法包括:在一快閃記憶體中的複數個頁中的至少一頁執行一特定操作、對應於此快閃記憶體中的複數個頁中的至少一頁於特定操作時的電流產生一差分電壓、依據一位準訊號產生複數位準、依據該分電壓及此些位 準輸出一數位訊號、以及依據位準訊號及數位訊號輸出電流值。其中,特定操作係為一區塊抹除、一頁編程、以及一讀取操作的至少其一,並且輸出的電流值係對應於複數個頁中的至少一頁之特定操作。 This case also proposes a method for obtaining the operating current of the flash memory. Here, the flash memory includes a plurality of blocks, and each block includes a plurality of pages. The obtaining method includes: performing a specific operation on at least one of the plurality of pages in a flash memory, corresponding to the current generation during the specific operation of at least one of the plurality of pages in the flash memory A differential voltage, generating multiple levels based on a single-level signal, based on the sub-voltage and these bits A digital signal is output, and the current value is output based on the level signal and the digital signal. The specific operation is at least one of a block erase, a page programming, and a read operation, and the output current value corresponds to the specific operation of at least one of the plurality of pages.

綜上所述,依據一些實施例,快閃記憶體控制器可即時獲得快閃記憶體之特定頁/區塊運作時消耗的電流值,並據以判斷快閃記憶體之特定頁/區塊運作是否正常。另依據一些實施例,具有該快閃記憶體控制器的儲存裝置可即時判斷快閃記憶體之特定頁/區塊運作是否正常。 To sum up, according to some embodiments, the flash memory controller can obtain the current value consumed by a specific page/block of the flash memory in real time, and determine the specific page/block of the flash memory accordingly Is it operating normally. According to some embodiments, the storage device with the flash memory controller can instantly determine whether a specific page/block of the flash memory is operating normally.

10:儲存裝置 10: storage device

20:NAND快閃記憶體 20: NAND flash memory

30:電壓供應電路 30: Voltage supply circuit

200:區塊 200: block

40:快閃記憶體控制器 40: Flash memory controller

42:快閃控制電路 42: Flash control circuit

44:電流感測電路 44: current sensing circuit

46:處理器 46: processor

440:電流轉電壓電路 440: Current to Voltage Circuit

441:電阻器 441: resistor

442:感測控制電路 442: sensing control circuit

444:位準產生電路 444: level generating circuit

445a:可調電流源 445a: adjustable current source

445b:電阻器 445b: resistor

446:快閃類比轉數位電路 446: Flash analog to digital circuit

448:M對N編碼電路 448: M to N encoding circuit

447a,447b,447c,447d:差分比較器 447a, 447b, 447c, 447d: differential comparator

DI:輸入接腳 DI: Input pin

DO:輸出接腳 DO: output pin

PRG:編程區間 PRG: Programming interval

Vip,Vin:差分電壓 Vip, Vin: differential voltage

Vrm,Vrm-1...,Vr1,Vr0:位準 Vrm,Vrm-1...,Vr1,Vr0: level

圖1繪示本案儲存裝置一實施例之電路方塊示意圖。 FIG. 1 is a schematic block diagram of the circuit of an embodiment of the storage device of the present invention.

圖2繪示本案電流感測電路一實施例之電路方塊示意圖。 FIG. 2 is a circuit block diagram of an embodiment of the current sensing circuit of the present application.

圖3繪示本案快閃類比轉數位電路一實施例之電路方塊示意圖。 FIG. 3 is a circuit block diagram of an embodiment of the flash analog to digital circuit in this case.

圖4繪示本案電流感測電路一實施例之電流感測結果示意圖。 FIG. 4 shows a schematic diagram of the current sensing result of an embodiment of the current sensing circuit in this case.

圖5繪示圖4標示5-5位置之局部放大示意圖。 Fig. 5 is a partial enlarged schematic view of the position marked 5-5 in Fig. 4;

請參照圖1,圖1繪示本案儲存裝置一實施例之電路方塊示意圖。儲存裝置10包括一NAND快閃記憶體20、一電壓供應電路30、及一快閃記憶體控制器40。 Please refer to FIG. 1. FIG. 1 is a circuit block diagram of an embodiment of the storage device of the present invention. The storage device 10 includes a NAND flash memory 20, a voltage supply circuit 30, and a flash memory controller 40.

儲存裝置10可以是任何具有NAND快閃記憶體20的儲存裝置,在一些實施例中,儲存裝置10是固態硬碟(Solid State Drive,SSD)、隨身碟、或記憶卡。 The storage device 10 can be any storage device with a NAND flash memory 20. In some embodiments, the storage device 10 is a solid state drive (SSD), a flash drive, or a memory card.

電壓供應電路30用以提供一電流予快閃記憶體20。快閃記 憶體控制器40適於NAND快閃記憶體20及電壓供應電路30,快閃記憶體控制器40控制快閃記憶體20之操作,該操作包括編程(Program)、抹除(Erase)與讀取,其中,編程與抹除可統稱為寫入。快閃記憶體20包括多個區塊(Block)200,每個區塊200包括多個頁(Page,圖中未示),快閃記憶體20進行抹除時,採用區塊抹除(Block Erase);快閃記憶體20進行編程時,採用頁編程(Page Program)。快閃記憶體20進行編程、抹除與讀取時,其所需之電流量不相同,此電流係由電壓供應電路30供應。 The voltage supply circuit 30 is used to provide a current to the flash memory 20. Flash The memory controller 40 is suitable for the NAND flash memory 20 and the voltage supply circuit 30. The flash memory controller 40 controls the operation of the flash memory 20, which includes programming (Program), erasing (Erase) and reading Take, among them, programming and erasing can be collectively referred to as writing. The flash memory 20 includes a plurality of blocks (Block) 200, and each block 200 includes a plurality of pages (Page, not shown). When the flash memory 20 is erased, the block erase (Block) Erase); When the flash memory 20 is programmed, Page Program is used. When the flash memory 20 is programmed, erased, and read, the amount of current required is different, and this current is supplied by the voltage supply circuit 30.

前述快閃記憶體控制器40包括一快閃控制電路42、一電流感測電路44、及一處理器46。快閃控制電路42用以控制該快閃記憶體20之寫入,具體而言,快閃控制電路42控制該快閃記憶體20之編程與抹除。除此之外,快閃控制電路42亦控制該快閃記憶體20之讀取等作業。快閃控制電路42依據處理器46之控制,而控制快閃控制電路42控制該快閃記憶體20進行寫入或讀取。 The aforementioned flash memory controller 40 includes a flash control circuit 42, a current sensing circuit 44, and a processor 46. The flash control circuit 42 is used to control the writing of the flash memory 20. Specifically, the flash control circuit 42 controls the programming and erasing of the flash memory 20. In addition, the flash control circuit 42 also controls the reading of the flash memory 20 and other operations. The flash control circuit 42 is controlled by the processor 46, and the flash control circuit 42 controls the flash memory 20 to write or read.

電流感測電路44用以量測該快閃記憶體20之電流,舉例而言,電流感測電路44用以量測該快閃記憶體20於該寫入時的該電流,並輸出一電流值。具體而言,電流感測電路44的電流轉電壓電路440連接於該電壓供應電路30及該快閃記憶體20之間(供電線路之間),電流轉電壓電路440具有一電流感測器,該電流感測器例如但不限於一電阻器441,當電壓供應電路30經過電流轉電壓電路440提供電流予快閃記憶體20時,電流轉換電壓電路440的兩端即產生一差分電壓(Vip,Vin,Vip稱P電位,Vin稱N電位),電流感測電路44藉由將該差分電壓(Vip,Vin)除以該電流感測器之阻抗(例如但不限於電阻器441之阻抗),即可獲得快閃記憶體20在進 行該寫入時所消耗的電流值。同樣的,電流感測電路44亦可用以量測該快閃記憶體20於該抹除時或讀取時所消耗的電流,並輸出一電流值。 The current sensing circuit 44 is used to measure the current of the flash memory 20. For example, the current sensing circuit 44 is used to measure the current of the flash memory 20 during the writing, and output a current value. Specifically, the current-to-voltage circuit 440 of the current sensing circuit 44 is connected between the voltage supply circuit 30 and the flash memory 20 (between the power supply lines), and the current-to-voltage circuit 440 has a current sensor. The current sensor is, for example, but not limited to, a resistor 441. When the voltage supply circuit 30 provides current to the flash memory 20 through the current-to-voltage circuit 440, a differential voltage (Vip ,Vin, Vip is called P potential, and Vin is called N potential), the current sensing circuit 44 divides the differential voltage (Vip, Vin) by the impedance of the current sensor (for example, but not limited to, the impedance of resistor 441) , You can get flash memory 20 in The current value consumed during the writing. Similarly, the current sensing circuit 44 can also be used to measure the current consumed by the flash memory 20 during the erasing or reading, and output a current value.

處理器46用以依據該電流值輸出一控制訊號。具體而言,處理器46接收電流感測電路44輸出之電流值,並依據該電流值輸出控制訊號。在一些實施例中,處理器46在該電流值超過預設的單次編程電流上限時,處理器46輸出的該控制訊號為異常訊號,並可記錄其快閃記憶體錯誤位置。前述單次編程電流上限可以是該快閃記憶體20在進行單次編程時,判定是否消耗的異常電流的值。 The processor 46 is used for outputting a control signal according to the current value. Specifically, the processor 46 receives the current value output by the current sensing circuit 44, and outputs a control signal according to the current value. In some embodiments, when the current value of the processor 46 exceeds the preset upper limit of the single programming current, the control signal output by the processor 46 is an abnormal signal, and the flash memory error location can be recorded. The foregoing upper limit of the single programming current may be the value of the abnormal current that the flash memory 20 consumes when performing a single programming.

關於處理器46依據該電流值輸出控制訊號之其他實施例,容後詳述。 Other embodiments in which the processor 46 outputs the control signal according to the current value will be described in detail later.

因此,從上述說明可知,快閃記憶體控制器40藉由電流感測電路44即可即時量測快閃記憶體20在進行編程、抹除、讀取等作業時所消耗的電流。而處理器46依據該電流值而得以判斷快閃記憶體20之操作狀態是否維持在正常狀態。此即時量測,除了可在快閃記憶體20操作的同時,處理器46即時得知某頁、某區塊是否損壞,處理器46更可以藉由收集足夠數量之電流值(依時序),利用統計方法預測該快閃記憶體20可能損壞的時間,或還能繼續使用之寫入、抹除、或讀取次數。 Therefore, it can be seen from the above description that the flash memory controller 40 can measure the current consumed by the flash memory 20 during programming, erasing, and reading operations in real time through the current sensing circuit 44. The processor 46 can determine whether the operating state of the flash memory 20 is maintained in a normal state according to the current value. In this real-time measurement, in addition to operating the flash memory 20, the processor 46 can know whether a page or a block is damaged in real time. The processor 46 can also collect a sufficient number of current values (according to the timing), A statistical method is used to predict the time when the flash memory 20 may be damaged, or the number of writes, erases, or reads that can be used.

其次,圖1之電流感測電路44之電流轉電壓電路440係位於快閃記憶體控制器40之外部,但在一些實施例中,電流轉電壓電路440係內建於快閃記憶體控制器40內,電壓供應電路30輸出之電流仍經由該電流轉電壓電路440再傳送至快閃記憶體20。 Secondly, the current-to-voltage circuit 440 of the current sensing circuit 44 in FIG. 1 is located outside the flash memory controller 40, but in some embodiments, the current-to-voltage circuit 440 is built in the flash memory controller Within 40, the current output by the voltage supply circuit 30 is still transmitted to the flash memory 20 through the current-to-voltage circuit 440.

續請參考圖2,圖2繪示本案電流感測電路一實施例之電路方 塊示意圖。在一些實施例中,前述電流感測電路44包括一電流轉電壓電路440、一感測控制電路442、一位準產生電路444、及一快閃類比轉數位電路446。 Please continue to refer to Figure 2. Figure 2 illustrates the circuit of an embodiment of the current sensing circuit in this case Block diagram. In some embodiments, the aforementioned current sensing circuit 44 includes a current to voltage circuit 440, a sensing control circuit 442, a level generating circuit 444, and a flash analog to digital circuit 446.

電流轉電壓電路440連接於該電壓供應電路30及該快閃記憶體20之間並用以轉換該電流為一差分輸入,圖2之電流轉電壓電路440之節點A連接於電壓供應電路30,節點B連接至快閃記憶體20。當快閃控制電路42控制該快閃記憶體20進行寫入(編程或抹除)或讀取時,電壓供應電路30所提供之電流即經過該電阻器441,電阻器441之兩端(節點A,B)各別具有一P電位Vip與N電位Vin,意即電阻器441兩端即具有一差分電壓(Vip,Vin),電流感測電路44藉由將該差分電壓的差值(Vip-Vin)除以電阻器441之阻抗,而獲得該電流值。 The current-to-voltage circuit 440 is connected between the voltage supply circuit 30 and the flash memory 20 and is used to convert the current into a differential input. The node A of the current-to-voltage circuit 440 in FIG. 2 is connected to the voltage supply circuit 30, and the node B is connected to flash memory 20. When the flash control circuit 42 controls the flash memory 20 to write (program or erase) or read, the current provided by the voltage supply circuit 30 passes through the resistor 441. The two ends (nodes) of the resistor 441 A, B) each has a P potential Vip and an N potential Vin, which means that the resistor 441 has a differential voltage (Vip, Vin) at both ends, and the current sensing circuit 44 uses the difference of the differential voltage (Vip -Vin) is divided by the impedance of the resistor 441 to obtain the current value.

感測控制電路442用以產生一位準訊號。此位準訊號與該電流值相關。當位準訊號愈高時,可量測的電流值的範圍即愈大,當位準訊號愈低時,可量測的電流值的範圍即愈小,容後詳述。 The sensing control circuit 442 is used to generate a quasi signal. This level signal is related to the current value. When the level signal is higher, the range of the current value that can be measured is larger, and when the level signal is lower, the range of the current value that can be measured is smaller, which will be described later.

位準產生電路444用以依據該位準訊號產生多個位準Vrm,Vrm-1...,Vr1,Vr0。位準產生電路444的該些位準的數量即為該電流感測電路44的解析度。例如,若位準產生電路444能產生2~3個位準,則配置快閃類比轉數位電路446將輸出以二個位元(2bits)表示,即DO[1:0]。若位準產生電路444能產生4~7個位準,則配置快閃類比轉數位電路446將輸出以三個位元(3bits)表示,即DO[2:0]。 The level generating circuit 444 is used for generating a plurality of levels Vrm, Vrm-1..., Vr1, Vr0 according to the level signal. The number of the levels of the level generating circuit 444 is the resolution of the current sensing circuit 44. For example, if the level generating circuit 444 can generate 2 to 3 levels, the flash analog-to-digital circuit 446 is configured to express the output in two bits (2bits), that is, DO[1:0]. If the level generating circuit 444 can generate 4 to 7 levels, the flash analog-to-digital circuit 446 is configured to express the output in three bits (3 bits), that is, DO[2:0].

在一些實施例中,位準產生電路444包括一可調電流源445a及多個電阻器445b。可調電流源445a用以依據該位準訊號,對應地產生 一參考電流。該些電阻器445b依序串聯,且該些電阻器445b接收該參考電流產生該些位準Vrm,Vrm-1...,Vr1,Vr0。 In some embodiments, the level generating circuit 444 includes an adjustable current source 445a and a plurality of resistors 445b. The adjustable current source 445a is used to generate correspondingly according to the level signal A reference current. The resistors 445b are connected in series in sequence, and the resistors 445b receive the reference current to generate the levels Vrm, Vrm-1..., Vr1, Vr0.

前述感測控制電路442利用該位準訊號控制可調電流源445a所產生的參考電流的大小,當位準訊號愈高時,參考電流即愈大,當位準訊號愈低時,參考電流即愈小。當參考電流愈大,該些電阻器445b串聯後兩端的電壓差即愈大,因此,位準產生電路444在相同的解析度下,能產生的最大位準的電壓差值(Vrm-Vr0)即愈大,感測控制電路442能量測的差分電壓的差值(對應電流值)即愈大。相反的,當參考電流愈小,該些電阻器445b串聯後兩端的電壓差即愈小,因此,位準產生電路444在相同的解析度下,能產生的最大位準的電壓差值(Vrm-Vr0)即愈小,感測控制電路442能量測的差分電壓的差值即愈小。 The aforementioned sensing control circuit 442 uses the level signal to control the magnitude of the reference current generated by the adjustable current source 445a. When the level signal is higher, the reference current is greater, and when the level signal is lower, the reference current is The smaller. When the reference current is larger, the voltage difference between the two ends of the resistors 445b in series is larger. Therefore, the level generating circuit 444 can generate the maximum voltage difference (Vrm-Vr0) at the same resolution. That is, the greater the difference (corresponding to the current value) of the differential voltage measured by the sensing control circuit 442 is greater. On the contrary, when the reference current is smaller, the voltage difference between the two ends of the resistors 445b in series is smaller. Therefore, the level generating circuit 444 can generate the maximum voltage difference (Vrm -Vr0) is smaller, the difference of the differential voltage measured by the sensing control circuit 442 is smaller.

前述快閃類比轉數位電路446用以依據該差分電壓(Vip-Vin)及該些位準Vrm,Vrm-1,...,Vr0,輸出一數位訊號。在一些實施例中,快閃類比轉數位電路446將該差分電壓(Vip,Vin)的差值與該些位準Vrm,Vrm-1,...,Vr0的差值(Vrm-Vr0,Vrm-1-Vr0,...,Vr1-Vr0等)進行比較,即可獲得該差分電壓的差值(Vip-Vin)所對應的位準差值,快閃類比轉數位電路446將該對應的位準差值轉換為二進制數值並以該二進制數值輸出為該數位訊號。該數位訊號即對應該位準差值。 The aforementioned flash analog to digital circuit 446 is used to output a digital signal according to the differential voltage (Vip-Vin) and the levels Vrm, Vrm-1,...,Vr0. In some embodiments, the flash analog to digital circuit 446 is the difference between the differential voltage (Vip, Vin) and the difference between the levels Vrm, Vrm-1,...,Vr0 (Vrm-Vr0, Vrm -1-Vr0,...,Vr1-Vr0, etc.) to obtain the level difference corresponding to the difference (Vip-Vin) of the differential voltage. The flash analog to digital circuit 446 will compare the corresponding The level difference value is converted into a binary value and the binary value is output as the digital signal. The digital signal corresponds to the level difference.

該感測控制電路442依據該位準訊號及該數位訊號輸出該電流值,容後詳述。 The sensing control circuit 442 outputs the current value according to the level signal and the digital signal, which will be described in detail later.

請參考圖3閱讀之,圖3繪示本案快閃類比轉數位電路一實施例之電路方塊示意圖。快閃類比轉數位電路446包括多個差分比較器447a, 447b,...,447c,447d及一M對N編碼電路448(M to N encoder logic),各該差分比較器447a,447b,...,447c,447d接收並比較前述差分電壓的差值(Vip-Vin)及對應的位準差值Vrm,Vrm-1...,Vr2,Vr1,Vr0,當差分電壓的差值(Vip-Vin)大於對應的位準差值Vrm,Vrm-1...,Vr2,Vr1,Vr0時,該差分比較器447a,447b,...,447c,447d即輸出1(高位準),反之,則輸出0(低位準)。因此,當差分電壓的差值(Vip-Vin)落在位準Vrm與Vrm-1之間時,第一差分比較器447a輸出0,其餘差分比較器447b,...,447c,447d輸出1。 Please refer to FIG. 3 for reading. FIG. 3 shows a circuit block diagram of an embodiment of the flash analog-to-digital circuit in this case. The flash analog to digital circuit 446 includes a plurality of differential comparators 447a, 447b,...,447c, 447d and an M to N encoder logic 448 (M to N encoder logic), each of the differential comparators 447a, 447b,...,447c, 447d receives and compares the difference of the aforementioned differential voltage (Vip-Vin) and the corresponding level difference Vrm,Vrm-1...,Vr2,Vr1,Vr0, when the difference of the differential voltage (Vip-Vin) is greater than the corresponding level difference Vrm,Vrm-1 When ...,Vr2,Vr1,Vr0, the differential comparators 447a,447b,...,447c,447d output 1 (high level), otherwise, output 0 (low level). Therefore, when the difference (Vip-Vin) of the differential voltage falls between the levels Vrm and Vrm-1, the first differential comparator 447a outputs 0, and the remaining differential comparators 447b,...,447c, 447d output 1 .

M對N編碼電路448用以將輸入訊號進行編碼,轉換為二進制數值,輸出為該數位訊號。續以上述舉例進行說明,若快閃類比轉數位電路包括4個差分比較器447a,447b,447c,447d,第一差分比較器447a輸出0,其餘差分比較器447b,447c,447d輸出1,此時,M對N編碼電路448接收到數值由上而下為0,1,1,1,M對N編碼電路448即將之編碼為DO[2:0]=011(二進制)。M對N編碼電路448可由邏輯電路來實現。 The M-to-N encoding circuit 448 is used to encode the input signal, convert it into a binary value, and output the digital signal. Continuing with the above example, if the flash analog to digital circuit includes 4 differential comparators 447a, 447b, 447c, 447d, the first differential comparator 447a outputs 0, and the remaining differential comparators 447b, 447c, 447d output 1, this When the value received by the M-to-N encoding circuit 448 is 0,1,1,1 from top to bottom, the M-to-N encoding circuit 448 will encode it as DO[2:0]=011 (binary). The M-to-N encoding circuit 448 can be implemented by a logic circuit.

請再參閱圖2,接續上述快閃類比轉數位電路446的舉例,若該些電阻器445b的數量為4,且每一個電阻器445b的阻值相同為1k歐姆,感測控制電路442所輸出的位準訊號使得可調電流源445a輸出的參考電流為10uA,則位準產生電路444產生的位準為0mV,10mV,20mV,30mV與40mV,該些位準的電壓差包括10mV,20mV,30mV與40mV,即前述差分比較器447a,447b,447c,447d各別接收位準電壓差為40mV,30mV,20mV,10mV。當該數位訊號輸出值為DO[2:0]=011(二進制),即表示電流轉電壓電路440所輸出的差分電壓為DO[2:0]=011對應的30-40 mV之間。若該電阻器441之阻抗為0.5歐姆,則該快閃記憶體於該寫入時的該電流為60-80mA之間。 Please refer to FIG. 2 again, following the example of the flash analog to digital circuit 446, if the number of the resistors 445b is 4 and the resistance value of each resistor 445b is the same as 1k ohm, the output of the sensing control circuit 442 The level signal makes the reference current output by the adjustable current source 445a 10uA, and the level generated by the level generating circuit 444 is 0mV, 10mV, 20mV, 30mV and 40mV, and the voltage difference of these levels includes 10mV, 20mV, 30mV and 40mV, that is, the aforementioned differential comparators 447a, 447b, 447c, and 447d respectively receive level voltage differences of 40mV, 30mV, 20mV, and 10mV. When the digital signal output value is DO[2:0]=011 (binary), it means that the differential voltage output by the current-to-voltage circuit 440 is 30-40 corresponding to DO[2:0]=011 between mV. If the resistance of the resistor 441 is 0.5 ohm, the current of the flash memory during the writing is between 60-80 mA.

另接續上述快閃類比轉數位電路446的舉例,若該些電阻器445b的數量為4,且每一個電阻器445b的阻值相同為1k歐姆,感測控制電路442所輸出的位準訊號使得可調電流源445a輸出的參考電流為20uA,則位準產生電路444產生的述位準為0mV,20mV,40mV,60mV與80mV,該些位準的電壓差包括20mV,40mV,60mV與80mV,即前述差分比較器447a,447b,447c,447d各別接收位準電壓差為80mV,60mV,40mV,20mV。當該數位訊號輸出值為DO[2:0]=011(二進制),即表示電流轉電壓電路440所輸出的差分電壓為DO[2:0]=011對應的60-80mV之間。若該電阻器441之阻抗為0.5歐姆,則該快閃記憶體於該寫入時的該電流為120-160mA之間。 Following the example of the flash analog to digital circuit 446, if the number of the resistors 445b is 4 and the resistance value of each resistor 445b is the same as 1k ohm, the level signal output by the sensing control circuit 442 is such that The reference current output by the adjustable current source 445a is 20uA, and the levels generated by the level generating circuit 444 are 0mV, 20mV, 40mV, 60mV and 80mV, and the voltage difference of these levels includes 20mV, 40mV, 60mV and 80mV. That is, the aforementioned differential comparators 447a, 447b, 447c, and 447d respectively receive level voltage differences of 80mV, 60mV, 40mV, and 20mV. When the digital signal output value is DO[2:0]=011 (binary), it means that the differential voltage output by the current-to-voltage circuit 440 is between 60-80mV corresponding to DO[2:0]=011. If the resistance of the resistor 441 is 0.5 ohm, the current of the flash memory during the writing is between 120-160 mA.

由上述二個舉例可知,快閃類比轉數位電路446輸出相同之數位訊號,該相同數位訊號所代表之電壓值與前述位準有關,當位準(位準電壓差)愈高,相同數位訊號所代表之電壓值即愈大;當位準(位準電壓差)愈低,相同數位訊號所代表之電壓值即愈小。如同前述,該些位準是由感測控制電路442發出的位準訊號決定。因此,感測控制電路442能依位準訊號及數位訊號而獲得對應的電壓值及電流值。 It can be seen from the above two examples that the flash analog-to-digital circuit 446 outputs the same digital signal. The voltage value represented by the same digital signal is related to the aforementioned level. The higher the level (level voltage difference), the same digital signal The voltage value represented is greater; when the level (level voltage difference) is lower, the voltage value represented by the same digital signal is smaller. As mentioned above, these levels are determined by the level signal from the sensing control circuit 442. Therefore, the sensing control circuit 442 can obtain the corresponding voltage value and current value according to the level signal and the digital signal.

其次,運作時,感測控制電路442會連續獲得多個電流值,當感測控制電路442連續收到的該數位訊號是該快閃類比轉數位電路446的輸出上限(以前述舉例而言,該上限為DO[2:0]=100),此表示連續接收到的該差分電壓都高於該位準產生電路444所產生的最高位準電壓差 (Vrm-Vr0),因此,感測控制電路442調高該位準訊號,以使得電流感測電路44能夠進一步量測出該差分電壓的實際差分電壓值;相反地,當感測控制電路442連續收到的該數位訊號是該快閃類比轉數位電路446的輸出下限(以前述舉例而言,該輸出下限為DO[2:0]=000),此表示連續接收到的該差分電壓都低於該位準產生電路444所產生的最低位準電壓差(Vr1-Vr0),因此,感測控制電路442調低該位準訊號,以使得電流感測電路44能夠進一步量測出該差分電壓的實際差分電壓值。 Secondly, during operation, the sensing control circuit 442 continuously obtains multiple current values. When the digital signal continuously received by the sensing control circuit 442 is the upper limit of the output of the flash analog to digital circuit 446 (in the foregoing example, The upper limit is DO[2:0]=100), which means that the continuously received differential voltage is higher than the highest level voltage difference generated by the level generating circuit 444 (Vrm-Vr0), therefore, the sensing control circuit 442 raises the level signal so that the current sensing circuit 44 can further measure the actual differential voltage value of the differential voltage; on the contrary, when the sensing control circuit 442 The continuously received digital signal is the lower limit of the output of the flash analog to digital circuit 446 (in the foregoing example, the lower limit of the output is DO[2:0]=000), which means that the continuously received differential voltage is all Is lower than the lowest level voltage difference (Vr1-Vr0) generated by the level generating circuit 444, therefore, the sensing control circuit 442 lowers the level signal so that the current sensing circuit 44 can further measure the difference The actual differential voltage value of the voltage.

由上述說明可知,感測控制電路442依一時序接收多個該數位訊號,並依據該些數位訊號,調整該位準訊號。具體而言,感測控制電路442藉由連續獲得的電流值,決定其輸出的位準訊號之大小,以更準確地量測快閃記憶體20所消耗的電流值。當感測控制電路442連續收到的數位訊號大部分(例如但不限於連續收到的90%的數位訊號)都介於快閃類比轉數位電路446的輸出上限與下限之間,即表示目前的位準訊號適當,感測控制電路442即維持該位準訊號的大小。其次,在快閃記憶體控制器40一開始運作時,感測控制電路442可以一預設值做為該位準訊號,並經一段時間的位準訊號的調整後,即可獲得適當的位準訊號。此預設值可在快閃記憶體控制器40設計或測試值,依實驗獲得。 It can be seen from the above description that the sensing control circuit 442 receives a plurality of the digital signals according to a time sequence, and adjusts the level signal according to the digital signals. Specifically, the sensing control circuit 442 determines the magnitude of the level signal output by the continuously obtained current value, so as to more accurately measure the current value consumed by the flash memory 20. When most of the digital signals continuously received by the sensing control circuit 442 (such as but not limited to 90% of the digital signals continuously received) are between the upper and lower output limits of the flash analog to digital circuit 446, it means that the current If the level signal is appropriate, the sensing control circuit 442 maintains the level signal. Secondly, when the flash memory controller 40 starts to operate, the sensing control circuit 442 can use a preset value as the level signal, and after a period of time adjustment of the level signal, the appropriate level can be obtained. Quasi-signal. The preset value can be designed or tested in the flash memory controller 40 and obtained by experiment.

快閃類比轉數位電路446的取樣頻率,與快閃記憶體20單次編程、抹除、讀取之時間有關,以圖5快閃記憶體20的時間-電流圖為例(容後詳述),圖中顯示單次編程時間大約5微秒(us),若欲在單次編程時間內獲得5個取樣點(獲得5個數位訊號),快閃類比轉數位電路446的取樣頻率可以為1MHz。 The sampling frequency of the flash analog to digital circuit 446 is related to the time of a single programming, erasing, and reading of the flash memory 20. Take the time-current diagram of the flash memory 20 in FIG. 5 as an example (detailed later) ), the figure shows that a single programming time is about 5 microseconds (us). If you want to obtain 5 sampling points (to obtain 5 digital signals) within a single programming time, the sampling frequency of the flash analog to digital circuit 446 can be 1MHz.

為協助了解處理器46依據快閃記憶體20消耗的電流值輸出控制訊號之一些實施例,在此先說明處理器46收到的多個電流值所繪製之時間-電流圖。請先同時參閱圖4及圖5,圖4繪示本案電流感測電路一實施例之電流感測結果示意圖。圖5繪示圖4標示5-5位置之局部放大示意圖。 In order to help understand some embodiments in which the processor 46 outputs a control signal according to the current value consumed by the flash memory 20, the time-current diagram drawn by the multiple current values received by the processor 46 will be described first. Please refer to FIG. 4 and FIG. 5 at the same time. FIG. 4 shows a schematic diagram of a current sensing result of an embodiment of the current sensing circuit of the present application. Fig. 5 is a partial enlarged schematic view of the position marked 5-5 in Fig. 4;

圖4為依據一些實施例,處理器40經由快閃控制電路42對快閃記憶體20進行資料編程作業時,處理器46持續接收電流感測電路44所輸出的電流值,並將之繪製成時間-電流圖,其水平軸為時間(從730毫秒(us)至9.73微秒(ms)),垂直軸為電流大小。時間-電流圖中上方曲線為編程時的電流值,下方曲線表示快閃記憶體20正在進行的程序。例如,圖上標示PRG的時間區間,為快閃記憶體20正在進行編程,而在二個相鄰編程PRG區間之間的時間區間,為快閃控制電路42對快閃記憶體20進行資料傳輸。同樣的,當處理器46經由快閃控制電路42對快閃記憶體20進行資料抹除作業時,亦可獲得抹除的時間-電流圖;當處理器46經由快閃控制電路42對快閃記憶體20進行資料讀取作業時,亦可獲得讀取的時間-電流圖。 4 shows that according to some embodiments, when the processor 40 performs data programming operations on the flash memory 20 via the flash control circuit 42, the processor 46 continuously receives the current value output by the current sensing circuit 44 and plots it as Time-current graph, the horizontal axis is time (from 730 milliseconds (us) to 9.73 microseconds (ms)), and the vertical axis is the magnitude of current. The upper curve in the time-current graph represents the current value during programming, and the lower curve represents the ongoing program of the flash memory 20. For example, the time interval marked PRG in the figure indicates that the flash memory 20 is being programmed, and the time interval between two adjacent programming PRG intervals is for the flash control circuit 42 to transmit data to the flash memory 20 . Similarly, when the processor 46 performs data erasing operations on the flash memory 20 through the flash control circuit 42, the erasing time-current graph can also be obtained; when the processor 46 erases the flash memory 20 through the flash control circuit 42 When the memory 20 is performing a data reading operation, a time-current graph of reading can also be obtained.

圖5中可以看出,雜訊位準電流值約為44.8mA。在3.92ms至4.42ms區間,編程過程中的最大電流約為40mA(即84.8-44.8mA),而該編程時間區間內,較低電流約為5.2mA(即50-44.8mA)。從圖5的PRG區間的多個電流值可以看出,大部分量測得到的電流值(稱編程電流值,容後詳述)均在5.2mA至40mA之間,無過多的電流值在下限或上限,此即表示感測控制電路442所輸出的位準訊號適當,無需調高或調低該位準訊號。 As can be seen in Figure 5, the noise level current value is about 44.8mA. In the interval of 3.92ms to 4.42ms, the maximum current during programming is about 40mA (ie 84.8-44.8mA), and in the programming time interval, the lower current is about 5.2mA (ie 50-44.8mA). From the multiple current values in the PRG interval in Figure 5, it can be seen that most of the measured current values (called programming current values, which will be described later) are between 5.2mA and 40mA, and there is no excessive current value at the lower limit. Or upper limit, which means that the level signal output by the sensing control circuit 442 is appropriate, and there is no need to increase or decrease the level signal.

圖4中的單一編程區間(PRG)即對應一特定頁的編程(稱頁 編程),如圖5的3.92-4.42ms時間區間即對應一特定頁的「頁編程」,每個「頁編程」包括多個「編程作業」,意即,圖5中的每一個電流的峰值個別對應快閃記憶體20對該頁的一次編程作業,單次編程作業時所量測而得的電流值稱為編程電流值。前述編程作業是指快閃記憶體20在接收了快閃控制電路42傳來欲寫入(含編程及抹除)的資料後(該些寫入資料各別對應111,011,001,010,100,000,101,110,共分為八群),會對寫入頁中的每一儲存單元(Cell)各別先進行一次(第一次)的編程作業,在一些實施例中,第一次的編程作業所採用的編程脈衝電壓(Program Pulse)是對應前述1個抹除位準(Erase State)及7個編程位準(Program States)中最低的電壓位準,完成該第一次編程作業後,會判斷欲寫入該最低電壓位準的儲存單元是否已具有該最低電壓位準(稱Verification),若已達該最低電壓位準,則快閃記憶體20在下一次(第二次)的編程作業時,即不對該些儲存單元施予編程脈衝電壓(Program Pulse),意即,快閃記憶體20僅對其餘的儲存單元進行對應次低的電壓位準的編程作業;快閃記憶體20在完成此第二次編程作業時,亦會進行確認(Verification),依此類推,直到對應最高電壓位準的編程作業完成為止。也就是說,每個儲存單元會依其所欲儲存的資料內容而被施予1至N次(N為大於1的正整數)的編程脈衝電壓(Program Pulse)。 The single programming interval (PRG) in Figure 4 corresponds to the programming of a specific page (called page Programming), as shown in Figure 5, the time interval of 3.92-4.42ms corresponds to the "page programming" of a specific page. Each "page programming" includes multiple "programming tasks", that is, the peak value of each current in Figure 5 Each corresponds to a programming operation of the flash memory 20 for the page, and the current value measured during a single programming operation is called the programming current value. The aforementioned programming operation means that after the flash memory 20 receives the data to be written (including programming and erasing) from the flash control circuit 42 (the written data correspond to 111,011,001,010,100,000,101,110, and are divided into eight groups) , A programming operation (the first time) is performed on each memory cell (Cell) in the written page. In some embodiments, the programming pulse voltage (Program Pulse Voltage) used in the first programming operation is ) Is the lowest voltage level corresponding to the aforementioned 1 erase level (Erase State) and 7 programming levels (Program States). After the first programming operation is completed, it will be judged to write the lowest voltage level Whether the storage unit of the storage unit has the lowest voltage level (called Verification), if the lowest voltage level has been reached, the flash memory 20 will not perform the next (second) programming operation on these storage units The pre-program pulse voltage (Program Pulse) means that the flash memory 20 only performs programming operations corresponding to the next lower voltage level to the remaining storage cells; when the flash memory 20 completes this second programming operation, Verification will also be performed, and so on, until the programming operation corresponding to the highest voltage level is completed. In other words, each storage cell is applied with a program pulse voltage (Program Pulse) from 1 to N times (N is a positive integer greater than 1) according to the data content it wants to store.

如同前述,快閃記憶體20在正常情形下,對每一儲存單元(Cell)之編程,施予1至N次編程脈衝電壓即會成功,意即對儲存單元進行N次的編程作業,即可使該儲存單元儲存的記錄電壓落在對應的編程位準區間。圖4及圖5中高電流值係對應編程作業次數較高的儲存單元(其儲存 之資料的編程位準較高)之編程作業,而較低電流值則對應編程作業次數較低的儲存單元(其儲存之資料的編程位準較低)之編程作業。舉三階儲存單元為例,資料011之編程位準較資料110之編程位準為低,因此,快閃記憶體20對某儲存單元編程011時,其所需電流即低於編程110之電流。 As mentioned above, in the normal situation of the flash memory 20, the programming of each storage cell (Cell) will be successful if the programming pulse voltage is applied 1 to N times, which means that the storage cell is programmed N times, namely The recording voltage stored in the storage unit can be made to fall within the corresponding programming level interval. The high current value in Figure 4 and Figure 5 corresponds to the storage cell with a higher number of programming operations (its storage The programming level of the data is higher), and the lower current value corresponds to the programming operation of the storage cell with a lower number of programming operations (the programming level of the stored data is lower). Take a three-level storage cell as an example. The programming level of data 011 is lower than that of data 110. Therefore, when flash memory 20 programs a certain storage cell 011, the current required is lower than that of programming 110 .

相反的,當某儲存單元已過度磨損或瀕臨壽命終點,快閃記憶體20對該儲存單元之編程作業之次數會高於正常次數,方能使該儲存單元儲存之記錄電壓符合對應的編程位準,因此,對該儲存單元編程的整體電流消耗量將大於正常儲存單元。若整個頁或區塊包括了較多的已過度磨損或瀕臨壽命終點儲存單元,則對應該頁或該區塊的總電流消耗量將上升,因此,處理器46即可藉由設定頁總電流值的和、塊和門檻來判斷該頁或該塊是否異常或即將異常。 On the contrary, when a storage cell has been excessively worn or is approaching the end of its life, the number of programming operations for the storage cell by the flash memory 20 will be higher than the normal number, so that the recording voltage stored in the storage cell can meet the corresponding programming bit Therefore, the overall current consumption for programming the storage cell will be greater than that of the normal storage cell. If the entire page or block contains more memory cells that have been excessively worn or are nearing the end of their life, the total current consumption of the corresponding page or the block will increase. Therefore, the processor 46 can set the page total current The sum of the value, the block and the threshold are used to determine whether the page or the block is abnormal or will be abnormal.

以下說明處理器46依據快閃記憶體20消耗的電流值輸出控制訊號之一些實施例。 The following describes some embodiments in which the processor 46 outputs a control signal according to the current value consumed by the flash memory 20.

在一些實施例中,處理器46依據電流值,判斷快閃記憶體20中的某個頁或某個區是否屬於正常狀態,並輸出對應的控制訊號。具體而言,處理器46在接收對應某個頁的多個電流值時,判斷該些電流值是否正常,處理器46於該些電流值為正常時,輸出的該控制訊號為正常訊號,處理器46於該些電流值為異常時,輸出的該控制訊號為異常訊號。前述的電流值可以是頁寫入作業時的電流值、頁編程作業時的電流值、頁抹除作業時的電流值、或頁讀取作業時的電流值。 In some embodiments, the processor 46 determines whether a certain page or a certain area in the flash memory 20 is in a normal state according to the current value, and outputs a corresponding control signal. Specifically, when the processor 46 receives multiple current values corresponding to a certain page, it determines whether the current values are normal. When the current values are normal, the processor 46 outputs the control signal as a normal signal, and processes When the current values are abnormal, the control signal output by the device 46 is an abnormal signal. The aforementioned current value may be the current value during the page writing operation, the current value during the page programming operation, the current value during the page erasing operation, or the current value during the page reading operation.

在一些實施例中,前述依據多個該電流值進行判斷方式為:當某一頁對應的總電流值的和大於一頁和門檻時,該頁即屬於異常;反 之,該頁即屬於正常。前述頁和門檻指的是快閃記憶體20中對一頁進行寫入(包括編程與抹除)時,累積消耗之總電流量。在一些實施例中,當某一頁對應的總編程電流值的和大於一頁編程和門檻時,該頁即屬於異常;反之,該頁即屬於正常。前述頁的總電流量亦可以是頁抹除總電流量,頁和門檻即對應為頁抹除和門檻。 In some embodiments, the aforementioned judgment method based on multiple current values is as follows: when the sum of the total current values corresponding to a page is greater than a page and a threshold, the page is abnormal; Otherwise, the page is normal. The aforementioned pages and thresholds refer to the total amount of current consumed cumulatively when a page is written (including programming and erasing) in the flash memory 20. In some embodiments, when the sum of the total programming current values corresponding to a page is greater than the programming and threshold of a page, the page is abnormal; otherwise, the page is normal. The total current of the aforementioned page can also be the total current of page erasing, and the page and the threshold correspond to the page erasing and threshold.

在一些實施例中,前述依據多個該電流值進行判斷方式為:當某一頁內的編程電流值大於一編程電流上限的數量佔整體數量之比例大於百分之二十時,該頁即屬於異常;反之,該頁即屬於正常。前述編程電流值是指快閃記憶體20進行頁編程(Program)時,每次的編程作業時所量測而得的電流值,例如圖5中的每一峰值;編程電流上限指快閃記憶體20單一編程作業時,若其電流大於該編程電流上限,即表示該頁的大部分儲存單元很可能已接近損壞。因此,若在頁編程時,編程電流值大於編程電流上限的總次數佔整體編程作業總數(即頁編程中編程作業的次數)之比例大於百分之二十時,即判斷該頁屬於異常。 In some embodiments, the foregoing judgment method based on a plurality of the current values is as follows: when the programming current value in a page is greater than a programming current upper limit and the proportion of the total number is greater than 20%, the page is It is abnormal; otherwise, the page is normal. The aforementioned programming current value refers to the current value measured during each programming operation of the flash memory 20 during page programming (Program), such as each peak value in FIG. 5; the upper limit of the programming current refers to the flash memory During a single programming operation of the body 20, if its current is greater than the upper limit of the programming current, it means that most of the storage cells on the page are likely to be nearly damaged. Therefore, if the total number of programming current values greater than the upper limit of programming current accounts for more than 20% of the total number of programming operations (ie, the number of programming operations in page programming) during page programming, it is determined that the page is abnormal.

在一些實施例中,當某一區塊對應的總電流值的和大於一塊和門檻時,該區塊即屬於異常;反之,該區塊即屬於正常。前述的塊總電流值及塊和門檻,亦可改為編程、抹除之塊總電流值及塊和門檻。在一些實施例中,前述依據多個該電流值之判斷方式為:當某一區塊內的各編程電流值大於一編程電流上限的數量佔整體數量之比例大於百分之二十時,該區塊即屬於異常;反之,該區塊即屬於正常。 In some embodiments, when the sum of the total current values corresponding to a certain block is greater than one block and the threshold, the block is abnormal; otherwise, the block is normal. The aforementioned block total current value and block and threshold can also be changed to the block total current value and block and threshold for programming and erasing. In some embodiments, the aforementioned judgment method based on a plurality of the current values is: when the proportion of each programming current value in a certain block that is greater than a programming current upper limit to the total number is greater than 20%, the The block is abnormal; otherwise, the block is normal.

在一些實施例中,該處理器46在接收多個該電流值時,處理器46將該些電流與一預定電流樣板比對,以判斷該些電流值是否正常。處 理器46於該些電流值為正常時,輸出的該控制訊號為正常訊號;於該些電流值為異常時,輸出的該控制訊號為異常訊號。其中,該預定電流樣板為一頁間斜率上限,處理器46對連續收到的多個頁的多個電流值進行判斷,例如,將每個頁中10%最高電流值取平均值,並將連續頁的該些平均值進行趨近線運算並獲得該趨近線之斜率,當該趨近線之斜率大於連續頁斜率上限時,處理器46即判斷該些頁為異常或該些頁所屬於區塊為異常,輸出的該控制訊號為異常訊號。 In some embodiments, when the processor 46 receives a plurality of the current values, the processor 46 compares the currents with a predetermined current template to determine whether the current values are normal. Place When the current values of the processor 46 are normal, the control signal output is a normal signal; when the current values are abnormal, the control signal output is an abnormal signal. Wherein, the predetermined current template is the upper limit of the slope between pages, and the processor 46 judges the multiple current values of multiple pages continuously received, for example, averages the 10% highest current value in each page, and The average values of the consecutive pages are operated on the approach line and the slope of the approach line is obtained. When the slope of the approach line is greater than the upper limit of the slope of the consecutive pages, the processor 46 determines that the pages are abnormal or the pages are located. The block is abnormal, and the output control signal is abnormal.

前述處理器46依據電流值判斷某頁或某區塊為異常之意涵並非指該頁或區塊已損壞,而是很可能已接近損壞,因此,該異常可指即將損壞。前述處理器46依據電流值判斷某頁或某區塊為正常之意涵,指依該判斷方式,並非異常,但並非表示該頁或區塊不會因其他判斷方式而判斷為異常(可能即將損壞)。當處理器46依某判斷方式判斷某頁或某區塊為正常時,亦可不輸出該控制訊號。 The aforementioned processor 46 judging that a certain page or a certain block is abnormal according to the current value does not mean that the page or block is damaged, but is probably close to damage. Therefore, the abnormality may mean that it is about to be damaged. The aforementioned processor 46 judges that a certain page or a certain block is normal according to the current value, which means that the judgment method is not abnormal, but it does not mean that the page or block will not be judged as abnormal due to other judgment methods (it may be about damage). When the processor 46 determines that a certain page or a certain block is normal according to a certain judgment method, it may not output the control signal.

在處理器46輸出的控制訊號為異常時,處理器46可進一步標示該異常所對應的頁或區塊為損壞,以避免寫入該頁或區塊之資訊產生錯誤。處理器46可搭配壞區管理機制(Bad Block Management,BBM),對壞區進行管理。 When the control signal output by the processor 46 is abnormal, the processor 46 can further indicate that the page or block corresponding to the abnormality is damaged, so as to avoid errors in the information written to the page or block. The processor 46 can be used with a bad block management mechanism (Bad Block Management, BBM) to manage the bad blocks.

上述一些實施例所述的頁和門檻、頁編程和門檻、頁抹除和門檻、編程電流上限、頁總電流值的和、塊和門檻、及頁間斜率上限可經由實驗獲得。舉例而言,可以對多個快閃記憶體20進行老化測試,並持續量測其消耗電流值,經過統計及考量安全係數,即可獲得該些門檻、和與上限;或者對同一快閃記憶體20內不同的頁與區塊進行老化測試,或任何 統計預測方法,即可獲得該些門檻、和與上限。 The pages and thresholds, page programming and thresholds, page erasing and thresholds, programming current upper limit, total page current value, block and threshold, and page slope upper limit described in some of the above embodiments can be obtained through experiments. For example, it is possible to perform an aging test on multiple flash memories 20, and continuously measure their consumption current values, and after statistics and consideration of safety factors, these thresholds, sums and upper limits can be obtained; or for the same flash memory Different pages and blocks in body 20 undergo aging test, or any These thresholds, sums, and upper limits can be obtained by statistical forecasting methods.

綜上所述,依據一些實施例,快閃記憶體控制器可即時獲得快閃記憶體運作時消耗的電流值,並據以判斷快閃記憶體運作是否正常。依據一些實施例,具有該快閃記憶體控制器的儲存裝置可即時判斷快閃記憶體運作是否正常。 To sum up, according to some embodiments, the flash memory controller can obtain the current value consumed by the flash memory in real time and determine whether the flash memory is operating normally. According to some embodiments, the storage device with the flash memory controller can instantly determine whether the flash memory is operating normally.

10:儲存裝置 10: storage device

20:NAND快閃記憶體 20: NAND flash memory

30:電壓供應電路 30: Voltage supply circuit

200:區塊 200: block

40:快閃記憶體控制器 40: Flash memory controller

42:快閃控制電路 42: Flash control circuit

44:電流感測電路 44: current sensing circuit

46:處理器 46: processor

440:電流轉電壓電路 440: Current to Voltage Circuit

441:電阻器 441: resistor

Vip、Vin:差分電壓 Vip, Vin: differential voltage

Claims (9)

一種快閃記憶體的運作狀態的偵測方法,該快閃記憶體包括有複數個區塊(Block),每個區塊包括複數個頁,該偵測方法包括:對該快閃記憶體的該複數個頁中的至少一頁進行一特定操作,其中,該特定操作係為一區塊抹除(Block Erase)、一頁編程(Page Program)、以及一讀取操作的至少其一;產生對應於該複數個頁中的該至少一頁的該特定操作的一差分電壓;依據該差分電壓輸出一電流值,其中,該電流值係對應於該複數個頁中的該至少一頁的該特定操作;以及依據該電流值判斷該快閃記憶體的該複數個頁中的該至少一頁的運作狀態,其中,依據該差分電壓輸出該電流值的步驟包括:依據一位準訊號產生複數位準,其中,該些位準間的電壓差值大小係與該位準訊號有關;依據該差分電壓及該些位準輸出一數位訊號;以及依據該位準訊號及該數位訊號輸出該電流值。 A method for detecting the operating status of a flash memory. The flash memory includes a plurality of blocks, and each block includes a plurality of pages. The detection method includes: At least one of the plurality of pages performs a specific operation, where the specific operation is at least one of a block erase (Block Erase), a page program (Page Program), and a read operation; A differential voltage corresponding to the specific operation of the at least one page of the plurality of pages; a current value is output according to the differential voltage, wherein the current value corresponds to the at least one page of the plurality of pages Specific operation; and judging the operating state of the at least one page of the plurality of pages of the flash memory according to the current value, wherein the step of outputting the current value according to the differential voltage includes: generating a complex signal according to a one-level signal Digital level, where the voltage difference between the levels is related to the level signal; a digital signal is output according to the differential voltage and the levels; and the current is output according to the level signal and the digital signal value. 如請求項1所述之偵測方法,更包括:依據該電流值對該快閃記憶體進行壞區(Bad Block)管理。 The detection method according to claim 1, further comprising: performing bad block management on the flash memory according to the current value. 如請求項1所述之偵測方法,更包括:利用一統計方法來依據該電流值預測該快閃記憶體的一可能損壞時間。 The detection method according to claim 1, further comprising: using a statistical method to predict a possible damage time of the flash memory according to the current value. 如請求項1所述之偵測方法,其中依據該差分電壓輸出該電流值的步驟更包括:依一時序接收多個該數位訊號;以及依據該些數位訊號調整該位準訊號。 The detection method according to claim 1, wherein the step of outputting the current value according to the differential voltage further includes: receiving a plurality of the digital signals according to a time sequence; and adjusting the level signal according to the digital signals. 如請求項1所述之偵測方法,其中依據該電流值判斷該快閃記憶體的該複數個頁中的該至少一頁的該運作狀態的步驟包括:接收不同時序的多個該電流值,其中該些電流值對應於對該快閃記憶體的同一部位的該操作。 The detection method according to claim 1, wherein the step of judging the operating state of the at least one page of the plurality of pages of the flash memory according to the current value includes: receiving a plurality of the current values of different timings , Wherein the current values correspond to the operation on the same part of the flash memory. 如請求項5所述之偵測方法,其中依據該電流值判斷該快閃記憶體的該複數個頁中的該至少一頁的該運作狀態的步驟更包括:當符合以下至少一情況,判斷該同一部位為一異常:該些電流值的和大於一門檻;以及於該些電流值中大於一編程電流上限的數量佔整體操作總數的比例大於百分之二十。 The detection method according to claim 5, wherein the step of judging the operating state of the at least one page of the plurality of pages of the flash memory according to the current value further includes: when at least one of the following conditions is met, judging The same part is an abnormality: the sum of the current values is greater than a threshold; and the proportion of the current values greater than a programming current upper limit to the total number of operations is greater than 20%. 如請求項1所述之偵測方法,其中依據該電流值判斷該快閃記憶體的該運作狀態的步驟包括:接收不同時序的多個該電流值,其中該些電流值對應於對該快閃記憶體的多個不同部位的該操作;以及依據該些電流值與一預定電流樣板判斷該些部位的狀態。 The detection method according to claim 1, wherein the step of judging the operating state of the flash memory according to the current value includes: receiving a plurality of the current values of different timings, wherein the current values correspond to the flash memory The operation of a plurality of different parts of the flash memory; and judging the state of the parts according to the current values and a predetermined current template. 一種快閃記憶體的運作電流的獲得方法,該快閃記憶體包括有複數個區塊(Block),每個區塊包括複數個頁,該獲得方法包括: 在該快閃記憶體中的該複數個頁中的至少一頁執行一特定操作,其中,該特定操作係為一區塊抹除、一頁編程、以及一讀取操作的至少其一;對應於該複數個頁中的該至少一頁於該特定操作時的電流產生一差分電壓;依據一位準訊號產生複數位準,其中,該些位準間的電壓差值大小係與該位準訊號有關;依據該差分電壓及該些位準輸出一數位訊號;以及依據該位準訊號及該數位訊號輸出一電流值,其中,該電流值係對應於該複數個頁中的該至少一頁之該特定操作。 A method for obtaining the operating current of a flash memory. The flash memory includes a plurality of blocks, and each block includes a plurality of pages. The obtaining method includes: Perform a specific operation on at least one of the plurality of pages in the flash memory, where the specific operation is at least one of a block erase, a page programming, and a read operation; correspondingly; The current of the at least one page of the plurality of pages during the specific operation generates a differential voltage; a plurality of levels are generated according to a one-level signal, wherein the voltage difference between the levels is the same as the level Signal-related; output a digital signal according to the differential voltage and the levels; and output a current value according to the level signal and the digital signal, wherein the current value corresponds to the at least one of the plurality of pages The specific operation. 如請求項8所述之獲得方法,更包括:依一時序接收多個該數位訊號;以及依據該些數位訊號調整該位準訊號。 The obtaining method according to claim 8, further comprising: receiving a plurality of the digital signals in a time sequence; and adjusting the level signal according to the digital signals.
TW108127082A 2018-08-31 2018-08-31 Method for detecting operation state and obtaining operation current of flash memory TWI714192B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW108127082A TWI714192B (en) 2018-08-31 2018-08-31 Method for detecting operation state and obtaining operation current of flash memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW108127082A TWI714192B (en) 2018-08-31 2018-08-31 Method for detecting operation state and obtaining operation current of flash memory

Publications (2)

Publication Number Publication Date
TW202011410A TW202011410A (en) 2020-03-16
TWI714192B true TWI714192B (en) 2020-12-21

Family

ID=70766751

Family Applications (1)

Application Number Title Priority Date Filing Date
TW108127082A TWI714192B (en) 2018-08-31 2018-08-31 Method for detecting operation state and obtaining operation current of flash memory

Country Status (1)

Country Link
TW (1) TWI714192B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150270014A1 (en) * 2014-03-19 2015-09-24 Sandisk Enterprise Ip Llc Fault Detection and Prediction for Data Storage Elements
US9454448B2 (en) * 2014-03-19 2016-09-27 Sandisk Technologies Llc Fault testing in storage devices
TW201810281A (en) * 2012-10-04 2018-03-16 賽普拉斯半導體公司 Supply power dependent controllable write throughput for memory applications

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW201810281A (en) * 2012-10-04 2018-03-16 賽普拉斯半導體公司 Supply power dependent controllable write throughput for memory applications
US20150270014A1 (en) * 2014-03-19 2015-09-24 Sandisk Enterprise Ip Llc Fault Detection and Prediction for Data Storage Elements
US9454448B2 (en) * 2014-03-19 2016-09-27 Sandisk Technologies Llc Fault testing in storage devices

Also Published As

Publication number Publication date
TW202011410A (en) 2020-03-16

Similar Documents

Publication Publication Date Title
US11960349B2 (en) Power management component for memory sub-system voltage regulation
US8806106B2 (en) Estimating wear of non-volatile, solid state memory
JP6047286B2 (en) Early detection of flash memory degradation using test cells
US6877118B2 (en) Memory testing method and memory testing apparatus
KR100624595B1 (en) Non-volatile semiconductor memory device, data write-in method of non-volatile semiconductor memory device and memory card
CN115699188A (en) Recurrent neural network for identifying threshold voltages to be used in reading of flash memory devices
CN109918022B (en) SSD open card bad block table inheritance method
CN101013601B (en) Method and device for controlling detection time of non-volatile memory
US20160099048A1 (en) Threshold voltage distribution determination
JP2009026436A (en) Method of measuring threshold voltage distribution in memory by using aggregate characteristic
TWI689927B (en) Controller for nand flash memory and storage device applying the same
ITRM20060652A1 (en) TEMPERATURE COMPENSATION OF MEMORY SIGNALS USING DIGITAL SIGNALS
CN109830255B (en) Characteristic quantity-based flash memory life prediction method and system and storage medium
US20200066322A1 (en) Apparatus for memory control
TWI714192B (en) Method for detecting operation state and obtaining operation current of flash memory
CN102568610A (en) Early detection of degradation in nor flash memory
US8374029B2 (en) Electrically addressed non-volatile memory maintentance
CN110890121B (en) Storage device and NAND flash memory controller thereof
US12190973B2 (en) Memory device performing sensing operation and method of operating the same
US9256375B2 (en) Level placement in solid-state memory
CN110580932B (en) A storage unit quality measurement method applied to wear leveling
CN119438855A (en) Chip testing method, device, equipment and storage medium
JP2003059299A (en) Semiconductor memory and its test method
CN120780234A (en) Operation parameter configuration method, device, storage controller and storage system
JP2002343098A (en) Test method for semiconductor memory device