Top Banner
Institute of Computer and Network Engineering Technische Universität Braunschweig 2 nd Workshop on Mapping Applications to MPSoCs St. Goar, June 2009 Timing Analysis on Complex Real-Time Automotive Multicore Architectures Mircea Negrean Simon Schliecker Rolf Ernst
25

Timing Analysis on Complex Real-Time Automotive …€¦ · Timing Analysis on Complex Real-Time ... LabView, …) † environment ... core1 local resources core2 shared resources

Jun 05, 2018

Download

Documents

phamdien
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Timing Analysis on Complex Real-Time Automotive …€¦ · Timing Analysis on Complex Real-Time ... LabView, …) † environment ... core1 local resources core2 shared resources

Institute of Computer and Network Engineering

Technische Universität Braunschweig

2nd Workshop on Mapping Applications to MPSoCs St. Goar, June 2009

Timing Analysis on Complex Real-Time Automotive Multicore Architectures

Mircea NegreanSimon SchlieckerRolf Ernst

Page 2: Timing Analysis on Complex Real-Time Automotive …€¦ · Timing Analysis on Complex Real-Time ... LabView, …) † environment ... core1 local resources core2 shared resources

2Institute of Computer and Network Engineering

Automotive challenges• Requirements of automotive E/E platforms and architectures

- Sufficient computing power and communication bandwidth- Avoid unnecessary over-dimensioning of computing resources- Low cost

Find sweet spot between maximum performance and minimum costs

• Requirements of automotive OEMs (for certification)- Analytical proof:

• That systems correctly work under maximum load• Sufficient resource availability at any time

Formal performance verification techniques - During different system design phases- For final product to increase SIL (safety integrity level) compliance

Page 3: Timing Analysis on Complex Real-Time Automotive …€¦ · Timing Analysis on Complex Real-Time ... LabView, …) † environment ... core1 local resources core2 shared resources

3Institute of Computer and Network Engineering

Outline

• Abstractions for the analysis of real-time systems• Multicore architectures• Timing implications and countermeasures • Formal analysis method• Conclusion

Page 4: Timing Analysis on Complex Real-Time Automotive …€¦ · Timing Analysis on Complex Real-Time ... LabView, …) † environment ... core1 local resources core2 shared resources

4Institute of Computer and Network Engineering

Outline

• Abstractions for the analysis of real-time systems• Multicore architectures• Timing implications and countermeasures • Formal analysis method• Conclusion

Page 5: Timing Analysis on Complex Real-Time Automotive …€¦ · Timing Analysis on Complex Real-Time ... LabView, …) † environment ... core1 local resources core2 shared resources

5Institute of Computer and Network Engineering

Scheduler

T1 T2

activationsResource

Task

System

CPU1

HWShared Memory

CPU2 CoP

Arbiter

LocalMemory

Software Timing Hierarchy

Page 6: Timing Analysis on Complex Real-Time Automotive …€¦ · Timing Analysis on Complex Real-Time ... LabView, …) † environment ... core1 local resources core2 shared resources

6Institute of Computer and Network Engineering

Local Scheduling Analysis

• Large body of methods available to derive WCRTs for different scheduling policies - SPP, TDMA, RR, EDF,…- considering realistic scheduling effects

(context switch times, offsets,…)

CPU1 PreemptionStalling

Execution• Single core task execution (classical model)

• Single core task execution (with shared resources)

WCRTShared Resource

CPU1

Valid assumption for single processor systems: Shared Resource access times are part of the Core Execution Time Ci

Page 7: Timing Analysis on Complex Real-Time Automotive …€¦ · Timing Analysis on Complex Real-Time ... LabView, …) † environment ... core1 local resources core2 shared resources

7Institute of Computer and Network Engineering

Model Task Activation as “Event Streams”

t [ms]

events

events

D [ms]

Event Stream

Arrival Curves

• Response Time Analysis requires traffic models:

Derive event bounds

Determined by• application model (Simulink,

LabView, …)• environment model (reactive

systems)• service contracts (max no of

requests per time, …)

T1

Extract key parameters(optional)

P PeriodJ Jitterdmin Minimum event

distance

T1

Page 8: Timing Analysis on Complex Real-Time Automotive …€¦ · Timing Analysis on Complex Real-Time ... LabView, …) † environment ... core1 local resources core2 shared resources

8Institute of Computer and Network Engineering

Component Performance Analysis

• Output event model of one processor becomes input event model ofsuccessor compose multiple local analyses into system level analysis

Comp 1

schedulingcomp 1

T4

T3 output event streams

input event streams

Page 9: Timing Analysis on Complex Real-Time Automotive …€¦ · Timing Analysis on Complex Real-Time ... LabView, …) † environment ... core1 local resources core2 shared resources

9Institute of Computer and Network Engineering

