Patent ID: 7852653

Claim:
A method for using a content addressable memory (CAM), comprising: defining the CAM into an array of data words having M rows and N columns, with each of N and M being greater than one; arranging the data words of the CAM according to a 2-dimensional priority scheme; masking data words outside a selected 1×M column to be ignored in determining a match; searching the CAM, each search including N compare cycles and each compare cycle having a different 1×M column selected; and pipelining from a priority encoder a highest priority match per compare cycle, the pipelined matches arranged to communicate a priority order in a first dimension of the 2-dimensional priority scheme, wherein a word validity indication corresponding to the data word of the selected column is not masked so as to participate in the compare cycle for the selected column to determine the highest priority match for the compare cycle for the selected column.