A ternary content-addressable memory and electronic device

By designing the control unit and switching unit, the comparison circuit configuration of each memory cell in the TCAM is reduced, solving the problems of large space occupation and high power consumption of the TCAM, and achieving lower process costs and longer service life.

CN113936710BActive Publication Date: 2026-01-09ZHEJIANG NANOMICRO TECH CO LTD +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111084396.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-15
Publication Date
2026-01-09
Estimated Expiration
2041-09-15

AI Technical Summary

Technical Problem

In TCAM, each memory cell is connected to a comparator circuit, resulting in a large space occupation, high process cost, high energy consumption, and a lot of heat generation, which affects the service life.

Method used

The design employs a structure consisting of a control unit, a switching unit, and a comparison unit. The control unit determines the target memory unit and establishes a query connection with it through the switching unit, reducing the need to configure comparison circuits for each memory unit and lowering space requirements and process costs.

Benefits of technology

It reduces the space occupation and process cost of TCAM, reduces energy consumption during operation, and extends service life.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113936710B_ABST
    Figure CN113936710B_ABST
Patent Text Reader

Abstract

The application provides a three-state content storage addressing device and electronic equipment, and relates to the technical field of computers. The device comprises a control unit, a switching unit, a comparison unit and at least two storage units. Each storage unit is connected with the switching unit, the comparison unit is connected with the switching unit, the control unit receives a query request, determines at least one target storage unit corresponding to the query request, and sends a connection signal to the switching unit. The switching unit can establish a query connection between the comparison unit and the target storage unit according to the connection signal. The storage unit can provide query data to the comparison unit based on the query connection. The comparison unit can query the query data to obtain a query result. Under the control of the control unit, the switching unit can selectively connect the comparison unit and the storage unit according to the query request. A comparison circuit does not need to be configured for each storage unit, the device has small space occupation and low process cost, and the working heat, energy consumption and service life are reduced.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data storage, in particular to a ternary content addressable memory and an electronic device. BACKGROUND

[0002] TCAM (ternary content addressable memory) is a kind of table item mainly used for fast lookup of ACL (Access Control List) and routing table. TCAM is developed from CAM (Content-Addressable Memory), in which the state of each bit has two states, i.e. "0" or "1". On this basis, the state of each bit in TCAM has three states, i.e. "0", "1" and "don't care", which is realized by a mask, so that TCAM can not only perform accurate matching lookup, but also perform fuzzy matching lookup.

[0003] Among them, the TCAM architecture usually includes a memory core, in which there are two or more cells, each of which includes two storage circuits and a comparison circuit, and each comparison circuit is connected to a storage unit through a fixed-length connection line.

[0004] As can be seen, since each storage unit is connected to a comparison circuit, the space occupied in the TCAM is large, the process cost is high, and the multiple comparison circuits cause more heat and high energy consumption during operation, thereby affecting the service life. SUMMARY

[0005] The present application provides a ternary content addressable memory and an electronic device, which aims to reduce the space ratio of the comparison circuit in the TCAM, thereby reducing the process cost of the ternary content addressable memory, reducing the energy consumption during operation, avoiding generating more heat, and prolonging the service life.

[0006] In a first aspect, an embodiment of the present application provides a ternary content addressable memory, which can include:

[0007] A control unit, a switching unit, a comparison unit, and at least two storage units, each of the storage units is connected to the switching unit, the comparison unit is connected to the switching unit, and the control unit is connected to the comparison unit and the switching unit.

[0008] The control unit is configured to receive a query request, determine at least one target storage unit according to the query request, and send a connection signal to the switching unit, the connection signal comprising information of the target storage unit;

[0009] The switching unit is configured to establish a query connection between the comparison unit and the target storage unit according to the connection signal.

[0010] The comparison unit is configured to query query data in the target storage unit through the query connection, and obtain a query result.

[0011] The storage unit is configured to provide the query data to the comparison unit through the query connection.

[0012] Optionally, the control unit comprises a data search module and a circuit control module.

[0013] The data search module is configured to receive a query request, and start a search task according to the query request, the search task corresponding to at least one target storage unit.

[0014] The circuit control module is configured to send the query request and a preparation signal to the comparison unit, and send a connection signal to the switching unit according to the target storage unit, the preparation signal being used to instruct the comparison unit to perform a self-check.

[0015] Optionally, the comparison unit comprises a comparison keyword register, an address decoder, a word line, a match line, a search line, a match line pre-charger and a search line pre-discharger, the word line being led out from the address decoder.

[0016] The comparison keyword register is configured to receive and store the query request.

[0017] The address decoder is configured to determine a level of the word line as low in a case where the preparation signal is received.

[0018] The match line pre-charger is configured to pre-charge the match line and set a level of the match line as high in a case where the preparation signal is received.

[0019] The search line pre-discharger is configured to pre-discharge the search line and set a level of the search line as low in a case where the preparation signal is received.

