Download Power Management-20041201165348

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Islanding wikipedia , lookup

Power factor wikipedia , lookup

Buck converter wikipedia , lookup

Utility frequency wikipedia , lookup

Microprocessor wikipedia , lookup

Voltage optimisation wikipedia , lookup

Immunity-aware programming wikipedia , lookup

Wireless power transfer wikipedia , lookup

Standby power wikipedia , lookup

History of electric power transmission wikipedia , lookup

Electrification wikipedia , lookup

Power over Ethernet wikipedia , lookup

Amtrak's 25 Hz traction power system wikipedia , lookup

Distribution management system wikipedia , lookup

Audio power wikipedia , lookup

Electric power system wikipedia , lookup

Switched-mode power supply wikipedia , lookup

Mains electricity wikipedia , lookup

Alternating current wikipedia , lookup

Power engineering wikipedia , lookup

AC adapter wikipedia , lookup

Transcript
Power Management
Outline




Why manage power?
Power management in CPU cores
Power management system wide
Ways for embedded programmers to be
power conscious
Why power management?


Desktops: Lower power bill, lower
heat, lower fan noise
Laptops, mobile systems: Above +
battery life!
Power management tradeoffs

Usually, power consumption is
proportional to performance
Low performance
High performance
Low power
High power
Main power mgmt goals



Lower I, V
If you’re not using something, turn it
off
Try to meet deadlines exactly instead of
being too fast
Core power I
Inside the core, we are basically
charging and discharging capacitances
+
Q  CVcore
C
Vcore
-
Q = charge, C = Capacitance, Vcore = Voltage
Core power II
Q  CVcore
Let
d
dt
dVcore
 Vcore  f
dt
Pdyn  Idyn Vcore
dQ
dVcore
Idyn 
C
dt
dt
Idyn  CVcore  f
Pdyn  CVcore  f
2
Voltage and frequency scaling I
Scale voltage and frequency dynamically
based on need


Intel Speedstep
AMD PowerNow!
Voltage and frequency scaling II
Voltage and frequency
settings for Intel Pentium M
processor
Why scale V & f together?
Operation OK
Increasing f
Oscillators are not
stable at all voltages
for a given frequency
Increasing Vcc
Processor power modes



Many CPUs/systems have several
modes of operation
Active, Power-save, Idle, Halt
Latency vs. power tradeoff
Latency
Active
Power-save
Idle
Halt
Overhead
Power,
Performance
Active mode


Processor executes instructions
normally
Entire CPU core active
Power-save



Clock circuitry may be disconnected
from unused CPU subsystems
CPU not executing instructions
Can usually return to active mode very
quickly (several times per ms)
Idle



CPU still not executing instructions
Context may be stored in system
memory, CPU registers and cache
disabled
Must restore context before resuming
execution
Sleep



Entire system context stored to
nonvolatile memory upon entering sleep
Power to main memory disabled
Latency very high
PIC 16F877A



SLEEP mode
By executing the SLEEP instruction, the
PIC goes into power down mode and
draws very little current (μA vs. mA)
Will wake via WDT or external interrupt
Palm OS





Run, doze, sleep
Never really turned off
Run – Executing instructions, returns to doze
when finished
Doze – Main clock running, LCD on, CPU not
executing instructions
Sleep – Main clock off, LCD off, only user
generated interrupt will wake system
Windows XP




Active – computer running normally
Standby – Just enough power to keep
contents of RAM, CPU off
Hibernate – Makes image of RAM
contents on hard disk
Alter policies through Control Panel ->
Power Options on Windows XP
Embedded power mgmt I
Use low power modes whenever you can
int main(void){
int main(void){
while(1){
while(1){
…
…
do_stuff();
do_stuff();
delay_ms(DELAY);
power_save();
…
…
}
}
}
}
Embedded power mgmt I



Idle system instead of using delays
Instead of polling lines, configure
system to wake up from idle upon an
interrupt from that line
If unable to use pin as interrupt, still
idle and wake periodically to check
status of pin
Embedded power mgmt II
Shut down peripherals when possible
int main(void){
…
if (userinput==FALSE) set_lcd(LCD_BACKLIGHT_OFF); //Turn backlight off
if (userpresent==FALSE) set_lcd(LCD_OFF); //Turn LCD completely off
…
}
Embedded power mgmt III
Don’t allow CMOS inputs to float!
VDD
VDD
VDD
VDD
VDD
OUT
~ 0V
IN
=
GND
Floating VDD/2?
GND
OUT
~VDD/2
IN
=
GND
GOOD
BAD
Very small current
Not so small current
GND
Summary



Buy the right core for the job
Go to low power processor states
whenever possible
Power peripherals only when necessary
References










“Dynamic Power Management for Embedded Systems,” IBM and Montavista, November 2002
“Embedded Power Management,” http://www.embedded.com/story/OEG20030121S0057
“Palm OS Power Management,”
http://www.palmos.com/dev/support/docs/protein_books/SysMgt/PowerManagement.html
“AMD PowerNow! Technology,” AMD, November 2000
“Low Power Microcontrollers,” NEC, April 2004
“Microarchitecture and Performance,” Intel,
http://www.intel.com/technology/itj/2003/volume07issue02/art03_pentiumm/p11_performanc
e.htm
“Inside DSP on low power,” June 2004,
http://insidedsp.eetimes.com/features/showArticle.jhtml?articleID=21400770
“Power Management Discussion Document,” 3G Lab, February 2001
“Enhanced Intel SpeedStep Technology for the Intel Pentium M Processor,” Intel, March 2004
“Bios and Kernel Dev. Guide for AMD Athlon 64 and AMD Opteron Processors,” AMD, April
2004