# Relation between Power consumed and MCPS (million cycles per second) consumed on a processor

I have been working on a ARM cortex A8 board on mp3 decoder.

While doing this I have a requirement saying the mp3 decoder solution I am doing should consume 50mW. This generated few questions in my mind when I thought about it:-

1. I recall that there is some relation between the Core Voltage applied (V), the clock frequency (f) of a processor and power consumed (P) as something like P is directly proportional to the voltage and frequency squared. But is the exact relation. Given operating clock Frequency, voltage of a processor, how can we calculate power consumed by it?

2. Now if I get the power consumed from step (1) at some clock frequency, and I am told that the decoder solution I am giving, can consume only 50 milli-watts, how can I get the maximum limit on MCPS, which will be the upper bound on the MCPS of my decoder solution running on that hardware board?

Can I deduce that if power obtained as in step (1), say P, is consumed at frequency f, so for 50mW, what is the clock frequency and calculate accordingly the frequency. And then call this frequency as my code MHz (MCPS) upper bound?

Basically how does one map (is there any equation?) power consumed by a software to MCPS consumed?

-
 You might be better off asking this question on electronics.stackexchange.com – nhinkle Jan 26 '11 at 4:00

## migrated from superuser.comJan 26 '11 at 4:31

Hennessy and Patterson give this rule of thumb for CMOS:

$\text{Power} = \text{Capacitive load} \cdot \text{voltage}^2 \cdot \text{Frequency switched}$

Calculating the power used in a system a priori is hard. The best approach is probably to try using an unoptimised MP3 decoder and characterising the performance. After that, you'll know how much better you need to do.

It's also worth considering the power needed by the entire system, not just the CPU. Your MP3 data will be coming from somewhere, possibly external RAM, flash or even ethernet. This will incur a cost too.

I think that the best approach is to build a system and take measurements.

-

I hate to give the answer of "look at the datasheet", but it is going to be your best option. All micro-controllers I have used give their estimated current draw running at various frequencies and voltages. Not all of them will give a graph or equation, but instead will give you a few points in a table. You will just have to interpolate to get what you need.

There is not a single equation that you can use to do this mapping because every device is going to have its own power consumption profile. In fact many embedded devices use their power vs frequency profile as a selling point.

You haven't stated in your question at all, but don't forget about things like LEDs and other external devices connected to your device. These will all effect the power.

After you get a frequency and voltage to run at, you can also use the datasheet to find out how many instructions you can have per second.

-