[0020] Optionally, the data search module is further configured to establish a priority queue of the search task, and execute the search task according to the priority queue.

[0021] Optionally, the data searching module is further configured to update the query data in the target storage unit according to the query result.

[0022] Optionally, the comparison units include at least two, and the control unit is further configured to determine the number of the comparison units in operation according to resource utilization, the resource utilization being a proportion of the comparison units in an idle state in all the comparison units;

[0023] The switching unit is specifically configured to establish the query connection between the comparison units in the number in operation and the target storage unit.

[0024] Optionally, the query request includes a query keyword, the comparison units include at least two comparison unit matrices, and the comparison unit matrices have at least two widths.

[0025] The comparison unit is specifically configured to determine at least one target comparison unit matrix according to a length of the query keyword and a width of the comparison unit matrix, and query the query data in the target storage unit based on the target comparison unit matrix to obtain a query result.

[0026] Optionally, the ternary content addressable memory addresser further includes a vertical metal connection line and a rewiring layer led out from the storage unit.

[0027] The rewiring layer is configured to rearrange the vertical metal connection line to connect the storage unit and the switching unit.

[0028] In a second aspect, an embodiment of the present application provides another ternary content addressable memory addresser, which includes a first substrate, a second substrate, a metal layer, a comparison unit, a storage unit, a switching unit and a control unit, wherein,

[0029] The first substrate and the second substrate are oppositely arranged.

[0030] The metal layer is arranged on a side of the first substrate close to the second substrate.

[0031] The comparison unit is arranged on the metal layer.

[0032] The storage unit is arranged on a side of the second substrate away from the first substrate.

[0033] The switching unit is arranged between the first substrate and the second substrate and is connected to the comparison unit and the storage unit through a through silicon via.

[0034] The control unit is connected to the switching unit and the comparison unit.

[0035] In a third aspect, the embodiments of the present application also provide a data query method, which can be implemented based on the ternary content addressable memory described in the first aspect. The ternary content addressable memory includes a control unit, a switching unit, a comparison unit, and at least two storage units. Each of the storage units is connected to the switching unit. The comparison unit is connected to the switching unit. The control unit is connected to the comparison unit and the switching unit. The method can include:

[0036] The control unit receives a query request and determines at least one target storage unit according to the query request;

[0037] The control unit sends a connection signal to the switching unit, and the connection signal includes information of the target storage unit;

[0038] The switching unit establishes a query connection between the comparison unit and the target storage unit according to the connection signal;

[0039] The storage unit provides the query data to the comparison unit through the query connection;

[0040] The comparison unit queries the query data in the target storage unit through the query connection and obtains a query result.

[0041] Optionally, the control unit includes a data search module and a circuit control module. The control unit receives a query request and determines at least one target storage unit according to the query request, and sends a connection signal to the switching unit. The connection signal includes information of the target storage unit, which includes:

[0042] The data search module receives a query request and starts a search task according to the query request. The search task corresponds to at least one target storage unit;

[0043] The circuit control module sends the query request and a preparation signal to the comparison unit, and sends a connection signal to the switching unit according to the target storage unit. The preparation signal is used to instruct the comparison unit to perform a state self-check.

[0044] Optionally, the comparison unit includes a comparison keyword register, an address decoder, a word line, a match line, a search line, a match line pre-charger, and a search line pre-discharger. The word line is led out from the address decoder. The state self-check includes at least one of the following:

[0045] The comparison keyword register receives and stores the query request;

[0046] The address decoder determines that the level of the word line is low when the preparation signal is received.

[0047] The match line pre-charger pre-charges the match line to a high level in response to the preparation signal.

[0048] The search line pre-discharger pre-discharges the search line to a low level in response to the preparation signal.

[0049] Optionally, the method further comprises:

[0050] The data search module establishes a priority queue of the search tasks, and executes the search tasks according to the priority queue.

[0051] Optionally, the method further comprises:

[0052] The data search module updates the query data in the target storage unit according to the query result.

[0053] Optionally, the comparison unit includes at least two, and the method further comprises:

[0054] The control unit determines the number of working comparison units according to resource utilization, the resource utilization being a proportion of the comparison units in an idle state in all the comparison units.

[0055] The switching unit establishes a query connection between the comparison units and the target storage unit according to the connection signal, specifically including:

[0056] The switching unit establishes the query connection between the comparison units and the target storage unit according to the connection signal.

[0057] Optionally, the query request includes a query keyword, the comparison unit includes at least two comparison unit matrices, and the comparison unit matrix has at least two widths.

[0058] The comparison unit queries the query data in the target storage unit through the query connection to obtain a query result, specifically including:

[0059] The comparison unit determines at least one target comparison unit matrix according to the length of the query keyword and the width of the comparison unit matrix, and queries the query data in the target storage unit through the query connection based on the target comparison unit matrix to obtain a query result.

