Trends in Embedded Software Engineering Prof. Dr. Wolfgang Pree Department of Computer Science Universität Salzburg cs.uni-salzburg.at MoDECS.cc PREEtec.com
Contents Why focus on embedded software? Better abstractions timing & concurrency transparent distribution Modularization (component models) Further challenges 2 W. Pree: Trends in Embedded Software Engineering LASER 2005
What are we talking about? Information processing that is tightly integrated with physical processes is called embedded computing 3 W. Pree: Trends in Embedded Software Engineering LASER 2005
Many innovations in embedded systems will result from software features 4 W. Pree: Trends in Embedded Software Engineering LASER 2005
A special breed: real-time embedded computing 5 W. Pree: Trends in Embedded Software Engineering LASER 2005
Hard versus soft real-time systems 6 W. Pree: Trends in Embedded Software Engineering LASER 2005
Sample hard RT system: engine controller 10 ms for 360º at 6000 rpm temporal accuracy of of 3 µsec required up to 100 concurrent software tasks => a hard real-time system is only correct if the concurrent tasks meet the strict real-time deadlines 7 W. Pree: Trends in Embedded Software Engineering LASER 2005
Priority scheduling anomalies reducing task execution times adding a processor to a distributed computing system relaxing precedence constraints can all increase processing time. 8 W. Pree: Trends in Embedded Software Engineering LASER 2005
Priority inversion problem low-priority process keeps high-priority process from running might cause deadlocks 9 W. Pree: Trends in Embedded Software Engineering LASER 2005
Most existing programming models are not sufficient In order to overcome the inherent problems of concurrent, real-time software development, new abstractions, methods and tools are required. 10 W. Pree: Trends in Embedded Software Engineering LASER 2005
Automotive sector: more software... More than 80% of innovations in the automotive industry are expected to result from embedded software over the next decade. key goal: ultra-reliable embedded software The challenge: up to some millions (!) LOC complex distributed computing platform 20 80 computing nodes several bus systems massively concurrent software tasks 11 W. Pree: Trends in Embedded Software Engineering LASER 2005
... less tailored to hardware/os-platforms Dr. Hans-Georg Frischkorn (Senior Vice President Electric/Electronics, BMW Group): Whereas today, software is developed for and tailored to the delivered electronic control unit [processor], a main paradigm shift is expected: Software in cars will become much more independent of specific hardware a similar development to that started in the computer industry 30 years ago. Thus, radically new abstractions, methods and tools are required. 12 W. Pree: Trends in Embedded Software Engineering LASER 2005
Abstractions 13 W. Pree: Trends in Embedded Software Engineering LASER 2005
Lifting the level of abstraction for general-purpose programming LISP Prolog Oberon Java C# Eiffel compilation C++ C assembly language HW + OS 14 W. Pree: Trends in Embedded Software Engineering LASER 2005
Abstractions for embedded systems a missing link mathematical modeling (eg, Simulink) embedded software model general-purpose programming languages HW + OS 15 W. Pree: Trends in Embedded Software Engineering LASER 2005
Abstractions for embedded systems a missing link mathematical modeling (eg, Simulink) timing & concurrency embedded software model efficient to implement reusable components general purpose programming languages HW + OS 16 W. Pree: Trends in Embedded Software Engineering LASER 2005
Key question: What are appropriate abstractions? Do they cover the relevant aspects of a design? Which embedded software properties do they deliver? Do they scale? Are the resulting designs understandable? Can compilers generate efficient code? 17 W. Pree: Trends in Embedded Software Engineering LASER 2005
Caveat: visual representations are often associated with good abstractions Real-Time UML: priorities (widely misued in practice), etc. Simulink: offers only functions for modularization 18 W. Pree: Trends in Embedded Software Engineering LASER 2005
Required embedded software properties focus: ultra-reliable embedded control 19 W. Pree: Trends in Embedded Software Engineering LASER 2005
Determinism If a software component is called twice with the same input values at the same time instants, it should both times produce the same output values at the same time instants. Example: If a control component receives the same sensor values and the same driver input, it should always react exactly in the same way. Consequences: Testability: each behavior can be reproduced. Minimal jitter. 20 W. Pree: Trends in Embedded Software Engineering LASER 2005
Portability (= software standardization) The behavior of a software component should be specified independent of its implementation. Example: The hardware, operating system, or bus architecture can be changed without changing the behavior of the application components. Consequences: Upgradability of hardware. Portability of software. 21 W. Pree: Trends in Embedded Software Engineering LASER 2005
better quality, reduced costs deterministic timing behavior portability automatic code generation A S plant embedded control software computing platform, for example, MPC555+OSEK 22 W. Pree: Trends in Embedded Software Engineering LASER 2005
better quality, reduced costs deterministic timing behavior portability automatic code generation M1 23 W. Pree: Trends in Embedded Software Engineering LASER 2005
better quality, reduced costs deterministic timing behavior portability automatic code generation M1 24 W. Pree: Trends in Embedded Software Engineering LASER 2005
better quality, reduced costs deterministic timing behavior portability automatic code generation M2 M1 25 W. Pree: Trends in Embedded Software Engineering LASER 2005
better quality, reduced costs deterministic timing behavior portability automatic code generation M1 M2 26 W. Pree: Trends in Embedded Software Engineering LASER 2005
Sample abstraction: Logical Execution Time (LET) 27 W. Pree: Trends in Embedded Software Engineering LASER 2005
State-of-the-art programming model leads to non-deterministic, non-portable software only constraint: calculation finishes before a deadline Task 1 t Task 2 PROBLEM: results are available as soon as calculation is finished => NO determinism, NO portability 28 W. Pree: Trends in Embedded Software Engineering LASER 2005
Logical Execution Time (LET), an abstraction invented at UC Berkeley results are available EXACTLY after the LET of a task Task 1 LET1 t Task 2 LET >= WCET LET2 29 W. Pree: Trends in Embedded Software Engineering LASER 2005
LET delivers the required software properties for ultra-reliable embedded systems determinism => testability, minimal jitter compositionality => extensibility, reuse software standardization =>portability, upgradability of HW release Logical Execution Time (LET) terminate logical view physical view running task invocation running time 30 W. Pree: Trends in Embedded Software Engineering LASER 2005
platform first...? 31 W. Pree: Trends in Embedded Software Engineering LASER 2005
LET allows Transparent Distribution node1 M1 comm1 LET1 time bus node2 comm2 M2 LET2 message sent according to bus schedule (TDMA) 32 W. Pree: Trends in Embedded Software Engineering LASER 2005
LET might be appropriate for the time-triggered and event-triggered programming models xgiotto: has generalized fixed LET requires event scoping 33 W. Pree: Trends in Embedded Software Engineering LASER 2005
Towards embedded software components 34 W. Pree: Trends in Embedded Software Engineering LASER 2005
Hierarchical structuring is only a first step A subsystem (= function) in Simulink input parameters output parameters 35 W. Pree: Trends in Embedded Software Engineering LASER 2005
current modularization one embedded control system per computing node M1 36 W. Pree: Trends in Embedded Software Engineering LASER 2005
required: domain-adequate language constructs for modularization M2 M1 module M2 { import M1;... start mode main [period= M1.refPeriod] { task [freq=1] sum(m1.inc.o, M1.dec.o);... } } 37 W. Pree: Trends in Embedded Software Engineering LASER 2005
Compositionality The behavior of a software component should be independent of the overall system load and configuration. Example: A new component can be added to a system without changing the behavior of the original components. Consequences: Extensibility of systems. Reuse of components. 38 W. Pree: Trends in Embedded Software Engineering LASER 2005
Next-generation tools for embedded software development 39 W. Pree: Trends in Embedded Software Engineering LASER 2005
We have developed a modeling language and a set of tools based on LET www.modecs.cc PREEtec.com modularization separation of concerns: timing functionality platform functional and temporal behavior language construct for modules embedded software properties deterministic timing behavior portability (automatic platform code generation) compositionality transparent distribution 40 W. Pree: Trends in Embedded Software Engineering LASER 2005
Tools for developing ultra-reliable embedded software require solid foundations tool support development methods abstractions visual/interactive editor, compiler, etc. Giotto/Timing Definition Language LET, module 41 W. Pree: Trends in Embedded Software Engineering LASER 2005
Timeline of beating the concepts into their shapes... MoDECS UC Berkeley Timing Definition Language (TDL) Giotto 1999 42 2000 2001 W. Pree: Trends in Embedded Software Engineering 2002 LASER 2005 2003 2004 2005
LET-based tool chain MoDECS.cc PREEtec.com starting point: LET/Giotto (UC Berkeley) VisualTDL in Simulink platform spec. M1 S A M2 M1 M2 M3 S S A M3 TDL module component model A TDL compiler + schedule generator E-Code S-Code 43 W. Pree: Trends in Embedded Software Engineering LASER 2005 E-/S-Machines+TDLComm INtime, OSEK, TTA, RT-Linux
Further embedded software challenges 44 W. Pree: Trends in Embedded Software Engineering LASER 2005
Orthogonal challenges appropriate software abstractions as basis of model-based development... support of multiple models of computation reengineering of existing systems requirements engineering process management risk analysis and error management usability security 45 W. Pree: Trends in Embedded Software Engineering LASER 2005
The end Thank you for your attention! 46 W. Pree: Trends in Embedded Software Engineering LASER 2005