Ternary content addressable memory and decision making method therefor

By using multiple search lines and current sensing units in the ternary content addressable memory, combined with wildcard masking in the decision generation method, the accuracy of fuzzy matching search in big data is solved, and the accuracy of search results is improved and speed.

CN114121091BActive Publication Date: 2024-12-13MACRONIX INTERNATIONAL CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110616835.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2021-05-28
Filing Date
2021-06-02
Publication Date
2024-12-13
Estimated Expiration
2041-06-02

AI Technical Summary

Technical Problem

Existing ternary content addressable memory is difficult to effectively handle fuzzy matching retrieval in big data applications, resulting in inaccurate search results, especially in artificial intelligence and big data searches, where slight differences lead to unmatchable problems.

Method used

A ternary content addressable memory is designed, using multiple search lines and current sensing units to determine whether the data in the storage unit matches by applying different voltages, and the wildcard is used to block it through decision-making method to improve the search Flexibility and precision.

Benefits of technology

It improves the accuracy of data matching and search flexibility, can effectively handle fuzzy matching retrieval in big data and artificial intelligence applications, reduces unmatched results due to subtle differences, and improves search speed and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114121091B_ABST
    Figure CN114121091B_ABST
Patent Text Reader

Abstract

The present disclosure provides a ternary content addressable memory including a plurality of first search lines, a plurality of second search lines, a plurality of memory cell strings, and one or more current sensing units. The memory cell string includes a plurality of memory cells, each of which is coupled to one of the plurality of first search lines and one of the plurality of second search lines. The current sensing unit is coupled to the plurality of memory cell strings. During a search operation, it is determined whether the data stored in the plurality of memory cell strings matches a data string to be searched, based on whether the one or more current sensing units detect current from the plurality of memory cell strings or based on the magnitude of the current flowing out of the one or more current sensing units from the plurality of memory cell strings.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to a ternary content addressable memory and a decision making method for the ternary content addressable memory. Background Art

[0002] Ternary Content Addressable Memory (TCAM) is very suitable for big data applications because it can perform both exact match retrieval and fuzzy match retrieval on stored data. With the rapid development of big data technology, TCAM has also received attention.

[0003] Public Content

[0004] The disclosed embodiment provides a ternary content addressable memory. The ternary content addressable memory includes a plurality of first search lines, a plurality of second search lines, a plurality of memory cell strings, and one or more current sensing units. The memory cell string includes a plurality of memory cells, each of which is coupled to one of the plurality of first search lines and one of the plurality of second search lines. The current sensing unit is coupled to the plurality of memory cell strings. During a search operation, it is determined whether the data stored in the plurality of memory cell strings matches a data string to be searched, based on whether the one or more current sensing units detect current from the plurality of memory cell strings or based on the magnitude of the current flowing out of the one or more current sensing units from the plurality of memory cell strings.

[0005] Another embodiment of the present disclosure provides a decision generation method for a ternary content addressable memory. The decision generation method includes: receiving a target data string; determining one or more masks, and generating an input data string according to the one or more masks and the target data string; applying multiple search voltages to multiple first search lines and multiple second search lines according to the input data string; determining one or more decision parameters according to multiple current values ​​obtained by multiple current sensing units detecting the multiple first search lines and the multiple second search lines; and generating a decision according to the one or more decision parameters.

[0006] In order to better understand the above and other aspects of the present disclosure, embodiments are given below and described in detail with reference to the accompanying drawings as follows: BRIEF DESCRIPTION OF THE DRAWINGS

[0007] Figure 1 FIG. 4 is a block diagram of a TCAM according to an embodiment of the present disclosure.

[0008] Figure 2 is a block diagram of a memory cell string according to an embodiment of the present disclosure.

[0009] Figures 3A to 3CFIG. 4 is a schematic diagram of an operation of a memory cell string according to an embodiment of the present disclosure.

[0010] Figure 4 is a block diagram of a memory cell string according to another embodiment of the present disclosure.

[0011] Figures 5A to 5C FIG. 4 is a schematic diagram of an operation of a memory cell string according to another embodiment of the present disclosure.

[0012] Figure 5D Schematic diagram of neurons storing feature vectors and neurons searching for feature vectors.

[0013] Figure 6 is a block diagram of a memory cell string according to yet another embodiment of the present disclosure.

[0014] Figure 7 FIG. 4 is a block diagram of a TCAM according to another embodiment of the present disclosure.

[0015] Figures 8A to 8C is a block diagram of a memory cell string according to yet another embodiment of the present disclosure.

[0016] Fig. 9 Schematic diagram of threshold voltage and search voltage.

[0017] Fig.10 Schematic diagram of data and feature vectors.

[0018] Fig.11 The figure is a flow chart of a decision making method according to an embodiment of the present disclosure.

[0019] Fig.12 Schematic diagram of target data string and shielding.

[0020] Description of Reference Numerals

[0021] 10, 60: Ternary Content Addressable Memory

[0022] 102-1~102-m, 202-i, 402-i, 602-1~602-m, 30, 50, 702-i, 802-i, 902-i: memory unit string

[0023] 104-1~104-m, 506, 604-1~604-k, 704-i, 804-i, 904-i: current sensing unit