[0060] In a fourth aspect, an electronic device is provided, and the device includes the tri-state content storage addresser of the first aspect.

[0061] In the embodiment of the present application, the tri-state content storage addressing device comprises a control unit, a switching unit, a comparison unit, and at least two storage units, wherein each storage unit is connected to the switching unit, the comparison unit is connected to the switching unit, the control unit can determine at least one target storage unit according to the query request after receiving the query request and send a connection signal to the switching unit, the switching unit can establish a query connection between the comparison unit and the target storage unit according to the connection signal, the storage unit can provide query data to the comparison unit based on the query connection, the comparison unit can query from the query data to obtain a query result, and the switching unit can selectively connect the comparison unit and the storage unit under the control of the control unit in the tri-state content storage addressing device. Therefore, it is not necessary to configure a corresponding comparison circuit for each storage unit, the space occupation in the tri-state content storage addressing device is saved, the process cost is low, the heat and energy consumption generated during work are reduced, and the service life is prolonged. BRIEF DESCRIPTION OF DRAWINGS

[0062] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the description of the embodiments of the present application will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0063] Figure 1 A structural block diagram of a tri-state content storage addressing device provided by the embodiment of the present application is shown;

[0064] Figure 2 A block diagram of a comparison unit provided by the embodiment of the present application is shown;

[0065] Figure 3 A structural schematic diagram of a tri-state content storage addressing device example provided by the embodiment of the present application is shown;

[0066] Figure 4 A structural schematic diagram of a comparison unit example provided by the embodiment of the present application is shown;

[0067] Figure 5 A structural schematic diagram of another tri-state content storage addressing device example provided by the embodiment of the present application is shown;

[0068] Figure 6 A step flowchart of a data query method provided by the embodiment of the present application is shown. DETAILED DESCRIPTION

[0069] With reference to the accompanying drawings, the technical solutions in the embodiments of the present application will be described clearly and completely. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all the other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of the present application.

[0070] Figure 1 A structural block diagram of a ternary content addressable memory provided by an embodiment of the present application is shown in FIG. 1. Referring to FIG. 1, Figure 1 the ternary content addressable memory 10 comprises:

[0071] a control unit 101, a switching unit 102, a comparison unit 103, and at least two storage units 104, each of the storage units 104 is connected with the switching unit 102, the comparison unit 103 is connected with the switching unit 102, and the control unit 101 is connected with the comparison unit 103 and the switching unit 102.

[0072] In an embodiment of the present application, a ternary content addressable memory 10 is provided, wherein a control unit 101 and a switching unit 102 are arranged, as shown in FIG. 1, Figure 1 the switching unit 102 is connected with the comparison unit 103 and the at least two storage units 104, respectively, to realize the control of the connection between the comparison unit 103 and the storage units 104, the control unit 101 is connected with the comparison unit 103 and the switching unit 102, respectively, to realize the control of the comparison unit 103 and the switching unit 102 by the control unit 101, and the storage units 104 store query data.

[0073] The control unit 101 is configured to receive a query request, determine at least one target storage unit 1041 according to the query request, and send a connection signal to the switching unit 102, wherein the connection signal comprises information of the target storage unit 1041.

[0074] In the embodiment of the present application, the query request is a request for querying the query data stored in the three-state content storage addresser based on the provided information, wherein the control unit 101 can obtain the query request from the front-end interactive interface, software module, etc., and the control unit 101 can determine the target storage unit 1041 in the storage unit 104 according to the query data requested in the query request, optionally, the control unit 101 can construct a corresponding search task according to the query request to search the query data stored in the TCAM, for example, the target storage unit 1041 to be queried can be determined in the storage unit 104 according to the query request, and whether to perform further analysis or retrieval on the query result, such as whether to re-analyze the query result of the query request to obtain keywords, and further expand the retrieval based on the keywords, so as to construct the search task.

[0075] In the embodiment of the present application, different storage units 104 can be identified by different information, and after the control unit 101 determines the target storage unit 1041, the control unit 101 can add the information corresponding to the target storage unit 1041 in the connection signal and send the connection signal to the exchange unit 102.

[0076] The exchange unit 102 is configured to establish a query connection between the comparison unit 103 and the target storage unit 1041 according to the connection signal.

[0077] In the embodiment of the present application, the query connection is a dynamic connection established in response to the query request, which can be established when the search task corresponding to the query request is executed, and released when the search task corresponding to the query request is completed. The exchange unit 102 is connected with the comparison unit 103 and the storage unit 104, and in the case of receiving the connection signal, the exchange unit 102 can establish a query connection between the comparison unit 103 and the target storage unit 1041 according to the information of the target storage unit 1041 in the connection signal, so as to execute the search task, and in the case of completing the search task, the exchange unit 102 can release the query connection.

[0078] The comparison unit 103 is configured to query the query data in the target storage unit 1041 through the query connection to obtain a query result.

[0079] In the embodiment of the present application, the comparison unit 103 can query the query data in the target storage unit 1041 according to the query request through the query connection to execute the search task and obtain the query result, wherein the comparison unit 103 can compare the keywords to perform the query and search.

[0080] The storage unit 104 is configured to provide the comparison unit with the query data through the query connection.

[0081] In the embodiment of the present application, the TCAM can include at least two storage units 104, the storage units 104 store query data, and after being connected to the comparison unit 103 through the query connection, the query data can be provided to the comparison unit 103 through the query connection for comparison by the comparison unit 103. Optionally, the storage unit 104 can be located on one or more stacked storage dies.

[0082] Optionally, the control unit 101 includes a data search module and a circuit control module.

[0083] In the embodiment of the present application, the control unit 101 can include search modules, circuit control modules and other functional modules. Those skilled in the art can also set other functional modules in the control unit 101 according to application requirements, and the embodiment of the present application does not make specific limitations.

[0084] The data search module is configured to receive a query request and start a search task according to the query request, and the search task corresponds to at least one target storage unit 1041.

[0085] In the embodiment of the present application, the data search module can receive a query request from a front-end user interaction interface, a software module and the like, and start a search task according to the query request. Optionally, the data search module can receive a query keyword input from the user interaction interface and generate a corresponding search strategy to start the search task. For example, the search strategy can include determining a corresponding target storage unit 104 in the storage unit 104, the processing mode of the query result is to return the query result or further analyze the query result, and when the number of comparison units 103 is greater than one, the comparison unit applied to the search task can also be determined.

[0086] Optionally, the data search module is further configured to establish a priority queue of the search task and execute the search task according to the priority queue.

[0087] In the embodiment of the present application, in order to avoid resource competition of the comparison unit 103 and improve resource utilization when there are many search tasks, the data search module can establish a search task priority queue. For example, the data search module can assign priorities to different search tasks, and establish at least one priority queue according to the number of priorities. Each priority queue uses a first-in-first-out method for task scheduling to ensure the orderly execution of the search task, avoid congestion caused by the competition of multiple search tasks for the same resource, or in the case of idle resources, the search task waits for execution, causing resource waste. The priority queue algorithm of the search task in the embodiment of the present application is not specifically limited.

[0088] Optionally, the data search module is further configured to update the query data in the target storage unit 1041 according to the query result.

[0089] In the embodiment of the present application, after obtaining the query result, the data search module can also update the query data in the target storage unit 1041 according to the query result, such as expanding, modifying the query data when the query result is less, or deleting, modifying the query data when the query result is wrong.

[0090] The circuit control module is configured to send the query request and a preparation signal to the comparison unit 103, and send a connection signal to the exchange unit 102 according to the target storage unit 1041, and the preparation signal is used to instruct the comparison unit 103 to perform a self-check.

[0091] In the embodiment of the present application, the control unit 101 can also include a circuit control module, which is used to control the state adjustment of the circuit in the TCAM for performing a search task, wherein the circuit control module can send a preparation signal to the comparison unit 103 performing the search task, so that the comparison unit 103 performs a self-check, and ensures the state of the comparison unit 103 to normally perform the operations of searching and matching; the circuit control module is also used to send a connection signal of the target storage unit 1041 to the exchange unit 102, so as to establish a query connection between the target storage unit 1041 and the comparison unit 103, and ensure that the comparison unit 103 compares in the query data stored in the target storage unit 1041.

[0092] Figure 2 A block diagram of a comparison unit provided by the embodiment of the present application is shown, as shown in Figure 2 Optionally, the comparison unit 103 corresponds to an address decoder 1031, a match line sense amplifier 1032, a priority logic encoder 1033, a search line 1034, a match line 1035, a bit line 1036, a result register 1037, a comparison key register 1038, a search line pre-discharge 1039, a search line pre-discharge 10310, and Figure 2 a word line not shown, wherein the word line is led out from the address decoder 1031, and the comparison unit 103 can receive a control signal.

[0093] The comparison key register 1038 is configured to receive and store the query request.

[0094] The address decoder 1031 is configured to determine that the level of the word line is low when the preparation signal is received.

[0095] The search line pre-discharge 10310 is configured to pre-charge the match line 1035 and set the level of the match line 1035 to high when the preparation signal is received.

[0096] The look-up line pre-discharger 1039 is configured to pre-discharge the look-up line 1034 and set the level of the look-up line 1034 to low when the preparation signal is received.

[0097] In the embodiment of the present application, the comparison unit 103 can store the received query request in the comparison key register 1038, wherein the query request can include a query key used for performing a search task, and the comparison unit 103 can also perform a self-check according to the received preparation signal. For example, when the address decoder 1031 receives the preparation signal, it can be determined whether the level of the leading word line is low, when the look-up line pre-discharger 10310 receives the preparation signal, the match line 1035 can be pre-charged to set the level to high, and when the look-up line pre-discharger 1039 receives the preparation signal, the look-up line 1034 can be pre-discharged to set the level to low, so as to avoid static current flowing through the comparison unit 103. The above-mentioned self-check operation is only used as an example, and the person skilled in the art can also add or delete according to the actual needs, and the embodiment of the present application does not make specific limitations thereto.

[0098] Optionally, the comparison unit 103 includes at least two, and the control unit 101 is further configured to determine the number of working comparison units 103 according to the resource utilization rate, wherein the resource utilization rate is the proportion of the comparison units 103 in an idle state in all the comparison units 103.

[0099] The exchange unit 102 is specifically configured to establish the query connection between the comparison unit 103 and the target storage unit 1041.

[0100] In the embodiment of the present application, the exchange unit 102 can dynamically establish the query connection between the comparison unit 103 and the target storage unit 1041 when performing data query, so it is not necessary to configure one comparison unit 103 for each storage unit 104, thereby reducing the space proportion of the comparison unit 103. However, in order to properly improve the query efficiency, at least two comparison units 103 can also be set, and the total number of the comparison units 103 is less than the number of the storage units 104, so as to reduce the space proportion thereof.

[0101] In the embodiment of the present application, when the number of comparison units 103 is at least two, the control unit 101 can determine the working number of the corresponding comparison unit 103 according to the resource utilization rate, wherein the resource utilization rate can be the proportion of the comparison unit 103 in an idle state in all comparison units 103, which is used to describe the comparison resource in the TCAM in an idle state. Moreover, the working number of the comparison unit 103 is less than or equal to the total number, and the total number of the comparison unit 103 can be different in different application scenarios, such as the total number of the comparison unit 103 can be A when applied to the network switching center device. On this basis, the control unit 101 can determine the working number of the comparison unit 103 according to the resource utilization rate, the working number can be increased when the resource utilization rate is high, and the upper limit of the increase of the working number is A, the working number can be reduced when the resource utilization rate is low, and the lower limit of the reduction of the working number is 1, that is, in the state that the network switching center does not work, there can be a process or program on duty, so as to occupy one comparison unit 103.

[0102] Optionally, the query request includes a query keyword, and the comparison unit 103 includes at least two comparison unit matrices, and the comparison unit matrix has at least two widths.

[0103] The comparison unit 103 is specifically configured to determine at least one target comparison unit matrix according to the length of the query keyword and the width of the comparison unit matrix, and query the query data in the target storage unit 1041 based on the target comparison unit matrix through a query connection to obtain a query result.

[0104] In the embodiment of the present application, the query request can include a query keyword, and the lengths of different query keywords can be different, wherein the comparison unit 103 can include at least two comparison unit matrices, and the comparison unit matrix has at least two widths, such as 80, 160, 320, 640, or 72, 144, 288, 576, etc. Since the comparison unit 103 can establish a query connection with more than one storage unit 104 through the exchange unit 102, the comparison unit 103 can compare query keywords of different lengths, such as the comparison unit 103 includes a comparison unit matrix with a width of 80 and a comparison unit matrix with a width of 160. According to the length of the query keyword, the comparison unit matrix with a width of 80 or the comparison unit matrix with a width of 160 can be determined as the target comparison unit matrix, or the comparison unit matrices with widths of 80 and 160 can be determined as the target comparison unit matrix, etc. At this time, the comparison unit 103 can compare query keywords of different lengths, avoiding the limitation that the comparison unit 103 can only compare keywords of the corresponding length of the storage unit 104 when the comparison unit 103 is connected with the storage unit 104 one by one, and expanding the query range of the comparison unit 103.

[0105] Optionally, the tri-state content storage addressing device further comprises vertical metal connection lines drawn from the storage units 104, a redistribution layer;

[0106] The redistribution layer is used to rearrange the vertical metal connection lines to connect the storage units 104 and the switching units 102.

[0107] In the embodiment of the present application, the interface part of the switching unit 102 and the storage unit 104 can comprise a redistribution layer which is not shown in the figure, wherein the storage unit 104 can be connected with the redistribution layer through the vertical metal connection lines and TSV (Through Silicon Via), and the redistribution layer is used to rearrange the vertical metal connection layer to convert the vertical metal connection lines drawn from the storage unit 104 into a layout suitable for the access requirement of the switching unit 102, thereby realizing the connection between the storage unit 104 and the switching unit 102.

[0108] In the embodiment of the present application, the tri-state content storage addressing device comprises a control unit, a switching unit, a comparison unit and at least two storage units, wherein each storage unit is connected with the switching unit, the comparison unit is connected with the switching unit, and the control unit can determine at least one target storage unit corresponding to the query request and send a connection signal to the switching unit after receiving the query request, and then the switching unit can establish a query connection between the comparison unit and the target storage unit according to the connection signal, the storage unit can provide query data to the comparison unit based on the query connection, the comparison unit can query from the query data to obtain a query result. Under the control of the control unit, the switching unit in the tri-state content storage addressing device can selectively connect the comparison unit and the storage unit according to the query request, so that it is not necessary to configure a corresponding comparison circuit for each storage unit, thereby saving the space occupation in the tri-state content storage addressing device, reducing the process cost, reducing the heat and energy consumption generated during work, and prolonging the service life.

