Optimizations for Faster Simulation of Esterel Programs Dumitru POTOP-BUTUCARU Advisers: Gérard Berry – Esterel Technologies Robert de Simone – INRIA,

Slides:



Advertisements
Similar presentations
1 Title Page Implicit and Explicit Reachable State Space Exploration Of Esterel Logical Circuits Advisor :
Advertisements

A Program Transformation For Faster Goal-Directed Search Akash Lal, Shaz Qadeer Microsoft Research.
Software & Services Group, Developer Products Division Copyright© 2010, Intel Corporation. All rights reserved. *Other brands and names are the property.
© S. Ramesh / Kavi Arya / Krithi Ramamritham IT-606 Embedded Systems (Software) S. Ramesh Kavi Arya Krithi Ramamritham KReSIT/ IIT Bombay.
Ch. 7 Process Synchronization (1/2) I Background F Producer - Consumer process :  Compiler, Assembler, Loader, · · · · · · F Bounded buffer.
Transaction Based Modeling and Verification of Hardware Protocols Xiaofang Chen, Steven M. German and Ganesh Gopalakrishnan Supported in part by Intel.
Analyzing and Verifying Esterel Programs Taisook Han , Division of Computer Science, KAIST.
ESP: A Language for Programmable Devices Sanjeev Kumar, Yitzhak Mandelbaum, Xiang Yu, Kai Li Princeton University.
1 Implicit and explicit exploration of the reachable state space of Esterel logical circuits December 12 th, 2002 Yannis BRES Advisor: Gérard BERRY PhD.
Syntax-driven partitioning for model-checking of Esterel programs Eric Vecchié - INRIA Aoste.
AUTOMATIC GENERATION OF CODE OPTIMIZERS FROM FORMAL SPECIFICATIONS Vineeth Kumar Paleri Regional Engineering College, calicut Kerala, India. (Currently,
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.
Synchron’08 Jean-François LE TALLEC INRIA SOP lab, AOSTE INRIA SOP lab, EPI AOSTE ScaleoChip Company SoC Conception Methodology.
Background information Formal verification methods based on theorem proving techniques and model­checking –to prove the absence of errors (in the formal.
Syntax-driven partitioning for model-checking of Esterel programs Eric Vecchié - INRIA Tick.
© Janice Regan Problem-Solving Process 1. State the Problem (Problem Specification) 2. Analyze the problem: outline solution requirements and design.
SSP Re-hosting System Development: CLBM Overview and Module Recognition SSP Team Department of ECE Stevens Institute of Technology Presented by Hongbing.
2/11/2010 BEARS 2010 On PTIDES Programming Model John Eidson Jeff C. Jensen Edward A. Lee Slobodan Matic Jia Zou PtidyOS.
Implementing Constructive Synchronous Programs on POLIS CFSM Networks G.Berry E.Sentovich Ecole des Mines de Paris / INRIA Cadence Berkeley Labs.
Intermediate Representations Copyright 2003, Keith D. Cooper, Ken Kennedy & Linda Torczon, all rights reserved. Students enrolled in Comp 412 at Rice University.
7th Biennial Ptolemy Miniconference Berkeley, CA February 13, 2007 Leveraging Synchronous Language Principles for Hybrid System Models Haiyang Zheng and.
Copyright © 2001 Stephen A. Edwards All rights reserved Research Areas Stephen A. Edwards.
Esterel Overview Roberto Passerone ee249 discussion section.
1 Semantic Processing. 2 Contents Introduction Introduction A Simple Compiler A Simple Compiler Scanning – Theory and Practice Scanning – Theory and Practice.
1 Intermediate representation Goals: –encode knowledge about the program –facilitate analysis –facilitate retargeting –facilitate optimization scanning.
A High Performance Application Representation for Reconfigurable Systems Wenrui GongGang WangRyan Kastner Department of Electrical and Computer Engineering.
Chair of Software Engineering Fundamentals of Program Analysis Dr. Manuel Oriol.
Design of Fault Tolerant Data Flow in Ptolemy II Mark McKelvin EE290 N, Fall 2004 Final Project.
Partial Order Reduction for Scalable Testing of SystemC TLM Designs Sudipta Kundu, University of California, San Diego Malay Ganai, NEC Laboratories America.
Validating High-Level Synthesis Sudipta Kundu, Sorin Lerner, Rajesh Gupta Department of Computer Science and Engineering, University of California, San.
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
Chapter 3 Program translation1 Chapt. 3 Language Translation Syntax and Semantics Translation phases Formal translation models.
Copyright © 2001 Stephen A. Edwards All rights reserved Esterel and Other Projects Prof. Stephen A. Edwards Columbia University, New York
Einsterel: A Compiled Event-Driven Simulator for Esterel.
Comparing Models of Computation for Real-time, Distributed Control Systems Shawn Schaffert Bruno Sinopoli.
Formal verification Marco A. Peña Universitat Politècnica de Catalunya.
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,
Compiling ESTEREL circuits into finite states machines BRES Yannis Stage de DEA d’Informatique 1998/1999.
Compositional correctness of IP-based system design: Translating C/C++ Models into SIGNAL Processes Rennes, November 04, 2005 Hamoudi Kalla and Jean-Pierre.
Optimization software for apeNEXT Max Lukyanov,  apeNEXT : a VLIW architecture  Optimization basics  Software optimizer for apeNEXT  Current.
Research in Compilers and How it Relates to Software Engineering Part I: Compiler Research Tomofumi Yuki EJCP 2015 June 22, Nancy.
1 of 14 1/15 Synthesis-driven Derivation of Process Graphs from Functional Blocks for Time-Triggered Embedded Systems Master thesis Student: Ghennadii.
An introduction to Esterel and its compilation
“Software” Esterel Execution (work in progress) Dumitru POTOP-BUTUCARU Ecole des Mines de Paris
Introduction to Problem Solving. Steps in Programming A Very Simplified Picture –Problem Definition & Analysis – High Level Strategy for a solution –Arriving.
Compressed Abstract Syntax Trees as Mobile Code Christian H. Stork Vivek Haldar University of California, Irvine.
© S. Ramesh / Kavi Arya / Krithi Ramamritham 1 IT-606 Embedded Systems (Software) S. Ramesh Kavi Arya Krithi Ramamritham KReSIT/ IIT Bombay.
Modeling VHDL in POSE. Overview Motivation Motivation Quick Introduction to VHDL Quick Introduction to VHDL Mapping VHDL to POSE (the Translator) Mapping.
Algorithms & FlowchartsLecture 10. Algorithm’s CONCEPT.
Compiler Introduction 1 Kavita Patel. Outlines 2  1.1 What Do Compilers Do?  1.2 The Structure of a Compiler  1.3 Compilation Process  1.4 Phases.
Verification & Validation By: Amir Masoud Gharehbaghi
1 Control Flow Analysis Topic today Representation and Analysis Paper (Sections 1, 2) For next class: Read Representation and Analysis Paper (Section 3)
Hy-C A Compiler Retargetable for Single-Chip Heterogeneous Multiprocessors Philip Sweany 8/27/2010.
Formal Verification. Background Information Formal verification methods based on theorem proving techniques and model­checking –To prove the absence of.
C H A P T E R T W O Linking Syntax And Semantics Programming Languages – Principles and Paradigms by Allen Tucker, Robert Noonan.
Overview of Compilation Prepared by Manuel E. Bermúdez, Ph.D. Associate Professor University of Florida Programming Language Principles Lecture 2.
1 Compiler Construction (CS-636) Muhammad Bilal Bashir UIIT, Rawalpindi.
Program Analysis and Verification Spring 2015 Program Analysis and Verification Lecture 8: Static Analysis II Roman Manevich Ben-Gurion University.
©SoftMoore ConsultingSlide 1 Code Optimization. ©SoftMoore ConsultingSlide 2 Code Optimization Code generation techniques and transformations that result.
Optimization Code Optimization ©SoftMoore Consulting.
Lecture 1 Runtime environments.
Logical architecture refinement
Intermediate Representations
Intermediate Representations
Optimizations for Faster Execution of Esterel Programs
Lecture 1 Runtime environments.
State Abstraction Techniques for the Verification of Reactive Circuits
Presentation transcript:

Optimizations for Faster Simulation of Esterel Programs Dumitru POTOP-BUTUCARU Advisers: Gérard Berry – Esterel Technologies Robert de Simone – INRIA, project TICK PhD Thesis Defense, 26 November 2002, Agelonde, France

Part 1: Why? –Background –Motivation Part 2: How? –Presentation of the work –Results and conclusion

Two compilation trends 1.Semantic completeness Formal semantics (Esterel v5) Formal models (automata, circuits) Formal analysis and optimization methods Efficiency issues (do not scale up well) 2.Efficient simulation Custom intermediate formats Scale up well Semantic issues

Structural imperative style Why? Because of Esterel properties loop [ await A;emit B || await B ]; emit O; halt every R if(BOOT){A_active=1;B_active=1;} else { if(R){A_active=1;B_active=1;} else if(A_active|B_active) { if(A_active) if(A) {A_active=0;B=1;} if(B_active) if(B) B_active=0; if(!(A_active|B_active)) O=1; } –Esterel source = control-flow specification well-structured code control-flow optimizations –But…

Why? Because of Esterel properties Constructive causality –Correct causality cycles –Instantaneous reaction to signal absence (analysis of not yet executed code) –Solution: Translate into a formal mathematical model –But: Loss of efficiency signal S,T in emit S; present T then present S else emit T end end; end causality cycle break the cycle

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

What we want 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 Means

Part II - Outline The GRC format –Definition (small example) –Code generation for “acyclic” GRC specifications State encoding Scheduling Static analysis for optimizations Cyclic specifications –What “cyclic” means? Implementation and benchmarks Conclusion

[2] [3] 0 [1] enter 5 enter 4 enter 3enter 2exit 1 2 enter 6 exit 3 K0 Inactive[4] R exit 2 4 A exit 4 K0[4] K1[4] Inactive[5] 5 B exit 5 K0[5] K1[5] [6] K1 emit O # || boot: await A await B halt loop-every # loop [ await A;emit B || await B ]; emit O; halt every R GRC format – a small example emit B

loop [ await A;emit B || await B ]; emit O; halt every R # || boot: await A await B halt loop-every # GRC format – a small example selection tree = parallel/exclusive abstraction of the syntax tree The nodes represent the activation of various statements

» loop [ await A;emit B || await B ]; emit O; halt every R # || boot: await A await B halt loop-every # Initial state GRC format – a small example

loop [ await A;emit B || await B ]; emit O; halt every R # || boot: await A await B halt loop-every # After the first reaction – waiting for A and B GRC format – a small example

loop [ await A;emit B || await B ]; emit O; halt every R # || boot: await A await B halt loop-every # B has been received. Waiting for A GRC format – a small example

loop [ await A;emit B || await B ]; emit O; halt every R # || boot: await A await B halt loop-every # A has been received. Halted GRC format – a small example

loop [ await A;emit B || await B ]; emit O; halt every R # || boot: await A await B halt loop-every # Program reset after R has been received GRC format – a small example

[2] [3] 0 [1] enter 5 enter 4 enter 3enter 2exit 1 2 enter 6 exit 3 K0 Inactive[4] R exit 2 4 A exit 4 K0[4] K1[4] Inactive[5] 5 B exit 5 K0[5] K1[5] [6] K1 emit O # || boot: await A await B halt loop-every # loop [ await A;emit B || await B ]; emit O; halt every R emit B GRC format – a small example

[2] [3] 0 [1] enter 5 enter 4 enter 3enter 2exit 1 2 R exit 2 4 A exit 4 5 B exit 5 [6] # || boot: await A await B halt loop-every # loop [ await A;emit B || await B ]; emit O; halt every R R absent, A present enter 6 exit 3 K0 Inactive[4] K0[4] K1[4] Inactive[5] K0[5] K1[5] K1 emit O emit B GRC format – a small example

[2] [3] 0 [1] enter 5 enter 4 enter 3enter 2exit 1 2 R exit 2 4 A exit 4 5 B exit 5 [6] # || boot: await A await B halt loop-every # loop [ await A;emit B || await B ]; emit O; halt every R R absent, A present enter 6 exit 3 K0 Inactive[4] K0[4] K1[4] Inactive[5] K0[5] K1[5] K1 emit O emit B GRC format – a small example

[2] [3] 0 [1] enter 5 enter 4 enter 3enter 2exit 1 2 R exit 2 4 A exit 4 5 B exit 5 [6] # || boot: await A await B halt loop-every # loop [ await A;emit B || await B ]; emit O; halt every R R absent, A present enter 6 exit 3 K0 Inactive[4] K0[4] K1[4] Inactive[5] K0[5] K1[5] K1 emit O emit B GRC format – a small example

[2] [3] 0 [1] enter 5 enter 4 enter 3enter 2exit 1 2 R exit 2 4 A exit 4 5 B exit 5 [6] # || boot: await A await B halt loop-every # loop [ await A;emit B || await B ]; emit O; halt every R R absent, A present enter 6 exit 3 K0 Inactive[4] K0[4] K1[4] Inactive[5] K0[5] K1[5] K1 emit O emit B GRC format – a small example

[2] [3] 0 [1] enter 5 enter 4 enter 3enter 2exit 1 2 R exit 2 4 A exit 4 5 B exit 5 [6] # || boot: await A await B halt loop-every # loop [ await A;emit B || await B ]; emit O; halt every R R absent, A present enter 6 exit 3 K0 Inactive[4] K0[4] K1[4] Inactive[5] K0[5] K1[5] K1 emit O emit B GRC format – a small example

[2] [3] 0 [1] enter 5 enter 4 enter 3enter 2exit 1 2 R exit 2 4 A exit 4 5 B exit 5 [6] # || boot: await A await B halt loop-every # loop [ await A;emit B || await B ]; emit O; halt every R R absent, A present enter 6 exit 3 K0 Inactive[4] K0[4] K1[4] Inactive[5] K0[5] K1[5] K1 emit O emit B GRC format – a small example

[2] [3] 0 [1] enter 5 enter 4 enter 3enter 2exit 1 2 R exit 2 4 A exit 4 5 B exit 5 [6] # || boot: await A await B halt loop-every # loop [ await A;emit B || await B ]; emit O; halt every R R absent, A present enter 6 exit 3 K0 Inactive[4] K0[4] K1[4] Inactive[5] K0[5] K1[5] K1 emit O emit B GRC format – a small example

[2] [3] 0 [1] enter 5 enter 4 enter 3enter 2exit 1 2 R exit 2 4 A exit 4 5 B exit 5 [6] # || boot: await A await B halt loop-every # loop [ await A;emit B || await B ]; emit O; halt every R R absent, A present enter 6 exit 3 K0 Inactive[4] K0[4] K1[4] Inactive[5] K0[5] K1[5] K1 emit O emit B GRC format – a small example

[2] [3] 0 [1] enter 5 enter 4 enter 3enter 2exit 1 2 R exit 2 4 A exit 4 5 B exit 5 [6] # || boot: await A await B halt loop-every # loop [ await A;emit B || await B ]; emit O; halt every R R absent, A present enter 6 exit 3 K0 Inactive[4] K0[4] K1[4] Inactive[5] K0[5] K1[5] K1 emit O emit B GRC format – a small example

Code generation – acyclic case “Good programs” => acyclic GRC flowgraphs Code generation for acyclic specifications –State encoding Software-specific Bitwise Hierarchic –Static scheduling Respects the causality

– boot instant – « await A » active, « await B » completed – « await A » active, « await B » active – « halt » active – program terminated # || boot: # await A await B loop-every XXX XX 0XXXX State encoding Bit index: States: halt Code generation – acyclic case

# || boot: # await A await B loop-every State encoding halt [2] [3] 0 [1] enter 5 enter 4 enter 3enter 2exit 1 2 enter 6 exit 3 K0 Inactive[4] R exit 2 4 A exit 4 K0[4] K1[4] Inactive[5] 5 B exit 5 K0[5] K1[5] [6] K1 emit O Code generation – acyclic case emit B

# || boot: # await A await B loop-every State encoding halt enter 5 enter 4 enter 3enter 2exit 1 enter 6 exit 3 K0 Inactive[4] R exit 2 4 A exit 4 K0[4] K1[4] Inactive[5] 5 B exit 5 K0[5] K1[5] K1 emit O S[1] S[2] Code generation – acyclic case emit B

# || boot: # await A await B loop-every State encoding halt enter 5 enter 4 enter 3enter 2exit 1 enter 6 exit 3 K0 Inactive[4] R exit 2 A exit 4 K0[4] K1[4] Inactive[5] B exit 5 K0[5] K1[5] K1 emit O S[1] S[2] S[3] S[4] Code generation – acyclic case emit B

# || boot: # await A await B loop-every State encoding halt S[4]=1 S[3]=1 S[2]=0S[1]=1exit 1 S[2]=1 exit 3 K0 Inactive[4] R exit 2 A exit 4 K0[4] K1[4] Inactive[5] B exit 5 K0[5] K1[5] K1 emit O S[1] S[2] S[3] S[4] Code generation – acyclic case emit B

# || boot: # await A await B loop-every State encoding halt S[4]=1 S[3]=1 S[2]=0S[1]=1 S[2]=1 K0 Inactive[4] R A S[3]=0 K0[4] K1[4] Inactive[5] B S[4]=0 K0[5] K1[5] K1 emit O S[1] S[2] S[3] S[4] Code generation – acyclic case emit B

# || boot: # await A await B loop-every State encoding halt S[4]=1 S[3]=1 S[2]=0S[1]=1 S[2]=1 K0 Inactive[4] R A S[3]=0 K0[4] K1[4] Inactive[5] B S[4]=0 K0[5] K1[5] K1 emit O S[1] S[2] S[3] S[4] Code generation – acyclic case emit B

# || boot: # await A await B loop-every State encoding halt K0 Inactive[4] R A S[3]=0 K0[4] K1[4] Inactive[5] B S[4]=0 K0[5] K1[5] K1 emit O S[1] S[2] S[3] S[4] S[1..4]=1011 S[2]= Code generation – acyclic case emit B

K0 Inactive[4] R A S[3]=0 K0[4] K1[4] Inactive[5] B S[4]=0 K0[5] K1[5] K1 emit O S[1] S[2] S[3] S[4] S[1..4]=1011 S[2]=1 Static scheduling Code generation – acyclic case emit B if(S[1]){ } else { }

K0 Inactive[4] R A S[3]=0 K0[4] K1[4] Inactive[5] B S[4]=0 K0[5] K1[5] K1 emit O S[1] S[2] S[3] S[4] S[1..4]=1011 S[2]=1 Static scheduling Code generation – acyclic case emit B if(S[1]){ if(R){ } else { } } else { }

K0 Inactive[4] R A S[3]=0 K0[4] K1[4] Inactive[5] B S[4]=0 K0[5] K1[5] K1 emit O S[1] S[2] S[3] S[4] S[1..4]=1011 S[2]=1 Static scheduling Code generation – acyclic case emit B bool aux=0; if(S[1]){ if(R){aux=1;} else { } } else {aux=1;} if(aux){ }

K0 Inactive[4] R A S[3]=0 K0[4] K1[4] Inactive[5] B S[4]=0 K0[5] K1[5] K1 emit O S[1] S[2] S[3] S[4] S[1..4]=1011 S[2]=1 Static scheduling Code generation – acyclic case emit B bool aux=0; if(S[1]){ if(R){aux=1;} else { } } else {aux=1;} if(aux){S[1..4]=1011;}

K0 Inactive[4] R A S[3]=0 K0[4] K1[4] Inactive[5] B S[4]=0 K0[5] K1[5] K1 emit O S[1] S[2] S[3] S[4] S[1..4]=1011 S[2]=1 Static scheduling Code generation – acyclic case emit B bool aux=0; if(S[1]){ if(R){aux=1;} else { if(!S[2]){ }} } else {aux=1;} if(aux){S[1..4]=1011;}

K0 Inactive[4] R A S[3]=0 K0[4] K1[4] Inactive[5] B S[4]=0 K0[5] K1[5] K1 emit O S[1] S[2] S[3] S[4] S[1..4]=1011 S[2]=1 Static scheduling Code generation – acyclic case emit B bool aux=0; if(S[1]){ if(R){aux=1;} else { if(!S[2]){ if(S[3])if(A){S[3]=0;B=1;} }} } else {aux=1;} if(aux){S[1..4]=1011;}

K0 Inactive[4] R A S[3]=0 K0[4] K1[4] Inactive[5] B S[4]=0 K0[5] K1[5] K1 emit O S[1] S[2] S[3] S[4] S[1..4]=1011 S[2]=1 Static scheduling Code generation – acyclic case emit B bool aux=0; if(S[1]){ if(R){aux=1;} else { if(!S[2]){ if(S[3])if(A){S[3]=0;B=1;} if(S[4])if(B)S[4]=0; }} } else {aux=1;} if(aux){S[1..4]=1011;}

K0 Inactive[4] R A S[3]=0 K0[4] K1[4] Inactive[5] B S[4]=0 K0[5] K1[5] K1 emit O S[1] S[2] S[3] S[4] S[1..4]=1011 S[2]=1 Static scheduling bool aux=0; if(S[1]){ if(R){aux=1;} else { if(!S[2]){ if(S[3])if(A){S[3]=0;B=1;} if(S[4])if(B)S[4]=0; if(S[3]=0&S[4]=0){ } }} } else {aux=1;} if(aux){S[1..4]=1011;} Code generation – acyclic case emit B

K0 Inactive[4] R A S[3]=0 K0[4] K1[4] Inactive[5] B S[4]=0 K0[5] K1[5] K1 emit O S[1] S[2] S[3] S[4] S[1..4]=1011 S[2]=1 Static scheduling bool aux=0; if(S[1]){ if(R){aux=1;} else { if(!S[2]){ if(S[3])if(A){S[3]=0;B=1;} if(S[4])if(B)S[4]=0; if(S[3]=0&S[4]=0){ O=1;S[2]=1; } }} } else {aux=1;} if(aux){S[1..4]=1011;} Code generation – acyclic case emit B

Static analysis and optimizations GRC specifications => usually very redundant Optimizations Compatible with the code generation scheme –GRC code optimizations –Software encoding optimizations Semantic-preserving Fast, efficient How? Static analysis Fast, efficient Prepare the optimizations and the encoding Not software-specific

Static analysis, example trap T in sustain A || await B;await C;exit T end || sustain A await B # await C # boot: nt: Static analysis and optimizations Utility: –Simplify the state access/update protocol –Simplify the state encoding Same status at all instants

Optimized state encoding trap T in sustain A || await B;await C;exit T end || sustain A await B # await C # boot: – boot instant – « sustain A »,« await B » active – « sustain A »,« await C » active – program terminated XXX XXXX Unoptimized encoding: States: 0 Static analysis and optimizations

Optimized state encoding trap T in sustain A || await B;await C;exit T end || sustain A await B # await C # boot: – boot instant – « sustain A »,« await B » active – « sustain A »,« await C » active – program terminated X XX Optimized encoding: States: 0 nt: Static analysis and optimizations

Dependency removal (propagation of exclusions) [2] 0 [1] enter 3enter 2exit 1 exit 3 S exit 4 enter 4 exit 2exit 0 [4] 2 [3] pause; present S then emit T end; pause; emit S; # # boot: emit S emit T Static analysis and optimizations

Dependency removal (propagation of exclusions) [2] 0 [1] enter 3enter 2exit 1 exit 3 S exit 4 enter 4 exit 2exit 0 [4] 2 [3] pause; present S then emit T end; pause; emit S; # # boot: emit S emit T Static analysis and optimizations

Dependency removal (propagation of exclusions) [2] 0 [1] enter 3enter 2exit 1 exit 3 S exit 4 enter 4 exit 2exit 0 [4] 2 [3] pause; present S then emit T end; pause; emit S; # # boot: emit S emit T Static analysis and optimizations

Acyclic  Correct specification  Efficient code generation Depends on the representation(GRC,circuit,…) –Compatibility, correctness, and efficiency issue (algorithmic) –Circuits = privileged representation (finer, cleaner) Unify GRC-level and circuit-level cyclicity Generate simulation code (future work) Cyclic specifications

Difference only on synchronizers Solution: synchronizer splitting –GRC code refinement –Inexpensive local analysis Unify GRC-level, circuit-level cyclicity K 1 [0] K 0 [0] K 0 [1] K1K1 I S GO K0K0 I I K1K1 K0K0 [ present I then present S then pause else pause end || nothing ]; emit S

Synopsys (S. Edwards) –Similar intermediate format, state encoding –State already encoded in the intermediate form –Better context switch encoding FTR&D (Bertin, Closse, Weil, Pulou, Poize) –Hierarchic state representation flattened into a list of pending threads ordered by a static scheduling Comparison with existing compilers G1G1 GnGn G2G2 P1P1 PnPn P2P2...

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

Semantics of Esterel with data Intermediate model for Esterel programs Static analysis and optimization at this level Characterization of circuit-level cyclicity at this level General code generation scheme Prototype compiler, acyclic case Correctness proofs, complete implementation (work in progress) Cyclic programs… Conclusion Future …

Still cyclic… Hybrid code scheduling technique –Abstract the SCCs => globally acyclic graph –Static scheduling for the acyclic graph => efficiency? –Circuit-level simulation techniques on SCCs Does not guarantee program correctness –Verify otherwise –Simulation (not implementation)