IAY 0600 Digitaalsüsteemide disain FSM Decomposition Synthesis Lab. 6 Alexander Sudnitson Tallinn University of Technology.

Slides:



Advertisements
Similar presentations
Introduction to Sequential Circuits
Advertisements

TOPIC : Finite State Machine(FSM) and Flow Tables UNIT 1 : Modeling Module 1.4 : Modeling Sequential circuits.
Give qualifications of instructors: DAP
Linkage Problem, Distribution Estimation, and Bayesian Networks Evolutionary Computation 8(3) Martin Pelikan, David E. Goldberg, and Erick Cantu-Paz.
CS 151 Digital Systems Design Lecture 37 Register Transfer Level
Winter 2007SEG2101 Chapter 41 Chapter 4 SDL – Structure and Behavior.
Date:2011/06/08 吳昕澧 BOA: The Bayesian Optimization Algorithm.
HMM-BASED PATTERN DETECTION. Outline  Markov Process  Hidden Markov Models Elements Basic Problems Evaluation Optimization Training Implementation 2-D.
ECE 331 – Digital System Design Introduction to and Analysis of Sequential Logic Circuits (Lecture #20) The slides included herein were taken from the.
ADDITIONAL ANALYSIS TECHNIQUES LEARNING GOALS REVIEW LINEARITY The property has two equivalent definitions. We show and application of homogeneity APPLY.
Combinational Circuits
Chapter 4 Gates and Circuits.
Dr. Turki F. Al-Somani VHDL synthesis and simulation – Part 3 Microcomputer Systems Design (Embedded Systems)
Mehdi Amirijoo1 Power estimation n General power dissipation in CMOS n High-level power estimation metrics n Power estimation of the HW part.
George Mason University ECE 448 – FPGA and ASIC Design with VHDL Finite State Machines State Diagrams, State Tables, Algorithmic State Machine (ASM) Charts,
ECE 301 – Digital Electronics Introduction to Sequential Logic Circuits (aka. Finite State Machines) and FSM Analysis (Lecture #17)
ECE 331 – Digital Systems Design Introduction to Sequential Logic Circuits (aka. Finite State Machines) and FSM Analysis (Lecture #19)
Lecture 10 Topics: Sequential circuits Basic concepts Clocks
FPGA-Based System Design: Chapter 5 Copyright  2004 Prentice Hall PTR Topics n Basics of sequential machines. n Sequential machine specification. n Sequential.
Sequential Networks Two major classes of Sequential Circuits 1.Fundamental Mode – A sequential circuit where: Only one input is allowed to change at any.
(2.1) Fundamentals  Terms for magnitudes – logarithms and logarithmic graphs  Digital representations – Binary numbers – Text – Analog information 
Chapter 4 Gates and Circuits. 4–2 Chapter Goals Identify the basic gates and describe the behavior of each Describe how gates are implemented using transistors.
Digital Computer Design Fundamental
Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. Terms of Use (Hyperlinks are active in View Show mode) Terms of Use Lecture 12 – Design Procedure.
COE4OI5 Engineering Design. Copyright S. Shirani 2 Course Outline Design process, design of digital hardware Programmable logic technology Altera’s UP2.
Shashi Kumar 1 Logic Synthesis: Course Introduction Shashi Kumar Embedded System Group Department of Electronics and Computer Engineering Jönköping Univ.
Models of Computation: FSM Model Reading: L. Lavagno, A.S. Vincentelli and E. Sentovich, “Models of computation for Embedded System Design”
Combinational Logic Design BIL- 223 Logic Circuit Design Ege University Department of Computer Engineering.
Some Probability Theory and Computational models A short overview.
Constraint Satisfaction Problems (CSPs) CPSC 322 – CSP 1 Poole & Mackworth textbook: Sections § Lecturer: Alan Mackworth September 28, 2012.
IAY 0600 Digitaalsüsteemide disain Register Transfer Level Design (GCD example) Lab. 7 Alexander Sudnitson Tallinn University of Technology.
1 2-Hardware Design Basics of Embedded Processors (cont.)
1 Seoul National University Logic Design. 2 Overview of Logic Design Seoul National University Fundamental Hardware Requirements  Computation  Storage.
1 Sequential Machine Theory Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 1 Adaptation to this.
Module : FSM Topic : types of FSM. Two types of FSM The instant of transition from the present to the next can be completely controlled by a clock; additionally,
Chapter 0 deSiGn conCepTs EKT 221 / 4 DIGITAL ELECTRONICS II.
Chun-Yao Wang ( 王俊堯 ) 2011/12/16 Department of Computer Science, National Tsing Hua University Hsinchu, Taiwan, R.O.C.
Fall 2004EE 3563 Digital Systems Design EE 3563 VHSIC Hardware Description Language  Required Reading: –These Slides –VHDL Tutorial  Very High Speed.
Weikang Qian. Outline Intersection Pattern and the Problem Motivation Solution 2.
© 2005 Prentice Hall1-1 Stumpf and Teague Object-Oriented Systems Analysis and Design with UML.
VHDL Discussion Finite State Machines
Lecture 11: FPGA-Based System Design October 18, 2004 ECE 697F Reconfigurable Computing Lecture 11 FPGA-Based System Design.
EE 5900 Advanced Algorithms for Robust VLSI CAD, Spring 2009 Combinational Circuits.
Courtesy RK Brayton (UCB) and A Kuehlmann (Cadence) 1 Logic Synthesis Multi-Level Logic Synthesis.
VHDL Discussion Finite State Machines IAY 0600 Digital Systems Design Alexander Sudnitson Tallinn University of Technology 1.
Finite State Machines (FSM) OR Finite State Automation (FSA) - are models of the behaviors of a system or a complex object, with a limited number of defined.
Digital System Design using VHDL
IAY 0600 Digital Systems Design Register Transfer Level Design (GCD example) Lab. 7 Alexander Sudnitson Tallinn University of Technology.
ECE 448 Lecture 6 Finite State Machines State Diagrams vs. Algorithmic State Machine (ASM) Charts.
Digital Design with SM Charts
IAY 0600 Digital Systems Design
Combinational Logic Design
Finite state machine optimization
Finite state machine optimization
Register Transfer Specification And Design
Sequential logic design principles
Introduction Introduction to VHDL Entities Signals Data & Scalar Types
IAY 0600 Digital Systems Design
IAY 0600 Digital Systems Design
IAY 0600 Digital Systems Design
Chapter 4 Gates and Circuits.
IAY 0800 Digitaalsüsteemide disain
Chapter 3 – Combinational Logic Design
IAS 0600 Digital Systems Design
IAS 0600 Digital Systems Design
Combinational Circuits
Combinational Circuits
EGR 2131 Unit 12 Synchronous Sequential Circuits
Markov Chains and Markov Processes
Presentation transcript:

IAY 0600 Digitaalsüsteemide disain FSM Decomposition Synthesis Lab. 6 Alexander Sudnitson Tallinn University of Technology

Decomposition motivation 2 Often convenient to realize a sequential circuit as an interconnection of sub-circuits that realize the same terminal behavior A large hardware behavioral description is decomposed into several smaller ones First, decide on how the overall circuit is to be broken up and what function each of the sub-circuits must serve Then, treat each of the sub-circuits as a separate and independent design problem. One goal is to make the synthesis problem more tractable by providing smaller sub-problems that can be solved efficiently. Another goal is to create descriptions that can be synthesized into a structure that meets the design constraints.

FSM decomposition problem 3 Commonly, FSM decomposition problem is a task of replacement of given prototype FSM with a network of interconnected and interacting component machines, which has the same terminal behaviour. Hardware behavior description is decomposed into a network of interconnected FSMs targeting optimization by various criteria (performance, measurements, power consumption). FSM inputs outputs n Sub-FSM 2 Sub-FSM 1 Network of FSMs outputs inputs

FSM decomposition approaches  In the past, synthesis focused on quality measures based on area and performance. The continuing decrease in feature size and increase in chip density in recent years have given rise to consider decomposition theory for low power as new dimension of the design process.  A range of decomposition techniques has been proposed for the register transfer level optimization of circuits for low power. Various FSM decomposition techniques can broadly fall into two categories: additive decomposition and multiplicative decomposition. 4

(c) Giovanni De Micheli 5 Dynamic power management  Systems and components are:  Designed to deliver peak performance, but …  Not needing peak performance most of the time  Dynamic power management (DPM):  Shut-down idle components  Dynamic voltage scaling (DVS)  Slow-down components, by scaling down frequency and voltage

Additive decomposition  The main idea of additive decomposition is that the special “idle” state is added to each of sub-FSMs. Only one of sub-FSMs in the decomposed network is working in a time while all the others are suspended (stay in their “idle or sleeping” states).  The network of interacting sub-FSMs corresponds to a given partition on the set of states of prototype FSM.  The number of blocks in the partition defines number of sub-FSMs in the network.  The number of states of each sub-FSM is equal to the number of states in the corresponded block of partition plus one “idle” state. 6

Applet 7

8 Example FSM Present state Next state Input condition Output signalsh s1s1 s1s1 x1x1 y7y7 1 s3s3 ^x s2s2 s3s3 1y 10 y 11 3 s3s3 s6s6 x7x7 4 s8s8 ^x 7 & x s2s2 ^x 7 & ^x 8 y 2 y 5 y 10 6 s4s4 s1s1 x 1 & x 3 y 3 y 4 7 s3s3 x 1 & ^x 3 y 1 y 3 y 4 8 s7s7 ^x 1 & x 2 y 3 y 4 9 s4s4 ^x 1 & ^x 2 y1y1 10 s5s5 s4s4 x 4 & x 6 y 6 y s5s5 x 4 & ^x 6 y 6 y s8s8 ^x 4 y 6 y 8 13 s6s6 s2s2 x5x5 y 10 y s3s3 ^x 5 & x 7 y s8s8 ^x 5 & ^x 7 y 10 y s7s7 s5s5 1y1y1 17 s8s8 s8s8 x6x s5s5 ^x 6 y 9 y As an example, we use presented Mealy FSM with S={ s 1, s 2, …, s 8 } - set of states, X={x 1, x 2, …, x 8 } - set of binary input variables (channels), Y= {y 1, y 2, …, y 14 } - set of binary output variables (channels) x1x1 x2x2 x8x8 y1y1 y2y2 y 14

9 FSM description Present state Next state Input conditionOutput signals h s4s4 s1s1 x 1 & x 3 y 3 y 4 7 s3s3 x 1 & ^x 3 y 1 y 3 y 4 8 s7s7 ^x 1 & x 2 y 3 y 4 9 s4s4 ^x 1 & ^x 2 y1y1 10 Present state Next state x 1 x 2 x 3 x 4 x 5 x 6 x 7 x 8 y 1 y 2 y 3 y 4 … y 13 y 14 h s4s4 s1s s3s s7s s4s Here Input conditions (Boolean functions) presented using cubes. Each cube corresponds to the set of input patterns. x1x1 x2x2 x8x8 y1y1 y2y2 y 14 x3x3 y3y3 y4y4 The search for the next state means the evaluation of the Boolean functions. It is necessary to evaluate which of these functions has value “true” for a given input combination  from {0, 1} 8.

Partition 10 A partition of a set S is collection of nonempty and pairwise disjoint subsets of S which exhaust the set S. We can give a diagrammatic representation of partitions. If the set S is represented by an enclosed area on paper, we can draw lines to divide the area into nonoverlapping regions. Each region of the resulting diagram will correspond to a block of partition. Distinct partition of S induce distinct equivalence relation on a set S. Example: S={ s 1, s 2, …, s 8 }  ={ { s 1, s 4, s 7 }, { s 2, s 3, s 6 }, { s 5, s 8 } }

Decomposition procedure 11 1)Generation of the initial partition 2)Definition of states in component FSMs 3)Definition of the set of external input variables of component FSM 4)Generation of the set of the set of internal (additional) input variables 5)Definition of the set of output variables of component FSMs 6)Generation of transition and output functions of component FSMs 7)Realization of FSM network.

