You are on page 1of 22

Maths is not everything

Embedded Systems
4 - Hardware Architecture

CPU Input/Output mechanisms Memory Buses and Aux I/O Input/Output interfaces
RMR2012

Power Management

Maths is not everything

CPU Power Management

RMR2012

CPU power consumption

Most modern CPUs are designed with power consumption in mind to some degree. Power vs. energy:
heat depends on power consumption;
Maths is not everything

RMR2012

2008 Wayne Wolf

battery life depends on energy consumption.

CMOS power consumption

Voltage drops: power consumption proportional to V2. Toggling: more activity means more power. Leakage: basic circuit characteristics; can be eliminated by disconnecting power.
Maths is not everything

RMR2012

2008 Wayne Wolf

CPU power-saving strategies

Reduce power supply voltage. Run at lower clock frequency. Disable function units with control signals when not in use.
2008 Wayne Wolf

Maths is not everything

Disconnect parts from power supply when not in use.

RMR2012

Power management styles

Static power management: does not depend on CPU activity.


Example: user-activated power-down mode.

Dynamic power management: based on CPU activity.


Maths is not everything

RMR2012

2008 Wayne Wolf

Example: disabling off function units.

Application: PowerPC 603 energy features

Provides doze, nap, sleep modes. Dynamic power management features:


Uses static logic. Can shut down unused execution units. Cache organized into subarrays to minimize amount of active circuitry.
Maths is not everything

RMR2012

2008 Wayne Wolf

PowerPC 603 activity

Percentage of time units are idle for SPEC integer/floating-point:


unit! ! ! D cache!! I cache! ! load/store! ! xed-point!!
Maths is not everything

Specint92!! Specfp92 29%!! ! 29%!! ! 35%!! ! 38%!! ! 99%!! ! 28% 17% 17% 76% 30% 97%

2008 Wayne Wolf

oating-point!

system register! 89%! ! !

RMR2012

Power-down costs

Going into a power-down mode costs:


time; energy.

Must determine if going into mode is worthwhile.


Maths is not everything

RMR2012

2008 Wayne Wolf

Can model CPU power states with power state machine.

Application: StrongARM SA-1100 power saving

Processor takes two supplies:


VDD is main 3.3V supply. VDDX is 1.5V.

Three power modes:


Run: normal operation.
2008 Wayne Wolf

Idle: stops CPU clock, with logic still powered. Sleep: shuts off most of chip activity; 3 steps, each about 30 s; wakeup takes > 10 ms.

Maths is not everything

RMR2012

SA-1100 power state machine

Prun = 400 mW

run
10 !s 90 !s 10 !s 90 !s 160 ms

idle
2008 Wayne Wolf
Maths is not everything

sleep
Psleep = 0.16 mW

Pidle = 50 mW

RMR2012

Maths is not everything

MSP430 Power Management

RMR2012

e on-demand
MSP430: achieving ultra-low power

Extended Ultra-low Power standby mode Minimum active duty cycle Performance on-demand

Maths is not everything

RMR2012

13

MSP430: ultra-low power clock control

Maths is not everything

RMR2012

14

MSP430: active mode supply current

Maths is not everything

RMR2012

15

MSP430: basic clock conguration

Maths is not everything

RMR2012

16

MSP430: basic clock mode + VLO clock

Maths is not everything

RMR2012

17

MSP430: low power mode conguration

Maths is not everything

RMR2012

18

MSP430: interrupts control program ow

Maths is not everything

RMR2012

19

MSP430: software functions vs peripherals

Maths is not everything

RMR2012

20

MSP430: C coding tips

Use local variable as much as possible.


Local variables use CPU registers whereas global variables use RAM.

Maths is not everything

RMR2012

Use bit mask instead of bitfields for unsigned int and unsigned char. Use unsigned data types where possible Use pointers to access structures and unions Use static const class to avoid run-time copying of structures, unions, and arrays. Avoid modulo Count down for loops

21

MSP430: principles of ULP operation

Maximize the time in standby (LPM3) Use interrupts to control program flow Replace software functions with peripheral hardware Power manage internal peripherals Power manage external devices Device choice can make a difference
Maths is not everything

Effective code is a must


Every unnecessary instruction executed is a portion of the battery wasted that will never return.

RMR2012

22

You might also like