Timing-Based Communication Refinement for CFSMs Presenters:Heloise Hse, Irene Po Mentors:Jonathan Martin, Marco Sgroi Professor:Alberto Sangiovanni-Vincentelli.

Slides:



Advertisements
Similar presentations
System Integration and Performance
Advertisements

PROTOCOL VERIFICATION & PROTOCOL VALIDATION. Protocol Verification Communication Protocols should be checked for correctness, robustness and performance,
Memory Management Chapter 7.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 38 Frame Allocation Read.
Virtual Memory Introduction to Operating Systems: Module 9.
I MPLEMENTING S YNCHRONOUS M ODELS ON L OOSELY T IME T RIGGERED A RCHITECTURES Discussed by Alberto Puggelli.
Efficient Software Performance Estimation Methods for Hardware/Software Codesign Kei Suzuki Alberto Sangiovanni-Vincentelli Present: Yanmei Li.
PTIDES: Programming Temporally Integrated Distributed Embedded Systems Yang Zhao, EECS, UC Berkeley Edward A. Lee, EECS, UC Berkeley Jie Liu, Microsoft.
1 Chapter Five The Processor: Datapath and Control.
Ordering and Consistent Cuts Presented By Biswanath Panda.
12a.1 Introduction to Parallel Computing UNC-Wilmington, C. Ferner, 2008 Nov 4, 2008.
Using Interfaces to Analyze Compositionality Haiyang Zheng and Rachel Zhou EE290N Class Project Presentation Dec. 10, 2004.
Scheduling for Embedded Real-Time Systems Amit Mahajan and Haibo.
Mahapatra-Texas A&M-Fall'001 cosynthesis Introduction to cosynthesis Rabi Mahapatra CPSC498.
CS 104 Introduction to Computer Science and Graphics Problems
FunState – An Internal Design Representation for Codesign A model that enables representations of different types of system components. Mixture of functional.
AR vs. CFSM Abdallah Tabbara. CFSM Overview 4 CFSM has: –a finite state machine part –a data computation part –a locally synchronous behavior transitions.
1 Quasi-Static Scheduling of Embedded Software Using Free-Choice Petri Nets Marco Sgroi, Alberto Sangiovanni-Vincentelli Luciano Lavagno University of.
Software Engineering, COMP201 Slide 1 Protocol Engineering Protocol Specification using CFSM model Lecture 30.
Models of Computation for Embedded System Design Alvise Bonivento.
1 Lecture 14: FSM and Basic CPU Design Today’s topics:  Finite state machines  Single-cycle CPU Reminder: midterm on Tue 10/24  will cover Chapters.
1 System Modeling. Models of Computation. System Specification Languages Alexandru Andrei.
Mahapatra-A&M-Sprong'021 Co-design Finite State Machines Many slides of this lecture are borrowed from Margarida Jacome.
01/27/2005 Combinationality of cyclic definitions EECS 290A – Spring 2005 UC Berkeley.
CSCI2413 Lecture 6 Operating Systems Memory Management 2 phones off (please)
State Minimization and Determinization EECS 290A Sequential Logic Synthesis and Verification.
Software Testing and QA Theory and Practice (Chapter 10: Test Generation from FSM Models) © Naik & Tripathy 1 Software Testing and Quality Assurance Theory.
Time, Clocks, and the Ordering of Events in a Distributed System Leslie Lamport (1978) Presented by: Yoav Kantor.
Logical Clocks (2). Topics r Logical clocks r Totally-Ordered Multicasting r Vector timestamps.
Advances in Language Design
02/06/05 “Investigating a Finite–State Machine Notation for Discrete–Event Systems” Nikolay Stoimenov.
- 1 - Embedded Systems—State charts Specifications.
- 1 -  P. Marwedel, Univ. Dortmund, Informatik 12, 2005/6 Universität Dortmund Some general properties of languages 1. Synchronous vs. asynchronous languages.
Hardware Supported Time Synchronization in Multi-Core Architectures 林孟諭 Dept. of Electrical Engineering National Cheng Kung University Tainan, Taiwan,
Model-based Methods for Web Service Verification.
CHAPTER 2: COMPUTER-SYSTEM STRUCTURES Computer system operation Computer system operation I/O structure I/O structure Storage structure Storage structure.
- 1 - Embedded Systems - SDL Some general properties of languages 1. Synchronous vs. asynchronous languages Description of several processes in many languages.
Lecture 3 Process Concepts. What is a Process? A process is the dynamic execution context of an executing program. Several processes may run concurrently,
CprE / ComS 583 Reconfigurable Computing Prof. Joseph Zambreno Department of Electrical and Computer Engineering Iowa State University Lecture #21 – HW/SW.
Mahapatra-A&M-Fall'001 Co-design Finite State Machines Many slides of this lecture are borrowed from Margarida Jacome.
Submodule construction in logics 1 Gregor v. Bochmann, University of Ottawa Using First-Order Logic to Reason about Submodule Construction Gregor v. Bochmann.
Communicating Real-Time State Machines (CRSM) State machines that communicate synchronously Unique unidirectional channels are used for the communication.
Hardware Design and The Petri Net Abhijit K. Deb SAM, LECS, IMIT, KTH Kista, Stockholm.
EEC 688/788 Secure and Dependable Computing Lecture 10 Wenbing Zhao Department of Electrical and Computer Engineering Cleveland State University
D u k e S y s t e m s Asynchronous Replicated State Machines (Causal Multicast and All That) Jeff Chase Duke University.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 4 Computer Systems Review.
CSC 322 Operating Systems Concepts Lecture - 7: by Ahmed Mumtaz Mustehsan Special Thanks To: Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall,
Building Dependable Distributed Systems, Copyright Wenbing Zhao
Page Buffering, I. Pages to be replaced are kept in main memory for a while to guard against poorly performing replacement algorithms such as FIFO Two.
/ PSWLAB Thread Modular Model Checking by Cormac Flanagan and Shaz Qadeer (published in Spin’03) Hong,Shin Thread Modular Model.
High Performance Embedded Computing © 2007 Elsevier Lecture 4: Models of Computation Embedded Computing Systems Mikko Lipasti, adapted from M. Schulte.
1 Page Replacement Algorithms. 2 Virtual Memory Management Fundamental issues : A Recap Key concept: Demand paging  Load pages into memory only when.
Parallel and Distributed Simulation Deadlock Detection & Recovery.
Page 1 8/29/2001 Reachability Analysis CFSM: Communicating Finite State Machines C1 C2 +A+A Sender 2 1 -R-R +R+R -A-A Receiver 2 1 CFSM Communicating Finite.
Memory Hierarchy Ideal memory is fast, large, and inexpensive
Queues.
Advantages of FSM Their simplicity make it easy for inexperienced developers to implement with little to no extra knowledge (low entry level)
Background on the need for Synchronization
Introduction to cosynthesis Rabi Mahapatra CSCE617
OverView of Scheduling
Module 2: Computer-System Structures
The Von Neumann Model Basic components Instruction processing
Outline Module 1 and 2 dealt with processes, scheduling and synchronization Next two modules will deal with memory and storage Processes require data to.
Module 2: Computer-System Structures
Review material on discrete event systems I
Chapter Four The Processor: Datapath and Control
State Abstraction Techniques for the Verification of Reactive Circuits
Module 2: Computer-System Structures
Module 2: Computer-System Structures
Presentation transcript:

