A method and apparatus for automatically writing non-matching data to a
non-valid location within a Content Addressable Memory (CAM) is
disclosed. The non-valid locations are determined simultaneously with a
search process for a matching address, so that in the event of a
non-match, the new data can be written to the invalid locations in a
single clock cycle.