[0109] Figure 3 A structure diagram of an example of a tri-state content storage addressing device 20 is shown, which comprises a first substrate 201, a second substrate 202, a metal layer 203, a comparison unit 204, a storage unit 205, a switching unit 206 and a control unit 207; wherein,

[0110] The first substrate 201 and the second substrate 202 are oppositely arranged;

[0111] The metal layer 203 is arranged on the side of the first substrate 201 close to the second substrate 202;

[0112] The comparison unit 204 is arranged on the metal layer 203;

[0113] The storage unit 205 is arranged on the side of the second substrate 202 away from the first substrate 201;

[0114] The exchange unit 206 is arranged between the first substrate 201 and the second substrate 202, and is connected with the comparison unit 204 and the storage unit 205 through the silicon through hole 208;

[0115] The control unit 207 is connected with the exchange unit 206 and the comparison unit 204.

[0116] In the embodiment of the present application, a structural diagram of the ternary content addressable memory 20 is further provided, which comprises the first substrate 201 and the second substrate 202 arranged oppositely, wherein the two sides close to the first substrate 201 and the second substrate 202 are the inner sides, and the two sides away from the first substrate 201 and the second substrate 202 are the outer sides, the metal layer 203 and the comparison unit 204 are arranged in sequence on the inner side of the first substrate 201, the storage unit 205 is arranged on the outer side of the second substrate 202, the exchange unit 206 is arranged between the first substrate 201 and the second substrate 202, and the exchange unit 206 is connected with the storage unit 205 and the comparison unit 204 through the silicon through hole 208. In addition, the control unit 207 is further included, which is connected with the exchange unit 206 and the comparison unit 204. The comparison unit 204, the storage unit 205, the exchange unit 206 and the control unit 207 can be correspondingly referred to the above descriptions. Figures 1 to 2

[0117] Figure 4 A structural diagram of an example of the comparison unit 30 provided by the embodiment of the present application is shown, which comprises a plurality of comparison units 301 as shown in Figure 4 The comparison unit 301 is connected with the comparison key register 302 through the search line 304 and the search line 304', the match line 303 passes through the comparison unit 301 and is connected with the sense amplifier 305, and is connected with the interface of the exchange unit through the silicon through hole 306, wherein the comparison key register 302 is used for storing the query key to be compared, the comparison unit 301 is connected with the exchange unit through the silicon through hole 306, so that the exchange unit can be connected with more than one storage unit, and the query key is searched and matched, so as to realize data query.

[0118] Figure 5 A structural diagram of another example of the ternary content addressable memory 40 provided by the embodiment of the present application is shown, which comprises a plurality of comparison units 401 as shown in Figure 5 ​As shown, the controller (not shown) includes a storage unit 401, a switching unit 402, a comparison unit 403, a matching line inductive amplifier 404, and an output data memory 405. The storage unit 401, switching unit 402, and comparison unit 403 are as described above. Figures 1 to 2 According to the relevant description, the matching induction amplifier 404 is used to sense and amplify the matching line data, and the output data memory 405 is used to store the query results to be output.

[0119] In this embodiment of the invention, the tri-state content storage addresser includes a control unit, a switching unit, a comparison unit, and at least two storage units. Each storage unit is connected to the switching unit, and the comparison unit is also connected to the switching unit. After receiving a query request, the control unit can determine at least one target storage unit based on the query request and send a connection signal to the switching unit. The switching unit can then establish a query connection between the comparison unit and the target storage unit based on the connection signal. Based on this query connection, the storage unit can provide query data to the comparison unit, which can then query the query data to obtain the query result. Under the control of the control unit, the switching unit can selectively connect the comparison unit and the storage unit based on the query request. Therefore, it is not necessary to configure a corresponding comparison circuit for each storage unit, which saves space in the tri-state content storage addresser, reduces manufacturing costs, and also reduces heat and energy consumption during operation, extending its service life.

[0120] Figure 6 The following is a flowchart illustrating the steps of a data query method provided by an embodiment of the present invention, as shown below. Figure 6 As shown, this method can be based on Figures 1 to 5 Any implementation of a three-state content storage addresser, wherein the three-state content storage addresser includes a control unit, a switching unit, a comparison unit, and at least two storage units, each of the storage units being connected to the switching unit, the comparison unit being connected to the switching unit, and the control unit being connected to both the comparison unit and the switching unit, the method may include:

[0121] Step 501: The control unit receives a query request and determines at least one target storage unit based on the query request;

[0122] Step 502: The control unit sends a connection signal to the switching unit, the connection signal including information about the target storage unit;

