a method and apparatus for automatically writing non - matching data to a non - valid location within a content addressable memory 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 .