Timing-Based Communication Refinement for CFSMs Presenters:Heloise Hse, Irene Po Mentors:Jonathan Martin, Marco Sgroi Professor:Alberto Sangiovanni-Vincentelli EE249 Course Project

Outline Problem descriptions Rendezvous based communication Buffer sizing Mixed HW/SW implementation with CPU contention Unresolved Issues Conclusion

Problem Descriptions Currently, CFSM networks in Polis use one- place buffer Non-blocking write If sender CFSM module sends faster than receiver can receive, events may be overwritten / lost

Rendezvous Based Communication Start with a rendezvous based specification –safe: events do not get lost –inefficient: senders have to wait until receivers are ready before sending more data Relax to bounded buffers wherever possible –use minimal buffer sizes –maintain lossless communication –preserve input-output behavior

Overview CFSM1CFSM2 CFSM3CFSM4 FSM3FSM4 FSM1FSM2... CFSM1CFSM2 CFSM3CFSM4...

Sizing Buffers Translate each CFSM module into an FSM using translator in Polis If state transition times are different, normalize the transition time by adding intermediate states AE BCD AE B C D

Sizing Buffers Model each buffer as a FSM Compute the set of reachable states of the network from the transition relations using implicit state enumeration techniques R 0 =  R k+1 = R 0 V  (x,i)[R k  T(x,i,y)] R * = R k if R k+1 = R k “Sizing and Verification of Communication Buffers for Communicating Processes” by Tilman Kolks, Bill Lin, and Hugo de Man

