An introduction to Esterel and its compilation

Slides:



Advertisements
Similar presentations
Embedded System, A Brief Introduction
Advertisements

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.
ECOE 560 Design Methodologies and Tools for Software/Hardware Systems Spring 2004 Serdar Taşıran.
High Level Languages: A Comparison By Joel Best. 2 Sources The Challenges of Synthesizing Hardware from C-Like Languages  by Stephen A. Edwards High-Level.
© S. Ramesh / Kavi Arya / Krithi Ramamritham IT-606 Embedded Systems (Software) S. Ramesh Kavi Arya Krithi Ramamritham KReSIT/ IIT Bombay.
SpecC and SpecCharts Reviewed and Presented by Heemin Park and Eric Kwan EE202A - Fall 2001 Professor Mani Srivastava.
Optimizations for Faster Simulation of Esterel Programs Dumitru POTOP-BUTUCARU Advisers: Gérard Berry – Esterel Technologies Robert de Simone – INRIA,
Analyzing and Verifying Esterel Programs Taisook Han , Division of Computer Science, KAIST.
Syntax-driven partitioning for model-checking of Esterel programs Eric Vecchié - INRIA Aoste.
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.
Weakly endochronous systems Dumitru Potop-Butucaru IRISA, France Joint work with A. Benveniste and B. Caillaud.
Synchron’08 Jean-François LE TALLEC INRIA SOP lab, AOSTE INRIA SOP lab, EPI AOSTE ScaleoChip Company SoC Conception Methodology.
Requirements on the Execution of Kahn Process Networks Marc Geilen and Twan Basten 11 April 2003 /e.
Syntax-driven partitioning for model-checking of Esterel programs Eric Vecchié - INRIA Tick.
PTIDES: Programming Temporally Integrated Distributed Embedded Systems Yang Zhao, EECS, UC Berkeley Edward A. Lee, EECS, UC Berkeley Jie Liu, Microsoft.
Implementing Constructive Synchronous Programs on POLIS CFSM Networks G.Berry E.Sentovich Ecole des Mines de Paris / INRIA Cadence Berkeley Labs.
Copyright © 2001 Stephen A. Edwards All rights reserved Research Areas Stephen A. Edwards.
Scheduling for Embedded Real-Time Systems Amit Mahajan and Haibo.
Esterel Overview Roberto Passerone ee249 discussion section.
Behavioral Design Outline –Design Specification –Behavioral Design –Behavioral Specification –Hardware Description Languages –Behavioral Simulation –Behavioral.
Mahapatra-Texas A&M-Fall'001 cosynthesis Introduction to cosynthesis Rabi Mahapatra CPSC498.
Review of “Embedded Software” by E.A. Lee Katherine Barrow Vladimir Jakobac.
Copyright © 2006 Addison-Wesley. All rights reserved.1-1 ICS 410: Programming Languages Chapter 3 : Describing Syntax and Semantics Operational Semantics.
Design of Fault Tolerant Data Flow in Ptolemy II Mark McKelvin EE290 N, Fall 2004 Final Project.
Models of Computation for Embedded System Design Alvise Bonivento.
Compiling Esterel into Static Discrete-Event Code Stephen A. Edwards Columbia University Computer Science Department New York, USA
Copyright © 2001 Stephen A. Edwards All rights reserved Esterel and Other Projects Prof. Stephen A. Edwards Columbia University, New York
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.
Introduction & Overview CS4533 from Cooper & Torczon.
A Mystery Esterel –small no type inference, subtyping, … no recursion, functions, … no pointers, malloc, GC, … no complex data structures, libraries,
Copyright © 2001 Stephen A. Edwards All rights reserved ESUIF: An Open Esterel Compiler Stephen A. Edwards Department of Computer Science Columbia University,
1 Correct and efficient implementations of synchronous models on asynchronous execution platforms Stavros Tripakis UC Berkeley and Verimag EC^2 Workshop,
© Egon Börger: Clock and Stopwatch ASM 1 Illustrating the ASM Function Classification A real-time CLOCK: –Monitored: CurrTime: Real (supposed to be increasing.
02/06/05 “Investigating a Finite–State Machine Notation for Discrete–Event Systems” Nikolay Stoimenov.
Ch.2 Part A: Requirements, State Charts EECE **** Embedded System Design.
Course Outline DayContents Day 1 Introduction Motivation, definitions, properties of embedded systems, outline of the current course How to specify embedded.
Compiling ESTEREL circuits into finite states machines BRES Yannis Stage de DEA d’Informatique 1998/1999.
An Introduction Chapter Chapter 1 Introduction2 Computer Systems  Programmable machines  Hardware + Software (program) HardwareProgram.
Voicu Groza, 2008 SITE, HARDWARE/SOFTWARE CODESIGN OF EMBEDDED SYSTEMS Hardware/Software Codesign of Embedded Systems Voicu Groza SITE Hall, Room.
CAD Techniques for IP-Based and System-On-Chip Designs Allen C.-H. Wu Department of Computer Science Tsing Hua University Hsinchu, Taiwan, R.O.C {
ASIC/FPGA design flow. FPGA Design Flow Detailed (RTL) Design Detailed (RTL) Design Ideas (Specifications) Design Ideas (Specifications) Device Programming.
Programming Models & Runtime Systems Breakout Report MICS PI Meeting, June 27, 2002.
Real-Time Operating Systems for Embedded Computing 李姿宜 R ,06,10.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
“Software” Esterel Execution (work in progress) Dumitru POTOP-BUTUCARU Ecole des Mines de Paris
Mahapatra-A&M-Fall'001 Co-design Finite State Machines Many slides of this lecture are borrowed from Margarida Jacome.
C. André, J. Boucaron, A. Coadou, J. DeAntoni,
Correct-by-construction asynchronous implementation of modular synchronous specifications Jacky Potop Benoît Caillaud Albert Benveniste IRISA, France.
© S. Ramesh / Kavi Arya / Krithi Ramamritham 1 IT-606 Embedded Systems (Software) S. Ramesh Kavi Arya Krithi Ramamritham KReSIT/ IIT Bombay.
Desynchronization and distributed deployment of synchronous systems Albert Benveniste – Inria 2002.
ECE-C662 Lecture 2 Prawat Nagvajara
© S. Ramesh / Kavi Arya / Krithi Ramamritham 1 IT-606 Embedded Systems (Software ) S. Ramesh Kavi Arya Krithi Ramamritham KReSIT/ IIT Bombay.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Linear Analysis and Optimization of Stream Programs Masterworks Presentation Andrew A. Lamb 4/30/2003 Professor Saman Amarasinghe MIT Laboratory for Computer.
T imed Languages for Embedded Software Ethan Jackson Advisor: Dr. Janos Szitpanovits Institute for Software Integrated Systems Vanderbilt University.
CoDeveloper Overview Updated February 19, Introducing CoDeveloper™  Targeting hardware/software programmable platforms  Target platforms feature.
Presenter: Yi-Ting Chung Fast and Scalable Hybrid Functional Verification and Debug with Dynamically Reconfigurable Co- simulation.
Chapter 1 Introduction.
Chapter 1 Introduction.
Esterel By: Sam Weinberg.
Gabor Madl Ph.D. Candidate, UC Irvine Advisor: Nikil Dutt
Hardware/Software Codesign Representation Models
ECE-C662 Introduction to Behavioral Synthesis Knapp Text Ch
Optimizations for Faster Execution of Esterel Programs
Mark McKelvin EE249 Embedded System Design December 03, 2002
State Abstraction Techniques for the Verification of Reactive Circuits
Presentation transcript:

An introduction to Esterel and its compilation Dumitru Potop, fresh PhD

Outline (Long) Introduction Esterel Esterel translation schemes Embedded systems, Reactive systems, Synchronous paradigm Esterel Syntax and intuitive semantics Esterel translation schemes Automata-based Circuit-based “Simulation”-based

Embedded systems Airplanes, cars, phones, washing machines, video cameras contain computers! Complex, custom hardware/software architectures Specific problems in their development: Specification, due to interdisciplinarity Specific languages, methods Compilation Implementations must fit tight specifications Joint development of hardware and software Insuring correctness, fault tolerance, and robustness (expensive bugs)

Reactive systems (Harel, 1987) Emphasis on communication and control React to input events with appropriate output events, according to the state Examples: digital circuits, man-machine interfaces, communication protocols state … Inputs … Outputs

Synchronous paradigm Cycle-based execution model, global clock Perfect synchrony Causality Input event Output event computation memory

Synchronous paradigm Synchrony = abstraction of the real world: Natural in circuits Advantages: clear semantics, codesign, verification methods Problem: combining circuit semantics with a higher-level description style time Execution instants

Synchronous languages Esterel (Berry et al.), ECL Structural imperative (Ada-like) style Fit for control-dominated parts Lustre (Halbwachs et al.), Signal (LeGuernic et al) Dataflow networks Circuit-like, low-level Argos (Maranichi), SyncCharts (André) Visual Statecharts-like formalisms

The Esterel language Structural imperative style Basic constructs Intuitive, modular Basic constructs Classical control flow: p;q, p||q, loop p end Preemption:abort p when S, suspend p when S Exception handling: trap T in p end, exit T Division into instants: pause, await S Signals: signal S in p end, emit S, present S then p else q end

The Esterel language Example 1: loop [ await A || await B ]; emit O; halt every R

The Esterel language Example 2: signal S in await I ; emit S || await S ; emit O end signal

The Esterel language Constructive causality Correct causality cycles Instantaneous reaction to signal absence (analysis of not yet executed code) causality cycle signal S,T in emit S; present T then present S else emit T end end; end break the cycle

Old translation schemes Automata translation Fast, large code 1 2 3 loop [ await A || await B ]; emit O; halt every R 4 switch(state){ case 0: state=1; break; case 1: if(!R)if(A)if(B) {O=1;state=4;} else state=2; else if(B)state=3;break; case 2: if(R)state=1; else if(B){O=1;state=4;} break; case 3: if(R)state=1; else if(A){O=1;state=4;} break; case 4: if(R)state=1;break; }

Old translation schemes Circuit translation Slow, small code R O loop [ await A || await B ]; emit O; halt every R boot B RESET = R & !BOOT A_TRIGGER = A_OUT & !RESET A_THEN = A_TRIGGER & A A_ELSE = A_TRIGGER & !A A_TERM = A_THEN | ! A_TRIGGER A_IN = BOOT | RESET | A_ELSE B_TRIGGER = B_OUT & !RESET B_THEN = B_TRIGGER & B B_ELSE = B_TRIGGER & !B B_TERM = B_THEN | ! B_TRIGGER B_IN = BOOT | RESET | B_ELSE ACTIVE = A_TRIGGER | B_TRIGGER O = A_TERM & B_TERM & ACTIVE

Old translation schemes Direct semantic simulation (Edwards, Bertin) Fast, small code through static scheduling Restrict the class of accepted programs Resume: if(R) goto Start ; else if (A_active | B_active) { if (A_active & A) { A_active=0 ; } if (B_active & B) { B_active=0 ; } if (!(A_active | B_active)) { emit O ; } goto Out; Start: A_active=1 ; B_active=1 ; Out: loop [ await A || await B ]; emit O; halt every R

Old translation schemes Semantically complete Efficient code Intermediate model Explicit FSM Circuits ? Expensive, slow General Cheap, fast General* Cheap, fast Only “acyclic” programs Compiling method Bisimulation (fc2tools) RTL optimizations (SIS) Classical control-flow optimizations Optimization Generated code (without optim.) Very large, Very fast Small Slow Very small Very fast Semantics (acyclic=?) Less powerful optim. Problems Do not scale up well *=sccausal or slow simulation

What I wanted How Formalize the efficient approach Generate efficient code for “good” programs Generate code for all programs Understand cyclicity at a higher level Inexpensive optimizations based on static analysis Formalize the efficient approach New intermediate format/model (GRC) Hierarchical state representation Control-flow graph No specific encoding How

GRC format – a small example 1 boot: loop [ await A;emit B || await B ]; emit O; halt every R # 4 await A 3 || await B 2 5 # loop-every halt 6 enter 4 Empty boxes = program operations. Blue = state representation, encoding, and decoding Entered in order, exited in reverse order State representation = skeleton, flowgraph = muscles and nerves, influencing one another Flowgraph = unrolling of the Esterel source. Skeleton = static information repository. Boot = generated, technical detail exit 1 enter 2 enter 3 enter 5 [1] exit 2 Inactive[4] [2] R 4 exit 4 emit B K0[4] K0 exit 3 emit O enter 6 A K1[4] K1 Inactive[5] [3] 5 exit 5 K0[5] 2 B [6] K1[5]

GRC format – utility Supports the full Esterel semantics Analysis and optimization at GRC code level Supports optimized encoding and scheduling algorithms

Conclusion A very brief introduction to Esterel, its compilation, and my work During my PhD: New Esterel semantics Intermediate model for Esterel programs Static analysis and optimization at this level General code generation scheme The best compiler yet

Past Future PhD at Ecole des Mines de Paris, with Gérard Berry Complete the work started during the PhD Investigate aspects related to code distribution (Benveniste et al.) Future

Results Prototype compiler (acyclic case) Examples: Turbo channel bus Berry’s wristwatch Video generator Shock absorber Operating system model Avionics fuel controller Avionics cockpit Man-machine interface Test configuration: PIII/1GHz/128M/Linux gcc-2.96 –O, 1Mcycle random or given