A method for executing instructions in a central processing unit (CPU), wherein the CPU includes one or more general purpose execution units and one or more digital signal processing execution units, wherein the CPU further includes a pattern recognition detector which stores a plurality of patterns indicative of instruction sequences which implement digital signal processing functions, the method comprising:
- storing a plurality of instructions in an instruction memory, where said plurality of instructions include one or more sequences of instructions which implement a digital signal processing function;
- the pattern recognition detector comparing a sequence of instructions stored in said instruction memory with said plurality of stored patterns;
- the pattern recognition detector determining whether said sequence of instructions in said instruction memory substantially matches one of said plurality of stored patterns, wherein a substantial match indicates that said sequence of instructions implements a digital signal processing function;
- converting a sequence of said instructions in said instruction memory which substantially matches one of said plurality of stored patterns into a digital signal processing function identifier;
- transferring said digital signal processing function identifier to the one or more digital signal processing execution units;
- the one or more digital signal processing execution units receiving said digital signal processing function identifier;
- and
- the one or more digital signal processing execution units performing a digital signal processing function in response to said received digital signal processing function identifier.