Patent ID: 7093112

Claim:
A method for reading instruction data from a code memory into an instruction FIFO, decoding the instruction data to obtain the instructions, and forwarding the instructions to an execution unit, the method which comprises: prefetching instruction data to read the instruction data from the code memory and reloading the instruction data into the instruction FIFO having a storage capacity; buffer-storing the instruction data in the instruction FIFO until the instruction data is executed; decoding the instruction data to obtain corresponding instructions; forwarding the instructions to the execution unit; during reloading the instruction data into the instruction FIFO, in a loop search mode, detecting if a short program loop exists, a short program loop being defined as having instructions that start with a first instruction, that end with a jump instruction, and that do not exceed the storage capacity of the instruction FIFO; if a short program loop is detected, changing from the loop search mode to a loop mode, during the loop mode: storing all of the instructions of the short program loop within the instruction FIFO; forwarding the instructions of the short program loop in a circular fashion from the instruction FIFO to the execution unit; and terminating the loop mode if either an interrupt occurs or if the jump instruction refers to an address other than that of the first instruction of the short program loop; and restarting the loop search mode upon termination of the loop mode.