Synthesis of Distributed Real- Time Embedded Software

Similar documents
PTIDES: A Discrete-Event-Based Programming Model for Distributed Embedded Systems

Portable Real-Time Code from PTIDES Models

Temporal Semantics in Concurrent and Distributed Software

Model-Based Design for Signal Processing Systems

The Internet of Important Things

Precision Timed (PRET) Machines

Computing Needs Time

Deterministic Execution of Ptides Programs

Time-centric Models For Designing Embedded Cyberphysical

Embedded Tutorial CPS Foundations

Timing Analysis of Embedded Software for Families of Microarchitectures

A Time-Centric Model for Cyber-Physical Applications

From Ptides to PtidyOS, Designing Distributed Real- Time Embedded Systems

The IEEE 1588 Standard

Beyond Embedded Systems: Integrating Computation, Networking, and Physical Dynamics

Challenges of Implementing Timed Models on Timed Platforms

C Code Generation from the Giotto Model of Computation to the PRET Architecture

PTIDES: A Programming Model for Distributed Real- Time Embedded Systems

Modal Models in Ptolemy

Concurrent Models of Computation

Predictable Timing of Cyber-Physical Systems Future Research Challenges

Future Directions. Edward A. Lee. Berkeley, CA May 12, A New Computational Platform: Ubiquitous Networked Embedded Systems. actuate.

Introducing Embedded Systems: A Cyber- Physical Systems Approach

Introduction to Embedded Systems

PREcision Timed (PRET) Architecture

2. REAL-TIME CONTROL SYSTEM AND REAL-TIME NETWORKS

Component-Based Design of Embedded Control Systems

Graphical System Design. David Fuller LabVIEW R&D Section Manager

Component-Based Design of Embedded Control Systems

Predictable Processors for Mixed-Criticality Systems and Precision-Timed I/O

Real-Time (Paradigms) (47)

Introduction to Embedded Systems

CS4514 Real-Time Systems and Modeling

IEEE TSN (Time-Sensitive Networking): A Deterministic Ethernet Standard

Drive Control via EtherNet/IP using CIP Motion and CIP Sync Profile Extensions

COMPLEX EMBEDDED SYSTEMS

Real-time C Code Generation in Ptolemy II for the Giotto Model of Computation

Simulation of LET Models in Simulink and Ptolemy

Programming Languages for Real-Time Systems. LS 12, TU Dortmund

Distributed Systems. 05. Clock Synchronization. Paul Krzyzanowski. Rutgers University. Fall 2017

Towards Lab Based MOOCs: Embedded Systems, Robotics, and Beyond

A PRIMITIVE EXECUTION MODEL FOR HETEROGENEOUS MODELING

Multiprocessor and Real-Time Scheduling. Chapter 10

System Design and Methodology/ Embedded Systems Design (Modeling and Design of Embedded Systems)

Time-Awareness in the Internet of Things. ITSF 2014 Marc Weiss, NIST Consultant

IEEE-1588 Standard for a Precision Clock Synchronization Protocol for Networked Measurement and Control Systems

Pattern-Based Analysis of an Embedded Real-Time System Architecture

FMCAD 2011 (Austin, Texas) Jonathan Kotker, Dorsa Sadigh, Sanjit Seshia University of California, Berkeley