• Abstractions for the analysis of real-time systems• Multicore architectures• Timing implications and countermeasures • Formal analysis method• Conclusion

Page 10: Timing Analysis on Complex Real-Time Automotive …€¦ · Timing Analysis on Complex Real-Time ... LabView, …) † environment ... core1 local resources core2 shared resources

10Institute of Computer and Network Engineering

Multicore Architectures• Expected in near future automotive designs

localresources CPU1 local

resourcesCPU2

localresources core1 local

resourcescore2

sharedresources

ECU1 ECU2

MC-ECU

Current distributed system• All accesses to local resources• Bus communication clearly

specified and systematic

Multicore system• Accesses to local and shared

resources• Complicated, interleaved and

less systematic communication timing

Complex impact on timing

Page 11: Timing Analysis on Complex Real-Time Automotive …€¦ · Timing Analysis on Complex Real-Time ... LabView, …) † environment ... core1 local resources core2 shared resources

11Institute of Computer and Network Engineering

• Abstractions for the analysis of real-time systems• Multicore architectures• Timing implications and countermeasures• Formal analysis method• Conclusion

Page 12: Timing Analysis on Complex Real-Time Automotive …€¦ · Timing Analysis on Complex Real-Time ... LabView, …) † environment ... core1 local resources core2 shared resources

12Institute of Computer and Network Engineering

Task Execution in Multicore

• Multicore task execution with shared resources

WCRT

Shared Resource

CPU1

CPU2

• Single core task execution (with shared resources)

WCRTShared Resource

CPU1

• Mapping to multicore architectures changes timing- Leads to new timing dependencies between applications!

Page 13: Timing Analysis on Complex Real-Time Automotive …€¦ · Timing Analysis on Complex Real-Time ... LabView, …) † environment ... core1 local resources core2 shared resources

13Institute of Computer and Network Engineering

Software Timing Hierarchy

Scheduler

T1 T2

activationsResource

Task

System

CPU1

HWShared Memory

CPU2 CoP

Arbiter

LocalMemory

Bottom-up

broke

n

Page 14: Timing Analysis on Complex Real-Time Automotive …€¦ · Timing Analysis on Complex Real-Time ... LabView, …) † environment ... core1 local resources core2 shared resources

14Institute of Computer and Network Engineering

Countermeasures• Orthogonalize resources

- Introduce schedulers that give upper bounds on interference independently of competing streams

- At least perform traffic shapingimposes strict hardware guidelinesprotection from partially false system specificationprone to over-provisioning (not so much in hard real-time setups)

• Use formal analysis that covers dynamism- Find realistic upper bounds on application behavior- Provide formulas and analysis methods matching actual system

requires comprehensive knowledge of hardware behavior to set up analysisrequires safe assumptions about behavior of the softwareallows considering dynamic schedulers and load

• Mix of the above

Page 15: Timing Analysis on Complex Real-Time Automotive …€¦ · Timing Analysis on Complex Real-Time ... LabView, …) † environment ... core1 local resources core2 shared resources

15Institute of Computer and Network Engineering

• Abstractions for the analysis of real-time systems• Multicore architectures• Timing implications and countermeasures • Formal analysis method• Conclusion

Page 16: Timing Analysis on Complex Real-Time Automotive …€¦ · Timing Analysis on Complex Real-Time ... LabView, …) † environment ... core1 local resources core2 shared resources

16Institute of Computer and Network Engineering

Formal Analysis Method - Example• Response Time Analysis for multiprocessor systems (DATE2009)

- Set of “m” processor systems each with its own SPP scheduling

- Static set of tasks = { 1, 2, ..., n}• statically mapped on the „m“ processors

- Unique priority space across processors

• Priority ( 1) > Priority ( 2) > ... > Priority ( n)- Set of shared resources

• Local and global• Arbitration according to MPCP

Evolutionary extension of OSEK-AUTOSAR scheduling

Matches design practice in automotive domain

Page 17: Timing Analysis on Complex Real-Time Automotive …€¦ · Timing Analysis on Complex Real-Time ... LabView, …) † environment ... core1 local resources core2 shared resources

17Institute of Computer and Network Engineering

Response Time Analysis• Worst-case response time Ri of a task i on a processor with SPP

- Task own execution- Interference due to higher priority local tasks- Blocking time when accessing shared resources

31

24

5

LocalResources

Global Shared Resources

G1 G2

CPU 1Local

Resources

CPU 2

t1

t3

)()()( iiiiiii RBRICRR

54321

t

)( t

)( t

time interval

number of events

: Number of events per time interval

)( tt

Page 18: Timing Analysis on Complex Real-Time Automotive …€¦ · Timing Analysis on Complex Real-Time ... LabView, …) † environment ... core1 local resources core2 shared resources

