Content-addressable memory that supports a priority ordering between banks of differing sizes
First Claim
1. An apparatus, comprising:
- a content-addressable memory (CAM) which has multiple banks;
wherein the multiple banks have varying sizes and a priority ordering, and wherein the multiple banks have varying sizes that fall off in a predetermined pattern from highest to lowest priority, wherein in the predetermined pattern, the sizes of the banks fall off exponentially from highest to lowest priority or the sizes of the banks are constant in size and then fall off exponentially from highest to lowest priority;
an insertion mechanism, wherein upon receiving an insertion request which includes a key and a body, the insertion mechanism is configured to,calculate a different hash function for each bank based on the key to produce a calculated index and tag for each bank,use the calculated index and the tag for each bank to lookup an entry in each bank, andif the lookups do not generate a hit in any bank, to store an entry for the request into a highest priority bank which does not contain a valid entry in the location accessed by the lookup.
2 Assignments
0 Petitions
Accused Products
Abstract
One embodiment of the present invention provides a system that implements a content-addressable memory (CAM) which has multiple banks. During operation, the system receives a request to insert an item into the CAM, wherein the request includes a key which is used to index the item and a body containing data. Next, for each bank in the CAM, the system calculates a different hash function based on the key to produce an index and a tag. The system then uses the calculated index and the tag for each bank to lookup an entry in each bank. If the lookups do not generate a hit in any bank, the system stores an entry for the request into a highest priority bank which does not contain a valid entry in the location accessed by the lookup. In one embodiment of the present invention, the multiple banks in the CAM have varying sizes.
9 Citations
23 Claims
-
1. An apparatus, comprising:
-
a content-addressable memory (CAM) which has multiple banks; wherein the multiple banks have varying sizes and a priority ordering, and wherein the multiple banks have varying sizes that fall off in a predetermined pattern from highest to lowest priority, wherein in the predetermined pattern, the sizes of the banks fall off exponentially from highest to lowest priority or the sizes of the banks are constant in size and then fall off exponentially from highest to lowest priority; an insertion mechanism, wherein upon receiving an insertion request which includes a key and a body, the insertion mechanism is configured to, calculate a different hash function for each bank based on the key to produce a calculated index and tag for each bank, use the calculated index and the tag for each bank to lookup an entry in each bank, and if the lookups do not generate a hit in any bank, to store an entry for the request into a highest priority bank which does not contain a valid entry in the location accessed by the lookup. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11)
-
-
12. A method for accessing a content-addressable memory (CAM), comprising:
-
receiving a request to insert an item into the CAM, wherein the request includes a key which is used to index the item and a body containing data; wherein the CAM has multiple banks with varying sizes and a priority ordering, and wherein a set of the multiple banks have varying sizes that fall off in a predetermined pattern from highest to lowest priority, wherein in the predetermined pattern, the sizes of the banks fall off exponentially from highest to lowest priority or the sizes of the banks are constant in size and then fall off exponentially from highest to lowest priority; for each bank in the CAM, calculating a different hash function based on the key to produce an index and a tag; using the calculated index and the tag for each bank to lookup an entry in each bank; and if the lookups do not generate a hit in any bank, storing an entry for the request into a highest priority bank which does not contain a valid entry in the location accessed by the lookup. - View Dependent Claims (13, 14, 15, 16, 17, 18, 19, 20, 21, 22)
-
-
23. A computer system, comprising:
-
a processor; a memory; a content-addressable memory (CAM) which has multiple banks; wherein the multiple banks have varying sizes and a priority ordering, and wherein a set of the multiple banks have varying sizes that fall off in a predetermined pattern from highest to lowest priority, wherein in the predetermined pattern, the sizes of the banks fall off exponentially from highest to lowest priority or the sizes of the banks are constant in size and then fall off exponentially from highest to lowest priority; an insertion mechanism within the CAM, wherein upon receiving an insertion request which includes a key and a body, the insertion mechanism is configured to, calculate a different hash function for each bank based on the key to produce a calculated index and tag for each bank, use the calculated index and the tag for each bank to lookup an entry in each bank, and if the lookups do not generate a hit in any bank, to store an entry for the request into a highest priority bank which does not contain a valid entry in the location accessed by the lookup.
-
Specification