Sizing Buffers Derive the set of reachable states for each communication buffer Determine the minimum buffer size from the reachable states of the buffer

Clock Handling Define a global “clock” (G c ) with frequency equal to the least common multiple of all frequencies f i (f i = clock frequency of FSM F i ) A FSM makes a transition only when it is active original transition (i, s) -> s’ replace by (i  active i, s) -> s’ (i  ¬active i, s)->s

Buffer Modeling Model buffers as counters (FSMs) –start with an estimated size for each buffer –increment buffer on write, decrement on read Initial buffer offset = 0 next state function: adder/subtracter add an output function to the buffer B i – i over = 1, iff an overflow condition occurs –expand the counters dynamically during state traversal when necessary

Reachable Buffer States Build transition relations for every FSM F i and buffer B k Build the transition relation (T C ) of the product machine over variables of the network Obtain the reachable state set from T C Expand the counters (buffers) dynamically during the state space traversal by adding an additional state variable if an overflow occurs

Minimum Buffer Size Derive the set of all reachable buffers states by existentially quantifying over all non-buffer state variables Derive the set of reachable states for a particular buffer by existentially quantifying (abstracting) out the other buffer states Determine the minimum buffer size from the largest value of the counter state

Mixed HW/SW Implementation with CPU Contention If several processes are sharing a CPU, there may be contention due to resource sharing Therefore we need to modify the buffer sizes to accommodate this case Sender Receiver

CPU Contention Assume the CFSM network is a DAG and there are no feedback signals To obtain safe minimum buffer size, assume –all the modules before and including the sender send at the fastest rate possible (i.e. get CPU right when it wants to execute) –receiver receives at the slowest rate (i.e. at end of queue every time it wants to execute) Size buffer one at a time HW/SW SW with CPU contection...

CPU Contention Build the reachable states table for processes that are sharing the same CPU Assume scheduler is FIFO For each state in an FSM –look at the possible states that other FSMs can be in, and put those processes in the front of the queue –Compute worst case waiting time P1 P2 P3 S1 S2S3 S1 S2 S3’ S1...

CPU Contention Compute worst case execution time (original execution time + worst case waiting time) and update the transition times in the original “FSM” For each “FSM”, again normalize the transition time by adding intermediate states Apply the buffer sizing algorithm on the normalized FSM’s

CPU Contention AE BCD AE B C D

Issues: Abstraction State explosion problem during implicit state enumeration One solution: abstracting away non-buffer variables during state traversal – may lose relevant information for buffer sizing when environment is control-dominated in which events depend on both time and value –need to abstract away variables in a smart way

Issues: Environment Modeling In original buffer sizing algorithm, no assumption is made about the environment Approach is very conservative and buffers may be oversized Hard to model the environment Possible solution: given all properties of the environment or test vectors of all possible input patterns, model the environment as an FSM, and then apply the algorithm in the paper

Conclusions We presented an algorithm to find minimum- sized buffers between CFSM modules while maintaining lossless communication The case of CPU contention has been considered