[0123] Step 503: The switching unit establishes a query connection between the comparison unit and the target storage unit according to the connection signal;

[0124] Step 504, the storage unit provides the query data to the comparison unit through the query connection;

[0125] Step 505, the comparison unit queries the query data in the target storage unit through the query connection, and obtains a query result.

[0126] In the embodiment of the application, the search task can be determined to be completed when the comparison unit successfully obtains the query result, and the steps 502-505 are circularly executed until the query result is obtained to end the search task when the comparison unit fails to obtain the query result.

[0127] Optionally, the control unit comprises a data search module and a circuit control module, the control unit receives a query request, determines at least one target storage unit according to the query request, and sends a connection signal to the exchange unit, the connection signal comprising information of the target storage unit, comprising:

[0128] The data search module receives a query request and starts a search task according to the query request, the search task corresponding to at least one target storage unit;

[0129] The circuit control module sends the query request and a preparation signal to the comparison unit, and sends a connection signal to the exchange unit according to the target storage unit, the preparation signal being used to instruct the comparison unit to perform a state self-check.

[0130] Optionally, the comparison unit comprises a comparison keyword register, an address decoder, a word line, a matching line, a lookup line, a matching line pre-charger and a lookup line pre-discharger, the word line being led out from the address decoder, and the state self-check comprising at least one of the following:

[0131] The comparison keyword register receives and stores the query request;

[0132] The address decoder determines the level of the word line to be low when the preparation signal is received;

[0133] The matching line pre-charger pre-charges the matching line to high when the preparation signal is received;

[0134] The lookup line pre-discharger pre-discharges the lookup line to low when the preparation signal is received.

[0135] Optionally, the method further comprises:

[0136] The data search module establishes a priority queue of the search task, and executes the search task according to the priority queue.

[0137] Optionally, the method further comprises:

[0138] The data searching module updates the query data in the target storage unit according to the query result.

[0139] Optionally, the comparison unit includes at least two, and the method further comprises:

[0140] The control unit determines the number of working comparison units according to resource utilization, and the resource utilization is the proportion of the comparison units in an idle state in all the comparison units.

[0141] The step 503 specifically comprises:

[0142] The switching unit establishes the query connection between the comparison units in the number of working comparison units and the target storage unit according to the connection signal.

[0143] Optionally, the query request includes a query keyword, the comparison unit includes at least two comparison unit matrices, and the comparison unit matrix has at least two widths.

[0144] The step 505 specifically comprises:

[0145] The comparison unit determines at least one target comparison unit matrix according to the length of the query keyword and the width of the comparison unit matrix, and queries the query data in the target storage unit based on the target comparison unit matrix through the query connection to obtain a query result.

[0146] In the embodiment of the application, the ternary content addressable memory includes a control unit, a switching unit, a comparison unit, and at least two storage units, wherein each storage unit is connected with the switching unit, the comparison unit is connected with the switching unit, the control unit can determine at least one target storage unit corresponding to a query request and send a connection signal to the switching unit after receiving the query request, and the switching unit can establish a query connection between the comparison unit and the target storage unit according to the connection signal. The storage unit can provide query data to the comparison unit based on the query connection, the comparison unit can query from the query data to obtain a query result. Under the control of the control unit, the switching unit can selectively connect the comparison unit and the storage unit according to the query request in the ternary content addressable memory. Therefore, it is not necessary to configure a corresponding comparison circuit for each storage unit, which saves the space occupation in the ternary content addressable memory, reduces the process cost, reduces the heat and energy consumption generated during work, and prolongs the service life.

[0147] The embodiment of the present application further provides a device, characterized in that the device comprises an interface, a bus, a memory and a processor, the interface, the memory and the processor are connected through the bus, the memory is used for storing an executable program, and the processor is configured to run the executable program to realize the steps of the data query method. Figure 6 The steps of the data query method.

[0148] The embodiment of the present application further provides a computer storage medium, characterized in that the computer readable storage medium stores an executable program, and the executable program is run by a processor to realize the steps of the data query method. Figure 6 The steps of the data query method.

[0149] It should be noted that, for the method embodiment, in order to simply describe, all are expressed as a series of action combinations, but the person skilled in the art should know that the embodiment of the present application is not limited by the action order described, because according to the embodiment of the present application, certain steps can be adopted in other order or simultaneously. Secondly, the person skilled in the art should know that the embodiments described in the specification all belong to preferred embodiments, and the actions involved are not necessarily the necessary of the embodiment of the present application.

[0150] It should be noted that, in this paper, the term "including", "containing" or any other variant thereof is intended to cover non-exclusive containing, so that the process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or includes the elements inherent to such process, method, article or device. Without more limitations, the element defined by the statement "including a" does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0151] The embodiments of the present application are described above in combination with the drawings, but the present application is not limited to the above specific embodiments, and the above specific embodiments are only illustrative, not restrictive, and the person skilled in the art can make many forms under the inspiration of the present application without departing from the purpose of the present application and the scope protected by the claims, which all belong to the protection of the present application.

