Ch.2 Part A: Requirements, State Charts EECE **** Embedded System Design.

Slides:



Advertisements
Similar presentations
Fakultät für informatik informatik 12 technische universität dortmund Specifications and Modeling Peter Marwedel TU Dortmund, Informatik 12 Graphics: ©
Advertisements

Communicating finite state machines
Technische universität dortmund fakultät für informatik informatik 12 Specifications and Modeling Peter Marwedel TU Dortmund, Informatik
Embedded System, A Brief Introduction
State Charts Mehran Najafi. Reactive Systems A reactive, event-driven, object is one whose behavior is best characterized by its response to events dispatched.
Technische universität dortmund fakultät für informatik informatik 12 Specifications, Modeling, and Model of Computation Jian-Jia Chen (slides are based.
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,
UML Statechart semantics Speaker: Fei Mo Tutor: Priv.-Doz. Dr. Thomas Noll Lehrstuhl für Informatik 2 RWTH Aachen SS 07.
EECE **** Embedded System Design
Week 6Fall 2001 CS5991 The STATEMATE Semantics of Statecharts D. Harel and A. Naamand Ahmad Alsawi 1-4 Bob Chen 5-8 Dapeng Xie 9-11.
TOPIC : Finite State Machine(FSM) and Flow Tables UNIT 1 : Modeling Module 1.4 : Modeling Sequential circuits.
Give qualifications of instructors: DAP
CS 290C: Formal Models for Web Software Lecture 4: Implementing and Verifying Statecharts Specifications Using the Spin Model Checker Instructor: Tevfik.
fakultät für informatik informatik 12 technische universität dortmund Early design phases Peter Marwedel TU Dortmund, Informatik 12 Graphics: © Alexandra.
Programming Languages Marjan Sirjani 2 2. Language Design Issues Design to Run efficiently : early languages Easy to write correctly : new languages.
ITEC113 Algorithms and Programming Techniques
CS 151 Digital Systems Design Lecture 37 Register Transfer Level
FunState – An Internal Design Representation for Codesign A model that enables representations of different types of system components. Mixture of functional.
State charts in SysML. Announcements 15 July 2004 – I-Logix announce that BAe systems are standardising on Statemate for development of Eurofighter TyphoonI-Logix.
Lecture 6 & 7 System Models.
State Machines Timing Computer Bus Computer Performance Instruction Set Architectures RISC / CISC Machines.
Statecharts: A Visual Formalism for Complex Systems Jeff Peng Model-based Design Lab.
CS 290C: Formal Models for Web Software Lecture 2: Modeling States with Statecharts Instructor: Tevfik Bultan.
- 1 -  P. Marwedel, Univ. Dortmund, Informatik 12, 2003 Universität Dortmund Hoofdstuk 2 Systeemspecificatietechnieken 2.1 Functionele specificatie Prof.
Lecture 6 Template Semantics CS6133 Fall 2011 Software Specification and Verification.
02/06/05 “Investigating a Finite–State Machine Notation for Discrete–Event Systems” Nikolay Stoimenov.
System Modelling and Verification
- 1 - Embedded Systems—State charts Specifications.
- 1 -  P. Marwedel, Univ. Dortmund, Informatik 12, 2005/6 Universität Dortmund Specifications.
Lecture 4 Finite State Machine CS6133 Software Specification and Verification.
Digital Computer Design Fundamental
- 1 -  P. Marwedel, Univ. Dortmund, Informatik 12, 2005/6 Universität Dortmund Some general properties of languages 1. Synchronous vs. asynchronous languages.
1 COMP541 State Machines Montek Singh Feb 8, 2012.
SOFTWARE ENGINEERING BIT-8 APRIL, 16,2008 Introduction to UML.
Programmable Logic Controller (PLC)
Ch.2 Part C: Message Sequence Charts, UML EECE **** Embedded System Design.
- 1 - Embedded Systems - SDL Some general properties of languages 1. Synchronous vs. asynchronous languages Description of several processes in many languages.
CS 3850 Lecture 3 The Verilog Language. 3.1 Lexical Conventions The lexical conventions are close to the programming language C++. Comments are designated.
StateCharts Peter Marwedel Informatik 12 Univ. Dortmund Germany.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Ch. 2. Specification and Modeling 2.1 Requirements Describe requirements and approaches for specifying and modeling embedded systems. Specification for.
1 © 2014 B. Wilkinson Modification date: Dec Sequential Logic Circuits Previously, we described the basic building blocks of sequential circuits,
Fall 2004EE 3563 Digital Systems Design EE 3563 VHSIC Hardware Description Language  Required Reading: –These Slides –VHDL Tutorial  Very High Speed.
By: David Harel & Eran Grey Presenter: Elizabeth Antony CISC 836.
SOFTWARE DESIGN. INTRODUCTION There are 3 distinct types of activities in design 1.External design 2.Architectural design 3.Detailed design Architectural.
Ch.2 Part E: VHDL, SystemC EECE **** Embedded System Design.
Introduction to VHDL Simulation … Synthesis …. The digital design process… Initial specification Block diagram Final product Circuit equations Logic design.
CSCI1600: Embedded and Real Time Software Lecture 7: Modeling II: Discrete Systems Steven Reiss, Fall 2015.
1 Copyright  2001 Pao-Ann Hsiung SW HW Module Outline l Introduction l Unified HW/SW Representations l HW/SW Partitioning Techniques l Integrated HW/SW.
CS3773 Software Engineering Lecture 06 UML State Machines.
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,
Registers; State Machines Analysis Section 7-1 Section 5-4.
Finite State Machines (FSM) OR Finite State Automation (FSA) - are models of the behaviors of a system or a complex object, with a limited number of defined.
VHDL Discussion Subprograms IAY 0600 Digital Systems Design Alexander Sudnitson Tallinn University of Technology 1.
Digital System Design using VHDL
1 COMP541 Finite State Machines - 1 Montek Singh Sep 22, 2014.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Govt. Engineering College- Gandhinagar. It is all about……  STATE MACHINE.
1 Advanced Embedded Systems Lecture 3 Specification Languages.
1 COMP541 Sequential Logic – 2: Finite State Machines Montek Singh Feb 29, 2016.
Lecture 2 Specification and Requirement Analysis of Embedded System.
From requirements to specification Specification is a refinement of requirements Can be included together as Software Requirements Specifications (SRS)
Embedded System Design Specifications and Modeling
The Von Neumann Model Basic components Instruction processing
VHDL Discussion Subprograms
Dynamic Modeling Lecture # 37.
VHDL Discussion Subprograms
Specifications and Modeling
Paper by D.L Parnas And D.P.Siewiorek Prepared by Xi Chen May 16,2003
Presentation transcript:

Ch.2 Part A: Requirements, State Charts EECE **** Embedded System Design

2 Department of Electrical and Computer Engineering College of Engineering, Technology and Computer Science Specifications

3 Department of Electrical and Computer Engineering College of Engineering, Technology and Computer Science Specification of embedded systems: Requirements for specification techniques (1) Hierarchy Humans not capable to understand systems containing more than ~5 objects. Most actual systems require more objects  Hierarchy –Behavioral hierarchy Examples: states, processes, procedures. –Structural hierarchy Examples: processors, racks, printed circuit boards Hierarchy Humans not capable to understand systems containing more than ~5 objects. Most actual systems require more objects  Hierarchy –Behavioral hierarchy Examples: states, processes, procedures. –Structural hierarchy Examples: processors, racks, printed circuit boards proc

4 Department of Electrical and Computer Engineering College of Engineering, Technology and Computer Science Specification of embedded systems: Requirements for specification techniques (2) Timing behavior. State-oriented behavior Required for reactive systems; classical automata insufficient. Event-handling (external or internal events) No obstacles for efficient implementation Timing behavior. State-oriented behavior Required for reactive systems; classical automata insufficient. Event-handling (external or internal events) No obstacles for efficient implementation

5 Department of Electrical and Computer Engineering College of Engineering, Technology and Computer Science Requirements for specification techniques (3) Support for the design of dependable systems Unambiguous semantics,... Exception-oriented behavior Not acceptable to describe exceptions for every state. Support for the design of dependable systems Unambiguous semantics,... Exception-oriented behavior Not acceptable to describe exceptions for every state. We will see, how all the arrows labeled k can be replaced by a single one..

6 Department of Electrical and Computer Engineering College of Engineering, Technology and Computer Science Requirements for specification techniques (4) Concurrency Real-life systems are concurrent Synchronization and communication Components have to communicate! Presence of programming elements For example, arithmetic operations, loops, and function calls should be available Executability (no algebraic specification) Support for the design of large systems (  OO) Domain-specific support Concurrency Real-life systems are concurrent Synchronization and communication Components have to communicate! Presence of programming elements For example, arithmetic operations, loops, and function calls should be available Executability (no algebraic specification) Support for the design of large systems (  OO) Domain-specific support

7 Department of Electrical and Computer Engineering College of Engineering, Technology and Computer Science Requirements for specification techniques (5) Readability Portability and flexibility Termination It should be clear, at which time all computations are completed Support for non-standard I/O devices Direct access to switches, displays,... Non-functional properties fault-tolerance, disposability, EMC-properties, weight, size, user friendliness, extendibility, expected life time, power consumption... Adequate model of computation Readability Portability and flexibility Termination It should be clear, at which time all computations are completed Support for non-standard I/O devices Direct access to switches, displays,... Non-functional properties fault-tolerance, disposability, EMC-properties, weight, size, user friendliness, extendibility, expected life time, power consumption... Adequate model of computation

8 Department of Electrical and Computer Engineering College of Engineering, Technology and Computer Science StateCharts: recap of classical automata Classical automata: Moore-automata: Y = (Z); Z + =  (X, Z) Mealy-automata Y = (X, Z); Z + =  (X, Z) Moore-automata: Y = (Z); Z + =  (X, Z) Mealy-automata Y = (X, Z); Z + =  (X, Z) Internal state Z input Xoutput Y Next state Z + computed by function  Output computed by function Z0Z1 Z2Z3 e= clock Moore- + Mealy automata=finite state machines (FSMs)

9 Department of Electrical and Computer Engineering College of Engineering, Technology and Computer Science Introducing hierarchy FSM will be in exactly one of the substates of S if S is active (either in A or in B or..) 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“ 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“

10 Department of Electrical and Computer Engineering College of Engineering, Technology and Computer Science 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. For each basic state s, the super-states containing s are called ancestor states. Super-states S are called OR-super-states, if exactly one of the sub- states of S is active whenever S is active. 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. For each basic state s, the super-states containing s are called ancestor states. Super-states S are called OR-super-states, if exactly one of the sub- states of S is active whenever S is active. ancestor state of E superstate substates

11 Department of Electrical and Computer Engineering College of Engineering, Technology and Computer Science 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! 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!

12 Department of Electrical and Computer Engineering College of Engineering, Technology and Computer Science 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 very first time, the default mechanism applies. History and default mechanisms can be used hierarchically. 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 very first time, the default mechanism applies. History and default mechanisms can be used hierarchically. (behavior different from last slide) km

13 Department of Electrical and Computer Engineering College of Engineering, Technology and Computer Science Combining history and default state mechanism same meaning

14 Department of Electrical and Computer Engineering College of Engineering, Technology and Computer Science Concurrency Convenient ways of describing concurrency are required. AND-super-states: FSM is in all (immediate) sub-states of a super-state; Example: Convenient ways of describing concurrency are required. AND-super-states: FSM is in all (immediate) sub-states of a super-state; Example:

15 Department of Electrical and Computer Engineering College of Engineering, Technology and Computer Science Entering and leaving AND-super-states Line-monitoring and key-monitoring are entered and left, when service switch is operated. incl.

16 Department of Electrical and Computer Engineering College of Engineering, Technology and Computer Science Timers Since time needs to be modeled in embedded systems, timers need to be modeled. In StateCharts, special edges can be used for timeouts. Since time needs to be modeled in embedded 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.

17 Department of Electrical and Computer Engineering College of Engineering, Technology and Computer Science Using timers in answering machine

18 Department of Electrical and Computer Engineering College of Engineering, Technology and Computer Science 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 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

19 Department of Electrical and Computer Engineering College of Engineering, Technology and Computer Science 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 guarantees deterministic and reproducible behavior. 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 guarantees deterministic and reproducible behavior.

20 Department of Electrical and Computer Engineering College of Engineering, Technology and Computer Science 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. 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 execution would be non-deterministic. 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. 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 execution would be non-deterministic.

21 Department of Electrical and Computer Engineering College of Engineering, Technology and Computer Science 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.

22 Department of Electrical and Computer Engineering College of Engineering, Technology and Computer Science Steps Execution of a StateChart 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= values of all variables + set of events + current time Step = execution of the three phases (StateMate semantics) Status phase 2 phase 3 phase 1

23 Department of Electrical and Computer Engineering College of Engineering, Technology and Computer Science 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 C or VHDL, thus enabling software or hardware implementations. 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 C or VHDL, thus enabling software or hardware implementations.

24 Department of Electrical and Computer Engineering College of Engineering, Technology and Computer Science Evaluation of StateCharts (2) Cons: Generated C programs frequently inefficient, Not useful for distributed applications, No program constructs, No description of non-functional behavior, No object-orientation, No description of structural hierarchy. Cons: Generated C programs frequently inefficient, Not useful for distributed applications, No program constructs, No description of non-functional behavior, No object-orientation, No description of structural hierarchy. Extensions: Module charts for description of structural hierarchy. Extensions: Module charts for description of structural hierarchy.