Metropolis Design Environment for Heterogeneous Systems Luciano Lavagno Cadence Berkeley Labs & Politecnico di Torino Metropolis Project Team etropolis.

Slides:



Advertisements
Similar presentations
Embedded System, A Brief Introduction
Advertisements

ECOE 560 Design Methodologies and Tools for Software/Hardware Systems Spring 2004 Serdar Taşıran.
1 (Review of Prerequisite Material). Processes are an abstraction of the operation of computers. So, to understand operating systems, one must have a.
Abstraction and Modular Reasoning for the Verification of Software Corina Pasareanu NASA Ames Research Center.
Background information Formal verification methods based on theorem proving techniques and model­checking –to prove the absence of errors (in the formal.
STARS and Metropolis: static and dynamic RTOS modeling Felice Balarin Cadence Berkeley Labs.
Train Control Language Teaching Computers Interlocking By: J. Endresen, E. Carlson, T. Moen1, K. J. Alme, Haugen, G. K. Olsen & A. Svendsen Synthesizing.
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.
Architecture-driven Modeling and Analysis By David Garlan and Bradley Schmerl Presented by Charita Feldman.
Vertically Integrated Analysis and Transformation for Embedded Software John Regehr University of Utah.
System Level Design: Orthogonalization of Concerns and Platform- Based Design K. Keutzer, S. Malik, R. Newton, J. Rabaey, and A. Sangiovanni-Vincentelli.
Model Checking. Used in studying behaviors of reactive systems Typically involves three steps: Create a finite state model (FSM) of the system design.
Chess Review November 18, 2004 Berkeley, CA Advanced Tool Architectures Edited and Presented by Edward A. Lee, Co-PI UC Berkeley.
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.
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,
Programming Language Semantics Mooly SagivEran Yahav Schrirber 317Open space html://
Models of Computation for Embedded System Design Alvise Bonivento.
Semantics with Applications Mooly Sagiv Schrirber html:// Textbooks:Winskel The.
A Platform-based Design Flow for Kahn Process Networks Abhijit Davare Qi Zhu December 10, 2004.
SNAL Sensor Networks Application Language Alvise Bonivento Mentor: Prof. Sangiovanni-Vincentelli 290N project, Fall 04.
Designing Predictable and Robust Systems Tom Henzinger UC Berkeley and EPFL.
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.
CprE 458/558: Real-Time Systems
Describing Syntax and Semantics
5 th Biennial Ptolemy Miniconference Berkeley, CA, May 9, 2003 MESCAL Application Modeling and Mapping: Warpath Andrew Mihal and the MESCAL team UC Berkeley.
UML for Embedded Systems Development— Extensions; Hardware-Software CoDesign.
Architectural Design Establishing the overall structure of a software system Objectives To introduce architectural design and to discuss its importance.
Cheng/Dillon-Software Engineering: Formal Methods Model Checking.
CSET 4650 Field Programmable Logic Devices
1 VERILOG Fundamentals Workshop סמסטר א ' תשע " ה מרצה : משה דורון הפקולטה להנדסה Workshop Objectives: Gain basic understanding of the essential concepts.
IAY 0600 Digitaalsüsteemide disain Event-Driven Simulation Alexander Sudnitson Tallinn University of Technology.
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 {
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.
Benjamin Gamble. What is Time?  Can mean many different things to a computer Dynamic Equation Variable System State 2.
Formalizing the Asynchronous Evolution of Architecture Patterns Workshop on Self-Organizing Software Architectures (SOAR’09) September 14 th 2009 – Cambrige.
1 H ardware D escription L anguages Modeling Digital Systems.
CADENCE CONFIDENTIAL Design Methodologies for the Nanotechnology Era Alberto Sangiovanni-Vincentelli.
© 2012 xtUML.org Bill Chown – Mentor Graphics Model Driven Engineering.
1 LiSyC ENSIETA/DTN 02/04/2008 AADL execution semantics transformation for formal verification Joel Champeau, Thomas Abdoul, Pierre Yves Pillain, Philippe.
1 5 Nov 2002 Risto Pohjonen, Juha-Pekka Tolvanen MetaCase Consulting AUTOMATED PRODUCTION OF FAMILY MEMBERS: LESSONS LEARNED.
Lyra – A service-oriented and component-based method for the development of communicating systems (by Sari Leppänen, Nokia/NRC) Traditionally, the design,
C. André, J. Boucaron, A. Coadou, J. DeAntoni,
CPSC 372 John D. McGregor Module 3 Session 1 Architecture.
Fall 2004EE 3563 Digital Systems Design EE 3563 VHSIC Hardware Description Language  Required Reading: –These Slides –VHDL Tutorial  Very High Speed.
Processes, interfaces and platforms. Embedded software modeling in Metropolis. Luciano Lavagno Politecnico di Torino EMSOFT 2002, CASES 2002 Grenoble,
System-level power analysis and estimation September 20, 2006 Chong-Min Kyung.
Chapter 13 – I/O Systems (Pgs ). Devices  Two conflicting properties A. Growing uniformity in interfaces (both h/w and s/w): e.g., USB, TWAIN.
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.
ICFEM 2002, Shanghai Reasoning about Hardware and Software Memory Models Abhik Roychoudhury School of Computing National University of Singapore.
Review of Parnas’ Criteria for Decomposing Systems into Modules Zheng Wang, Yuan Zhang Michigan State University 04/19/2002.
System-on-Chip Design Hao Zheng Comp Sci & Eng U of South Florida 1.
Formal Verification. Background Information Formal verification methods based on theorem proving techniques and model­checking –To prove the absence of.
IAY 0600 Digital Systems Design Event-Driven Simulation VHDL Discussion Alexander Sudnitson Tallinn University of Technology.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
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
Formal methods: Lecture
IAY 0600 Digitaalsüsteemide disain
Software Design Methodology
Communication-Based Design
Design Flow System Level
Modeling of Heterogeneous Systems in Metropolis
Presentation transcript:

Metropolis Design Environment for Heterogeneous Systems Luciano Lavagno Cadence Berkeley Labs & Politecnico di Torino Metropolis Project Team etropolis

Outline System-level design scenario Metropolis design flow Meta-model syntax –processes and media –constraints and schedulers Meta-model semantics Conclusions

A Modern Car, an Electronic System Electronic Toll Collection Collision Avoidance Vehicle ID Tracking Multiplexed Systems Vehicle CAN Bus BodyControl ECU ABS SuspensionTransmission IVHS Infrastructure Wireless Communications/Data Global Positioning Info/Comms/ AV Bus CellularPhone GPS Display Navigation Stereo/CD SW Architecture Network Design/Analysis Function / Protocol Validation Performance Modelling Supplier Chain Integration

Design Roles and Interactions System architect Kernel benchmarks Constraints Simple env. model Refined global architecture Sub-function specifications Abstract local architectures Detailed env. models Sub-function implementations Algorithm+SW developer System implementation System integrator CPU + RTOS + HW implementations Detailed local architectures Platform developer System specification Algorithm+SW developer Algorithm+SW developer Platform developer Platform developer

Design Scenarios f f ?? f f f f f f f f ff f f f f f f f f f f f f f f f

Metropolis Project Goal: develop a formal design environment –Design methodologies: abstraction levels, design problem formulations –Design automation tools: A modeling mechanism: heterogeneous semantics, concurrency Formal methods for automatic synthesis and verification Participants: –Cadence Berkeley Labs (USA): methodologies, modeling, formal methods –UC Berkeley (USA): methodologies, modeling, formal methods –Politecnico di Torino (Italy): modeling, formal methods –Universitat Politecnica de Catalunya (Spain): modeling, formal methods –CMU (USA): formal methods –Philips (Netherlands): methodologies (multi-media) –Nokia (USA, Finland): methodologies (wireless communication) –BWRC (USA): methodologies (wireless communication) –BMW (USA, Germany): methodologies (fault-tolerant automotive controls) –Intel (USA): methodologies (microprocessors) etropolis

Orthogonalization of concerns Separate: functionality from architectural platform (function requires services offered by architecture) –increased re-use –use same level of abstraction for HW and SW –design space exploration –drive synthesis algorithms (compiler, scheduler, …) –separates behavior from performance (time, power, …) –performance derives from mapping computation from communication –computation (functionality) is scheduled and compiled –communication (interfacing) is refined via patterns based on mapping

Metropolis Framework Design Constraints Function Specification Architecture Specification Metropolis Infrastructure Design methodology Meta model of computation Base tools - Design imports - Meta model compiler - Simulation Metropolis Formal Methods: Synthesis/Refinement Metropolis Formal Methods: Analysis/Verification

Metropolis Framework: methodology Design Constraints Function Specification Architecture Specification Metropolis Infrastructure Design methodology Meta model of computation Base tools - Design imports - Meta model compiler - Simulation Metropolis Formal Methods: Synthesis/Refinement Metropolis Formal Methods: Analysis/Verification

Functional Decomposition MPEG Decoder VLDIDCTMCDISPLAY

Communication VLDIDCTMCDISPLAY BA IZ,IQ BA MEM BA MEM VLD IDCT MCDISPLAY BA IZ,IQ BA MEM BA MEM MMMMMM M

Refinement VLD IDCT MCDISPLAY BA IZ,IQ BA MEM BA MEM MMMMMM M Mi CA M M’ CA Mi Lossy Lossless

Refinement VLD IDCT MCDISPLAY BA IZ,IQ BA MEM BA MEM M MMMMM M VLD IDCT MCDISPLAY BA IZ,IQ BA MEM BA MEM MMM M REAS BUS M SEG M REAS M M SEG M M REAS

Optimization VLD IDCT DISPLAY BA IZ,IQ BA MEM MM MC BA MEM M M REAS BUS M SEG M REAS M M SEG M M REAS

Metropolis Framework: meta-model Design Constraints Function Specification Architecture Specification Metropolis Infrastructure Design methodology Meta model of computation Base tools - Design imports - Meta model compiler - Simulation Metropolis Formal Methods: Synthesis/Refinement Metropolis Formal Methods: Analysis/Verification

Metropolis Meta Model Do not commit to the semantics of a particular Model of Computation (MoC) Define a set of “building blocks”: –specifications with many useful MoCs can be described using the building blocks. –unambiguous semantics for each building block. –syntax for each building block a language of the meta model. Represent behavior at all design phases; mapped or unmapped Question: What is a good set of building blocks?

Metropolis Meta Model The behavior of a concurrent system: communication state methods to - store data - retrieve data coordination constraints on concurrent actions action annotation with quantity requests (time, energy, memory) algorithms to enforce the constraints computation f: X Z firing rule processes media constraints and quantity managers process P1{ port pX, pZ; thread(){ // condition to read X // an algorithm for f(X) // condition to write Z } medium M{ int[] storage; int space; void write(int[] z){... } int[] read(){... } } P1 P2 M S P1.pZ.write()  P2.pX.read() pX pZpXpZ M’

Netlist Define processes, media, schedulers, netlists connections among the objects constraints used also for specifying refinements c1 p2 p3 m1 c0 p0 p1 m0 DoubleStream

Communication and computation refinement RefIntM IntM w0 ByteM wk r0 refine Define a refinement “pattern”: 1. Define objects that constitute the refinement. 2. Define connections among the refinement objects. 3. Specify connections with objects outside the refinement netlist: Some objects in the refinement may be internally created; others may be given externally. write a constructor of the refinement netlist for each refinement scenario.

Netlist after Refinement m1 p0 m0 p1 p3 p2 c1 c0 refm0 w0 mb w1 r0 w0 w1 r0 refm1 // create mb, and then refine m0 and m1. ByteM mb = new ByteM(); RefIntM refm0 = new RefIntM(m0, mb); RefIntM refm1 = new RefIntM(m1, mb); But, we need coordination: - if p0 has written to mb, c0 must read. - if p2 has written to mb, c1 must read. -...

Constraints Two mechanisms are supported to specify constraints: 1. Propositions over temporal orders of states –execution is a sequence of states –specify constraints using linear temporal logic –good for functional constraints, e.g. “if process P starts to execute a statement s1, no other process can start the statement until P reaches a statement s2.” 2. Propositions over instances of transitions between states –particular transitions in the current execution: called “actions” –annotate actions with quantity, such as time, power. –specify constraints over actions with respect to the quantities –good for performance constraints, e.g. “any successive actions of starting a statement s1 by process P must take place with at most 10ms interval.”

Netlist after Refinement m1 p0 m0 p1 p3 p2 c1 c0 refm0 w0 mb w1 r0 w0 w1 r0 refm1 // create mb, and then refine m0 and m1. ByteM mb = new ByteM(); RefIntM refm0 = new RefIntM(m0, mb); RefIntM refm1 = new RefIntM(m1, mb); But, we need coordination: - if p0 has written to mb, c0 must read. - if p2 has written to mb, c1 must read Can be specified using the linear temporal logic.

Constraints 1. Propositions over temporal orders of states s1 s2 State variables process: - instances of local variables of called functions - program counter: {beg(s), end(s)} for each statement s medium field instances execution (s1, s2,... ) : a linear (possibly infinite) order of states such that - it starts from the initial state, - each adjacent pair is a transition

Propositions on Temporal Order of States Linear Temporal Logic (LTL): propositions over state variables - temporal operators: X, U, F, G - logical operators: &&, !, ||, ->, - ltl() method to specify constraints Built-in constructs on the LTL: excl, mutex, simul medium M{ word storage; int n, space; void write(word z){ wr: { await(space>0)[this] l1: n=1; space=0; storage=z; } word read(){ rd: { await(n>0)[this] l2: n=0; space=1; return storage; } constraints{ process p, q; ltl(G(pc(p)==beg(wr) -> F(pc(q)==end(rd)))); } constraints{...} can appear anywhere in the meta-model programs.

Constraints 2. Propositions over instances of transitions between states s1 s2 Action: instantiation of a transition in an execution (s1, s2,... ) action a = (p, s c, s n, o) p : process object s c : current value of the program counter of p s n : next value of the program counter of p o : occurrences of the transition s c  s n by p in the execution Quantity: annotated with the set A of actions of the current execution - The domain D of the quantity, e.g. real for the global time - The operations and relations on D, e.g. subtraction, <, = - The relation between D and A, e.g. gt(a) denotes the global time of the action a - Constraints on the quantity and actions, e.g. for all actions a1, a2, if a2 follows a1 in the execution, gt(a1) < gt(a2)

Constraints using Actions public final class Action { process p; pcval sc, sn; int o; } process P1{ port reader pX, pY; port writer pZ; thread(){ while(true){... await(pX.n()>0 && pY.n()>0) [pX.reader,pY.reader] l1: z = f(pX.read(), pY.read()); l2: pZ.write(z);... } constraints{ Action a1, a2; Gtime gt; lfo(a1.p()==a2.p() && a1.sn()==beg(l1) && a2.sn==end(l2) && a1.o()== a2.o() -> gt.gtime(a2) - gt.gtime(a1) < 5); lfo(a1.p()==a2.p() && a1.sn()==beg(l1) && a2.sn==beg(l1) && a2.o()-a1.o()==1 -> gt.gtime(a2) - gt.gtime(a1) < 10); } public class Gtime extends Quantity { static double t; double sub(double t2, double t1){...} boolean equal(double t1, double t2){... } boolean less(double t1, double t2){... } double gtime(Action a){... } constraints{... } } constraints{ maxLatency(l1, l2, 5); maxRate(l1, 10); }

Schedulers Scheduler specifies an algorithm for some constraints. scheduler S1{ port SMsched port0, port1;... void doScheduling(void){ // priority scheduling } P2 M P1 M1 M2 S1 The algorithms are used during simulation. Typically, later in the design phase, thread() is added to a scheduler, –to specify protocols to communicate with the controlled processes, –to call doScheduling() as a sub-routine. At that point, the scheduler becomes a process. Schedulers may be hierarchical.

Execution semantics Normal approach (VHDL, SystemC, …): 1.define simulation algorithm 2.define suitable language and semantics 3.try to synthesize, verify, refine 4.oops… semantics gap! Our approach: 1.define semantics for synthesis, refinement 2.figure out how to simulate it 3.oops… inefficient simulation?

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 netlist constructor - instantiates architectural components, - connects them, - takes as input mapping processes.

Meta-model: mapping processes process P{ port reader X; port writer Y; thread(){ while(true){... z = f(X.read()); Y.write(z); }}} process MapP{ port CpuService Cpu; void readCpu(){ Cpu.exec(); Cpu.cpuRead(); } void mapf(){ …} … } 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

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 … … …

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)

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 relations to a given interface implementation, constitutes a platform of the interface.

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); MyMapNetlist1 MyArchNetl ist MyFncNe tlist M P1 P2 B(P2, M.read) B(P2, mP2.readCpu); E(P2, P2.f) E(mP2, mP2.mapf); M

Execution semantics Processes take actions –statements and function calls are actions e.g. y=x+port.f();, x+port.f(), port.f() –only calls to media functions are observable actions Behaviors are sequences of vectors of events –events are beginning of an action (B port.f()), end of an action (E port.f()), no-op (N), –one event per (sequential) process in a vector A sequence of vectors of events is a legal behavior if it –satisfies all constraints –is accepted by all action automata (one for each action of each process)

B y=x+1 Action automata 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 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 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 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 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 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 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 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 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()); (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 Processes run sequential code concurrently, each at its own arbitrary pace Read-Write and Write-Write hazards may cause unpredictable results –atomicity has to be explicitly specified Progress may block at synchronization points –awaits –function calls and labels to which awaits or LTL constraints refer

Why bother about concurrency and hazards? –they are expensive and dangerous in reality... consider non-determinism and constraints? –want to express design freedom simply and precisely... adopt a new synchronization primitive (await)? –don’t want to bias towards a particular implementation –avoid synchronization objects, talk about actions of processes

Why because we want a framework: that enables synthesis and refinement by allowing precise expression of design space to be explored, in an unbiased way that enables platform-based design by allowing accurate representation of platform capabilities and limitations

Cost Cost C, SystemC, HDL’s all have semantics that reflect their execution engines (CPU, co-routines, event queue) –not suitable for us, –does it improve simulation performance? –NO, simulating the meta-model can be as efficient as any multi-threaded execution

Simulation Task Choose one execution satisfying awaits and constraints Choice may be biased: –to minimize context switching –to discover corner cases –...    

Sequential Simulation Algorithm repeat { pick a process run it for a while } until done C++ JAVA, SystemC pick one enabled process pick several enabled processes, and let JAVA or SystemC decide in which order to execute them until it is blocked until the next synchronization point minimize context switches explore corner cases, parallelize

Metropolis Framework: tools Design Constraints Function Specification Architecture Specification Metropolis Infrastructure Design methodology Meta model of computation Base tools - Design imports - Meta model compiler - Simulation Metropolis Formal Methods: Synthesis/Refinement Metropolis Formal Methods: Analysis/Verification

Formal Models for analysis and synthesis Formal model: derived from the meta-model for applying formal methods Mathematical formulations of the semantics of the meta model: - each construct (‘if’, ‘for’, ‘await’,...) - sequence of statements - composition of connected objects  the semantics may be abstracted Restrictions on the meta model Formal methods (verification and synthesis) applicable on given models

Example of formal model: Petri nets await(pX.n()>=2)[pX.reader] for(i=0; i<2; i++) x[i]=pX.read(); reader_unlock reader_lock pX.n() 2 2 i=0; i<2? x[i]=pX.read(); i++; end of await Formal Methods on Petri nets: analyze the schedulability analyze upper bounds of storage sizes synthesize schedules Restriction: condition inside await is conjunctive.

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

Design automation tools Work in progress: Quasi-static scheduling for multiple processors Hardware synthesis from concurrent processes Processor micro-architecture exploration Communication architecture design (on-chip and off-chip) Fault-tolerant design for safety-critical applications:functionality and architecture definition and mapping Communication buffer memory sizing and allocation

Metropolis Framework Design Constraints Function Specification Architecture Specification Metropolis Infrastructure Design methodology Meta model of computation Base tools - Design imports - Meta model compiler - Simulation Metropolis: Synthesis/Refinement Compile-time scheduling of concurrency Communication-driven hardware synthesis Protocol interface generation Metropolis: Analysis/Verification Static timing analysis of reactive systems Invariant analysis of sequential programs Refinement verification Formal verification of embedded software

Metropolis Infrastructure Meta-Model Language Front End Abstract Syntax Tree Back End Java Simulation Tool Synthesis Tool Verification Tool SystemC Simulation Tool Meta-Model Compiler … …

Summary Metropolis: Interdisciplinary, intercontinental project (10 institutions in 5 countries) Goal: –Design methodologies: abstraction levels, design problem formulations –Design automation tools: formal methods for automatic synthesis and verification, a modeling mechanism: heterogeneous semantics, concurrency Primary thrusts: –Metropolis Meta Model: Building blocks for modular descriptions of heterogeneous semantics Modeling mechanism for function, architecture, and constraints –Design Methodology: Multi-media digital systems Wireless communication Fault-tolerant automotive systems Microprocessors –Formal Methods and design tools etropolis

For more information… Metropolis home page: Updated version of the slides: Additional (free ) advertising: open-source asynchronous implementation of DLX processor, ready for technology map, place and route: