basics of energy & power dissipation - ece...

24
1 Basics of Energy & Power Dissipation Lecture notes S. Yalamanchili, S. Mukhopadhyay. A. Chowdhary (2) Outline Basic Concepts Dynamic and Static Power v Volatile vs. Non-Volatile Memory Time, Energy, Power Tradeoffs Activity model for power estimation v Combinational and sequential logic Opportunities for Low Power Design

Upload: lybao

Post on 15-Mar-2018

218 views

Category:

Documents


4 download

TRANSCRIPT

1

Basics of Energy & Power Dissipation

Lecture notes S. Yalamanchili, S. Mukhopadhyay. A. Chowdhary

(2)

Outline

• Basic Concepts

• Dynamic and Static Powerv Volatile vs. Non-Volatile Memory

• Time, Energy, Power Tradeoffs

• Activity model for power estimationv Combinational and sequential logic

• Opportunities for Low Power Design

2

(3)

Reading

• http://en.wikipedia.org/wiki/CPU_power_dissipation

• http://en.wikipedia.org/wiki/CMOS#Power:_switching_and_leakage

• http://www.xbitlabs.com/articles/cpu/display/core-i5-2500t-2390t-i3-2100t-pentium-g620t.html

• http://www.cpu-world.com/info/charts.html

• Goal: Understandv The sources of power dissipation in combinational

and sequential circuitsv Power vs. energyv Options for controlling power/energy dissipation

Basic Concepts

3

(5)

Where Does the Power Go in CMOS?

• Dynamic Power Consumptionv Caused by switching transitions à cost of switching

state

• Static Power Consumptionv Caused by leakage currents in the absence of any

switching activity

• Power consumption per transistor changes with each technology generationv No longer reducing at the same ratev What happens to power density?

AMD Trinity APU

Vin Vout

Vdd

PMOS

Ground

NMOS

(6)

n-channel MOSFET

L

GATE

SOURCE

BODY

DRAIN

tox

GATESOURCE DRAIN

L

• Vgs < Vt transistor off - Vt is the threshold voltage

• Vgs > Vt transistor on

• Impact of threshold voltage v Higher Vt, slower switching speed, lower leakagev Lower Vt, faster switching speed, higher leakage

• Actual physics is more complex but this will do for now!

4

(7)

ab

c

x

y

Charge as a State Variable

ab

c

x

y

For computation we should be able to identify if each of the variable (a,b,c,x,y) is in a ‘1’ or a ‘0’ state.

We could have used any physical quantity to do that• Voltage• Current• Electron spin• Orientation of magnetic field• ………

We choose voltage distinguish between a ‘0’ and a ‘1’.

All nodes have some capacitance associated with them

Logic 1: Cap is charged Logic 0: Cap is discharged

+-

(8)

Abstracting Energy Behavior

• How can we abstract energy consumption for a digital device?

• Consider the energy cost of charge transfer

Vin Vout

Vdd

PMOS

Ground

NMOS

Modeled as an on/off resistance

Modeled as an output capacitance

Vin Vout

0 1

1 0

5

(9)

Switching Delay

Vdd

Charging to logic 1

Vout

Vdd

Vs =Vdd(1− e−tRC )

τ = RC

(10)

Switching Delay

Vdd

Discharging to logic 0

Vout

Vdd

Vc =Ve−tRC

6

(11)

Switch from one state to anotherTo perform computation, we need to switch from one state to another

Logic 1: Cap is charged Logic 0: Cap is discharged

+-

Connect the cap to GND thorough an ON

NMOS

Connect the cap to VCC thorough an ON

PMOS

The logic dictates whether a node capacitor will be charged or discharged.

Vin Vout

Vdd

PMOS

Ground

NMOS

Dynamic and Static Power

7

(13)

Dynamic Power

Time

VDD

Voltage

0 T

Output Capacitor Charging

Output Capacitor

Discharging

Input to CMOS

inverter

VDD VDD

iDD

iDDCLCL

• Dynamic power is used in charging and discharging the capacitances in the CMOS circuit.

CL = load capacitance

(14)

Switching Energy

Energy drawn from supply :

EvDD = ivDD (t)VDD dt0

∫ =VDDd CLvout( )dt

dt0

∫ =CLVDD dvout0

VDD

∫ =CLVDD

2

Energy stored in capacitor :

EC = ic (t)vout dt0

∫ =d CLvout( )dt

vout dt0

∫ =CL vout dvout0

VDD

∫ =12CLVDD

2

Energy dissipated in resistor : ER = EvDD − EC =12CLVDD

2

Also,ER = iR2 (t)Rdt

0

∫ = iR (t)VDD − vout

RRdt

0

∫ =d CLvout( )dt

VDD − vout( )dt0

∫ =12CLVDD

2

=> Independent of R

CL is the load capacitance

Energy dissipated per transition?

Courtesy: Prof. A. Roychowdhury

8

(15)

Dynamic Power vs. Dynamic Energy

Time

VDD

Voltage

0 T

VDD VDD

Output Capacitor Charging

Output Capacitor

Discharging

Input to CMOS

