Presentation is loading. Please wait.

Presentation is loading. Please wait.

Sequential Flexibility

Similar presentations


Presentation on theme: "Sequential Flexibility"— Presentation transcript:

1 Sequential Flexibility

2 Overview Computing flexibilities in combinational logic networks
FSM networks Computing sequential flexibilities Contrasting combinational and sequential flexibility computations FSM minimization using register splitting Examples

3 Minimizing a Node – Computing the Flexibility at a Node
Combinational Logic Network Definition. A flexibility at a node is a relation (between the node’s inputs and output) such that any well-defined sub-relation used at the node leads to a network that conforms to the external specification. Definition. The complete flexibility (CF) is the maximum flexibility possible at a node.

4 Computing the CF for a node - global step

5 Computing CF - local step
Yi yi

6 CF Yi yi Yi yi Note that essentially the same computation applies for multiple-output nodes, i.e. where

7 FSM networks Network of finite state machines (FSMs)
Problem: Compute the Complete Sequential Flexibility of a node

8 Complete Sequential Flexibility
CSF is the maximum set of FSM behaviors (represented by a pseudo-non-deterministic FSM), such that implementing any sub-behavior and replacing the sub-network by the new implemented part does not violate the specification of the total network.

9 FSMs and Automata If the distinction between inputs and outputs is taken away (i/o becomes io), then an FSM becomes an automaton. It has the following properties as an automaton All states are accepting It is incomplete can make it complete by adding one non-accepting state Its language is prefix closed i -progressive 1 0 1 1 0 0 1/0 1/1 0/0 Automaton FSM

10 FSM networks – computing complete sequential flexibility (CSF)
Specification S (i,o) Context C (i,v,u,o) Unknown X (u,v) context unknown i o u v spec Problem: Given S and C, find the Most General Solution (MGS) of

11 FSM Networks The most general solution (MGS) of is
context unknown i o u v spec The most general solution (MGS) of is In general, MGS is deterministic automaton but as an FSM it is non-deterministic (NDFSM)

12 Languages. A Language is set of finite length strings on the symbol set i.e. a subset of (a b c a c d f g g g) At this point, we don’t care how the language is generated or represented. So initially the comments apply to all kinds of languages A symbol can be made up of a vector of variable values, e.g. 1a3de0 or These are examples of a single symbol. Languages can be manipulated as follows:

13 Union - Intersection - Complement -

14 Language over cross-product of alphabets
A language over where X and Y are symbol sets consists of finite strings of pairs Such that

15 Projection and Lifting
Given a Language over the alphabet projection is defined as – Given a Language L over the alphabet X lifting to the alphabet is defined as - where - stands for any symbol in Y

16 Classes of Languages A language is prefix closed if A language over
is I-progressive if

17 Composition of Languages
Given disjoint alphabets I,U,O and languages L1 over and L2 over their synchronous composition is .

18 Solving a language equation
Theorem A: Let A and C be languages over alphabets and respectively. For the equation, the Most General Solution is A I U O X .

19 A X Proof: We prove Theorem A. Let . Then means that I U O Thus
is the largest solution of

20 Complete Sequential Flexibility (CSF)
CSF is maximum sub-behavior in MGS which is prefix closed and u-progressive. For unknown to be an FSM, it must be progressive in its inputs CSF u v

21 Example: Coin Game (NIM)
Context describes the state of the game and legal moves. Its input is random moves by first player and its output tells if the game is in a losing state. In God We Trust Specification is a 3-state automaton, playing, won, and lost. Players alternate turns On each turn, player can take 1-n coins from any one pile Player who takes last coin loses Winning strategy: Give your opponent a pile of coins with even number of 1’s in bit columns (except at end) 6 = 1 1 0 5 = 1 0 1 3 = 0 1 1 ____ 2 2 2 Example: 5 3 6

22 Example of CSF computation: NDFSM represented as automaton
The CSF is a non-deterministic FSM 5 inputs, 5 outputs, 21 states, 34 transitions Inputs p1_0 p1_1 d1_0 d1_1 d1_2 Outputs p2_0 p2_1 d2_0 d2_1 d2_2 In God We Trust