18Institute of Computer and Network Engineering

Types of Blocking - according to MPCP• Local blocking time • Indirect preemption delay• Direct blocking time • Local preemption delay

Bi(Ri )= B1(Ri ) + B2(Ri ) + B3(Ri ) + B4(Ri )

CPU1 1

2

3

4

5

8

L1

G1

G1

G1

G1CPU3

CPU2

G1

G1

G1

G2G2

L1 G2

Page 19: Timing Analysis on Complex Real-Time Automotive …€¦ · Timing Analysis on Complex Real-Time ... LabView, …) † environment ... core1 local resources core2 shared resources

19Institute of Computer and Network Engineering

Derivation of Shared Resource Latencies• Concept Use event model concept to capture resource traffic

11515,5 )(~)( G

direct RRB

• Direct blocking time of task 5:

11G - Time duration when G1 is blocked by 5

1111 )()(~ nRtt

srrdtt)(~1

Bound 1:

Bound 2:

• Possible upper bounds derivation:

Page 20: Timing Analysis on Complex Real-Time Automotive …€¦ · Timing Analysis on Complex Real-Time ... LabView, …) † environment ... core1 local resources core2 shared resources

20Institute of Computer and Network Engineering

Multiprocessor Response Time Analysis

Analysis issues:

• Critical instance scenario not valid due to possible self-suspension of higher priority tasks

compute response times top-down (higher priority first)

• Bi(Ri) depends on the load imposed by other tasks, but their response time has possibly not been calculated

Iterative computation of tasks WCRT until general convergence For lower priority tasks use a load derivation that is independent of WCRT

)()()()(

iihpl

jjijiiii RBCRRCRRij

• Couple local scheduling analysis with the blocking time analysis

Page 21: Timing Analysis on Complex Real-Time Automotive …€¦ · Timing Analysis on Complex Real-Time ... LabView, …) † environment ... core1 local resources core2 shared resources

21Institute of Computer and Network Engineering

Applicability

WCRT of task 5

• Modeling and Analysis of multiprocessor systems implemented in SymTA/S (Symbolic Timing Analysis for Systems)

dsrr - minimum distance between two consecutive shared resource requests

Page 22: Timing Analysis on Complex Real-Time Automotive …€¦ · Timing Analysis on Complex Real-Time ... LabView, …) † environment ... core1 local resources core2 shared resources

22Institute of Computer and Network Engineering

• Abstractions for the analysis of real-time systems• Multicore architectures• Timing implications and countermeasures • Formal analysis method• Conclusion

Page 23: Timing Analysis on Complex Real-Time Automotive …€¦ · Timing Analysis on Complex Real-Time ... LabView, …) † environment ... core1 local resources core2 shared resources

23Institute of Computer and Network Engineering

Conclusion• Mapping ECU functions on multicore impacts function timing due to

shared resources Cross-processor interference

• New scheduling and analysis algorithms are available for multicore- Compatible to system level analysis (DATE 2009)- Can work with incomplete and estimated task sets

Use formal analysis methods to: • Optimize performance and cost:

- In early design stages to guide towards optimal design choices- Refine input data during design process to provide verification

strength guarantees for final product• Achieve compliance to safety standards

Page 24: Timing Analysis on Complex Real-Time Automotive …€¦ · Timing Analysis on Complex Real-Time ... LabView, …) † environment ... core1 local resources core2 shared resources

24Institute of Computer and Network Engineering

Thank you for your attention !

Questions ?

Page 25: Timing Analysis on Complex Real-Time Automotive …€¦ · Timing Analysis on Complex Real-Time ... LabView, …) † environment ... core1 local resources core2 shared resources

25Institute of Computer and Network Engineering

Bibliography[1] Negrean, M., Schliecker, S., and Ernst, R. "Response-Time Analysis of

Arbitrarily Activated Tasks in Multiprocessor Systems with Shared Resources." In Proceedings of Design, Automation and Test in Europe Conference (DATE), Nice, France (April 2009).

[2] Schliecker, S., Rox, J., Negrean, M., Richter, K., Jersak, M., and Ernst, R. "System Level Performance Analysis for Real-Time Automotive Multi-Core and Network Architectures." IEEE Transactions on Computer Aided Design (July2009).

[3] Richter, K., Jersak, M., and Ernst, R. "Learning Early-Stage Platform Dimensioning From Late-Stage Timing Verification." In Proceedings of Design, Automation, and Test in Europe (DATE), Nice, France, (April 2009).

[4] Schliecker, S., Negrean, M., Nicolescu, G., Paulin, P., and Ernst, R. "Reliable Performance Analysis of a Multicore Multithreaded System-On-Chip." Proceedings of the 6th International Conference on Hardware/Software Codesign and System Synthesis (CODES-ISSS), Atlanta, GA (October 2008).