Additive decomposition basics 12 Additive decomposition put network N with n component FSM in accordance to pair (A,  ). The number of component FSM is equal to the number of blocks in the partition . A is a given FSM. As example, we use partition,  = { { s 1, s 4, s 7 }, { s 2, s 3, s 6 }, { s 5, s 8 } } So, in this case there will be three component FSM B 1, B 2 and B 2, since there are three blocks ( B 1, B 2 and B 3 ) in the partition .

413 Decomposition example Present state Next state Input condition Output signalsh s1s1 s1s1 x1x1 y7y7 1 s3s3 ^x 1 -2 s2s2 s3s3 1y 10 y 11 3 s3s3 s6s6 x7x7 4 s8s8 ^x 7 & x 8 -5 s2s2 ^x 7 & ^x 8 y 2 y 5 y 10 6 s4s4 s1s1 x 1 & x 3 y 3 y 4 7 s3s3 x 1 & ^x 3 y 1 y 3 y 4 8 s7s7 ^x 1 & x 2 y 3 y 4 9 s4s4 ^x 1 & ^x 2 y1y1 10 s5s5 s4s4 x 4 & x 6 y 6 y s5s5 x 4 & ^x 6 y 6 y s8s8 ^x 4 y 6 y 8 13 s6s6 s2s2 x5x5 y 10 y s3s3 ^x 5 & x 7 y s8s8 ^x 5 & ^x 7 y 10 y s7s7 s5s5 1y1y1 17 s8s8 s8s8 x6x6 -18 s5s5 ^x 6 y 9 y { { s 1, s 4, s 7 }, { s 2, s 3, s 6 }, { s 5, s 8 } }

