Hardware Design and The Petri Net Abhijit K. Deb SAM, LECS, IMIT, KTH Kista, Stockholm.

Slides:



Advertisements
Similar presentations
Modelos de Computação Básicos Prof. Dr. César Augusto Missio Marcon Parcialmente extraído de trabalhos de Axel Jantch, Edward Lee e Alberto Sangiovanni-Vincentelli.
Advertisements

Finite State Machines (FSMs)
Combinational Logic.
Hardware and Petri nets Symbolic methods for analysis and verification.
Introduction to Petri Nets Hugo Andrés López
A university for the world real R © 2009, Chapter 3 Advanced Synchronization Moe Wynn Wil van der Aalst Arthur ter Hofstede.
Based on: Petri Nets and Industrial Applications: A Tutorial
Interaction Modeling for Testing We would generate the test cases based on our understanding of the interactions that may happen. The source is, again,
1 BalsaOpt a tool for Balsa Synthesis Francisco Fernández-Nogueira, UPC (Spain) Josep Carmona, UPC (Spain)
1 Advanced Digital Design Synthesis of Control Circuits by A. Steininger and J. Lechner Vienna University of Technology.
IE 469 Manufacturing Systems
Petri net modeling of biological networks Claudine Chaouiya.
Synthesis of Embedded Software Using Free-Choice Petri Nets.
Petri Nets Overview 1 Definition of Petri Net C = ( P, T, I, O) Places P = { p 1, p 2, p 3, …, p n } Transitions T = { t 1, t 2, t 3, …, t n } Input.
Hardware and Petri nets: application to asynchronous circuit design Jordi CortadellaUniversitat Politècnica de Catalunya, Spain Michael KishinevskyIntel.
Review of “Embedded Software” by E.A. Lee Katherine Barrow Vladimir Jakobac.
FunState – An Internal Design Representation for Codesign A model that enables representations of different types of system components. Mixture of functional.
Data and Knowledge Representation Lecture 6 Qing Zeng, Ph.D.
Models of Computation for Embedded System Design Alvise Bonivento.
1 Petri Nets Marco Sgroi EE249 - Fall 2001 Most slides borrowed from Luciano Lavagno’s lecture ee249 (1998)
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.
George Mason University ECE 448 – FPGA and ASIC Design with VHDL Finite State Machines State Diagrams, State Tables, Algorithmic State Machine (ASM) Charts,
Asynchronous Circuit Verification and Synthesis with Petri Nets J. Cortadella Universitat Politècnica de Catalunya, Barcelona Thanks to: Michael Kishinevsky.
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.
Petri Nets An Overview IE 680 Presentation April 30, 2007 Renata Kopach- Konrad.
Sequential Circuit  It is a type of logic circuit whose output depends not only on the present value of its input signals but on the past history of its.
Sequential Networks Two major classes of Sequential Circuits 1.Fundamental Mode – A sequential circuit where: Only one input is allowed to change at any.
PETRINETS Nipun Devlekar Zauja Lahtau. PETRINETS DEFINITION : DEFINITION :  PETRINET (place/ transition net): a formal, graphical, executable technique.
CSET 4650 Field Programmable Logic Devices
1 COMP541 State Machines Montek Singh Feb 8, 2012.
Unit 4 Design and Synthesis of Datapath Controllers
Modeling with ordinary Petri Nets Events: Actions that take place in the system The occurrence of these events is controlled by the state of the system.
Digital networks classification Paolo PRINETTO Politecnico di Torino (Italy) University of Illinois at Chicago, IL (USA)
CY2003 Computer Systems Lecture 7 Petri net. © LJMU, 2004CY2003- Week 72 Overview Petri net –concepts –Petri net representation –Firing a transition –Marks.
VHDL IE- CSE. What do you understand by VHDL??  VHDL stands for VHSIC (Very High Speed Integrated Circuits) Hardware Description Language.
Mahapatra-A&M-Fall'001 Co-design Finite State Machines Many slides of this lecture are borrowed from Margarida Jacome.
Petri Nets Lecturer: Roohollah Abdipour. Agenda Introduction Petri Net Modelling with Petri Net Analysis of Petri net 2.
1 Hardware description languages: introduction intellectual property (IP) introduction to VHDL and Verilog entities and architectural bodies behavioral,
Modelling by Petri nets
Modeling Mobile-Agent-based Collaborative Processing in Sensor Networks Using Generalized Stochastic Petri Nets Hongtao Du, Hairong Qi, Gregory Peterson.
ECE-C662 Lecture 2 Prawat Nagvajara
1 Copyright  2001 Pao-Ann Hsiung SW HW Module Outline l Introduction l Unified HW/SW Representations l HW/SW Partitioning Techniques l Integrated HW/SW.
Lecture 11: FPGA-Based System Design October 18, 2004 ECE 697F Reconfigurable Computing Lecture 11 FPGA-Based System Design.
Analysis and Synthesis of Synchronous Sequential Circuits A “synchronizing” pulse/edge signal (clock) controls the operation of the memory portion of the.
CSCI1600: Embedded and Real Time Software Lecture 11: Modeling IV: Concurrency Steven Reiss, Fall 2015.
CAP 4800/CAP 5805: Computer Simulation Concepts
Digital System Design using VHDL
High Performance Embedded Computing © 2007 Elsevier Chapter 1, part 3: Embedded Computing High Performance Embedded Computing Wayne Wolf.
Model Checking Lecture 1. Model checking, narrowly interpreted: Decision procedures for checking if a given Kripke structure is a model for a given formula.
ECE 448 Lecture 6 Finite State Machines State Diagrams vs. Algorithmic State Machine (ASM) Charts.
High Performance Embedded Computing © 2007 Elsevier Lecture 4: Models of Computation Embedded Computing Systems Mikko Lipasti, adapted from M. Schulte.
Week 8 Computational Level
Asynchronous Interface Specification, Analysis and Synthesis
© Copyright 2004, Gaetano Borriello and Randy H. Katz
Dr. Eng Amr T. Abdel-Hamid
2. Specification and Modeling
Clockless Computing COMP
Model-Based Testing Model the system
Week 8 Computational Level
CAP 4800/CAP 5805: Computer Simulation Concepts
CAP 4800/CAP 5805: Computer Simulation Concepts
ECE-C662 Introduction to Behavioral Synthesis Knapp Text Ch
Introduction to Petri Nets (PNs)
Lecture 17 Logistics Last lecture Today HW5 due on Wednesday
CAP 4800/CAP 5805: Computer Simulation Concepts
Lecture 17 Logistics Last lecture Today HW5 due on Wednesday
Petri Net :Abstract formal model of information flow Major use:
Design Methodology & HDL
CSCI1600: Embedded and Real Time Software
Presentation transcript:

