[go: up one dir, main page]

TW202305803A - Multilevel content addressable memory, multilevel coding method and multilevel searching method - Google Patents

Multilevel content addressable memory, multilevel coding method and multilevel searching method Download PDF

Info

Publication number
TW202305803A
TW202305803A TW110127242A TW110127242A TW202305803A TW 202305803 A TW202305803 A TW 202305803A TW 110127242 A TW110127242 A TW 110127242A TW 110127242 A TW110127242 A TW 110127242A TW 202305803 A TW202305803 A TW 202305803A
Authority
TW
Taiwan
Prior art keywords
string data
digital string
data
multilevel
bit binary
Prior art date
Application number
TW110127242A
Other languages
Chinese (zh)
Other versions
TWI766773B (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 TW110127242A priority Critical patent/TWI766773B/en
Application granted granted Critical
Publication of TWI766773B publication Critical patent/TWI766773B/en
Publication of TW202305803A publication Critical patent/TW202305803A/en

Links

Images

Landscapes

  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

A multilevel content addressable memory, a multilevel coding method and a multilevel searching method are provided. The multilevel coding method includes the following steps. A highest value of a multilevel-bit binary data is obtained. A length of a digital string data is set as being the highest value of the multilevel-bit binary data. The multilevel-bit binary data is converted into the digital string data. If a content of the multilevel-bit binary data is an exact value, a number of an indicating bit in the digital string data is the exact value.

Description

多階內容可定址記憶體、多階編碼方法與多階搜尋方法Multi-level content addressable memory, multi-level encoding method and multi-level search method

本揭露是有關於一種記憶體、編碼方法與搜尋方法,且特別是有關於一種多階內容可定址記憶體、多階編碼方法與多階搜尋方法。The present disclosure relates to a memory, an encoding method and a searching method, and in particular relates to a multi-level content addressable memory, a multi-level encoding method and a multi-level searching method.

內容可定址記憶體(content addressable memory, CAM)係為一種特殊形態記憶體,其可以針對輸入搜尋字組辨識出相同內容之儲存字組所儲存之位址。內容可定址記憶體可以提供多種應用,特別是圖形匹配與搜尋。Content addressable memory (content addressable memory, CAM) is a special form of memory, which can identify the address stored in the storage word with the same content according to the input search word. Content addressable memory can serve a variety of applications, especially pattern matching and searching.

一般而言,內容可定址記憶體以二進位形式比對儲存字組與輸入搜尋字組。也就是說,儲存於儲存字組與輸入搜尋字組的資料為二進位之0或1。Generally speaking, CAM compares the stored word with the input search word in binary form. That is to say, the data stored in the storage word and the input search word are binary 0 or 1.

本揭露係有關於一種多階內容可定址記憶體、多階編碼方法與多階搜尋方法,其利用將多位元二進位資料轉換為數位字串資料,使得資料可以定義為多種範圍,以進行搜尋與比對。This disclosure relates to a multi-level content addressable memory, a multi-level encoding method and a multi-level search method, which convert multi-bit binary data into digital string data, so that the data can be defined in various ranges to perform Search and compare.

根據本揭露之一方面,提出一種多階內容可定址記憶體(multilevel content addressable memory, MCAM)之一儲存字組(stored word)或一輸入搜尋字組(input search word)的多階編碼方法。多階編碼方法包括以下步驟。獲得一多位元二進位資料(multilevel-bit binary data)之一最高十進位數值。設定一數位字串資料(digital string data)之一長度為多位元二進位資料之最高十進位數值。轉換多位元二進位資料為數位字串資料。若多位元二進位資料之一內容為一確切值,則數位字串資料之一標誌位元(indicating bit)的數量為確切值。According to one aspect of the present disclosure, a multilevel encoding method for a stored word or an input search word of a multilevel content addressable memory (MCAM) is proposed. The multi-stage encoding method includes the following steps. Get one of the highest decimal values of a multilevel-bit binary data. Set the length of a digital string data to the highest decimal value of the multi-bit binary data. Convert multi-bit binary data to digital string data. If the content of one of the multi-bit binary data is an exact value, the number of indicating bits of one of the digital string data is an exact value.

根據本揭露之另一方面,提出一種多階內容可定址記憶體(multilevel content addressable memory, MCAM)之多階搜尋方法。多階搜尋方法包括以下步驟。儲存數個儲存字組於數個NAND串。輸入一輸入搜尋字組至這些NAND串。這些儲存字組與輸入搜尋字組各被從一多位元二進位資料轉換為一數位字串資料。若多位元二進位資料之一內容為一確切值,則數位字串資料之一標誌位元的數量為確切值。輸出一比較結果。若輸入搜尋字組之數位字串資料重疊於儲存字組之其中之一的數位字串資料,則比較結果為一匹配訊號。According to another aspect of the present disclosure, a multilevel search method for a multilevel content addressable memory (MCAM) is proposed. The multi-stage search method includes the following steps. Store several storage words in several NAND strings. Enter an input search word into these NAND strings. Each of the stored word and the input search word is converted from a multi-bit binary data to a digital string data. If one of the contents of the multi-bit binary data is an exact value, then the number of flag bits of one of the digital string data is an exact value. Output a comparison result. If the digital string data of the input search word overlaps with the digital string data of one of the stored word groups, the comparison result is a matching signal.

根據本揭露之再一方面,提出一種多階內容可定址記憶體(multilevel content addressable memory, MCAM)。多階內容可定址記憶體包括一輸入編碼器、一記憶體陣列及一輸出解碼器。輸入編碼器用以接收一輸入搜尋字組。記憶體陣列包括數個NAND串。各個NAND串用以儲存一儲存字組。各個儲存字組與輸入搜尋字組各被從一多位元二進位資料轉換為一數位字串資料。若多位元二進位資料之一內容為一確切值,則數位字串資料之一標誌位元的數量為確切值。輸出解碼器用以自這些NAND串接收數個比較結果。According to yet another aspect of the present disclosure, a multilevel content addressable memory (MCAM) is proposed. The multi-level content addressable memory includes an input encoder, a memory array and an output decoder. The input encoder is used for receiving an input search word. A memory array includes several NAND strings. Each NAND string is used to store a storage word. Each stored word and input search word are each converted from a multi-bit binary data to a digital string data. If one of the contents of the multi-bit binary data is an exact value, then the number of flag bits of one of the digital string data is an exact value. The output decoder is used to receive comparison results from the NAND strings.

為了對本揭露之上述及其他方面有更佳的瞭解,下文特舉實施例,並配合所附圖式詳細說明如下:In order to have a better understanding of the above and other aspects of the present disclosure, the following specific embodiments are described in detail in conjunction with the attached drawings as follows:

請參照第1圖,其繪示根據一實施例之多階內容可定址記憶體(multilevel content addressable memory, MCAM)100。MCAM 100包括一輸入編碼器110、一記憶體陣列120及一輸出編碼器130。記憶體陣列120包括數個NAND串STi。各個NAND串STi儲存一儲存字組WDi。輸入編碼器110接收一輸入搜尋字組WQ。輸入搜尋字組WQ與這些儲存字組WDi進行比對,並輸出數個比對結果RSi。輸出編碼器130自這些NAND串STi接收比對結果RSi。舉例來說,當其中一個儲存字組WDi匹配於輸入搜尋字組WQ,則其比對結果RSi為一匹配訊號,例如是「1」;當其中一個儲存字組WDi不匹配於輸入搜尋字組WQ,則其比對結果RSi為不匹配訊號,例如是「0」。輸出編碼器130輸出儲存字組WDi匹配於輸入搜尋字組WQ之NAND串的位址。Please refer to FIG. 1 , which illustrates a multilevel content addressable memory (MCAM) 100 according to an embodiment. MCAM 100 includes an input encoder 110 , a memory array 120 and an output encoder 130 . The memory array 120 includes several NAND strings STi. Each NAND string STi stores a storage word WDi. The input encoder 110 receives an input search word WQ. The input search word WQ is compared with these stored words WDi, and several comparison results RSi are output. The output encoder 130 receives comparison results RSi from the NAND strings STi. For example, when one of the stored words WDi matches the input search word WQ, the comparison result RSi is a matching signal, such as "1"; when one of the stored words WDi does not match the input search word WQ, the comparison result RSi is a mismatch signal, such as "0". The output encoder 130 outputs the address of the NAND string storing the word WDi matching the input search word WQ.

請參照第2圖,其說明輸入搜尋字組WQ與儲存字組WDi的內容。在一實施例中,輸入搜尋字組WQ係由數個多位元二進位資料(multilevel-bit binary data)qj組成。如第2圖所示,多位元二進位資料qj例如是「111」、「011」、「001」及「000」。「111」、「011」、「001」及「000」之十進位數值分別為「7」、「3」、「1」及「0」。儲存字組WDi係由多位元二進位資料dij組成。如第2圖所示,多位元二進位資料dij例如是「010」、「100」、「111」及「001」。「010」、「100」、「111」及「001」之十進位數值分別為「2」、「4」、「7」及「1」。Please refer to Figure 2, which illustrates the contents of the input search word WQ and the storage word WDi. In one embodiment, the input search word WQ is composed of several multilevel-bit binary data qj. As shown in FIG. 2, the multi-bit binary data qj are, for example, "111", "011", "001" and "000". The decimal values of "111", "011", "001" and "000" are "7", "3", "1" and "0" respectively. The storage word WDi is composed of multi-bit binary data dij. As shown in FIG. 2, the multi-bit binary data dij are, for example, "010", "100", "111" and "001". The decimal values of "010", "100", "111" and "001" are "2", "4", "7" and "1" respectively.

在本實施例中,各個多位元二進位資料qj被轉換為數位字串資料(digital string data)qsj。舉例來說,「111」、「011」、「001」及「000」分別被轉換為「1111111」、「00001111」、「0000001」及「0000000」。In this embodiment, each multi-bit binary data qj is converted into digital string data (digital string data) qsj. For example, "111", "011", "001", and "000" are converted to "1111111", "00001111", "0000001", and "0000000", respectively.

同樣的,各個多位元二進位資料dij被轉換為數位字串資料dsij。舉例來說,「010」、「100」、「111」及「001」分別被轉換為「0000011」、「0001111」、「1111111」及「0000001」。Similarly, each multi-bit binary data dij is converted into digital string data dsij. For example, "010", "100", "111", and "001" are converted to "0000011", "0001111", "1111111", and "0000001", respectively.

請參照表一,其說明根據一實施例將多位元二進位資料qj、dij轉換為數位字串資料qsj、dsij的例子。多位元二進位資料qj、dij的十進位數值為0、1、…、6、7。多位元二進位資料qj、dij的最高十進位數值為7。數位字串資料qsj、dsij的長度等於或大於多位元二進位資料qj、dij之最高十進位數值。在數位字串資料qsj、dsij中,「1」為標誌位元(indicating bit)。在表一的例子中,多位元二進位資料qj、dij的十進位數值係為確切值,數位字串資料qsj、dsij之標誌位元(即「1」)的數量即為此確切值。數位字串資料qsj、dsij的長度為多位元二進位資料qj、dsij的最高十進位數值(此處為三位元,其最高二進位數值為「111」、最高十進位數值為「7」)。 多位元二進位資料qj、dij 十進位數值 數位字串資料qsj、dsij 000 0 0000000 001 1 0000001 010 2 0000011 011 3 0000111 100 4 0001111 101 5 0011111 110 6 0111111 111 7 1111111 表一 Please refer to Table 1, which illustrates an example of converting multi-bit binary data qj, dij into digital string data qsj, dsij according to an embodiment. The decimal values of the multi-bit binary data qj, dij are 0, 1, . . . , 6, 7. The highest decimal value of multi-bit binary data qj, dij is 7. The length of the digital string data qsj, dsij is equal to or greater than the highest decimal value of the multi-bit binary data qj, dij. In the digital string data qsj and dsij, "1" is an indicating bit. In the example in Table 1, the decimal value of the multi-bit binary data qj, dij is the exact value, and the number of flag bits (ie "1") of the digital string data qsj, dsij is the exact value. The length of the digital string data qsj, dsij is the highest decimal value of the multi-digit binary data qj, dsij (here is three bits, the highest binary value is "111", the highest decimal value is "7" ). Multi-bit binary data qj, dij decimal value Digital string data qsj, dsij 000 0 0000000 001 1 0000001 010 2 0000011 011 3 0000111 100 4 0001111 101 5 0011111 110 6 0111111 111 7 1111111 Table I

再者,如表一所示,數位字串資料qsj、dsij之標誌位元(即「1」)堆積於數位字串資料qsj、dsij之右側。在其他實施例中,數位字串資料qsj、dsij之標誌位元(即「1」)可以堆積於數位字串資料qsj、dsij之左側或按照一預定規則堆積。Furthermore, as shown in Table 1, the flag bits (that is, "1") of the digital string data qsj, dsij are accumulated on the right side of the digital string data qsj, dsij. In other embodiments, the flag bit (namely "1") of the digital string data qsj, dsij can be stacked on the left side of the digital string data qsj, dsij or stacked according to a predetermined rule.

根據上述內容,提供了一種儲存字組WDi或輸入搜尋字組WQ之多階編碼方法。請參照第3圖,其繪示MCAM 100之儲存字組WDi或輸入搜尋字組WQ之多階編碼方法的流程圖。在步驟S110中,獲得多位元二進位資料qj、dij之最高十進位數值。在步驟S120中,設定數位字串資料qsj、dsij之一長度為多位元二進位資料qj、dij之最高十進位數值。接著,在步驟S130中,轉換多位元二進位資料qj、dij為數位字串資料qsj、dsij。According to the above content, a multi-level encoding method for storing word WDi or inputting search word WQ is provided. Please refer to FIG. 3 , which shows a flow chart of the multi-level encoding method of the storage word WDi or the input search word WQ of the MCAM 100 . In step S110, the highest decimal value of the multi-bit binary data qj, dij is obtained. In step S120, set a length of the digital string data qsj, dsij to be the highest decimal value of the multi-bit binary data qj, dij. Next, in step S130, convert the multi-bit binary data qj, dij into digital string data qsj, dsij.

在其他實施例中,多位元二進位資料qj、dij之內容可以是一範圍。請參照表二,其說明根據一實施例之數位字串資料qsj、dsij。當多位元二進位資料qj、dij為一範圍,則在數位字串資料qsj、dsij使用通配符位元(wildcard bit)(即「X」)。通配符位元(即「X」)又稱為隨意位元(don’t care bit)。 多位元二進位資料qj、dij 十進位數值 數位字串資料qsj、dsij 011 3 0000111 010或011 2-3 0000X11 011或100或101 3-5 00XX111 101 5 0011111 011或100或101 3-5 00XX111 011或100或101或110 3-6 0XXX111 100或101或110 4-6 0XX1111 100或101或110或111 4-7 XXX1111 表二 In other embodiments, the content of the multi-bit binary data qj, dij can be a range. Please refer to Table 2, which illustrates the digital string data qsj, dsij according to an embodiment. When the multi-bit binary data qj and dij are within a range, a wildcard bit (ie "X") is used in the digital string data qsj and dsij. The wildcard bit (ie "X") is also known as the don't care bit. Multi-bit binary data qj, dij decimal value Digital string data qsj, dsij 011 3 0000111 010 or 011 2-3 0000X11 011 or 100 or 101 3-5 00XX111 101 5 0011111 011 or 100 or 101 3-5 00XX111 011 or 100 or 101 or 110 3-6 0XXX111 100 or 101 or 110 4-6 0XX1111 100 or 101 or 110 or 111 4-7 XXX1111 Table II

如表二第7列所示,多位元二進位資料qj、dij之十進位數值的內容係為4到6的範圍。此範圍之最高十進位數值為6,此範圍之最低十進位數值為4。範圍視窗為3。數位字串資料qsj、dsij之標誌位元(即「1」)的數量為4。數位字串資料qsj、dsij之通配符位元(即「X」)的數量為2。在數位字串資料qsj、dsij中,通配符位元(即「X」)接續於標誌位元(即「1」)之後堆積。在數位字串資料qsj、dsij中,標誌位元(即「1」)之數量與通配符位元(即「X」)之數量的和為6。As shown in column 7 of Table 2, the content of the decimal value of the multi-bit binary data qj, dij is in the range of 4 to 6. The highest decimal value in this range is 6, and the lowest decimal value in this range is 4. The range window is 3. The number of flag bits (that is, "1") in the digital string data qsj and dsij is 4. The number of wildcard characters (namely "X") in the digital string data qsj and dsij is 2. In the digital string data qsj, dsij, the wildcard bit (that is, "X") is piled up after the flag bit (that is, "1"). In the digital string data qsj, dsij, the sum of the number of flag bits (that is, "1") and the number of wildcard bits (that is, "X") is 6.

也就是說,標誌位元(即「1」)與通配符位元(即「X」)係按照下式(1)到(3)之規則編排。

Figure 02_image001
………………(1)
Figure 02_image003
………………………..(2)
Figure 02_image005
……………………………………..(3) That is to say, flag bits (namely "1") and wildcard bits (namely "X") are arranged according to the rules of the following formulas (1) to (3).
Figure 02_image001
………………(1)
Figure 02_image003
………………………..(2)
Figure 02_image005
…………………………………..(3)

請參照第4圖,其繪示一NAND串STi之一部分,其儲存儲存字組WDi之數位字串資料dsij之其中之一。如第4圖所示,多位元二進位資料dij之十進位數值係為3到6之範圍,數位字串資料dsij係為「0XXX111」。數位字串資料dsij可以依序儲存於NAND串STi中。NAND串STi之記憶胞CL之兩個電晶體TR1、TR2一起用來定義「1」、「0」或「X」。舉例來說,當電晶體TR1被編程為低電壓準位且電晶體TR2被編程為高電壓準位,則記憶胞CL之內容被定義為「0」。當電晶體TR1被編程為高電壓準位且電晶體TR2播編程為低電壓準位,則記憶胞CL之內容被定義為「1」。當電晶體TR1被編程為低電壓準位且電晶體TR2被編程為低電壓準位,則記憶胞CL之內容被定義為「X」。在其他實施例中,也可以應用其他的編碼方式來定義「1」、「0」及「X」。Please refer to FIG. 4, which shows a part of a NAND string STi, which stores one of the digital string data dsij of the storage word group WDi. As shown in FIG. 4, the decimal value of the multi-bit binary data dij is in the range of 3 to 6, and the digital string data dsij is "0XXX111". The digital string data dsij can be sequentially stored in the NAND string STi. The two transistors TR1 and TR2 of the memory cell CL of the NAND string STi are used together to define "1", "0" or "X". For example, when the transistor TR1 is programmed to a low voltage level and the transistor TR2 is programmed to a high voltage level, the content of the memory cell CL is defined as “0”. When the transistor TR1 is programmed to a high voltage level and the transistor TR2 is programmed to a low voltage level, the content of the memory cell CL is defined as “1”. When the transistor TR1 is programmed to a low voltage level and the transistor TR2 is programmed to a low voltage level, the content of the memory cell CL is defined as “X”. In other embodiments, other encoding methods may also be used to define "1", "0" and "X".

請參照第5圖,其繪示根據一實施例之記憶體陣列120。數個NAND串STi可以排列於記憶體陣列120中,以作為同步搜尋之資料庫。輸入至字元線WL之輸入搜尋字組WQ將與這些NAND串之所有儲存字組WDi進行比對。也就是說,數筆資料可以同時進行一次性比對,而能夠達成超高速平行搜尋功能。Please refer to FIG. 5, which illustrates a memory array 120 according to an embodiment. Several NAND strings STi can be arranged in the memory array 120 as a database for synchronous searching. The input search word WQ input to word line WL will be compared with all storage words WDi of these NAND strings. That is to say, multiple data can be compared at the same time at one time, so as to achieve ultra-high-speed parallel search function.

請參照第6圖,其繪示堆疊於同一NAND串STi之數位字串資料dsij。如果記憶體陣列120具有充足數量的字元線WL,儲存字組WDi之數位字串資料dsij可以堆疊於同一NAND串STi中。Please refer to FIG. 6, which shows the digital string data dsij stacked in the same NAND string STi. If the memory array 120 has a sufficient number of word lines WL, the digital string data dsij of the storage word group WDi can be stacked in the same NAND string STi.

請參照第7圖,其繪示根據堆疊數位字串資料dsij之記憶體陣列120。堆疊數位字串資料dsij之NAND串STi可以排列於記憶體陣列120內,以作為同步搜尋的資料庫。輸入搜尋字組WQ之數位字串資料qsj輸入至字元線WL,並與所有儲存字組WDi之數位字串資料dsij進行比對。也就是說,數筆資料可以同時進行一次性比對,而能夠達成超高速平行搜尋功能。Please refer to FIG. 7, which shows a memory array 120 based on stacked digit string data dsij. The NAND string STi of the stacked digital string data dsij can be arranged in the memory array 120 as a database for synchronous searching. The digital string data qsj of the input search word WQ is input to the word line WL, and compared with the digital string data dsij of all the stored word WDi. That is to say, multiple data can be compared at the same time at one time, so as to achieve ultra-high-speed parallel search function.

請參照第8圖,其繪示儲存字組WDi被分割為數個部分。如果儲存字組WDi比一個NAND串STi還要長,則可以將儲存字組WDi分割為數個部分,並儲存於多個NAND串STi。數位字串資料qsj則被輸入至對應的部分。多個部份的多個比對結果RSij可以透過AND運算來整合,以獲得一個比對結果RSi。Please refer to FIG. 8, which shows that the storage word WDi is divided into several parts. If the storage word WDi is longer than one NAND string STi, the storage word WDi can be divided into several parts and stored in multiple NAND strings STi. The digital string data qsj is then input to the corresponding part. Multiple comparison results RSij of multiple parts can be integrated through AND operation to obtain one comparison result RSi.

請參照第9~14圖,其示例說明數位字串資料qsj與數位字串資料dsij之比對程序。如第9圖所示,數位字串資料qsj係為5,數位字串資料dsij係為5。數位字串資料qsj等於數位字串資料dsij,故比對結果RSij為匹配訊號,例如是「1」。Please refer to Figures 9-14, which illustrate the comparison procedure of the digital string data qsj and the digital string data dsij. As shown in FIG. 9, the digit string data qsj is 5, and the digit string data dsij is 5. The digital string data qsj is equal to the digital string data dsij, so the comparison result RSij is a matching signal, for example, "1".

如第10圖所示,數位字串資料qsj係為2,數位字串資料dsij係為4。數位字串資料qsj沒有重疊於數位字串資料dsij,故比對結果RSij為不匹配訊號,例如是「0」。As shown in FIG. 10, the digit string data qsj is 2, and the digit string data dsij is 4. The digital string data qsj does not overlap with the digital string data dsij, so the comparison result RSij is a mismatch signal, for example, "0".

如第11圖所示,數位字串資料qsj係為2~4,數位字串資料dsij係為5~6。數位字串資料qsj沒有重疊於數位字串資料dsij,故比對結果RSij為不匹配訊號,例如是「0」。As shown in Fig. 11, the digit string data qsj is 2-4, and the digit string data dsij is 5-6. The digital string data qsj does not overlap with the digital string data dsij, so the comparison result RSij is a mismatch signal, for example, "0".

如第12圖所示,數位字串資料qsj係為4,數位字串資料dsij係為3~6。數位字串資料qsj重疊於數位字串資料dsij,故比對結果RSij為匹配訊號,例如是「1」。As shown in FIG. 12, the digit string data qsj is 4, and the digit string data dsij is 3-6. The digital string data qsj is overlapped with the digital string data dsij, so the comparison result RSij is a matching signal, for example, "1".

如第13圖所示,數位字串資料qsj係為2~4,數位字串資料dsij係為4。數位字串資料qsj重疊於數位字串資料dsij,故比對結果RSij為匹配訊號,例如是「1」。As shown in FIG. 13, the digit string data qsj is 2-4, and the digit string data dsij is 4. The digital string data qsj is overlapped with the digital string data dsij, so the comparison result RSij is a matching signal, for example, "1".

如第14圖所示,數位字串資料qsj係為2~4,數位字串資料dsij係為4~6。數位字串資料qsj重疊於數位字串資料dsij,故比對結果RSij為匹配訊號,例如是「1」。As shown in FIG. 14, the digit string data qsj is 2-4, and the digit string data dsij is 4-6. The digital string data qsj is overlapped with the digital string data dsij, so the comparison result RSij is a matching signal, for example, "1".

如上所述,提供了MCAM 100之一種多階搜尋方法。請參照第15圖,其繪示根據一實施例之MCAM 100之多階搜尋方法的流程圖。在步驟S210中,儲存至少一儲存字組WDi於至少一NAND串STi中。接著,在步驟S220中,將輸入搜尋字組WQ輸入至NAND串STi。然後,在步驟S230中,輸出比對結果RSi。當輸入搜尋字組WQ之數位字串資料qsj重疊於儲存字組WDi之數位字串資料dsij,比對結果RSi則為匹配訊號,例如是「1」。當輸入搜尋字組WQ之數位字串資料qsj未重疊於儲存字組WDi之數位字串資料dsij,比對結果RSi則為不匹配訊號,例如是「0」。As described above, a multi-stage search method for MCAM 100 is provided. Please refer to FIG. 15 , which shows a flow chart of the multi-stage search method of the MCAM 100 according to an embodiment. In step S210, at least one storage word WDi is stored in at least one NAND string STi. Next, in step S220, the input search word WQ is input into the NAND string STi. Then, in step S230, the comparison result RSi is output. When the digital string data qsj of the input search word WQ overlaps the digital string data dsij of the stored word WDi, the comparison result RSi is a matching signal, for example, "1". When the digital string data qsj of the input search word WQ does not overlap with the digital string data dsij of the stored word WDi, the comparison result RSi is a mismatch signal, such as "0".

根據上述實施例,標誌位元(即「1」)與通配符位元(即「X」)可以用來定義數位字串資料qsj、dsij的內容。在一實施例中,標誌位元也可以是「0」。請參照表三,其示例說明從多位元二進位資料qj、dij轉換為數位字串資料qsj、dsij。在表三的例子中,多位元二進位資料qj、dij之內容為確切值,數位字串資料qsj、dsij之標誌位元(即「0」)的數量係為此確切值。 多位元二進位資料qj、dij 十進位數值 數位字串資料qsj、dsij 000 0 1111111 001 1 1111110 010 2 1111100 011 3 1111000 100 4 1110000 101 5 1100000 110 6 1000000 111 7 0000000 表三 According to the above-mentioned embodiment, the flag bit (ie "1") and the wildcard bit (ie "X") can be used to define the content of the digital string data qsj, dsij. In an embodiment, the flag bit can also be "0". Please refer to Table 3, which illustrates the conversion from multi-bit binary data qj, dij to digital string data qsj, dsij. In the example in Table 3, the content of the multi-bit binary data qj, dij is an exact value, and the number of flag bits (ie "0") of the digital string data qsj, dsij is this exact value. Multi-bit binary data qj, dij decimal value Digital string data qsj, dsij 000 0 1111111 001 1 1111110 010 2 1111100 011 3 1111000 100 4 1110000 101 5 1100000 110 6 1000000 111 7 0000000 Table three

在上述實施例中,數位字串資料qsj、dsij之標誌位元(即「1」或「0」)堆積於數位字串資料qsj、dsij之右側。在其他實施例中,數位字串資料qsj、dsij之標誌位元(即「1」或「0」)可以堆積於數位字串資料qsj、dsij之左側,或者按照一預定順序堆積。請參照表四,數位字串資料qsj、dsij之標誌位元(即「1」)堆積於數位字串資料qsj、dsij之左側。 多位元二進位資料qj、dij 十進位數值 數位字串資料qsj、dsij 000 0 0000000 001 1 1000000 010 2 1100000 011 3 1110000 100 4 1111000 101 5 1111100 110 6 1111110 111 7 1111111 表四 In the above embodiment, the flag bits (ie "1" or "0") of the digital string data qsj, dsij are accumulated on the right side of the digital string data qsj, dsij. In other embodiments, the flag bits (ie, "1" or "0") of the digital string data qsj, dsij can be stacked on the left side of the digital string data qsj, dsij, or stacked in a predetermined order. Please refer to Table 4, the flag bits (that is, "1") of the digital string data qsj, dsij are accumulated on the left side of the digital string data qsj, dsij. Multi-bit binary data qj, dij decimal value Digital string data qsj, dsij 000 0 0000000 001 1 1000000 010 2 1100000 011 3 1110000 100 4 1111000 101 5 1111100 110 6 1111110 111 7 1111111 Table four

請參照表五,數位字串資料qsj、dsij之標誌位元(即「1」)按照一預定規則堆積。舉例來說,標誌位元(即「1」)交錯地排列於數位字串資料qsj、dsij之左側與右側。Please refer to Table 5, the flag bits (namely "1") of the digital string data qsj and dsij are piled up according to a predetermined rule. For example, flag bits (namely "1") are alternately arranged on the left and right of the digital string data qsj, dsij.

根據上述各種實施例,利用將多位元二進位資料轉換為數位字串資料,使得資料可以定義為多種範圍,以進行搜尋與比對。此外,數筆資料可以同時進行一次性比對,而能夠達成超高速平行搜尋功能。舉例來說,NAND晶片例如是具有16KB(=128kb)感測能力,MCAM 100則可以同時進行128k串的比對程序。According to the above various embodiments, by converting multi-bit binary data into digital string data, the data can be defined into various ranges for searching and comparison. In addition, multiple data can be compared at the same time, so as to achieve ultra-high-speed parallel search function. For example, a NAND chip has a sensing capability of 16KB (=128kb), and the MCAM 100 can perform a comparison procedure of 128k strings at the same time.

綜上所述,雖然本揭露已以實施例揭露如上,然其並非用以限定本揭露。本揭露所屬技術領域中具有通常知識者,在不脫離本揭露之精神和範圍內,當可作各種之更動與潤飾。因此,本揭露之保護範圍當視後附之申請專利範圍所界定者為準。To sum up, although the present disclosure has been disclosed above with embodiments, it is not intended to limit the present disclosure. Those with ordinary knowledge in the technical field to which this disclosure belongs may make various changes and modifications without departing from the spirit and scope of this disclosure. Therefore, the scope of protection of this disclosure should be defined by the scope of the appended patent application.

100:多階內容可定址記憶體(MCAM) 110:輸入編碼器 120:記憶體陣列 130:輸出編碼器 CL:記憶胞 dij:多位元二進位資料 dsij:數位字串資料 qj:多位元二進位資料 qsj:數位字串資料 RSi, RSij:比對結果 S110, S120, S130, S210, S220, S230:步驟 STi:NAND串 TR1, TR2:電晶體 WDi:儲存字組 WL:字元線 WQ:輸入搜尋字組 100: Multilevel Content Addressable Memory (MCAM) 110: input encoder 120: memory array 130: output encoder CL: memory cell dij: multi-bit binary data dsij: digital string data qj: multi-bit binary data qsj: digital string data RSi, RSij: comparison results S110, S120, S130, S210, S220, S230: steps STi: NAND string TR1, TR2: Transistor WDi: storage word group WL: character line WQ: Enter a search word

第1圖繪示根據一實施例之多階內容可定址記憶體(multilevel content addressable memory, MCAM)。 第2圖說明輸入搜尋字組與儲存字組的內容。 第3圖繪示MCAM之儲存字組或輸入搜尋字組之多階編碼方法的流程圖。 第4圖繪示一NAND串之一部分,其儲存儲存字組之數位字串資料之其中之一。 第5圖繪示根據一實施例之記憶體陣列。 第6圖繪示堆疊於同一NAND串之數位字串資料。 第7圖繪示根據堆疊數位字串資料之記憶體陣列。 第8圖繪示儲存字組被分割為數個部分。 第9~14圖示例說明數位字串資料與數位字串資料之比對程序。 第15圖繪示根據一實施例之MCAM之多階搜尋方法的流程圖。 FIG. 1 illustrates a multilevel content addressable memory (MCAM) according to an embodiment. Figure 2 illustrates the content of entering a search word and storing a word. Fig. 3 shows the flow chart of the multi-level encoding method for storing words or inputting search words in MCAM. FIG. 4 shows a portion of a NAND string storing one of the digit string data of the storage word. FIG. 5 illustrates a memory array according to one embodiment. Figure 6 shows digital string data stacked on the same NAND string. Figure 7 shows a memory array based on stacked bit string data. Figure 8 shows that the storage word is divided into several parts. Figures 9 to 14 exemplify the comparison procedure between digital string data and digital string data. FIG. 15 shows a flowchart of a multi-stage search method for MCAM according to an embodiment.

dij:多位元二進位資料 dij: multi-bit binary data

dsij:數位字串資料 dsij: digital string data

qj:多位元二進位資料 qj: multi-bit binary data

qsj:數位字串資料 qsj: digital string data

WDi:儲存字組 WDi: store words

WQ:輸入搜尋字組 WQ: Enter a search word

Claims (10)

一種多階內容可定址記憶體(multilevel content addressable memory, MCAM)之一儲存字組(stored word)或一輸入搜尋字組(input search word)的多階編碼方法,包括: 獲得一多位元二進位資料(multilevel-bit binary data)之一最高十進位數值; 設定一數位字串資料(digital string data)之一長度為該多位元二進位資料之該最高十進位數值; 轉換該多位元二進位資料為該數位字串資料,其中若該多位元二進位資料之一內容為一確切值,則該數位字串資料之一標誌位元(indicating bit)的數量為該確切值。 A multilevel encoding method for a stored word of a multilevel content addressable memory (MCAM) or an input search word (input search word), comprising: Obtain one of the highest decimal values of a multilevel-bit binary data; Set a length of digital string data to be the highest decimal value of the multi-bit binary data; converting the multi-bit binary data into the digital string data, wherein if one of the contents of the multi-bit binary data is an exact value, the number of an indicating bit of the digital string data is the exact value. 如請求項1所述之多階編碼方法,其中該數位字串資料之該標誌位元堆積於該數位字串資料之右側或左側。The multi-level encoding method as described in Claim 1, wherein the flag bits of the digital string data are accumulated on the right or left side of the digital string data. 如請求項1所述之多階編碼方法,其中該數位字串資料之該標誌位元根據一預定順序堆積。The multi-level encoding method as claimed in claim 1, wherein the flag bits of the digital string data are stacked according to a predetermined order. 如請求項1所述之多階編碼方法,其中若該多位元二進位資料之該內容為從一低十進位數值到一高十進位數值之一範圍,該數位字串資料之該標誌位元的數量為該低十進位數值,該數位字串資料之該標誌位元的數量與該數位字串資料之一通配符位元(wildcard bit)的數量之和為該高十進位數值。The multi-level encoding method as described in Claim 1, wherein if the content of the multi-bit binary data is in a range from a low decimal value to a high decimal value, the flag bit of the digital string data The number of elements is the low decimal value, and the sum of the number of the flag bits of the digital string data and the number of wildcard bits of the digital string data is the high decimal value. 如請求項4所述之多階編碼方法,其中若該多位元二進位資料之該內容為該範圍,則該通配符位元接續於該標誌位元之後堆積。The multi-level encoding method as described in claim 4, wherein if the content of the multi-bit binary data is within the range, the wildcard bit is piled up after the flag bit. 一種多階內容可定址記憶體(multilevel content addressable memory, MCAM)之多階搜尋方法,包括: 儲存複數個儲存字組於複數個NAND串; 輸入一輸入搜尋字組至該些NAND串,其中該些儲存字組與該輸入搜尋字組各被從一多位元二進位資料轉換為一數位字串資料,若該多位元二進位資料之一內容為一確切值,則該數位字串資料之一標誌位元的數量為該確切值;以及 輸出一比較結果,其中若該輸入搜尋字組之該數位字串資料重疊於該些儲存字組之其中之一之該數位字串資料,則該比較結果為一匹配訊號。 A multilevel search method for multilevel content addressable memory (MCAM), including: storing a plurality of storage words in a plurality of NAND strings; Inputting an input search word into the NAND strings, wherein the storage words and the input search word are each converted from a multi-bit binary data to a digital string data, if the multi-bit binary data one of the contents is an exact value, the number of flag bits of the digital string data is the exact value; and Outputting a comparison result, wherein if the digital string data of the input search word overlaps with the digital string data of one of the stored word groups, the comparison result is a matching signal. 如請求項6所述之多階搜尋方法,其中該數位字串資料之該標誌位元堆積於該數位字串資料之右側或左側,或根據一預定順序堆積。The multi-level search method as described in Claim 6, wherein the flag bits of the digital string data are stacked on the right or left side of the digital string data, or stacked according to a predetermined order. 如請求項6所述之多階搜尋方法,其中若該多位元二進位資料之該內容為從一低十進位數值到一高十進位數值之一範圍,該數位字串資料之該標誌位元的數量為該低十進位數值,該數位字串資料之該標誌位元的數量與該數位字串資料之一通配符位元的數量之和為該高十進位數值。The multi-level search method as described in claim 6, wherein if the content of the multi-bit binary data is in a range from a low decimal value to a high decimal value, the flag bit of the digital string data The number of elements is the low decimal value, and the sum of the number of the flag bits of the digital string data and the number of wildcard bits of the digital string data is the high decimal value. 如請求項8所述之多階搜尋方法,其中若該多位元二進位資料之該內容為該範圍,則該通配符位元接續於該標誌位元之後堆積。The multi-level search method as described in claim 8, wherein if the content of the multi-bit binary data is within the range, the wildcard bit is piled up after the flag bit. 一種多階內容可定址記憶體(multilevel content addressable memory, MCAM),包括: 一輸入編碼器,用以接收一輸入搜尋字組; 一記憶體陣列,包括複數個NAND串,各該NAND串用以儲存一儲存字組,其中各該儲存字組與該輸入搜尋字組各被從一多位元二進位資料轉換為一數位字串資料,若該多位元二進位資料之一內容為一確切值,則該數位字串資料之一標誌位元的數量為該確切值;以及 一輸出解碼器,用以自該些NAND串接收複數個比較結果。 A multilevel content addressable memory (multilevel content addressable memory, MCAM), including: an input encoder for receiving an input search word; A memory array including a plurality of NAND strings, each of the NAND strings is used to store a storage word, wherein each of the storage word and the input search word are each converted from a multi-bit binary data to a digital word string data, if the content of one of the multi-bit binary data is an exact value, then the number of flag bits of the digital string data is the exact value; and An output decoder is used to receive a plurality of comparison results from the NAND strings.
TW110127242A 2021-07-23 2021-07-23 Multilevel content addressable memory, multilevel coding method and multilevel searching method TWI766773B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW110127242A TWI766773B (en) 2021-07-23 2021-07-23 Multilevel content addressable memory, multilevel coding method and multilevel searching method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW110127242A TWI766773B (en) 2021-07-23 2021-07-23 Multilevel content addressable memory, multilevel coding method and multilevel searching method

Publications (2)

Publication Number Publication Date
TWI766773B TWI766773B (en) 2022-06-01
TW202305803A true TW202305803A (en) 2023-02-01

Family

ID=83103756

Family Applications (1)

Application Number Title Priority Date Filing Date
TW110127242A TWI766773B (en) 2021-07-23 2021-07-23 Multilevel content addressable memory, multilevel coding method and multilevel searching method

Country Status (1)

Country Link
TW (1) TWI766773B (en)

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6499081B1 (en) * 1999-02-23 2002-12-24 Netlogic Microsystems, Inc. Method and apparatus for determining a longest prefix match in a segmented content addressable memory device
US7606968B2 (en) * 2006-05-08 2009-10-20 Mcdata Corporation Multi-level content addressable memory
TW201021050A (en) * 2008-11-19 2010-06-01 Univ Nat Sun Yat Sen Content addressable memories and data searching and matching circuit for content addressable memories
US8934278B2 (en) * 2012-12-28 2015-01-13 Qualcomm Incorporated Hybrid ternary content addressable memory
CN111128278B (en) * 2018-10-30 2021-08-27 华为技术有限公司 Content addressable memory, data processing method and network equipment

Also Published As

Publication number Publication date
TWI766773B (en) 2022-06-01

Similar Documents

Publication Publication Date Title
JP5344324B2 (en) Data path, storage method and memory array usage for multi-level cell memory
US7904643B1 (en) Range code compression method and apparatus for ternary content addressable memory (CAM) devices
CN106326475B (en) Efficient static hash table implementation method and system
JP2007508653A (en) High-speed table lookup memory and low power consumption mechanism
US7579968B2 (en) Encoding of data words using three or more level levels
US20170123900A1 (en) Systems and Methods for Compaction Based Flash Memory Data Recovery
Gotlieb Optimal multi-way search trees
KR100272153B1 (en) 3 value memory system
CN115687177A (en) Multi-level content addressable memory, multi-level encoding method and multi-level search method
US7792812B1 (en) Search engine devices that support high speed parallel decoding of digital search tries
TW202305803A (en) Multilevel content addressable memory, multilevel coding method and multilevel searching method
US20180046689A1 (en) Data conversion device, search system, and method
US7152141B2 (en) Obtaining search results for content addressable memory
US20250022510A1 (en) Hybrid type content addressable memory for implementing in-memory-search and operation method thereof
JP4850403B2 (en) Magnitude contents referenceable memory
WO2024066561A1 (en) Apparatus and method for searching for free memory and chip
CN112699639B (en) Integer data storage method, device and storage medium
EP1162546B1 (en) In-place memory management for FFT
US7256715B1 (en) Data compression using dummy codes
JPH05174584A (en) Data storage
CN108055206A (en) Compact type hardware search engine and its data transfer device of tabling look-up
JPH10334697A (en) Semiconductor memory device and error correction method therefor
TWI806641B (en) Memory device and operating method thereof
TWI879549B (en) Memory device and operating method thereof
TWI807822B (en) Ternary content addressable memory