550 likes | 946 Views
Performance Analysis of Embedded Systems. Lothar Thiele ETH Zurich. Overview. Review of General Aspects Modular Performance Analysis Real-Time Calculus Modeling Application Scenarios. Communication Templates. Computation Templates. DSP. SDRAM. ECU. RISC. CAN interface. m C.
E N D
Performance Analysis of Embedded Systems Lothar Thiele ETH Zurich
Overview • Review of General Aspects • Modular Performance Analysis • Real-Time Calculus • Modeling • Application Scenarios
Communication Templates Computation Templates DSP SDRAM ECU RISC CANinterface mC Scheduling and ArbitrationTemplates Architecture SDRAM RISC TDMA EDF EDF proportionalshare priority FCFS WFQ dynamicfixed priority static ECU ECU System Composition
Role of Performance Estimation • Design validation: • equivalence of specification and implementation • validation of non-functional aspects (power consumption, throughput, delay) • Prerequisite for design space exploration: • part of feedback cycle in design • Performance estimation methods: • use of simulation, trace-based estimation and analytic methods
Application Architecture Mapping Estimation Design Space Exploration Takes place on several levels of abstraction
Why Is Estimation Difficult ? • Non-determinism: • Uncertain system environment (different load scenarios, unknown (worst case) input patterns). • Data dependent functional behavior. • Analyzability: • Complex hardware and software interactions in processing nodes, communication components, scheduling and arbitration policies. • Use of abstractions in analysis -> non-determinism. • Interference: • Internal data streams interact on computing and communication resources. • This interference determines stream characteristics (cyclic dependency).
Why is Estimation Difficult ? applicationstructure EPU EPU hardwareplatform EPU EPU
best case predictability worst case predictability w.c. guarantee w.c. performance t 0 lowerbound bestcase worstcase upperbound variation of execution time Bounds, Guarantees and Predictability
Overview • Review of General Aspects • Composable Performance Analysis • Real-Time Calculus • Modeling • Application Scenarios
A Four-Step Approach • Abstraction: Build abstract models for “first class citizens”event streams -> abstract event streamsarchitecture elements -> resource modulesapplication processes -> performance modules • Performance Components: Combine performance modules using resource sharing information • Performance Network: Combine all models to a network that represents the performance aspects • Analysis
applicationprocess performancemodules abstract event streams event streams abstract loadscenarios The “Big Picture” Application Specification T1 T2 T3 loadscenarios Abstract Application mapping relations performancecomponents Performance Network resourcemodules Abstract Architecture architectureelements ARM9 DSP Architecture Specification
Step 1: Abstract Application Model From a functional model… event stream applicationprocess (e.g. StateCharts … )
Step 1: Abstract Functional Units … to an abstract application model How do we calculate with abstract event streams and resources units? abstractresource stream performancemodule abstractevent stream We use Real-Time Calculus! (min-max algebra)
Step 2: Build Performance Components How do we do scheduling?
Step 2: Scheduling I Fixed Priority (FP)
Performance component of a combined HW/SW/OS module; exposes performance properties but hides implementation Step 2: Scheduling II share Generalized Processor Sharing (GPS) S
b b b b a GPS FP FP Application 1 b’ b’ a Application 2 GPS GPS FP b’ b’’ b’’ b’ Step 3 and 4: Compose and Analyze How can we estimate the load on resources? How can we estimate delay and memory? How can we compose performance modules ? How can we add a new application? ARM9 Bus DSP2 DSP1
Dynamic Analytic Models programanalysis formalspecification datasheets model ofcomponents inputtraces systemmodel model of environment formalspecific. analysis estimationresults
Overview • Review of General Aspects • Modular Performance Analysis • Real-Time Calculus • Modeling • Application Scenarios
Scheduling Abstraction • Idea: • unified view of task scheduling, arbitration and output scheduling in networks: • methods: • queueing theory (statistical bounds, Markov chains) • real-time calculus (worst case bounds, min-max algebra)
Foundations of Real-Time-Calculus • Linear System Theory [Baccelli, Cohen, Olsder, Quadrat 1992] • Calculus for Networks [Le Boudec 1998, 2001], [Cruz 1991] • Adversarial Queuing Theory [Andrews, Borodin, Kleinberg, Leighton, … 1996] • End-to-end deadlines [Parekh, Gallager 1994]
Event and Resource Models How do we describe uncertain event streams and resources?
au al D D D Event & Resource Models • Use arrival curves to capture packet streams: # of packets max: 1 packet min: 0 packets max: 3 packets min: 1 packet max: 2 packets min: 0 packets 3 2 1 D time t 0 1 2
Arrival Curves • Use the concept of arrival curves ! How do we describe uncertain input streams ? maximum/minimum number of packets in any interval of length 4 number of packets in time interval [0,4]
Service Curves • Use the concept of service curves ! How do we describe uncertain resources ? maximum/minimum computing power in any interval of length 2 computing power in time interval [0,2]
Arrival and Service Curves • What else: • sub- and super-additivity • relation to max-+ algebra • operations correspond to convolution
Compose and Analyze I/O bus mP DSP prop.share fixedprio. fixedprio. fixedprio.
service curvebl delay d arrival curveau b backlog b Compose and Analyze
Everything Together application structure performancememory delay App. Model inputstreammodel AllocationBindingScheduling PerformanceNetwork resourcemodel Architecture Model TDMA WFQ fixedpriority
Overview • Review of General Aspects • Modular Performance Analysis • Real-Time Calculus • Modeling • Application Scenarios
Open Questions • How do we model different event types and correlation in event streams ? • How do we model type-dependent processing (different modes of operation, example MPEG coding and decoding) ? • How do we model caches ? Use more involved abstractions, for example finite state automata
Event Stream Model #events vs. time interval order of events
Functional Unit Model FSM can model • architecture details • program flow • scheduling policies • type-dependent behavior Improvement in estimation quality in several application studies. input_event/resource_demand/output_event
Additional Analysis Methods • Analyze timed FSMs with respect to their timing properties. • For example: • Applicable methods: minimum cycle mean [Karp], periodic graphs [Cohen, Dubois, Quadrat] minimal and maximal accumulated delay/demand/eventsfor n consecutive transitions (and its inverse) in a compact representation
Missing Link(s) • Link to lower layer analysis methods (like abstract interpretation) model of computer architecture assembler program analysis d,e,f,g a,b,c
Overview • Review of General Aspects • Modular Performance Analysis • Real-Time Calculus • Modeling • Application Scenarios
Experiences • Network processor modeling (IBM) • Detailed study of a network processor • Good match between simulation and analytic methods (delay, memory) • Use of methodology in other projects and case studies • BridgeCo • Siemens • Netmodule • Implementation and integration into design space exploration
Application Model • Example of a simple stream processing task structure:
Architecture Model • In general, we assume an arbitrary heterogeneous architecture consisting of computing resources, memory and communication resources.
system architectureperformance values task graph, scenario graph, flows & resources selection of “good” architectures EXPO – Tool architecture MOSES EXPO SPEA 2 Exploration Cycle
EXPO - Tool Tool available online: http://www.tik.ee.ethz.ch/expo/expo.html
Results Performance for encryption/decryption Performance for RT voice processing
Acknowledgement • The presentation contains contributions by • Samarjit Chakraborty • Matthias Dyer • Simon Künzli • Matthias Gries • Alexander Maxiaguine