[go: up one dir, main page]

TWI843434B - Memory device and in-memory search methode thereof - Google Patents

Memory device and in-memory search methode thereof Download PDF

Info

Publication number
TWI843434B
TWI843434B TW112104515A TW112104515A TWI843434B TW I843434 B TWI843434 B TW I843434B TW 112104515 A TW112104515 A TW 112104515A TW 112104515 A TW112104515 A TW 112104515A TW I843434 B TWI843434 B TW I843434B
Authority
TW
Taiwan
Prior art keywords
voltage
current
memory cell
stage
target memory
Prior art date
Application number
TW112104515A
Other languages
Chinese (zh)
Other versions
TW202433473A (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 TW112104515A priority Critical patent/TWI843434B/en
Application granted granted Critical
Publication of TWI843434B publication Critical patent/TWI843434B/en
Publication of TW202433473A publication Critical patent/TW202433473A/en

Links

Images

Landscapes

  • Read Only Memory (AREA)

Abstract

A memory device and an in-memory search method are provided. The in-memory search includes: providing, in a first step, a first voltage or a second voltage to a word line of at least one selected memory cell according to a logical status of a searched data, and reading a first current; providing, in a second step, a third voltage or a fourth voltage to the word line of the at least one selected memory cell according to the logical status of the searched data, and reading a second current; obtaining a search result according to a difference of the second current and the first current.

Description

記憶體裝置及其記憶體內搜尋方法Memory device and in-memory search method thereof

本發明是有關於一種記憶體裝置及其記憶體內搜尋方法,且特別是有關於一種不需設置參考記憶胞的記憶體裝置及其記憶體內搜尋方法。 The present invention relates to a memory device and a method for searching in the memory, and in particular to a memory device and a method for searching in the memory that do not require setting up reference memory cells.

隨著大數據和人工智能的硬體加速器的興起,資料的比對/搜索成為不可缺少的功能。在現有技術中,所謂的三元內容可尋址記憶體(TCAM)可以實現高度的並列的資料搜索。習知技術中的三元內容可尋址記憶體常由靜態記憶體所組成,因此常有存儲密度不足以及高耗電量的問題。 With the rise of hardware accelerators for big data and artificial intelligence, data matching/searching has become an indispensable function. In the existing technology, the so-called ternary content addressable memory (TCAM) can achieve highly parallel data search. The ternary content addressable memory in the known technology is often composed of static memory, so it often has problems of insufficient storage density and high power consumption.

對應於此,習知技術提出利用非揮發式記憶體來實現三元內容可尋址記憶體。然而,在習知技術中,總需要一個非揮發式記憶胞以儲存資料,另一個非揮發式記憶胞作為參考記憶胞,才能完成一個位元的資料的搜尋動作。如此一來,記憶體裝置需要較大的電路面積,並造成浪費。 In response to this, the known technology proposes to use non-volatile memory to implement ternary content addressable memory. However, in the known technology, a non-volatile memory cell is always required to store data, and another non-volatile memory cell is used as a reference memory cell to complete the search action of one bit of data. As a result, the memory device requires a larger circuit area and causes waste.

本發明提供一種記憶體裝置及其記憶體內搜尋方法,透過兩階段方式進行記憶體內的資料搜尋動作。 The present invention provides a memory device and a method for searching in memory thereof, which performs a data search in memory in a two-stage manner.

本發明的記憶體內搜尋方法包括:根據所要搜尋資料的邏輯狀態,在第一階段,提供第一電壓或第二電壓至至少一目標記憶胞的字元線,並讀取第一電流;根據所要搜尋資料的邏輯狀態,在第二階段,提供第三電壓或第四電壓至至少目標記憶胞的字元線,並讀取第二電流;根據第一電流與第二電流的差值以獲得搜尋結果,其中,第一電壓小於第三電壓,第三電壓小於或等於第二電壓,第二電壓小於第四電壓。 The in-memory search method of the present invention includes: according to the logical state of the data to be searched, in the first stage, providing a first voltage or a second voltage to the word line of at least one target memory cell, and reading a first current; according to the logical state of the data to be searched, in the second stage, providing a third voltage or a fourth voltage to the word line of at least one target memory cell, and reading a second current; obtaining a search result according to the difference between the first current and the second current, wherein the first voltage is less than the third voltage, the third voltage is less than or equal to the second voltage, and the second voltage is less than the fourth voltage.

本發明的記憶體裝置包括記憶胞陣列以及控制器。控制器耦接記憶胞陣列。控制器用以:根據所要搜尋資料的邏輯狀態,在第一階段,提供第一電壓或第二電壓至至少一目標記憶胞的字元線,並讀取第一電流;根據所要搜尋資料的邏輯狀態,在第二階段,提供第三電壓或第四電壓至至少目標記憶胞的字元線,並讀取第二電流;根據第一電流與第二電流的差值以獲得搜尋結果,其中,第一電壓小於第三電壓,第三電壓小於或等於第二電壓,第二電壓小於第四電壓。 The memory device of the present invention includes a memory cell array and a controller. The controller is coupled to the memory cell array. The controller is used to: provide a first voltage or a second voltage to a word line of at least one target memory cell and read a first current in a first stage according to the logic state of the data to be searched; provide a third voltage or a fourth voltage to a word line of at least one target memory cell and read a second current in a second stage according to the logic state of the data to be searched; obtain a search result according to the difference between the first current and the second current, wherein the first voltage is less than the third voltage, the third voltage is less than or equal to the second voltage, and the second voltage is less than the fourth voltage.

基於上述,本發明透過兩階段的方式,可完成利用單一個非揮發性記憶胞,在不需要設置參考記憶胞的條件下,完成記憶體內搜尋動作。有效提升記憶胞的使用率,提升記憶體內搜尋的容量,並可降低記憶體裝置所需的電路面積。 Based on the above, the present invention can use a single non-volatile memory cell to complete the search operation in the memory without setting a reference memory cell through a two-stage method. It effectively improves the utilization rate of the memory cell, increases the capacity of the search in the memory, and reduces the circuit area required for the memory device.

210~240:分布曲線 210~240: Distribution curve

400、500、620:記憶胞陣列 400, 500, 620: memory cell array

700:記憶體裝置 700: Memory device

710:控制器 710: Controller

BL1~BL3:位元線 BL1~BL3: bit line

C1~C8:記憶胞組 C1~C8: memory cell group

EG1~EG4:邊界 EG1~EG4:Boundary

HD相似度資訊 HD similarity information

I:參考電流值 I: Reference current value

I1、Isp1:第一電流 I1, Isp1: first current

I2、Isp2:第二電流 I2, Isp2: second current

S1、S2:階段 S1, S2: Stage

S110~S130:步驟 S110~S130: Steps

SA1~SA3:感測放大器 SA1~SA3: sensor amplifier

SHD:所要搜尋資料 SHD: Data to be searched

SL1~SL4:源極線 SL1~SL4: Source line

SMC:選中記憶胞 SMC: Select memory cell

STD:資料 STD:Data

VSL1:第一電壓 VSL1: first voltage

VSL2:第二電壓 VSL2: Second voltage

VSL2’:第三電壓 VSL2’: third voltage

VSL4:第四電壓 VSL4: Fourth voltage

VT:臨界電壓 VT: critical voltage

WL1~WL8:字元線 WL1~WL8: character line

圖1繪示本發明一實施例的記憶體內搜尋方法的流程圖。 FIG1 is a flow chart of an in-memory search method according to an embodiment of the present invention.

圖2繪示本發明實施例的記憶體內搜尋方法的動作示意圖。 FIG2 is a schematic diagram showing the operation of the in-memory search method of an embodiment of the present invention.

圖3A至圖3E繪示在本發明實施例中,針對單一選中記憶胞所進行的記憶體內搜尋動作的實施方式的示意圖。 Figures 3A to 3E are schematic diagrams showing the implementation of the in-memory search action for a single selected memory cell in an embodiment of the present invention.

圖4繪示本發明實施例的記憶體內搜尋方法的多個位元的搜尋動作的實施方式的示意圖。 FIG4 is a schematic diagram showing the implementation of the search action of multiple bits in the memory search method of the embodiment of the present invention.

圖5繪示本發明實施例的記憶體內搜尋方法的多個位元的搜尋動作的另一實施方式的示意圖。 FIG5 is a schematic diagram showing another implementation of the search action of multiple bits in the memory search method of the embodiment of the present invention.

圖6繪示本發明實施例的記憶體內搜尋方法的多個位元的搜尋動作的另一實施方式的示意圖。 FIG6 is a schematic diagram showing another implementation of the search action of multiple bits in the memory search method of the embodiment of the present invention.

圖7繪示本發明實施例的記憶體裝置的示意圖。 FIG7 is a schematic diagram of a memory device according to an embodiment of the present invention.

請同步參照圖1以及圖2,其中圖1繪示本發明一實施例的記憶體內搜尋方法的流程圖。圖2繪示本發明實施例的記憶體內搜尋方法的動作示意圖。圖2的縱軸為記憶胞的數量,橫軸則為記憶胞的臨界電壓VT。分布曲線210~240分別為具有不同儲存資料的記憶胞的臨界電壓的分布範圍。其中,分布曲線210例如為儲存資料為邏輯0的記憶胞的臨界電壓的分布範圍;分布曲線 220例如為儲存資料為邏輯1的記憶胞的臨界電壓的分布範圍;分布曲線230以及240則皆為儲存無效(invalid)資料的記憶胞的臨界電壓的分布範圍。在本實施例中,分布曲線210具有下邊界EG1以及上邊界EG2,其中的下邊界EG1小於上邊界EG2。分布曲線220則具有下邊界EG3以及上邊界EG4,其中的下邊界EG3小於上邊界EG4,且下邊界EG3大於上邊界EG2。 Please refer to FIG. 1 and FIG. 2 simultaneously, wherein FIG. 1 is a flow chart of a memory search method according to an embodiment of the present invention. FIG. 2 is a schematic diagram of the operation of the memory search method according to an embodiment of the present invention. The vertical axis of FIG. 2 is the number of memory cells, and the horizontal axis is the critical voltage VT of the memory cells. The distribution curves 210 to 240 are respectively the distribution ranges of the critical voltages of memory cells with different storage data. The distribution curve 210 is, for example, the distribution range of the critical voltage of the memory cell storing the data of logic 0; the distribution curve 220 is, for example, the distribution range of the critical voltage of the memory cell storing the data of logic 1; the distribution curves 230 and 240 are both the distribution range of the critical voltage of the memory cell storing invalid data. In this embodiment, the distribution curve 210 has a lower boundary EG1 and an upper boundary EG2, wherein the lower boundary EG1 is smaller than the upper boundary EG2. The distribution curve 220 has a lower boundary EG3 and an upper boundary EG4, wherein the lower boundary EG3 is smaller than the upper boundary EG4, and the lower boundary EG3 is larger than the upper boundary EG2.

請參照圖1,圖1中的步驟可透過記憶體裝置中的控制器來執行。在步驟S110中,控制器可根據所要搜尋資料的邏輯狀態,在第一階段,提供第一電壓VSL1或第二電壓VSL2至至少一目標記憶胞的字元線,並讀取第一電流。其中,如圖2所示,第一電壓VSL1小於下邊界EG1,第二電壓VSL2則大於上邊界EG2。 Please refer to FIG. 1. The steps in FIG. 1 can be executed by a controller in a memory device. In step S110, the controller can provide a first voltage VSL1 or a second voltage VSL2 to a word line of at least one target memory cell in a first stage according to the logical state of the data to be searched, and read a first current. As shown in FIG. 2, the first voltage VSL1 is less than the lower boundary EG1, and the second voltage VSL2 is greater than the upper boundary EG2.

在步驟S120中,控制器可根據所要搜尋資料的邏輯狀態,在第二階段,提供第三電壓VSL2’或第四電壓VSL4至至少一目標記憶胞的字元線,並讀取第二電流。其中,如圖2所示,第三電壓VSL2’大於或等於第二電壓VSL2,且第三電壓VSL2’大於上邊界EG2並小於下邊界EG3。第四電壓VSL3則大於上邊界EG4。 In step S120, the controller can provide a third voltage VSL2' or a fourth voltage VSL4 to the word line of at least one target memory cell in the second stage according to the logic state of the data to be searched, and read the second current. As shown in FIG2, the third voltage VSL2' is greater than or equal to the second voltage VSL2, and the third voltage VSL2' is greater than the upper boundary EG2 and less than the lower boundary EG3. The fourth voltage VSL3 is greater than the upper boundary EG4.

接著,在步驟S130中,控制器可使第二電流與第一電流相減,並根據第二電流與第一電流的差值有無大於一預設電流閾值,來產生搜尋結果。其中,在本實施例中,當第二電流與第一電流的差值大於預設電流時,控制器可產生為相符(match)的搜尋結果,相對的,若第二電流與第一電流的差值不於預設電流而 趨近於0時,控制器可產生為不相符(un-match)的搜尋結果。 Next, in step S130, the controller can subtract the second current from the first current, and generate a search result based on whether the difference between the second current and the first current is greater than a preset current threshold. In this embodiment, when the difference between the second current and the first current is greater than the preset current, the controller can generate a matching search result. Conversely, if the difference between the second current and the first current is not less than the preset current and approaches 0, the controller can generate an unmatched search result.

進一步來說明,當所要搜尋資料的邏輯狀態為邏輯0時,在第一階段時(步驟S110),控制器可提供相對低的第一電壓VSL1至進行搜尋動作的目標記憶胞的字元線,並針對此目標記憶胞執行讀取動作以獲得第一電流。其中,基於第一電壓VSL1低於下邊界EG1,不論目標記憶胞儲存的資料為邏輯0或邏輯1,針對此目標記憶胞執行讀取動作所獲得的第一電流均趨近於0。 To further explain, when the logic state of the data to be searched is logic 0, in the first stage (step S110), the controller can provide a relatively low first voltage VSL1 to the word line of the target memory cell performing the search action, and perform a read action on the target memory cell to obtain a first current. Since the first voltage VSL1 is lower than the lower boundary EG1, regardless of whether the data stored in the target memory cell is logic 0 or logic 1, the first current obtained by performing a read action on the target memory cell tends to be close to 0.

接著,控制器可在第二階段(步驟S120),提供第三電壓VSL2’至進行搜尋動作的目標記憶胞的字元線,並針對此目標記憶胞執行讀取動作以獲得第二電流。其中,基於第三電壓VSL2’高於上邊界EG2,但低於下邊界EG3。因此,當目標記憶胞儲存的資料為邏輯0時,第二電流可為大於0的一參考電流值。而當目標記憶胞儲存的資料為邏輯1時,第二電流可均趨近於0。 Then, the controller can provide a third voltage VSL2' to the word line of the target memory cell performing the search action in the second stage (step S120), and perform a read action on the target memory cell to obtain a second current. Wherein, based on the third voltage VSL2' being higher than the upper boundary EG2 but lower than the lower boundary EG3. Therefore, when the data stored in the target memory cell is logical 0, the second current can be a reference current value greater than 0. When the data stored in the target memory cell is logical 1, the second current can be close to 0.

因此,當所要搜尋資料的邏輯狀態為邏輯0,且目標記憶胞儲存的資料為邏輯0時,控制器可計算出第二電流與第一電流的差值等於參考電流值(大於預設電流閾值),並可對應產生為相符的搜尋結果。相對的,當所要搜尋資料的邏輯狀態為邏輯0,且目標記憶胞儲存的資料為邏輯1時,控制器可計算出第二電流與第一電流的差值趨近於0(小於預設電流閾值),並可對應產生為不相符的搜尋結果。 Therefore, when the logic state of the data to be searched is logic 0, and the data stored in the target memory cell is logic 0, the controller can calculate that the difference between the second current and the first current is equal to the reference current value (greater than the preset current threshold), and can generate a corresponding search result. Conversely, when the logic state of the data to be searched is logic 0, and the data stored in the target memory cell is logic 1, the controller can calculate that the difference between the second current and the first current is close to 0 (less than the preset current threshold), and can generate a corresponding search result that does not match.

在另一方面,當所要搜尋資料的邏輯狀態為邏輯1時,在第一階段(步驟S110)時,控制器可提供第二電壓VSL2至進 行搜尋動作的目標記憶胞的字元線,並針對此目標記憶胞執行讀取動作以獲得第一電流。其中,基於第二電壓VSL2介於上邊界EG2以及下邊界EG3,若目標記憶胞儲存的資料為邏輯0,針對此目標記憶胞執行讀取動作所獲得的第一電流可為大於0的參考電流值。在另一方面,若目標記憶胞儲存的資料為邏輯1,針對此目標記憶胞執行讀取動作所獲得的第一電流則可趨近於0。 On the other hand, when the logic state of the data to be searched is logic 1, in the first stage (step S110), the controller may provide a second voltage VSL2 to the word line of the target memory cell performing the search action, and perform a read action on the target memory cell to obtain a first current. Wherein, based on the second voltage VSL2 being between the upper boundary EG2 and the lower boundary EG3, if the data stored in the target memory cell is logic 0, the first current obtained by performing the read action on the target memory cell may be a reference current value greater than 0. On the other hand, if the data stored in the target memory cell is logical 1, the first current obtained by performing a read operation on the target memory cell may be close to 0.

接著,當所要搜尋資料的邏輯狀態為邏輯1時,在第二階段(步驟S120)時,控制器可提供第四電壓VSL4至進行搜尋動作的目標記憶胞的字元線,並針對此目標記憶胞執行讀取動作以獲得第二電流。其中,基於第四電壓VSL2大於上邊界EG4,無論目標記憶胞儲存的資料為邏輯0或1,針對此目標記憶胞執行讀取動作所獲得的第二電流皆可為大於0的參考電流值。 Next, when the logic state of the data to be searched is logic 1, in the second stage (step S120), the controller can provide a fourth voltage VSL4 to the word line of the target memory cell performing the search action, and perform a read action on the target memory cell to obtain a second current. Wherein, based on the fourth voltage VSL2 being greater than the upper boundary EG4, regardless of whether the data stored in the target memory cell is logic 0 or 1, the second current obtained by performing a read action on the target memory cell can be a reference current value greater than 0.

因此,當所要搜尋資料的邏輯狀態為邏輯1,且目標記憶胞儲存的資料為邏輯0時,控制器可計算出第二電流與第一電流的差值趨近於0(小於預設電流閾值),並可對應產生為不相符的搜尋結果。相對的,當所要搜尋資料的邏輯狀態為邏輯0,且目標記憶胞儲存的資料為邏輯1時,控制器可計算出第二電流與第一電流的差值等於參考電流值(大於預設電流閾值),並可對應產生為相符的搜尋結果。 Therefore, when the logic state of the data to be searched is logic 1, and the data stored in the target memory cell is logic 0, the controller can calculate that the difference between the second current and the first current is close to 0 (less than the preset current threshold), and can generate a corresponding incompatible search result. Conversely, when the logic state of the data to be searched is logic 0, and the data stored in the target memory cell is logic 1, the controller can calculate that the difference between the second current and the first current is equal to the reference current value (greater than the preset current threshold), and can generate a corresponding matching search result.

值得一提的,當所要搜尋資料的邏輯狀態為不在乎(don’t care)時(亦可稱為外卡(wild card)狀態),控制器可在第一階段提供第一電壓VSL1至目標記憶胞的字元線,並針對目標記憶胞 進行讀取動作。無論目標記憶胞所儲存的資料為邏輯0或邏輯1,第一電壓VSL1皆小於目標記憶胞的臨界電壓,針對目標記憶胞進行讀取動作可獲得趨近於0的第一電流。另外,在第二階段中,控制器可提供第四電壓VSL3至目標記憶胞的字元線,並針對目標記憶胞進行讀取動作。無論目標記憶胞所儲存的資料為邏輯0或邏輯1,第四電壓VSL3皆大於目標記憶胞的臨界電壓,因此,針對目標記憶胞進行讀取動作可獲得等於參考電流值的第二電流。如此一來,第二電流與第一電流的差值可大於預設電流閾值,控制器可對應產生為相符的搜尋結果。 It is worth mentioning that when the logic state of the data to be searched is don’t care (also known as wild card state), the controller can provide the first voltage VSL1 to the word line of the target memory cell in the first stage and perform a read operation on the target memory cell. Regardless of whether the data stored in the target memory cell is logic 0 or logic 1, the first voltage VSL1 is less than the critical voltage of the target memory cell, and the first current close to 0 can be obtained by performing a read operation on the target memory cell. In addition, in the second stage, the controller can provide the fourth voltage VSL3 to the word line of the target memory cell and perform a read operation on the target memory cell. Regardless of whether the data stored in the target memory cell is logic 0 or logic 1, the fourth voltage VSL3 is greater than the critical voltage of the target memory cell. Therefore, a second current equal to the reference current value can be obtained by reading the target memory cell. In this way, the difference between the second current and the first current can be greater than the preset current threshold, and the controller can generate a corresponding search result.

另外,當選中記憶胞儲存的資料為無效(invalid)資料時,控制器在第一階段所獲得的第一電流以及在第二階段所獲得的第二電流,實質上會是相等的(皆趨近於0或皆等於參考電流值)。也因此,控制器透過計算第二電流以及第一電流的差值,可產生為不相符的搜尋結果。 In addition, when the data stored in the selected memory cell is invalid data, the first current obtained by the controller in the first stage and the second current obtained in the second stage will be substantially equal (both approach 0 or are equal to the reference current value). Therefore, the controller can generate an inconsistent search result by calculating the difference between the second current and the first current.

以下請參照圖3A至圖3E,圖3A至圖3E繪示在本發明實施例中,針對單一選中記憶胞所進行的記憶體內搜尋動作的實施方式的示意圖。在圖3A中,所要搜尋資料的邏輯狀態為邏輯0,且選中記憶胞SMC儲存的資料為邏輯0。在執行搜尋動作時,選中記憶胞SMC的字元線WL1在第一階段S1可接收第一電壓VSL1。選中記憶胞SMC的源極線SL1可接收一偏壓電壓,並可針對選中記憶胞SMC進行讀取動作。基於第一電壓VSL1低於選中記憶胞SMC的臨界電壓,在第一階段S1,選中記憶胞SMC的 位元線BL1上不會產生電流(第一電流趨近於0)。 Please refer to Figures 3A to 3E below, which are schematic diagrams of the implementation of the in-memory search action for a single selected memory cell in an embodiment of the present invention. In Figure 3A, the logic state of the data to be searched is logic 0, and the data stored in the selected memory cell SMC is logic 0. When performing the search action, the word line WL1 of the selected memory cell SMC can receive a first voltage VSL1 in the first stage S1. The source line SL1 of the selected memory cell SMC can receive a bias voltage, and a read action can be performed on the selected memory cell SMC. Since the first voltage VSL1 is lower than the critical voltage of the selected memory cell SMC, in the first stage S1, no current will be generated on the bit line BL1 of the selected memory cell SMC (the first current approaches 0).

在第二階段S2中,選中記憶胞SMC的字元線WL1可接收第三電壓VSL2’,並進行選中記憶胞SMC的讀取動作。基於第二電壓VSL2’高於選中記憶胞SMC的臨界電壓,選中記憶胞SMC的位元線BL1上可產生等於參考電流值的第二電流I2。 In the second stage S2, the word line WL1 of the selected memory cell SMC can receive the third voltage VSL2' and perform a read operation of the selected memory cell SMC. Because the second voltage VSL2' is higher than the critical voltage of the selected memory cell SMC, a second current I2 equal to the reference current value can be generated on the bit line BL1 of the selected memory cell SMC.

在本實施方式中,透過計算第二電流I2與第一電流(趨近於0)的差值,圖3A的選中記憶胞SMC的搜尋結果為相符。 In this embodiment, by calculating the difference between the second current I2 and the first current (approaching 0), the search result of the selected memory cell SMC in FIG. 3A is consistent.

在圖3B中,所要搜尋資料的邏輯狀態為邏輯1,且選中記憶胞SMC儲存的資料為邏輯0。在執行搜尋動作時,選中記憶胞SMC的字元線WL1在第一階段S1可接收第二電壓VSL2,並針對選中記憶胞SMC進行讀取動作。基於第二電壓VSL2高於選中記憶胞SMC的臨界電壓,在第一階段S1,選中記憶胞SMC的位元線BL1上可產生第一電流I1(等於參考電流值)。 In FIG. 3B , the logic state of the data to be searched is logic 1, and the data stored in the selected memory cell SMC is logic 0. When performing the search action, the word line WL1 of the selected memory cell SMC can receive the second voltage VSL2 in the first stage S1, and perform a read action on the selected memory cell SMC. Based on the second voltage VSL2 being higher than the critical voltage of the selected memory cell SMC, in the first stage S1, a first current I1 (equal to the reference current value) can be generated on the bit line BL1 of the selected memory cell SMC.

在第二階段S2中,選中記憶胞SMC的字元線WL1可接收第四電壓VSL3,並進行選中記憶胞SMC的讀取動作。基於第四電壓VSL3高於選中記憶胞SMC的臨界電壓,選中記憶胞SMC的位元線BL1上可產生等於參考電流值的第二電流I2。 In the second stage S2, the word line WL1 of the selected memory cell SMC can receive the fourth voltage VSL3 and perform a read operation of the selected memory cell SMC. Because the fourth voltage VSL3 is higher than the critical voltage of the selected memory cell SMC, a second current I2 equal to the reference current value can be generated on the bit line BL1 of the selected memory cell SMC.

在本實施方式中,透過計算第二電流I2與第一電流I1的差值,圖3B的選中記憶胞SMC的搜尋結果為不相符。 In this embodiment, by calculating the difference between the second current I2 and the first current I1, the search result of the selected memory cell SMC in FIG3B is inconsistent.

在圖3C中,所要搜尋資料的邏輯狀態為邏輯0,且選中記憶胞SMC儲存的資料為邏輯1。在執行搜尋動作時,選中記憶胞SMC的字元線WL1在第一階段S1可接收第一電壓VSL1,並 可針對選中記憶胞SMC進行讀取動作。基於第一電壓VSL1低於選中記憶胞SMC的臨界電壓,在第一階段S1,選中記憶胞SMC的位元線BL1上不會產生電流(第一電流趨近於0)。 In FIG. 3C , the logic state of the data to be searched is logic 0, and the data stored in the selected memory cell SMC is logic 1. When performing the search operation, the word line WL1 of the selected memory cell SMC can receive the first voltage VSL1 in the first stage S1, and a read operation can be performed on the selected memory cell SMC. Since the first voltage VSL1 is lower than the critical voltage of the selected memory cell SMC, no current will be generated on the bit line BL1 of the selected memory cell SMC in the first stage S1 (the first current approaches 0).

在第二階段S2中,選中記憶胞SMC的字元線WL1可接收第三電壓VSL2’,並進行選中記憶胞SMC的讀取動作。基於第二電壓VSL2’低於選中記憶胞SMC的臨界電壓,選中記憶胞SMC的位元線BL1上不會產生電流(第二電流趨近於0)。 In the second stage S2, the word line WL1 of the selected memory cell SMC can receive the third voltage VSL2' and perform a read operation on the selected memory cell SMC. Since the second voltage VSL2' is lower than the critical voltage of the selected memory cell SMC, no current will be generated on the bit line BL1 of the selected memory cell SMC (the second current approaches 0).

在本實施方式中,透過計算第二電流與第一電流的差值,圖3C的選中記憶胞SMC的搜尋結果為不相符。 In this embodiment, by calculating the difference between the second current and the first current, the search result of the selected memory cell SMC in FIG3C is inconsistent.

在圖3D中,所要搜尋資料的邏輯狀態為邏輯1,且選中記憶胞SMC儲存的資料為邏輯1。在執行搜尋動作時,選中記憶胞SMC的字元線WL1在第一階段S1可接收第二電壓VSL2,並針對選中記憶胞SMC進行讀取動作。基於第二電壓VSL2低於選中記憶胞SMC的臨界電壓,在第一階段S1,選中記憶胞SMC的位元線BL1上不會產生電流(第一電流趨近於0)。 In FIG. 3D , the logic state of the data to be searched is logic 1, and the data stored in the selected memory cell SMC is logic 1. When performing the search action, the word line WL1 of the selected memory cell SMC can receive the second voltage VSL2 in the first stage S1, and perform a read action on the selected memory cell SMC. Because the second voltage VSL2 is lower than the critical voltage of the selected memory cell SMC, in the first stage S1, no current is generated on the bit line BL1 of the selected memory cell SMC (the first current approaches 0).

在第二階段S2中,選中記憶胞SMC的字元線WL1可接收第四電壓VSL3,並進行選中記憶胞SMC的讀取動作。基於第四電壓VSL3高於選中記憶胞SMC的臨界電壓,選中記憶胞SMC的位元線BL1上可產生等於參考電流值的第二電流I2。 In the second stage S2, the word line WL1 of the selected memory cell SMC can receive the fourth voltage VSL3 and perform a read operation of the selected memory cell SMC. Because the fourth voltage VSL3 is higher than the critical voltage of the selected memory cell SMC, a second current I2 equal to the reference current value can be generated on the bit line BL1 of the selected memory cell SMC.

在本實施方式中,透過計算第二電流I2與第一電流(趨近於0)的差值,圖3D的選中記憶胞SMC的搜尋結果為相符。 In this embodiment, by calculating the difference between the second current I2 and the first current (approaching 0), the search result of the selected memory cell SMC in FIG3D is consistent.

在圖3E中,所要搜尋資料的邏輯狀態為不在乎,且選中 記憶胞SMC儲存的資料可為邏輯0或邏輯1。在執行搜尋動作時,選中記憶胞SMC的字元線WL1在第一階段S1可接收第一電壓VSL1,並針對選中記憶胞SMC進行讀取動作。基於第一電壓VSL1低於選中記憶胞SMC的臨界電壓,在第一階段S1,選中記憶胞SMC的位元線BL1上不會產生電流(第一電流趨近於0)。 In FIG. 3E , the logic state of the data to be searched is don't care, and the data stored in the selected memory cell SMC can be logic 0 or logic 1. When performing the search action, the word line WL1 of the selected memory cell SMC can receive the first voltage VSL1 in the first stage S1, and perform a read action on the selected memory cell SMC. Because the first voltage VSL1 is lower than the critical voltage of the selected memory cell SMC, in the first stage S1, no current is generated on the bit line BL1 of the selected memory cell SMC (the first current approaches 0).

在第二階段S2中,選中記憶胞SMC的字元線WL1可接收第四電壓VSL3,並進行選中記憶胞SMC的讀取動作。基於第四電壓VSL3高於選中記憶胞SMC的臨界電壓,選中記憶胞SMC的位元線BL1上可產生等於參考電流值的第二電流I2。 In the second stage S2, the word line WL1 of the selected memory cell SMC can receive the fourth voltage VSL3 and perform a read operation of the selected memory cell SMC. Because the fourth voltage VSL3 is higher than the critical voltage of the selected memory cell SMC, a second current I2 equal to the reference current value can be generated on the bit line BL1 of the selected memory cell SMC.

在本實施方式中,透過計算第二電流I2與第一電流(趨近於0)的差值,無論選中記憶胞所儲存的資料為邏輯0或邏輯1,圖3E的選中記憶胞SMC的搜尋結果均為相符。 In this embodiment, by calculating the difference between the second current I2 and the first current (approaching 0), no matter the data stored in the selected memory cell is logical 0 or logical 1, the search result of the selected memory cell SMC in FIG. 3E is consistent.

請參照圖4,圖4繪示本發明實施例的記憶體內搜尋方法的多個位元的搜尋動作的實施方式的示意圖。在本實施方式中,記憶胞陣列400為反或(NOR)式快閃記憶胞陣列。記憶胞陣列400具有多條位元線BL1~BL3、多條源極線SL1~SL4以及多條字元線WL1~WL8。記憶胞陣列400中,每一條位元線BL1~BL3上,具有分別耦接至字元線WL1~WL8的多個記憶胞。位元線BL1~BL3並分別耦接至感測放大器SA1~SA3。 Please refer to FIG. 4, which is a schematic diagram of an implementation method of the search action of multiple bits in the memory search method of the embodiment of the present invention. In this implementation method, the memory cell array 400 is a NOR flash memory cell array. The memory cell array 400 has a plurality of bit lines BL1 to BL3, a plurality of source lines SL1 to SL4, and a plurality of word lines WL1 to WL8. In the memory cell array 400, each bit line BL1 to BL3 has a plurality of memory cells respectively coupled to the word lines WL1 to WL8. The bit lines BL1 to BL3 are also respectively coupled to the sense amplifiers SA1 to SA3.

在本實施方式中,位元線BL1上,分別對應字元線WL1~WL8的記憶胞分別儲存的資料為邏輯0、邏輯0、邏輯1、邏輯1、邏輯0、邏輯1、邏輯0以及邏輯1。位元線BL2上,分 別對應字元線WL1~WL8的記憶胞分別儲存的資料為邏輯1、邏輯0、無效資料、無效資料、邏輯1、邏輯1、邏輯0、邏輯1。位元線BL3上,分別對應字元線WL1~WL8的記憶胞分別儲存的資料為邏輯0、邏輯1、邏輯1、邏輯0、邏輯0、邏輯0、邏輯1、邏輯0。在本實施方式中,可以同步針對位元線BL1~BL3上的多個記憶胞進行記憶體內搜尋動作。 In this embodiment, the data stored in the memory cells corresponding to the word lines WL1 to WL8 on the bit line BL1 are logic 0, logic 0, logic 1, logic 1, logic 0, logic 1, logic 0, and logic 1. The data stored in the memory cells corresponding to the word lines WL1 to WL8 on the bit line BL2 are logic 1, logic 0, invalid data, invalid data, logic 1, logic 1, logic 0, and logic 1. On the bit line BL3, the memory cells corresponding to the word lines WL1~WL8 store data of logic 0, logic 1, logic 1, logic 0, logic 0, logic 0, logic 1, logic 0. In this embodiment, the memory search operation can be performed synchronously for multiple memory cells on the bit lines BL1~BL3.

在記憶體內搜尋動作中,記憶胞的儲存資料、搜尋資料以及對應產生的電流的關係可表示如下表1:

Figure 112104515-A0305-02-0013-1
其中無效資料1對應圖2的分布曲線230,無效資料2對應圖2的分布曲線240。I則為一個單位電流值(大於0)。 In the memory search operation, the relationship between the memory cell's storage data, search data, and the corresponding current generated can be expressed as shown in Table 1:
Figure 112104515-A0305-02-0013-1
Invalid data 1 corresponds to the distribution curve 230 of FIG. 2 , and invalid data 2 corresponds to the distribution curve 240 of FIG. 2 . I is a unit current value (greater than 0).

在本實施方式中,記憶體內搜尋動作所要搜尋資料例如具有八個位元,其邏輯值為100111XX,其中的X為不在乎。100111XX分別對應字元線WL1~WL8上的記憶胞。在執行記憶體內搜尋動作時,在第一階段S1中,可針對字元線WL1~WL8分別 施加第二電壓VSL2、第一電壓VSL1、第一電壓VSL1、第二電壓VSL2、第二電壓VSL2、第二電壓VSL2、第一電壓VSL1、第一電壓VSL1,並針對記憶胞進行讀取動作。在第一階段S1的讀取動作中,位元線BL1上的記憶胞,對應字元線WL1、WL5的記憶胞產生等於參考電流值的第一電流,其餘字元線WL2~4、WL6~8上的記憶胞產生趨近於0的第一電流;位元線BL2上的記憶胞,對應字元線WL3的記憶胞產生等於參考電流值的第一電流,其餘字元線WL1、WL2、WL4~8上的記憶胞產生趨近於0的第一電流;位元線BL3上的記憶胞,對應字元線WL1、WL4~WL6的記憶胞產生等於參考電流值的第一電流,其餘字元線WL2、WL3、WL7、WL8上的記憶胞產生趨近於0的第一電流。 In this embodiment, the data to be searched in the memory search action has, for example, eight bits, and its logical value is 100111XX, where X is don't care. 100111XX corresponds to the memory cells on word lines WL1 to WL8 respectively. When performing the memory search action, in the first stage S1, the second voltage VSL2, the first voltage VSL1, the first voltage VSL1, the second voltage VSL2, the second voltage VSL2, the second voltage VSL2, the second voltage VSL2, the first voltage VSL1, and the first voltage VSL1 can be applied to the word lines WL1 to WL8 respectively, and the memory cells are read. In the first stage S1 of the read operation, the memory cells on the bit line BL1 and the memory cells on the word lines WL1 and WL5 generate a first current equal to the reference current value, and the memory cells on the remaining word lines WL2-4 and WL6-8 generate a first current close to 0; the memory cells on the bit line BL2 and the memory cells on the word line WL3 generate a first current equal to the reference current value. The first current is generated by the memory cells on the remaining word lines WL1, WL2, WL4~8, which are close to 0; the memory cells on the bit line BL3, which correspond to the memory cells on the word lines WL1, WL4~WL6, generate the first current equal to the reference current value, and the memory cells on the remaining word lines WL2, WL3, WL7, and WL8 generate the first current close to 0.

接著,在第二階段S2中,可針對字元線WL1~WL8分別施加第四電壓VSL3、第三電壓VSL2’、第三電壓VSL2’、第四電壓VSL3、第四電壓VSL3、第四電壓VSL3、第四電壓VSL3、第四電壓VSL3,並針對記憶胞進行讀取動作。在第二階段S2的讀取動作中,位元線BL1上的記憶胞,對應字元線WL1、WL2、WL4~8的記憶胞產生等於參考電流值的第二電流,其餘字元線WL3上的記憶胞產生趨近於0的第二電流;位元線BL2上的記憶胞,對應字元線WL1~WL3、WL5~WL8的記憶胞產生等於參考電流值的第二電流,其餘字元線WL4上的記憶胞產生趨近於0的第二電流;位元線BL3上的記憶胞,對應字元線WL1、WL4~WL8的記憶胞產生等於參考電流值的第二電流,其餘字元線WL3、WL4 上的記憶胞產生趨近於0的第二電流。 Next, in the second stage S2, the fourth voltage VSL3, the third voltage VSL2', the third voltage VSL2', the fourth voltage VSL3, the fourth voltage VSL3, the fourth voltage VSL3, the fourth voltage VSL3, the fourth voltage VSL3, the fourth voltage VSL3, and the fourth voltage VSL3 can be applied to the word lines WL1~WL8 respectively, and the memory cells are read. In the reading operation of the second stage S2, the memory cells on the bit line BL1 corresponding to the memory cells of the word lines WL1, WL2, and WL4~8 generate a second current equal to the reference current value, and the memory cells on the remaining word line WL3 generate a second current close to 0; the memory cells on the bit line BL2 corresponding to the memory cells of the word lines WL1~WL3, WL5~WL8 The memory cells generate a second current equal to the reference current value, and the memory cells on the remaining word lines WL4 generate a second current close to 0; the memory cells on the bit line BL3, corresponding to the memory cells on the word lines WL1, WL4~WL8, generate a second current equal to the reference current value, and the memory cells on the remaining word lines WL3 and WL4 generate a second current close to 0.

感測放大器SA1~SA3可分別針對位元線BL1~BL3上的記憶胞,使在第二階段S2所產生的第二電流的總和減去在第一階段S1所產生的第一電流的總和來產生一差值,並藉以產生搜尋結果。在本實施方式中,具有相對大的差值的位元線BL1~BL3,可具有與所要搜尋資料相對高的相似度。在本實施方式中,感測放大器SA1可感測出位元線BL1上的差值為5個參考電流值,並可產生相似度資訊HD=3(所要搜尋資料的位元數8減去差值與參考電流值的倍數關係5);感測放大器SA2可感測出位元線BL2上的差值為6個參考電流值,並可產生相似度資訊HD=2;感測放大器SA3則可感測出位元線BL3上的差值為2個參考電流值,並可產生相似度資訊HD=6。其中,最有最低數值的相似度資訊HD=2對應的位元線BL2上的記憶胞與所要搜尋資料具有最高的相似度,最有最高數值的相似度資訊HD=6對應的位元線BL3上的記憶胞與所要搜尋資料具有最低的相似度。 The sense amplifiers SA1-SA3 can respectively generate a difference for the memory cells on the bit lines BL1-BL3 by subtracting the sum of the first currents generated in the first stage S1 from the sum of the second currents generated in the second stage S2, thereby generating a search result. In this embodiment, the bit lines BL1-BL3 having a relatively large difference can have a relatively high similarity with the desired search data. In this embodiment, the sense amplifier SA1 can sense that the difference on the bit line BL1 is 5 reference current values, and can generate similarity information HD=3 (the number of bits of the data to be searched is 8 minus the multiple relationship between the difference and the reference current value, which is 5); the sense amplifier SA2 can sense that the difference on the bit line BL2 is 6 reference current values, and can generate similarity information HD=2; the sense amplifier SA3 can sense that the difference on the bit line BL3 is 2 reference current values, and can generate similarity information HD=6. Among them, the memory cell on the bit line BL2 corresponding to the similarity information HD=2 with the lowest value has the highest similarity with the data to be searched, and the memory cell on the bit line BL3 corresponding to the similarity information HD=6 with the highest value has the lowest similarity with the data to be searched.

以下請參照圖5,圖5繪示本發明實施例的記憶體內搜尋方法的多個位元的搜尋動作的另一實施方式的示意圖。在本實施方式中,記憶胞陣列500為及(AND)式快閃記憶胞陣列。記憶胞陣列500具有多條位元線BL1~BL3、多條源極線SL1~SL4以及多條字元線WL1~WL8。記憶胞陣列500中,每一條位元線BL1~BL3上,具有分別耦接至字元線WL1~WL8的多個記憶胞。位元線BL1~BL3並分別耦接至感測放大器SA1~SA3。 Please refer to FIG. 5 below, which is a schematic diagram of another implementation of the search action of multiple bits in the memory search method of the embodiment of the present invention. In this implementation, the memory cell array 500 is an AND-type flash memory cell array. The memory cell array 500 has a plurality of bit lines BL1-BL3, a plurality of source lines SL1-SL4, and a plurality of word lines WL1-WL8. In the memory cell array 500, each bit line BL1-BL3 has a plurality of memory cells respectively coupled to the word lines WL1-WL8. The bit lines BL1-BL3 are also respectively coupled to the sense amplifiers SA1-SA3.

在本實施方式中,記憶胞陣列500中,位元線BL1~BL3上的記憶胞所儲存的資料,與記憶胞陣列400中,相對位置的記憶胞所儲存的資料是相同的。在記憶體內搜尋動作中,所要搜尋資料的邏輯值同樣為100111XX。在進行記憶體內搜尋動作時,在第一階段S1中,可針對字元線WL1~WL8分別施加第二電壓VSL2、第一電壓VSL1、第一電壓VSL1、第二電壓VSL2、第二電壓VSL2、第二電壓VSL2、第一電壓VSL1、第一電壓VSL1,並針對記憶胞進行讀取動作。在第二階段S2中,則可針對字元線WL1~WL8分別施加第四電壓VSL3、第三電壓VSL2’、第三電壓VSL2’、第四電壓VSL3、第四電壓VSL3、第四電壓VSL3、第四電壓VSL3、第四電壓VSL3,並針對記憶胞進行讀取動作。 In the present embodiment, the data stored in the memory cells on the bit lines BL1 to BL3 in the memory cell array 500 is the same as the data stored in the memory cells at the corresponding positions in the memory cell array 400. In the in-memory search operation, the logical value of the data to be searched is also 100111XX. When performing the in-memory search operation, in the first stage S1, the second voltage VSL2, the first voltage VSL1, the first voltage VSL1, the second voltage VSL2, the second voltage VSL2, the second voltage VSL2, the first voltage VSL1, and the first voltage VSL1 may be applied to the word lines WL1 to WL8, respectively, and a read operation may be performed on the memory cells. In the second stage S2, the fourth voltage VSL3, the third voltage VSL2', the third voltage VSL2', the fourth voltage VSL3, the fourth voltage VSL3, the fourth voltage VSL3, the fourth voltage VSL3, the fourth voltage VSL3, and the fourth voltage VSL3 can be applied to the word lines WL1~WL8 respectively, and the memory cell can be read.

感測放大器SA1~SA3分別計算在第二階段S2中的位元線BL1~BL3上的電流,與在第一階段S1中的位元線BL1~BL3上的電流的多個差值,並分別根據上述的多個差值來分別產生搜尋結果,並分別產生相似度資訊HD。感測放大器SA1~SA3產生的相似度資訊HD分別等於3、2以及6。 The sense amplifiers SA1~SA3 respectively calculate the differences between the currents on the bit lines BL1~BL3 in the second stage S2 and the currents on the bit lines BL1~BL3 in the first stage S1, and respectively generate search results and similarity information HD according to the above-mentioned multiple differences. The similarity information HD generated by the sense amplifiers SA1~SA3 is equal to 3, 2 and 6 respectively.

以下請參照圖6,圖6繪示本發明實施例的記憶體內搜尋方法的多個位元的搜尋動作的另一實施方式的示意圖。在本實施方式中,記憶胞陣列具有多個記憶胞組C1~C8。每一記憶胞組例如具有分別對應三條不同字元線的三個記憶胞。在本實施方式中,記憶胞組C1~C8分別儲存000、001、010、011、100、101、110、111等不同的資料STD。另外,所要搜尋資料SHD例如為 010。在執行記憶體內搜尋動作時,控制器可依時間順序來針對記憶胞組C1~C8執行搜尋動作。 Please refer to FIG. 6 below, which is a schematic diagram of another embodiment of the search action of multiple bits in the memory search method of the embodiment of the present invention. In this embodiment, the memory cell array has multiple memory cell groups C1~C8. Each memory cell group, for example, has three memory cells corresponding to three different word lines. In this embodiment, the memory cell groups C1~C8 store different data STDs such as 000, 001, 010, 011, 100, 101, 110, 111, etc. In addition, the data SHD to be searched is, for example, 010. When performing the search action in the memory, the controller can perform the search action on the memory cell groups C1~C8 in chronological order.

在記憶體內搜尋動作中,記憶胞的儲存資料、搜尋資料以及對應產生的電流的關係可如前述的表1所示。 In the memory search operation, the relationship between the memory cell's storage data, search data, and the corresponding current generated can be shown in the aforementioned Table 1.

例如,在第一時間區間中,控制器可根據搜尋資料SHD產生在第一階段對應的第一電壓或第二電壓以提供至記憶胞組C1的字元線,並對記憶胞組C1執行讀取動作來獲得多個第一電流Isp1。在本實施方式中,第一電流Isp1等於1個參考電流值I。控制器並可根據搜尋資料SHD產生在第二階段對應的第三電壓或第四電壓以提供至記憶胞組C1的字元線,並對記憶胞組C1執行讀取動作來獲得多個第二電流Isp2。在本實施方式中,第二電流Isp2等於3個參考電流值I。透過計算第二電流Isp2與第一電流的差值(=2I),控制器可產生相似度資訊HD=1。 For example, in the first time period, the controller may generate a first voltage or a second voltage corresponding to the first stage according to the search data SHD to provide to the word line of the memory cell group C1, and perform a read operation on the memory cell group C1 to obtain a plurality of first currents Isp1. In this embodiment, the first current Isp1 is equal to 1 reference current value I. The controller may also generate a third voltage or a fourth voltage corresponding to the second stage according to the search data SHD to provide to the word line of the memory cell group C1, and perform a read operation on the memory cell group C1 to obtain a plurality of second currents Isp2. In this embodiment, the second current Isp2 is equal to 3 reference current values I. By calculating the difference between the second current Isp2 and the first current (=2I), the controller can generate similarity information HD=1.

接著,在第二時間區間中,控制器可針對記憶胞組C2執行搜尋動作。在兩階段式的讀取動作中,透過計算第二電流Isp2與第一電流的差值(=1I),控制器可產生相似度資訊HD=2。 Then, in the second time period, the controller can perform a search operation for the memory cell group C2. In the two-stage reading operation, by calculating the difference (=1I) between the second current Isp2 and the first current, the controller can generate similarity information HD=2.

依此類推,控制器可接續執行記憶胞組C3~C8的搜尋動作,詳細內容述不多贅述。 By analogy, the controller can continue to perform the search action of memory cell groups C3~C8. The details are not described in detail here.

在本實施例中,針對記憶胞組C3的搜尋動作中,可獲得最低的相似度資訊HD=0。也就是說,記憶胞組C3與所要搜尋資料SHD具有最大的相似度。控制器可停止記憶體內搜尋動作以節省時間,或者,控制器也可繼續進行其餘記憶胞組C4~C8的搜尋 動作,沒有一定的限制。 In this embodiment, the lowest similarity information HD=0 can be obtained in the search action for the memory cell group C3. That is, the memory cell group C3 has the greatest similarity with the search data SHD. The controller can stop the search action in the memory to save time, or the controller can continue to search the remaining memory cell groups C4~C8 actions without any restrictions.

值得一提的,在本發明實施方式中,對應位元線的感測放大器可使在第一階段中所獲得的電流值暫存在頁緩衝器(page buffer)中。並在第二階段中,感測放大器可使所獲得的電流值與頁緩衝器暫存的電流值相減,來產生搜尋結果。 It is worth mentioning that in the embodiment of the present invention, the sense amplifier corresponding to the bit line can temporarily store the current value obtained in the first stage in the page buffer. And in the second stage, the sense amplifier can subtract the obtained current value from the current value temporarily stored in the page buffer to generate a search result.

另外,控制器可根據感測放大器上產生的電流的相減結果來計算出相似度資訊HD。 In addition, the controller can calculate the similarity information HD based on the subtraction result of the current generated by the sense amplifier.

請參照圖7,圖7繪示本發明實施例的記憶體裝置的示意圖。記憶體裝置700包括控制器710以及記憶胞陣列720。控制器710以及記憶胞陣列720相互耦接。其中,記憶胞陣列720可以為二維或三維的記憶胞陣列。例如記憶胞陣列720可以為反或式(NOR)或及式(AND)快閃記憶胞陣列。記憶胞陣列720包括多個記憶胞,記憶胞可以為浮動閘極式記憶胞、分離閘極式記憶胞、氮化矽式記憶胞、浮點式記憶胞或鐵電閘極場效電晶體式記憶胞,沒有固定的限制。 Please refer to FIG. 7, which shows a schematic diagram of a memory device according to an embodiment of the present invention. The memory device 700 includes a controller 710 and a memory cell array 720. The controller 710 and the memory cell array 720 are coupled to each other. The memory cell array 720 can be a two-dimensional or three-dimensional memory cell array. For example, the memory cell array 720 can be a negative OR (NOR) or AND (AND) flash memory cell array. The memory cell array 720 includes a plurality of memory cells, and the memory cells can be floating gate memory cells, split gate memory cells, silicon nitride memory cells, floating point memory cells or ferrogate field effect transistor memory cells, without fixed restrictions.

在本實施例中,控制器710可以由數位電路來實施,或者為任意具運算能力的處理處來實施。控制器710可應用本領域具通常知識者所熟知,可執行記憶體的讀、寫動作的記憶體控制器來實施,沒有特定的限制。 In this embodiment, the controller 710 can be implemented by a digital circuit or any processing unit with computing capabilities. The controller 710 can be implemented by a memory controller that is well known to those skilled in the art and can perform memory read and write operations, without any specific restrictions.

關於記憶體裝置700中所執行的記憶體內搜尋動作的細節,在前述的多個實施以及實施方式已有詳細的說明,以下述不多贅述。 The details of the in-memory search operation performed in the memory device 700 have been described in detail in the aforementioned multiple implementations and implementation methods, and will not be elaborated in detail below.

綜上所述,本發明的記憶體裝置透過兩階段式的記憶體內搜尋方法,來針對記憶胞所儲存的資料,執行搜尋動作。如此一來,在不需要設置參考記憶胞的條件下,可有效且正確地完成記憶體內搜尋動作。如此一來,記憶體裝置的電路面積可以有效的被縮小,可降低生產成本,並提升所屬系統的工作效能。 In summary, the memory device of the present invention performs a search operation for the data stored in the memory cell through a two-stage in-memory search method. In this way, the in-memory search operation can be completed effectively and correctly without setting a reference memory cell. In this way, the circuit area of the memory device can be effectively reduced, which can reduce the production cost and improve the working performance of the system.

S110~S130:步驟 S110~S130: Steps

Claims (17)

一種記憶體內搜尋方法,包括:根據一所要搜尋資料的邏輯狀態,在一第一階段,提供一第一電壓或一第二電壓至至少一目標記憶胞的字元線,並讀取一第一電流;根據該所要搜尋資料的邏輯狀態,在一第二階段,提供一第三電壓或一第四電壓至該至少目標記憶胞的字元線,並讀取一第二電流;根據該第一電流與該第二電流的差值以獲得一搜尋結果,其中,該第一電壓小於該第三電壓,該第三電壓小於或等於該第二電壓,該第二電壓小於該第四電壓,其中該第一電流的電流值暫存在一頁緩衝器中。 A method for searching in memory includes: providing a first voltage or a second voltage to a word line of at least one target memory cell in a first stage according to a logic state of data to be searched, and reading a first current; providing a third voltage or a fourth voltage to the word line of at least one target memory cell in a second stage according to the logic state of the data to be searched, and reading a second current; obtaining a search result according to a difference between the first current and the second current, wherein the first voltage is less than the third voltage, the third voltage is less than or equal to the second voltage, and the second voltage is less than the fourth voltage, wherein the current value of the first current is temporarily stored in a page buffer. 如請求項1所述的記憶體內搜尋方法,其中儲存邏輯值0的多個第一記憶胞的臨界電壓介於一第一臨界電壓以及一第二臨界電壓間,儲存邏輯值1的多個第二記憶胞的臨界電壓介於一第三臨界電壓以及一第四臨界電壓間,該第一臨界電壓<該第二臨界電壓<該第三臨界電壓<該第四臨界電壓,其中,該第一電壓小於該第一臨界電壓,該第三電壓與該第二電壓介於該第二臨界電壓與該第三臨界電壓間,該第四電壓大於該第四臨界電壓。 The in-memory search method as described in claim 1, wherein the critical voltage of the plurality of first memory cells storing the logical value 0 is between a first critical voltage and a second critical voltage, and the critical voltage of the plurality of second memory cells storing the logical value 1 is between a third critical voltage and a fourth critical voltage, the first critical voltage < the second critical voltage < the third critical voltage < the fourth critical voltage, wherein the first voltage is less than the first critical voltage, the third voltage and the second voltage are between the second critical voltage and the third critical voltage, and the fourth voltage is greater than the fourth critical voltage. 如請求項1所述的記憶體內搜尋方法,其中當該至少一目標記憶胞的數量為1時,且該所要搜尋資料的邏輯值為邏輯值0時,包括: 在該第一階段,提供該第一電壓至該至少一目標記憶胞的字元線,並讀取該第一電流;在該第二階段,提供該第三電壓至該至少一目標記憶胞的字元線,並讀取該第二電流;以及當該第二電流與該第一電流的差值大於一預設電流閾值時,產生為相符的該搜尋結果。 The in-memory search method as described in claim 1, wherein when the number of the at least one target memory cell is 1 and the logical value of the data to be searched is the logical value 0, comprises: In the first stage, providing the first voltage to the word line of the at least one target memory cell and reading the first current; in the second stage, providing the third voltage to the word line of the at least one target memory cell and reading the second current; and when the difference between the second current and the first current is greater than a preset current threshold, generating the matching search result. 如請求項1所述的記憶體內搜尋方法,其中當該至少一目標記憶胞的數量為1時,且該所要搜尋資料的邏輯值為邏輯值1時,包括:在該第一階段,提供該第二電壓至該至少一目標記憶胞的字元線,並讀取該第一電流;在該第二階段,提供該第四電壓至該至少一目標記憶胞的字元線,並讀取該第二電流;以及當該第二電流與該第一電流的差值實質上等於該預設電流閾值時,產生為相符的該搜尋結果。 The in-memory search method as described in claim 1, wherein when the number of the at least one target memory cell is 1 and the logical value of the data to be searched is the logical value 1, comprises: in the first stage, providing the second voltage to the word line of the at least one target memory cell and reading the first current; in the second stage, providing the fourth voltage to the word line of the at least one target memory cell and reading the second current; and when the difference between the second current and the first current is substantially equal to the preset current threshold, generating the matching search result. 如請求項1所述的記憶體內搜尋方法,其中當該至少一目標記憶胞的數量為1時,且該所要搜尋資料的為不在乎時,包括:在該第一階段,提供該第一電壓至該至少一目標記憶胞的字元線,並讀取該第一電流;在該第二階段,提供該第二電壓至該至少一目標記憶胞的字元線,並讀取該第二電流;以及 當該第二電流與該第一電流的差值實質上等於該預設電流閾值時,產生為相符的該搜尋結果。 The in-memory search method as described in claim 1, wherein when the number of the at least one target memory cell is 1 and the data to be searched is a don't care, comprises: in the first stage, providing the first voltage to the word line of the at least one target memory cell and reading the first current; in the second stage, providing the second voltage to the word line of the at least one target memory cell and reading the second current; and when the difference between the second current and the first current is substantially equal to the preset current threshold, generating the matching search result. 如請求項1所述的記憶體內搜尋方法,其中當該至少一目標記憶胞的臨界電壓大於該第四電壓或小於該第一電壓時,該搜尋結果為不相符。 The in-memory search method as described in claim 1, wherein when the critical voltage of at least one target memory cell is greater than the fourth voltage or less than the first voltage, the search result is inconsistent. 如請求項1所述的記憶體內搜尋方法,其中當該至少一目標記憶胞的數量大於1時,包括:在該第一階段,提供該第一電壓至該些目標記憶胞的多條字元線,並讀取該第一電流;在該第二階段,提供該第二電壓至該些目標記憶胞的該些字元線,並讀取該第二電流;以及根據該第二電流以及該第一電流的差值的大小來產生該搜尋結果,其中該搜尋結果指示該所要搜尋資料與該些目標記憶胞所儲存資料的相似度。 The in-memory search method as described in claim 1, wherein when the number of the at least one target memory cell is greater than 1, comprises: in the first stage, providing the first voltage to the multiple word lines of the target memory cells and reading the first current; in the second stage, providing the second voltage to the word lines of the target memory cells and reading the second current; and generating the search result according to the size of the difference between the second current and the first current, wherein the search result indicates the similarity between the data to be searched and the data stored in the target memory cells. 一種記憶體裝置,包括:一記憶胞陣列;一控制器,耦接該記憶胞陣列,用以:根據一所要搜尋資料的邏輯狀態,在一第一階段,提供一第一電壓或一第二電壓至至少一目標記憶胞的字元線,並讀取一第一電流;根據該所要搜尋資料的邏輯狀態,在一第二階段,提供一第三電壓或一第四電壓至該至少目標記憶胞的字元線,並讀取 一第二電流;根據該第一電流與該第二電流的差值以獲得一搜尋結果,其中,該第一電壓小於該第三電壓,該第三電壓小於或等於該第二電壓,該第二電壓小於該第四電壓;以及一頁緩衝器,用以暫存該第一電流的電流值。 A memory device includes: a memory cell array; a controller coupled to the memory cell array, for: providing a first voltage or a second voltage to a word line of at least one target memory cell in a first phase according to a logic state of the data to be searched, and reading a first current; providing a third voltage in a second phase according to the logic state of the data to be searched or a fourth voltage to the word line of at least the target memory cell, and read a second current; obtain a search result according to the difference between the first current and the second current, wherein the first voltage is less than the third voltage, the third voltage is less than or equal to the second voltage, and the second voltage is less than the fourth voltage; and a page buffer for temporarily storing the current value of the first current. 如請求項8所述的記憶體裝置,其中儲存邏輯值0的多個第一記憶胞的臨界電壓介於一第一臨界電壓以及一第二臨界電壓間,儲存邏輯值1的多個第二記憶胞的臨界電壓介於一第三臨界電壓以及一第四臨界電壓間,該第一臨界電壓<該第二臨界電壓<該第三臨界電壓<該第四臨界電壓,其中,該第一電壓小於該第一臨界電壓,該第三電壓與該第二電壓介於該第二臨界電壓與該第三臨界電壓間,該第四電壓大於該第四臨界電壓。 A memory device as described in claim 8, wherein the critical voltage of a plurality of first memory cells storing a logic value of 0 is between a first critical voltage and a second critical voltage, and the critical voltage of a plurality of second memory cells storing a logic value of 1 is between a third critical voltage and a fourth critical voltage, the first critical voltage < the second critical voltage < the third critical voltage < the fourth critical voltage, wherein the first voltage is less than the first critical voltage, the third voltage and the second voltage are between the second critical voltage and the third critical voltage, and the fourth voltage is greater than the fourth critical voltage. 如請求項8所述的記憶體裝置,其中當該至少一目標記憶胞的數量為1時,且該所要搜尋資料的邏輯值為邏輯值0時,該控制器用以:在該第一階段,提供該第一電壓至該至少一目標記憶胞的字元線,並讀取該第一電流;在該第二階段,提供該第三電壓至該至少一目標記憶胞的字元線,並讀取該第二電流;以及當該第二電流與該第一電流的差值實質上等於該預設電流閾值時,產生為相符的該搜尋結果。 A memory device as described in claim 8, wherein when the number of the at least one target memory cell is 1 and the logical value of the data to be searched is a logical value of 0, the controller is used to: in the first stage, provide the first voltage to the word line of the at least one target memory cell and read the first current; in the second stage, provide the third voltage to the word line of the at least one target memory cell and read the second current; and when the difference between the second current and the first current is substantially equal to the preset current threshold, generate the matching search result. 如請求項8所述的記憶體裝置,其中當該至少一目標記憶胞的數量為1時,且該所要搜尋資料的邏輯值為邏輯值1時,該控制器用以:在該第一階段,提供該第二電壓至該至少一目標記憶胞的字元線,並讀取該第一電流;在該第二階段,提供該第四電壓至該至少一目標記憶胞的字元線,並讀取該第二電流;以及當該第二電流與該第一電流的差值實質上等於該預設電流閾值時,產生為相符的該搜尋結果。 A memory device as described in claim 8, wherein when the number of the at least one target memory cell is 1 and the logical value of the data to be searched is a logical value of 1, the controller is used to: in the first stage, provide the second voltage to the word line of the at least one target memory cell and read the first current; in the second stage, provide the fourth voltage to the word line of the at least one target memory cell and read the second current; and when the difference between the second current and the first current is substantially equal to the preset current threshold, generate the matching search result. 如請求項8所述的記憶體裝置,其中當該至少一目標記憶胞的數量為1時,且該所要搜尋資料的為不在乎時,該控制器用以:在該第一階段,提供該第一電壓至該至少一目標記憶胞的字元線,並讀取該第一電流;在該第二階段,提供該第二電壓至該至少一目標記憶胞的字元線,並讀取該第二電流;以及當該第二電流與該第一電流的差值實質上等於該預設電流閾值時,產生為相符的該搜尋結果。 A memory device as described in claim 8, wherein when the number of the at least one target memory cell is 1 and the data to be searched is a don't care, the controller is used to: in the first stage, provide the first voltage to the word line of the at least one target memory cell and read the first current; in the second stage, provide the second voltage to the word line of the at least one target memory cell and read the second current; and when the difference between the second current and the first current is substantially equal to the preset current threshold, generate the search result as matching. 如請求項8所述的記憶體裝置,其中當該至少一目標記憶胞的臨界電壓大於該第四電壓或小於該第一電壓時,該控制器產生的該搜尋結果均為不相符。 A memory device as described in claim 8, wherein when the critical voltage of at least one target memory cell is greater than the fourth voltage or less than the first voltage, the search results generated by the controller are all inconsistent. 如請求項8所述的記憶體裝置,其中當該至少一目標記憶胞的數量大於1時,該控制器用以:在該第一階段,提供該第一電壓至該些目標記憶胞的多條字元線,並讀取該第一電流;在該第二階段,提供該第二電壓至該些目標記憶胞的該些字元線,並讀取該第二電流;以及根據該第二電流以及該第一電流的差值的大小來產生該搜尋結果,其中該搜尋結果指示該所要搜尋資料與該些目標記憶胞所儲存資料的相似度。 A memory device as described in claim 8, wherein when the number of the at least one target memory cell is greater than 1, the controller is used to: in the first stage, provide the first voltage to the multiple word lines of the target memory cells and read the first current; in the second stage, provide the second voltage to the word lines of the target memory cells and read the second current; and generate the search result according to the size of the difference between the second current and the first current, wherein the search result indicates the similarity between the data to be searched and the data stored in the target memory cells. 如請求項8所述的記憶體裝置,其中該記憶胞陣列為二維或三維的記憶胞陣列。 A memory device as described in claim 8, wherein the memory cell array is a two-dimensional or three-dimensional memory cell array. 如請求項8所述的記憶體裝置,其中該記憶胞陣列為反或式或及式快閃記憶胞陣列。 A memory device as described in claim 8, wherein the memory cell array is an anti-OR and AND flash memory cell array. 如請求項8所述的記憶體裝置,其中該記憶胞陣列中的記憶胞為浮動閘極式記憶胞、分離閘極式記憶胞、氮化矽式記憶胞、浮點式記憶胞或鐵電閘極場效電晶體式記憶胞。A memory device as described in claim 8, wherein the memory cells in the memory cell array are floating gate memory cells, split gate memory cells, silicon nitride memory cells, floating point memory cells or ferrogate field effect transistor memory cells.
TW112104515A 2023-02-09 2023-02-09 Memory device and in-memory search methode thereof TWI843434B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW112104515A TWI843434B (en) 2023-02-09 2023-02-09 Memory device and in-memory search methode thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW112104515A TWI843434B (en) 2023-02-09 2023-02-09 Memory device and in-memory search methode thereof

Publications (2)

Publication Number Publication Date
TWI843434B true TWI843434B (en) 2024-05-21
TW202433473A TW202433473A (en) 2024-08-16

Family

ID=92077052

Family Applications (1)

Application Number Title Priority Date Filing Date
TW112104515A TWI843434B (en) 2023-02-09 2023-02-09 Memory device and in-memory search methode thereof

Country Status (1)

Country Link
TW (1) TWI843434B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090141531A1 (en) * 2007-11-30 2009-06-04 Abedin Md Anwarul Associative memory and searching system using the same
US20100182833A1 (en) * 2009-01-19 2010-07-22 Macronix International Co., Ltd. Memory and boundary searching method thereof
JP4892720B2 (en) * 2005-09-14 2012-03-07 国立大学法人広島大学 Minimum Euclidean distance search associative memory device
TWI485710B (en) * 2010-10-15 2015-05-21 Micron Technology Inc Read distribution management for phase change memory
US9620214B2 (en) * 2006-04-25 2017-04-11 Renesas Electronics Corporation Content addressable memory with reduced power consumption and increased search operation speed
US20230036141A1 (en) * 2021-07-20 2023-02-02 Macronix International Co., Ltd. Cam cell, cam device and operation method thereof, and method for searching and comparing data

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4892720B2 (en) * 2005-09-14 2012-03-07 国立大学法人広島大学 Minimum Euclidean distance search associative memory device
US9620214B2 (en) * 2006-04-25 2017-04-11 Renesas Electronics Corporation Content addressable memory with reduced power consumption and increased search operation speed
US20090141531A1 (en) * 2007-11-30 2009-06-04 Abedin Md Anwarul Associative memory and searching system using the same
US20100182833A1 (en) * 2009-01-19 2010-07-22 Macronix International Co., Ltd. Memory and boundary searching method thereof
TWI485710B (en) * 2010-10-15 2015-05-21 Micron Technology Inc Read distribution management for phase change memory
US20230036141A1 (en) * 2021-07-20 2023-02-02 Macronix International Co., Ltd. Cam cell, cam device and operation method thereof, and method for searching and comparing data

Also Published As

Publication number Publication date
TW202433473A (en) 2024-08-16

Similar Documents

Publication Publication Date Title
JP6316952B2 (en) Apparatus and method for identifying extreme values stored in a memory cell array
KR101671154B1 (en) Apparatuses and methods for performing compare operations using sensing circuitry
US11886538B2 (en) Histogram creation process for memory devices
CN114816330B (en) Multiplication and addition operation device and control method of multiplication and addition operation
CN115273924A (en) TCAM based on 3D NAND FLASH storage array and its operation method
US20240281167A1 (en) In-memory associative processing for vectors
US11740899B2 (en) In-memory associative processing system
US12094534B2 (en) Content addressable memory device, content addressable memory cell and method for single-bit multi-level data searching and comparing
TWI843434B (en) Memory device and in-memory search methode thereof
US20230238037A1 (en) Content addressable memory device and method for data searching and comparing thereof
CN111488118B (en) Method for managing flash memory module and related flash memory controller and electronic device
EP0230296B1 (en) Associative memory device
CN118471279A (en) Memory device and in-memory searching method thereof
US12282682B2 (en) Redundant computing across planes
TWI860904B (en) Computing system, computing method thereof and search memory
TWI860617B (en) Memory device for computing in-memory
CN111813339A (en) Data writing method and device of Flash Nand Flash, electronic equipment and storage medium
CN111061926B (en) Method for realizing data search in NAND type memory array
KR101136578B1 (en) Ternary content addressable memory
US20230063964A1 (en) Electronic device, over-erase detection and elimination methods for memory cells
TW202345155A (en) Ternary content addressable memory
TW202331719A (en) Content addressable memory device and method for data searching and comparing thereof