inverter

iDD

iDDCLCL

• Dynamic power: consider the rate at which switching (energy dissipation) takes place

activity factor = fraction of total capacitance that switches each cycle

Pdynamic =αCL

2!

"#

$

%&⋅Vdd ⋅Vdd ⋅F Delay = k ⋅C Vdd

Vdd −Vt( )2

(16)

Power Vs. Energy

• Energy is a rate of expenditure of energyv One joule/sec = one watt

• Both profiles use the same amount of energy at different rates or power

Pow

er(w

atts

)

P0

P1

P2

Same Energy = area under the curve

Pow

er(w

atts

)

Time

P0

Time

9

(17)

• Technology scaling has caused transistors to become smaller and smaller. As a result, static power has become a substantial portion of the total power.

Static Power

Gate Leakage Junction Leakage Sub-threshold Leakage

GATESOURCE DRAIN

Pstatic =Vdd ⋅ Istatic

(18)

Temperature Dependence

• As temperature increases static power increases1

Pstatic =Vdd ⋅N ⋅Kdesign ⋅ Ileakage

#Transistors Technology Dependent

Normalized Leakage Current

Ileakage = F(Temp)

Supply voltage

1J. Butts and G. Sohi, “A Static Power Model for Architects, MICRO 2000

10

(19)

20.0

40.0

60.0

80.0

100.0

120.0

0 2 4

Tem

pera

ture

[°C

]

Frequency[GHz]

3D

3DThermal Wall

3D Stack Heat Map

Thermal Wall

Temperature effects increases static power!

(20)

Example

Intel Atom Z3735F (4C/4T x 1.33 GHz, 22nm, 2MB L2)

11

(21)

Volatile Storage

DRAM Cell

Bit Line

Word Line

Capacitor

Pass Transistor

Word Line

Bit Line Bit Line

SRAM Cell

Static Power?

www.tech-faw.com/dimm.htmlwww.tech-faw.com/dimm.html

(22)

Non-Volatile Storage Technologies

http://www.explainthatstuff.com/ https://www.ecnmag.com/article/2011

Flash Memory Cell Phase Change Memory Cell

