UMLEmb: UML for Embedded Systems. II. Modeling in SysML. Eurecom

Similar documents
Use Case Diagrams & Sequence Diagrams

SOFT 437. Software Performance Analysis. What is UML? UML Tutorial

Towards Integrated System and Software Modeling for Embedded Systems

Course Outline Department of Computing Science Faculty of Science

CANopen Programmer s Manual Part Number Version 1.0 October All rights reserved

Autonomous Underwater Vehicle Navigation.

Problem Set 10 Solutions

Laurea Specialistica in Ingegneria. Ingegneria dell'automazione: Sistemi in Tempo Reale

Increasing Broadcast Reliability for Vehicular Ad Hoc Networks. Nathan Balon and Jinhua Guo University of Michigan - Dearborn

I hope you have completed Part 2 of the Experiment and is ready for Part 3.

Methods for Reducing the Activity Switching Factor

AN0503 Using swarm bee LE for Collision Avoidance Systems (CAS)

The Disappearing Computer. Information Document, IST Call for proposals, February 2000.

Subway simulator Case study

Distributed Virtual Environments!

The AMADEOS SysML Profile for Cyber-physical Systems-of-Systems

FTSP Power Characterization

Introduction to Real-time software systems Draft Edition

Managing Metastability with the Quartus II Software

Lecture 4: State Machines for Real-Time Embedded Systems

INTERNATIONAL TELECOMMUNICATION UNION DATA COMMUNICATION NETWORK: INTERFACES

Designing with STM32F3x

A Colored Petri Net Model of Simulation for Performance Evaluation for IEEE based Network

Co-evolution of agent-oriented conceptual models and CASO agent programs

University of Toronto. CSC340F Information Systems Analysis and Design

An Automated Rainfall Monitoring System

DIGITAL DESIGN WITH SM CHARTS

Dipartimento di Elettronica Informazione e Bioingegneria Robotics

28 April r2 SAS-2 BROADCAST processing clarifications

Chapter # 1: Introduction

Hello, and welcome to this presentation of the STM32L4 comparators. It covers the main features of the ultra-lowpower comparators and some

Digital Logic Circuits

CONFIGURING DRIVE PARAMETERS

18 April r1 SAS-2 ZONED BROADCAST processing clarification

Hello, and welcome to this presentation of the FlexTimer or FTM module for Kinetis K series MCUs. In this session, you ll learn about the FTM, its

ETHERNET TESTING SERVICES

Chapter 3: Alarm correlation

Disclaimer. Primer. Agenda. previous work at the EIT Department, activities at Ericsson

CANopen Programmer s Manual

Hardware-Software Co-Design Cosynthesis and Partitioning

E2.11/ISE2.22 Digital Electronics II

The DSS Synoptic Facility

Smart Pump VMS2310-D. Smart Pump with DeviceNet Installation & Maintenance

Robonet - MANET for Robot Communication

Ultra-Low Duty Cycle MAC with Scheduled Channel Polling

By the end of this chapter, you should: Understand what is meant by engineering design. Understand the phases of the engineering design process.

UNDERSTANDING THE DDC112 s CONTINUOUS AND NON-CONTINUOUS MODES OVERVIEW

Inter-Device Synchronous Control Technology for IoT Systems Using Wireless LAN Modules

INF3430 Clock and Synchronization

WiMOD LR Base Plus Firmware

Temperature Monitoring and Fan Control with Platform Manager 2

Know your Algorithm! Architectural Trade-offs in the Implementation of a Viterbi Decoder. Matthias Kamuf,

Policy-Based RTL Design

EC O4 403 DIGITAL ELECTRONICS

EMBEDDED SYSTEM DESIGN

Structure and Synthesis of Robot Motion

Information Quality in Critical Infrastructures. Andrea Bondavalli.

Peripheral Link Driver for ADSP In Embedded Control Application

Foundations of Distributed Systems: Tree Algorithms

Mixed Synchronous/Asynchronous State Memory for Low Power FSM Design

Supply 12Vdc nominal (9 Vdc minimum, 14,5Vdc maximum ) Max Current Drain. from a , V Carrier Frequency