[0024] C11~Cmn、301~304、501~504:Storage unit

[0025] SL1-1~SL1-n, 3051, 3053, 3055, 3057, 5051, 5053, 5055, 5057, 7051, 7053, 7055, 7057: First search line

[0026] SL2-1~SL2-n, 3052, 3054, 3056, 3058, 5052, 5054, 5056, 5058: Second search line

[0027] T1-i1~T1-in, 3011~3041, 5011~5041: first transistor

[0028] T2-i1~T2-in, 3012~3042, 5012~5042: second transistor

[0029] 606-1~606-k, 906-i: AND gate

[0030] INV-1~INV-j:Inverter

[0031] CAT1~CAT4: Category

[0032] FD1: dimension of the first eigenvalue

[0033] FD2: Dimension of the second eigenvalue

[0034] FD3: Dimension of the third eigenvalue

[0035] S1102~S1112: Steps DETAILED DESCRIPTION

[0036] Please refer to Figure 1 , Figure 1 1 is a block diagram of a ternary content addressable memory (TCAM) according to an embodiment of the present disclosure. The TCAM 10 includes a plurality of memory cell strings 102-1 to 102-m, a plurality of current sensing units 104-1 to 104-m, a plurality of first search lines SL1-1 to SL1-n, and a plurality of second search lines SL2-1 to SL2-n, wherein m and n are positive integers.

[0037] The memory cell string 102-i is coupled to the current sensing unit 104-i and includes a plurality of memory cells Cil~Cin, and the memory cell Cij is coupled to the first search line SL1-j and the second search line SL2-j, wherein i is a positive integer and i=1~m, and j is a positive integer and j=1~n.

[0038] Please refer to Figure 2 , Figure 2FIG. 1 is a block diagram of a storage cell string according to an embodiment of the present disclosure. Figure 2 The memory cell string 202-i shown in the figure can be used to implement the memory cell string 102-i, including the detailed circuits of the memory cells Cil~Cin. The memory cell Cij includes a first transistor T1-ij and a second transistor T2-ij. A first end (e.g., a gate) of the first transistor T1-ij is coupled to the first search line SL1-j. A second end (e.g., a source) of the first transistor T1-ij is coupled to a second end (e.g., a source) of the second transistor T2-ij. A third end (e.g., a drain) of the first transistor T1-ij is coupled to a second end (e.g., a drain) of the second transistor T2-ij. A first end (e.g., a gate) of the second transistor T2-ij is coupled to the second search line SL2-j.

[0039] against Figure 2 In the embodiment of the present invention, the operation of a single memory cell Cij may include an erase operation, a program operation and a search operation, which are described in detail as follows.

[0040] During the erase operation, an erase voltage is applied to the first search line SL1-j and the second search line SL2-j. Generally, the erase voltage can be a negative bias voltage to release the charges stored in the first transistor T1-ij and the second transistor T2-ij.

[0041] During the programming operation, the threshold voltages of the first transistor T1-ij and the second transistor T2-ij are programmed respectively by applying appropriate programming voltages to the first search line SL1-j and the second search line SL2-j. When the threshold voltage of the first transistor T1-ij is programmed to a low threshold voltage and the threshold voltage of the second transistor T2-ij is programmed to a high threshold voltage, the data stored in the memory cell Cij is defined as a first value (e.g., 0); when the threshold voltage of the first transistor T1-ij is programmed to a high threshold voltage and the threshold voltage of the second transistor T2-ij is programmed to a low threshold voltage, the data stored in the memory cell Cij is defined as a second value (e.g., 1). In addition to the first value or the second value, the data stored in the memory cell Cij can also selectively support the storage of "don't care". When the threshold voltage of the first transistor T1-ij is programmed to a low threshold voltage and the threshold voltage of the second transistor T2-ij is programmed to a low threshold voltage, the data stored in the memory cell Cij is defined as "don't care".

[0042] During the search operation, when searching for the first value, a first search voltage is applied to the first search line SL1-j, and a second search voltage is applied to the second search line SL2-j; when searching for the second value, a second search voltage is applied to the first search line SL1-j, and a first search voltage is applied to the second search line SL2-j. The second search voltage is greater than the high threshold voltage, the high threshold voltage is greater than the first search voltage, and the first search voltage is greater than the low threshold voltage. In addition to searching for the first value and the second value, a search for wildcards can also be selectively supported. The so-called search wildcard here means that the data to be searched can be the first value or the second value, that is, when searching for wildcards, whether the first value or the second value stored in the storage unit is considered to be a match. When searching for wildcards, the first search line SL1-j is applied with a second search voltage, and the second search line SL2-j is applied with a second search voltage.

[0043] The low threshold voltage, the high threshold voltage, the first search voltage, and the second search voltage can be obtained by referring to Fig. 9 The threshold voltage distribution diagram can be used to understand this. Fig. 9 In FIG. 1 , the horizontal axis represents voltage, the vertical axis represents probability, Vt-1 is the probability distribution of the low threshold voltage, Vt-h is the probability distribution of the high threshold voltage, Vs1 is the first search voltage, and Vs2 is the second search voltage.

