Embedded Systems 9. Low Power Design: Lothar Thiele
Embedded Systems 9. Low Power Design: Lothar Thiele
Lothar Thiele
9-1
Contents of Course
1. Embedded Systems Introduction 2. Software Introduction 3. Real-Time Models 4. Periodic/Aperiodic Tasks 5. Resource Sharing 6. Real-Time OS 12. Model Based Design 7. System Components 8. Communication 9. Low Power Design 10. Models 11. Architecture Synthesis
Hardware
Computer Engineering and Networks Laboratory
Topics
General Remarks Power and Energy Basic Techniques
Parallelism VLIW (parallelism and reduced overhead) Dynamic Voltage Scaling Dynamic Power Management
9-3
Power is considered as the most important constraint in embedded systems. [in: L. Eggermont (ed): Embedded Systems Roadmap 2002, STW] Power demands are increasing rapidly, yet battery capacity cannot [in Diztel et al.: Power-Aware Architecting for data-dominated applications, 2007, Springer] keep up.
Swiss Federal Institute of Technology 9-4 Computer Engineering and Networks Laboratory
Implementation Alternatives
General-purpose processors
Application-specific instruction set processors (ASIPs) Microcontroller DSPs (digital signal processors)
Flexibility
1.0
0.5
0.25
0.13
0.07
Necessary to optimize HW and SW. Use heterogeneous architectures. Apply specialization techniques.
Swiss Federal Institute of Technology 9-6
Energy Efficiency
9-7
Topics
General Remarks Power and Energy Basic Techniques
Parallelism VLIW (parallelism and reduced overhead) Dynamic Voltage Scaling Dynamic Power Management
9-8
E t In many cases, faster execution also means less energy, but the opposite may be true if power has to be increased to allow faster execution.
Swiss Federal Institute of Technology 9-9 Computer Engineering and Networks Laboratory
Ileak : leakage current Iint : short circuit current Isw : switching current
9-11
Leakage
leaking diodes and translators becomes one of the major factors due to shrinking feature sizes in semiconductor technology
9-12
Decreasing Vdd reduces P quadratically (f constant). The gate delay increases only reciprocally. Maximal frequency fmax decreases linearly.
Swiss Federal Institute of Technology 9-13 Computer Engineering and Networks Laboratory
Saving energy for a given task: Reduce the supply voltage Vdd Reduce switching activity Reduce the load capacitance CL Reduce the number of cycles #cycles
9-14
Vdd
Computer Engineering and Networks Laboratory
9-16
Topics
General Remarks Power and Energy Basic Techniques
Parallelism VLIW (parallelism and reduced overhead) Dynamic Voltage Scaling Dynamic Power Management
9-17
Use of Parallelism
Vdd fmax Vdd/2 fmax/2 Vdd/2 fmax/2
9-18
Use of Pipelining
Vdd fmax Vdd/2 fmax/2 Vdd/2 fmax/2
9-19
Topics
General Remarks Power and Energy Basic Techniques
Parallelism VLIW (parallelism and reduced overhead) Dynamic Voltage Scaling Dynamic Power Management
9-20
VLIW Architectures
Large degree of parallelism
many computational units, (deeply) pipelined
9-22
9-23
Transmeta
VLIW
(VLIW)
Swiss Federal Institute of Technology 9-24 Computer Engineering and Networks Laboratory
Topics
General Remarks Power and Energy Basic Techniques
Parallelism VLIW (parallelism and reduced overhead) Dynamic Voltage Scaling Dynamic Power Management
9-25
Saving energy for a given task: Reduce the supply voltage Vdd Reduce switching activity Reduce the load capacitance CL Reduce the number of cycles #cycles
9-27
9-28
Vdd
Computer Engineering and Networks Laboratory
9-30
9-31
9-32
z = a x + (1-a) y
case A: execute at voltage x for T a time units and at voltage y for (1-a) T time units; energy consumption T ( P(x) a + P(y) (1-a) ) case B: execute at voltage z = a x + (1-a) y for T time units; energy consumption T P(z)
Swiss Federal Institute of Technology 9-33 Computer Engineering and Networks Laboratory
If possible, running at a constant frequency (voltage) minimizes the energy consumption for dynamic voltage scaling:
case A is always worse if the power consumption is a convex function of the supply voltage
Swiss Federal Institute of Technology 9-34 Computer Engineering and Networks Laboratory
How do we schedule these tasks such that all these tasks can be finished no later than their deadlines and the energy consumption is minimized?
YDS Algorithm from A Scheduling Model for Reduce CPU
Energy, Frances Yao, Alan Demers, and Scott Shenker, FOCS 1995. If possible, running at a constant frequency (voltage) minimizes the energy consumption for dynamic voltage scaling.
Swiss Federal Institute of Technology 9-35 Computer Engineering and Networks Laboratory
5 6
3,6,5 2,6,3 7
16 time
Define intensity G([z, z]) in some time interval [z, z]: average accumulated execution time of all tasks that have arrival and deadline in [z, z] relative to the length of the interval z-z
ai,di,ci
9-36
5 6 7
16 time
G([0,6]) = (5+3)/6=8/6, G([0,8]) = (5+3+2)/ (8-0) = 10/8, G([0,14]) = (5+3+2+6+6)/14=11/7, G([0,17]) = (5+3+2+6+6+2+2)/17=26/17 G([2, 6]) = (5+3)/(6-2)=2, G([2,14]) = (5+3+6+6) / (14-2) = 5/3, G([2,17]) = (5+3+6+6+2+2)/15=26/15 G([3,6]) =5/3, G([3,14]) = (5+6+6)/(14-3) = 17/11, G([3,17])=(5+6+6+2+2)/14=21/14 G([6,14]) = 12/(14-6)=12/8, G([6,17]) = (6+6+2+2)/(17-6)=16/11 G([10,14]) = 6/4, G([10,17]) = 10/7, G([11,17]) = 4/6, G([12,17]) = 2/5
Swiss Federal Institute of Technology 9-37
ai,di,ci
5 6 7
16 time
2
0 4
1
8 12 16
12,17,2
ai,di,ci
Computer Engineering and Networks Laboratory
9-38
5 6 0,8,2 7
16 time
5 6 4 3
0 4 8
12,17,2
ai,di,ci
7
12 16
9-39
time
Computer Engineering and Networks Laboratory
7,13,2 8,13,2
G([0,4])=2/4, G([0,10]) = 14/10, G([0,13])=18/13 G([2,10])=12/8, G([2,13]) = 16/11, G([6,10])=6/4 G([6,13])=10/7, G([7,13])=4/6, G([8,13])=4/5
ai,di,ci
4
0 4
Swiss Federal Institute of Technology
5
8 12 16
9-40
time
Computer Engineering and Networks Laboratory
0,4,2 2 1
4
4
8
5
12 16
time
7,13,2 8,13,2
frequency
3
0
2
4
0,2,2 4
8
0,2,2
5
12
7
16
time
v1 frequency
Swiss Federal Institute of Technology
v2 2
v3 1
v4 1.5
9-41
v5 1.5
v6 4/3
v7 4/3
Computer Engineering and Networks Laboratory
3,6,5 2,6,3 2 3 2 1 3 4 4 5 6 7
time
ai,di,ci
Exercise:
For periodic real-time tasks with deadline=period, running at constant speed with 100% utilization under EDF has minimum energy consumption while satisfying the timing constraints.
Online
Compared to the optimal offline solution, the on-line schedule uses at most 27 times of the minimal energy consumption.
Swiss Federal Institute of Technology 9-43 Computer Engineering and Networks Laboratory
Topics
General Remarks Power and Energy Basic Techniques
Parallelism VLIW (parallelism and reduced overhead) Dynamic Voltage Scaling Dynamic Power Management
9-44
9-45
RUN
90s 10s 36J 4J 90s 5J 160ms 64mJ
IDLE 50mW
Swiss Federal Institute of Technology 9-46
SLEEP 160W
power states
Desired: Shutdown only during long idle times Tradeoff between savings and overhead
Swiss Federal Institute of Technology 9-47 Computer Engineering and Networks Laboratory
The Challenge
Questions: When to go to a power-saving state? Is an idle period long enough for shutdown? Predicting the future
9-48
time
Critical voltage
Swiss Federal Institute of Technology 9-49 Computer Engineering and Networks Laboratory
Procrastination Schedule
frequency 3 2 1 critical frequency: 1.5
3,6,5 2,6,3
3
0
2
4
4
8
54 5 6
12
7 7
16 time
procrastinate scheduling
Execute by using voltages higher or equal to the critical voltage only apply YDS algorithm round up voltages lower than the critical voltage Procrastinate the execution of tasks to aggregate enough time for sleeping Try to reduce the number of times to turn on/off Sleep as long as possible
Swiss Federal Institute of Technology 9-50
ai,di,ci