Esterel Overview Roberto Passerone ee249 discussion section.

Slides:



Advertisements
Similar presentations
Simulation executable (simv)
Advertisements

Vered Gafni – Formal Development of Real Time Systems 1 Statecharts Semantics.
White Box and Black Box Testing Tor Stålhane. What is White Box testing White box testing is testing where we use the info available from the code of.
Lecture 8: Three-Level Architectures CS 344R: Robotics Benjamin Kuipers.
© S. Ramesh / Kavi Arya / Krithi Ramamritham IT-606 Embedded Systems (Software) S. Ramesh Kavi Arya Krithi Ramamritham KReSIT/ IIT Bombay.
Timed Automata.
1 CENG334 Introduction to Operating Systems Erol Sahin Dept of Computer Eng. Middle East Technical University Ankara, TURKEY URL:
Analyzing and Verifying Esterel Programs Taisook Han , Division of Computer Science, KAIST.
Programming Types of Testing.
CS0004: Introduction to Programming Repetition – Do Loops.
Optimized State Encoding for Esterel Programs Dumitru POTOP-BUTUCARU.
Copyright © 2001 Stephen A. Edwards All rights reserved The Synchronous Language Esterel Prof. Stephen A. Edwards.
5 Mar 001animation check Animation check for on-line presentations Ellen M. Sentovich.
Event Driven Real-Time Programming CHESS Review University of California, Berkeley, USA May 10, 2004 Arkadeb Ghosal Joint work with Marco A. Sanvido, Christoph.
Copyright © 2001 Stephen A. Edwards All rights reserved Research Areas Stephen A. Edwards.
CPSC 668Set 16: Distributed Shared Memory1 CPSC 668 Distributed Algorithms and Systems Fall 2006 Prof. Jennifer Welch.
Concurrency CS 510: Programming Languages David Walker.
Why Behavioral Wait statement Signal Timing Examples of Behavioral Descriptions –ROM.
AR vs. CFSM Abdallah Tabbara. CFSM Overview 4 CFSM has: –a finite state machine part –a data computation part –a locally synchronous behavior transitions.
Modeling and Visualization of CFSM Networks in JavaTime Michael Shilman James Shin Young EE249 Project Presentation December 8, 1998.
Expressing Giotto in xGiotto and related schedulability problems Class Project Presentation Concurrent Models of Computation for Embedded Software University.
Sources Gang Quan Univ. of Notre Dame Finite State Machines.
Mahapatra-A&M-Sprong'021 Co-design Finite State Machines Many slides of this lecture are borrowed from Margarida Jacome.
Einsterel: A Compiled Event-Driven Simulator for Esterel.
Embedded Systems Interrupts C.-Z. Yang Sept.-Dec
A Mystery Esterel –small no type inference, subtyping, … no recursion, functions, … no pointers, malloc, GC, … no complex data structures, libraries,
Sequential Circuit  It is a type of logic circuit whose output depends not only on the present value of its input signals but on the past history of its.
Today’s Lecture Process model –initial & always statements Assignments –Continuous & procedural assignments Timing Control System tasks.
0 Deterministic Replay for Real- time Software Systems Alice Lee Safety, Reliability & Quality Assurance Office JSC, NASA Yann-Hang.
Concurrency: Deadlock and Starvation Chapter 6. Goal and approach Deadlock and starvation Underlying principles Solutions? –Prevention –Detection –Avoidance.
White Box vs. Black Box Testing Tor Stålhane. What is White Box testing White box testing is testing where we use the info available from the code of.
Testing. Definition From the dictionary- the means by which the presence, quality, or genuineness of anything is determined; a means of trial. For software.
- 1 - Embedded Systems - SDL Some general properties of languages 1. Synchronous vs. asynchronous languages Description of several processes in many languages.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
“Software” Esterel Execution (work in progress) Dumitru POTOP-BUTUCARU Ecole des Mines de Paris
Reference: Ian Sommerville, Chap 15  Systems which monitor and control their environment.  Sometimes associated with hardware devices ◦ Sensors: Collect.
IXA 1234 : C++ PROGRAMMING CHAPTER 1. PROGRAMMING LANGUAGE Programming language is a computer program that can solve certain problem / task Keyword: Computer.
Mahapatra-A&M-Fall'001 Co-design Finite State Machines Many slides of this lecture are borrowed from Margarida Jacome.
Controlling Execution Programming Right from the Start with Visual Basic.NET 1/e 8.
Modern VLSI Design 4e: Chapter 8 Copyright  2008 Wayne Wolf Topics Basics of register-transfer design: –data paths and controllers; –ASM charts. Pipelining.
CS101 Computer Programming I Chapter 4 Extra Examples.
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.
Internet Security CSCE 813 Communicating Sequential Processes.
Chapter 7 -1 CHAPTER 7 PROCESS SYNCHRONIZATION CGS Operating System Concepts UCF, Spring 2004.
Introduction to Loops For Loops. Motivation for Using Loops So far, everything we’ve done in MATLAB, you could probably do by hand: Mathematical operations.
Behavioral Modelling - 1. Verilog Behavioral Modelling Behavioral Models represent functionality of the digital hardware. It describes how the circuit.
CE Operating Systems Lecture 2 Low level hardware support for operating systems.
© S. Ramesh / Kavi Arya / Krithi Ramamritham 1 IT-606 Embedded Systems (Software ) S. Ramesh Kavi Arya Krithi Ramamritham KReSIT/ IIT Bombay.
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
CE Operating Systems Lecture 2 Low level hardware support for operating systems.
Modern VLSI Design 3e: Chapter 8 Copyright  1998, 2002 Prentice Hall PTR Topics n Basics of register-transfer design: –data paths and controllers; –ASM.
Classical Control in Quantum Programs Dominique Unruh IAKS, Universität Karlsruhe Founded by the European Project ProSecCo IST
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
55:032 - Intro. to Digital DesignPage 1 VHDL and Processes Defining Sequential Circuit Behavior.
 Simulation enables the study of complex system.  Simulation is a good approach when analytic study of a system is not possible or very complex.  Informational,