CS 354R: Computer Game Technology

Use Case No 28: AGC Frequency Control

Research of key technical issues based on computer forensic legal expert system

PERSONA: ambient intelligent distributed platform for the delivery of AAL Services. Juan-Pablo Lázaro ITACA-TSB (Spain)

Software Engineering: A Practitioner s Approach, 7/e. Slides copyright 1996, 2001, 2005, 2009 by Roger S. Pressman

Systems. Roland Kammerer. 29. October Institute of Computer Engineering Vienna University of Technology. Communication in Distributed Embedded

CS 387/680: GAME AI DECISION MAKING. 4/19/2016 Instructor: Santiago Ontañón

Chapter- 5. Performance Evaluation of Conventional Handoff

Data Flow Modelling. Fault Tolerant Systems Research Group. Budapest University of Technology and Economics

Embedded Software Engineering Part 3: Analysis of Functional Requirements

An Unreal Based Platform for Developing Intelligent Virtual Agents

Towards Modeling of Data in UML Activities with the SPACE Method

Introduction to Systems Engineering

A Bottom-Up Approach to on-chip Signal Integrity

Exercise Data Networks

Synchronisation in Distributed Systems

CIS1109 merged questions

UNIT-III LIFE-CYCLE PHASES

Special Notice. Rules. Weiß Schwarz (English Edition) Comprehensive Rules ver. 2.01b Last updated: June 12, Outline of the Game

INTRODUCTION TO GAME AI

Pixie Location of Things Platform Introduction

The Evolution of Real-Time Programming

Unit 3 Digital Circuits (Logic)

Deployment Design of Wireless Sensor Network for Simple Multi-Point Surveillance of a Moving Target

ROM/UDF CPU I/O I/O I/O RAM

Design of Parallel Algorithms. Communication Algorithms

Pervasive Services Engineering for SOAs

Synchronisation in Distributed Systems

UML Use Case Diagrams

Written exam IE1204/5 Digital Design Friday 13/

The challenges of low power design Karen Yorav

RFID Multi-hop Relay Algorithms with Active Relay Tags in Tag-Talks-First Mode

FORMAL MODELING AND VERIFICATION OF MULTI-AGENTS SYSTEM USING WELL- FORMED NETS

Kissenger: A Kiss Messenger

Model-Based Testing. CSCE Lecture 18-03/29/2018

Design and development of embedded systems for the Internet of Things (IoT) Fabio Angeletti Fabrizio Gattuso

Validation Plan: Mitchell Hammock Road. Adaptive Traffic Signal Control System. Prepared by: City of Oviedo. Draft 1: June 2015

CANopen Programmer s Manual

Improved Model Generation of AMS Circuits for Formal Verification

Transcription:

UMLEmb: UML for Embedded Systems II. Modeling in SysML Ludovic Apvrille ludovic.apvrille@telecom-paristech.fr Eurecom, office 470 http://soc.eurecom.fr/umlemb/ @UMLEmb Eurecom Goals Learning objective Ability to read SysML/AVATAR diagrams Knowledge of the SysML/AVATAR syntax to be used during the lab Content Modeling assumptions diagram Use case, sequence and activity diagrams Block instance and state machine diagrams Educational case study: a pressure controller 2/61 Fall 2017 Institut Mines-Telecom UMLEmb - Modeling in SysML

Case Study: a Pressure Controlling System Specification (from the client) A pressure controller informs the crew with an alarm when the pressure exceeds 20 bars. The alarm duration equals 60 seconds. Two types of controllers. Type 2 keeps track of the measured values. Software to design: the pressure controller 3/61 Fall 2017 Institut Mines-Telecom UMLEmb - Modeling in SysML Pressure Controller: Assumptions Modeling assumptions linked to the system The controller s set up/shutdown procedures are not modeled The controller s maintenance is not modeled Versioning The keep track of measured value option is not modeled in the first version of the design Modeling assumptions linked to the system s environment The pressure sensor will never fail The alarm will never fail The controller never faces power cut problems 4/61 Fall 2017 Institut Mines-Telecom UMLEmb - Modeling in SysML

