Patent ID: 7227994

Claim:
A method for finding an occurrence of a reference pattern having K reference elements in an input pattern having M sequential input elements comprising the steps of: (a) loading a first reference address, corresponding to a first reference element in said reference pattern, into a first pointer register as a first pointer address and into a second pointer register as a second pointer address; (b) comparing a first input element of said input pattern to a first pointer reference element from said reference pattern corresponding to said first pointer address and comparing said first input element to a second pointer reference element from said reference pattern corresponding to said second pointer address; (c) incrementing said first pointer address if said first pointer reference element matches said first input element; (d) incrementing said second pointer address if said second pointer reference element matches said first input element and said second pointer address does not match said first pointer address; (e) incrementing said second pointer address if said second pointer reference element matches said first input element and said first pointer reference element does not match said first input element; (f) resetting said first pointer address to said first reference address if said first pointer reference element does not match said first input element; (g) resetting said second pointer address to said first reference address if said second pointer reference element does not match said first input element; and (h) selecting a next sequential element from said M input elements as said first input element and repeating steps (a)–(g).