Search Memory
By designing the input control section and search unit in the search memory, and using selectors and priority encoders to distribute search data, the problem of increased chip area and current consumption when multiple search keywords are executed in parallel is solved, and a more efficient Search efficiency and low power consumption.
Patent Information
- Application Number
- CN201811615859.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2017-12-27
- Filing Date
- 2018-12-27
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2038-12-27
AI Technical Summary
When executing the search process in parallel using multiple search keywords, the chip area and current consumption of existing TCAM devices increase, resulting in low efficiency.
A search memory is designed, which uses selectors and priority encoders to allocate search data to search blocks by inputting control sections and multiple search units, reducing data bus width and power consumption, and using specific allocation rules to store and update Entry data, optimized use of search blocks.
It effectively suppresses the increase in chip area and current consumption, improves search efficiency, reduces the width of the data bus, thereby reducing power consumption.
Smart Images

Figure CN110047539B_ABST
Abstract
Description
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] The disclosure of Japanese Patent Application No. 2017-251714 filed on December 27, 2017 including the specification, drawings and abstract is incorporated herein by reference in its entirety. Technical Field
[0003] The present disclosure relates to a semiconductor device. For example, the present disclosure relates to a search memory. Background Art
[0004] A memory device called a search memory or CAM (content addressable memory) searches the stored data words for a data word that matches the search word. When a matching data word is found, such a memory device outputs its address.
[0005] There are two types of CAM, namely BCAM (Binary CAM) and TCAM (Ternary CAM). Each memory cell in BCAM stores "0" or "1" as information. Meanwhile, each memory cell of TCAM can store "Don't Care" as information in addition to "0" and "1". In this example, the symbol "*" is used to represent "Don't Care". The symbol "*" indicates that the information can be either "0" or "1".
[0006] In network routers such as the Internet, TCAM devices are widely used to perform address searches and provide access control. In order to provide large capacity, TCAM devices generally include multiple arrays and perform search operations on the included arrays simultaneously.
[0007] The TCAM device is able to compare the input search data (input packet) with the TCAM cell data simultaneously. Therefore, the TCAM device is faster than RAM (Random Access Memory) in all search applications.
[0008] More specifically, the TCAM device includes a match line (ML) for comparing data that a user wants to search and data stored in a memory cell and showing whether the data match each other.
[0009] The TCAM device is configured so as to output address information (hit index) associated with the matched match line.
[0010] In recent years, the number of CAM arrays has increased to expand the capacity of the CAM.
[0011] Furthermore, a method of performing a search process in parallel by using a plurality of search keywords is proposed (US Pat. No. 6,374,326 and US Pat. No. 9,159,420). Summary of the invention
[0012] Meanwhile, in order to perform the search process in parallel by using a plurality of search keywords, all the search keywords need to be sent to the CAM array.
[0013] Therefore, the width of the data bus may be increased to expand the chip area and current consumption.
[0014] The present disclosure has been made to solve the above problems, and provides a search memory capable of suppressing an increase in chip area and an increase in current consumption.
[0015] Other problems and novel features will be apparent from the following description and accompanying drawings.
[0016] According to one aspect of the present disclosure, a search memory is provided, which performs a search to determine whether input search data matches entry data stored in a memory cell array, and outputs address information associated with the matched entry data. The search memory includes an input control section, N search units, and N first selectors. The input control section receives input of N (N: two or more) search data input in parallel. The first selectors are respectively set in association with the N search units so as to select two search data from the N search data. Each search unit includes a plurality of search blocks and M second selectors. The second selectors are respectively set in association with the search blocks so as to select one of the two search data selected by the first selector set for the associated search unit. For at least one of the N search units, allocation is performed so that two types of entry data of N types respectively associated with the N search data are respectively stored in the search blocks.
[0017] A search memory according to an embodiment of the present disclosure can suppress an increase in chip area and an increase in current consumption. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 is a diagram illustrating a configuration of a communication device 1 according to a first embodiment of the present disclosure;
[0019] Figure 2 is a circuit diagram illustrating an exemplary configuration of a TCAM cell;
[0020] Figure 3 is a diagram illustrating, in tabular form, the association between the contents stored in the X cell and the Y cell and the TCAM data;
[0021] Figure 4 is a diagram illustrating a configuration of a search block included in a search memory according to the first embodiment;
[0022] Figure 5is a diagram illustrating a configuration of a search unit included in a search memory according to the first embodiment;
[0023] Fig. 6A and Figure 6B is a diagram illustrating the configuration of the selector 203-0 according to the first embodiment;
[0024] Fig. 7A and Figure 7B is a diagram illustrating the configuration of the selector SL-0 according to the first embodiment;
[0025] Fig. 8A and Figure 8B is a diagram illustrating a configuration of a medium priority encoder according to the first embodiment;
[0026] Fig. 9A and Fig. 9B is a diagram illustrating a configuration of a priority encoder according to the first embodiment;
[0027] Fig. 10A and Fig. 10B is a diagram illustrating the assignment of entry data to search blocks;
[0028] Fig.11A and Fig. 11B is a conceptual diagram illustrating a search block storing entry data associated with an input search data keyword according to the first embodiment;
[0029] Fig.12 is a flowchart illustrating an allocation method for search blocks according to the first embodiment;
[0030] Fig.13 The diagram is assigned to Fig. 10B A diagram of a selection signal of a search unit depicted in FIG.
[0031] Fig.14 is a diagram illustrating an update of data in a search memory;
[0032] Fig.15 is a diagram illustrating a configuration of a search memory 8# according to a second embodiment of the present disclosure;
[0033] Fig.16 is a diagram illustrating a configuration of a search unit according to a second embodiment;
[0034] Fig.17 is a diagram illustrating the relationship between a physical block address and a logical block address according to the second embodiment;
[0035] Fig.18 is another diagram illustrating the relationship between the physical block address and the logical block address according to the second embodiment;
[0036] Fig.19 is a diagram illustrating update of data in a search memory according to a second embodiment;
[0037] Fig. 20 is a diagram illustrating a write control section included in a control section according to a second embodiment; and
[0038] Fig.21 is a diagram illustrating a configuration of a write control section according to a modification of the second embodiment. DETAILED DESCRIPTION
[0039] The embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. The same or similar elements in the drawings are designated by the same reference numerals and will not be described repeatedly.
[0040] First embodiment
[0041] <Overall Configuration of Communication Device 1>
[0042] Figure 1 is a diagram illustrating the configuration of a communication device 1 according to the first embodiment of the present disclosure.
[0043] like Figure 1 As shown, the communication device 1 is a communication apparatus such as a switch or a router.
[0044] The communication device 1 includes a CPU (Central Processing Unit) 2 , a transmission control circuit 4 , a general-purpose memory 6 , and a search memory 8 .
[0045] The CPU 2 provides overall control of the communication device 1 .
[0046] The CPU 2 realizes various functions in cooperation with programs stored in the general-purpose memory 6. For example, the general-purpose memory 6 may be formed of a DRAM (Dynamic Random Access Memory), and establishes an operating system (OS) in cooperation with the CPU 2. The CPU 2 exchanges information with, for example, a neighboring communication device, and performs maintenance of information required for a transmission process.
[0047] The transmission control circuit 4 performs a transmission process of a communication packet. The transmission control circuit 4 includes dedicated hardware dedicated to the transmission process, such as an ASIC (Application Specific Integrated Circuit) or an NPU (Network Processing Unit). The transmission control circuit 4 accesses the search memory 8 to obtain information required for the transmission process.
[0048] In this example, the search memory 8 will be described in conjunction with the case where a TCAM device is used.
[0049] [Configuration of TCAM cells]
[0050] Figure 2is a circuit diagram illustrating an exemplary configuration of a TCAM cell.
[0051] Reference Figure 2 , the TCAM cell (also referred to as a memory cell MC) includes two SRAM cells (static random access memory cells) 11 and 14 and a data comparison section 13. The SRAM cell 11 is also referred to as an X cell, and the SRAM cell 14 is also referred to as a Y cell. The X cell 11 stores 1-bit data complementary to each other with the internal storage node pair ND1, ND1_n (when one is "1", the other is "0"). The Y cell 14 stores 1-bit data complementary to each other with the internal storage node pair ND2, ND2_n. The TCAM cell is also referred to as a search memory cell.
[0052] The TCAM cell is coupled to the bit line pair BL, / BL, the search line pair SL, / SL, the match line pair ML and the word lines WLX, WLY. Figure 4 The search line pair (SL, / SL) extends in the column direction (Y direction) of the TCAM cell array 20 depicted in FIG. 1 and is shared by a plurality of TCAM cells arranged in the column direction. The search line pair (SL, / SL) extends in the column direction (Y direction) of the TCAM cell array 20 and is shared by the TCAM cells arranged in the column direction.
[0053] The match line ML extends in the row direction (X direction) of the TCAM cell array 20 and is shared by the TCAM cells arranged in the row direction. The word lines WLX and WLY extend in the row direction (X direction) of the TCAM cell array 20 and are shared by the TCAM cells arranged in the row direction.
[0054] The X unit 11 includes inverters INV1, INV2 and N-channel MOS (metal oxide semiconductor) transistors Q1, Q2. The inverter INV1 is coupled between the storage node ND1 and the storage node ND1_n so that the direction from the storage node ND1_n to the storage node ND1 is the forward direction. The inverter INV2 is coupled in parallel with the inverter INV1 and is oriented in the opposite direction to the inverter INV1. The MOS transistor Q1 is coupled between the storage node ND1 and the bit line BL. The MOS transistor Q2 is coupled between the storage node ND1_n and the bit line / BL. The gates of the MOS transistors Q1, Q2 are coupled to the word line WLX.
[0055] Y unit 14 includes inverters INV3, INV4 and MOS (metal oxide semiconductor) transistors Q3, Q4. Inverter INV3 is coupled between storage node ND2 and storage node ND2_n, so that the direction from storage node ND2_n to storage node ND2 is the forward direction. Inverter INV4 is coupled in parallel with inverter INV3 and oriented in the direction opposite to inverter INV3. MOS transistor Q3 is coupled between storage node ND2 and bit line BL. MOS transistor Q4 is coupled between storage node ND2_n and bit line / BL. The gates of MOS transistors Q3, Q4 are coupled to word line WLY.
[0056] The data comparison section 13 includes N-channel MOS transistors Q6-Q9. MOS transistors Q6, Q7 are coupled in series between node ND3 and ground node GND. Node ND3 is a point coupled to the match line ML. MOS transistors Q8, Q9 are coupled in series between node ND3 and ground node GND, and are coupled in parallel to both MOS transistors Q6, Q7 coupled in series. The gates of MOS transistors Q6, Q8 are coupled to storage nodes ND1, ND2, respectively. The gates of MOS transistors Q7, Q9 are coupled to search lines SL, / SL, respectively.
[0057] Figure 3 It is shown in tabular form. Figure 2 Schematic diagram of the association between the contents stored in the X-cell and Y-cell and the TCAM data depicted in FIG.
[0058] Reference Figure 2 and Figure 3 , the TCAM cell is capable of storing three values, namely, "0", "1", and "*" (don't care) by using a 2-bit SRAM cell. More specifically, when "1" is stored in the storage node ND1 of the X cell 11 and "0" is stored in the storage node ND2 of the Y cell 14, it is assumed that "0" is stored in the TCAM cell. When "0" is stored in the storage node ND1 of the X cell 11 and "1" is stored in the storage node ND2 of the Y cell 14, it is assumed that "1" is stored in the TCAM cell. When "0" is stored in the storage node ND1 of the X cell 11 and "0" is stored in the storage node ND2 of the Y cell 14, it is assumed that "*" (don't care) is stored in the TCAM cell. When "1" is stored in the storage node ND1 of the X cell 11 and "1" is stored in the storage node ND2 of the Y cell 14, the data in the TCAM cell is not used.
[0059] According to the configuration of the TCAM cell described above, when the search data is "1" (i.e., the search line SL is "1" and the search line / SL is "0") and the TCAM data is "0" (the storage node ND1 is "1" and the storage node ND2 is "0"), MOS transistors Q6, Q7 are turned on. Therefore, the potential of the precharged match line ML is pulled down to the ground potential. When the search data is "0" (i.e., the search line SL is "0" and the search line / SL is "1") and the TCAM data is "1" (the storage node ND1 is "0" and the storage node ND2 is "1"), MOS transistors Q8, Q9 are turned on. Therefore, the potential of the precharged match line ML is pulled down to the ground potential. That is, when the search data and the TCAM data do not match, the potential of the match line ML is pulled down to the ground potential.
[0060] On the contrary, when the input search data is "1" and the TCAM data is "1" or "*", or when the search data is "0" and the TCAM data is "0" or "*" (i.e., when the search data and the TCAM data match each other), the potential of the pre-charged match line ML (the power supply voltage VDD level) is maintained.
[0061] As described above, TCAM causes the potential stored in the match line ML to be pulled low unless data in all TCAM cells coupled to the match line ML associated with one entry (row) matches input search data. Therefore, TCAM performs high-speed search but consumes a large amount of current.
[0062] Figure 4 is a diagram illustrating a configuration of a search block 200 included in the search memory 8 according to the first embodiment.
[0063] like Figure 4 As shown in , the search block 200 includes a TCAM cell array 20 (also simply referred to as a cell array), a write driver 21, a search line driver 22, a matching amplifier section 23, a control logic circuit 24, and a readout circuit 25.
[0064] Although not depicted, the search block 200 includes a word line driver (not shown) and an input / output circuit (not shown). The word line driver drives the word lines WLX, WLY. The input / output circuit receives, for example, input control signals and address signals.
[0065] The TCAM cell array 20 includes TCAM cells arranged in a matrix form (j rows, k columns). In this example, the cell array 20 is depicted such that the number of rows (number of entries) j is L and the number of columns (number of bits) k is 40. Note that the cell array 20 includes at least one redundant memory cell column.
[0066] In association with the columns of the cell array 20, k (k=40) bit line pairs (BL0 and / BL0 to BL(k-1) and / BL(k-1)) and k (k=40) search line pairs (SL0 and / SL0 to SL(k-1) and / SL(k-1)) are provided.
[0067] In association with the rows of the cell array 20, m (m=N) match lines (ML0 to ML(N-1)), m X cell word lines (WLX0 to WLX(N-1)) (not shown), and m Y cell word lines (WLY0 to WLY(N-1)) (not shown) are provided.
[0068] During a write operation, the write driver 21 provides write data to each TCAM cell through the bit line pair BL, / BL. During a search operation, the search line driver 22 provides search data to each TCAM cell through the search line pair SL, / SL.
[0069] The control logic circuit 24 controls the overall operation of the search block 200. During the search operation, the control logic circuit 24 receives a search command and outputs a control signal to the search line driver 22 and the match amplifier section 23 so as to control the operation of the search line driver 22, the match amplifier section 23, and the precharge circuit. During the read operation, the control logic circuit 24 receives a read command and outputs a control signal for controlling the read circuit 25. Thus, the entry data stored in the cell array 20 can be read and output.
[0070] The match amplifier section 23 includes a plurality of match amplifiers MA associated with rows of the cell array. During a search operation, the match amplifiers MA detect whether an associated portion of input search data matches the associated TCAM cell data based on the potential of the associated match line ML. In the present embodiment, the match amplifiers MA each include a precharge circuit for precharging the associated match line ML during the search operation.
[0071] Figure 5 is a diagram illustrating the configuration of a plurality of search units included in the search memory 8 according to the first embodiment.
[0072] refer to Figure 5 , search units 102 - 0 to 102 - 3 (hereinafter also generally referred to as search units 102 ), a control section 101 , and a global priority encoder (GPE) 301 are set.
[0073] The control section 101 receives input of a plurality of input search data keys 0 to 3 (hereinafter also generally referred to as input search data keys) in parallel.
[0074] The control section 101 outputs input search data keywords 0 to 3 to the search unit 102, respectively.
[0075] The control section 101 outputs selection signals SELP and SELQ to each search unit 102 .
[0076] The search units each include a plurality of search blocks 200 .
[0077] The search unit 102-0 includes search blocks 200-0 to 200-3 (also generally referred to as search blocks 200), a selector 203-0, a medium priority encoder (MPE) 300-0, and selectors SL0-SL3 (also generally referred to as selectors SL).
[0078] The selectors SL0-SL3 are provided in association with the search blocks 200-0 to 200-3, respectively.
[0079] The selector 203 - 0 receives input of input search data keywords 0 to 3 and outputs two input search data keywords to each selector SL according to input of selection signals SELQ0 , SELQ1 .
[0080] The selectors SL0-SL3 receive inputs of two input search data keywords and output any one of the two input search data keywords to the associated search block 200 according to inputs of selection signals SELP0-SELP3.
[0081] The associated search block 200 performs a search operation on the input search data keyword input from the selector SL.
[0082] The associated search block 200 outputs address information (hit index) associated with the matched match line to a medium priority encoder (MPE) 300 - 0 .
[0083] The medium priority encoder 300 - 0 receives the address information (hit index) output from the search blocks 200 - 0 to 200 - 3 , and outputs high priority address information to the global priority encoder (GPE) 301 .
[0084] The search unit 102-1 includes search blocks 200-4 to 200-7, a selector 203-1, a medium priority encoder (MPE) 300-1, and selectors SL4-SL7.
[0085] Selectors SL4 to SL7 are provided in association with the search blocks 200 - 4 to 200 - 7 , respectively.
[0086] The selector 203 - 1 receives input of input search data keywords 0 to 3 and outputs two input search data keywords to each selector SL according to input of selection signals SELQ2 , SELQ3 .
[0087] The selectors SL4-SL7 receive inputs of two input search data keywords and output any one of the two input search data keywords to the associated search block 200 according to inputs of selection signals SELP4-SELP7.
[0088] The associated search block 200 performs a search operation on the input search data keyword input from the selector SL.
[0089] The associated search block 200 outputs address information (hit index) associated with the matched match line to a medium priority encoder (MPE) 300 - 1 .
[0090] The medium priority encoder 300 - 1 receives the address information (hit index) output from the search blocks 200 - 4 to 200 - 7 , and outputs high priority address information to the global priority encoder (GPE) 301 .
[0091] The search unit 102-2 includes search blocks 200-8 to 200-11, a selector 203-2, a medium priority encoder (MPE) 300-2, and selectors SL8-SL11.
[0092] The selectors SL8 - SL11 are provided in association with the search blocks 200 - 8 to 200 - 11 , respectively.
[0093] The selector 203 - 2 receives input of input search data keywords 0 to 3 and outputs two input search data keywords to each selector SL according to input of selection signals SELQ4 , SELQ5 .
[0094] The selectors SL8-SL11 receive inputs of two input search data keywords and output any one of the two input search data keywords to the associated search block 200 according to inputs of selection signals SELP8-SELP11.
[0095] The associated search block 200 performs a search operation on the input search data keyword input from the selector SL.
[0096] The associated search block 200 outputs address information (hit index) associated with the matched match line to a medium priority encoder (MPE) 300 - 2 .
[0097] The medium priority encoder 300 - 2 receives the address information (hit index) output from the search blocks 200 - 8 to 200 - 11 , and outputs high priority address information to the global priority encoder (GPE) 301 .
[0098] The search unit 102-3 includes search blocks 200-12 to 200-15, a selector 203-3, a medium priority encoder (MPE) 300-3, and selectors SL12-SL15.
[0099] The selectors SL12-SL15 are provided in association with the search blocks 200-12 to 200-15, respectively.
[0100] The selector 203 - 3 receives input of input search data keywords 0 to 3 and outputs two input search data keywords to each selector SL according to input of selection signals SELQ6 , SELQ7 .
[0101] The selectors SL12-SL15 receive inputs of two input search data keywords and output any one of the two input search data keywords to the associated search block 200 according to inputs of the selection signals SELP12-SELP15.
[0102] The associated search block 200 performs a search operation on the input search data keyword input from the selector SL.
[0103] The associated search block 200 outputs address information (hit index) associated with the matched match line to a medium priority encoder (MPE) 300 - 3 .
[0104] The medium priority encoder 300 - 3 receives the address information (hit index) output from the search blocks 200 - 12 to 200 - 15 , and outputs high priority address information to the global priority encoder (GPE) 301 .
[0105] A global priority encoder (GPE) 301 receives outputs of the plurality of medium priority encoders 300-0 to 300-3 and finally outputs high priority address information. In this example, a plurality of sets of address information (hit index 0 to hit index 3) are output for a plurality of input search data keywords 0 to 3, respectively.
[0106] Fig. 6A and Figure 6B is a diagram illustrating the configuration of the selector 203 - 0 according to the first embodiment.
[0107] Reference Fig. 6A , the selector 203-0 includes selection circuits 203A and 203B.
[0108] The selection circuit 203A receives a plurality of input search data keywords 0 to 3, selects one of the input search data keywords 0 to 3 according to the input of the selection signal SELQ0, and outputs the selected input search data keyword as an output signal X.
[0109] The selection circuit 203B receives a plurality of input search data keywords 0 to 3, selects one of the input search data keywords 0 to 3 according to the input of the selection signal SELQ1, and outputs the selected input search data keyword as an output signal Y.
[0110] The selection signals SELQ0 and SELQ1 are 2-bit control signals.
[0111] Figure 6B The diagram shows the relationship between the selection signal SELQ and the output signal to be selected.
[0112] When the selection signals SELQ0, SELQ1 are "00", the input search data keyword 0 is selected.
[0113] When the selection signals SELQ0, SELQ1 are "01", the input search data keyword 1 is selected.
[0114] When the selection signals SELQ0, SELQ1 are "10", the input search data keyword 2 is selected.
[0115] When the selection signals SELQ0, SELQ1 are "11", the input search data keyword 3 is selected.
[0116] The configurations of the other selectors 203 - 1 to 203 - 3 are the same as that of the selector 203 - 0 , and a detailed description will not be repeated.
[0117] Fig. 7A and Figure 7B is a diagram illustrating the configuration of the selector SL0 according to the first embodiment.
[0118] Reference Fig. 7A The selector SL0 receives inputs of the output signals X and Y, selects one of the output signals X and Y according to inputs of the selection signal SELP0, and outputs the selected output signal to the search block 200-0.
[0119] The selection signal SELP0 is a 1-bit control signal.
[0120] Figure 7B The diagram shows the relationship between the selection signal SELQ and the output signal to be selected.
[0121] When the selection signal SELQ is "0", the signal X is selected and output.
[0122] When the selection signal SELQ is "1", the signal Y is selected and output.
[0123] The configurations of the other selectors SL1 to SL15 are the same as that of the selector SL0 , and a detailed description will not be repeated.
[0124] Fig. 8A and Figure 8B is a diagram illustrating the configuration of the middle priority encoder 300 - 0 according to the first embodiment.
[0125] refer to Fig. 8A , the priority encoder 300-0 includes switch circuits SW0-SW3 and priority encoders 300A and 300B.
[0126] The switch circuits SW0-SW3 select one set of address information among two sets of address information (hit indexes) input according to the selection signals SELP0-SELP3, and output the selected set of address information (hit indexes) to any one of the priority encoders 300A, 300B.
[0127] Figure 8B The diagram shows the relationship between the selection signal SELPO and the priority encoder that outputs address information (hit index).
[0128] When the selection signal SELQ is "0", the address information (hit index) is output to the priority encoder 300A.
[0129] When the selection signal SELQ is "1", the address information (hit index) is output to the priority encoder 300B.
[0130] The priority encoders 300A, 300B select high priority information from a set of address information (hit index) inputted, and output the selected high priority information.
[0131] For example, the present example is described in conjunction with a case where the priority encoder 300A outputs address information (hit index X) and the priority encoder 300B outputs address information (hit index Y).
[0132] Fig. 9A and Fig. 9B is a diagram illustrating the configuration of the priority encoder 301 according to the first embodiment.
[0133] refer to Fig. 9A , the priority encoder 301 includes switch circuits SW4-SW11 and priority encoders 301A-301D.
[0134] According to the input of the selection signals SELP0-SELP7, the switch circuits SW4-SW11 output the input address information (hit index) to one of the priority encoders 301A-301D.
[0135] The switch circuit SW4 outputs the input address information (hit index X) to one of the priority encoders 301A-301D according to the selection signal SELQ0.
[0136] The switch circuit SW5 outputs the input address information (hit index Y) to one of the priority encoders 301A-301D according to the selection signal SELQ1.
[0137] The switch circuit SW6 outputs the input address information (hit index X) to one of the priority encoders 301A-301D according to the selection signal SELQ2.
[0138] The switch circuit SW7 outputs the input address information (hit index Y) to one of the priority encoders 301A-301D according to the selection signal SELQ3.
[0139] The switch circuit SW8 outputs the input address information (hit index X) to one of the priority encoders 301A-301D according to the selection signal SELQ4.
[0140] The switch circuit SW9 outputs the input address information (hit index Y) to one of the priority encoders 301A-301D according to the selection signal SELQ5.
[0141] The switch circuit SW10 outputs the input address information (hit index X) to one of the priority encoders 301A-301D according to the selection signal SELQ6.
[0142] The switch circuit SW11 outputs the input address information (hit index Y) to one of the priority encoders 301A-301D according to the selection signal SELQ7.
[0143] The priority encoders 301A-301D eventually select high priority address information from the input address information and output the selected high priority address information. In this example, the priority encoders 301A-301D output multiple sets of address information (hit index 0 to hit index 3) respectively.
[0144] Fig. 9B The figure shows the relationship between the selection signal SELQ and the priority encoder (PE) to which the address information is output.
[0145] The selection signals SELQ0-SELQ7 are 2-bit control signals.
[0146] For example, when the selection signal SELQ0-SELQ7 is "00", the switch circuit SW4-SW11 outputs the input address information (hit index) to the priority encoder 301A. For example, when the selection signal SELQ0-SELQ7 is "01", the switch circuit SW4-SW11 outputs the input address information (hit index) to the priority encoder 301B. For example, when the selection signal SELQ0-SELQ7 is "10", the switch circuit SW4-SW11 outputs the input address information (hit index) to the priority encoder 301C.
[0147] When the selection signals SELP0-SELQ7 are "11", the switch circuits SW4-SW11 output the input address information (hit index) to the priority encoder 301D.
[0148] The allocation of entry data to the search block 200 will now be described.
[0149] Fig. 10A and Fig. 10B is a diagram illustrating allocation of entry data to the search block 200 .
[0150] Fig. 10A Indicates the number of search blocks 200 to which entry data for performing a search operation on input search data keys 0 to 3 are allocated.
[0151] More specifically, the indicated case is that four search blocks 200 are allocated to store entry data for input search data keyword 0, and four search blocks 200 are allocated to store entry data for input search data keyword 1. The further indicated case is that four search blocks 200 are allocated to store entry data for input search data keyword 2, and four search blocks 200 are allocated to store entry data for input search data keyword 3.
[0152] In the above example, search blocks 200-0 to 200-3 for storing entry data for input search data keyword 0 are assigned to search unit 102-0. Search blocks 200-4 to 200-7 for storing entry data for input search data keyword 1 are assigned to search unit 102-1. Search blocks 200-8 to 200-11 for storing entry data for input search data keyword 2 are assigned to search unit 102-2. Search blocks 200-12 to 200-15 for storing entry data for input search data keyword 3 are assigned to search unit 102-3.
[0153] Fig. 10B Indicates the number of search blocks 200 to which entry data for performing a search operation on input search data keys 0 to 3 are allocated.
[0154] More specifically, the indicated case is that six search blocks 200 are allocated for storing entry data for input search data keyword 0, and five search blocks 200 are allocated for storing entry data for input search data keyword 1. The further indicated case is that three search blocks 200 are allocated for storing entry data for input search data keyword 2, and two search blocks 200 are allocated for storing entry data for input search data keyword 3.
[0155] In the above example, search blocks 200 - 0 to 200 - 3 (four search blocks) for storing entry data for input search data key 0 are allocated to the search unit 102 - 0 .
[0156] Search blocks 200-4, 200-5 (two search blocks) for storing entry data for input search data key 0 and search blocks 200-6, 200-7 (two search blocks) for storing entry data for input search data key 1 are allocated to search unit 102-1.
[0157] Search blocks 200-8, 200-9, 200-10 (three search blocks) for storing entry data for input search data keyword 1 and search block 200-11 (one search block) for storing entry data for input search data keyword 2 are allocated to search unit 102-2.
[0158] Search blocks 200-12, 200-13 (two search blocks) for storing entry data for input search data keyword 2 and search blocks 200-14, 200-15 (two search blocks) for storing entry data for input search data keyword 3 are allocated to the search unit 102-3.
[0159] Fig.11A and Fig. 11B is a conceptual diagram illustrating a search block 200 storing entry data associated with an input search data keyword according to the first embodiment.
[0160] refer to Fig.11A ,according to Fig. 10A The allocation shown in , stores the entry data associated with the input search data keyword in the search block 200.
[0161] The present example indicates a case where each search unit 102 stores entry data for one type of input search data keyword.
[0162] refer to Fig. 11B ,according to Fig. 10B The allocation shown in , stores the entry data associated with the input search data keyword in the search block 200.
[0163] The present example indicates a case where some of the search units 102 store entry data for two types of input search data keywords.
[0164] More specifically, search blocks 200 (two search blocks) for storing entry data for input search data key 0 and search blocks 200 (two search blocks) for storing entry data for input search data key 1 are allocated to the search unit 102 - 1 .
[0165] Search blocks 200 (three search blocks) for storing entry data for input search data keyword 1 and search blocks 200 (one search block) for storing entry data for input search data keyword 2 are allocated to the search unit 102-2.
[0166] Search blocks 200 (two search blocks) for storing entry data for input search data keyword 2 and search blocks 200 (two search blocks) for storing entry data for input search data keyword 3 are allocated to the search unit 102 - 3 .
[0167] When the above-described allocation method is used, each search unit 102 is able to store two types of entry data.
[0168] Therefore, it is not necessary to input four types of input search data keywords to the corresponding search blocks 200. Therefore, the width of the data bus can be reduced. Further, reducing the data bus width makes it possible to reduce the amount of power consumption.
[0169] Fig.12 is a flowchart illustrating an allocation method of the search block 200 according to the first embodiment.
[0170] Fig.12 The flowchart of exemplifies a method of enabling one search unit 102 to store two types of entry data. Here, it is assumed that one search unit 102 includes P search blocks.
[0171] refer to Fig.12 , when assigned, the search blocks 200 are arranged in the order of increasing number of search blocks 200 for storing entry data associated with input search data keywords 0 to 3 (step S0). More specifically, the search blocks 200 are arranged in the order of increasing number of assigned search blocks 200.
[0172] Next, a check is performed to determine whether the number of search blocks 200 allocated for storing entry data associated with the minimum number of input search data is P or greater (step S1). We assume, for example, that P is equal to 4. A check is performed to determine whether the number of search blocks 200 allocated for storing entry data associated with the minimum number of input search data is 4 or greater.
[0173] If it is determined in step S1 that the number of search blocks 200 allocated for storing entry data associated with the minimum number of input search data is P or greater ("Yes" at step S1), a group of search blocks 200 for storing entry data associated with the minimum number of input search data are allocated as search blocks in one search unit (step S2).
[0174] Next, a check is performed to determine whether the number of search blocks 200 allocated for storing entry data associated with the minimum number of input search data is greater than P. That is, a check is performed to determine whether there are more than P search blocks 200 for storing entry data associated with the remaining minimum number of input search data keywords (step S3).
[0175] Described below is a case where there are more than P search blocks 200 for storing entry data associated with the remaining minimum number of input search data keywords ("Yes" at step S3). In this case, a group of search blocks 200 for storing entry data associated with the remaining minimum number of input search data keywords and entry data associated with the second minimum number of input search data keywords are allocated as search blocks 200 in the next search unit (step S4).
[0176] Next, a check is performed to determine whether there is a search block 200 for storing entry data associated with the remaining second minimum number of input search data keys (step S5).
[0177] Described below is a case where there are search blocks 200 for storing entry data associated with the remaining second smallest number of input search data keywords ("Yes" at step S5). In this case, a group of search blocks 200 for storing entry data associated with the second and third smallest numbers of input search data keywords are allocated as search blocks 200 in the next search unit (step S6).
[0178] Next, a group of search blocks 200 for storing entry data associated with the remaining fourth smallest number of input search data is allocated (step S7).
[0179] Then, the process terminates (ends).
[0180] Meanwhile, the case described below is that it is determined in step S3 that there are no search blocks 200 for storing entry data associated with the remaining minimum number of input search data keywords, that is, the case where the number of search blocks for storing entry data associated with the minimum number of input search data keywords is P or more ("No" at step S3). In this case, a group of search blocks 200 for storing entry data associated with the second minimum number of input search data keywords are allocated as search blocks 200 in the next search unit (step S8).
[0181] Then, the process proceeds to step S5.
[0182] Meanwhile, the following describes a case where it is determined in step S5 that there is no search block 200 for storing entry data associated with the remaining second minimum number of input search data keywords ("No" at step S5). In this case, a group of search blocks 200 for storing entry data associated with the third minimum number of input search data keywords is allocated as the search block 200 in the next search unit (step S9).
[0183] Then, the process proceeds to step S7.
[0184] Once step S7 is completed, the process is terminated (END).
[0185] Described below is a case where, for example, four search blocks 200 are allocated to store entry data associated with the minimum number of input search data, and four search blocks 200 are allocated to store entry data associated with the second minimum number of input search data. Further, four search blocks 200 are allocated to store entry data associated with the third minimum number of input search data, and four search blocks 200 are allocated to store entry data associated with the fourth minimum number of input search data.
[0186] In the above example, in step S2, a group of four search blocks 200 for storing entry data associated with the minimum number of input search data is allocated. Further, in step S8, a group of four search blocks 200 for storing entry data associated with the second minimum number of input search data is allocated. In addition, in step S9, a group of four search blocks 200 for storing entry data associated with the third minimum number of input search data is allocated. In addition, in step S7, a group of four search blocks 200 for storing entry data associated with the fourth minimum number of input search data is allocated.
[0187] Next, described below is a case where it is determined that the number of search blocks 200 for storing entry data associated with the minimum number of input search data is P or greater ("No" at step S1). In this case, a check is performed to determine whether the total number of search blocks 200 for storing entry data associated with the minimum and second minimum numbers of input search data keywords is P or greater (step S10). We assume, for example, that P is equal to 4. A check is performed to determine whether the total number of search blocks 200 for storing entry data associated with the minimum and second minimum numbers of input search data keywords is 4 or greater.
[0188] Described below is a case where it is determined in step S10 that the total number of search blocks 200 for storing entry data associated with the minimum and second minimum numbers of input search data keywords is P or more ("Yes" at step S10). In this case, a group of search blocks 200 for storing entry data associated with the minimum and second minimum numbers of input search data keywords are allocated as search blocks in one search unit (step S11).
[0189] Next, a check is performed to determine whether there is a search block 200 for storing entry data associated with the remaining second minimum number of input search data keys (step S12).
[0190] Described below is a case where it is determined in step S12 that there are search blocks 200 for storing entry data associated with the remaining second smallest number of input search data keywords ("Yes" at step S12). In this case, a group of search blocks 200 for storing entry data associated with the second and third smallest numbers of input search data are allocated as search blocks in the next search unit (step S14).
[0191] Next, a check is performed to determine whether there is a search block 200 for storing entry data associated with the remaining third minimum number of input search data (step S16).
[0192] Described below is a case where it is determined in step S16 that there are search blocks 200 for storing entry data associated with the remaining third minimum number of input search data ("Yes" at step S16). In this case, a group of search blocks 200 for storing entry data associated with the third and fourth minimum numbers of input search data are allocated as search blocks in the next search unit (step S18).
[0193] Next, a group of search blocks 200 for storing entry data associated with the remaining fourth smallest number of input search data is allocated (step S20).
[0194] Then, the process terminates (ends).
[0195] Described below is a case where, for example, two search blocks 200 are allocated to store entry data associated with the minimum number of input search data, and three search blocks 200 are allocated to store entry data associated with the second minimum number of input search data. Further, described below is a case where five search blocks 200 are allocated to store entry data associated with the third minimum number of input search data, and six search blocks 200 are allocated to store entry data associated with the fourth minimum number of input search data.
[0196] In the above example, in step S11, a group of two search blocks 200 for storing entry data associated with the minimum number of input search data and two search blocks 200 for storing entry data associated with the second minimum number of input search data are allocated as search blocks in one search unit. Next, in step S14, a group of one search block 200 for storing entry data associated with the second minimum number of input search data and three search blocks 200 for storing entry data associated with the third minimum number of input search data are allocated as search blocks in the next search unit. Next, in step S18, a group of two search blocks 200 for storing entry data associated with the third minimum number of input search data and two search blocks 200 for storing entry data associated with the fourth minimum number of input search data are allocated as search blocks in the next search unit. Further, in step S20, a group of four search blocks 200 for storing entry data associated with the remaining fourth minimum number of input search data are allocated.
[0197] Meanwhile, described below is a case where it is determined that the total number of search blocks 200 for storing entry data associated with the minimum and second minimum numbers of input search data is not P or more ("No" at step S10). In this case, a check is performed to determine whether the total number of search blocks 200 for storing entry data associated with the minimum and third minimum numbers of input search data is P or more (step S28).
[0198] Described below is a case where it is determined in step S28 that the total number of search blocks 200 for storing entry data associated with the minimum and third minimum numbers of input search data is P or more ("Yes" at step S28). In this case, a group of search blocks 200 for storing entry data associated with the minimum and third minimum numbers of input search data is allocated (step S30).
[0199] Next, in step S34, a check is performed to determine whether the total number of search blocks 200 for storing entry data associated with the second and third smallest numbers of input search data is P or more (step S34).
[0200] If it is determined in step S34 that the total number of search blocks 200 for storing entry data associated with the second and third minimum numbers of input search data is P or greater ("Yes" at step S34), a group of search blocks 200 for storing entry data associated with the second and third minimum numbers of input search data is allocated (step S36).
[0201] Then, the process proceeds to step S16.
[0202] Described below is a case where, for example, one search block 200 is allocated to store entry data associated with the minimum number of input search data, and one search block 200 is allocated to store entry data associated with the second minimum number of input search data. Further, six search blocks 200 are allocated to store entry data associated with the third minimum number of input search data, and eight search blocks 200 are allocated to store entry data associated with the fourth minimum number of input search data.
[0203] In the above example, in step S30, a group of one search block 200 for storing entry data associated with the minimum number of input search data and three search blocks 200 for storing entry data associated with the third minimum number of input search data are allocated. Next, a group of one search block 200 for storing entry data associated with the second minimum number of input search data and three search blocks 200 for storing entry data associated with the third minimum number of input search data are allocated.
[0204] At the same time, if it is determined in step S28 that the total number of search blocks 200 for storing entry data associated with the minimum and third minimum numbers of input search data is not P or greater ("No" at step S28), a group of search blocks 200 for storing entry data associated with the minimum and fourth minimum numbers of input search data is allocated (step S32).
[0205] Next, if it is determined in step S34 that the total number of search blocks 200 for storing entry data associated with the second and third minimum numbers of input search data is not P or greater ("No" at step S34), a group of search blocks 200 for storing entry data associated with the second and fourth minimum numbers of input search data is allocated (step S38).
[0206] Next, a check is performed to determine whether there is a search block 200 for storing entry data associated with the remaining third minimum number of input search data (step S40).
[0207] If it is determined in step S40 that there is a search block 200 for storing entry data associated with the remaining third minimum number of input search data ("Yes" at step S40), a group of search blocks 200 for storing entry data associated with the third and fourth minimum numbers of input search data are allocated (step S41).
[0208] Described below is a case where, for example, one search block 200 is allocated to store entry data associated with the minimum number of input search data, and two search blocks 200 are allocated to store entry data associated with the second minimum number of input search data. Further, described below is a case where four search blocks 200 are allocated to store entry data associated with the third minimum number of input search data, and nine search blocks 200 are allocated to store entry data associated with the fourth minimum number of input search data.
[0209] In the above example, in step S32, a group of one search block 200 for storing entry data associated with the minimum number of input search data and three search blocks 200 for storing entry data associated with the third minimum number of input search data are allocated. Next, in step S38, a group of two search blocks 200 for storing entry data associated with the second minimum number of input search data and two search blocks 200 for storing entry data associated with the fourth minimum number of input search data are allocated. Next, a group of one remaining search block 200 for storing entry data associated with the third minimum number of input search data and three search blocks 200 for storing entry data associated with the fourth minimum number of input search data are allocated.
[0210] Then, the process proceeds to step S20.
[0211] Meanwhile, if it is determined in step S40 that there is no search block 200 for storing entry data associated with the remaining third minimum number of input search data (“No” at step S40 ), the process proceeds to step S20 .
[0212] Described below is a case where, for example, one search block 200 is allocated to store entry data associated with the smallest number of input search data, and one search block 200 is allocated to store entry data associated with the second smallest number of input search data. Further, described below is a case where three search blocks 200 are allocated to store entry data associated with the third smallest number of input search data, and eleven search blocks 200 are allocated to store entry data associated with the fourth smallest number of input search data.
[0213] In the above example, in step S30, a group of one search block 200 for storing entry data associated with the minimum number of input search data and three search blocks 200 for storing entry data associated with the third minimum number of input search data are allocated. Next, in step S38, a group of one search block 200 for storing entry data associated with the second minimum number of input search data and three search blocks 200 for storing entry data associated with the fourth minimum number of input search data are allocated. Then, the process proceeds to step S20.
[0214] At the same time, if it is determined in step S12 that there is no search block 200 for storing entry data associated with the remaining second minimum number of input search data ("No" at step S12), a check is performed to determine whether the number of search blocks 200 for storing entry data associated with the third minimum number of input search data is P or greater (step S24).
[0215] If it is determined in step S24 that the number of search blocks 200 for storing entry data associated with the third minimum number of input search data is P or greater ("Yes" at step S24), a group of P search blocks 200 for storing entry data associated with the third minimum number of input search data are allocated (step S26).
[0216] Then, the process proceeds to step S16.
[0217] Described below is a case where, for example, two search blocks 200 are allocated to store entry data associated with the minimum number of input search data, and two search blocks 200 are allocated to store entry data associated with the second minimum number of input search data. Further, described below is a case where four search blocks 200 are allocated to store entry data associated with the third minimum number of input search data, and eight search blocks 200 are allocated to store entry data associated with the fourth minimum number of input search data.
[0218] In the above example, in step S11, a group of two search blocks 200 for storing entry data associated with the minimum number of input search data and two search blocks 200 for storing entry data associated with the second minimum number of input search data are allocated. Next, in step S26, a group of four search blocks 200 for storing entry data associated with the third minimum number of input search data are allocated. Then, the process proceeds to step S16.
[0219] Meanwhile, if it is determined in step S24 that the number of search blocks 200 for storing entry data associated with the third minimum number of input search data is not P or more (“No” at step S24 ), the process proceeds to step S40 .
[0220] Described below is a case where, for example, one search block 200 is allocated to store entry data associated with the smallest number of input search data, and three search blocks 200 are allocated to store entry data associated with the second smallest number of input search data. Further, described below is a case where three search blocks 200 are allocated to store entry data associated with the third smallest number of input search data, and nine search blocks 200 are allocated to store entry data associated with the fourth smallest number of input search data.
[0221] In the above example, in step S11, a group of one search block 200 for storing entry data associated with the smallest number of input search data and three search blocks 200 for storing entry data associated with the second smallest number of input search data are allocated. Then, the process proceeds to step S40.
[0222] Meanwhile, if it is determined in step S16 that the number of search blocks 200 for storing entry data associated with the remaining third minimum number of input search data is not P or more (“No” at step S16 ), the process proceeds to step S20 .
[0223] Described below is a case where, for example, two search blocks 200 are allocated to store entry data associated with the minimum number of input search data, and three search blocks 200 are allocated to store entry data associated with the second minimum number of input search data. Further, described below is a case where three search blocks 200 are allocated to store entry data associated with the third minimum number of input search data, and eight search blocks 200 are allocated to store entry data associated with the fourth minimum number of input search data.
[0224] In the above example, in step S11, a group of two search blocks 200 for storing entry data associated with the minimum number of input search data and two search blocks 200 for storing entry data associated with the second minimum number of input search data are allocated. Next, in step S14, a group of one search block 200 for storing entry data associated with the second minimum number of input search data and three search blocks 200 for storing entry data associated with the third minimum number of input search data are allocated. Then, the process proceeds to step S20.
[0225] The following describes Fig. 10B , where the numbers of search blocks 200 used to store entry data associated with input search data keys 0 to 3 are 6, 5, 3, and 2, respectively.
[0226] refer to Fig.12 , in step S0, the search blocks 200 to be allocated are arranged in the order of increasing number of search blocks 200 for storing entry data associated with input search data keys 0 to 3.
[0227] More specifically, the search blocks 200 are arranged in the order of two search blocks (keyword 3), three search blocks (keyword 2), five search blocks (keyword 1), and six search blocks (keyword 0).
[0228] Then, in step S2, it is determined that the number of search blocks 200 for storing entry data associated with the input search data of the smallest number of input search data keywords 3 is not P (P=4).
[0229] Next, in step S6, it is determined that the total number of search blocks 200 for storing entry data associated with the minimum number of input search data keywords 3 and the second minimum number of input search data keywords 2 is 4 or more.
[0230] Finally, in step S8, a group of search blocks 200 for storing entry data associated with the minimum number of input search data keywords 3 and the second minimum number of input search data keywords 2 is allocated. More specifically, a group of two search blocks 200 for storing entry data associated with the minimum number of input search data keywords 3 and two search blocks 200 for storing entry data associated with the second minimum number of input search data keywords 2 are allocated.
[0231] Next, in step S10 , it is determined that there is a search block 200 for storing entry data associated with the remaining second smallest number of input search data keywords 2 .
[0232] Subsequently, in step S12, it is determined that the total number of search blocks 200 for storing entry data associated with the second smallest number of input search data key 2 and the third smallest number of input search data key 1 is 4 or more.
[0233] Finally, in step S12, a group of search blocks 200 for storing entry data associated with the second minimum number of input search data keywords 2 and the third minimum number of input search data keywords 1 is allocated. More specifically, a group of one search block 200 for storing entry data associated with the second minimum number of input search data keywords 2 and three search blocks 200 for storing entry data associated with the third minimum number of input search data keywords 1 are allocated.
[0234] Subsequently, in step S16, it is determined that there is a search block 200 for storing entry data associated with the remaining third minimum number of input search data key 1.
[0235] Next, in step S18, a group of search blocks 200 for storing entry data associated with the third minimum number of input search data keyword 1 and the fourth minimum number of input search data keyword 0 is allocated. More specifically, a group of two search blocks 200 for storing entry data associated with the third minimum number of input search data keyword 1 and two search blocks 200 for storing entry data associated with the fourth minimum number of input search data keyword 0 are allocated.
[0236] Next, in step S20, a group of search blocks 200 for storing entry data associated with the remaining fourth minimum number of input search data keys is allocated. More specifically, a group of four search blocks 200 for storing entry data associated with the fourth minimum number of input search data keys 0 is allocated.
[0237] In this example, each group of search blocks 200 allocated is stored in the corresponding search unit 102. As an example, a group of four search blocks 200 for input search data keyword 0 is allocated to the search unit 102-0. A group of two search blocks 200 for input search data keyword 0 and two search blocks 200 for input search data keyword 1 are allocated to the search unit 102-1. A group of three search blocks 200 for input search data keyword 1 and one search block 200 for input search data keyword 2 are allocated to the search unit 102-2. A group of two search blocks 200 for input search data keyword 2 and two search blocks 200 for input search data keyword 3 are allocated to the search unit 102-3.
[0238] Fig.13 The diagram is assigned to Fig. 10B Schematic diagram of the selection signal of the search unit depicted in .
[0239] Reference Fig.13 , the selection signals SELQ0 and SELQ1 for the search unit 102-0 are both set to "00". The selection signals SELQ0-SELQ3 are set to "0".
[0240] When the selection signal SELQ0 is "00", the selector 203-0 outputs the input search data keyword 0 as the output signal X. Further, when the selection signal SELQ1 is "00", the selector 203-0 outputs the input search data keyword 0 as the output signal Y.
[0241] According to the selection signal SELP0-SELP3 ("0"), the selectors SL0-SL3 select the input search data key 0 as the output signal X, and output the selected output signal X to the search blocks 200-0 to 200-3.
[0242] For the search unit 102-1, the selection signals SELQ2 and SELQ3 are set to "00" and "01", respectively. The selection signals SELQ4 and SELQ5 are set to "0". The selection signals SELQ6 and SELQ7 are set to "1".
[0243] When the selection signal SELQ2 is "00", the selector 203-1 outputs the input search data keyword 0 as the output signal X. Further, when the selection signal SELQ3 is "01", the selector 203-1 outputs the input search data keyword 1 as the output signal Y.
[0244] According to the selection signals SELP4, SELP5 ("0"), the selectors SL4, SL5 select the input search data keyword 0 as the output signal X, and output the selected output signal X to the search blocks 200-4, 200-5.
[0245] According to the selection signals SELP6, SELP7 ("1"), the selectors SL6, SL7 select the input search data keyword 1 as the output signal Y, and output the selected output signal Y to the search blocks 200-6, 200-7.
[0246] For the search unit 102-2, the selection signals SELQ4 and SELQ5 are set to "01" and "10", respectively. The selection signals SELP8, SELP9, and SELP10 are set to "0". The selection signal SELP11 is set to "1".
[0247] When the selection signal SELQ4 is "01", the selector 203-2 outputs the input search data keyword 1 as the output signal X. Further, when the selection signal SELQ5 is "10", the selector 203-2 outputs the input search data keyword 2 as the output signal Y.
[0248] According to the selection signals SELP8, SELP9, SELP10 ("0"), the selectors SL8, SL9, SL10 select the input search data keyword 1 as the output signal X, and output the selected output signal X to the search blocks 200-8, 200-9, 200-10.
[0249] According to the selection signal SELP11 ("1"), the selector SL11 selects the input search data keyword 2 as the output signal Y, and outputs the selected output signal Y to the search block 200-11.
[0250] For the search unit 102-3, the selection signals SELQ6 and SELQ7 are set to "10" and "11", respectively. The selection signals SELP12, SELP13, and SELP14 are set to "0". The selection signals SELP14 and SELP15 are set to "1".
[0251] When the selection signal SELQ6 is "10", the selector 203-2 outputs the input search data keyword 2 as the output signal X. Further, when the selection signal SELQ7 is "11", the selector 203-3 outputs the input search data keyword 3 as the output signal Y.
[0252] According to the selection signals SELP12, SELP13 ("0"), the selectors SL12, SL13 select the input search data keyword 2 as the output signal X, and output the selected output signal X to the search blocks 200-12, 200-13.
[0253] According to the selection signals SELP14, SELP15 ("1"), the selectors SL14, SL15 select the input search data keyword 3 as the output signal Y, and output the selected output signal Y to the search blocks 200-14, 200-15.
[0254] The middle priority encoder 300-0 of the search unit 102-0 receives input of address information from each of the search blocks 200-0 to 200-3. More specifically, according to input of the selection signals SELP0-SELP3, the corresponding address information is input to the priority encoder 300A, and high priority address information is output.
[0255] The priority encoder 300-1 in the search unit 102-1 receives input of address information from each of the search blocks 200-4 to 200-7. More specifically, according to the input of the selection signals SELP4-SELP7, the corresponding address information is input to the priority encoders 300A, 300B. According to the input ("0") of the selection signals SELP4, SELP5, the address information related to the search blocks 200-4, 200-5 is input to the priority encoder 300A. According to the input ("1") of the selection signals SELP6, SELP7, the address information related to the search blocks 200-6, 200-7 is input to the priority encoder 300B.
[0256] The priority encoder 300-2 of the search unit 102-2 receives input of address information from each of the search blocks 200-8 to 200-11. More specifically, according to the input of the selection signals SELP8-SELP11, the corresponding address information is input to the priority encoders 300A, 300B. According to the input ("0") of the selection signals SELP8, SELP9, SELP10, the address information related to the search blocks 200-8, 200-9, 200-10 is input to the priority encoder 300A. According to the input ("1") of the selection signal SELP11, the address information related to the search block 200-11 is input to the priority encoder 300B.
[0257] The priority encoder 300-3 in the search unit 102-3 receives input of address information from each of the search blocks 200-12 to 200-15. More specifically, according to the input of the selection signals SELP12-SELP15, the corresponding address information is input to the priority encoders 300A, 300B. According to the input ("0") of the selection signals SELP12, SELP13, the address information related to the search blocks 200-12, 200-13 is input to the priority encoder 300A. According to the input ("1") of the selection signals SELP14, SELP15, the address information related to the search blocks 200-14, 200-15 is input to the priority encoder 300B.
[0258] The search unit 301 receives an input of address information from each of the middle priority encoders 300 - 0 to 300 - 3 .
[0259] More specifically, according to the input of the selection signals SELP0-SELP7, the corresponding address information is input to the priority encoders 301A-301D.
[0260] When the selection signals SELQ0, SELQ1 are set to "00", the address information from the search unit 102-0 is input to the priority encoder 301A.
[0261] When the selection signal SELQ2 is set to "00", the address information from the search unit 102-1 is input to the priority encoder 301A. Further, when the selection signal SELQ3 is set to "01", the address information from the search unit 102-1 is input to the priority encoder 301B.
[0262] When the selection signal SELQ4 is set to "01", the address information from the search unit 102-2 is input to the priority encoder 301B. Further, when the selection signal SELQ5 is set to "10", the address information from the search unit 102-2 is input to the priority encoder 301C.
[0263] When the selection signal SELQ6 is set to "10", the address information from the search unit 102-3 is input to the priority encoder 301C. Further, when the selection signal SELQ7 is set to "11", the address information from the search unit 102-3 is input to the priority encoder 301D.
[0264] The priority encoders 301A-301D output high priority address information according to the input address information.
[0265] The address information associated with input search data keyword 0 is input to priority encoder 301A. The address information associated with input search data keyword 1 is input to priority encoder 301B. The address information associated with input search data keyword 2 is input to priority encoder 301C. The address information associated with input search data keyword 3 is input to priority encoder 301D.
[0266] When the above-described method is employed, entry data respectively associated with the input search data keys 0 to 3 can be freely allocated to the search block 200 with respect to the search memory to which the input search data keys 0 to 3 are input.
[0267] Therefore, the width of the data bus can be reduced to reduce the current consumption.
[0268] When four different input search data are distributed to predetermined search units for search purposes, the related art method inputs the four different input search data to all search blocks 200 and performs a search process.
[0269] Therefore, when search keywords for K parallel searches are distributed to the search units, the related art method requires K times the data bus width (ie, the bus width of the input search data).
[0270] However, the first embodiment performs allocation based on a specific rule so that the target search unit is integrated into a specific group for each input search data. Therefore, the number of input search data required for each group can be reduced to two.
[0271] Accordingly, a hierarchical data bus is adopted so as to select two input search data from K input search data on an individual group basis and select final input search data from the two input search data selected for each search unit.
[0272] The above configuration can reduce the data bus width in the search unit to twice the data bus width of the input search data. This makes it possible to reduce the chip area and current consumption.
[0273] Second embodiment
[0274] The first embodiment which has been described above determines which search unit performs a search for each input search data based on a predetermined allocation rule and the number of search blocks of the search unit for each input search data.
[0275] Since data written to the search memory is updated over time due to, for example, addition or deletion, the number of blocks changes.
[0276] Fig.14 is a diagram illustrating update of data in a search memory.
[0277] Fig.14 A case is depicted where data in the search block 200 - 3 for storing entry data associated with the input search data key 0 is deleted due to update.
[0278] The following describes a case where entry data of input search data keyword 1 is newly stored.
[0279] In this case, it can be assumed that the entry data of the input search data keyword 1 will be stored in the unoccupied search block 200-3.
[0280] However, each search block 200 has a priority level, which is used as a criterion for selecting address information (hit index) when output from a priority encoder (PE).
[0281] Typically, the design is made so that entry data at low-numbered addresses generally have high priority.
[0282] Therefore, the priorities of the 16 search blocks 200 are designed to become higher in order of increasing values of the four high-order bits of the block address for identifying the search block 200 .
[0283] The priority is designed to become higher in the order of the search blocks 200-1, 200-2, 200-3, 200-4, ..., 200-15.
[0284] Accordingly, when the entry data of the input search data keyword 1 is stored in the unoccupied search block 200-3 for the purpose of adding, a high priority is assigned. However, if the entry data of the input search data keyword 1 to be added has a low priority, the entry data stored in the search block 200 needs to be as Fig.14 The movement is performed as shown so as to maintain the priority of the individual search blocks 200.
[0285] Moving entry data as described above may increase the time required for data to be updated.
[0286] Fig.15 is a diagram illustrating a configuration of search memory 8# according to the second embodiment of the present disclosure.
[0287] refer to Fig.15 , the search memory #8 includes a plurality of search units 700 - 0 to 700 - 3 (hereinafter also generally referred to as search units 700 ), a control section 601 , and a global priority encoder (GPE) 301 .
[0288] The control section 601 receives input of a plurality of input search data keys 0 to 3 (hereinafter also generally referred to as input search data keys) in parallel.
[0289] The control section 601 outputs the input search data keywords 0 to 3 to the search unit 700 respectively.
[0290] The control section 601 outputs selection signals SELP and SELQ to each of the search units 700 .
[0291] The control section 601 includes a write control section 800 .
[0292] Fig.16 is a diagram illustrating the configuration of a search unit 700 - 0 according to the second embodiment.
[0293] refer to Fig.16 , the search units 700 each include a plurality of search blocks 200 .
[0294] In this example, the search unit 700 - 0 is described as representative.
[0295] The write control section 800 controls to write data to the search block 200 and the register 704 .
[0296] Search unit 700-0 includes four sub-search units 701-0 to 701-3 (also generally referred to as sub-search unit 701) and medium priority encoder 300-0. Since sub-search units 701 have substantially the same configuration, the configurations of sub-search units 701-0, 701-2 will be mainly described.
[0297] The sub-search unit 701-0 includes a search block 200-0, a selector SL0, a register 704-0 (also generally referred to as a register 704), and a synthesis circuit 703-0 (also generally referred to as a synthesis circuit 703).
[0298] The sub-search unit 701-2 includes a search block 200-2, a selector SL2, a register 704-2, and a synthesis circuit 703-2.
[0299] The sub-search unit 701 differs from the search unit 102 described in conjunction with the first embodiment in that a register 704 and a synthesis circuit 703 are added. The other elements are the same as those described in conjunction with the first embodiment, and a detailed description will not be repeated.
[0300] Register 704 stores the block address of the associated search block 200 .
[0301] The synthesis circuit 703 regards the block address stored in the register 704 as high-order bits, regards the address information (hit index) output from the search block 200-0 as low-order bits, and outputs a combination of the high-order bits and the low-order bits.
[0302] The configuration of the middle priority encoder 300 - 0 will now be described.
[0303] The medium priority encoder 300 - 0 includes switches SW0 - SW3 and priority encoders 300A, 300B.
[0304] Switches SW0-SW3 are provided in association with sub-search units 701-0 to 701-3, respectively.
[0305] According to the selection signals SELP0-SELP3, the switches SW0-SW3 output the address information (hit index) output from each of the sub-search units 701-0 to 701-3 to any one of the priority encoders 300A, 300B.
[0306] The priority encoder 300A includes determination circuits 702 - 0 , 702 - 1 , and 707 .
[0307] The determination circuit 702 - 0 includes a selector 705 and a priority decision circuit 706 .
[0308] The priority decision circuit 706 determines a higher priority based on the address information (hit index) input from the sub-search units 701-0, 701-2.
[0309] According to the determination made by the priority decision circuit 706, the selector 705 outputs high priority address information (hit index).
[0310] The determination circuit 702 - 1 has the same configuration as the determination circuit 702 - 0 .
[0311] More specifically, the determination circuit 702-1 determines a higher priority based on the address information (hit index) input from the sub-search units 701-1, 701-3, and outputs the high priority address information (hit index).
[0312] The determination circuit 707 also has the same configuration as the determination circuit 702-0, compares the address information (hit index) input from the determination circuit 702-0 with the address information (hit index) input from the determination circuit 702-1, and outputs the higher priority address information (hit index).
[0313] The priority encoder 300B has the same configuration as the priority encoder 300A.
[0314] In the second embodiment, a variable logical block address is stored in register 704 .
[0315] Fig.17 is a diagram illustrating the relationship between physical block addresses and logical block addresses according to the second embodiment.
[0316] refer to Fig.17 , the entry data associated with the input search data keyword 0 is allocated to four search blocks 200. Further, the entry data associated with the input search data keyword 1 is allocated to four search blocks 200. In addition, the entry data associated with the input search data keyword 2 is allocated to four search blocks 200. In addition, the entry data associated with the input search data keyword 3 is allocated to four search blocks 200.
[0317] When assigning block addresses to individual search blocks 200, the second embodiment assigns logical block addresses.
[0318] The present example indicates a case where logical block addresses “0000”, “0001”, “0010”, and “0011” are allocated to four search blocks 200 to which entry data associated with the input search data key 0 is allocated.
[0319] The present example also indicates a case where logical block addresses “0100”, “0101”, “0110”, and “0111” are assigned to four search blocks 200 to which entry data associated with the input search data key 1 is assigned.
[0320] This example further indicates a case where logical block addresses "1000", "1001", "1010" and "1011" are allocated to four search blocks 200 to which entry data associated with the input search data key 2 is allocated.
[0321] The present example additionally indicates a case where logical block addresses “1100”, “1101”, “1110”, and “1111” are allocated to four search blocks 200 to which entry data associated with the input search data key 3 is allocated.
[0322] In the above example, the case indicated is that the logical block address coincides with the physical block address.
[0323] Fig.18 is another diagram illustrating the relationship between the physical block address and the logical block address according to the second embodiment.
[0324] Fig.18 A case is depicted where data in the search block 200 - 3 for storing entry data associated with the input search data key 0 is deleted.
[0325] More specifically, Fig.18 Depicted in FIG. 2 is a case where entry data in the search block 200 - 3 associated with the logical block address “ 0011 ” (physical block address “ 0011 ”) is deleted.
[0326] Further described is a case where entry data associated with input search data keyword 1 is newly allocated.
[0327] In this example, changes are applied to the values of the plurality of registers 704 respectively associated with the plurality of search blocks 200 for storing entry data associated with the input search data key 1 .
[0328] More specifically, the high priority logical block address is assigned to the register 704 associated with the high priority search block 200 .
[0329] As an example, it is assumed that the entry data in the search block 200 at the physical block address “0100” has the highest priority, and the entry data in the search block 200 at the physical block address “0101” has the second highest priority. It is further assumed that the entry data in the search block 200 at the physical block address “0110” has the third highest priority, and the entry data in the search block 200 at the physical block address “0111” has the fourth highest priority.
[0330] Furthermore, it is assumed that the new entry data associated with the input search data keyword 1 has the lowest priority.
[0331] In this example, for the search block 200 having the highest priority, a high priority logical block address is assigned to the register 704 .
[0332] For the search block 200 associated with the physical block address “0100”, the logical block address “0011” is stored in the register 704 .
[0333] For the search block 200 associated with the physical block address “0101”, the logical block address “0100” is stored in the register 704 .
[0334] For the search block 200 associated with the physical block address “0110”, the logical block address “0101” is stored in the register 704 .
[0335] For the search block 200 associated with the physical block address “0111”, the logical block address “0110” is stored in the register 704 .
[0336] Finally, for the search block 200 associated with the physical block address “0011”, the logical block address “0111” is stored in the register 704 .
[0337] As described above, the information stored in the register 704 is synthesized in the synthesizing circuit 703 as high-order bits of address information to be output.
[0338] Therefore, regarding the priority of the address information (hit index), the entry data in the search block 200 at the physical block address “0100” has the highest priority, and the entry data in the search block 200 at the physical block address “0101” has the second highest priority. Further, the entry data in the search block 200 at the physical block address “0110” has the third highest priority, and the entry data in the search block 200 at the physical block address “0111” has the fourth highest priority. In addition, the new entry data associated with the input search data keyword 1 has the lowest priority.
[0339] Fig.19is a diagram illustrating update of data in a search memory according to the second embodiment.
[0340] Fig.19 Depicted is a case where data in the search block 200 - 3 for storing entry data associated with the input search data key 0 is deleted due to update, and entry data associated with the input search data key 1 is newly stored in the search block 200 - 3 .
[0341] Further, as described above, the values of registers 704 associated with search blocks 200-3, 200-4, 200-5, 200-6, 200-7 are updated.
[0342] According to the above-mentioned update of the logical block address, the priority of the entry data sequentially stored in the order of the search blocks 200-4, 200-5, 200-6, 200-7, 200-3 is set.
[0343] Therefore, there is no need to actually move the entry data stored in the search blocks 200-4, 200-5, 200-6, 200-7. It is sufficient to change only the logical block address stored in the register 704. That is, the data update process can be performed in a short time.
[0344] Fig. 20 is a diagram illustrating a write control section 800 included in a control section 601 according to the second embodiment.
[0345] refer to Fig. 20 The write control section 800 receives input of a command Com, an address Addr, and data Data from the outside, and outputs a write command CAM-W and write data CAM-D for the search block 200. Further, the write control section 800 outputs a write command REG-W and write data REG-D for the register 704.
[0346] Furthermore, the write control section 800 has an address conversion table that converts a logical block address into a physical block address.
[0347] Upon receiving a command Com, an address Addr, and data Data from the outside, the write control section 800 performs an address conversion process by using an address conversion table.
[0348] By using the address conversion table, the write control section 800 converts, for example, a high-order bit logical block address of address information input externally into a physical block address and obtains access to the target search block 200 .
[0349] The write control section 800 performs an entry data write process on the search block 200 specified by the address Addr according to the write command CAM-W, or performs a logic block address write process on the register 704 for the specified search block 200 according to the write command REG-W.
[0350] Revise
[0351] In the first embodiment and the second embodiment, the host system can implement a process of determining the allocation of the search block 200 according to the above-mentioned specific allocation rule.
[0352] Specifically, the above process can be referred to as Figure 1 The CPU 2 described above executes the above-described operations. The CPU 2 collects information on the groups of entry data from the adjacent communication circuits through the transmission control circuit 4, and based on the collected information, determines the allocation of search blocks according to the above-mentioned specific allocation rule.
[0353] Meanwhile, the above process can be performed in the search memory.
[0354] Fig.21 is a diagram illustrating a configuration of a write control section according to a modification of the second embodiment.
[0355] refer to Fig.21 , the write control section 801 includes a CPU 802 .
[0356] Based on the respective numbers of search blocks 200 for storing entry data associated with the input search data keys 0 to 3 that are input, the CPU 802 performs a process of determining allocation of the search blocks 200 according to the above-described specific allocation rule.
[0357] The CPU 802 allocates the respective search blocks 200 for storing the entry data associated with the input search data keywords 0 to 3 based on the above determination process and sets the logical block addresses. Then, the CPU 802 creates an address setting table 820 for defining the association between the logical block addresses and the search blocks 200 storing the entry data associated with the input search data keywords 0 to 3.
[0358] Based on the address setting table 820, the CPU 802 creates an address translation table 810 that defines the association between the set logical block addresses and the physical block addresses.
[0359] The CPU 802 stores the logical block address set by the address setting table 820 in the register of the search block 200 for storing the entry data associated with the input search data keys 0 to 3.
[0360] More specifically, the CPU 802 in the write control section 801 receives input of the command Com, the address Addr and the data Data, and outputs a write command CAM-W and write data CAM-D for the search block 200. In addition, the CPU 802 outputs a write command REG-W and write data REG-D for the register 704.
[0361] Further, by using the address conversion table 810 , the CPU 802 in the write control section 801 converts, for example, a high-order bit logical block address of address information input externally into a physical block address, and obtains access to the target search block 200 .
[0362] The CPU 802 in the write control section 801 executes an entry data write process for the search block 200 specified by the address Addr according to the write command CAM-W, or executes a logical block address write process for the register 704 for the specified search block 200 according to the write command REG-W.
[0363] According to the above-described process, the priority of the search block 200 can be adjusted by storing entry data in the search block 200 and changing the logical block address stored in the register 704 provided for the search block 200 to a desired value.
[0364] Although the present disclosure has been described in detail according to specific embodiments, the present disclosure is not limited to the aforementioned embodiments. It should be understood by those skilled in the art that various modifications can be made without departing from the spirit and scope of the present disclosure.
Claims
1. A search memory that performs a search to determine whether input search data matches entry data stored in a memory cell array, and outputs address information associated with the matching entry data, the search memory comprising: a control section receiving the input of N search data input in parallel, wherein N is two or more; N search units; as well as N first selectors, the N first selectors are respectively arranged in association with the N search units so as to select two search data from the N search data, Wherein each of the search units comprises: multiple search blocks; and M second selectors, the M second selectors being respectively set in association with the search blocks so as to select one of the two search data selected by the first selector set for the associated search unit, and For at least one of the N search units, allocation is performed such that two types of N types of entry data respectively associated with the N search data are respectively stored in the search block.
2. The search memory according to claim 1, Wherein the N first selectors each output the two selected search data to each of the M second selectors set in association with the search block, so that the associated search block outputs high priority address information included in the address information, and the address information is associated with the matching entry data output from each search block in the search blocks.
3. The search memory according to claim 2, further comprising: N intermediate priority encoders are provided in association with the N search units so as to respectively output N groups of high priority address information included in the address information output from each of the search units.
4. A search memory according to claim 1, wherein when the number of some entry data among the N types of entry data to be stored in the search block is greater than the number of search blocks included in the search unit, for storage purposes, the N types of entry data are allocated to each search block among the search blocks in the N search units according to a predetermined rule.
5. The search memory according to claim 1, The address information includes a block address and priority information, the block address specifies at least one search block in the search blocks, and the priority information is associated with entry data in the specified search block. wherein the control section includes a write control section, the write control section being provided in association with the search block so as to perform a conversion to a physical block address, the physical block address being associated with the matching entry data in the designated search block, based on a block address stored in an associated block register and associated priority information, and The search units each include a plurality of block registers which are provided in association with the search blocks so as to store the block addresses of the allocated search blocks.
6. The search memory according to claim 5, The write control section performs a conversion into a physical block address obtained by combining the associated block address with the associated priority information, the associated block address being used as high-order bits and the associated priority information being used as low-order bits.
7. The search memory according to claim 6, further comprising: An address conversion table that changes a logical block address to be stored in a block register included in each of the search units into a physical block address.