414 Decomposition example Present state Next state Input condition Output signalsh s1s1 s1s1 x1x1 y7y7 1 s3s3 ^x 1 -2 s2s2 s3s3 1y 10 y 11 3 s3s3 s6s6 x7x7 4 s8s8 ^x 7 & x 8 -5 s2s2 ^x 7 & ^x 8 y 2 y 5 y 10 6 s4s4 s1s1 x 1 & x 3 y 3 y 4 7 s3s3 x 1 & ^x 3 y 1 y 3 y 4 8 s7s7 ^x 1 & x 2 y 3 y 4 9 s4s4 ^x 1 & ^x 2 y1y1 10 s5s5 s4s4 x 4 & x 6 y 6 y s5s5 x 4 & ^x 6 y 6 y s8s8 ^x 4 y 6 y 8 13 s6s6 s2s2 x5x5 y 10 y s3s3 ^x 5 & x 7 y s8s8 ^x 5 & ^x 7 y 10 y s7s7 s5s5 1y1y1 17 s8s8 s8s8 x6x6 -18 s5s5 ^x 6 y 9 y { { s 1, s 4, s 7 }, { s 2, s 3, s 6 }, { s 5, s 8 } }

The set of states of (component) sub-FSM An initial partition of example FSM decomposition is  = { { s 1, s 4, s 7 }, { s 2, s 3, s 6 }, { s 5, s 8 } } Set of states in the m-component FSM is defined as: S m = B m  {a m } B m - is the block of the partition , a m - is the additional state that exists in each component FSM. So, in our example: S 1 = { s 1, s 4, s 7, a 1 } S 2 = { s 2, s 3, s 6, a 2 } S 3 = { s 5, s 8, a 3 } The set of states in the component FSM contains the corresponding block of the partition  plus one additional state a. 15

