Why P scales as C*V^2*f is so obvious

[Warning: Math and physics alert! Math and physics alert!]

I think that you've all seen this equation before:

P = a * C * V2 * f

Where P is power, C is capacitance, V is the voltage across the gate (typically, Vdd), f is the clock frequency and a is some constant.

Doing my reading, I see this equation a lot, usually prefaced with something like, “And everyone knows…” or “And of course…” When I read, “And it’s obvious,” I get really steamed because it’s never obvious to me. Maybe I’m dumb. Maybe they are way smarter than me. Or maybe they don’t know why either. Well, I’m here to say that it isn’t obvious, at least not to me.

So let’s see where this sucker comes from.

This is going to get into a little bit of math, but hey, we are all pretty comfortable with math. It comes with being a nerd. (OK, I didn’t mean to stereotype. I’m sure there are nerds that aren’t comfortable with math.-- at least theoretically. Not that I’m a nerd. I’m a perfectly well adjusted individual who just happens to be uncomfortable around non engineers, and who likes to hide in my cube and code all day.)


Before we go further, let’s check to see if the units match. This is always a good thing to do just to make sure we aren’t barking up the wrong tree.

Now, P is power (Watts). V is voltage (Volts). f is the frequency (cycles/sec), or equivalently, the number of seconds/cycle. And C is capacitance (Farads). A Farad is Coulombs/Volt, the charge divided by the EMF (Electromotive Force) potential.

Putting it all together and noting that P=V*I where I is the current in Amps, we’ve,

P = a * C * V2 * f
Volts*Amps = Coulombs /Volt * Volts2 * cyc/sec

Since amperage is charge flowing per unit time, i.e. Amps=Coulombs/sec, we’ve got

Volts* Coulombs/sec = Coulombs/Volts * Volts2 * cyc/sec
Volts*Coulombs/sec = Coulombs*Volts/sec

(note that both cycles and a are unit less)

Hey, it works! So at least we know that the units are correct. We’re not obviously barking up the wrong tree.

So that’s it folks. There you have it. Let’s now go onto something new.

What? You also want to know why? Wow, you are a hard crowd. OK, I’ll relent and explain why. Next time, that is.

Para obtener información más completa sobre las optimizaciones del compilador, consulte nuestro Aviso de optimización.