Patent ID: 8532974

Claim:
A method of optimizing energy consumption of an application program for a digital signal processor (DSP), comprising: providing a program code generating unit for providing an interface to compose and edit a set of program code; providing an instructional wise energy consumption database comprising energy consumption data of the DSP when the DSP executes at least one instruction; providing a program compiling unit for receiving the program code, and according to the program code and the instructional wise energy consumption database the program compiling unit compiling the program code and generating a plurality of assembly codes; and providing a DSP simulator for receiving the assembly codes and at least one stimulus, the DSP simulator simulating the assembly codes to estimate the energy consumption of the assembly code when the DSP executes the assembly codes; wherein when receiving the assembly codes and the stimulus, the DSP simulator generates a first result for simulating the energy consumption of the assembly codes under such stimuli provided by the DSP stimulus test bench database which the first result is in an instructional wise statistical form and with a number represents the total amount of energy consumption, and a second result for simulating the bit-width accuracy tolerability of the instructions in the assembly codes under such stimuli provided by the DSP stimulus test bench database; wherein the first result is transmitted to the program compiling unit, according to the first result the program compiling unit modifies a compiling scheme to recompile the program code if the first result shows total energy consumption is greater than a limitation which is set by the program code generating unit and generates a new plurality of assembly codes.