16 External input variables The set of external input variables of m-component FSM is the set of input variables at all transitions from the states of block B m in the transition table of the prototype FSM A. In our example, with partition { { s 1, s 4, s 7 }, { s 2, s 3, s 6 }, { s 5, s 8 } } corresponding sets of external input variables are X(B 1 ) = { x 1, x 2, x 3 } X(B 2 ) = { x 5, x 7, x 8 } X(B 3 ) = { x 4, x 6 } Present state Input conditionh s1s1 x1x1 1 ^x 1 2 s2s2 13 s3s3 x7x7 4 ^x 7 & x 8 5 ^x 7 & ^x 8 6 s4s4 x 1 & x 3 7 x 1 & ^x 3 8 ^x 1 & x 2 9 ^x 1 & ^x 2 10 s5s5 x 4 & x 6 11 x 4 & ^x 6 12 ^x 4 13 s6s6 x5x5 14 ^x 5 & x 7 15 ^x 5 & ^x 7 16 s7s7 117 s8s8 x6x6 18 ^x 6 19

17 External output variables The set of external output variables of m-component FSM is the set of output variables at all transitions from the states of block B m in the transition table of the prototype FSM A. In our example, with partition { { s 1, s 4, s 7 }, { s 2, s 3, s 6 }, { s 5, s 8 } } corresponding sets of external input variables are In our example: Y(B 1 ) = { y 1, y 3, y 4, y 7 } Y(B 2 ) = { y 2, y 5, y 10, y 11, y 12 } Y(B 3 ) = { y 6, y 8, y 9, y 13, y 14 } Present state Output signalsh s1s1 y7y s2s2 y 10 y 11 3 s3s y 2 y 5 y 10 6 s4s4 y 3 y 4 7 y 1 y 3 y 4 8 y 3 y 4 9 y1y1 10 s5s5 y 6 y y 6 y y 6 y 8 13 s6s6 y 10 y y y 10 y s7s7 y1y1 17 s8s8 -18 y 9 y 14 19

