technische universität dortmund fakultät für informatik informatik 12 Early design phases Jian-Jia Chen (slides are based on Peter Marwedel) TU Dortmund,

Slides:



Advertisements
Similar presentations
Numbers Treasure Hunt Following each question, click on the answer. If correct, the next page will load with a graphic first – these can be used to check.
Advertisements

Technische universität dortmund fakultät für informatik informatik 12 Models of computation Peter Marwedel TU Dortmund Informatik 12 Graphics: © Alexandra.
Peter Marwedel TU Dortmund, Informatik 12
Fakultät für informatik informatik 12 technische universität dortmund Optimizations - Compilation for Embedded Processors - Peter Marwedel TU Dortmund.
Variations of the Turing Machine
3rd Annual Plex/2E Worldwide Users Conference 13A Batch Processing in 2E Jeffrey A. Welsh, STAR BASE Consulting, Inc. September 20, 2007.
Process Description and Control
1
Fakultät für informatik informatik 12 technische universität dortmund Imperative model of computation Peter Marwedel TU Dortmund, Informatik 12 Graphics:
Technische universität dortmund fakultät für informatik informatik 12 Specifications and Modeling Peter Marwedel TU Dortmund, Informatik 12 Graphics: ©
Fakultät für informatik informatik 12 technische universität dortmund Petri Nets Peter Marwedel TU Dortmund, Informatik 12 Graphics: © Alexandra Nolte,
Fakultät für informatik informatik 12 technische universität dortmund Petri Nets Peter Marwedel TU Dortmund, Informatik 12 Graphics: © Alexandra Nolte,
Fakult ä t f ü r informatik informatik 12 technische universit ä t dortmund Data flow models Peter Marwedel TU Dortmund, Informatik 12 Graphics: © Alexandra.
Fakultät für informatik informatik 12 technische universität dortmund Specifications and Modeling Peter Marwedel TU Dortmund, Informatik 12 Graphics: ©
Fakultät für informatik informatik 12 technische universität dortmund SDL Peter Marwedel TU Dortmund, Informatik 12 Graphics: © Alexandra Nolte, Gesine.
Technische universität dortmund fakultät für informatik informatik 12 Discrete Event Models Peter Marwedel TU Dortmund, Informatik 12 Germany
Communicating finite state machines
Technische universität dortmund fakultät für informatik informatik 12 Specifications and Modeling Peter Marwedel TU Dortmund, Informatik
Chapter 7 System Models.
Copyright © 2003 Pearson Education, Inc. Slide 1 Computer Systems Organization & Architecture Chapters 8-12 John D. Carpinelli.
1 Copyright © 2013 Elsevier Inc. All rights reserved. Chapter 4 Computing Platforms.
Processes and Operating Systems
1 RA I Sub-Regional Training Seminar on CLIMAT&CLIMAT TEMP Reporting Casablanca, Morocco, 20 – 22 December 2005 Status of observing programmes in RA I.
Fakultät für informatik informatik 12 technische universität dortmund Classical scheduling algorithms for periodic systems Peter Marwedel TU Dortmund,
Programming Language Concepts
1.
Turing Machines.
OOAD – Dr. A. Alghamdi Mastering Object-Oriented Analysis and Design with UML Module 3: Requirements Overview Module 3 - Requirements Overview.
PP Test Review Sections 6-1 to 6-6
EIS Bridge Tool and Staging Tables September 1, 2009 Instructor: Way Poteat Slide: 1.
Bellwork Do the following problem on a ½ sheet of paper and turn in.
CS 6143 COMPUTER ARCHITECTURE II SPRING 2014 ACM Principles and Practice of Parallel Programming, PPoPP, 2006 Panel Presentations Parallel Processing is.
Exarte Bezoek aan de Mediacampus Bachelor in de grafische en digitale media April 2014.
Copyright © 2012, Elsevier Inc. All rights Reserved. 1 Chapter 7 Modeling Structure with Blocks.
 Copyright I/O International, 2013 Visit us at: A Feature Within from Item Class User Friendly Maintenance  Copyright.
