A method for scaling a dynamic voltage of a CPU is achieved by setting a
voltage setting point for each of a plurality of code segments of a
program, and profiling workload by measuring a workload variation of each
of the code segments based on data that changes whenever measured,
selecting a plurality of combinations, each having a plurality of voltage
setting points, and calculating workload estimators corresponding to the
voltage setting points of each of the selected combinations based on the
workload variation measured in the workload profiling operation,
selecting an optimal combination that consumes a least energy of the CPU
based on the workload estimators, and determining whether a real time
constraint is satisfied when an operating voltage is set based on the
workload estimator corresponding to each of the voltage setting points of
the optimal combination during runtime, and setting the operating voltage
based on a result of the determination.