COMPLEX EMBEDDED SYSTEMS Embedded System Design and Architectures Summer Semester 2012 System and Software Engineering Prof. Dr.-Ing. Armin Zimmermann
Contents System Design Phases Architecture of Embedded Systems Typical Embedded Computers Design Aspects Embedded System Design 2
Embedded Systems Characteristics of Embedded Computers Integration / interfacing with technical process Computer is part of a technical system and controls it Non-functional requirements Timeliness (simultaneity?), reliability (redundancy, safety), predictability, energy efficiency, Uncommon HW/SW environment Specialized structure depending on application User interfaces hardware / software co-design COTS vs. completely specialized HW Division: development system vs. embedded system cross-compiler, loading, testing, development process Embedded System Design 3
Design Phases Activities of System Design like for general systems (lecture S&SE) + software Requirements Solicitation, analysis, specification Design Conceptual, architecture, subsystems, components Models Implementation Hardware, software Integration Testing Acceptance test Embedded System Design 4
Design Phases V-Modell of Design and Implementation Embedded System Design 5
Requirements Types of Requirements Functional Interaction system environment, purpose Non-functional Speed or operation performance Timeliness real-time operation Dependence of process reliability, safety, Usability user interface design Resource efficiency cost, energy, RAM, CPU, Integration size, weight; design complexity Harsh environments component specifications Embedded System Design 6
Requirements Necessary Properties recalled Completeness: all scenarios are described Consistency: no contradictions Unambiguous: only one interpretation Correctness: description is clear and right Realistic: implementable under constraints Verifiable: testable with the final product Traceable: effects of changes can be traced to product Embedded System Design 7
Embedded System Design 8
Requirements Requirements Specification Title page Title, authors, version history, document ID Table of contents Introduction Purpose, Document conventions, Intended audience, Acronyms Overall Description Product perspective, Product functions, User classes and characteristics, Operating environment, User environment, Design/implementation constraints, Assumptions and dependencies Embedded System Design 9
Requirements Requirements Specification External Interface Requirements User interfaces, Hardware interfaces, Software interfaces, Communication protocols and interfaces System Features System feature A (Description and priority, Action/result, Functional requirements); System feature B Nonfunctional Requirements Performance requirements, Safety requirements, Security requirements, Software quality attributes, Project documentation, User documentation References Embedded System Design 10
Design Architectural Design E.g. with block diagrams (functions, data flow, HW) Tasks System breakdown Reuse of patterns System architecture Control and data flow, interfaces Distribution and mapping of functions further information in lecture model-based design, necessary background in others Embedded System Design 11
Development System development Environment lectures computer architectures and embedded communication Implementation Programming lecture embedded software Testing Programming lecture embedded software Embedded System Design 12
Contents System Design Phases Architecture of Embedded Systems Typical Embedded Computers Design Aspects Embedded System Design 13
Grundprinzip der Automatisierung Human User Input Output Communication with other systems Embedded Computer Process control Communication within the system Information Energy, movement, Actuators influence Sensors measurement Technical Process appliance, facility, Wörn/Brinkschulte Embedded System Design 14
Interfacing the Environment Characteristics of computer - process coupling Real-time dependency Computer system must obey timing requirements of the technical process deadline Zeit Process periphery Connection with process-side sensors and actuators Requires special adapters Signal Converter Embedded System Design 16
Types of Embedded Architectures Outside View Standard computer PC Monitor Keyboard User Embedded system Computer Actuator Sensor Process Embedded System Design 17
Appliances Example: simple product, Washing machine User Buttons, switches LED display Microcontroller Washing Machine Hardware Heating, valves, pump, motor, Temperature sensor, motor speed, water level, Embedded System Design 18
Complex Appliances Example: complex product, Car User Buttons, levers,.. Display, LEDs Microcontroller bus system Microcontroller Microcontroller Microcontroller Component Component Component Embedded System Design 19
Facility Automation Example: Production system Company-wide communication system Operator PC PC Process Control C. Facility bus PLC PLC PLC Field bus Workstation Workstation Machine Embedded System Design 20
Contents System Design Phases Architecture of Embedded Systems Typical Embedded Computers Design Aspects Embedded System Design 22
Embedded Computer Typical Embedded Computers Microcontroller based Programmable logic controllers (PLC) Industrial PC Process control system on a PC Embedded System Design 23
Von Neumann Computer Processor Control Unit Register: command, control, address, stack pointer, program counter Micro program hardware, command execution Arithmetic Logic Unit Register: arithmetic, status; Operation execution Interrupt Unit Memory Ordered list of memory cells, data and program mixed Bus System Address bus, data bus, control bus Input and Output Embedded System Design 24
Standard Computer Architecture Register mother board ALU system bus memory bus RAM Bus interface CPU Chip peripheral bus I/O bridge ROM extension cards I/O contr. USB contr. GPU disk contr. network ad. serial parallel mouse keyboard Monitor disks communication Embedded System Design 25
Embedded Computer Architecture Register System on chip ALU Bus interface CPU Chip system bus memory bus peripheral bus I/O bridge RAM ROM I/O contr. D/A conv. A/D conv. Timer Communikation serial parallel Actuator Sensor Network Embedded System Design 26
Examples Embedded Sensor Board Node for wireless sensor network FU Berlin project (scatterweb) Processor: TI 430F149 16 bit RISC low-power modes 12mA.. 8 A 60kB Flash, 2kB RAM 12Bit ADC Connectors: RS232, JTAG Communication: Infrared and 868MHz wireless Sensors: light, noise, temperature, motion, acceleration Embedded System Design 27
Examples Mobile Phone: heterogeneous multi-processor system GUI, games: 8-bit Atmel AVR GSM, wireless: 16-bit TI C54 fixed-point DSP Bluetooth-Interface: 32-bit ARM7 IrDA-Interface: ARM7 Application-specific circuits Software ~16MB Code control Plus DSP programs Embedded System Design 29
Examples Car: networked heterogeneous distributed system Chassis electronics: CAN bus with ~30 nodes Dedicated CAN bus for motor control: some nodes Device bus Up to 100 processors 8 bit CPUs (PIC, HC08) light, central locking 16 bit CPUs (C167, HC11, HC12) general functions 32 bit CPUs (PPC, V850) motor control, airbag Embedded System Design 30
Contents System Design Phases Architecture of Embedded Systems Typical Embedded Computers Design Aspects Embedded System Design 31
Design Aspects Directions of System Design Critical Systems Danger or high cost in case of failure Guaranteed function reliability Conservative limits, resource use Worst-case execution time, hard real-time systems Best Effort Systems Expected mean behavior is optimized Temporary overload situations are accepted Better resource utilization Soft Quality-of-Service Requirements Different Design Methods, SW, OS, protocols, Embedded System Design 32
Design Aspects System Design Important Questions to be Answered: How do I implement the required functions? Which parts in HW, which in SW? What architecture (both SW and HW) is used? How are design decisions made? Model-Based Design! Embedded System Design 33
Design Aspects Models for Embedded Systems Technical process: control theory, continuous-state models (not part of this lecture) Computer hardware: block diagrams, VHDL (section computer architecture ) Software: UML, structural and behavioral models, discrete models (section model-based design ) Special Aspects: scheduling diagrams, fault trees, Embedded System Design 34
Design Aspects System theory model of an inverted pendulum with controller in Matlab Simulink Henzinger, Sifakis Embedded System Design 35
Design Aspects Discrete state diagram, part of the flight controller for the Ariane 5 rocket, described in Rational Rose UML Henzinger, Sifakis Embedded System Design 36
Design Aspects Model Combinations Necessary for complete system description Hybrid combinations of existing models or Emulation of semantics in other models Discretization of continuous models Switching system models Embedded System Descriptions SysML, UML extensions, ROOM, Selection in the next section Embedded System Design 37
Aspekte des Systementwurf Design Model Replaces prototype Evaluation Change model No OK? Yes Requirements Performance measures System implementation Model-Based Design with Performance Evaluation Embedded System Design 38
Design Aspects History of Design Approaches Language-Based, Synthesis Starting from programming languages (computer science), Ada Starting from circuit design (electronics), VHDL, Verilog Abstraction from Development Environment Divide design level from implementation level SystemC (synchronous HW semantics + asynchronous SW: C++) Data flow models (Matlab/Simulink) Simulator, Code gen. MDA (PIM, PSM) Abstraction from Execution Semantics UML, AADL Integrated Frameworks (Ptolemy, MLDesigner, Metropolis) Embedded System Design 39