[0044] To better understand the search operation, the following Figures 3A to 3C , to illustrate with a practical example. Figure 3AIn the example, the memory cell string 30 includes four memory cells 301-304. The first transistor 3011 and the second transistor 3012 of the memory cell 301 are programmed to a low threshold voltage (indicated by [L] in the figure) and a high threshold voltage (indicated by [H] in the figure), respectively. That is, the memory cell 301 stores 0, and so on, the memory cells 302-304 store 1, X, 0, respectively, where X represents "random". The data string to be searched in this example is 0110. When performing a search operation, a proper bias voltage is applied to the second end of the first transistor 3011 and the second end of the second transistor 3012, and the first search voltage (indicated by [V1] in the figure), the second search voltage (indicated by [V2] in the figure), the second search voltage, and the first search voltage are applied to the first search lines 3051, 3053, 3055, and 3057, respectively, and the second search voltage, the first search voltage, the first search voltage, and the first search voltage are applied to the second search lines 3052, 3054, 3056, and 3058, respectively. Transistors in the memory cells 301, 302, and 304 are all turned on. For the memory cell 303, since the threshold voltages of the first transistor 3031 and the second transistor 3032 are both low threshold voltages, the first transistor 3031 and the second transistor 3032 can be turned on regardless of whether the gate voltages of the first transistor 3031 and the second transistor 3032 are the first search voltage or the second search voltage. Thus, a current can flow from the second end of the first transistor 3011 and the second end of the second transistor 3012 to the third end of the first transistor 3041 and the third end of the second transistor 3042. The current sensing unit 306 can determine whether the data string stored in the memory cell string matches the data string to be searched by detecting whether a current flows out of the memory cell string 30 (the third end of the first transistor 3041 and the third end of the second transistor 3042) or by detecting the magnitude of the current flowing out of the memory cell string (the third end of the first transistor 3041 and the third end of the second transistor 3042). In this example, the current sensing unit 306 detects that a current flows out of the memory cell string 30, and can determine that the data string stored in the memory cell string matches the data string to be searched.

[0045] Please refer to Figure 3B Example. Figure 3B and Figure 3ASimilarly, the storage cell string 30 also stores 01X0, but the difference is that the data string to be searched is 0111. The storage cells 301-303 all have transistors turned on so that current can pass through. However, the storage cell 304 does not match the data stored in the storage cell string 304, so that the first transistor 3041 and the second transistor 3042 are not turned on, so that the current cannot pass through. Therefore, the current sensing unit 306 cannot detect that there is current flowing out of the storage cell string 30, and it can be determined that the data string stored in the storage cell string 30 does not match the data string to be searched.

[0046] Please refer to Figure 3C Example. Figure 3C and Figure 3A Similarly, the storage cell string 30 also stores 01X0, but the difference is that the data string to be searched is 0?00, where? is a wildcard, that is, the bit can be 0 or 1. The storage cells 301, 303, and 304 all have transistors turned on so that current can pass. For the storage cell 302, the gate voltages of the first transistor 3021 and the second transistor 3022 are both higher than the second search voltage of the high threshold voltage and the low threshold voltage, so no matter what the data stored in the storage cell 302 is, the first transistor 3021 and the second transistor 3022 will be turned on. Therefore, the current sensing unit 306 detects that there is current flowing out of the storage cell string 30, and can then determine that the data string stored in the storage cell string 30 matches the data string to be searched.

[0047] Please refer to Figure 4 , Figure 4 FIG. 1 is a block diagram of a storage cell string according to another embodiment of the present disclosure. Figure 4 4 shows a memory cell string 402-i for implementing the memory cell string 102-i, including detailed circuits of the memory cells Cil to Cin. The memory cell Cij includes a first transistor T1-ij and a second transistor T2-ij. A first end (e.g., a gate) of the first transistor T1-ij is coupled to the first search line SL1-j. A third end (e.g., a drain) of the first transistor T1-ij is coupled to a second end (e.g., a source) of the second transistor T2-ij. A first end (e.g., a drain) of the second transistor T2-ij is coupled to the second search line SL2-j.

[0048] against Figure 4 In the embodiment of the present invention, the operation of a single memory cell Cij may include an erase operation, a program operation and a search operation, which are described in detail as follows.

[0049] During the erase operation, an erase voltage is applied to the first search line SL1-j and the second search line SL2-j. Generally, the erase voltage can be a negative bias voltage to release the charges stored in the first transistor T1-ij and the second transistor T2-ij.

[0050] During the programming operation, the threshold voltages of the first transistor T1-ij and the second transistor T2-ij are programmed respectively by applying appropriate programming voltages to the first search line SL1-j and the second search line SL2-j. When the threshold voltage of the first transistor T1-ij is programmed to a low threshold voltage and the threshold voltage of the second transistor T2-ij is programmed to a high threshold voltage, the data stored in the memory cell Cij is defined as a first value (e.g., 0); when the threshold voltage of the first transistor T1-ij is programmed to a high threshold voltage and the threshold voltage of the second transistor T2-ij is programmed to a low threshold voltage, the data stored in the memory cell Cij is defined as a second value (e.g., 1). In addition to the first value or the second value, the data stored in the memory cell Cij can also selectively support the storage of "don't care". When the threshold voltage of the first transistor T1-ij is programmed to a low threshold voltage and the threshold voltage of the second transistor T2-ij is programmed to a low threshold voltage, the data stored in the memory cell Cij is defined as "don't care".