• Does not lose state when power is turned off• Higher densities than volatile storage• Slower access times (longer, higher energy

writes

Static Power?

12

System Level Tradeoffs

(24)

The End of Energy Scaling

When was this prediction made?

13

(25)

Power Density Growth

Power Density in mW/mm2

From M. Horowitz, “Computing’s Energy Problem (And What We Can Do About It),” ISSCC 2014

(26)

It Gets Worse

From R. Borkar, M. Bohr, and S. Jourdan, “Advancing Moore’s Law in 2014 – Intel!”

14

(27)

Solutions?

Improve Energy Efficiency via Customization!

(28)

EnergyDelay

Ene

rgy

or d

elay

VDDVDD

Ene

rgy-

Del

ay P

rodu

ct (E

DP

)

Energy-Delay Interaction

• Delay decreases with supply voltage but energy/power increases

Pdynamic =αCL

2!

"#

$

%&⋅Vdd ⋅Vdd ⋅F

Power State

Target of optimization

Delay = k ⋅C VddVdd −Vt( )2

15

(29)

leak

age

or d

elay

Vth

leakagedelay

Static Energy-Delay Interaction

• Static energy increases exponentially with decrease in threshold voltage

• Delay increases with threshold voltage

toxSOURCE DRAIN

L

GATE

Delay = k ⋅C VddVdd −Vt( )2

(30)

Higher Level Blocks

A

C

B

A B

Vdd

AB

C

Vdd

A

B

A Vdd

C

B

A

BC

16

(31)

Gate Power Dissipation

• Switching activity depends on the input pattern and combinational logic

• Consider a 0à1 transition on the output of a gate

p0 × p1Probability gate output was 0

Probability gate output is 1

p0 =N0

2np1 =

N12n

N0 = number of 0’s in the truth table

Example:

(32)

Seta31

0

ALU0 Result0

CarryIn

a0

Result1a1

0

Result2a2

0

Operation

b31

b0

b1

b2

Result31

Overflow

Binvert

CarryIn

Less

CarryIn

CarryOut

ALU1Less

CarryIn

CarryOut

ALU2Less

CarryIn

CarryOut

ALU31Less

CarryIn

ALU Energy Consumption

0

3

Result

Operation

a

1

CarryIn

CarryOut

0

1

Binvert

b 2

Less

• Can we count the number of transitions in each 1-bit ALU for an operation?

• Can we estimate static power?

• Computing per operation energy

17

(33)

Closer Look: A 4-bit Ripple Adder

• Critical Path = DXOR+4*(DAND+DOR) for 4-bit ripple adder (9 gate levels)

• For an N-bit ripple adder• Critical Path Delay ~ 2(N-1)+3 = (2N+1) Gate delays• Activity (and therefore power) is a function of the input data values!

S0

A0 B0

Cin

S1

A1 B1

S2

A2 B2

S3

A3 B3

Carry

(34)

Implications

• What if I halved the frequency?

• What if I lower the voltage?

• How can I reduce the capacitance?

CombinationalLogic

clk

clkcond

input

clk

Pdynamic =αCL

2!

"#

$

%&⋅Vdd ⋅Vdd ⋅F

We will see later that these two are interrelated!

18

(35)

The World Today

• Yesterdayà scaling to minimize time (max F)

• Maximum performance (minimum time) is too expensive in terms of powerv Imagine scaling voltage by 0.7 and frequency by 1.5

à how does dynamic power scale?

• Today: trade/balance performance for power efficiency

Pdynamic =αCL

2!

"#

$

%&⋅Vdd ⋅Vdd ⋅F Delay = k ⋅C Vdd

Vdd −Vt( )2

(36)

Factors Affecting Power• Transistor size

v Affects capacitance (CL)

• Rise times and fall times (delay)v Affects short circuit power (not in this course)

• Threshold voltagev Affects leakage power

• Temperaturev Affects leakage power

• Switching activityv Frequency (F) and number of switching transistors ( )

Pdynamic =αCL

2!

"#

$

%&⋅Vdd ⋅Vdd ⋅F

α

Vin Vout

Vdd

PMOS

Ground

NMOS

Delay = k ⋅C VddVdd −Vt( )2

19

(37)

Low Power Design: Options?

Pdynamic =αCL

2!

"#

$

%&⋅Vdd ⋅Vdd ⋅F Delay = k ⋅C Vdd

Vdd −Vt( )2

• Reduce Vddv Increases gate delayv Note that this means it reduces the frequency of

operation of the processor!

• Compensate by reducing threshold voltage?v Increase in leakage power

• Reduce frequencyv Computation takes longer to completev Consumes more energy (but less power) if voltage is

not scaled

(38)

Example

AMD Trinity A10-5800 APU: 100W TDP

CPU P-state

Voltage (V)

Freq (MHz)

HWOnly

(Boost)

Pb0 1 2400

Pb1 0.875 1800

SW-Visible

P0 0.825 1600

P1 0.812 1400

P2 0.787 1300

P3 0.762 1100

P4 0.75 900

20

(39)

Optimizing Power vs. Energy

Thermal envelopes àminimize peak power

Maximize battery life à minimize energy

Example:

(40)

Modeling Component Energy

• Per-use energies can be estimated from • Gate level designs and analyses• Circuit-level designs and analyses• Implementation and measurement

• There are various open-source tools for analysis• Mentor, Cadence, Synopsys, etc.

Hardware Design

Technology Parameters

Circuit-levelEstimation

Tool

Estimation Results:Area, Energy, Timing, etc.

21

(41)

Datapath Elements

ALU

Hi

Multiply Divide

Lo

$0$1

$31

FP ALU

$0$1

$31

CPU/Core Co-Processor 1

Vector ALU

XMM0XMM1

XMM15

SIMD Registers

• Can we measure (offline) the average energy consumed by each component?

• Can we measure (offline) the average energy consumed by each component?

(42)

A Simple Power Model for Processors

• Per instruction energy measurementsv Permits a software model of energy consumption of a

programv Execution time use to assess power requirements

• A first order model of energy consumption for softwarev A table of energy consumption per instructionv More on this later!

22

(43)

What About Wires?

• We will not directly address delay or energy expended in the interconnect in this classv Simple architecture model: lump the energy/power

with the source component

Cline = c ⋅ l

12Cline

12Cline

Capacitance per unit length

Rline = r ⋅ l

Resistance per unit length

τ =12rc ⋅ l2

Lumped RC Model

(44)

Summary

• Two major classes of energy/power dissipation – static and dynamic

• Managing energy is different from managing power à leads to different solutions

• Technology plays a major role in determining relative costs

• Energy of components are often estimated using approximate models of switching activity

23

(45)

Study Guide

• Explain the difference between energy dissipation and power dissipation

• Distinguish between static power dissipation and dynamic power dissipation

• What is the impact of threshold voltage on the delay and energy dissipation?

• As you increase the supply voltage what is the behavior of the delay of logic elements? Why?

• As you increase the supply voltage what is the behavior of static and dynamic energy and static and dynamic power of logic elements?

(46)

Study Guide (cont.)

• Do you expect the 0-1 and 1-0 transitions at the output of a gate to dissipate the same amount of energy?

• For a mobile device, would you optimize power or energy? Why? What are the consequences of trying to optimize one or the other?

• Why does the energy dissipation of a 32-bit integer adder depend on the input values?

• If I double the processor clock frequency and run the same program will it take less or more energy?

24

(47)

Study Guide (cont.)

• When the chip gets hotter, does it dissipate more or less energy? Why?

• How can you reduce dynamic energy of a combinational logic circuit?

• How can you reduce static energy of a combinational logic circuit?

• What is the difference between volatile and non-volatile memory technology?

• Why do computers use volatile memory technology?

(48)

Glossary

• Dynamic Energy

• Dynamic Power

• Load capacitance

• Non-Volatile Memory

• Static Energy

• Static Power

• Time constant

• Threshold voltage

• Switching delay

• Switching energy

• Volatile Memory