Outline 5/61 Fall 2017 Institut Mines-Telecom UMLEmb - Modeling in SysML Overview of the V Cycle 6/61 Fall 2017 Institut Mines-Telecom UMLEmb - Modeling in SysML

Outline 7/61 Fall 2017 Institut Mines-Telecom UMLEmb - Modeling in SysML Requirement Node A requirement node identifies a requirement by: A unique identifier (so as to achieve tracability) A description in plain text A type (functional, non functional, performance, security,...). 8/61 Fall 2017 Institut Mines-Telecom UMLEmb - Modeling in SysML

Requirement Diagram - Pressure Controller!""# $% &" ' ( ) ""# $% 0! # $% * + # $%, (!!"# - / # $% -.! /# 12*" 3 # $% )( 4 )(# $% 10/61 Fall 2017 Institut Mines-Telecom UMLEmb - Modeling in SysML

Outline 11/61 Fall 2017 Institut Mines-Telecom UMLEmb - Modeling in SysML Complex Embedded Systems Complex Embedded System = set of SW and HW components intended to perform a predefined set of functions for a given market Constraints Right market window Performance and costs 12/61 Fall 2017 Institut Mines-Telecom UMLEmb - Modeling in SysML

Space Exploration Space Exploration Analyzing various functionally equivalent implementation alternatives Find an optimal solution Important key design parameters Speed Power Consumption Silicon area Generation of heat Development effort... 14/61 Fall 2017 Institut Mines-Telecom UMLEmb - Modeling in SysML

Level of Abstraction Problematic ers struggle with the complexity of today s circuits Cost of late re-engineering Right decisions should be taken as soon as possible... And quickly (time to market issue), so simulations must be fast System Level Space Exploration Reusable models, fast simulations / formal analysis, prototyping can start without all functions to be implemented But: high-level models must be closely defined so as to take the right decisions (as usual...). 15/61 Fall 2017 Institut Mines-Telecom UMLEmb - Modeling in SysML with the Y-Methododology Example: the DIPLODOCUS methodology 16/61 Fall 2017 Institut Mines-Telecom UMLEmb - Modeling in SysML

Application Modeling 17/61 Fall 2017 Institut Mines-Telecom UMLEmb - Modeling in SysML Architecture Modeling 18/61 Fall 2017 Institut Mines-Telecom UMLEmb - Modeling in SysML

Mapping 19/61 Fall 2017 Institut Mines-Telecom UMLEmb - Modeling in SysML System = Understanding what a client wants So, it does not mean creating a system, but rather understanding the main functionalities of the system to be designed Can be performed before or after the partitioning stage method 1. System boundary and main functions Use Case Diagram 2. Relations between main functions Activity Diagram 3. Communications between main system entities and actors Sequence Diagram 20/61 Fall 2017 Institut Mines-Telecom UMLEmb - Modeling in SysML

Use Case Diagram - Pressure Controller 22/61 Fall 2017 Institut Mines-Telecom UMLEmb - Modeling in SysML

Actors Syntax 1: Stickman Syntax 2: <<Actor>> Method An actor identifier is a substantive An actor or its descendants by inheritance relation(s) must interact with the system 23/61 Fall 2017 Institut Mines-Telecom UMLEmb - Modeling in SysML Use Case Syntax: ellipse with exactly one use case Method A use case is described by a verb The verb should describe the point of view of the system, not the point of view of the actors A use case diagram must NOT describe a step-by-step algorithm A use case describes a high-level service/function, not an elementary action of the system 24/61 Fall 2017 Institut Mines-Telecom UMLEmb - Modeling in SysML

Use Case to Use Case Relations Inclusion A function mandatorily includes another function Extension A function optionally includes another function Inheritance A child function specializes a parent function 25/61 Fall 2017 Institut Mines-Telecom UMLEmb - Modeling in SysML Profession-Driven Use Case Diagram Draw the relations between actors and use cases 26/61 Fall 2017 Institut Mines-Telecom UMLEmb - Modeling in SysML