Hardware Design and The Petri Net Abhijit K. Deb SAM, LECS, IMIT, KTH Kista, Stockholm

Abhijit K. Deb2 Outline  Petri net and HW design  Characteristics  Simulation  Example: A set of communicating FSM  Verification  Conclusion

Abhijit K. Deb3 Petri Net and HW Modeling  Petri net is a general formalism to represent discrete event systems  For HW design, Petri net has been used in many different ways:  synthesis  HW/SW partitioning  simulation & verification

Abhijit K. Deb4 Petri Net Characteristics  Parallelism or concurrency is modeled better in a Petri net  The composition of state machines is complex; composition of Petri nets is simple  Petri nets are asynchronous in nature, however when synchronization is needed, that is also easy to model  There is no inherent measure of time in a Petri net

Abhijit K. Deb5 Synthesis using Petri Net Verilog STG Mapped Netlist VL2aSTG petrify C2 C3 C1 C2 C3 C1 clock

Abhijit K. Deb6 Simulation  Often, systems are modeled as a set of communicating FSMs  Problem:  FSMs are good for modeling sequential behavior but modeling concurrency and memory is difficult  state explosion  data value

Abhijit K. Deb7 Forming the Petri Net  Each state of the communicating FSMs are represented by a place, called state-place.  All synchronization signals are represented by two places:  a high place  a low place  A token can not exist in both of the places and both places can not be empty as well  Arcs are drawn between input places to transitions and transitions to output places  Reset signal gives the initial distribution of tokens in different places

Abhijit K. Deb8 FSM - PN FSM Representation – / cs=0, rws=0 sel=1, wr=1 / cs=1, rws=1 t1 cs t2 S2 S1 cs rws wr sel S1S2 Petri Net Representation

Abhijit K. Deb9 Timing  Introduce clock-place to represent time  The clock-place is an input place for all transitions synchronous with that clock  Appearance of token in a clock-place represent the arrival of a clock edge and advances simulation time  For a system with multiple clocks, multiple clock-places are needed, where tokens appear according to the ratio of the speeds of the clocks involved

Abhijit K. Deb10 Handling Data  Storage (e.g., memory, register) and interconnect (e.g., bus) hold data  Data signals are viewed as placeholders  The placeholders can be of different type, an integer, array or a composite type like a record  They are updated with a transition firing either by an assignment operation or by a C-function call