14 Compilers, Interpreters and Debuggers
HDL simulation and Synthesis (Marks16)
Clocks A clock is a free-running signal with a cycle time.
Copyright © Cengage Learning. All rights reserved.
Esterel By: Sam Weinberg.
What Are They? Who Needs ‘em? An Example: Scoring in Tennis
Concurrent Models of Computation
Tonga Institute of Higher Education IT 141: Information Systems
Tonga Institute of Higher Education IT 141: Information Systems
Applications of Stacks and Queues
Basic Concepts of Algorithm
Esterel Tutorial Winter 2004
How to allow the program to know when to stop a loop.
Presentation transcript:

Esterel Overview Roberto Passerone ee249 discussion section

June 15, 2015Esterel notes2 Classes of applications Transformational Interactive Reactive

June 15, 2015Esterel notes3 Model of Time Totally ordered sequence of instants Instants are also called ticks There is nothing in between instants

June 15, 2015Esterel notes4 Esterel Esterel is a reactive programming language Esterel is also a Synchronous language Everything proceeds in lock-step

June 15, 2015Esterel notes5 You might hear that... In Esterel computation takes zero time Communication also takes zero time In other words, reactions to events are instantaneous

June 15, 2015Esterel notes6 Model of Execution There is a set of events E We have a sequence of instants For each instant a subset of the events in E is present Hence the execution is a totally ordered sequence of events

June 15, 2015Esterel notes7 Model of a System The System implicitly represents the execution The System is a collection of processes executing concurrently Processes are placed in parallel using the parallel operator ||

June 15, 2015Esterel notes8 Interaction of Processes Processes interact by through signals that carry events Events in signals can be either Present or Absent Processes do NOT interact through shared variables