Claims

1. A three-state content storage addresser, characterized in that, The tri-state content storage addressing device comprises a control unit, a switching unit, a comparison unit, and at least two storage units, each of the storage units is connected with the switching unit, the comparison unit is connected with the switching unit, the control unit is connected with the comparison unit and the switching unit, and the storage units are located on one or more stacked storage dies; The control unit is configured to receive a query request, determine at least one target storage unit according to the query request, and send a connection signal to the switching unit, and the control unit is configured to construct a corresponding search task according to the query request; The query request is obtained by the control unit from a front-end interactive interface or a software module, and the connection signal comprises information of the target storage unit; The switching unit is configured to establish a query connection between the comparison unit and the target storage unit according to the connection signal, and the switching unit is configured to dynamically switch the query connection between the comparison unit and the storage units based on the query request; The query connection is a dynamic connection established in response to the query request; The comparison unit is configured to query query data in the target storage unit through the query connection, and obtain a query result; The storage unit is configured to provide the query data to the comparison unit through the query connection.

2. The tri-state content storage addresser of claim 1, wherein, The control unit comprises a data search module and a circuit control module; The data search module is configured to receive a query request, and start a search task according to the query request, the search task corresponding to at least one target storage unit; The circuit control module is configured to send the query request and a preparation signal to the comparison unit, and send a connection signal to the switching unit according to the target storage unit, and the preparation signal is used to instruct the comparison unit to perform a state self-check.

3. The tri-state content storage addresser of claim 2, wherein, The comparison unit comprises a comparison keyword register, an address decoder, a word line, a matching line, a lookup line, a matching line pre-charger, and a lookup line pre-discharger, and the word line is led out from the address decoder; The comparison keyword register is configured to receive and store the query request; The address decoder is configured to determine that the level of the word line is low when the preparation signal is received; The matching line pre-charger is configured to pre-charge the matching line and set the level of the matching line to high when the preparation signal is received; The lookup line pre-discharger is configured to pre-discharge the lookup line and set the level of the lookup line to low when the preparation signal is received.

4. The tri-state content storage addresser of claim 2, wherein, The data search module is further configured to establish a priority queue of the search task, and execute the search task according to the priority queue.

5. The tri-state content storage addresser of claim 2, wherein, The data search module is further configured to update the query data in the target storage unit according to the query result.

6. The tri-state content storage addresser of claim 1, wherein, The comparison unit comprises at least two, and the control unit is further configured to determine the number of working comparison units according to resource utilization, and the resource utilization is a proportion of the comparison units in an idle state in all the comparison units. The exchange unit is specifically configured to establish the query connection between the comparison unit of the working quantity and the target storage unit.

7. The tri-state content storage addresser of claim 1, wherein, The query request includes a query keyword, and the comparison unit includes at least two comparison unit matrices, and the comparison unit matrix has at least two widths. The comparison unit is specifically configured to determine at least one target comparison unit matrix according to the length of the query keyword and the width of the comparison unit matrix, and query the query data in the target storage unit based on the target comparison unit matrix through the query connection to obtain a query result.

8. The tri-state content storage addresser of claim 1, wherein, The ternary content addressable memory further includes vertical metal connection lines leading out of the storage units, and a rewiring layer; The rewiring layer is configured to re-arrange the vertical metal connection lines to connect the storage units and the exchange unit.

9. A tri-state content-addressable memory, characterized by The ternary content addressable memory includes a first substrate, a second substrate, a metal layer, a comparison unit, a storage unit, an exchange unit, and a control unit, and the storage unit is located on one or more stacked storage dies; wherein, The first substrate and the second substrate are oppositely arranged; The metal layer is arranged on a side of the first substrate close to the second substrate; The comparison unit is arranged on the metal layer; The storage unit is arranged on a side of the second substrate away from the first substrate; The exchange unit is arranged between the first substrate and the second substrate, and is connected to the comparison unit and the storage unit through a through silicon via; The control unit is connected to the exchange unit and the comparison unit, and is configured to construct a corresponding search task according to a query request, the query request is obtained from a front-end interactive interface or a software module based on the control unit, the exchange unit dynamically switches a query connection between the comparison unit and the storage unit based on the query request, and the query connection is a dynamic connection established in response to the query request.

10. An electronic device, comprising: The electronic device includes the ternary content addressable memory of any one of claims 1-8. The electronic device includes the ternary content addressable memory of any one of claims 1-8.

Citation Information

Patent Citations

  • Method for quickly searching keywords and reading lists by using ternary content addressable memory (TCAM)

    CN102402611A

  • Semiconductor device, semiconductor device assembly, and computing device

    CN113053437A

  • Content-addressable storage apparatus and method, and related device

    WO2020237682A1