DRAFT. Dual Time Scale in Factory & Energy Automation. White Paper about Industrial Time Synchronization. (IEEE 802.

What are Embedded Systems? Lecture 1 Introduction to Embedded Systems & Software

Concurrent Models of Computation

A Multi-Modal Composability Framework for Cyber-Physical Systems

Hybrid System Modeling: Operational Semantics Issues

Concurrent Component Patterns, Models of Computation, and Types

Communication (III) Kai Huang

Integrated Design and Analysis Tools for Software Based Control Systems

Atacama: An Open Experimental Platform for Mixed-Criticality Networking on Top of Ethernet

Embedded Software from Concurrent Component Models

Diagnosis in the Time-Triggered Architecture

AVB Gen 2: the Next Step. Michael Johas Teener Plumbing Architect and Sr. Technical Director, Broadcom Corp,

Distributed IMA with TTEthernet

An Encapsulated Communication System for Integrated Architectures

Timing in Cyber Physical Systems. Marc Weiss, Ph.D. NIST, Time and Frequency Division WSTS 2015

Flow Latency Analysis with the Architecture Analysis and Design Language (AADL)

Applying CORBA to embedded time-triggered real-time systems. S. Aslam-Mir (Sam) Principal CORBA Architect Vertel USA

IEEE-1588 STANDARD FOR A PRECISION CLOCK SYNCHRONIZATION PROTOCOL FOR NETWORKED MEASUREMENT AND CONTROL SYSTEMS

QuartzV: Bringing Quality of Time to Virtual Machines

DISTRIBUTED REAL-TIME SYSTEMS

Design and Analysis of Time-Critical Systems Introduction

Advanced Tool Architectures. Edited and Presented by Edward A. Lee, Co-PI UC Berkeley. Tool Projects. Chess Review May 10, 2004 Berkeley, CA

System Design, Modeling, and Simulation using Ptolemy II

Real-Time Operating Systems Design and Implementation. LS 12, TU Dortmund

Giotto Domain. 5.1 Introduction. 5.2 Using Giotto. Edward Lee Christoph Kirsch

Embedded Real-Time Systems

Hierarchical FSMs with Multiple CMs

Ptolemy II The automotive challenge problems version 4.1

LabVIEW Based Embedded Design [First Report]

TSN, the Communication Base for a Connected World

Timing Definition Language (TDL) Concepts, Code Generation and Tools

PROJECT FINAL REPORT

This project has received funding from the European Union s Horizon 2020 research and innovation programme under grant agreement No

Predictable Programming on a Precision Timed Architecture

Computing and Communications Infrastructure for Network-Centric Warfare: Exploiting COTS, Assuring Performance

IEEE-1588 STANDARD FOR A PRECISION CLOCK SYNCHRONIZATION PROTOCOL FOR NETWORKED MEASUREMENT AND CONTROL SYSTEMS

Compositionality in system design: interfaces everywhere! UC Berkeley

Embedded Systems. Stammvorlesung 9 CP. Lectures: Tuesdays, 16:15-18:00 Thursdays, 10:15-12:00 BF - ES - 2 -

EVALUATING IEEE 1588 IN A HOMOGENOUS SWITCHED NETWORK TEST ARTICLE SEGMENT

Time Synchronization Over Networks, IEEE 1588 and Applications

Joint IEEE-SA and ITU Workshop on Ethernet. IEEE Distinguished Minimum Latency Traffic. Ludwig WINKEL, Chair IEEE 802.

Real-Time Component Software. slide credits: H. Kopetz, P. Puschner

SE300 SWE Practices. Lecture 10 Introduction to Event- Driven Architectures. Tuesday, March 17, Sam Siewert

Tomasz Włostowski Beams Department Controls Group Hardware and Timing Section. Developing hard real-time systems using FPGAs and soft CPU cores

IN4343 Real-Time Systems

CS 856 Latency in Communication Systems

Multimedia Systems 2011/2012

Single-Path Programming on a Chip-Multiprocessor System

Embedded Systems Dr. Santanu Chaudhury Department of Electrical Engineering Indian Institution of Technology, IIT Delhi

Codesign Framework. Parts of this lecture are borrowed from lectures of Johan Lilius of TUCS and ASV/LL of UC Berkeley available in their web.

Real-Time Systems. Real-Time Communication. Hermann Härtig, Jork Löser (following Kopetz, Liu, Almeida, Jon Currey, Schönberg)

The Internet of Things and Factory of Future

Transcription:

Synthesis of Distributed Real- Time Embedded Software Edward A. Lee Robert S. Pepper Distinguished Professor UC Berkeley Keynote talk Electronic System Level Synthesis Conference June 5-6, 2011 San Diego, California, USA Key Collaborators: Steven Edwards Sungjun Kim Isaac Liu Slobodan Matic Jan Reinke Sanjit Seshia Mike Zimmer Jia Zou

Cyber-Physical Systems (CPS): Orchestrating networked computational resources with physical systems Automotive Building Systems Avionics Telecommunications Transportation (Air traffic control at SFO) E-Corner, Siemens Power generation and distribution Factory automation Instrumentation (Soleil Synchrotron) Military systems: Daimler-Chrysler Courtesy of Doug Schmidt Courtesy of General Electric Courtesy of Kuka Robotics Corp. Lee, Berkeley 3

Printing Press Example Application aspects local (control) distributed (coordination) global (modes) Open standards (Ethernet) Synchronous, Time-Triggered IEEE 1588 time-sync protocol High-speed, high precision Speed: 1 inch/ms Precision: 0.01 inch -> Time accuracy: 10us Bosch-Rexroth Orchestrated networked resources built with sound design principles on suitable abstractions DETERMINISM TIMED SEMANTICS 4

Claim For CPS, programs do not today adequately specify behavior. Lee, Berkeley 5

Structure of a Cyber-Physical System Problems that complicate analysis of system behavior: Etc Sensors may be locked out for an indeterminate amount of time Platforms Plat measurements of time differ Messages from different sources interleave nondeterministically A fault in a remote component may disrupt a critical local activity Variability of execution times affects results (not just WCET) A fault in a remote component may go undetected for a long time Interrupt-driven I/O disrupts timing Lee, Berkeley 6

Our Approach is based on Discrete Events (DE) Concurrent actors Exchange time-stamped messages ( events ) A correct execution is one where every actor reacts to input events in time-stamp order. Time stamps are in model time, which typically bears no relationship to real time (wall-clock time). We use superdense time for the time stamps. Lee, Berkeley 7

Building a DE Model (in Ptolemy II) DE Director specifies that this will be a DE model Lee, Berkeley 8

Building a DE Model (in Ptolemy II) Model of regularly spaced events (e.g., a clock signal). Lee, Berkeley 9

Building a DE Model (in Ptolemy II) Model of irregularly spaced events (e.g., a failure event). Lee, Berkeley 10

Building a DE Model (in Ptolemy II) Model of a subsystem that changes modes at random (event-triggered) times Lee, Berkeley 11

Building a DE Model (in Ptolemy II) Model of an observer subsystem Lee, Berkeley 12

Building a DE Model (in Ptolemy II) Events on the two input streams must be seen in time stamp order. Lee, Berkeley 13

This is a Component Technology Model of a subsystem given as an imperative program. Lee, Berkeley 14

This is a Component Technology Model of a subsystem given as a state machine. Lee, Berkeley 15

This is a Component Technology Model of a subsystem given as a modal model. More types of components: Modal models Functional expressions. Submodels in DE Submodels in other MoCs Lee, Berkeley 16

Using DE Semantics in Distributed Real-Time Systems DE is usually a simulation technology. Distributing DE is traditionally done for acceleration. Hardware design languages (e.g. VHDL) use DE where time stamps are literally interpreted as real time, or abstractly as ticks of a physical clock. We are using DE for distributed real-time software, binding time stamps to real time only where necessary. PTIDES: Programming Temporally Integrated Distributed Embedded Systems Lee, Berkeley 17

Ptides: First step: Time-stamped messages. Messages carry time stamps that define their interleaving Lee, Berkeley 18

Ptides: Second step: Network time synchronization GPS, NTP, IEEE 1588, time-triggered busses, etc., all provide some form of common time base. These are becoming fairly common. Assume bounded clock error e Lee, Berkeley 19

Time-Aware Networking Technology Facilitates Network Time Synchronization Frequency locking E.g., synchronous ethernet: ITU-T G.8261, May 2006 Enables integrating circuitswitched services on packetswitched networks Can deliver performance independent of network loading. Time synchronization E.g., IEEE 1588 standard set in 2002. Synchronized time-of-day across a network. Lee, Berkeley 20

Precision Time Protocol (PTP) Standardized for Ethernet Press Release October 1, 2007 This may become routine! With this PHY, clocks on a LAN agree on the current time of day to within 8ns, far more precise than older techniques like NTP. Lee, Berkeley 21

An Extreme Example: The Large Hadron Collider The WhiteRabbit project at CERN is synchronizing the clocks of computers 10 km apart to within about 80 psec using a combination of IEEE 1588 PTP and synchronous ethernet. Lee, Berkeley 22

Ptides: Third step: Bind time stamps to real time at sensors and actuators Output time stamps are real time Input time stamps are real time Input time stamps are real time Output time stamps are real time Clock synchronization gives global meaning to time stamps Messages are processed in timestamp order. Lee, Berkeley 23

Ptides: Fourth step: Specify latencies in the model Global latencies between sensors and actuators become controllable, which enables analysis of system dynamics. Model includes manipulations of time stamps, which control latencies between sensors and actors Feedback through the physical world Actuators may be designed to interpret input time stamps as the time at which to take action. Lee, Berkeley 24

Ptides: Fifth step Safe-to-process analysis (ensures determinacy) Safe-to-process analysis guarantees that the generated code obeys time-stamp semantics (events are processed in time-stamp order), given some assumptions. Assume bounded sensor delay s Assume bounded network delay d Application specification of latency d2 An earliest event with time stamp t here can be safely merged when real time exceeds t + s + d + e d2 Assume bounded clock error e Lee, Berkeley 25

Delivering Bounded Network Delay Domain-Specific Networks capable of Bounded Delay WorldFIP (Factory Instrumentation Protocol) Created in France, 1980s, used in train systems CAN: Controller Area Network Created by Bosch, 1980s/90s, ISO standard Various ethernet variants PROFInet, EtherCAT, Powerlink, TTP/C: Time-Triggered Protocol Created around 1990, TU Vienna, supported by TTTech MOST: Media Oriented Systems Transport Created by a consortium of automotive & electronics companies Under active development today FlexRay: Time triggered bus for automotive applications Created by a consortium of automotive & electronics companies Under active development today Lee, Berkeley 26

Ptides Schedulability Analysis Determine whether deadlines can be met Schedulability analysis incorporates computation times to determine whether we can guarantee that deadlines are met. Deadline for delivery of event with time stamp t here is t c3 d2 Assume bounded computation time c1 Deadline for delivery here is t Assume bounded computation time c2 Assume bounded computation time c3 Lee, Berkeley 27

PtidyOS: A lightweight microkernel supporting Ptides semantics Current prototype runs on a COTS Arm platform (Luminary Micro) with rudimentary support for IEEE 1588 network time synchronization. Occupies about 16 kbytes of memory. An interesting property of PtidyOS is that despite being highly concurrent, preemptive, and EDF-based, it does not require threads. A single stack is sufficient! Currently porting to Renesas and PRET platforms. Luminary Micro 8962 Lee, Berkeley 28

Workflow Structure Analysis Causality Analysis Schedulability Analysis Program Analysis Ptides Model Code Generator Cod e Ptolemy II Ptides domain Software Component Library PtidyOS HW Platform Mixed Simulator Plant Model HW in the Loop Simulator Ptolemy II Discrete-event, Continuous, and Wireless domains Network Model Luminary Micro IEEE 1588 Network 8962 time protocol Lee, Berkeley 29

A Test Case for PtidyOS This device, designed by Jeff Jensen, mixes periodic, quasi-periodic, and sporadic real-time events. Tunneling Ball Device sense ball track disk adjust trajectory Lee, Berkeley 30

Tunneling Ball Device in Action Lee, Berkeley 31

Tunneling Ball Device 10 rps Lee, Berkeley 32

Tunneling Ball Device Mixed event sequences Periodic Events Quasi Periodic Events Sporadic Events Lee, Berkeley 33

Ptides Project Status Seed funding from ARL got the project going. Ongoing NSF effort (CPS Medium) Sanjit Seshia focused on WCET & schedulability analysis Ptolemy II-based simulator supports multiform clocks PtidyOS being prepped for open-source release Lee, Berkeley 34

http://chess.eecs.berkeley.edu/ptides/ Ptides Publications Y. Zhao, J. Liu, E. A. Lee, A Programming Model for Time- Synchronized Distributed Real-Time Systems, RTAS 2007. T. H. Feng and E. A. Lee, Real-Time Distributed Discrete-Event Execution with Fault Tolerance, RTAS 2008. P. Derler, E. A. Lee, and S. Matic, Simulation and implementation of the ptides programming model, DS-RT 2008. J. Zou, S. Matic, E. A. Lee, T. H. Feng, and P. Derler, Execution strategies for Ptides, a programming model for distributed embedded systems, RTAS 2009. J. Zou, J. Auerbach, D. F. Bacon, E. A. Lee, PTIDES on Flexible Task Graph: Real-Time Embedded System Building from Theory to Practice, LCTES 2009. J. C. Eidson, E. A. Lee, S. Matic, S. A. Seshia and J. Zou, Time-centric Models For Designing Embedded Cyber-physical Systems, ACES- MB 2010. Lee, Berkeley 35

Conclusions Overview Reference: E. A. Lee. Computing needs time. CACM, 52(5):70 79, 2009 Today, timing behavior is a property only of realizations of software systems. Tomorrow, timing behavior will be a semantic property of programs and models. Raffaello Sanzio da Urbino The Athens School Lee, Berkeley 36