Claims
- 1. A method for correlating an input signal to a signature, the method comprising:
receiving an element of the input signal; comparing the element of the input signal to an element of the signature; when the element of the input signal matches the element of the signature, receiving and comparing a next element of the input signal to a next element of the signature; when the element of the input signal does not match the element of the signature, comparing the element of the input signal to the first element of the signature; and initiating action when the input signal sequentially matches at least a first portion of the elements of the signature.
- 2. The method of claim 1, wherein receiving an element comprises receiving a byte of data at an input signal interface.
- 3. The method of claim 1, and further comprising determining the next element of the signature based on an index.
- 4. The method of claim 3, and further comprising incrementing the index when the element of the input signal matches the element of the signature.
- 5. The method of claim 3, and further determining when the input signal sequentially matches the at least a first portion of the elements of the signature based on calculating a percentage of matched elements based on the index and the size of the signature.
- 6. A method for correlating an input signal to a signature, the method comprising:
initializing an index value; sampling an input signal; comparing the current sample of the input signal to an element of a signature stored at a location offset by the index value from a signature base address; when a match is not detected, resetting the index value and returning to sampling the input signal; when a match is detected, incrementing the index and determining whether the end of the signature is received; determining a correlation factor on each match until a selected factor is achieved; when the selected correlation factor is achieved, initiating an action based on the signature; and declaring correlation when the end of the signature is reached.
- 7. The method of claim 6, determining a correlation factor comprises determining the percentage of elements in the signature that match consecutive samples of the input signal.
- 8. The method of claim 6, wherein sampling the input signal comprises receiving a byte of data from the input signal interface.
- 9. The method of claim 6, wherein the selected correlation factor is a selected percentage of the length of the signature.
- 10. A method for correlating an input signal to a signature, the method comprising:
comparing an input stream with a signature element-by-element as the input stream is received; restarting the comparison using the first element of the signature when an element in the input stream does not match the compared element in the signature; and on each match between an element of the input stream and the compared element of the signature, determining a correlation factor; and initiating action when the correlation factor achieves a selected value.
- 11. The method of claim 10, wherein restarting the comparison comprises comparing the element in the input stream with the first element of the signature.
- 12. The method of claim 10, and further comprising storing the signature, a signature length and an index value in memory prior to comparing the input stream with the signature.
- 13. The method of claim 10, wherein comparing the input stream with the signature comprises:
receiving an element of the input stream; and comparing the element of the input stream with an element of the signature selected based on an index.
- 14. The method of claim 13, and further comprising:
incrementing the index when an element of the input stream matches the selected element of the signature; and resetting the index when an element of the input stream does not match the selected element of the signature.
- 15. The method of claim 13, wherein determining a correlation factor comprises calculating a percentage of the signature matched by selected elements of the input stream.
- 16. An electronic circuit, comprising:
a processor; a memory for storing a signature; an input signal interface, adapted to receive an input signal; a bus, communicatively coupled to the processor, the memory and the input signal interface; and wherein the processor is adapted to compare elements of the input signal with elements of the signature, and to initiate action based on the comparison when a select first portion of the signature is matched in the elements of the input signal.
- 17. The electronic circuit of claim 16, wherein the memory further stores an index and a size of the signature.
- 18. The electronic circuit of claim 16, wherein the processor initiates the action when a select percentage of the signature is matched in the input signal.
- 19. A machine-readable medium having instructions stored thereon for performing a method for correlating an input signal to a signature, the method comprising:
receiving an element of the input signal; comparing the element of the input signal to an element of the signature; when the element of the input signal matches the element of the signature, receiving and comparing a next element of the input signal to a next element of the signature; when the element of the input signal does not match the element of the signature, comparing the element of the input signal to the first element of the signature; and initiating action when the input signal sequentially matches at least a first portion of the elements of the signature.
- 20. The machine-readable medium of claim 19, wherein receiving an element comprises receiving a byte of data at an input signal interface.
- 21. The machine-readable medium of claim 19, and further comprising determining the next element of the signature based on an index.
- 22. The machine-readable medium of claim 21, and further comprising incrementing the index when the element of the input signal matches the element of the signature.
- 23. The machine-readable medium of claim 21, and further determining when the input signal sequentially matches the at least a first portion of the elements of the signature based on calculating a percentage of matched elements based on the index and the size of the signature.
- 24. A machine-readable medium having instructions stored thereon for performing a method for correlating an input signal to a signature, the method comprising:
initializing an index value; sampling an input signal; comparing the current sample of the input signal to an element of a signature stored at a location offset by the index value from a signature base address; when a match is not detected, resetting the index value and returning to sampling the input signal; when a match is detected, incrementing the index and determining whether the end of the signature is received; determining a correlation factor on each match until a selected factor is achieved; when the selected correlation factor is achieved, initiating an action based on the signature; and declaring correlation when the end of the signature is reached.
- 25. The machine-readable medium of claim 24, determining a correlation factor comprises determining the percentage of elements in the signature that match consecutive samples of the input signal.
- 26. The machine-readable medium of claim 24, wherein sampling the input signal comprises receiving a byte of data from the input signal interface.
- 27. The machine-readable medium of claim 24, wherein the selected correlation factor is a selected percentage of the length of the signature.
- 28. A machine-readable medium having instructions stored thereon for performing a method for correlating an input signal to a signature, the method comprising:
comparing an input stream with a signature element-by-element as the input stream is received; restarting the comparison using the first element of the signature when an element in the input stream does not match the compared element in the signature; and on each match between an element of the input stream and the compared element of the signature, determining a correlation factor; and initiating action when the correlation factor achieves a selected value.
- 29. The machine-readable medium of claim 28, wherein restarting the comparison comprises comparing the element in the input stream with the first element of the signature.
- 30. The machine-readable medium of claim 28, and further comprising storing the signature, a signature length and an index value in memory prior to comparing the input stream with the signature.
- 31. The machine-readable medium of claim 28, wherein comparing the input stream with the signature comprises:
receiving an element of the input stream; and comparing the element of the input stream with an element of the signature selected based on an index.
- 32. The machine-readable medium of claim 31, and further comprising:
incrementing the index when an element of the input stream matches the selected element of the signature; and resetting the index when an element of the input stream does not match the selected element of the signature.
- 33. The machine-readable medium of claim 31, wherein determining a correlation factor comprises calculating a percentage of the signature matched by selected elements of the input stream.
- 34. An electronic circuit, comprising:
a processor; a memory for storing a signature; an input signal interface, adapted to receive an input signal; a bus, communicatively coupled to the processor, the memory and the input signal interface; wherein the processor is adapted to compare elements of the input signal with elements of the signature, element-by-element as the elements are received to determine correlation between the input signal and the signature without storing the input signal; wherein the processor is further adapted to restart with the first element of the signature when either the full signature is matched or an element of the input signal does not match a compared element of the signature; and wherein the processor is further adapted to initiate an action or a function when a selected portion of the signature is matched in consecutive elements of the input signal.
- 35. A method for initiating an action based on a received signature in an input signal, the method comprising:
receiving elements of the input signal; determining when elements of the input signal match corresponding elements in the signature; and initiating a selected action when a selected subset of the elements of the signature match consecutive elements of the input signal.
- 36. The method of claim 35, and further including calculating a correlation factor to determine when to initiate the selected action.
- 37. The method of claim 36, wherein the correlation factor represents a percentage of the signature matched in consecutive elements of the input signal.
CROSS REFERENCE TO RELATED APPLICATION
[0001] This application is related to co-pending application Ser. No. 10/195,236 entitled “DIGITAL CORRELATION” (the '236 application). The '236 application is incorporated herein by reference.