US20040125633A1 - Priority encoder for successive encoding of multiple matches in a CAM - Google Patents

Priority encoder for successive encoding of multiple matches in a CAM Download PDF

Info

Publication number
US20040125633A1
US20040125633A1 US10/330,269 US33026902A US2004125633A1 US 20040125633 A1 US20040125633 A1 US 20040125633A1 US 33026902 A US33026902 A US 33026902A US 2004125633 A1 US2004125633 A1 US 2004125633A1
Authority
US
United States
Prior art keywords
match
priority
indicator
highest priority
active
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
US10/330,269
Other versions
US6934172B2 (en
Inventor
Alon Regev
Zvi Regev
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Round Rock Research LLC
Original Assignee
Individual
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Individual filed Critical Individual
Priority to US10/330,269 priority Critical patent/US6934172B2/en
Assigned to MICRON TECHNOLOGY, INC. reassignment MICRON TECHNOLOGY, INC. ASSIGNMENT OF ASSIGNORS INTEREST (SEE DOCUMENT FOR DETAILS). Assignors: REGEV, ALON, REGEV, ZVI
Publication of US20040125633A1 publication Critical patent/US20040125633A1/en
Application granted granted Critical
Publication of US6934172B2 publication Critical patent/US6934172B2/en
Assigned to ROUND ROCK RESEARCH, LLC reassignment ROUND ROCK RESEARCH, LLC ASSIGNMENT OF ASSIGNORS INTEREST (SEE DOCUMENT FOR DETAILS). Assignors: MICRON TECHNOLOGY, INC.
Adjusted expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/74Selecting or encoding within a word the position of one or more bits having a specified value, e.g. most or least significant one or zero detection, priority encoders
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C15/00Digital stores in which information comprising one or more characteristic parts is written into the store and in which information is read-out by searching for one or more of these characteristic parts, i.e. associative or content-addressed stores

Definitions

  • the present invention relates to content addressable memories, and more specifically, to a content addressable memory having an improved priority encoder.
  • Priority encoders are electronic logic circuits that determine which of a number of inputs has the highest or lowest priority. Priority encoders are used in a number of computer systems, as well as other applications. Priority encoders can be utilized in conjunction with a content addressable memory (CAM), for example.
  • CAM content addressable memory
  • a CAM is a memory device in which data is accessed based upon its content, rather than its storage address or location.
  • a CAM generally includes multiple data storage locations comprising multiple memory cells. Contrary to DRAMs and SRAMs content addressable memories do not store data in any structured fashion. The locations at which data is stored within CAM can be merely random, where the data can be written directly into the first empty location within the CAM. Once data is stored in CAM, it can be found by comparing every bit in the CAM memory cells with data placed in a comparand register. Unlike random access memory (“RAM”), all data words in the storage locations of a CAM may be simultaneously compared with a search word stored in a comparand register. Data words stored in the CAM are compared with the search word.
  • RAM random access memory
  • a match line is activated for each data word that matches the search word. If a match exists for every bit stored in a particular location within the CAM corresponding to every bit in the comparand, a match line is asserted. A priority encoder can then sort out which matching location among multiple match lines has the top priority.
  • CAM devices are unique in that a user generally supplies the data and receives back an address for that data. Because the CAM does not require address lines to find data, the depth of the CAM can be extended as far as desired—well beyond the depth of a RAM.
  • a CAM device is useful in any application requiring fast searches of a database, lists, or pattern, and supplies heightened performance advantages over other memory search algorithms.
  • CAMs are particularly well suited for handling packet protocols, such as TCP/IP protocols employed in packet processors that are used to route information across an intranet or the Internet.
  • a CAM may generate multiple match signals on active match lines in response to a search request.
  • the match signals are sent to a priority encoder to determine the single address corresponding to the highest priority match.
  • a typical priority encoder has two stages. The first stage is a Highest Priority Indicator (HPI), which flags one output associated with the active input having the highest priority.
  • HPI Highest Priority Indicator
  • HPI 2 A typical prior art HPI 2 is shown in FIG. 1.
  • the second stage of the typical priority encoder is an address encoder, which converts the flag from the HPI into a binary number identifying the address of the flagged output.
  • HPI 2 typically operates like a “thermometer” in determining which of the match results has the highest priority.
  • match inputs from respective match lines in a CAM are applied to terminals 4 , 6 , 8 , and 10 , etc., of HPI 2 .
  • An enable signal is provided on line 12 .
  • the match line located on the lowest segment of the HPI is given the highest priority, by convention.
  • the match line that indicates a match on inputs 4 , 6 , 8 , 10 and which has the highest priority will cause the lowest output terminal 14 , 16 , 18 , 20 to change states, indicating a match.
  • HPI 2 utilizes an arrangement of logic gates to determine which of the inputs has the highest priority.
  • Each segment of HPI 2 includes a NOT gate, a NAND gate, and a NOR gate.
  • highest priority stage 30 includes NOT gate 32 which inverts enable input 12 , and supplies it to NOR gate 34 .
  • NOR gate 34 also receives a signal on match line input 4 .
  • Enable input 12 is supplied to NAND gate 36 , along with match line input 4 .
  • the result from NOR gate 34 is supplied on output terminal 14 .
  • HPI 2 includes several such stages, of which four are shown in FIG. 1.
  • the result from NAND gate 36 is supplied to the next logically lowest priority stage (physically higher on the “thermometer”) made up similarly of NOT gate 42 , NOR gate 44 , and NAND gate 46 .
  • NOR gate 44 supplies a signal to output terminal 16
  • NAND gate 46 supplies its signal to the third lowest priority stage made up of NOT gate 52 , NOR gate 54 , and NAND gate 56 .
  • a similar fourth-lowest priority stage is shown which includes NOT gate 62 , NOR gate 64 , and NAND gate 66 . Additional stages are indicated by the dashed result line provided on NAND gate 66 .
  • matches are indicated on match lines 4 , 6 , 8 , and 10 as logic 0, enable signal 12 having a logic high.
  • match line 4 is low, output 14 will be high, indicating a highest priority match on line 4 .
  • HPI 2 thus provides a single highest priority match.
  • the comparand data bits are implemented such that a comparison can be made for a logic state of 1, a logic state of 0, or a “don't care” state wherein bits in the comparand register are masked as not to be involved in the matching search.
  • a match is declared regardless of what state is in the respective “don't care” bits in the CAM words.
  • These “don't care” bits are used typically in a search known in the art as a search for the longest match. As a result of a search for the longest match, multiple words in the CAM may match the un-masked data bits in the comparand register.
  • a special multi-match detection circuit indicates the presence of multiple matches.
  • Using a typical prior art priority encoder only one match, the one with the highest priority, is recorded.
  • the user In order to determine the next highest priority match, the user must discard the highest priority match, and re-encode the CAM match results to obtain the next highest priority match.
  • Such manual manipulation of the CAM results is time consuming and inefficient. It is desirable, instead, to find the identity of all the matching words.
  • a priority encoder is needed that can automatically successively encode by priority multiple matches in a CAM.
  • This invention provides a priority encoder which automatically and successively encodes all the simultaneous matches in a CAM.
  • the priority encoder includes a highest priority indicator configured to receive data on multiple CAM match lines.
  • the priority encoder is successively cycled such that a highest priority active match line is successively flagged so long as a multiple match detector detects the presence of multiple simultaneously active match lines.
  • Logic circuitry disables an active match line once it is flagged by the highest priority indicator so that on each subsequent cycle of the priority encoder, the next highest priority match of the multiple matches is detected and address encoded.
  • FIG. 1 is an embodiment of a typical highest priority indicator of a known priority encoder.
  • FIG. 2 illustrates a highest priority indicator according to an exemplary embodiment of the present invention.
  • FIG. 3 illustrates a multiple match detector according to an exemplary embodiment of the present invention.
  • FIG. 4 illustrates a microprocessor based system which includes a CAM and a priority encoder according to an exemplary embodiment of the present invention.
  • FIG. 5 illustrates a router which includes a CAM and a priority encoder according to an exemplary embodiment of the present invention.
  • Priority encoder section 100 includes four inputs MATCH 0 -MATCH 3 for coupling to four match lines of a CAM.
  • matches are driven to a logic low value when a match occurs between the CAM search word and its associated CAM data word, although the invention is easily adaptable for active high match lines.
  • a controlling clock signal line CLOCK is provided through OR gate 102 to flip-flops 104 , 106 , 108 , and 110 , which also receive respective inputs MATCH 0 -MATCH 3 .
  • the outputs of flip-flops 104 , 106 , 108 , and 110 form one input to respective OR gates 112 , 114 , 116 , and 118 .
  • the other inputs to OR gates 112 , 114 , 116 , and 118 are disabling signals described further below.
  • OR gates 112 , 114 , 116 , and 118 are provided to respective inputs of a highest priority indicator segment 120 , described further below, and to a multiple match detector 122 .
  • Multiple match detector 122 determines whether simultaneous multiple matches are present on the match links ( 0 . . . 3 ).
  • An exemplary embodiment of a multiple match detector according to the present invention is described in detail below in connection with FIG. 3.
  • the output of multiple match detector 122 is OR'd with the CLOCK signal in OR gate 102 so that, as long as multiple matches continue to be detected, operation of the priority encoder successively repeats until all simultaneous match lines are encoded.
  • HPI 120 is identical in operation to HPI 2 described above in connection with FIG. 1, utilizing the same arrangement of logic gates to determine which of the inputs has the highest priority. Accordingly, each segment of HPI 120 includes a NOT (inverter) gate, a NAND gate, and a NOR gate.
  • a highest priority stage of HPI 120 receives its input from OR gate 112 and includes NOT gate 132 , which inverts an ENABLE input and supplies it to NOR gate 134 .
  • NOR gate 134 also receives a match signal from OR gate 112 . The ENABLE signal is supplied to NAND gate 136 , along with match line input from OR gate 112 .
  • the four match line segment of priority encoder 100 includes three more stages in HPI 100 .
  • the result from NAND gate 136 is supplied to the next logically lowest priority stage (physically higher on the “thermometer”) made up similarly of NOT gate 142 , NOR gate 144 , and NAND gate 146 .
  • NOR gate 144 supplies an output signal
  • NAND gate 146 supplies its signal to the third lowest priority stage which includes NOT gate 152 , NOR gate 154 , and NAND gate 156 .
  • a similar fourth-lowest priority stage is shown which includes NOT gate 162 , NOR gate 164 , and NAND gate 166 . Additional stages are indicated by the output line provided on NAND gate 166 .
  • Signals from NOR gates 134 , 144 , 154 , and 164 , and inverted signals generated by NOT gates 172 , 174 , 176 , and 178 , are supplied to S/R flip-flops 180 , 183 , 186 , and 189 , respectively, represented as paired, three-input NOR gates 181 and 182 , 184 and 185 , 187 and 188 , and 190 and 191 in FIG. 2.
  • Each of the S/R flip-flops also receives control inputs from multiple matches detector 122 , latched by flip-flop 192 with the CLOCK signal. Successive encoding takes place on all simultaneous multiple matches so long as multiple matches are detected.
  • S/R flip-flops 180 , 183 , 186 , 189 operate when the output of NOR gates 190 and 194 both are logic LOW.
  • the multiple matches output goes HIGH, indicating multiple matches, that signal is clocked by the flip-flop 192 that feeds the gates 190 and 194 . Since the output of flip-flop 192 lags one clock period behind the multiple match detector signal, the processing of the multi-match case is delayed by one clock period.
  • a SUCCESSIVE input further controls operation of the S/R flip-flops by providing a logic LOW when successive multi-match encoding is required.
  • a logic HIGH resets the flip-flops and enables a new series of multiple match encoding.
  • the multiple match and CLOCK signals are provided by way of NOR gate 190 one side of the S/R flip-flops 180 . . . 189 .
  • the multiple match signal, and an inverted SUCCESSIVE signal provided by NOT gate 193 are inputted by way of NOR gate 194 to another side of the S/R flip-flops.
  • S/R flip-flops 180 , 183 , 186 , and 189 are clocked with the CLOCK signal by way of master-slave flip-flops 195 - 198 .
  • the results are provided to address encoder 199 , and also are fed back to OR gates 112 , 114 , 116 , and 118 .
  • the priority encoder 100 operates by way of the highest priority indicator 120 , augmented with NOR gates 112 , 114 , 116 , and 118 on each input.
  • the NOR gates receive feed back information from S/R flip-flops 180 , 183 , 186 , and 189 , as applied to the master/slave flip-flops 195 - 198 .
  • the S/R flip-flops 180 . . . 189 are allowed to trip when an output of HPI 120 goes logic high.
  • the output of the tripped SR flip-flop is clocked into the Master/Slave flip-flop 195 . . . 198 which follows it, causing its output to go to the logic high state as well.
  • the high state also is fed back to the input of the OR gate on the input side of HPI 120 , disabling the highest priority input, and allowing the next, lower priority input to be flagged by the HPI.
  • the output of flip-flops 195 - 198 also are received by address encoder 199 which generates the address of the corresponding data word of the then highest priority match.
  • This process repeats as long multiple matches are detected. Once there is only a single, unblocked match detected and encoded, the process stops automatically, and the SR flip-flops 180 . . . 189 are reset by a logic high on the SUCCESSIVE signal line, to prepare the circuit for further operations.
  • a transistor circuit 200 for use in multiple matches detector 122 is shown in detail in FIG. 3.
  • Transistor circuit 200 receives multiple inputs on lines M 11 -M 17 and an ENABLE signal.
  • An array of transistor switches is provided such that if more than one of the inputs M 11 -M 17 indicates an active match, the multiple match indicator will provide a logic high MULTIPLE MATCHES output signal indicating the presence of multiple, simultaneous matches.
  • the illustrated transistor circuit 200 functions as interconnected AND and OR current gates which provide a current drain at input CIN of current sensor 220 whenever multiple matches are present at the inputs MI 1 . . . MI 7 and an enable signal is present at ENABLE_N.
  • a reference signal CREF also must be present for the circuit to operate.
  • the MULTIPLE MATCHES output signal is present at the current sense receiver 220 .
  • the transistor circuit 200 detects multiple matches in the CAM.
  • the circuit finds all possible cases of any two simultaneous matches by performing an AND function between any two match-lines.
  • eight match-line inputs are provided, although the invention is not so limited. As can be seen, however, as the number of inputs grows, the number of AND gates required increases factorially.
  • a processor system 300 which uses a CAM 310 employing a multi-match priority encoder 311 according to the present invention.
  • Processor system 300 generally comprises a central processing unit (CPU) 302 , such as a microprocessor, that communicates with one or more input/output (I/O) devices 304 over a bus 306 .
  • the processor system 300 also includes random access memory (RAM) 308 .
  • RAM random access memory
  • One or more CAM devices 310 also communicate with CPU 302 , CAM 310 utilizing a priority encoder 311 according to the present invention.
  • the system may also include peripheral devices such as a floppy disk drive 312 and a compact disk (CD) ROM drive 314 which also communicate with CPU 302 over the bus 306 .
  • peripheral devices such as a floppy disk drive 312 and a compact disk (CD) ROM drive 314 which also communicate with CPU 302 over the bus 306 .
  • FIG. 5 illustrates a router 300 including a CAM containing a multi-match priority encoder according to the present invention.
  • Router 300 is connected to a CAM array memory chip 304 as may be used in a communications network, such as, e.g., part of the Internet backbone.
  • Router 300 includes a plurality of input lines and a plurality of output lines. Data transmitted from one location to another is sent in packet form. Prior to the packet reaching its final destination, packet are received devices, such as router 300 , for decoding data identifying the packet's ultimate destination, and deciding which output line and what forwarding instructions are required for the packet.
  • the present invention provides an apparatus and method for successively encoding multiple simultaneous matches in a CAM. While preferred embodiments of the invention have been described and illustrated above, it should be understood that these are exemplary of the invention and are not to be considered as limiting. Additions, deletions, substitutions, and other modifications can be made without departing from the spirit or scope of the present invention. Accordingly, the invention is not to be considered as limited by the foregoing description but is only limited by the scope of the appended claims.

Abstract

A priority encoder includes a highest priority indicator configured to receive data on multiple content addressable memory (CAM) match lines and flag a highest priority active match line. A multiple match detector detects the presence of multiple simultaneously active match lines. Logic circuitry disables an active match line flagged by the highest priority indicator. The highest priority indicator successively cycles so long as the multiple match detector detects the presence of multiple simultaneously active CAM match lines.

Description

    BACKGROUND OF THE INVENTION
  • 1. Field of the Invention [0001]
  • The present invention relates to content addressable memories, and more specifically, to a content addressable memory having an improved priority encoder. [0002]
  • 2. Brief Description of the Related Art [0003]
  • Priority encoders are electronic logic circuits that determine which of a number of inputs has the highest or lowest priority. Priority encoders are used in a number of computer systems, as well as other applications. Priority encoders can be utilized in conjunction with a content addressable memory (CAM), for example. [0004]
  • A CAM is a memory device in which data is accessed based upon its content, rather than its storage address or location. A CAM generally includes multiple data storage locations comprising multiple memory cells. Contrary to DRAMs and SRAMs content addressable memories do not store data in any structured fashion. The locations at which data is stored within CAM can be merely random, where the data can be written directly into the first empty location within the CAM. Once data is stored in CAM, it can be found by comparing every bit in the CAM memory cells with data placed in a comparand register. Unlike random access memory (“RAM”), all data words in the storage locations of a CAM may be simultaneously compared with a search word stored in a comparand register. Data words stored in the CAM are compared with the search word. A match line is activated for each data word that matches the search word. If a match exists for every bit stored in a particular location within the CAM corresponding to every bit in the comparand, a match line is asserted. A priority encoder can then sort out which matching location among multiple match lines has the top priority. CAM devices are unique in that a user generally supplies the data and receives back an address for that data. Because the CAM does not require address lines to find data, the depth of the CAM can be extended as far as desired—well beyond the depth of a RAM. [0005]
  • A CAM device is useful in any application requiring fast searches of a database, lists, or pattern, and supplies heightened performance advantages over other memory search algorithms. Currently, CAMs are particularly well suited for handling packet protocols, such as TCP/IP protocols employed in packet processors that are used to route information across an intranet or the Internet. [0006]
  • In a typical application, a CAM may generate multiple match signals on active match lines in response to a search request. Typically, the match signals are sent to a priority encoder to determine the single address corresponding to the highest priority match. [0007]
  • A typical priority encoder has two stages. The first stage is a Highest Priority Indicator (HPI), which flags one output associated with the active input having the highest priority. A typical [0008] prior art HPI 2 is shown in FIG. 1. The second stage of the typical priority encoder is an address encoder, which converts the flag from the HPI into a binary number identifying the address of the flagged output.
  • Referring to FIG. 1, HPI [0009] 2 typically operates like a “thermometer” in determining which of the match results has the highest priority. Conventionally, match inputs from respective match lines in a CAM are applied to terminals 4, 6, 8, and 10, etc., of HPI 2. An enable signal is provided on line 12. When multiple matches are encountered, the match line located on the lowest segment of the HPI is given the highest priority, by convention. The match line that indicates a match on inputs 4, 6, 8, 10 and which has the highest priority will cause the lowest output terminal 14, 16, 18, 20 to change states, indicating a match.
  • As shown in FIG. 1, HPI [0010] 2 utilizes an arrangement of logic gates to determine which of the inputs has the highest priority. Each segment of HPI 2 includes a NOT gate, a NAND gate, and a NOR gate. Referring to FIG. 1, highest priority stage 30 includes NOT gate 32 which inverts enable input 12, and supplies it to NOR gate 34. NOR gate 34 also receives a signal on match line input 4. Enable input 12 is supplied to NAND gate 36, along with match line input 4. The result from NOR gate 34 is supplied on output terminal 14.
  • HPI [0011] 2 includes several such stages, of which four are shown in FIG. 1. Thus, the result from NAND gate 36 is supplied to the next logically lowest priority stage (physically higher on the “thermometer”) made up similarly of NOT gate 42, NOR gate 44, and NAND gate 46. NOR gate 44 supplies a signal to output terminal 16, and NAND gate 46 supplies its signal to the third lowest priority stage made up of NOT gate 52, NOR gate 54, and NAND gate 56. A similar fourth-lowest priority stage is shown which includes NOT gate 62, NOR gate 64, and NAND gate 66. Additional stages are indicated by the dashed result line provided on NAND gate 66.
  • In operation, matches are indicated on [0012] match lines 4, 6, 8, and 10 as logic 0, enable signal 12 having a logic high. Thus, in the first stage 30, if match line 4 is low, output 14 will be high, indicating a highest priority match on line 4. HPI 2 thus provides a single highest priority match.
  • In certain applications, it may be desirable to encode more than one highest priority input. For example, in CAMs, the comparand data bits are implemented such that a comparison can be made for a logic state of 1, a logic state of 0, or a “don't care” state wherein bits in the comparand register are masked as not to be involved in the matching search. A match is declared regardless of what state is in the respective “don't care” bits in the CAM words. These “don't care” bits are used typically in a search known in the art as a search for the longest match. As a result of a search for the longest match, multiple words in the CAM may match the un-masked data bits in the comparand register. In such a typical application, a special multi-match detection circuit indicates the presence of multiple matches. Using a typical prior art priority encoder, only one match, the one with the highest priority, is recorded. In order to determine the next highest priority match, the user must discard the highest priority match, and re-encode the CAM match results to obtain the next highest priority match. Such manual manipulation of the CAM results is time consuming and inefficient. It is desirable, instead, to find the identity of all the matching words. [0013]
  • A priority encoder is needed that can automatically successively encode by priority multiple matches in a CAM. [0014]
  • BRIEF SUMMARY OF THE INVENTION
  • This invention provides a priority encoder which automatically and successively encodes all the simultaneous matches in a CAM. The priority encoder includes a highest priority indicator configured to receive data on multiple CAM match lines. The priority encoder is successively cycled such that a highest priority active match line is successively flagged so long as a multiple match detector detects the presence of multiple simultaneously active match lines. Logic circuitry disables an active match line once it is flagged by the highest priority indicator so that on each subsequent cycle of the priority encoder, the next highest priority match of the multiple matches is detected and address encoded.[0015]
  • BRIEF DESCRIPTION OF THE DRAWINGS
  • FIG. 1 is an embodiment of a typical highest priority indicator of a known priority encoder. [0016]
  • FIG. 2 illustrates a highest priority indicator according to an exemplary embodiment of the present invention. [0017]
  • FIG. 3 illustrates a multiple match detector according to an exemplary embodiment of the present invention. [0018]
  • FIG. 4 illustrates a microprocessor based system which includes a CAM and a priority encoder according to an exemplary embodiment of the present invention. [0019]
  • FIG. 5 illustrates a router which includes a CAM and a priority encoder according to an exemplary embodiment of the present invention. [0020]
  • DETAILED DESCRIPTION OF THE INVENTION
  • Referring to FIG. 2, a four [0021] match line section 100 of a priority encoder according to an exemplary embodiment of the present invention is illustrated. Priority encoder section 100 includes four inputs MATCH 0-MATCH 3 for coupling to four match lines of a CAM. In the present embodiment, matches are driven to a logic low value when a match occurs between the CAM search word and its associated CAM data word, although the invention is easily adaptable for active high match lines.
  • A controlling clock signal line CLOCK is provided through OR [0022] gate 102 to flip- flops 104, 106, 108, and 110, which also receive respective inputs MATCH 0-MATCH 3. The outputs of flip- flops 104, 106, 108, and 110 form one input to respective OR gates 112, 114, 116, and 118. The other inputs to OR gates 112, 114, 116, and 118 are disabling signals described further below.
  • The outputs of OR [0023] gates 112, 114, 116, and 118 are provided to respective inputs of a highest priority indicator segment 120, described further below, and to a multiple match detector 122. Multiple match detector 122 determines whether simultaneous multiple matches are present on the match links (0 . . . 3). An exemplary embodiment of a multiple match detector according to the present invention is described in detail below in connection with FIG. 3.
  • The output of [0024] multiple match detector 122 is OR'd with the CLOCK signal in OR gate 102 so that, as long as multiple matches continue to be detected, operation of the priority encoder successively repeats until all simultaneous match lines are encoded.
  • During each cycle of the priority encoder, a highest priority match is indicated by highest priority indicator (HPI) [0025] 120, a portion of which is shown in FIG. 2. HPI 120 is identical in operation to HPI 2 described above in connection with FIG. 1, utilizing the same arrangement of logic gates to determine which of the inputs has the highest priority. Accordingly, each segment of HPI 120 includes a NOT (inverter) gate, a NAND gate, and a NOR gate. A highest priority stage of HPI 120 receives its input from OR gate 112 and includes NOT gate 132, which inverts an ENABLE input and supplies it to NOR gate 134. NOR gate 134 also receives a match signal from OR gate 112. The ENABLE signal is supplied to NAND gate 136, along with match line input from OR gate 112.
  • The four match line segment of [0026] priority encoder 100 includes three more stages in HPI 100. Thus, the result from NAND gate 136 is supplied to the next logically lowest priority stage (physically higher on the “thermometer”) made up similarly of NOT gate 142, NOR gate 144, and NAND gate 146. NOR gate 144 supplies an output signal, and NAND gate 146 supplies its signal to the third lowest priority stage which includes NOT gate 152, NOR gate 154, and NAND gate 156. A similar fourth-lowest priority stage is shown which includes NOT gate 162, NOR gate 164, and NAND gate 166. Additional stages are indicated by the output line provided on NAND gate 166.
  • Signals from NOR [0027] gates 134, 144, 154, and 164, and inverted signals generated by NOT gates 172, 174, 176, and 178, are supplied to S/R flip- flops 180, 183, 186, and 189, respectively, represented as paired, three-input NOR gates 181 and 182, 184 and 185, 187 and 188, and 190 and 191 in FIG. 2. Each of the S/R flip-flops also receives control inputs from multiple matches detector 122, latched by flip-flop 192 with the CLOCK signal. Successive encoding takes place on all simultaneous multiple matches so long as multiple matches are detected. The last match is detected because S/R flip- flops 180, 183, 186, 189 operate when the output of NOR gates 190 and 194 both are logic LOW. When the multiple matches output goes HIGH, indicating multiple matches, that signal is clocked by the flip-flop 192 that feeds the gates 190 and 194. Since the output of flip-flop 192 lags one clock period behind the multiple match detector signal, the processing of the multi-match case is delayed by one clock period.
  • A SUCCESSIVE input further controls operation of the S/R flip-flops by providing a logic LOW when successive multi-match encoding is required. A logic HIGH resets the flip-flops and enables a new series of multiple match encoding. [0028]
  • The multiple match and CLOCK signals are provided by way of NOR [0029] gate 190 one side of the S/R flip-flops 180 . . . 189. The multiple match signal, and an inverted SUCCESSIVE signal provided by NOT gate 193, are inputted by way of NOR gate 194 to another side of the S/R flip-flops.
  • The outputs of S/R flip-[0030] flops 180, 183, 186, and 189 are clocked with the CLOCK signal by way of master-slave flip-flops 195-198. The results are provided to address encoder 199, and also are fed back to OR gates 112, 114, 116, and 118.
  • The [0031] priority encoder 100 operates by way of the highest priority indicator 120, augmented with NOR gates 112, 114, 116, and 118 on each input. The NOR gates receive feed back information from S/R flip- flops 180, 183, 186, and 189, as applied to the master/slave flip-flops 195-198.
  • When multiple simultaneous matches are detected by [0032] multiple matches detector 122, the S/R flip-flops 180 . . . 189 are allowed to trip when an output of HPI 120 goes logic high. On the following clock transition, the output of the tripped SR flip-flop is clocked into the Master/Slave flip-flop 195 . . . 198 which follows it, causing its output to go to the logic high state as well. The high state also is fed back to the input of the OR gate on the input side of HPI 120, disabling the highest priority input, and allowing the next, lower priority input to be flagged by the HPI. Each time a highest priority match is detected, the output of flip-flops 195-198 also are received by address encoder 199 which generates the address of the corresponding data word of the then highest priority match.
  • This process repeats as long multiple matches are detected. Once there is only a single, unblocked match detected and encoded, the process stops automatically, and the SR flip-[0033] flops 180 . . . 189 are reset by a logic high on the SUCCESSIVE signal line, to prepare the circuit for further operations.
  • A [0034] transistor circuit 200 for use in multiple matches detector 122 is shown in detail in FIG. 3. Transistor circuit 200 receives multiple inputs on lines M11-M17 and an ENABLE signal. An array of transistor switches is provided such that if more than one of the inputs M11-M17 indicates an active match, the multiple match indicator will provide a logic high MULTIPLE MATCHES output signal indicating the presence of multiple, simultaneous matches.
  • The illustrated [0035] transistor circuit 200 functions as interconnected AND and OR current gates which provide a current drain at input CIN of current sensor 220 whenever multiple matches are present at the inputs MI1 . . . MI7 and an enable signal is present at ENABLE_N. A reference signal CREF also must be present for the circuit to operate. The MULTIPLE MATCHES output signal is present at the current sense receiver 220.
  • The [0036] transistor circuit 200 detects multiple matches in the CAM. The circuit finds all possible cases of any two simultaneous matches by performing an AND function between any two match-lines. In circuit 200, eight match-line inputs are provided, although the invention is not so limited. As can be seen, however, as the number of inputs grows, the number of AND gates required increases factorially.
  • Using current flow as the logic outcome, having two transistor switches in series equates to an AND gate, as both switches must be closed for current to flow. Likewise, a parallel connection of switches provides an OR function, as it is enough for one switch to be closed to allow current flow. In the [0037] circuit 200, current sensing receiver 220 detects any existing current flow, indicating at least two simultaneous matches. Receiver 220 is a synchronous device that operates only when enabled. Transistor M36 is provided to allow current flow in the circuit only when the receiver is enabled by signal ENABLE_N. Transistor M37 acts a large controllable resistance which limits the magnitude of the current flowing through the receiver.
  • Referring to FIG. 4, a [0038] processor system 300 is represented which uses a CAM 310 employing a multi-match priority encoder 311 according to the present invention. Processor system 300 generally comprises a central processing unit (CPU) 302, such as a microprocessor, that communicates with one or more input/output (I/O) devices 304 over a bus 306. The processor system 300 also includes random access memory (RAM) 308. One or more CAM devices 310 also communicate with CPU 302, CAM 310 utilizing a priority encoder 311 according to the present invention. The system may also include peripheral devices such as a floppy disk drive 312 and a compact disk (CD) ROM drive 314 which also communicate with CPU 302 over the bus 306.
  • FIG. 5 illustrates a [0039] router 300 including a CAM containing a multi-match priority encoder according to the present invention. Router 300 is connected to a CAM array memory chip 304 as may be used in a communications network, such as, e.g., part of the Internet backbone. Router 300 includes a plurality of input lines and a plurality of output lines. Data transmitted from one location to another is sent in packet form. Prior to the packet reaching its final destination, packet are received devices, such as router 300, for decoding data identifying the packet's ultimate destination, and deciding which output line and what forwarding instructions are required for the packet.
  • The present invention provides an apparatus and method for successively encoding multiple simultaneous matches in a CAM. While preferred embodiments of the invention have been described and illustrated above, it should be understood that these are exemplary of the invention and are not to be considered as limiting. Additions, deletions, substitutions, and other modifications can be made without departing from the spirit or scope of the present invention. Accordingly, the invention is not to be considered as limited by the foregoing description but is only limited by the scope of the appended claims. [0040]

Claims (43)

What is claimed as new and desired to be protected by Letters Patent of the United States is:
1. A priority encoder comprising:
a priority indicator configured to receive match data on multiple match lines and flag a priority line;
a multiple match detector configured to detect the presence of multiple simultaneously active match lines;
logic circuitry for disabling an active match line flagged by the priority indicator; and
cycling circuitry for repeatedly cycling the highest priority indicator to flag a priority active match line if the multiple match detector detects the presence of multiple simultaneously active match lines.
2. The priority encoder of claim 1, wherein the match data is received from a content addressable memory.
3. The priority encoder of claim 1, further comprising address encoding circuitry for outputting the address locations of each priority match line flagged by the priority indicator.
4. The priority encoder of claim 1, wherein the priority indicator includes a plurality of match indicator segments, each indicator segment being associated with a match line input.
5. The priority encoder of claim 4, wherein each indicator segment includes a NOR gate receiving an associated match line signal, a NOT gate passing an enable signal to the NOR gate, and a NAND gate linking the match line signal and the enable signal to a next priority segment.
6. The priority encoder of claim 4, wherein the logic circuitry includes a plurality of flip-flops respectively associated with each segment for disabling active match lines.
7. The priority encoder of claim 1, wherein the priority indicator indicates a highest priority.
8. A content addressable memory comprising:
a priority encoder having a highest priority indicator configured to receive match data on respective CAM word match lines and flag a highest priority active match line;
a multiple match detector configured to detect the presence of multiple simultaneously active match lines;
logic circuitry for disabling an active match line flagged by the highest priority indicator; and
cycling circuitry for repeatedly cycling the highest priority indicator if the multiple match detector detects the presence of multiple simultaneously active match lines.
9. The content addressable memory of claim 8, further comprising address encoding circuitry for outputting the address locations of each highest priority match line flagged by the highest priority indicator.
10. The content addressable memory of claim 8, wherein the highest priority indicator includes a plurality of indicator segments, each indicator segment being associated with a match line input.
11. The content addressable memory of claim 10, wherein each indicator segment includes a NOR gate receiving an associated match line signal, a NOT gate passing an enable signal to the NOR gate, and a NAND gate linking the match line signal and the enable signal to a next lower priority segment.
12. The content addressable memory of claim 11, wherein the logic circuitry includes a series of flip-flops associated with each segment for disabling active match lines.
13. A processor system comprising:
a processor;
a content addressable memory coupled to said processor, said content addressable memory including:
a priority encoder having a highest priority indicator configured to receive data on multiple match lines and flag a highest priority active match line;
a multiple match detector configured to detect the presence of multiple simultaneously active match lines;
logic circuitry for disabling an active match line flagged by the highest priority indicator; and
cycling circuitry for repeatedly cycling the highest priority indicator if the multiple match detector detects the presence of multiple simultaneously active match lines.
14. The processor system of claim 13, further comprising address encoding circuitry for outputting the address locations of each priority match line flagged by the highest priority indicator.
15. The processor system of claim 13, wherein the priority indicator includes a plurality of match indicator segments, each indicator segment being associated with a match line input.
16. The processor system of claim 15, wherein each indicator segment includes a NOR gate receiving an associated match line signal, a NOT gate passing an enable signal to the NOR gate, and a NAND gate linking the match line signal and the enable signal to a next priority segment.
17. The processor system of claim 15, wherein the logic circuitry includes a plurality of flip-flops respectively associated with each segment.
18. The processor system of claim 13, wherein the priority indicator indicates a highest priority.
19. A router comprising:
a plurality of message receiving inputs;
a plurality of message transmitting outputs; and
a content addressable memory (CAM) used to route messages on the inputs to the outputs, the CAM including:
a priority encoder having a highest priority indicator configured to receive data on multiple match lines and flag a highest priority active match line;
a multiple match detector configured to detect the presence of multiple simultaneously active match lines;
logic circuitry for disabling an active match line flagged by the highest priority indicator; and
cycling circuitry for repeatedly cycling the highest priority indicator if the multiple match detector detects the presence of multiple simultaneously active match lines.
20. The router of claim 19, further comprising address encoding circuitry for outputting the address locations of each priority match line flagged by the highest priority indicator.
21. The router of claim 19, wherein the priority indicator includes a plurality of match indicator segments, each indicator segment being associated with a match line input.
22. The router of claim 21, wherein each indicator segment includes a NOR gate receiving an associated match line signal, a NOT gate passing an enable signal to the NOR gate, and a NAND gate linking the match line signal and the enable signal to a next priority segment.
23. The router of claim 21, wherein the logic circuitry includes a plurality of flip-flops respectively associated with each segment.
24. The router of claim 19, wherein the priority indicator indicates a highest priority.
25. A method of successively encoding multiple matches in a content addressable memory, the method comprising the steps of:
inputting data on multiple match lines to a priority indicator for determining a priority of an active match;
flagging a priority active match determined by the priority indicator;
determining if multiple matches are present on the match lines;
disabling the flagged active match line;
cycling the priority indicator to determine the next priority match; and
successively repeating the steps until no multiple matches are present.
26. The method of claim 25, wherein each priority match is a highest priority match.
27. The method of claim 25, further comprising encoding an address for each of the multiple matches.
28. A priority encoder comprising a hierarchical series of interconnected encoder stages, each stage including a match line input for receiving data from a memory location, an indicator segment that receives the data and generates a priority signal, and a lockout gate for removing a highest priority signal from being received by the indicator segment.
29. The priority encoder of claim 28, further comprising a multiple simultaneous match indicator circuit for indicating multiple simultaneous matches on the match line inputs.
30. The priority encoder of claim 29, further comprising cycling circuitry for successively cycling the priority encoder if multiple simultaneous matches are indicated.
31. The priority encoder of claim 30, further comprising address encoding circuitry for encoding addresses of successive matches indicated by the priority encoder.
32. A method of operating a priority encoder comprising:
receiving multiple match line signals associated with respective memory locations, each signal indicating a match with a respective word stored in a memory location;
processing the multiple match line signals such that addresses of the respective memory locations are provided successively in a hierarchical priority match order.
33. The method of claim 32, further comprising the step of indicating multiple simultaneous matches.
34. The method of claim 33, further comprising steps of sequentially cycling the CAM line signals if multiple simultaneous matches are indicated.
35. The method of claim 32, further comprising encoding addresses of matches indicated.
36. A method of successively encoding multiple matches in a content addressable memory, the method comprising the steps of:
(a) detecting multiple simultaneous matches in the content addressable memory;
(b) determining a highest priority match;
(c) removing the highest priority match determined in step (b) as one of the multiple simultaneous matches; and
(d) repeating steps (a) through (c) until multiple simultaneous matches are no longer detected.
37. A method of operating a router, the method comprising steps of:
receiving a plurality of message inputs;
transmitting a plurality of message outputs; and
routing messages on the inputs to the outputs using a content addressable memory (CAM), the CAM performing the method of:
receiving data on multiple match lines with a priority encoder having a highest priority indicator, and flagging a highest priority active match line;
detecting the presence of multiple matches using a multiple match detector;
disabling an active match line flagged by the highest priority indicator; and
operating the highest priority indicator again to flag a highest priority match line if the multiple match detector detects the presence of multiple active match lines.
38. A method of successively encoding multiple matches in a content addressable memory, the method comprising:
receiving multiple match signals associated with respective memory locations, each signal indicating a match of a search word with a respective word store in a memory location; and
processing the multiple match signals such that addresses of the respective memory locations are provided successively in a priority order.
39. The method of claim 38, wherein the step of processing the multiple match signals includes the steps of determining a highest priority match from among the multiple match signals, and removing the highest priority match as one of the multiple match signals in a next following highest priority match determination.
40. A content addressable memory comprising:
multiple match lines carrying signals associated with respective memory locations, each signal indicating a match of a search word with a respective word stored in a memory location; and
a priority encoder for processing the multiple match signals such that addresses of memory locations are provided successively in a priority order.
41. The content addressable memory of claim 40, wherein the priority encoder includes a series of indicator stages, each stage receiving an input on one of the multiple match lines.
42. The content addressable memory of claim 41, wherein each indicator stage includes a priority logic circuit for receiving the match line input and generating a signal indicating a priority match.
43. The content addressable memory of claim 42, wherein each indicator stage includes a lock-out circuit for successively blocking highest priority matches from being received as match line input to the indicator stage.
US10/330,269 2002-12-30 2002-12-30 Priority encoder for successive encoding of multiple matches in a CAM Expired - Fee Related US6934172B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US10/330,269 US6934172B2 (en) 2002-12-30 2002-12-30 Priority encoder for successive encoding of multiple matches in a CAM

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
US10/330,269 US6934172B2 (en) 2002-12-30 2002-12-30 Priority encoder for successive encoding of multiple matches in a CAM

Publications (2)

Publication Number Publication Date
US20040125633A1 true US20040125633A1 (en) 2004-07-01
US6934172B2 US6934172B2 (en) 2005-08-23

Family

ID=32654467

Family Applications (1)

Application Number Title Priority Date Filing Date
US10/330,269 Expired - Fee Related US6934172B2 (en) 2002-12-30 2002-12-30 Priority encoder for successive encoding of multiple matches in a CAM

Country Status (1)

Country Link
US (1) US6934172B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005085168A (en) * 2003-09-10 2005-03-31 Matsushita Electric Ind Co Ltd Priority circuit
US7822916B1 (en) 2006-10-31 2010-10-26 Netlogic Microsystems, Inc. Integrated circuit search engine devices having priority sequencer circuits therein that sequentially encode multiple match signals

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030223259A1 (en) * 2002-05-31 2003-12-04 Mosaid Technologies Incorporated Method and apparatus for performing variable word width searches in a content addressable memory
US6718433B1 (en) * 2000-12-08 2004-04-06 Netlogic Microsystems, Inc. Match and priority encoding logic circuit
US6717876B2 (en) * 2001-12-28 2004-04-06 Mosaid Technologies Incorporated Matchline sensing for content addressable memories

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6718433B1 (en) * 2000-12-08 2004-04-06 Netlogic Microsystems, Inc. Match and priority encoding logic circuit
US6717876B2 (en) * 2001-12-28 2004-04-06 Mosaid Technologies Incorporated Matchline sensing for content addressable memories
US20030223259A1 (en) * 2002-05-31 2003-12-04 Mosaid Technologies Incorporated Method and apparatus for performing variable word width searches in a content addressable memory

Also Published As

Publication number Publication date
US6934172B2 (en) 2005-08-23

Similar Documents

Publication Publication Date Title
US6944710B2 (en) Multiple category CAM
US6477615B1 (en) Detecting circuit and detecting method of idle word for content addressable memory
US6987683B2 (en) Magnitude comparator based content addressable memory for search and sorting
US6954823B1 (en) Search engine device and method for generating output search responses from multiple input search responses
US6707694B2 (en) Multi-match detection circuit for use with content-addressable memories
US7386660B2 (en) CAM with automatic writing to the next free address
US7107392B2 (en) Content addressable memory (CAM) device employing a recirculating shift register for data storage
US20030097605A1 (en) Range check cell and a method for the use thereof
US7155565B2 (en) Automatic learning in a CAM
US6934172B2 (en) Priority encoder for successive encoding of multiple matches in a CAM
US7003624B2 (en) Method and apparatus for detecting “almost match” in a CAM
US8438345B2 (en) Multi-priority encoder
US7224593B2 (en) Detecting “almost match” in a CAM
US6934797B2 (en) Counter in CAM word
US6809944B2 (en) CAM with automatic next free address pointer
US7257670B2 (en) Multipurpose CAM circuit
US6976123B2 (en) Priority resolver and “near match” detection circuit
US6865097B2 (en) Priority encoder
US7203083B2 (en) Longest match detection in a CAM
US20030058673A1 (en) Reducing signal swing in a match detection circuit

Legal Events

Date Code Title Description
AS Assignment

Owner name: MICRON TECHNOLOGY, INC., IDAHO

Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNORS:REGEV, ALON;REGEV, ZVI;REEL/FRAME:013628/0335

Effective date: 20021228

CC Certificate of correction
FEPP Fee payment procedure

Free format text: PAYOR NUMBER ASSIGNED (ORIGINAL EVENT CODE: ASPN); ENTITY STATUS OF PATENT OWNER: LARGE ENTITY

FPAY Fee payment

Year of fee payment: 4

AS Assignment

Owner name: ROUND ROCK RESEARCH, LLC,NEW YORK

Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNOR:MICRON TECHNOLOGY, INC.;REEL/FRAME:023786/0416

Effective date: 20091223

Owner name: ROUND ROCK RESEARCH, LLC, NEW YORK

Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNOR:MICRON TECHNOLOGY, INC.;REEL/FRAME:023786/0416

Effective date: 20091223

FPAY Fee payment

Year of fee payment: 8

REMI Maintenance fee reminder mailed
LAPS Lapse for failure to pay maintenance fees

Free format text: PATENT EXPIRED FOR FAILURE TO PAY MAINTENANCE FEES (ORIGINAL EVENT CODE: EXP.)

STCH Information on status: patent discontinuation

Free format text: PATENT EXPIRED DUE TO NONPAYMENT OF MAINTENANCE FEES UNDER 37 CFR 1.362

FP Lapsed due to failure to pay maintenance fee

Effective date: 20170823