Location-Driven Use Case Diagram 27/61 Fall 2017 Institut Mines-Telecom UMLEmb - Modeling in SysML Activity Diagram - Syntax Shows functional flows in the form of succession of actions 28/61 Fall 2017 Institut Mines-Telecom UMLEmb - Modeling in SysML

Activity Diagram - Pressure Controller 29/61 Fall 2017 Institut Mines-Telecom UMLEmb - Modeling in SysML Sequence Diagram An actor interacting with a system Two interacting parts of the system 30/61 Fall 2017 Institut Mines-Telecom UMLEmb - Modeling in SysML

Sequence Diagram - Messages Synchronous communication (black arrow) Asynchronous communication (regular arrow) 31/61 Fall 2017 Institut Mines-Telecom UMLEmb - Modeling in SysML Using Sequence Diagrams Method A sequence diagram depicts one possible execution run, NOT the entire behavior of the system NO message between actors Inter-diagram coherence All actors must be defined in the use case diagram 32/61 Fall 2017 Institut Mines-Telecom UMLEmb - Modeling in SysML

Sequence Diagram - Time (1/2) Semantics One global clock (applies to the entire system) Time uniformly progresses (lifelines are read top-down) Causal ordering of events on lifelines Time information must be explicitly modeled Relative dates Absolute date 33/61 Fall 2017 Institut Mines-Telecom UMLEmb - Modeling in SysML

Sequence Diagram - Pressure Controller Shows how the system and the actors communicate over time 35/61 Fall 2017 Institut Mines-Telecom UMLEmb - Modeling in SysML System = Making what a client wants So, it means inventing a system, creating a system that complies with the client requirements. System architecture Block Definition Diagram and Internal Block Diagram In AVATAR, they are merged in one diagram that contains: The definition of blocks The interconnection of these blocks Behaviour of the system State Machine Diagram One state machine diagram per block 36/61 Fall 2017 Institut Mines-Telecom UMLEmb - Modeling in SysML

(Instance) Block Diagram: Connecting Blocks $ %""&'! (! "#" "#" Ports are connected to allow the state machines of blocks to exchange signals A block instance may nest one or several block instances 38/61 Fall 2017 Institut Mines-Telecom UMLEmb - Modeling in SysML

State Machine - States and Transitions 39/61 Fall 2017 Institut Mines-Telecom UMLEmb - Modeling in SysML State Machine - States and Transitions Note No parallelism Choices are optional: several guarded - or not guarded - transitions can directly exit a state 40/61 Fall 2017 Institut Mines-Telecom UMLEmb - Modeling in SysML

State Machines - Guards A transition guard contains a boolean expression built upon boolean operators and attributes 41/61 Fall 2017 Institut Mines-Telecom UMLEmb - Modeling in SysML

State Machine - Inputs (1/3) A signal reception is a transition trigger The transition between INITIAL STATE and END STATE is triggered by a signal reception Asynchronous communication FIFO-based The transition is fired if size(fifo, inputsignal) > 0 Synchronous communication The transition is fired whenever a rendezvous is possible Signals can convey parameters 43/61 Fall 2017 Institut Mines-Telecom UMLEmb - Modeling in SysML State Machine - Inputs (2/3) The signal s parameters, if any, are stored in attributes of the block instance that receives the signal 44/61 Fall 2017 Institut Mines-Telecom UMLEmb - Modeling in SysML

State Machine - Inputs (3/3) From the same state it is possible to wait for several signals Asynchronous communication: the first signal in the input queues triggers the transition Synchronous communication: The first ready-to-execute rendezvous triggers the transition 45/61 Fall 2017 Institut Mines-Telecom UMLEmb - Modeling in SysML State Machine - Ouputs A block instance can send signals with several parameters Constant values may not be used as real parameters use attributes instead A block instance cannot send two or several signals in parallel but it can send two or more signals in sequence 46/61 Fall 2017 Institut Mines-Telecom UMLEmb - Modeling in SysML

Synchronous Communications Sender and receiver synchronizes on the same signal Data exchange from the writer to the reader 47/61 Fall 2017 Institut Mines-Telecom UMLEmb - Modeling in SysML Non-Blocking Asynchronous Communications One FIFO per signal association Writing is NOT blocked when the FIFO is full Bucket approach when FIFO is full: new messages are dropped Example: we assume a FIFO of size 1 48/61 Fall 2017 Institut Mines-Telecom UMLEmb - Modeling in SysML