1 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt Synthetic.
Executional Architecture
Chapter 2 Entity-Relationship Data Modeling: Tools and Techniques
Prof.ir. Klaas H.J. Robers, 14 July Graduation: a process organised by YOU.
1 Let’s Recapitulate. 2 Regular Languages DFAs NFAs Regular Expressions Regular Grammars.
Essential Cell Biology
Clock will move after 1 minute
PSSA Preparation.
Chapter 11 Creating Framed Layouts Principles of Web Design, 4 th Edition.
 2003 Prentice Hall, Inc. All rights reserved. 1 Chapter 13 - Exception Handling Outline 13.1 Introduction 13.2 Exception-Handling Overview 13.3 Other.
Petri Nets Jian-Jia Chen (slides are based on Peter Marwedel)
Technische universität dortmund fakultät für informatik informatik 12 Specifications, Modeling, and Model of Computation Jian-Jia Chen (slides are based.
(slides are based on Peter Marwedel)
Technische universität dortmund fakultät für informatik informatik 12 Discrete Event Models Jian-Jia Chen (slides are based on Peter Marwedel) TU Dortmund,
Introduction Peter Dolog dolog [at] cs [dot] aau [dot] dk Intelligent Web and Information Systems September 9, 2010.
Modeling Main issues: What do we want to build How do we write this down.
1 Decidability continued…. 2 Theorem: For a recursively enumerable language it is undecidable to determine whether is finite Proof: We will reduce the.
Distributed Computing 5. Snapshot Shmuel Zaks ©
Chapter 9: Using Classes and Objects. Understanding Class Concepts Types of classes – Classes that are only application programs with a Main() method.
Technische universität dortmund fakultät für informatik informatik 12 Limits of von-Neumann (thread-based) computing Jian-Jia Chen (Slides are based on.
Hardware/ Software Partitioning 2011 年 12 月 09 日 Peter Marwedel TU Dortmund, Informatik 12 Germany Graphics: © Alexandra Nolte, Gesine Marwedel, 2003 These.
fakultät für informatik informatik 12 technische universität dortmund Early design phases Peter Marwedel TU Dortmund, Informatik 12 Graphics: © Alexandra.
- 1 -  P. Marwedel, Univ. Dortmund, Informatik 12, 2003 Universität Dortmund Hoofdstuk 2 Systeemspecificatietechnieken 2.1 Functionele specificatie Prof.
Ch.2 Part A: Requirements, State Charts EECE **** Embedded System Design.
- 1 - Embedded Systems—State charts Specifications.
- 1 -  P. Marwedel, Univ. Dortmund, Informatik 12, 2005/6 Universität Dortmund Specifications.
- 0 -  P. Marwedel, Univ. Dortmund, Informatik 12, 2005/6 Universität Dortmund Message sequence charts (MSC) Graphical means for representing schedules;
Ch.2 Part C: Message Sequence Charts, UML EECE **** Embedded System Design.
StateCharts Peter Marwedel Informatik 12 Univ. Dortmund Germany.
Ch. 2. Specification and Modeling 2.1 Requirements Describe requirements and approaches for specifying and modeling embedded systems. Specification for.
technische universität dortmund fakultät für informatik informatik 12 Early design phases Jian-Jia Chen (slides are based on Peter Marwedel) TU Dortmund,
1 Advanced Embedded Systems Lecture 3 Specification Languages.
Lecture 2 Specification and Requirement Analysis of Embedded System.
2. Specification and Modeling
Presentation transcript:

technische universität dortmund fakultät für informatik informatik 12 Early design phases Jian-Jia Chen (slides are based on Peter Marwedel) TU Dortmund, Informatik 年 10 月 14 日 These slides use Microsoft clip arts. Microsoft copyright restrictions apply. © Springer, 2010

- 2 - technische universität dortmund fakultät für informatik  JJ Chen and P.Marwedel, Informatik 12, 2014 Models of computation considered in this course Communication/ local computations Shared memory Message passing Synchronous | Asynchronous Undefined components Plain text, use cases (Message) sequence charts Communicating finite state machines StateChartsSDL Data flowKahn networks, SDF Petri nets C/E nets, P/T nets, … Discrete event (DE) model VHDL*, Verilog*, SystemC*, … Only experimental systems, e.g. distributed DE in Ptolemy Von Neumann modelC, C++, JavaC, C++, Java with libraries CSP, ADA | * Based on implementation of VHDL, Verilog..

- 3 - technische universität dortmund fakultät für informatik  JJ Chen and P.Marwedel, Informatik 12, 2014 Capturing the requirements as text  In the very early phases of some design project, only descriptions of the system under design (SUD) in a natural language such as English or Japanese exist.  Expectations for tools: Machine-readable Version management Dependency analysis Example: DOORS ® [Telelogic/IBM]

- 4 - technische universität dortmund fakultät für informatik  JJ Chen and P.Marwedel, Informatik 12, 2014 Use cases  Use cases describe possible applications of the SUD  Included in UML (Unified Modeling Language)  Example: Answering machine  Neither a precisely specified model of the computations nor a precisely specified model of the communication

- 5 - technische universität dortmund fakultät für informatik  JJ Chen and P.Marwedel, Informatik 12, 2014 (Message) Sequence charts  Explicitly indicate exchange of information  One dimension (usually vertical dimension) reflects time  The other reflects distribution in space Example:  Included in UML  Earlier called Message Sequence Charts, now mostly called Sequence Charts

- 6 - technische universität dortmund fakultät für informatik  JJ Chen and P.Marwedel, Informatik 12, 2014 Example (2) deliverable 2.1

- 7 - technische universität dortmund fakultät für informatik  JJ Chen and P.Marwedel, Informatik 12, 2014 Application: In-Car Navigation System Car radio with navigation system User interface needs to be responsive Traffic messages (TMC) must be processed in a timely way Several applications may execute concurrently © Thiele, ETHZ

- 8 - technische universität dortmund fakultät für informatik  JJ Chen and P.Marwedel, Informatik 12, 2014 System Overview NAVRAD MMI DB Communication © Thiele, ETHZ

- 9 - technische universität dortmund fakultät für informatik  JJ Chen and P.Marwedel, Informatik 12, 2014 NAVRAD MMI DB Communication Use case 1: Change Audio Volume < 200 ms < 50 ms © Thiele, ETHZ

technische universität dortmund fakultät für informatik  JJ Chen and P.Marwedel, Informatik 12, 2014 Use case 1: Change Audio Volume © Thiele, ETHZ Communication Resource Demand

technische universität dortmund fakultät für informatik  JJ Chen and P.Marwedel, Informatik 12, 2014 NAVRAD MMI DB Communication < 200 ms Use case 2: Lookup Destination Address © Thiele, ETHZ

technische universität dortmund fakultät für informatik  JJ Chen and P.Marwedel, Informatik 12, 2014 Use case 2: Lookup Destination Address © Thiele, ETHZ

technische universität dortmund fakultät für informatik  JJ Chen and P.Marwedel, Informatik 12, 2014 Time/distance diagrams as a special case No distinction between accidental overlap and synchronization

technische universität dortmund fakultät für informatik  JJ Chen and P.Marwedel, Informatik 12, 2014 Time/distance diagrams as a special case © Levi-TDD

technische universität dortmund fakultät für informatik  JJ Chen and P.Marwedel, Informatik 12, 2014 UML: Timing diagrams Can be used to show the change of the state of an object over time. Based on Scott Ambler, Agile Modeling, // MoThuMo Professor Recording assistant teaching preparation Other duty recording editing Thu Approximately..

technische universität dortmund fakultät für informatik  JJ Chen and P.Marwedel, Informatik 12, 2014 Summary  Motivation for non-von Neumann models  Support for early design phases Text Use cases (Message) sequence charts

technische universität dortmund fakultät für informatik informatik 12 StateCharts and StateMates Jian-Jia Chen (slides are based on Peter Marwedel) TU Dortmund, Informatik 年 10 月 14 日 These slides use Microsoft clip arts. Microsoft copyright restrictions apply. © Springer, 2010

technische universität dortmund fakultät für informatik  JJ Chen and P.Marwedel, Informatik 12, 2014 Models of computation considered in this course Communication/ local computations Shared memory Message passing Synchronous | Asynchronous Undefined components Plain text, use cases (Message) sequence charts Communicating finite state machines StateChartsSDL Data flowKahn networks, SDF Petri nets C/E nets, P/T nets, … Discrete event (DE) model VHDL*, Verilog*, SystemC*, … Only experimental systems, e.g. distributed DE in Ptolemy Von Neumann modelC, C++, JavaC, C++, Java with libraries CSP, ADA | * Based on implementation of VHDL, Verilog..

technische universität dortmund fakultät für informatik  JJ Chen and P.Marwedel, Informatik 12, 2014 StateCharts Classical automata not useful for complex systems (complex graphs cannot be understood by humans).  Introduction of hierarchy  StateCharts [Harel, 1987] StateChart = the only unused combination of „flow“ or „state“ with „diagram“ or „chart“ Used here as a (prominent) example of a model of computation based on shared memory communication.  appropriate only for local (non-distributed) systems

technische universität dortmund fakultät für informatik  JJ Chen and P.Marwedel, Informatik 12, 2014 Introducing hierarchy FSM will be in exactly one of the substates of S if S is active (either in A or in B or..)

technische universität dortmund fakultät für informatik  JJ Chen and P.Marwedel, Informatik 12, 2014 Definitions  Current states of FSMs are also called active states.  States which are not composed of other states are called basic states.  States containing other states are called super-states.  Super-states S are called OR-super-states, if exactly one of the sub-states of S is active whenever S is active. superstate substates

technische universität dortmund fakultät für informatik  JJ Chen and P.Marwedel, Informatik 12, 2014 Default state mechanism Try to hide internal structure from outside world!  Default state Filled circle indicates sub-state entered whenever super-state is entered. Not a state by itself!

technische universität dortmund fakultät für informatik  JJ Chen and P.Marwedel, Informatik 12, 2014 History mechanism For input m, S enters the state it was in before S was left (can be A, B, C, D, or E ). If S is entered for the first time, the default mechanism applies. (behavior different from last slide)

technische universität dortmund fakultät für informatik  JJ Chen and P.Marwedel, Informatik 12, 2014 Combining history and default state mechanism same meaning History and default mechanisms can be used hierarchically.

technische universität dortmund fakultät für informatik  JJ Chen and P.Marwedel, Informatik 12, 2014 Concurrency Convenient ways of describing concurrency req. AND-super-states: FSM is in all (immediate) sub-states of a super-state; Example:

technische universität dortmund fakultät für informatik  JJ Chen and P.Marwedel, Informatik 12, 2014 Entering and leaving AND-super-states Line-monitoring and key-monitoring are entered and left, when service switch is operated.

technische universität dortmund fakultät für informatik  JJ Chen and P.Marwedel, Informatik 12, 2014 Types of states In StateCharts, states are either  basic states, or  AND-super-states, or  OR-super-states.

technische universität dortmund fakultät für informatik  JJ Chen and P.Marwedel, Informatik 12, 2014 Timers Since time needs to be modeled in embedded & cyber-physical systems, timers need to be modeled. In StateCharts, special edges can be used for timeouts. If event a does not happen while the system is in the left state for 20 ms, a timeout will take place.

technische universität dortmund fakultät für informatik  JJ Chen and P.Marwedel, Informatik 12, 2014 Using timers in an answering machine.

technische universität dortmund fakultät für informatik  JJ Chen and P.Marwedel, Informatik 12, 2014 General form of edge labels Events:  Exist only until the next evaluation of the model  Can be either internally or externally generated Conditions:  Refer to values of variables that keep their value until they are reassigned Reactions:  Can either be assignments for variables  or creation of events Example:  service-off [ not in Lproc ] / service :=0 event [condition] / reaction

technische universität dortmund fakultät für informatik  JJ Chen and P.Marwedel, Informatik 12, 2014 The StateCharts simulation phases (StateMate Semantics) How are edge labels evaluated? Three phases: 1.Effect of external changes on events and conditions is evaluated, 2.The set of transitions to be made in the current step and right hand sides of assignments are computed, 3.Transitions become effective, variables obtain new values. Separation into phases 2 and 3 enables a resulting unique (“determinate”) behavior.

technische universität dortmund fakultät für informatik  JJ Chen and P.Marwedel, Informatik 12, 2014 Example In phase 2, variables a and b are assigned to temporary variables: In phase 3, these are assigned to a and b. As a result, variables a and b are swapped. a’ := b, b’ := a; a := a’, b := b’;

technische universität dortmund fakultät für informatik  JJ Chen and P.Marwedel, Informatik 12, 2014 Example (2) In a single phase environment, executing the left state first would assign the old value of b (=0) to a and b : Executing the right state first would assign the old value of a (=1) to a and b. The result would depend on the execution order. a := 0, b := 0; b := 1, a := 1;

technische universität dortmund fakultät für informatik  JJ Chen and P.Marwedel, Informatik 12, 2014 Reflects model of clocked hardware In an actual clocked (synchronous) hardware system, both registers would be swapped as well. Same separation into phases found in other languages as well, especially those that are intended to model hardware. ab

technische universität dortmund fakultät für informatik  JJ Chen and P.Marwedel, Informatik 12, 2014 Steps Execution of a StateMate model consists of a sequence of (status, step) pairs Status= values of all variables + set of events + current time Step = execution of the three phases (StateMate semantics) Status phase 2 phase 3 phase 1 Other implementations of StateCharts do not have these 3 phases (and hence could lead to different results)!

technische universität dortmund fakultät für informatik  JJ Chen and P.Marwedel, Informatik 12, 2014 Lifetime of events Events live until the step following the one in which they are generated (“one shot-events“).

technische universität dortmund fakultät für informatik  JJ Chen and P.Marwedel, Informatik 12, 2014 Other semantics Several other specification languages for hierarchical state machines (UML, dave, …) do not include the three simulation phases. These correspond more to a SW point of view with no synchronous clocks. Some systems allow turning the multi-phased simulation on and off.

technische universität dortmund fakultät für informatik  JJ Chen and P.Marwedel, Informatik 12, 2014 Broadcast mechanism Values of variables are visible to all parts of the StateChart model. New values become effective in phase 3 of the current step and are obtained by all parts of the model in the following step.  StateCharts implicitly assumes a broadcast mechanism for variables (  implicit shared memory communication –other implementations would be very inefficient -).  StateCharts is appropriate for local control systems ( ), but not for distributed applications for which updating variables might take some time (  ). !

technische universität dortmund fakultät für informatik  JJ Chen and P.Marwedel, Informatik 12, 2014 Determinate vs. deterministic  Kahn (1974) calls a system determinate if we will always obtain the same result for a fixed set (and timing) of inputs  Others call this property deterministic However, this term has several meanings: Non-deterministic finite state machines Non-deterministic operators (e.g. + with non-deterministic result in low order bits) Behavior not known before run-time (unknown input results in non-determinism) In the sense of determinate as used by Kahn In order to avoid confusion, we use the term “determinate“ in this course.

technische universität dortmund fakultät für informatik  JJ Chen and P.Marwedel, Informatik 12, 2014 Conflicts Techniques for resolving these conflicts wanted

technische universität dortmund fakultät für informatik  JJ Chen and P.Marwedel, Informatik 12, 2014 StateCharts determinate or not? Must all simulators return the same result for a given input?  Separation into 3 phases a required condition  Semantics  StateMate semantics may be non-determinate Potential other sources of non-determinate behavior:  Choice between conflicting transitions resolved arbitrarily: Tools typically issue a warning if such a situation could exist  Determinate behavior for StateMate semantics if transition conflicts are resolved and no other sources of undefined behavior exist

technische universität dortmund fakultät für informatik  JJ Chen and P.Marwedel, Informatik 12, 2014 Evaluation of StateCharts (1) Pros (  ):  Hierarchy allows arbitrary nesting of AND- and OR-super states.  (StateMate-) Semantics defined in a follow-up paper to original paper.  Large number of commercial simulation tools available (StateMate, StateFlow, BetterState,...)  Available “back-ends“ translate StateCharts into SW or HW languages, thus enabling software or hardware implementations.

technische universität dortmund fakultät für informatik informatik 12 Backups Jian-Jia Chen (slides are based on Peter Marwedel) TU Dortmund, Informatik 年 10 月 14 日 These slides use Microsoft clip arts. Microsoft copyright restrictions apply. © Springer, 2010

technische universität dortmund fakultät für informatik  JJ Chen and P.Marwedel, Informatik 12, 2014 NAVRAD MMI DB Communication Use case 3: Receive TMC Messages < 1000 ms © Thiele, ETHZ

technische universität dortmund fakultät für informatik  JJ Chen and P.Marwedel, Informatik 12, 2014 Use case 3: Receive TMC Messages © Thiele, ETHZ

technische universität dortmund fakultät für informatik  JJ Chen and P.Marwedel, Informatik 12, 2014 Life Sequence Charts * (LSCs) * W. Damm, D. Harel: LSCs: Breathing Life into Message Sequence Charts, Formal Methods in System Design, 19, 45–80, 2001 Key problems observed with standard MSCs: During the design process, MSC are initially interpreted as “what could happen” (existential interpretation, still allowing other behaviors). Later, they are frequently assumed to describe “what must happen” (referring to what happens in the implementation).

technische universität dortmund fakultät für informatik  JJ Chen and P.Marwedel, Informatik 12, 2014 Extensions for LSCs (1) Extension 1: Introduction of pre- charts: Pre-charts describe conditions that must hold for the main chart to apply. Pre-chart Example: ProfMicCamRecorderTA confirms test press

technische universität dortmund fakultät für informatik  JJ Chen and P.Marwedel, Informatik 12, 2014 Extensions (2) Extension 2: Mandatory vs. provisional behavior LevelMandatory (solid lines)Provisional (dashed lines) Chart All runs of the system satisfy the chart At least one run of the system satisfies the chart LocationInstance must move beyond location/time Instance run need not move beyond loc/time MessageIf message is sent, it will be received Receipt of message is not guaranteed ConditionCondition must be met; otherwise abort If condition is not met, exit subchart

technische universität dortmund fakultät für informatik  JJ Chen and P.Marwedel, Informatik 12, 2014 PROs:  Appropriate for visualizing schedules,  Proven method for representing schedules in transportation.  Standard defined: ITU-TS Recommendation Z.120: Message Sequence Chart (MSC), ITU-TS, Geneva,  Semantics also defined: ITU-TS Recommendation Z.120: Message Sequence Chart (MSC)—Annex B: Algebraic Semantics of Message Sequence Charts, ITU-TS, Geneva. CONS:  describes just one case, no timing tolerances: "What does an MSC specification mean: does it describe all behaviors of a system, or does it describe a set of sample behaviors of a system?” * * H. Ben-Abdallah and S. Leue, “Timing constraints in message sequence chart specifications,” in Proc. 10th International Conference on Formal Description Techniques FORTE/PSTV’97, Chapman and Hall, (Message) Sequence Charts