• Ingen resultater fundet

Embedded Systems Design: Optimization Challenges

N/A
N/A
Info
Hent
Protected

Academic year: 2023

Del "Embedded Systems Design: Optimization Challenges"

Copied!
34
0
0

Indlæser.... (se fuldtekst nu)

Hele teksten

(1)

Embedded Systems Design:

Optimization Challenges

Paul Pop

Embedded Systems Lab (ESLAB) Linköping University, Sweden

(2)

Outline

 Embedded systems

 Example area: automotive electronics

 Embedded systems design

 Optimization problems

 Fault-tolerant mapping and scheduling

 Voltage scaling

 Communication delay analysis

 Assessment and message

(3)

Embedded Systems

General purpose systems Embedded systems

Microprocessor market shares

(4)

Example Area: Automotive Electronics

 What is “automotive electronics”?

Vehicle functions

implemented with electronics

Body electronics

System electronics: chassis, engine

Information/entertainment

(5)

Automotive Electronics Market Size

Market 8.9

($billions) 10.5 13.1 14.1 15.8 17.4 19.3 21.0

0 200 400 600 800 1000 1200 1400

1998 1999 2000 2001 2002 2003 2004 2005

Cost of Electronics / Car ($)

90% of future innovations in vehicles:

based on electronic embedded systems

2006: 25% of the total cost of a car will be electronics

(6)

Automotive Electronics Platform Example

(7)

Outline

 Embedded systems

 Example area: automotive electronics

 Embedded systems design

 Optimization problems

 Fault-tolerant mapping and scheduling

 Voltage scaling

 Communication delay analysis

 Assessment and message

(8)

Embedded Systems Design

Model of system implementation Estimation:

exec. time System

platform

System model

System-level design tasks

Analysis

Software

synthesis Hardware synthesis

Growing complexity

Constraints

Time, energy, size

Cost, time-to-market

Safety, reliability

Heterogeneous

Hardware components

Comm. protocols

Mapping and scheduling

Voltage scaling

Communication delay analysis

(9)

Embedded System Design, Cont.

 Goal: automated design optimization techniques

 Successfully manage the complexity of embedded systems

 Meet the constraints imposed by the application domain

 Shorten the time-to-market

 Reduce development and manufacturing costs

Optimization: the key

to successful design

(10)

Outline

 Embedded systems

 Example area: automotive electronics

 Embedded systems design

 Optimization problems

 Fault-tolerant mapping and scheduling

 Voltage scaling

 Communication delay analysis

 Assessment and message

(11)

Optimization Problems

1. Mapping and scheduling

1.1 Mapping to minimize communication 1.2 Mapping and scheduling

1.3 Fault-tolerant mapping and scheduling

2. Voltage scaling

2.1 Continuous voltage scaling 2.2 Discrete voltage scaling

3. Communication delay analysis

(12)

 Given

 Application: set of interacting processes

 Platform: set of nodes

Problem #1.1: Mapping

P1

P4

P2 P3 m1 m2

m3 m4

 Assessment

 Optimal solutions even for large problem sizes

N1 N2 P1

P4

P2 P3 m1 m2

m3 m4

 Determine

 Mapping of processes to nodes

Such that the communication is minimized

(13)

Problem #1.2: Mapping and Scheduling

 Given

 Application: set of interacting processes

 Platform: set of nodes

Timing constraints: deadlines

 Determine

 Mapping of processes and messages

Schedule tables for processes and messages

Such that the timing constraints are satisfied

S2 S1

P1 P4

P2

m1 m2 m3 m4 P3

N1 N2 Bus Schedule

table

Deadline P1

P4

P2 P3 m1 m2

m3 m4

N1 N2

(14)

Problem #1.2: Assessment

 Scheduling is NP-complete even in simpler context

D. Ullman, “NP-Complete Scheduling Problems”, Journal of Computer Systems Science, volume 10, pages 384–393,

1975.

 ILP formulation

Can’t obtain optimal solutions for large problem sizes

 Alternative: divide the problem

Scheduling

Heuristic: List scheduling

Mapping

Simulated annealing

Tabu-search

(15)

Messages:

Schedule tablesMessages:

Fault-tolerant protocol Processes:

Schedule tables

Fault-Tolerant Mapping and Scheduling

...

Transient faults

TDMA bus: TTP

Processes:

Re-execution and replication

(16)

Fault-Tolerance Techniques

P1 P1 P1

Re-execution

N1

P1 P1 P1

Replication

N1 N2 N3

P1 P1 N1

N2

P1

Re-executed replicas

2

(17)

Problem #1.3: Formulation

Application: set of process graphs Architecture: time-triggered system

...

Fault-model: transient faults

 Given

 Application: set of interacting processes

 Platform: set of nodes

 Timing constraints: deadlines

Fault model: number of transient faults in the system period

 Determine

 Mapping of processes and messages

 Schedule tables for processes and messages

Fault-tolerance policy assignment

Such that the timing constraints are satisfied

(18)

P1 N1

N2 TTP

P2

P3 S1S2

P4

m2

Missed

