A CAM and method for operating a CAM are presented. Copies of a CAM
database are duplicated and placed in a first set of CAM locations and a
second set of CAM locations. An error detector is used to determine false
matches in the case of soft errors within the entries producing those
false matches. While the entries producing a match should have the same
index location, errors might cause those match lines to have an offset.
If so, the present CAM, through use of duplicative sets of CAM locations,
will detect the offset and thereafter the values in each index location
that produces a match, along with the corresponding parity or error
detection encoding bit(s). If the parity or error detection encoding
bit(s) indicate an error in a particular entry, then that error is
located and the corresponding entry at the same index within the other,
duplicative set of CAM locations is copied into the that erroneous entry.
Since duplicative copies are by design placed into the first and second
sets of CAM locations, whatever value exists in the opposing entry can be
written into the erroneous entry to correct errors in that search
location. The first and second sets of CAM locations are configurable to
be duplicative or distinct in content, allowing error detection and
correction to be performed at multiple user-specified granularities. The
error detection and correction during search is backward compatible to
interim parity scrubbing and ECC scan, as well as use of FNH bits set by
a user or provider.