Einsterel: A Compiled Event-Driven Simulator for Esterel.

Slides:



Advertisements
Similar presentations
§3 The Stack ADT 1. ADT A stack is a Last-In-First-Out (LIFO) list, that is, an ordered list in which insertions and deletions are.
Advertisements

Semantics Static semantics Dynamic semantics attribute grammars
Chapter 9 Code optimization Section 0 overview 1.Position of code optimizer 2.Purpose of code optimizer to get better efficiency –Run faster –Take less.
Real-Time Library: RTX
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.
Ch. 7 Process Synchronization (1/2) I Background F Producer - Consumer process :  Compiler, Assembler, Loader, · · · · · · F Bounded buffer.
Optimizations for Faster Simulation of Esterel Programs Dumitru POTOP-BUTUCARU Advisers: Gérard Berry – Esterel Technologies Robert de Simone – INRIA,
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.
Logic Simulation 3 Outline –Event-driven simulation algorithms –Event-driven simulation implementation Goal –Understand event-driven simulation –Understand.
Copyright © 2001 Stephen A. Edwards All rights reserved Research Areas Stephen A. Edwards.
Esterel Overview Roberto Passerone ee249 discussion section.
Honors Compilers The Course Project Feb 28th 2002.
CS220 Software Development Lecture: Multi-threading A. O’Riordan, 2009.
Why Behavioral Wait statement Signal Timing Examples of Behavioral Descriptions –ROM.
Reference Book: Modern Compiler Design by Grune, Bal, Jacobs and Langendoen Wiley 2000.
Aho-Corasick String Matching An Efficient String Matching.
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
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,
Digital System Design EEE344 Lecture 3 Introduction to Verilog HDL Prepared by: Engr. Qazi Zia, Assistant Professor EED, COMSATS Attock1.
Compiling ESTEREL circuits into finite states machines BRES Yannis Stage de DEA d’Informatique 1998/1999.
UNIT 3 TEMPLATE AND EXCEPTION HANDLING. Introduction  Program errors are also referred to as program bugs.  A C program may have one or more of four.
IAY 0600 Digitaalsüsteemide disain Event-Driven Simulation Alexander Sudnitson Tallinn University of Technology.
Gary MarsdenSlide 1University of Cape Town Principles of programming language design Gary Marsden Semester 2 – 2001.
CSC 338: Compiler design and implementation
Lecturer: Dr. AJ Bieszczad Chapter 11 COMP 150: Introduction to Object-Oriented Programming 11-1 l Basics of Recursion l Programming with Recursion Recursion.
Slides prepared by Rose Williams, Binghamton University ICS201 Lecture 19 : Recursion King Fahd University of Petroleum & Minerals College of Computer.
“Software” Esterel Execution (work in progress) Dumitru POTOP-BUTUCARU Ecole des Mines de Paris
Programming Languages by Ravi Sethi Chapter 6: Groupings of Data and Operations.
PHP Logic. Review: Variables Variables: a symbol or name that stands for a value – Data types ( Similar to C++ or Java): Int, Float, Boolean, String,
1 Workshop Topics - Outline Workshop 1 - Introduction Workshop 2 - module instantiation Workshop 3 - Lexical conventions Workshop 4 - Value Logic System.
CPS120: Introduction to Computer Science Decision Making in Programs.
BUILD ON THE POLYGLOT COMPILER FRAMEWORK MIHAL BRUMBULLI 7th Workshop “SEERE” Montenegro-Risan 9-14 September 2007 SimJ Programming Language.
Lists II. List ADT When using an array-based implementation of the List ADT we encounter two problems; 1. Overflow 2. Wasted Space These limitations are.
1 2. Program Construction in Java. 2.9 Sorting 3 The need Soritng into categories is relatively easy (if, else if, switch); here we consider sorting.
© 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.
Compilers: Overview/1 1 Compiler Structures Objective – –what are the main features (structures) in a compiler? , Semester 1,
Timing Model VHDL uses the following simulation cycle to model the stimulus and response nature of digital hardware Start Simulation Update Signals Execute.
1 CS161 Introduction to Computer Science Topic #9.
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.
Chapter 11Java: an Introduction to Computer Science & Programming - Walter Savitch 1 Chapter 11 l Basics of Recursion l Programming with Recursion Recursion.
Compiler Construction By: Muhammad Nadeem Edited By: M. Bilal Qureshi.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 24 Critical Regions.
Copyright © 2000, Department of Systems and Computer Engineering, Carleton University 1 Introduction An array is a collection of identical boxes.
LINKED LISTS Midwestern State University CMPS 1053 Dr. Ranette Halverson 1.
C H A P T E R T H R E E Type Systems and Semantics Programming Languages – Principles and Paradigms by Allen Tucker, Robert Noonan.
IAY 0600 Digital Systems Design Event-Driven Simulation VHDL Discussion Alexander Sudnitson Tallinn University of Technology.
1 Structure of a Compiler Source Language Target Language Semantic Analyzer Syntax Analyzer Lexical Analyzer Front End Code Optimizer Target Code Generator.
Overview of Compilation Prepared by Manuel E. Bermúdez, Ph.D. Associate Professor University of Florida Programming Language Principles Lecture 2.
IAY 0600 Digitaalsüsteemide disain
HDL simulation and Synthesis (Marks16)
Esterel By: Sam Weinberg.
VLSI Testing Lecture 6: Fault Simulation
IAY 0600 Digital Systems Design
ECE 553: TESTING AND TESTABLE DESIGN OF DIGITAL SYSTES
IAS 0600 Digital Systems Design
Preparing for MUPL! Justin Harjanto
Chapter 6 Intermediate-Code Generation
Coding Concepts (Basics)
Multithreaded Programming
Adapted from slides by Nicholas Shahan and Dan Grossman
IAS 0600 Digital Systems Design
Basics of Recursion Programming with Recursion
Nicholas Shahan Spring 2016
Esterel Tutorial Winter 2004
Presentation transcript:

Einsterel: A Compiled Event-Driven Simulator for Esterel

Main contribution: - Scheduling of events at run time. This can give a substantial performance advantage.

It worked! A subset of Esterel was successfully implemented. Einsterel can simulate Esterel code over 2.5 times faster than Berry’s v5 compiler. Furthermore it is at least some percentage faster for all test benches ran. nothing emit S present S then p else q end loop p end pause suspend p when S p || q p ; q await S Boolean Logic: (and, or, not) Do nothing Make S present this instant Run p is S is present, q otherwise Run p. Restart it when it terminates Stop here; resume in the next instant Run p in this instant, but only in later instants when S is absent Run p and q concurrently; terminate when both do. Run p, wait for it to terminate, then run q pause until the next cycle in which S is present Performs specified logic function Einsterel’s implemented statements

EinGraph struct EinNode { int numFanIns ; int numFanOuts ; int level ; int *fanIns ; int *fanOuts ; void *pFunc ; } ; Figure 1: EinNode The event graph for Einsterel is referred to as EinGraph. It consists of array of EinNode’s

Example 1 present A then emit B ; end;

Building EinGraph ESUIF is used as front end to parse Esterel into SUIF. Einsterel’s graph building code is built off of ESUIF’s pass on the SUIF to generate Esterel. Essentially, instead of outputting Esterel, it creates EinNodes and puts them in an array. At the end of this pass the the EinNodes are fully constructed with the exception of their level.

Levelizing EinGraph changed=1; while someone’s level has changed changed=0; for every node for every fanout of this node FixLevel(parents_level*); Figure 2: Levelizing Algorithm * - Exceptions exist. highest_level_seen = parents_level for each fanin if fanin_level > highest level_seen highest_level_seen = fanin_level endfor if highest_level_seen >= my_level my_level = highest_level_seen + 1 changed=1; Figure 3: FixLevel(parents_level)

Example 1 (revisited) Present AB present A then emit B ; end;

Event Wheel Structure numScheduled[level]++; wheel[level][numScheduled[level]]=nodeNumber; inWheel[nodeNumber] = 1; Figure 5: Inserting a node to the wheel numScheduled[level]--; inWheel[nodeNumber] = 0; Figure 6: Deleting a node from the wheel Figure 4

Scheduling and Running for each level in the wheel while there are nodes scheduled in this level then for each node in this level delete it from the wheel goto (its evaluation code) and set eval if (eval != last cycle’s eval) then schedule it’s unscheduled fan-outs Figure 7: Basic simulation algorithm

Figure 8 : Running a sample program cycle-by-cycle

Synthesizing C The Target C code is divided into two main sections. 1. Initializing EinGraph This changes for each Esterel input program. EinGraph is looped over and written out. 2. Simulation code Same for every program, simply written out.

Results Three trends: Performance gap increases as 1.The number of cycles increases 2.The parallelism in the Esterel program increases 3.The number of driven inputs decreases

Future Work Implementing the full Esterel language. Decreasing Compile time. Increase performance with compile-time optimizations Detection of instantaneous loops and illegal cycles