Fault-Tolerance Policy Assignment

P1 P

N1 N2 40 50 60 80

1

N N

P

P3 m2 P1

N1 N2 TTP

P2 P3 S1S2 m2

P4

N1 N2

P1

P3 S1S2

P4 P2

P1

m1 m1

TTP m2 m2 P2

m3m3

P3

P4

Missed P1

N1 N2 TTP

P2

P3 S1S2 m2

P4

No fault-tolerance:

application crashes

N1 N2

P1

P3 S1S2

P4 P2

P1

m2 m1

TTP

Met Optimization of fault-tolerance policy assignment

Deadline

(19)

Tabu-Search: Policy Assignment & Mapping

P1 P2 P3

N1 N2 40 50 606075 P4 40 5075

1 N1 N2 P1

P4 P2

P3 m1 m2

m3 N1

N2 TTP

P1

P3 S1S2 S2

P4

m2

P2

1 1 0 1 Wait

0 0 2 1 Tabu

P4 P3 P2 P1

1 1 0 1 Wait

0 0 2 1 Tabu

P4 P3 P2

P1 Current

solution

Design

transformations

N1 N2 TTP

P1 P3 S1S2

P4 P2

m1

1 1 0 1 Wait

0 0 2 1 Tabu

P4 P3 P2 P1

1 1 0 1 Wait

0 0 2 1 Tabu

P4 P3 P2

P1 Tabu move &

worse than best-so-far

S1 N1

N2

P1

P3 S1S2

P4 P2

P1

m2 m1

TTP

1 2 0 0 Wait

0 0 1 2 Tabu

P4 P3 P2 P1

1 2 0 0 Wait

0 0 1 2 Tabu

P4 P3 P2

P1 Tabu move &

better than best-so-far

N1 N2 TTP

P1 P3

S1S2 S2

P4

m2

P2

1 1 0 1 Wait

0 0 2 1 Tabu

P4 P3 P2 P1

1 1 0 1 Wait

0 0 2 1 Tabu

P4 P3 P2

P1 Non-tabu &

worse than best-so-far

N1 N2 TTP

P1

P3 S1S2 S2

P4

m2

P2 P3

1 1 0 1 Wait

0 0 2 1 Tabu

P4 P3 P2 P1

1 1 0 1 Wait

0 0 2 1 Tabu

P4 P3 P2

P1 Non-tabu &

worse than best-so-far

N1 N2

P1

P3 S1S2

P4 P2

P1

m2 m1

TTP

1 2 0 0 Wait

0 0 1 2 Tabu

P4 P3 P2 P1

1 2 0 0 Wait

0 0 1 2 Tabu

P4 P3 P2

P1 Current

solution

Design

transformations

(20)

Problem #2: Voltage Scaling

GSM Phone:

Search

Radio link control

Talking

MP3 Player

Digital Camera:

Take photo

Restore photo

Timing constraints

0 10 20 30 40 50 60 70

1997 1999 2002 2005 2008 2011

Battery power Chip power

Power constraints

(21)

Problem #2: Voltage Scaling

deadline

t P

123

Energy/speed trade-offs:

varying the voltages

Vbs Vdd CPU

f

1

f

2

f

3

Different voltages:

different frequencies

Mapping and scheduling:

given (fastest freq.)

Power

deadline

123

t

Slack

(22)

0 2 3

5

4

1 CPU1

CPU2

Bus

Vdd Vbs

Vdd Vdd Vbs

Problem #2.1: Continuous Voltage Scaling

 Given

 Application: set of interacting processes

 Platform: set of nodes, each having

supply voltage (Vdd) and body bias voltage (Vbs) inputs

 Mapping and schedule table (including timing constraints)

P

  

t

Slack

Architecture and mapping Schedule table / processor

(23)

Problem #2.1: Continuous Voltage Scaling

 Determine

Voltage levels Vdd and Vbs for each process

Such that system energy is minimized and

Deadlines are satisfied

deadline

t P

123

P

deadline

123

t

Slack

Output

Input

Height:

voltage level

Area:

energy

 Assessment

Convex nonlinear problem

Polynomial time solvable with an arbitrary good precision

A. Andrei, “Overhead-Conscious Voltage Selection for

Dynamic and Leakage Energy Reduction of Time-Constrained Systems”, technical report, Linköping University, 2004

(24)

Problem #2.1: Formulation

 Minimize energy

 E[0] + E[1] + E[2] + E_OH[1-2]

 Such that

 Tstart[0] + Texe[0]  Tstart[1]

 Tstart[1] + Texe[1] + Toh[1-2]  Tstart[2]

 Tstart[2] + Texe[2]  DL[2]

Energy due to

processes Overhead due to voltage changes

Precedence relationships

Deadlines

(25)

Problem #2.2: Discrete Voltage Scaling

 Problem formulation

Given discrete execution frequencies

Processors can operate using a frequency from a fixed discrete set Changing the frequency incurs a delay and an energy penalty

Determine the set of frequencies for each task

Such that system energy is minimized and

Deadlines are satisfied

t

P

deadline

23

1

