Processes, interfaces and platforms. Embedded software modeling in Metropolis. Luciano Lavagno Politecnico di Torino EMSOFT 2002, CASES 2002 Grenoble,

Slides:



Advertisements
Similar presentations
purpose Search : automation methods for device driver development in IP-based embedded systems in order to achieve high reliability, productivity, reusability.
Advertisements

© 2004 Wayne Wolf Topics Task-level partitioning. Hardware/software partitioning.  Bus-based systems.
Hardware/ Software Partitioning 2011 年 12 月 09 日 Peter Marwedel TU Dortmund, Informatik 12 Germany Graphics: © Alexandra Nolte, Gesine Marwedel, 2003 These.
ECOE 560 Design Methodologies and Tools for Software/Hardware Systems Spring 2004 Serdar Taşıran.
Sensor Network Platforms and Tools
Metropolis Design Environment for Heterogeneous Systems Luciano Lavagno Cadence Berkeley Labs & Politecnico di Torino Metropolis Project Team etropolis.
Background information Formal verification methods based on theorem proving techniques and model­checking –to prove the absence of errors (in the formal.
ISBN Chapter 3 Describing Syntax and Semantics.
- 1 -  P. Marwedel, Univ. Dortmund, Informatik 12, 05/06 Universität Dortmund Hardware/Software Codesign.
STARS and Metropolis: static and dynamic RTOS modeling Felice Balarin Cadence Berkeley Labs.
Metropolis: An Environment for System-Level Design The Metropolis Team Presenter: Abhijit Davare CHESS Review - May 10, 2004.
Architecture: modeling and mapping - Metropolis approach - Yoshi Watanabe Cadence Berkeley Labs for EE249 class in October 2002.
Methodologies for Wireless Sensor Networks Design Alvise Bonivento Alessandro Pinto Prof. Sangiovanni-Vincentelli U.C. Berkeley.
NSF Foundations of Hybrid and Embedded Software Systems UC Berkeley: Chess Vanderbilt University: ISIS University of Memphis: MSI Design of Embedded Systems:
System Level Design: Orthogonalization of Concerns and Platform- Based Design K. Keutzer, S. Malik, R. Newton, J. Rabaey, and A. Sangiovanni-Vincentelli.
Chess Review November 18, 2004 Berkeley, CA Advanced Tool Architectures Edited and Presented by Edward A. Lee, Co-PI UC Berkeley.
Mahapatra-Texas A&M-Fall'001 cosynthesis Introduction to cosynthesis Rabi Mahapatra CPSC498.
Implementing Quantity Managers in Ptolemy II EE 290N Project Haibo Zeng Dec 10 th, 2004.
Define Embedded Systems Small (?) Application Specific Computer Systems.
Metro II : A Next-Generation Framework for Platform-based Design Abhijit Davare, Douglas Densmore, Trevor Meyerowitz, Alessandro Pinto, Alberto Sangiovanni-Vincentelli,
Models of Computation for Embedded System Design Alvise Bonivento.
1 EE249 Discussion A Method for Architecture Exploration for Heterogeneous Signal Processing Systems Sam Williams EE249 Discussion Section October 15,
Synthesis of Transaction-Level Models to FPGAs Prof. Jason Cong Yiping Fan, Guoling Han, Wei Jiang, Zhiru Zhang VLSI CAD Lab Computer Science Department.
Foundations of Hybrid and Embedded Software Systems UC Berkeley: Chess Vanderbilt University: ISIS University of Memphis: MSI NSF Model-Based Design DSML.
A Platform-based Design Flow for Kahn Process Networks Abhijit Davare Qi Zhu December 10, 2004.
November 18, 2004 Embedded System Design Flow Arkadeb Ghosal Alessandro Pinto Daniele Gasperini Alberto Sangiovanni-Vincentelli
Quantity  A generic mechanism to model performance In platform-based design, two pieces of information are required to capture the characteristics of.
Trend towards Embedded Multiprocessors Popular Examples –Network processors (Intel, Motorola, etc.) –Graphics (NVIDIA) –Gaming (IBM, Sony, and Toshiba)
CprE 458/558: Real-Time Systems
Describing Syntax and Semantics
Mahapatra-Texas A&M-Fall'001 Codesign Framework Parts of this lecture are borrowed from lectures of Johan Lilius of TUCS and ASV/LL of UC Berkeley available.
Copyright Arshi Khan1 System Programming Instructor Arshi Khan.
Universität Dortmund  P. Marwedel, Univ. Dortmund, Informatik 12, 2003 Hardware/software partitioning  Functionality to be implemented in software.
Using UML Models for the Performance Analysis of Network Systems Nico de Wet and Pieter Kritzinger Department of Computer Science University of Cape Town.
Microsoft Visual Basic 2012 CHAPTER ONE Introduction to Visual Basic 2012 Programming.
Microsoft Visual Basic 2005 CHAPTER 1 Introduction to Visual Basic 2005 Programming.
EECE **** Embedded System Design
CASTNESS‘11 Computer Architectures and Software Tools for Numerical Embedded Scalable Systems Workshop & School: Roma January 17-18th 2011 Frédéric ROUSSEAU.
Chapter 1 Introduction Dr. Frank Lee. 1.1 Why Study Compiler? To write more efficient code in a high-level language To provide solid foundation in parsing.
Extreme Makeover for EDA Industry
1 H ardware D escription L anguages Modeling Digital Systems.
Automatic Communication Refinement for System Level Design Samar Abdi, Dongwan Shin and Daniel Gajski Center for Embedded Computer Systems, UC Irvine
CADENCE CONFIDENTIAL Design Methodologies for the Nanotechnology Era Alberto Sangiovanni-Vincentelli.
Hardware/Software Co-design Design of Hardware/Software Systems A Class Presentation for VLSI Course by : Akbar Sharifi Based on the work presented in.
A Methodology for Architecture Exploration of heterogeneous Signal Processing Systems Paul Lieverse, Pieter van der Wolf, Ed Deprettere, Kees Vissers.
Fast Simulation Techniques for Design Space Exploration Daniel Knorreck, Ludovic Apvrille, Renaud Pacalet
Automatic translation from CUDA to C++ Luca Atzori, Vincenzo Innocente, Felice Pantaleo, Danilo Piparo 31 August, 2015.
Unit-1 Introduction Prepared by: Prof. Harish I Rathod
- 1 - EE898_HW/SW Partitioning Hardware/software partitioning  Functionality to be implemented in software or in hardware? No need to consider special.
C. André, J. Boucaron, A. Coadou, J. DeAntoni,
Module 1.2 Introduction to Verilog
1 Compiler Design (40-414)  Main Text Book: Compilers: Principles, Techniques & Tools, 2 nd ed., Aho, Lam, Sethi, and Ullman, 2007  Evaluation:  Midterm.
1 CSEP590 – Model Checking and Automated Verification Lecture outline for August 6, 2003.
CprE 588 Embedded Computer Systems Prof. Joseph Zambreno Department of Electrical and Computer Engineering Iowa State University Lecture #5 – System-Level.
Evaluating and Improving an OpenMP-based Circuit Design Tool Tim Beatty, Dr. Ken Kent, Dr. Eric Aubanel Faculty of Computer Science University of New Brunswick.
System-level power analysis and estimation September 20, 2006 Chong-Min Kyung.
Architecture View Models A model is a complete, simplified description of a system from a particular perspective or viewpoint. There is no single view.
Constraints Assisted Modeling and Validation Presented in CS294-5 (Spring 2007) Thomas Huining Feng Based on: [1]Constraints Assisted Modeling and Validation.
Formal Verification. Background Information Formal verification methods based on theorem proving techniques and model­checking –To prove the absence of.
1 Asstt. Prof Navjot Kaur Computer Dept PRESENTED BY.
SystemC Semantics by Actors and Reduction Techniques in Model Checking Marjan Sirjani Formal Methods Lab, ECE Dept. University of Tehran, Iran MoCC 2008.
Graphical editor for the Metropolis meta-model Jiagen Ding and Hongjing Zou Fall 2001.
System-on-Chip Design
Introduction to Visual Basic 2008 Programming
Design Flow System Level
Modeling of Heterogeneous Systems in Metropolis
Introduction to cosynthesis Rabi Mahapatra CSCE617
Shanna-Shaye Forbes Ben Lickly Man-Kit Leung
Concurrent Models of Computation for Embedded Software
Presented By: Darlene Banta
Presentation transcript:

Processes, interfaces and platforms. Embedded software modeling in Metropolis. Luciano Lavagno Politecnico di Torino EMSOFT 2002, CASES 2002 Grenoble, France

Metropolis Project: main participants u Cadence Berkeley Labs (USA): methodologies, modeling, formal methods u UC Berkeley (USA): methodologies, modeling, formal methods u Politecnico di Torino (Italy): modeling, formal methods u Universitat Politecnica de Catalunya (Spain): modeling, formal methods u Philips Research (Netherlands): methodologies (multi-media) u Nokia (USA, Finland): methodologies (wireless communication) u BWRC (USA): methodologies (wireless communication) u BMW (USA): methodologies (fault-tolerant automotive controls) u Intel (USA): methodologies (microprocessors) u STMicroelectronics (France, Italy): methodologies (wireless platforms) etropolis

Metropolis Framework Infrastructure Metropolis meta-model - language - modeling mechanisms Meta-model compiler Meta-model Library Models of computation Meta-model Library Architecture platforms Tools Simulator QSS PIG STARS SPIN … Application-specific methodologies Multi-media, wireless communication, mechanical controls, processors

Design Methodology Balance between reusability and optimality s orthogonalize design concerns as much as possible s optimize the final implementation as much as necessary Refine Optimize Implementation of System Functional & Non-func. Constraints Function Component Library MPEG decode PES parser VSRC I$D$ CPU UART RTOS Architecture Component Library demux PES parser MPEG decode HSRCVSRC Image Juggler MPEG decode Control System Function Model System Architecture Model BCU HW assist MEM I$D$ CPU UARTINT RTOS API driver Map

Metropolis meta-model Computation : f : X  Z Communication : state evaluation and manipulation Coordination : constraints over concurrent actions - process : generates a sequence of events - medium : defines states and methods - quantity : annotation of each event (time, energy, memory, …) - logic : relates events and quantities, defines axioms on quantities - quantity-manager : algorithm to realize annotation subject to relational constraints Concurrent specification with a formal execution semantics: Key difference with respect to Ptolemy, UML, SystemC, …!!! Concurrent specification with a formal execution semantics:

Meta-model : function netlist process P{ port reader X; port writer Y; thread(){ while(true){... z = f(X.read()); Y.write(z); }}} medium M implements reader, writer{ int storage; int n, space; void write(int z){ await(space>0; writer ; writer) n=1; space=0; storage=z; } word read(){... } } interface reader extends Port{ update int read(); eval int n(); } interface writer extends Port{ update void write(int i); eval int space(); } M P1 X Y P2 X Y Env1 Env2 MyFncNetlist R I FA M

Meta-model: execution semantics u u Processes take actions. s s statements and some expressions, e.g. y = z+port.f(), port.f(), i < 10, … u u An execution of a given netlist is a sequence of vectors of events. s s event : the beginning of an action, e.g. B(port.f()), the end of an action, e.g. E(port.f()), null (no-op) N s s the i-th component of a vector is an event of the i-th process s s synchronous trace-based semantics s s time and other quantities elapse and actions are executed in states s s no assumption on atomicity whatsoever (unless explicitly modeled) u u An execution is feasible if s s it satisfies all coordination constraints, and s s it is accepted by all action automata defining meta-model semantics

Meta-model: architecture components An architecture component specifies services, i.e. what it can do how much it costs : interfaces : quantities, annotation, logic of constraints medium Bus implements BusMasterService …{ port BusArbiterService Arb; port MemService Mem; … update void busRead(String dest, int size) { if(dest== … ) Mem.memRead(size); [[Arb.request(B(busRead)); GTime.request(B(memRead), BUSCLKCYCLE + GTime.annotation(B(busRead))); ]] } … scheduler BusArbiter extends Quantity implements BusArbiterService { update void request(event e){ … } update void resolve() { //schedule } } interface BusMasterService extends Port { update void busRead(String dest, int size); update void busWrite(String dest, int size); } interface BusArbiterService extends Port { update void request(event e); update void resolve(); } BusArbiter Bus R I FA M

Meta-model: architecture netlist Bus Arbiter Bus Mem Cpu OsSched MyArchNetlist … … … Master CPU + OS Slave Mem Arbiter Architecture netlist specifies configurations of architecture components. Each constructor - instantiates arch. components, - connects them, - takes as input mapping processes. R I FA M

Meta-model: mapping processes process P{ port reader X; port writer Y; thread(){ while(true){... z = f(X.read()); Y.write(z); }} int f (int n) { int i; for (i = 0; i < n; i++) { … }} process MapP{ port CpuService Cpu; void readCpu(){ Cpu.exec(2); Cpu.cpuRead(); } void mapf(){Cpu.exec(12*n); } … } thread(){ while(true){ await { (true; ; ;) readCpu(); (true; ; ;) mapf(); (true; ; ;) readWrite(); }}} B(P, X.read) B(MapP, readCpu); E(P, X.read) E(MapP, readCpu); B(P, f) B(MapP, mapf); E(P, f) E(MapP, mapf); … Function process Mapping process R I FA M

Meta-model: mapping netlist Bus Arbiter Bus Mem Cpu OsSched MyArchNetlist mP1 mP2 mP1 mP2 MyFncNetlist M P1 P2 Env1 Env2 B(P1, M.write) B(mP1, mP1.writeCpu); E(P1, M.write) E(mP1, mP1.writeCpu); B(P1, P1.f) B(mP1, mP1.mapf); E(P1, P1.f) E(mP1, mP1.mapf); B(P2, M.read) B(P2, mP2.readCpu); E(P2, M.read) E(mP2, mP2.readCpu); B(P2, P2.f) B(mP2, mP2.mapf); E(P2, P2.f) E(mP2, mP2.mapf); MyMapNetlist Bus Arbiter Bus Mem Cpu OsSched MyArchNetlist … … … R I FA M

Meta-model: platforms interface MyService extends Port { int myService(int d); } medium AbsM implements MyService{ int myService(int d) { … } } B(thisthread, AbsM.myService) B(P1, M.read); E(thisthread, AbsM.myService) E(P2, M.write); refine(AbsM, MyMapNetlist); MyArchNetlistMyFncNetlist M P1 P2 B(P1, M.write) B(mP1, mP1.writeCpu); B(P1, P1.f) B(mP1, mP1.mapf); E(P1, P1.f) E(mP1, ) B(P2, M.read) B(P2, mP2.readCpu); E(P2, P2.f) E(mP2, mP2.mapf); MyMapNetlist1 MyArchNetlistMyFncNetlist M P1 P2 B(P1, M.write) B(mP1, mP1.writeCpu); B(P1, P1.f) B(mP1, mP1.mapf); E(P1, P1.f) E(mP1, ) B(P2, M.read) B(P2, mP2.readCpu); E(P2, P2.f) E(mP2, mP2.mapf); MyMapNetlist1 B(…) B(…); E(…) E(…); refine(AbsM, MyMapNetlist1) MyArchNetlistMyFncNetlis t M P1 P2 B(P1, M.write) B(mP1, mP1.writeCpu); B(P1, P1.f) B(mP1, mP1.mapf); E(P1, P1.f) E(mP1, ) B(P2, M.read) B(P2, mP2.readCpu); E(P2, P2.f) E(mP2, mP2.mapf); MyMapNetlist2 M B(…) B(…); E(…) E(…); refine(AbsM, MyMapNetlist2) A set of mapping netlists, together with constraints on event mappings, constitutes a platform (constrained set of possible implementations) with a given interface. R I FA M R I FA M

Meta-model: recursive platforms S N N' B(Q2, S.cdx) B(Q2, mQ2.excCpu); E(Q2, M.cdx) E(mQ2, mQ2.excCpu); B(Q2, Q2.f) B(mQ2, mQ2.mapf); E(Q2, P2.f) E(mQ2, mQ2.mapf); MyArchNetlistMyFncNetlist M P1 P2 B(P1, M.write) B(mP1, mP1.writeCpu); B(P1, P1.f) B(mP1, mP1.mapf); E(P1, P1.f) E(mP1, ) B(P2, M.read) B(P2, mP2.readCpu); E(P2, P2.f) E(mP2, mP2.mapf); RTOSNetlist MyArchNetl ist MyFncNe tlist M P1 P2 B(P2, M.read) B(P2, mP2.readCpu); E(P2, P2.f) E(mP2, mP2.mapf); M RTOS

Meta-model: summary Concurrent specification with a formal execution semantics Feasible executions of a netlist: sequences of event vectors Quantities can be defined and annotated with events, e.g. time, energy, memory,... Concurrent events can be coordinated in terms of quantities: - logic can be used to define the coordination, - algorithms can be used to implement the coordination. The mechanism of event coordination wrt quantities plays a key role: - architecture modeling as service with cost, - mapping coordinates executions of functional and architecture netlists, - refinement with event coordination provides a platform.

Metropolis Framework Infrastructure Metropolis meta-model - language - modeling mechanisms Meta-model compiler Meta-model Library Models of computation Meta-model Library Architecture platforms Tools Simulator QSS PIG STARS SPIN … Application-specific methodologies Multi-media, wireless communication, mechanical controls, processors

Metropolis infrastructure architecture Meta model compiler Verification tool Front end Meta model language Simulator tool... Back end 1 Abstract syntax trees Back end 2 Back end N Back end 3 Synthesis tool Language 1 Language 2 Language n Translator 1 Translator 2 Translator n...

Metropolis infrastructure status Meta model compiler Spin Prometheus Front end Meta model language SystemC Simulator... Back end 1 Abstract syntax trees Back end 2 Back end N Back end 3 Symbolic HW scheduler SimulinkEsterel/LustreUML Translator 1 Translator 2 Translator n...

Deriving other formal models from the meta-model Example: Petri nets await(X.n()>=2; X.reader; X.reader) for(i=0; i<2; i++) x[i]=X.read(); reader_unlock reader_lock X.n() 2 2 i=0; i<2? x[i]=X.read(); i++; end of await Formal methods on Petri nets: analyze the schedulability analyze upper bounds of storage sizes synthesize schedules Restrictions: condition inside await is conjunctive specific medium type (FIFO) is used

Example: quasi-static scheduling 1 Specify a network of processes 2 Translate to the Petri net model 3 Find a “schedule” on the Petri net 4 Translate the schedule to a set of tasks (processes)

Metropolis Summary Metropolis meta-model: - concurrent specification for functions, architecture, and mappings - libraries of models of computation, libraries of platforms Metropolis design environment: - meta-model compiler to provide an API to browse designs, - backend tools to analyze designs and produce appropriate models, - easy to incorporate simulation, verification, and synthesis tools

Backup slides: Execution semantics u A sequence of vectors of events is a legal behavior if it s satisfies all constraints s is accepted by all action automata t one for each action of each process

B y=x+1 Action automata u y=x+1; B y=x+1B x+1E x+1E y=x+1 y:=V x+1 B x+1E x+1E y=x+1 y:=any c c c c * = write y*** B x+1E x+1 V x+1 :=x+1 E x+1 V x+1 :=any c c write x y=x+1 x+1 V x+1 y x N

Action automata u y=x+1; y=x+1 x+1 V x+1 y x B y=x+1B x+1E x+1E y=x+1 y:=V x+1 B x+1E x+1E y=x+1 y:=any c c c c * = write y*** B x+1E x+1 V x+1 :=x+1 E x+1 V x+1 :=any c c write x B y=x+1B x+1NNN

E x Action automata u y=x+1; y=x+1 x+1 V x+1 y x B y=x+1B x+1E x+1E y=x+1 y:=V x+1 B x+1E x+1E y=x+1 y:=any c c c c * = write y*** B x+1E x+1 V x+1 :=x+1 E x+1 V x+1 :=any c c write x B y=x+1B x+1NNN

Action automata u y=x+1; y=x+1 x+1 V x+1 y x B y=x+1B x+1E x+1E y=x+1 y:=V x+1 B x+1E x+1E y=x+1 y:=any c c c c * = write y*** B x+1E x+1 V x+1 :=x+1 E x+1 V x+1 :=any c c write x B y=x+1B x+1E x+1NNNE y=x

B y=x+1 Action automata u y=x+1; y=x+1 x+1 V x+1 y x B y=x+1B x+1E x+1E y=x+1 y:=V x+1 B x+1E x+1E y=x+1 y:=any c c c c * = write y*** B x+1E x+1 V x+1 :=x+1 E x+1 V x+1 :=any c c write x N

Action automata u y=x+1; y=x+1 x+1 V x+1 y x B y=x+1B x+1E x+1E y=x+1 y:=V x+1 B x+1E x+1E y=x+1 y:=any c c c c * = write y*** B x+1E x+1 V x+1 :=x+1 E x+1 V x+1 :=any c c write x B y=x+1B x+1NN

Action automata u y=x+1; y=x+1 x+1 V x+1 y x B y=x+1B x+1E x+1E y=x+1 y:=V x+1 B x+1E x+1E y=x+1 y:=any c c c c * = write y*** B x+1E x+1 V x+1 :=x+1 E x+1 V x+1 :=any c c write x B y=x+1B x+1NNN

E x Action automata u y=x+1; y=x+1 x+1 V x+1 y x B y=x+1B x+1E x+1E y=x+1 y:=V x+1 B x+1E x+1E y=x+1 y:=any c c c c * = write y*** B x+1E x+1 V x+1 :=x+1 E x+1 V x+1 :=any c c write x B y=x+1B x+1NNN

Action automata u y=x+1; y=x+1 x+1 V x+1 y x B y=x+1B x+1E x+1E y=x+1 y:=V x+1 B x+1E x+1E y=x+1 y:=any c c c c * = write y*** B x+1E x+1 V x+1 :=x+1 E x+1 V x+1 :=any c c write x B y=x+1B x+1E x+1NNNE y=x

Semantics of await await { (X.n()>0;X.writer; X.writer) comp: z = f(X.read()); (X.n()>0;X.writer; X.writer) comp: z = f(X.read()); (Y.space()>0;Y.reader;Y.reader) Y.write(z); (Y.space()>0;Y.reader;Y.reader) Y.write(z);} B await... c  start Y.reader E comp:... (true X.n()>0   active X.writer)/ B comp:... (true Y.space()>0   active Y.reader) / B Y.write(z) E Y.write(z)  start X.writer c E await...

Semantics summary u Processes run sequential code concurrently, each at its own arbitrary pace u Read-Write and Write-Write hazards may cause unpredictable results s atomicity has to be explicitly specified u Progress may block at synchronization points s awaits s function calls and labels to which awaits or LTL constraints refer