# US 2004/0205292 A1 · Configurable ternary content addressable memory

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2004/0205292 A1
- Document ID: US20040205292A1
- Status: Published application
- Kind: A1
- Application number: 10/403,110
- Filed: 2003-03-31
- Published: 2004-10-14
- Earliest claimed: 2003-03-31
- Assignees: Zarlink Semiconductor V.N. Inc.
- Inventors: RayChin Lu
- Web page: https://patentgrep.com/patent/US20040205292A1

## CPC

- G11C 15/00: Digital 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
- H04L 45/7453: using hashing
- G11C: STATIC STORES (semiconductor memory devices H10B)
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

A Ternary/Content Addressable Memory (T/CAM) design is presented. The CAM includes a rule table implemented using a Random Access Module (RAM) storing n rule entries. An n-to-1 multiplexer module, responsive to a value C of a cycle counter, varying between 0 to n-1, provides a selected C'th rule entry to a comparator block which performs a comparison between the selected C'th rule entry and a matching key. The resulting comparison result together with the value C are used to decode the matched rule. In implementing a TCAM, a bitmask table implemented using a RAM module storing n bitmask entries is used. An n-to-1 multiplexer module, responsive to the value C provides a corresponding C'th bitmask to a masking module which modifies the comparison result to ignore a subgroup of results of bitwise comparisons between the C'th rule entry and the matching key. T/CAM implementations adhering to the described embodiment support comparison of the matching key against a number of N masked rules using masked comparison hardware of size m, where m is much smaller than N. Advantages are derived from the provision of a flexible rule-based classification, filtering and verification packets conveyed in accordance with various packet transport protocols at wire-speed in support of VoIP provisioning. The flexibility is especially beneficial in implementing convergent applications.

## Claims

### Claim 1

A Content Addressable Memory (CAM) module comprising:
a. a rule Random Access Memory (RAM) block storing n rule entries;
b. a rule n-to-1 multiplexer responsive to a value C varying between 0 and n-1, the rule multiplexer selecting a C'th stored rule entry in the rule RAM block;
c. a comparator performing a bitwise matching operation between a matching key and contents of the C'th entry in the rule RAM block provided by the multiplexer, the comparator providing a comparison result; and
d. a rule decoder block responsive to the comparison result and the value C to identify a matched entry, the rule multiplexer and the rule decoder block enabling comparison between the matching key and n rules using a single comparator.

### Claim 2 (depends on 1)

The CAM as claimed in claim 1, further comprising:
a. a mask Random Access Memory (RAM) block storing n masking bitmask entries;
b. a mask n-to-1 multiplexer responsive to the value C, the mask multiplexer selecting a C'th stored rule entry in the mask RAM block;
c. a masking module performing a bitwise masking operation on the comparison result based on contents of the C'th entry in the mask RAM block provided by the mask multiplexer, the mask multiplexer providing to the rule decoder block with unmasked bits of the comparison result, masking bits of the comparison result supporting rule matching against rule entries having different configurations of valid bits.

### Claim 3 (depends on 1)

The CAM as claimed in claim 1, wherein n=(2{circumflex over ( )}b) and b is a positive integer, the CAM further comprising a comparison binary cycle counter register having b bits, the binary cycle counter register resetting to zero when incremented by one count from an n-1 value.

### Claim 4 (depends on 3)

The CAM as claimed in claim 3, further comprising a clock providing a clock signal used to increment the binary cycle counter register to vary the value C between 0 and n-1.

### Claim 5 (depends on 1)

A packet classifier comprising the CAM claimed in claim 1.

### Claim 6 (depends on 2)

A packet classifier comprising the CAM claimed in claim 2.

### Claim 7 (depends on 1)

A packet processing engine comprising the CAM claimed in claim 1.

### Claim 8 (depends on 2)

A packet processing engine comprising the CAM claimed in claim 2.

### Claim 9

A Content Addressable Memory (CAM) module comprising:
a. m rule Random Access Memory (RAM) blocks each storing n rule entries;
b. m rule n-to-1 multiplexers responsive to a value C varying between 0 and n-1, each rule multiplexer selecting a C'th stored rule entry in the corresponding rule RAM block;
c. m comparators each performing a bitwise matching operation between a single matching key and contents of the C'th entry in the corresponding rule RAM block provided by the corresponding multiplexer, each comparator providing a comparison result; and
d. a single rule decoder block responsive to the m comparison results and the value C to identify a matched entry, the m rule multiplexers and the single rule decoder block enabling comparison between the single matching key and N=n*m rules using m comparators.

### Claim 10 (depends on 9)

The CAM as claimed in claim 9, further comprising:
a. m mask Random Access Memory (RAM) blocks each storing n masking bitmask entries;
b. m mask n-to-1 multiplexers responsive to the value C, each mask multiplexer selecting a C'th stored rule entry in the corresponding mask RAM block;
c. m masking modules, each masking module performing a bitwise masking operation on the comparison result provided by the corresponding comparator, based on contents of the C'th entry in the corresponding mask RAM block provided by the corresponding mask multiplexer, the mask multiplexer providing to the single rule decoder block with unmasked bits of the comparison result, masking bits of the comparison result supporting rule matching against rule entries having different configurations of valid bits.

### Claim 11 (depends on 9)

The CAM as claimed in claim 9, wherein n=(2{circumflex over ( )}b) and b is a positive integer, the CAM further comprising a comparison binary cycle counter register having b bits, the binary cycle counter register resetting to zero when incremented by one count from an n-1 value.

### Claim 12 (depends on 10)

The CAM as claimed in claim 10, further comprising a clock providing a clock signal used to increment the binary cycle counter register to vary the value C between 0 and n-1.

### Claim 13 (depends on 9)

A packet classifier comprising the CAM claimed in claim 9.

### Claim 14 (depends on 10)

A packet classifier comprising the CAM claimed in claim 10.

### Claim 15 (depends on 9)

A packet processing engine comprising the CAM claimed in claim 9.

### Claim 16 (depends on 10)

A packet processing engine comprising the CAM claimed in claim 10.

### Claim 17

A method of matching a matching key against N matching rules comprising cyclical steps of:
a. incrementing a value C of a cycle counter varying between 0 and n-1, the value C being reset to zero when incremented by one count while holding a value of n-1;
b. selecting a C'th rule entry in each of m rule Random Access Module (RAM) blocks, where N=n*m;
c. comparing a matching key against the m selected rule entries using m comparators in parallel;
d. selectively determining a matched rule entry based on m comparison results provided by the m comparators and the value C; and
e. selectively providing a matched result signal and an identification of the matched rule entry based on the comparison results.

### Claim 18 (depends on 17)

The method claimed in claim 17, further comprising a step of: selectively masking bits of each comparison result employing a C'th mask stored in a mask entry selected from a corresponding one of m mask RAM blocks; the rule decoder being provided with unmasked bits of each comparison result.

### Claim 19 (depends on 17)

The method claimed in claim 17, further comprising a step of aborting further comparisons once a match was found and resetting the value of C to zero.

### Claim 20 (depends on 19)

The method claimed in claim 19, further comprising a step of: loading a subsequent matching key on resetting the value of C to zero.