Blocking Asynchronous Communications One FIFO per signal association Writing is blocked when the FIFO is full Example: we assume a FIFO of size 1 49/61 Fall 2017 Institut Mines-Telecom UMLEmb - Modeling in SysML State Machine - Advanced I/O Signals declared by a block may be used by its sub-blocks T0 T1 T2 50/61 Fall 2017 Institut Mines-Telecom UMLEmb - Modeling in SysML

Broadcast Channel All blocks ready to receive a signal sent over a broadcast channel receive it So, what happens if the channel below is now set to broadcast? T0 T1 T2 51/61 Fall 2017 Institut Mines-Telecom UMLEmb - Modeling in SysML State Machine Diagram - Pressure Controller Shows the inner functioning of the Controller block instance 52/61 Fall 2017 Institut Mines-Telecom UMLEmb - Modeling in SysML

State Machines - Timers (2/3) Set The set operation starts a timer with a value given as parameter The timer is based on a global system clock Reset Prevents a previously set timer to send an expiration signal Expiration A timer timer1 sends is a signal named timer1 to the block instance it belongs to A timer expiration is handled as a signal reception 54/61 Fall 2017 Institut Mines-Telecom UMLEmb - Modeling in SysML

State Machines - Timers (3/3) Temporally limited acknowledgement with timers A block instance may take decisions depending on the signal which arrives first: either a normal signal or a timer expiration #$% Question Could we use an after clause instead of the tempo timer?!"! 55/61 Fall 2017 Institut Mines-Telecom UMLEmb - Modeling in SysML Another Model for Pressure Controller <<block>> PressureController <<block>> <<block>> <<block>> <<block>> PressureSensor MainController AlarmManager AlarmActuator - pressure : int; - branch = false : bool; - threshold = 20 : int; - currentpressure = 0 : int; - alarmduration = 5 : int; - alarmtimer : Timer; - setalarm(bool state) - int readingpressure() - bool isincode() ~ out pressurevalue(int value) ~ in pressurevalue(int value) ~ out highpressure() ~ in highpressure() ~ out alarmo() ~ out alarmon() ~ in alarmon() ~ in alarmo() (block code) (block code) 56/61 Fall 2017 Institut Mines-Telecom UMLEmb - Modeling in SysML

Another Model for Pressure Controller WaitingForNextCycle after (1,1) SensingPressure branch = isincode() [ else ] [ branch ] pressure = readingpressure() pressure = RANDOM0[19, 21] SendingPressure pressurevalue(pressure) Pressure Sensor 57/61 Fall 2017 Institut Mines-Telecom UMLEmb - Modeling in SysML Another Model for Pressure Controller WaitFirstHighPressure pressurevalue(currentpressure) [ currentpressure < threshold] [ else ] WaitSecondHighPressure pressurevalue(currentpressure) [ currentpressure < threshold] [ else ] highpressure() Main Controller 58/61 Fall 2017 Institut Mines-Telecom UMLEmb - Modeling in SysML

Another Model for Pressure Controller AlarmIsO highpressure() settimer(alarmtimer,alarmduration) alarmon() AlarmIsOn highpressure() expire(alarmtimer) reset(alarmtimer) alarmo() settimer(alarmtimer,alarmduration) Alarm Manager 59/61 Fall 2017 Institut Mines-Telecom UMLEmb - Modeling in SysML Another Model for Pressure Controller WaitingForAlarmCommand setalarm(false) setalarm(true) alarmon() alarmo() Alarm Actuator 60/61 Fall 2017 Institut Mines-Telecom UMLEmb - Modeling in SysML

How to Make Good Models? Practice, Practice and Practice!!! Knowledge of various diagrams capabilities Accurate understanding of the system to model Reading your diagrams, reading diagrams of your friends, reading diagrams on Internet Experience is a key factor Make exercises! 61/61 Fall 2017 Institut Mines-Telecom UMLEmb - Modeling in SysML