400 likes | 442 Views
This overview covers computing sequential flexibilities in combinational logic networks and FSM networks, contrasting the two flexibility computations, FSM minimization using register splitting, and examples of minimizing nodes in combinational logic networks. It explains the concept of flexibility at a node, computing complete flexibility, and defining complete sequential flexibility in FSM networks. The text also delves into automata, the most general solution of FSM networks, language properties and manipulations, classes of languages, and solving language equations. A detailed example of the Coin Game (NIM) is provided to illustrate the concepts discussed. The computational procedure for computing the transition relation of the complete sequential flexibility is outlined.
E N D
Overview • Computing flexibilities in combinational logic networks • FSM networks • Computing sequential flexibilities • Contrasting combinational and sequential flexibility computations • FSM minimization using register splitting • Examples
Combinational Logic Network Minimizing a Node – Computing the Flexibility at a Node Definition. A flexibility at a node is a relation (between the node’s inputs and output) such that any well-defined sub-relationused at the node leads to a network thatconforms to the external specification. Definition. The complete flexibility (CF) is the maximum flexibility possible at a node.
yi Yi Yi Computing CF - local step
yi Yi yi Yi Note that essentially the same computation applies for multiple-output nodes, i.e. where CF
FSM i1 FSM FSM FSM i2 o FSM FSM FSM FSM networks • Network of finite state machines (FSMs) Problem: Compute the Complete SequentialFlexibility of a node
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.
0/0 0 0 1/1 1 1 1/0 1 0 0/0 0 0 1/0 1 0 0/0 0 0 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 Automaton FSM
FSM FSM i1 FSM spec FSM i o context FSM FSM i2 o FSM v u unknown FSM networks – computing complete sequential flexibility (CSF) Specification S (i,o) Context C (i,v,u,o) Unknown X (u,v) Problem: Given S and C, find the Most General Solution (MGS) of
spec i o context v u unknown FSM Networks The most general solution (MGS) of is In general, MGS is deterministic automaton but as an FSM it is non-deterministic (NDFSM)
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 010010. These are examples of a single symbol. Languages can be manipulated as follows:
Union - • Intersection - • Complement -
Language over cross-product of alphabets • A language over where X and Y are symbol sets consists of finite strings of pairs Such that
Projection and Lifting Given a Language over the alphabet projection is defined as – Given a Language L over the alphabet Xlifting to the alphabet is defined as - where - stands for any symbol in Y
Classes of Languages • A language is prefix closed if is I-progressive if • A language over
Composition of Languages Given disjoint alphabets I,U,O and languages L1 over and L2 over their synchronous composition is .
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 .
Proof:We prove Theorem A. Let . Then means that A I U O X Thus is the largest solution of
u v CSF 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
In God We Trust In God We Trust In God We Trust 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. 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
Example of CSF computation: NDFSM represented as automaton In God We Trust In God We Trust In God We Trust 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 Outputsp2_0 p2_1 d2_0 d2_1 d2_2
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
Finite Automata A finite automaton (FA) is is an input alphabet, where S is a set of states, is a transition relation, r is the initial state, and is the set of accepting states.
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 where i.e. denotes the set of states that can be reached from r under the input sequence w.
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.)
Operations on FA. • projection ( ): convert F over • into F’ over X by replacing each edge (xvs 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 .
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.
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.
s’ Subset Construction Given NFA we create a DFA F’ with the same language as F: where and Theorem: F and F’ have the same language. Proof:
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.
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
s DCN 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.
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.
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
spec i o context v u unknown yi Yi Comparison with combinational case Sequential Combinational unknown
FSM2 FSM1 Application - splitting FSM blif files u FSM i v o
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... The automaton is deterministic; determinization is not performed. 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)
X-min.aut but not from splitting s298 (too big to show); instead from splitting s27