June 15, 2015Esterel notes9 Checking for presence Processes can test for the presence or absence of events in signals –present A then … else...

June 15, 2015Esterel notes10 Awaiting an event Processes can stop their execution until an event is present in a signal –await A; –await [ A or B ]

June 15, 2015Esterel notes11 Emitting an event Processes can emit an event to a signal to make it present –emit A –emit A, 10

June 15, 2015Esterel notes12 Execution of the System Input events are posted for the current instant The System reacts to the input event in the current instant The System posts the output events for the current instant Only at this point does the instant increment

June 15, 2015Esterel notes13 When things occur present tests the presence of signals in the current reaction await stops the execution for the current reaction, until at least the next instant emit emits the event during the current reaction

June 15, 2015Esterel notes14 Important There is no ordering of events within a reaction All events present during a reaction occur at the same exact time (instant) Hence when executing a present: –if the signal is present continue with the “then” –if absent, must wait until it either becomes present or can prove it will not be emitted during the current reaction

June 15, 2015Esterel notes15 Atomicity of reaction The triple (input, reaction, output) is executed atomically –Atomic means that others cannot observe the intermediate steps. It is not necessarily instantaneous –Intermediate steps are only necessary to compute the overall reaction –All goes as if the computation took zero time –There are micro-steps: they converge to a fixed point

June 15, 2015Esterel notes16 How to execute Start with the input events present Activate all processes awaiting a present event If events are emitted, activate processes that may be waiting If presence is tested, wait until you know the outcome Stop a process when it reaches an await

June 15, 2015Esterel notes17 Compiling Esterel The interpreter does the previous procedure –might have to look ahead The compiler computes the reaction for all possible patterns of events –it constructs a finite automaton –construction similar to the derivative construction

June 15, 2015Esterel notes18 Causality Problems A reaction ends when all processes arrive at an await What if you never hit one? –Loop – emit A; – X = X + 1; –end loop Same as combinational loops in hardware

June 15, 2015Esterel notes19 The fixed point may not exist There are no solutions –present X then nothing else emit X; There are too many solutions –present X then emit X end;

June 15, 2015Esterel notes20 Esterel supports exceptions Useful to jump out of a fragment of code Abort when an event occurs –abort – code –when A;

June 15, 2015Esterel notes21 Seat-belt If the driver turns on the key, and does not fasten the seat belt within 5 seconds then an alarm beeps for 5 seconds, or until the driver fastens the seat belt, or until the driver turns off the key If the driver turns on the key, and does not fasten the seat belt within 5 seconds then an alarm beeps for 5 seconds, or until the driver fastens the seat belt, or until the driver turns off the key present KEY_ON then input KEY_ON If the driver turns on the key, and does not fasten the seat belt within 5 seconds then an alarm beeps for 5 seconds, or until the driver fastens the seat belt, or until the driver turns off the key emit START_TIMER(5); await END_TIMER;, END_TIMER output START_ TIMER emit START_TIMER(5); abort sustain BEEP when END_TIMER; end abort when KEY_OFF or BELT_ON If the driver turns on the key, and does not fasten the seat belt within 5 seconds then an alarm beeps for 5 seconds, or until the driver fastens the seat belt, or until the driver turns off the key If the driver turns on the key, and does not fasten the seat belt within 5 seconds then an alarm beeps for 5 seconds, or until the driver fastens the seat belt, or until the driver turns off the key, KEY_OFF, BELT_ON, BEEP; loop each RESET, RESET;

June 15, 2015Esterel notes22 You can run examples Compile with -simul to run textual simulation Use xes for graphical debugging If we have time we can look at a simple example

June 15, 2015Esterel notes23 Immediate reactions Alternative formulation of await It doesn’t wait until the next reaction if the signal is present Often creates causality problems –loop – await immediate A – X = X + 1; –end loop