Abhijit K. Deb11 Simulation Procedure 1.incidence matrix is formed for the Petri net derived from the FSM description of the system 2.reset signal gives the initial states of the signals and the communicating FSMs 3.clock place gets tokens to advance simulation time 4.using the present state of the net, enabled transitions are marked, that gives the firing vector 5.enabled transition(s) can be fired at any order 6.next state of the system is computed using the following: x’ = x + uA 7.based on the new state, if a given condition is true then update the placeholders for data values using an assignment operation or a C function call 8.repeat from step 3 as long as there are enabled transitions 1.incidence matrix is formed for the Petri net derived from the FSM description of the system 2.reset signal gives the initial states of the signals and the communicating FSMs 3.clock place gets tokens to advance simulation time 4.using the present state of the net, enabled transitions are marked, that gives the firing vector 5.enabled transition(s) can be fired at any order 6.next state of the system is computed using the following: x’ = x + uA 7.based on the new state, if a given condition is true then update the placeholders for data values using an assignment operation or a C function call 8.repeat from step 3 as long as there are enabled transitions

Abhijit K. Deb12 A Network of FSM G1 G3 G2 G4 G n-1 1 ………… reqFrm2=1 / Grant2 =1 reqFrm1 =0 reqFrm1=1 / Grant1 =1 reqFrm1 =0 / Grant1 =0 reqFrm2 =0 GnGn reqFrm2=0 / Grant2 =0 Arbiter IO_wr =1 / reqFrm2 =1 IO_rd =1 / reqFrm2=1 Grant2 =1 / rdReq =1 Ack =1 / rdReq =0 Ack = 0 / dtRdy = 0 reqFrm2 =0 Ack =1 / wrReq =0 dtRdy = 1 Grant2 =1/ wrReq =1 dtRdy = 1 / Ack = 1 C1C2 C7 C3C6C4 C5C8 Core dtRdy =0 / Ack = 0 reqFrm2 =0 M1 M4 M2 M3 dtRdy = 1 / Ack =0 rdReq = 0 / Ack = 0 dtRdy =1 rdReq =1 / Ack =1 wrReq = 1 / Ack = 1 Memory Ack =1 / dtRdy = 0

Abhijit K. Deb13 The Arbiter ClCl ChCh BlBl BhBh AlAl AhAh

Abhijit K. Deb14 Petri net Representation wrRq M1 M2 C2 C3 A2 A1 busRq grant wrRq IO_wr C1 Memory Core arbiter t6 t5 t4 t3 t2 t1

Abhijit K. Deb15 Petri net Representation wrRq M1 M2 C2 C3 A2 A1 busRq grant wrRq IO_wr C1 Memory Core arbiter t6 t5 t4 t3 t2 t1

Abhijit K. Deb16 Petri net Representation wrRq M1 M2 C2 C3 A2 A1 busRq grant wrRq IO_wr C1 Memory Core arbiter t6 t5 t4 t3 t2 t1

Abhijit K. Deb17 Petri net Representation wrRq M1 M2 C2 C3 A2 A1 busRq grant wrRq IO_wr C1 Memory Core arbiter t6 t5 t4 t3 t2 t1

Abhijit K. Deb18 Petri net Representation wrRq M1 M2 C2 C3 A2 A1 busRq grant wrRq IO_wr C1 Memory Core arbiter t6 t5 t4 t3 t2 t1

Abhijit K. Deb19 Petri net Representation wrRq M1 M2 C2 C3 A2 A1 busRq grant wrRq IO_wr C1 Memory Core arbiter t6 t5 t4 t3 t2 t1

Abhijit K. Deb20 Petri net Representation wrRq M1 M2 C2 C3 A2 A1 busRq grant wrRq IO_wr C1 Memory Core arbiter t6 t5 t4 t3 t2 t1

Abhijit K. Deb21 Specification Verification  Conservation: One token must exist in one of the high or low place of a signal, both of them can not be empty simultaneously.  Boundedness: Tokens can not grow in one of the places.  Safety property: the system will not get into a specific undesirable configuration, e.g., a deadlock or the emission of undesired output.  Liveness property: Some desired configuration will be visited eventually or infinitely often (fairness).

Abhijit K. Deb22 Conclusion  Systems can be simulated using Petri nets  The Petri net representation is bounded  The number of places is the summation of all the states plus twice the number of all the synchronization signals  Provides the necessary glue between different parts of the system, which is needed to perform a system simulation  The simulation shows dynamic behavior of the system  It is possible to perform certain specification verification using Petri net

Abhijit K. Deb23 Thank You!  Questions?