© S. Ramesh / Kavi Arya / Krithi Ramamritham 1 IT-606 Embedded Systems (Software ) S. Ramesh Kavi Arya Krithi Ramamritham KReSIT/ IIT Bombay.

Slides:



Advertisements
Similar presentations
Embedded System, A Brief Introduction
Advertisements

© S. Ramesh / Kavi Arya / Krithi Ramamritham 1 IT-606 Embedded Systems (Software ) S. Ramesh Kavi Arya Krithi Ramamritham KReSIT/ IIT Bombay.
Modelos de Computação Básicos Prof. Dr. César Augusto Missio Marcon Parcialmente extraído de trabalhos de Axel Jantch, Edward Lee e Alberto Sangiovanni-Vincentelli.
The cardiac pacemaker – SystemJ versus Safety Critical Java Heejong Park, Avinash Malik, Muhammad Nadeem, and Zoran Salcic. University of Auckland, NZ.
© S. Ramesh / Krithi Ramamritham / Kavi Arya 1 IT-606 Embedded Systems (Software) S. Ramesh Krithi Ramamritham Kavi Arya KReSIT/ IIT Bombay.
Real-Time Embedded Systems
© S. Ramesh / Kavi Arya / Krithi Ramamritham IT-606 Embedded Systems (Software) S. Ramesh Kavi Arya Krithi Ramamritham KReSIT/ IIT Bombay.
Undoing the Task: Moving Timing Analysis back to Functional Models Marco Di Natale, Haibo Zeng Scuola Superiore S. Anna – Pisa, Italy McGill University.
Sensor Network Platforms and Tools
Copyright © 2001 Stephen A. Edwards All rights reserved The Synchronous Language Esterel Prof. Stephen A. Edwards.
Software Requirements Engineering
MotoHawk Training Model-Based Design of Embedded Systems.
Event Driven Real-Time Programming CHESS Review University of California, Berkeley, USA May 10, 2004 Arkadeb Ghosal Joint work with Marco A. Sanvido, Christoph.
Synthesis of Embedded Software Using Free-Choice Petri Nets.
ECE 526 – Network Processing Systems Design Software-based Protocol Processing Chapter 7: D. E. Comer.
Implementing Constructive Synchronous Programs on POLIS CFSM Networks G.Berry E.Sentovich Ecole des Mines de Paris / INRIA Cadence Berkeley Labs.
Esterel Overview Roberto Passerone ee249 discussion section.
Review of “Embedded Software” by E.A. Lee Katherine Barrow Vladimir Jakobac.
Modeling and Visualization of CFSM Networks in JavaTime Michael Shilman James Shin Young EE249 Project Presentation December 8, 1998.
Models of Computation for Embedded System Design Alvise Bonivento.
Real-Time Kernels and Operating Systems. Operating System: Software that coordinates multiple tasks in processor, including peripheral interfacing Types.
Sources Gang Quan Univ. of Notre Dame Finite State Machines.
November 18, 2004 Embedded System Design Flow Arkadeb Ghosal Alessandro Pinto Daniele Gasperini Alberto Sangiovanni-Vincentelli
Mahapatra-A&M-Sprong'021 Co-design Finite State Machines Many slides of this lecture are borrowed from Margarida Jacome.
CprE 458/558: Real-Time Systems
Comparing Models of Computation for Real-time, Distributed Control Systems Shawn Schaffert Bruno Sinopoli.
EMBEDDED SOFTWARE Team victorious Team Victorious.
1 Embedded Computer System Laboratory RTOS Modeling in Electronic System Level Design.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 15 Slide 1 Real-time Systems 1.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 11 Slide 1 Architectural Design.
0 Deterministic Replay for Real- time Software Systems Alice Lee Safety, Reliability & Quality Assurance Office JSC, NASA Yann-Hang.
What is Concurrent Programming? Maram Bani Younes.
Niranjan Rao Julapelly Real-Time Scheduling [ Chapter 5.5]
Advanced Embedded Systems Design Pre-emptive scheduler BAE 5030 Fall 2004 Roshani Jayasekara Biosystems and Agricultural Engineering Oklahoma State University.
Real-Time Software Design Yonsei University 2 nd Semester, 2014 Sanghyun Park.
REAL-TIME SOFTWARE SYSTEMS DEVELOPMENT Instructor: Dr. Hany H. Ammar Dept. of Computer Science and Electrical Engineering, WVU.
1. Introduction 1.1 Background 1.2 Real-time applications 1.3 Misconceptions 1.4 Issues in real-time computing 1.5 Structure of a real-time system.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 10Slide 1 Architectural Design l Establishing the overall structure of a software system.
CS4730 Real-Time Systems and Modeling Fall 2010 José M. Garrido Department of Computer Science & Information Systems Kennesaw State University.
Recall: Three I/O Methods Synchronous: Wait for I/O operation to complete. Asynchronous: Post I/O request and switch to other work. DMA (Direct Memory.
EEL Software development for real-time engineering systems.
Other Chapters From the text by Valvano: Introduction to Embedded Systems: Interfacing to the Freescale 9S12.
- 1 - Embedded Systems - SDL Some general properties of languages 1. Synchronous vs. asynchronous languages Description of several processes in many languages.
Real-Time Operating Systems for Embedded Computing 李姿宜 R ,06,10.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
CprE / ComS 583 Reconfigurable Computing Prof. Joseph Zambreno Department of Electrical and Computer Engineering Iowa State University Lecture #21 – HW/SW.
Ch. 2. Specification and Modeling 2.1 Requirements Describe requirements and approaches for specifying and modeling embedded systems. Specification for.
Reference: Ian Sommerville, Chap 15  Systems which monitor and control their environment.  Sometimes associated with hardware devices ◦ Sensors: Collect.
Mahapatra-A&M-Fall'001 Co-design Finite State Machines Many slides of this lecture are borrowed from Margarida Jacome.
REAL-TIME SOFTWARE SYSTEMS DEVELOPMENT Instructor: Dr. Hany H. Ammar Dept. of Computer Science and Electrical Engineering, WVU.
I/O Computer Organization II 1 Interconnecting Components Need interconnections between – CPU, memory, I/O controllers Bus: shared communication channel.
Sources Gang Quan Univ. of Notre Dame Finite State Machines.
© S. Ramesh / Kavi Arya / Krithi Ramamritham 1 IT-606 Embedded Systems (Software) S. Ramesh Kavi Arya Krithi Ramamritham KReSIT/ IIT Bombay.
Fall 2004EE 3563 Digital Systems Design EE 3563 VHSIC Hardware Description Language  Required Reading: –These Slides –VHDL Tutorial  Very High Speed.
Real Time Operating Systems Introduction to Real-Time Operating Systems (Part I) Course originally developed by Maj Ron Smith.
© S. Ramesh / Krithi Ramamritham / Kavi Arya 1 IT-606 Embedded Systems (Software) S. Ramesh Krithi Ramamritham Kavi Arya KReSIT/ IIT Bombay.
1 Embedded Computer System Laboratory Systematic Embedded Software Gerneration from SystemC.
Operating Systems 1 K. Salah Module 1.2: Fundamental Concepts Interrupts System Calls.
CS4730 Real-Time Systems and Modeling Fall 2010 José M. Garrido Department of Computer Science & Information Systems Kennesaw State University.
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.
What’s Ahead for Embedded Software? (Wed) Gilsoo Kim
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Embedded Computer - Definition When a microcomputer is part of a larger product, it is said to be an embedded computer. The embedded computer retrieves.
SystemC Semantics by Actors and Reduction Techniques in Model Checking Marjan Sirjani Formal Methods Lab, ECE Dept. University of Tehran, Iran MoCC 2008.
Embedded Real-Time Systems Processing interrupts Lecturer Department University.
Configuring pacemaker while 2kms away. Person is travelling in driverless car.
Real-time Software Design
Esterel By: Sam Weinberg.
Real-time Software Design
Modeling Event-Based Systems in Ptolemy II EE249 Project Status Report
Presentation transcript:

© S. Ramesh / Kavi Arya / Krithi Ramamritham 1 IT-606 Embedded Systems (Software ) S. Ramesh Kavi Arya Krithi Ramamritham KReSIT/ IIT Bombay

© S. Ramesh / Kavi Arya / Krithi Ramamritham 2 Esterel: Motivation S. Ramesh

© S. Ramesh / Kavi Arya / Krithi Ramamritham 3 Embedded Software Typical structure of a simple embedded Software loop read inputs/sensors; compute response; generate actuator outputs forever

© S. Ramesh / Kavi Arya / Krithi Ramamritham 4 Embedded Software (contd.) Design Decisions – How to read inputs? – How often to read inputs? – Which order to read the inputs? – How to compute responses? – How to generate the responses? – How often to generate?

© S. Ramesh / Kavi Arya / Krithi Ramamritham 5 The Simplest Approach Round Robin Scheme loop await tick; read S1; take_action(S1); read S2; take_action(S2); read S3; take_action(S3); forever Tick is a time interrupt

© S. Ramesh / Kavi Arya / Krithi Ramamritham 6 Problems Processing speed decides the input rate! Fine for interactive systems not for reactive systems But it should be the other way around: –characters coming at an network interface card –video frame processing –Signals from pacemaker’s environment All sensors are treated identically –Some require urgent processing

© S. Ramesh / Kavi Arya / Krithi Ramamritham 7 System response function of respective inputs –In general, it depends upon all inputs and –on the history - state dependent Fragile scheme –More sensors - more processing delay Problems

© S. Ramesh / Kavi Arya / Krithi Ramamritham 8 The Most General Scheme Task1 || Task2 || … || Task8 Tasks –Sequential threads –Concurrently executed –can be scheduled and suspended –wait for specific time period or events –communicate with each other

© S. Ramesh / Kavi Arya / Krithi Ramamritham 9 The Most General Scheme Real-time OS (RTOS kernel) –manages the tasks –task communications –timer services –Schedules the tasks for execution using various –scheduling strategies

© S. Ramesh / Kavi Arya / Krithi Ramamritham 10 Problems with RTOS too much time and space overhead more complex design writing and understanding concurrent tasks very difficult race conditions, deadlocks, livelocks Concurrency model is asynchronous No timing guarantees

© S. Ramesh / Kavi Arya / Krithi Ramamritham 11 Problems with RTOS (contd.) priorities, scheduling system behavior highly unpredictable Or building predictable system is very challenging analysis very difficult thorough simulation required

© S. Ramesh / Kavi Arya / Krithi Ramamritham 12 Synchronous Approach A novel Methodology originated from three French groups Through Esterel, Lustre, Signal Basis for Statecharts, stateflow, very successful in application domain –Lustre in SCADE (Telelogic) Aerospatiale - Airbus 340 and 385 ( entirely designed using SCADE tool) Schneider Electric for nuclear plants

© S. Ramesh / Kavi Arya / Krithi Ramamritham 13 Synchronous Approach (contd.) –Esterel Technologies (a recent startup) Rafale bomber (successor of Mirage) by Dassault Aviation TI (DSP Chips), ST Microelectronics (DVD Chips) Intel and Motorola use Esterel tools Cadence Lab. (for HW design) POLIS HW-SW Co-design –SIGNAL Snecma - airplane engines –Statecharts in I-logix Tool Developed for avionics application

© S. Ramesh / Kavi Arya / Krithi Ramamritham 14 Main Features of Synchronous Approach A 3-level architecture 1.Interactive (I/O) interface 2.Reactive Kernel 3.Data Management Each level requires different kinds of processing Separation of concerns Kernel is the most complex

© S. Ramesh / Kavi Arya / Krithi Ramamritham 15 Synchronous Execution Interface acquires inputs and forwards outputs, –interrupt processing, reading sensor values, –conversion of logical and physical I/O Reactive kernel periodically executed –computes logical outputs given logical inputs. –execution is atomic –no change of inputs during execution –Reaction Data Management by conventional sequential functions –called by reactive kernel

© S. Ramesh / Kavi Arya / Krithi Ramamritham 16 Synchrony Hypothesis Reaction is instantaneous Abstraction: reaction time is insignificant compared to the period Reaction is atomic This abstraction is realistic Can be checked - loop free computation

© S. Ramesh / Kavi Arya / Krithi Ramamritham 17 Synchrony Hypothesis Other features: provides rich set of constructs for programming the kernel –Kernel is the most complex part –Interface, Data management programmed in host language

© S. Ramesh / Kavi Arya / Krithi Ramamritham 18 Synchrony Hypothesis (contd.) Multiform notion of time –Time like any other external event –Example: train must stop within 50 meters alarm raised when gas overflow limit reached Kernel compiled into sequential automaton –No tasks and no scheduling overhead –No priorities, no race conditions Predictability is very high –delay 5 sec.; delay 5 sec. = delay 10 sec.

© S. Ramesh / Kavi Arya / Krithi Ramamritham 19 Esterel An imperative language for programming reactive kernels It is a textual language! An Example: Seat-Belt Controller Here is a requirement: " Five seconds after the key is turned on, if the belt has not been fastened, an alarm will beep for five seconds or until the key is turned off "

© S. Ramesh / Kavi Arya / Krithi Ramamritham 20 module belt_control: input reset, key_on, key_off, belt_on, end_5, end_10; output alarm(boolean), start_timer; loop do emit alarm(false); every key_on do do emit start_timer; await end_5; emit alarm(true); await end_10; watching [key_off or belt_on]; emit alarm(false); end watching reset end Esterel Solution

© S. Ramesh / Kavi Arya / Krithi Ramamritham 21 Esterel Solution Structure reflects closely the requirements Constructs are high level –loop, every, watching, emit, await Sounds similar to the informal language phrases But having a precise semantics Easy to see the correctness of solution Nice syntactic structure Compare it with the state machine solution

© S. Ramesh / Kavi Arya / Krithi Ramamritham 22 Behavior of program:

© S. Ramesh / Kavi Arya / Krithi Ramamritham 23 State Machines State machines are flat with no structure Esterel provides rich structure –Large machines difficult to understand Consider the specification: –Emit O as soon as inputs A and B arrive –Reset each time if input R occurs

© S. Ramesh / Kavi Arya / Krithi Ramamritham 24 FSM Implementation:

© S. Ramesh / Kavi Arya / Krithi Ramamritham 25 Esterel Implementation The code more compact than FSM Each signal appears exactly once! Statechart descriptions also more compact module ABRO: input A,B,R; output O; loop do [ await A || await B ]; emit O watching R end end module