[0051] During the search operation, when searching for the first value, a first search voltage is applied to the first search line SL1-j, and a second search voltage is applied to the second search line SL2-j; when searching for the second value, a second search voltage is applied to the first search line SL1-j, and a first search voltage is applied to the second search line SL2-j. The second search voltage is greater than the high threshold voltage, the high threshold voltage is greater than the first search voltage, and the first search voltage is greater than the low threshold voltage. In addition to searching for the first value and the second value, a search for wildcards can also be selectively supported. The so-called search wildcard here means that the data to be searched can be the first value or the second value, that is, when searching for wildcards, whether the first value or the second value stored in the storage unit is considered to be a match. When searching for wildcards, the first search line SL1-j is applied with a second search voltage, and the second search line SL2-j is applied with a second search voltage.

[0052] To better understand the search operation, the following Figures 5A to 5C , to illustrate with a practical example. Figure 5AIn the example, the memory cell string 50 includes four memory cells 501-504. The first transistor 5011 and the second transistor 5012 of the memory cell 501 are programmed to a low threshold voltage and a high threshold voltage, respectively, that is, the memory cell 501 stores 0, and so on, the memory cells 502-504 store 1, X, 0, respectively, where X represents "random". The data string to be searched in this example is 0110. When performing a search operation, a proper bias voltage is applied to the second end (e.g., the source) of the first transistor 3011, and the first search voltage, the second search voltage, the second search voltage, and the first search voltage are applied to the first search lines 5051, 5053, 5055, and 5057, respectively, and the second search voltage, the first search voltage, the first search voltage, and the second search voltage are applied to the second search lines 5052, 5054, 5056, and 5058, respectively. The transistors in the memory cells 501, 502, and 504 are all turned on. For the memory cell 303, since the threshold voltages of the first transistor 5031 and the second transistor 5032 are both low threshold voltages, the first transistor 3031 and the second transistor 3032 can be turned on regardless of whether the gate voltages of the first transistor 5031 and the second transistor 5032 are high threshold voltages or low threshold voltages. Thus, a current can flow from the second end of the first transistor 5011 to the third end of the second transistor 5042. The current sensing unit 506 can determine whether the data string stored in the memory cell string matches the data string to be searched by detecting whether there is current flowing out of the memory cell string 50 (the third end of the second transistor 5042) or by detecting the magnitude of the current flowing out of the memory cell string (the third end of the second transistor 5042). In this example, the current sensing unit 506 detects that there is current flowing out of the memory cell string 50, and can determine that the data string stored in the memory cell string matches the data string to be searched.

[0053] Please refer to Figure 5B Example. Figure 5B and Figure 5A Similarly, the storage cell string 50 also stores 01X0, but the difference is that the data string to be searched is 0111. The transistors in the storage cells 501-503 are all turned on so that current can pass through. However, the storage cell 504 does not match the data stored in the storage cell string 504, so that the first transistor 5041 and the second transistor 5042 are not turned on, so that the current cannot pass through. Therefore, the current sensing unit 506 cannot detect that there is current flowing out of the storage cell string 50, and it can be determined that the data string stored in the storage cell string 50 does not match the data string to be searched.

[0054] Please refer to Figure 5C Example. Figure 5C and Figure 5ASimilarly, the storage cell string 50 also stores 01X0, but the difference is that the data string to be searched is 0?00, where? is a wildcard, that is, the bit can be 0 or 1. The transistors in the storage cells 501, 503, and 504 are all turned on so that current can pass. For the storage cell 502, the voltages of the gates of the first transistor 5021 and the second transistor 5022 are both higher than the second search voltage of the high threshold voltage and the low threshold voltage, so no matter what the data stored in the storage cell 502 is, the first transistor 5021 and the second transistor 5022 are both turned on. Therefore, the current sensing unit 506 detects that a current flows out of the storage cell string 50, and can then determine that the data string stored in the storage cell string 50 matches the data string to be searched.

[0055] Different applications such as artificial intelligence and big data search may require different quantification strategies, and the use of wildcards during search can provide flexibility in various applications. Figures 5A to 5C The operations can be extended to apply to longer data formats based on the principles described above, such as TF32, TF16, FP64, FP32, FP16, INT16, INT8, etc.

[0056] Please refer to Figure 5D , Figure 5D Schematic diagram of the stored data string and the searched data string. In this example, the data format used is, for example, INT8, which is a decimal integer between 0 and 127 represented by a binary value of eight bits from the most significant bit (MSB) to the least significant bit (LSB). In this example, the data string stored in the storage unit string (e.g., a neuron in the feature vector) is 01100010. The data string to be searched starts from the fifth bit as the starting position of quantization, and the last four bits will be masked with wildcards during the search.

[0057] During artificial intelligence reasoning operations, a feature vector contains many neurons, and each neuron represents a single binary data string in a format such as FP16 or INT8. If wildcards are not used for masking during the search, it is often impossible to obtain any search results due to slight differences between the feature vector input during the search and the stored feature vector. This problem is usually caused by differences in the least significant bits (LSBs) of neurons. For example, if a storage cell string includes ninety-six transistors, a storage cell string can store forty-eight bits of binary data. If the stored data format is INT8, a feature vector stored in a storage cell string may include six neurons representing the INT8 format. In the case where the search is not masked with wildcards, the forty-eight-bit feature vector stored in any storage cell string must match the forty-eight-bit feature vector input during the search to obtain matching search results. This is impractical in application. In order to solve the above problem, the last four bits of each neuron in the feature vector input during the search can be masked with wildcards (for example, Figure 5D In practical applications, the start position and length of the mask can be configured according to the quantization level to achieve different search resolutions.

[0058] Please refer to Figure 6 , Figure 6 for Figure 4 In this embodiment, the first search line SL1-j can be coupled to the second search line SL2-j via an inverter INV-j.

[0059] against Figure 6 In the embodiment of the present invention, the operation of a single memory cell Cij may include an erase operation, a program operation and a search operation, which are described in detail as follows.

[0060] During an erase operation, an erase voltage is applied to the first search line SL1-j. Generally, the erase voltage may be a negative bias voltage to release the charges stored in the first transistor T1-ij and the second transistor T2-ij.

[0061] During the programming operation, the threshold voltages of the first transistor T1-ij and the second transistor T2-ij are programmed respectively by applying an appropriate programming voltage to the first search line SL1-j. When the threshold voltage of the first transistor T1-ij is programmed to a low threshold voltage and the threshold voltage of the second transistor T2-ij is programmed to a high threshold voltage, the data stored in the memory cell Cij is defined as a first value (e.g., 0); when the threshold voltage of the first transistor T1-ij is programmed to a high threshold voltage and the threshold voltage of the second transistor T2-ij is programmed to a low threshold voltage, the data stored in the memory cell Cij is defined as a second value (e.g., 1). In addition to the first value or the second value, the data stored in the memory cell Cij can also selectively support the storage of "don't care". When the threshold voltage of the first transistor T1-ij is programmed to a low threshold voltage and the threshold voltage of the second transistor T2-ij is programmed to a low threshold voltage, the data stored in the memory cell Cij is defined as "don't care".

[0062] During the search operation, when searching for the first value, a first search voltage is applied to the first search line SL1-j, and a second search voltage is generated on the second search line SL2-j through the inverter INV-j; when searching for the second value, a second search voltage is applied to the first search line SL1-j, and a first search voltage is generated on the second search line SL2-j through the inverter INV-j. The second search voltage is greater than the high threshold voltage, the high threshold voltage is greater than the first search voltage, and the first search voltage is greater than the low threshold voltage.

[0063] Please refer to Figure 7 , Figure 7 is a block diagram of a TCAM according to another embodiment of the present disclosure. TCAM 60 is similar to TCAM 10, except that in TCAM 60, the memory cell strings are divided into multiple groups, and each group of memory cell strings is coupled to a current sensing unit through an AND gate. For example, the first group of memory cell strings 602-1 and 602-2 are coupled to the current sensing unit 604-1 through an AND gate 606-1. During the search operation, if the current sensing unit 604-1 detects that the current from the AND gate 606-1 is not less than a threshold value (for example, twice the current output when the data string stored in a single memory cell string matches the data string to be searched), it can be determined that the data string stored in the first group of memory cell strings matches the data string to be searched, otherwise it can be determined that it does not match, and so on. In this way, RC delay can be reduced and the reading / search speed can be increased. In practice, the number of memory cell strings to be configured in a group of memory cell strings (for example, two or more) can be determined according to the requirements of RC delay.

[0064] Please refer to Figures 8A to 8C , Figures 8A to 8CFIG. 1 is a block diagram of a storage cell string according to another embodiment of the present disclosure. Figure 4 The transistors in the memory cell string are connected in series, so the same effect can be achieved by arbitrarily changing the order of the transistors. Fig. 8A The storage cell string shows Figure 4 One of the variations of the storage cell string. Fig. 8A In the embodiment, the first transistors T1-i1~T1-in in the memory cell string 702-i are configured together, the second transistors T2-i1~T2-in are configured together, and then the series-connected first transistors T1-i1~T1-in and the series-connected second transistors T2-il~T2-in are connected in series. Figure 8B The embodiment of Figure 4 Another variation of the embodiment of the present invention. The memory cell string 802-i is similar to the memory cell string 702-i, except that the connection order of the second transistors T2-i1-T2-in is different. Figure 8C for Figure 4 Yet another variation of the embodiment of . Figure 8C The embodiment combines Figure 7 and Fig. 8A The first transistors T1-i1~T1-in are connected in series to form a transistor string, the second transistors T2-i1~T2-in are connected in series to form another transistor string, and the two transistor strings are further coupled to an AND gate 906-i so that the two transistor strings are equivalent to being connected in series. Figures 8A to 8C This is only an example, and the order of transistor series connection can be adjusted according to actual needs. In addition, the transistors of each memory cell string can be arbitrarily configured as multiple (e.g., three, four or even more) transistor strings and then connected to one or more AND gates to make these multiple transistor strings equivalent to series connection, thereby reducing RC delay.

[0065] The amount of computation based on big data technology is intensive and huge, and TCAM needs to be read repeatedly for a long time. Therefore, read disturb becomes a problem that TCAM needs to face when applying it to big data.

[0066] In order to solve the read disturbance, the memory cells in the memory cell string can be divided into a plurality of groups, each of which can include a plurality of memory cells. In one embodiment, the number of memory cells included in each group is the same. During the programming operation and the search operation, a group of memory cells is used as a unit. Figure 4 Taking the storage cell string 402-i as an example, the storage cells Ci1 and Ci2 are configured as the first group, the storage cells Ci3 and Ci4 are configured as the second group, and so on. Figure 4The memory cell string 402-i is a memory cell string 402-i, but the programming operation and search operation used are different from the above-mentioned embodiment. In order to better understand this embodiment, the programming operation and search operation of the first group of memory cells are described below, and the erasing operation is similar to the above-mentioned one, so it is not repeated.

[0067] In Table 1, the first column from the left is the data stored in the first group of memory cells Ci1 and Ci2, the second column is the threshold voltage of the corresponding programmed first transistors T1-i1 and T1-i2 and the second transistors T2-i1 and T2-i2, and the third column is the voltage applied to the first search lines SL1-1 and SL1-2 and the second search lines SL2-1 and SL2-2 during the search. In this example, 0 represents the first value, 1 represents the second value, L represents the low threshold voltage, H represents the high threshold voltage, V1 represents the first search voltage, and V2 represents the second search voltage.

[0068] Table 1

[0069] S1[Ci1,Ci2] [T1-i1, T2-i1, T1-i2, T2-i2] [SL1-1, SL2-1, SL1-2, SL2-2] [0,0] [H, H, H, L] [V2, V2, V2, V1] [0,1] [H, H, L, H] [V2, V2, V1, V2] [1,0] [H, L, H, H] [V2, V1, V2, V2] [1,1] [L, H, H, H] [V1, V2, V2, V2]

[0070] During programming operation, one of the high threshold voltage and the low threshold voltage will be set to a primary state, and the other will be set to a secondary state. In the case of programming without [random] data, only one of the four transistors of each group of memory cells will be programmed to a secondary state, and the other transistors will be programmed to a primary state. In the embodiment of Table 1, the primary state is a high threshold voltage and the secondary state is a low threshold voltage. The gate of the transistor programmed to the high threshold voltage must be applied with a second search voltage to turn on. Thus, the corresponding search voltage combination during the search can be determined.

[0071] Table 2 is another embodiment different from Table 1.

[0072] Table 2

[0073]

[0074]

[0075] In the embodiment of Table 2, the primary state is a low threshold voltage and the secondary state is a high threshold voltage. In addition, Table 2 also shows that for the same data, the position of the primary state can be changed in different encoding methods.

[0076] In another embodiment, the data encoding may also support programming data to include [random], or may support allowing wildcards to be used when searching.

[0077] Table 3 is an embodiment extended from Table 1. The embodiment of Table 3 supports programming data including [random], where X represents [random].

[0078] Table 3

[0079] S1[Ci1,Ci2] [T1-i1, T2-i1, T1-i2, T2-i2] [SL1-1, SL2-1, SL1-2, SL2-2] [0,0] [H, H, H, L] [V2, V2, V2, V1] [0,1] [H, H, L, H] [V2, V2, V1, V2] [1,0] [H, L, H, H] [V2, V1, V2, V2] [1,1] [L, H, H, H] [V1, V2, V2, V2] [0,X] [H, H, L, L] [X,0] [H, L, H, L] [1,X] [L, L, H, H] [X,1] [L, H, L, H] [X, X] [L, L, L, L]

[0080] Here is a brief description of the operating principle of [Random]. The data being [Random] means that it must match whether searching for 1 or 0. For example, when the stored data is [0, X], it must match whether searching for [0, 0] or [0, 1]. In the memory cell string 402-i, the so-called "match" means "current can pass" in a physical sense. That is to say, when determining the threshold voltage of the four transistors of the memory cell storing the data [0, X], it must be possible to turn on the four transistors of the memory cell storing the data [0, X] regardless of the combination of search voltages used to search for [0, 0] or [0, 1].

[0081] Table 4 is an embodiment extended from Table 2. The embodiment of Table 4 supports the use of wildcards, where ? represents a wildcard.

[0082] Table 4

[0083] S1[Cil,Ci2] [T1-i1, T2-i1, T1-i2, T2-i2] [SL1-1, SL2-1, SL1-2, SL2-2] [0,0] [H, L, L, L] [V2, V1, V1, V1] [0,1] [L, H, L, L] [V1, V2, V1, V1] [1,0] [L, L, H, L] [V1, V1, V2, V1] [1,1] [L, L, L, H] [V1, V1, V1, V2] [0,?] [V2, V2, V1, V1] [?,0] [V2, V1, V2, V1] [1,?] [V1, V2, V1, V2] [?,1] [V1, V1, V2, V2] [?,?] [V2, V2, V2, V2]

[0084] Here is a brief description of the operation principle of the wildcard. The searched data is a wildcard, which means that it must match whether the stored data is 1 or 0. For example, when the data to be searched is [0,?], the stored data must match whether it is [0,0] or [0,1]. In the memory cell string 402-i, the so-called "match" in the physical sense means "current can pass". That is, when determining the combination of the four search voltages for the search data [0,?], it is necessary to make the four transistors of the memory cell storing the data [0,0] or [0,1] all turned on.

[0085] It should be noted that in practice, more than two storage units may be configured as a group as needed, and the present disclosure is not limited thereto.

[0086] In the present disclosure, the transistor included in the memory cell is a metal field effect transistor (MOSFET) as an example, but in other embodiments, any storage element that can be used to make a flash memory can be used, such as a charge trapping element, a SONOS transistor, and a ferroelectric field effect transistor (FeFET). The current sensing unit is, for example, a current sensing unit.

[0087] It is worth mentioning that any suitable two-dimensional or three-dimensional NAND Flash memory structure can be applied to the TCAM of the present disclosure.

[0088] In addition to the applications mentioned above, the TCAM proposed in this disclosure can also be used to search for data in a database. Fig.10 , Fig.10 Schematic diagram of data and feature vector space. In this example, each piece of data can be represented by a three-dimensional feature vector, that is, each piece of data can have three feature values, and these three feature values ​​form a three-dimensional feature vector. Fig.10 In , FD1 represents the dimension of the first eigenvalue of the data, FD2 represents the dimension of the second eigenvalue of the data, and FD3 represents the dimension of the third eigenvalue of the data. These three dimensions form a three-dimensional vector space, and each point in this three-dimensional vector space represents a piece of data represented by a three-dimensional eigenvector. Points belonging to the same category of data usually gather in a certain area of ​​the vector space. Fig.10 It shows that the data clusters of four categories CAT1-CAT4 are respectively gathered in four different areas. For example, the data in the database may be animal pictures, which include four categories: dog, cat, bird and snake. Each animal picture may have three feature values ​​and be represented by a three-dimensional feature vector. The TCAM proposed in the present disclosure can be used to store the feature vectors of these data. Based on this application, the present disclosure proposes a decision generation method for TCAM.

[0089] Please refer to Fig.11 In S1102, a target data string is received. The target data string may include a plurality of binary bits. For example, a feature vector of a picture of an animal to be identified (raw data) may be obtained by calculation, and the target data string may be obtained by representing the feature vector in binary. Depending on the raw data, the method of calculating the feature vector may also be different.

[0090] In S1104, one or more masks are determined, and an input data string is generated according to the masks and the target data string. Fig.12 As shown, after the target feature vector is converted to binary, the bit where the mask is located is replaced by the wildcard "X". The number and position of the mask can be arbitrarily configured according to the needs ( Fig.12 Three different shielding configurations are shown).

[0091] In S1106, multiple search voltages are applied to multiple first search lines and multiple second search lines of the TCAM according to the input data string. The corresponding relationship between the search voltages and 0, 1 and wildcards can be referred to above and will not be repeated here.

[0092] In S1108, one or more decision parameters are determined according to the multiple current values ​​obtained by the multiple current sensing units of the TCAM detecting the first search line and the second search line, wherein the decision parameters can be obtained by analyzing the current values ​​detected by the current sensing units. For example, the number of matched data strings and the memory location of the matched data strings can be known from the current values ​​detected by the current sensing units, and the content and even the category of the matched data strings can be known by accessing the matched memory location. The decision parameters may include the number of matched data strings, the category distribution to which the matched data strings belong, the difference between the matched data (such as the Hamming distance), etc.

[0093] In S1110, it is determined whether to make a decision based on the decision parameters. For example, it can be determined whether to make a decision based on whether the number of matched data strings is higher than a threshold. The conditions for determining whether to make a decision can be set as needed. If it is determined to make a decision, S1112 is executed; if it is determined not to make a decision, it returns to S1104 to adjust the shielding.

[0094] In S1112, a decision is generated according to the decision parameters. For example, the data string with the most categories in the match may be selected as the final decision. The method of generating a decision may be set as required and is not limited in the present disclosure.

[0095] In one embodiment, the TCAM may include an in-memory searching engine (IMS engine) for executing S1104. In another embodiment, the TCAM may be divided into a plurality of blocks, each of which includes an IMS engine, that is, in S1102, a plurality of target data strings may be received simultaneously, in S1104, masks may be set for different target data strings respectively, in S1106, multiple IMS engines may be used to search simultaneously or in batches, and in S1106, all search results may be comprehensively analyzed to generate decision parameters.

[0096] It should be noted that the above examples are only used for illustration, and the present disclosure does not limit the dimension of the feature vector.

[0097] In summary, although the present disclosure has been disclosed in the above embodiments, it is not intended to limit the present disclosure. Those skilled in the art in the technical field to which the present disclosure belongs can make various changes and modifications without departing from the spirit and scope of the present disclosure. Therefore, the protection scope of the present disclosure shall be determined by the scope of the attached claims.

Claims

1. A ternary content addressable memory, comprising: Multiple first search lines; multiple second search lines; as well as A plurality of memory cell strings, comprising a plurality of memory cells, each of the memory cells being coupled to one of the plurality of first search lines and one of the plurality of second search lines; One or more current sensing units are coupled to the plurality of memory cell strings, During a search operation, whether the data stored in the multiple storage cell strings matches a data string to be searched is determined based on whether the one or more current sensing units detect current from the multiple storage cell strings or based on the size of the current flowing out of the one or more current sensing units from the multiple storage cell strings; the multiple storage cell strings are divided into multiple groups, and the multiple storage cells in each group are coupled to the corresponding current sensing unit through an AND gate.

2. The ternary content addressable memory according to claim 1, wherein each of the storage units comprises: a first transistor, a first terminal of the first transistor being coupled to the corresponding first search line; as well as A second transistor, a first end of the second transistor is coupled to the corresponding second search line, a second end of the second transistor is coupled to a second end of the first transistor, and a third end of the second transistor is coupled to a third end of the first transistor.

3. A ternary content addressable memory according to claim 2, wherein for each of the memory cells, in a programming operation, when a first value is to be programmed, a threshold voltage of the first transistor is programmed to be a low threshold voltage and a threshold voltage of the second transistor is programmed to be a high threshold voltage, and when a second value is to be programmed, the threshold voltage of the first transistor is programmed to be the high threshold voltage and the threshold voltage of the second transistor is programmed to be the low threshold voltage.

4. The ternary content addressable memory according to claim 3, wherein for each of the storage cells, during the search operation, when the first value to be searched is, the first search line is applied with a first search voltage, and the second search line is applied with a second search voltage, and when the second value to be searched is, the first search line is applied with the second search voltage, and the second search line is applied with the first search voltage, the second search voltage is higher than the high threshold voltage, the high threshold voltage is higher than the first search voltage, and the first search voltage is higher than the low threshold voltage.

5. The ternary content addressable memory according to claim 3, wherein for each of the memory cells, in the programming operation, when a "random" is to be programmed, the threshold voltage of the first transistor and the threshold voltage of the second transistor are both programmed to the low threshold voltage.

6. The ternary content addressable memory according to claim 4, wherein for each of the transistors, when searching for a wildcard, the first search line and the second search line are both applied with the second search voltage.

7. The ternary content addressable memory according to claim 1, wherein each of the memory cell strings comprises a plurality of transistors connected in series, half of the plurality of transistors are respectively a first transistor of each of the memory cells, and the other half of the plurality of transistors are respectively a second transistor of each of the memory cells, and for each of the memory cells: A first terminal of the first transistor is coupled to the corresponding first search line; and A first terminal of the second transistor is coupled to the corresponding second search line.

8. A ternary content addressable memory according to claim 7, wherein for each of the memory cells, in a programming operation, when a first value is to be programmed, a threshold voltage of the first transistor is programmed to be a low threshold voltage and a threshold voltage of the second transistor is programmed to be a high threshold voltage, and when a second value is to be programmed, the threshold voltage of the first transistor is programmed to be the high threshold voltage and the threshold voltage of the second transistor is programmed to be the low threshold voltage.

9. The ternary content addressable memory according to claim 8, wherein for each of the storage cells, during the search operation, when the first value to be searched is, the first search line is applied with a first search voltage, and the second search line is applied with a second search voltage, and when the second value to be searched is, the first search line is applied with the second search voltage, and the second search line is applied with the first search voltage, the second search voltage is higher than the high threshold voltage, the high threshold voltage is higher than the first search voltage, and the first search voltage is higher than the low threshold voltage.

10. The ternary content addressable memory according to claim 8, wherein for each of the memory cells, in the programming operation, when a "random" is to be programmed, the threshold voltage of the first transistor and the threshold voltage of the second transistor are both programmed to the low threshold voltage.

11. The ternary content addressable memory according to claim 9, wherein for each of the transistors, when a wildcard is to be searched, the second search voltage is applied to both the first search line and the second search line.

12. The ternary content addressable memory according to claim 7, wherein for each of the memory cell strings, the plurality of memory cells are divided into a plurality of groups, the group including more than two of the plurality of memory cells, and for the plurality of memory cells in each of the groups, in a programming operation, when data not including "random" data is to be programmed, a threshold voltage of one of the plurality of transistors of the plurality of memory cells is programmed as a secondary state, and the plurality of threshold voltages of the other plurality of transistors in the plurality of memory cells are programmed as a primary state, the primary state being one of a high threshold voltage and a low threshold voltage, and the secondary state being the other of the high threshold voltage and the low threshold voltage.

13. A decision making method for a ternary content addressable memory, comprising: receiving a target data string; determining one or more masks, and generating an input data string according to the one or more masks and the target data string; applying a plurality of search voltages to a plurality of first search lines and a plurality of second search lines according to the input data string; Determining one or more decision parameters according to a plurality of current values ​​obtained by a plurality of current sensing units detecting the plurality of first search lines and the plurality of second search lines, wherein the plurality of first search lines and the plurality of second search lines are coupled to a plurality of memory cell strings, the plurality of memory cell strings are divided into a plurality of groups, and the plurality of memory cells in each group are coupled to the corresponding current sensing unit through an AND gate; and A decision is generated based on the one or more decision parameters.

14. The decision making method according to claim 13, further comprising determining whether to make a decision according to the one or more decision parameters.