23 Computational Procedure
Specification: S (i,o) Context: C (i,v,u,o) (these have been converted into automata) Computing the transition relation of CSF Complement S Raise to variables of C Compose with C Hide variables not in X Complement result

24 Finite Automata A finite automaton (FA) is where S is a set of states, is an input alphabet, is a transition relation, r is the initial state, and is the set of accepting states.

25 An input sequence leads from r to s’ if there exists a sequence of states, for all i = 0, ... ,n-1. w is in the language of F ( ) such that if and only if w leads from r to i.e. where denotes the set of states that can be reached from r under the input sequence w.

26 Theorem: A languages is regular if and only if it is the language of a finite automaton
Theorem: The set of all languages for deterministic FA is the same as for non-deterministic FA. (this can be shown by using the so-called subset construction.)

27 Operations on FA. projection ( ): convert F over into F’ over X by replacing each edge (xv s s’) by the edge (x s s’) lifting ( ): convert F over X into F’ over where by replacing each edge (x s s’) by stands for any .

28 Operations on FA. Product Given FAs both over , the product is where Complementation If F is deterministic, then . If F is non-deterministic, the only known way for complementation is to determinize it first. This is done by the sub-set construction.

29 Composition Synchronous Composition. Given two automata and
over alphabets and their synchronous composition is i.e. the product of the two automata when they are made to have the same alphabet.

30 Subset Construction Given NFA
we create a DFA F’ with the same language as F: where and s’ Theorem: F and F’ have the same language. Proof:

31 Finite State Machines as Automata
A FSM is where I is the set of input symbols, O the set of output symbols, r the initial state, and T(s,i,s’,o) is the transition relation. A transition (s,i,s’,o) from state s to s’ with output o can happen on input i can if and only if If then M is complete, otherwise partial.

32 It is deterministic if for all (s,i) there is at most one (s’,o)
such that It is pseudo-non-deterministic if for all (s,i,o) there is at most one s’ such that

33 Converting an FSM to an automaton
An FSM M can be converted into an automaton F by the following: where Note that Q = S, i.e. all states are accepting The resulting automaton is typically not complete, since there are io combinations for which a next state is not defined. We can complete it by augmenting to include a transition to a new non-accepting state DCN. DCN s

34 FSMs as Automata The language of an FSM is defined to be the language of the associated automaton A pseudo non-deterministic FSM is one whose automaton is deterministic. The language of an FSM is prefix closed. The language of an FSM is I-progressive Conversion is done by grouping i/o on edges to (io) and making all states accepting. Conversion can be done only if the language is prefix closed and I-progressive. In this case, delete all non-accepting states (prefix), and change edges from (io) to i/o.

35 Computational Procedure
Specification: S (i,o) Context: C (i,v,u,o) (these have been converted into automata) Computing the transition relation of CSF Complement S Raise to variables of C Compose with C Hide variables not in X Complement result

36 Comparison with combinational case
Sequential context unknown i o u v spec Combinational Yi yi unknown

37 Application - splitting FSM blif files
u i v o

38 A run on s298.blif splitting 14 latches into 7 each
mvsis 07> source langi.script Extracting STG of spec ... The extracted STG has 218 states and 1078 transitions. Extracting STG of fixed ... The extracted STG has 43 states and 128 transitions. Extracting STG of particular solution ... The extracted STG has 20 states and 400 transitions. Determinizing the spec ... The automaton is deterministic; determinization is not performed. Computing the product ... Product: (43 st, 128 trans) x (219 st, 1297 trans) -> (966 st, 9975 trans) Determinizing the product and making progressive... Checking containment … The solution composed with fixed is contained in the spec. The particular solution is contained in the solution mvsis 13> psa x.aut x.aut: The automaton is incomplete (552 states) and deterministic. mvsis 13> minimize x.aut x-min.aut State minimization: (554 states, 5674 trans) -> (272 states, 2704 trans)

39 X-min.aut but not from splitting s298 (too big to show);
instead from splitting s27

40 The End


Download ppt "Sequential Flexibility"

Similar presentations


Ads by Google