f2 f3 f3 f2 f2 f1

Discrete

(26)

 Given

 1 processor: f{50, 100, 150} MHz

 3 processes

1: P={10, 20, 30} mW, dl=1ms, NC=100 cycles

2: P={12, 22, 32} mW, dl=1.5ms , NC=100 cycles

3: P={15, 25, 35} mW, dl=2ms , NC=100 cycles

 Schedule: execution order is 1, 2, 3

 Determine

For each process, number of clock cycles to be executed at each frequency

such that the energy is minimized

) , , ( ), ,

, ( ), ,

,

( c

11

c

12

c

13

c

12

c

22

c

23

c

13

c

32

c

33

Problem #2.2: Example

(27)

Problem #2.2: Example, Cont.

 Assessment:

Strongly NP-hard problem

The frequencies are now a set of integers; identical to:

P. De, “Complexity of the Discrete Time-Cost Tradeoff Problem for Project Networks”, Operations Research, 45(2):302–306, March 1997.

i i

i

i

c c NC

c

1

2

3

Each task has to execute the given number of cycles

i i i

i

t

f c f

c f

c

11

22

33

Task execution time

1

i i

i

t t

start

Precedence constraints

i i

i

t dl

start  

Deadline constraints

c f

i11

P

i1

c f

i22

P

i2

c f

i33

P

i3 Minimize energy

MILP formulation for the optimal solution

(28)

Embedded Systems Design

Mapped and scheduled model Estimation:

exec. time System

platform

System model

System-level design tasks

Analysis

Software

synthesis Hardware synthesis

Communication protocols

Communication delay analysis

(29)

Problem #3: FlexRay Analysis

 FlexRay communication protocol

 Becoming de-facto standard in automotive electronics

BMW, DaimlerChrysler, General Motors, Volkswagen, Bosch, Motorola, Philips

 Deterministic data transmission, fault-tolerant, high data-rate

...

Communication protocol: FlexRay

S R

Worst-case

communication delay

 Problem

Given

Application: set of interacting processes

Platform: set of nodes connected by FlexRay

Implementation: Mapping and scheduling

Determine

Worst-case communication delays for messages

(30)

Problem #3: FlexRay Analysis, Cont.

Static Dynamic Static Dynamic

Generalized Time-division multiple access

Flexible Time-division multiple access Bus cycle

m

4

m

5

m

6

m

7

Arrive

dynamically

Off-line: Worst- case analysis Off-line:

Schedule table

m

2

m

3

m

1

Statically assigned

(31)

Problem #3: Formulation and Example

 Given

 FlexRay bus

Length of the static phase

Length of the dynamic phase

 Dynamically arriving messages

Priorities

 Determine for each message

 Worst-case communication delay

Static Dynamic Static Dynamic Static Dynamic

Fixed size bin

m

4

m

5

m

6

m

7

Priority

Dynamic Dynamic Dynamic

Analyze this!

m

4

m

7

m

6

m

5

Static Static Static

Bin covering: two bins

(32)

Problem #3: Assessment

 ”Classic” bin covering problem

Given

Set of bins of fixed integer size

Set of items of integer size

Determine

Maximum number of bins that can be filled with the items

 Assessment

Asymptotic fully polynomial time approximation

 FlexRay dynamic phase analysis ≠ ”classic” bin covering

 Bins have an upper limit: size of the dynamic phase

 Assessment

Approximation algorithm does not exist

MILP formulation feasible up to 60 messages

Wanted:

better solution

(33)

Outline

 Embedded systems

 Example area: automotive electronics

 Embedded systems design

 Optimization problems

 Fault-tolerant mapping and scheduling

 Voltage scaling

 Communication delay analysis

 Assessment and message

(34)

Message

 Optimization

 Key to successful embedded systems design

Challenges

 Classify the problems

 Divide the problem into sub-problems

 Formulate the problems

 Solve the problems optimally

 Fast and accurate heuristics for specific problems

Referencer

RELATEREDE DOKUMENTER

A solution approach need only consider extreme points A constraint of a linear program is binding at a point x 0 if the inequality is met with equality at x 0.. It is

Stochastics (Random variable) Stochastic Dynamic Programming Booking profiles..

Count Jacopo Francesco Riccati Born: 28 May 1676, Venice Dead: 15 April 1754, Treviso University of Padua Source: Wikipedia...

Theorem 5 : Consider the dynamic optimization problem of bringing the system (3.17) from the initial state to a terminal state such that the end point constraints in (3.19) is met

Constrained Control - Decisions Pontryagins Principle (D) Investment planning Pontryagins Principle (C) Orbit injection (II).. Reading guidance (DO:

Manager owned firms are the only ones among them not displaying significant sensitivity to the availability of internal funds, while state owned, domestic outside owned and

High-resolution modelling and design of steel structures 11.45 – 12.00 15.15 Fernanda Fernandes Campista, José Guilherme Santos da Silva* Dynamic Analysis of Steel-Concrete

Viaceslav Izosimov, Paul Pop, Petru Eles, Zebo Peng Embedded Systems Lab (ESLAB).. Linköping