18 Generation of transitions of component FSMs (the first sub-FSM) Present state Next state Input condition Output signalsh s1s1 s1s1 x1x1 y7y7 1 s3s3 ^x s2s2 s3s3 1y 10 y 11 3 s3s3 s6s6 x7x7 4 s8s8 ^x 7 & x s2s2 ^x 7 & ^x 8 y 2 y 5 y 10 6 s4s4 s1s1 x 1 & x 3 y 3 y 4 7 s3s3 x 1 & ^x 3 y 1 y 3 y 4 8 s7s7 ^x 1 & x 2 y 3 y 4 9 s4s4 ^x 1 & ^x 2 y1y1 10 s5s5 s4s4 x 4 & x 6 y 6 y s5s5 x 4 & ^x 6 y 6 y s8s8 ^x 4 y 6 y 8 13 s6s6 s2s2 x5x5 y 10 y s3s3 ^x 5 & x 7 y s8s8 ^x 5 & ^x 7 y 10 y s7s7 s5s5 1y1y1 17 s8s8 s8s8 x6x s5s5 ^x 6 y 9 y z4z4 z3z3 z3z3 z5z5 { { s 1, s 4, s 7 }, { s 2, s 3, s 6 }, { s 5, s 8 } }

The first sub-FSM 19 B 1 x1x1 z4z4 x2x2 x3x3 y 1 y 3 y 4 y 7 z3z3 z5z5

Transition table of the first sub-FSM 20 s4s1s7s5s3s5 B3B3 B2B2 B3B3 B1B1 { { s 1, s 4, s 7 }, { s 2, s 3, s 6 }, { s 5, s 8 } }

Transformation of transition from s7 to s5 21 s7s5 Prototype_FSM s7 a1 a3 s5 Sub-FSM_1 Sub-FSM_3 y1, z5 z5 - 1

FSM Network 22

Component FSM B2 23

Component FSM B3 24

25 FSM Stochastic Analysis Given the FSM description and the input probabilities, the probabilistic behavior of a FSM can be studied by regarding its transition structure as a Markov chain. A Markov process is a stochastic process, where the past has no influence on the future. In other words, the future behavior depends only on the current state of the process (a “Markov property”). Markov process is called a Markov chain (MC) if its state space is discrete (either finite or countable). One example of MC is the process of playing a board game, where player's next action is determined entirely by rolling a dice. In order to make a move, one takes into account only the current state of the board. It doesn't really matter how the game progressed to that state. Alternatively, in a card game player's move is motivated not only by the cards he or she currently holds, but also the cards which have already been used during the course of the game. Using steady state probabilities, which are received in the result of such analysis, it is possible to build different kinds of quantitative estimations of FSM’s stochastic behavior.

A Case Study: Low-Power Design 26 To demonstrate the use of applets in conjunction with FPGA-based development boards, the procedure of computational kernel extraction and implementation will be considered in Lab. Sequential circuits may have an extremely large number of reachable states, but probabilistic analysis show that during normal operation only a relatively small subset is actually being visited. A power optimization paradigm is based on the concept of computational kernel, a highly optimized logic block, which mimics the steady-state behaviour of the original specification.

Probability distribution of the FSM 27 State Steady state probability init init init init IOwait read write RMACK WMACK read The first step of computational kernel extraction procedure is probabilistic analysis of the FSM. It is seen that FSM “opus”-benchmark spends 83% of its operation time in states “init0” and “init1”.

Decomposed FSM network 28 After computational kernel is identified, it should be separated from the rest of the circuit. The applet of additive decomposition is used to divide the original circuit into two alternatively working sub-FSMs.

Implementation summary 29 VHDL description for prototype FSM and decomposed network can be generated by decomposition applet. This descriptions are used to implement and verify both designs using FPGA-based development board. XPower Analyzer is a tool for power consumption estimation featured in Xilinx ISE. It is used to evaluate the quality of the decomposed design in comparison with the original. DesignArea (LUTs)Power Consumptions (mW) Original Decomposed As it is seen from the table, the dynamic power consumption has been reduced by the factor of 2.5, while area overhead is 44%.