Presentation is loading. Please wait.

Presentation is loading. Please wait.

Outline Composition, Conformance Topologies Proof of solution Node flexibilities Examples Node minimization Windowing C-progressive.

Similar presentations


Presentation on theme: "Outline Composition, Conformance Topologies Proof of solution Node flexibilities Examples Node minimization Windowing C-progressive."— Presentation transcript:

1 Outline Composition, Conformance Topologies Proof of solution Node flexibilities Examples Node minimization Windowing C-progressive

2 Composition Synchronous Asynchronous (parallel) Mapping Asynchronous to Synchronous

3 Composition (synthronous or asynchronous) – involves two steps 1.Make the two machines have the same input alphabet (support) 2.Perform the product Synchronous (changing the support) 1.Projection – Given a language L over the alphabet projection is defined as 2.Lifting – given a language L over the alphabet X, lifting to the alphabet is defined as Asynchronous (changing the support) 1.Restriction – Given a language L over the alphabet, the restriction to X is defined as where 2.Expansion – given a language L over X, lifting to the alphabet is defined as

4 Mapping Parallel into Synchronous Suppose F is a FSM on inputs i,v and outputs u and S is an FSM on inputs i and outputs o. F i u S i o The semantics are that when an input comes into a module, it takes an unspecified amount of time for the module to produce an output. This will be modeled with a non-deterministic self-loop labeled with v X o

5 i/u iu ss’ s’’ s s’ Similarly for the others. For S a transition of the type (q i/o q’) becomes (q i q’’) (q’’ o q’). Transitions of F (as an FSM) are one of the forms (s i/u s’) or (s v/u s’). For S, its transitions are of the type (q i/o q’). For each, we convert into automata by creating new intermediate states between inputs and outputs. Thus a transition (s i/u s’) becomes two transitions (s i s’’) (s’’ u s’). io qq’ q’’

6 We want to lift up the language of F to include o and arbitrary delays so that iuvu becomes for example: And S to include u and v and arbitrary delays, so that the two languages can contain similar strings. io becomes for example In particular, they both can become the same thing: This is done on the automaton F by the following: i 1 /u 1 v 1 /u 2 becomes The common symbols act to synchronization Note the alphabet is

7 With these conversions, we can do synchronous composition and get the equivalent expanded result of parallel composition. Thus we need to implement only one type of compositional method – synchronous, and simply have a mapping of each machine into its extended machine to compose in parallel. Finally, we can take the synchronous solution and map it back into an FSM. Similarly for S: i 1 /o 1 becomes i1i1 o1o1 Note that all states are deterministic since the alphabet is i1i1

8 Conformance Simulation Relation ( ) Let and be two automata over the same alphabet simulates () if there exists a simulation relation such that Note that simulates implies that but these are not equivalent notions. If may be easier to find a simulation relation than to prove language containment.

9 Language Containment ( ) To show that (i.e. ) we typically show that This requires complementing which may be hard if is non-deterministic (subset construction). So simulation may be easier to check. Use of a simulation relation instead of language containment can allow avoidance of computing in the construction of. Note that if S is deterministic or small, then there is no motivation to avoid computing so using language containment is fine.

10 Proposition: If two FSMs, F 1 and F 2, and F 2 is deterministic, then Language Equality ( ) Hence, if we are solving and S is a deterministic FSM then is the MSG. If S is ND, then what is MSG? Comment: Clearly, we need in order for there to be a solution of. This requires that supp(S) supp(F), since otherwise there is a variable v in F but not in S. Then would be too large.

11 I1 I2 O2 O1 U1U2 F X most general Topologies

12 I1 O2 U1U2 X F two-way cascade I1 O2 U1 F X one-way cascade I1 O2 U1U2 F X two-way cascade I1 O2 U1 X F one-way cascade

13 I1 O1 U1U2 F X rectification I2 O2 U1U2 F X Engineering Change

14 I2 U1=O 1 U2 F X Controller

15 Communicating the internal state I1 I2 O2 O1 U1U2 F X I1 I2 O2 O1 U1U2 F X cs latch_expose

16 Hiding only the outputs I O UV F X Thus the only variables that X does not see are the O variables. In the construction, for the most general solution, is deterministic. The only variables eliminated before complementation are O. The only way it could become ND is if ivuo on a pair of arcs have the same values of ivu, but different o’s. Thus if o is a deterministic function of i,v, o = f (i,v,cs), this could not happen. Theorem: If O is a deterministic function of i,v,cs, the second complementation is easy (no subset construction).

17 Hiding the outputs only i’u’v’o 1 iuvo 2 The only way it could become non-deterministic after hiding o is if i’u’v’ = iuv. But then o 1 = o 2 which means that the product machine was ND.

18 Solving a language equation Solve where and In particular, find the largest solution X (most general solution). Theorem A: Let A and C be languages over alphabets and respectively. For the equation, the most general solution is Theorem B: Let A and C be languages over alphabets and respectively. For the equation, the most general solution is.

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

20 Computing the CF for a node - global step

21 Computing CF - local step YiYi YiYiYiYi yiyiyiyi

22 CF YiYiYiYi yiyiyiyi YiYiYiYi yiyiyiyi Note that essentially the same computation applies for multiple-output nodes, i.e. where

23 FSM networks – computing complete sequential flexibility (CSF) context unknown i o u v spec 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 FSM FSM FSM FSM FSM FSM FSM i1 i2 o

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

25 Complete Sequential Flexibility (CSF) uCSF 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 CSFuv

26 Comparison with combinational casecontext unknown i o u v spec YiYiYiYi yiyiyiyi unknown Sequential Combinational

27 Extending CF FSM Combinational sub-block I O uv Spec is IO behavior of FSM. Combinational block is treated as unknown X with inputs u and outputs v. We derive the CSF for X. It is different than the CF where the spec is taken to be the combinational behavior of the FSM, i.e. with inputs I,CS and outputs O,NS. Also, if we extract from X a maximum combinational subpart (combinational projection), it is also different that CF X

28 Algorithm Algorithm : LanguageEquationSolving Input :prefix-closed deterministic S(i.o) and C(i,v,u,o) Output :most general prefix-closed, progressive X (FSM) begin 01X := Complete ( S, non-accepting ) 02X := Determinize&Complement ( X ) 03X := Support (X, (i,v,u,o)) - raise 03X := Product ( C, X ) 04X := Support ( X, (u,v) ) - hide 05X := Determinize &Complement ( X, u ) &Complement ( X, u ) 06return Prefix&Progressive (X ) end Convert to FSM

29 Examples Games –Nim –Tic-tac-toe –Toe-tac-tic –Board Control –Wolf, goat, cabbage Latch splitting

30 Example: Coin Game (NIM) In God We Trust In God We Trust In God We Trust 1.Players alternate turns 2.On each turn, player can take 1-n coins from any one pile 3.Player who takes last coin loses Winning strategy Winning strategy: Give your opponent a pile of coins with even number of 1’s in bit columns (except at end) Example: 6 5 3 6 = 1 1 0 5 = 1 0 1 3 = 0 1 1 ____ 2 2 2 Context input output 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, winning or continuing state. Specification Specification is a 3-state automaton, playing, won, and lost.

31 .model game-piles.inputs p1 d1 p2 d2.outputs out.mv p1,p2,p,pt,ptt 3.mv d1,d2,d 7.mv cs0,cs1,cs2,ns0,ns1,ns2,nh,h 7.mv whoseturn,whoseturn1 2 1 2.mv out 3 OK notOK done.latch ns0 cs0.reset cs0 3.latch ns1 cs1.reset cs1 2.latch ns2 cs2.reset cs2 1.latch whoseturn1 whoseturn.reset whoseturn 1 #set this to 2 if Player 2 goes first..table whoseturn whoseturn1.default 2 2 1.table whoseturn d1 d2 d 1 - - =d1 2 - - =d2.table whoseturn p1 p2 ptt 1 - - =p1 2 - - =p2 NIM.model spec.inputs out.outputs Acc.mv out 3 OK notOK done.mv CS,NS 3 a b c.table CS ->Acc.default 1 b 0.table out CS ->NS OK a a notOK a b done a c - b b - c c.latch NS CS.reset CS a.end spec.mva

32 # The next state ns is due to the move..table p nh cs0 ns0 0 - - =nh (1,2) - - =cs0.table p nh cs1 ns1 1 - - =nh (0,2) - - =cs1.table p nh cs2 ns2 2 - - =nh (0,1) - - =cs2 #"out" indicates who the winner is..table whoseturn ns0 ns1 ns2 out.default OK 1 0 0 0 done 2 0 0 0 notOK.end # Map move into a legal move.table ptt cs0 cs1 cs2 pt 0 (1,2,3,4,5,6) - - 0 1 - (1,2,3,4,5,6) - 1 2 - - (1,2,3,4,5,6) 2 0 0 - - 1 1 - 0 - 2 2 - - 0 0.table pt cs0 cs1 cs2 p 0 (1,2,3,4,5,6) - - 0 1 - (1,2,3,4,5,6) - 1 2 - - (1,2,3,4,5,6) 2 0 0 - - 1 1 - 0 - 2 2 - - 0 0 #selects the height of the pile chosen by player 1.table p cs0 cs1 cs2 h 0 - - - =cs0 1 - - - =cs1 2 - - - =cs2 #computes h-d. If h<=d then =0.table h d nh.default 0 6 1 5 6 2 4 6 3 3 6 4 2 6 5 1 5 1 4 5 2 3 5 3 2 5 4 1 4 3 1 4 2 2 4 1 3 3 2 1 3 1 2 2 1 1

33 rl fixed.mv stg_extract fixed.mva echo "Synthesis..." determinize -ci spec.mva spec_dci.mva support p2(3),d2(7),p1(3),d1(7),out(3) spec_dci.mva spec_dci_supp.mva support p2(3),d2(7),p1(3),d1(7),out(3) fixed.mva fixed_supp.mva product fixed_supp.mva spec_dci_supp.mva p.mva support p1(3),d1(7),p2(3),d2(7) p.mva p_supp.mva determinize -ci p_supp.mva p_dci.mva prefix p_dci.mva p_dci_pre.mva progressive -i 2 p_dci_pre.mva x.mva minimize x.mva x-min.mva prefix x-min.mva x-min.mva echo "Verification..." support p2(3),d2(7),p1(3),d1(7),out(3) x.mva x_supp.mva product x_supp.mva fixed_supp.mva prod.mva support p2(3),d2(7),p1(3),d1(7),out(3) spec.mva spec_supp.mva check prod.mva spec_supp.mva Lang.script (NIM)

34 mvsis 02> source lang.script The STG with 40 states and 110 transitions is written to file "fixed.mva". Synthesis... The automaton is deterministic; determinization is not performed. Product: (40 st, 110 trans) x (3 st, 5 trans) -> (42 st, 112 trans) The automaton is deterministic; determinization is not performed. Warning: The automaton has been completed before state minimization. State minimization: (22 states, 45 trans) -> (13 states, 30 trans) Verification... Product: (21 st, 34 trans) x (40 st, 110 trans) -> (21 st, 34 trans) Warning: Automaton "game-piles*spec*game-piles" is completed before checking. The behavior of "game-piles*spec*game-piles" is contained in the behavior of "spec". mvsis 03> psa x-min.mva "game-piles*spec": incomplete (9 st), deterministic, non-progressive (9 st), and non-M oore (9 st). 4 inputs (4 FSM inputs) 12 states (12 accepting) 19 trans Inputs = { p1(3),d1(7),p2(3),d2(7) } mvsis 03>

35 Example of CSF computation: NDFSM represented as automaton In God We Trust In God We Trust In God We Trust Inputs p1(3),d1(7) Outputs p2(3),d2(7)

36 Tic-tac-toe.model spec.inputs m1 c1 m2 c2.outputs out.mv m1,m2 9.mv out 3.table ->out 0 2.end #.model spec.inputs out.outputs Acc.mv out 3.mv CS,NS 3 a b c.table CS ->Acc.default 1 b 0.table out CS ->NS 0 a a 1 a b 2 a c - b b - c c.latch NS CS.reset CS a.end spec.mv spec.mva

37 .model game-tic-tac-toe.inputs m1 m2.outputs out.mv out 3.mv m1,m2,m 9.mv cs0,cs1,cs2,cs3,cs4,cs5,cs6,cs7,cs8 3.mv ns0,ns1,ns2,ns3,ns4,ns5,ns6,ns7,ns8 3.mv whoseturn,whoseturn1 2 1 2.latch whoseturn1 whoseturn.reset whoseturn 1.latch ns0 cs0.reset cs0 0.latch ns1 cs1.reset cs1 0.latch ns2 cs2.reset cs2 0.latch ns3 cs3.reset cs3 0.latch ns4 cs4.reset cs4 2 # set this to 0 if player 2 makes the second move..latch ns5 cs5.reset cs5 0.latch ns6 cs6.reset cs6 0.latch ns7 cs7.reset cs7 0.latch ns8 cs8.reset cs8 0.table illegal whoseturn whoseturn1 0 2 1 0 1 2 1 - =whoseturn.table whoseturn m1 m2 m 1 - - =m1 2 - - =m2 # Player makes a illegal move if the square indicated by mt in not empty.table m cs0 cs1 cs2 cs3 cs4 cs5 cs6 cs7 cs8 illegal.default 1 0 0 - - - - - - - - 0 1 - 0 - - - - - - - 0 2 - - 0 - - - - - - 0 3 - - - 0 - - - - - 0 4 - - - - 0 - - - - 0 5 - - - - - 0 - - - 0 6 - - - - - - 0 - - 0 7 - - - - - - - 0 - 0 8 - - - - - - - - 0 0 # out records if there is a line of 2's (then out=2) or a line of 1's (then out=1).table whoseturn ns0 ns1 ns2 ns3 ns4 ns5 ns6 ns7 ns8 out.default 0 2 - - 2 - 2 - 2 - - 2 2 2 2 2 - - - - - - 2 2 2 - - 2 - - 2 - - 2 2 2 - - - 2 - - - 2 2 2 - - - 2 2 2 - - - 2 2 - - 2 - - 2 - - 2 2 2 - 2 - - 2 - - 2 - 2 2 - - - - - - 2 2 2 2 1 - - 1 - 1 - 1 - - 1 1 1 1 1 - - - - - - 1 1 1 - - 1 - - 1 - - 1 1 1 - - - 1 - - - 1 1 1 - - - 1 1 1 - - - 1 1 - - 1 - - 1 - - 1 1 1 - 1 - - 1 - - 1 - 1 1 - - - - - - 1 1 1 1

38 # Once the game gets into a winning configuration, do not change the state..table cs0 cs1 cs2 cs3 cs4 cs5 cs6 cs7 cs8 done.default 0 - - 2 - 2 - 2 - - 1 2 2 2 - - - - - - 1 2 - - 2 - - 2 - - 1 2 - - - 2 - - - 2 1 - - - 2 2 2 - - - 1 - - 2 - - 2 - - 2 1 - 2 - - 2 - - 2 - 1 - - - - - - 2 2 2 1 - - 1 - 1 - 1 - - 1 1 1 1 - - - - - - 1 1 - - 1 - - 1 - - 1 1 - - - 1 - - - 1 1 - - - 1 1 1 - - - 1 - - 1 - - 1 - - 1 1 - 1 - - 1 - - 1 - 1 - - - - - - 1 1 1 1 # If there is a winner (done=1) then the state remains unchanged. # Otherwise, if m=i and whoseturn=1, then csi=1. Similarly, if # m=i and whoseturn=2, then csi=2.table illegal done cs0 m whoseturn ns0 #.default 0 0 1 - - - =cs0 0 0 - 0 1 1 0 0 - 0 2 2 0 0 - (1,2,3,4,5,6,7,8) - =cs0 1 - - - - =cs0.table illegal done cs1 m whoseturn ns1 #.default 0 0 1 - - - =cs1 0 0 - 1 1 1 0 0 - 1 2 2 0 0 - (0,2,3,4,5,6,7,8) - =cs1 1 - - - - =cs1.table illegal done cs2 m whoseturn ns2 #.default 0 0 1 - - - =cs2 0 0 - 2 1 1 0 0 - 2 2 2 0 0 - (0,1,3,4,5,6,7,8) - =cs2 1 - - - - =cs2.table illegal done cs3 m whoseturn ns3 #.default 0 0 1 - - - =cs3 0 0 - 3 1 1 0 0 - 3 2 2 0 0 - (0,1,2,4,5,6,7,8) - =cs3 1 - - - - =cs3.table illegal done cs4 m whoseturn ns4 #.default 0 0 1 - - - =cs4 0 0 - 4 1 1 0 0 - 4 2 2 0 0 - (0,1,2,3,5,6,7,8) - =cs4 1 - - - - =cs4.table illegal done cs5 m whoseturn ns5 #.default 0 0 1 - - - =cs5 0 0 - 5 1 1 0 0 - 5 2 2 0 0 - (0,1,2,3,4,6,7,8) - =cs5 1 - - - - =cs5.table illegal done cs6 m whoseturn ns6 #.default 0 0 1 - - - =cs6 0 0 - 6 1 1 0 0 - 6 2 2 0 0 - (0,1,2,3,4,5,7,8) - =cs6 1 - - - - =cs6.table illegal done cs7 m whoseturn ns7 #.default 0 0 1 - - - =cs7 0 0 - 7 1 1 0 0 - 7 2 2 0 0 - (0,1,2,3,4,5,6,8) - =cs7 1 - - - - =cs7.table illegal done cs8 m whoseturn ns8 #.default 0 0 1 - - - =cs8 0 0 - 8 1 1 0 0 - 8 2 2 0 0 - (0,1,2,3,4,5,6,7) - =cs8 1 - - - - =cs8.end

39 Lang.script (tic-tac-toe) rl fixed1.mv latch_expose stg_extract fixed.mva echo "Synthesis..." determinize -ci spec.mva spec_dci.mva support cs0(3),cs1(3),cs2(3),cs3(3),cs4(3),cs5(3),cs6(3),cs7(3),cs8(3), whoseturn(2),m1(9),m2(9),out(3) spec_dci.mva spec_dci_supp.mva support cs0(3),cs1(3),cs2(3),cs3(3),cs4(3),cs5(3),cs6(3),cs7(3),cs8(3), whoseturn(2),m1(9),m2(9),out(3) fixed.mva fixed_supp.mva product fixed_supp.mva spec_dci_supp.mva p.mva support cs0(3),cs1(3),cs2(3),cs3(3),cs4(3),cs5(3),cs6(3),cs7(3),cs8(3), whoseturn(2),m2(9) p.mva p_supp.mva determinize -ci p_supp.mva p_dci.mva prefix p_dci.mva p_dci_pre.mva progressive -i 10 p_dci_pre.mva x.mva minimize x.mva x-min.mva prefix x.mva x-min.mva

40 Wolf, goat, cabbage.model wolfe.inputs in.outputs out.mv in,in1 4 empty wolfe goat cabbage.mv csw,csg,csc,nsw,nsg,nsc 3 left right boat.mv bank,bank1 2 left right.mv out 3 OK notOK done.latch stop1 stop.reset stop 0.latch nsw csw.reset csw left.latch nsg csg.reset csg left.latch nsc csc.reset csc left.latch bank1 bank.reset bank left.table out stop stop1.default 0 done - 1 - 1 1.table stop bank bank1.default left 0 left right 1 - =bank.table stop bank in1 csw nsw 0 left (empty,goat,cabbage) boat left 0 left wolfe (left,boat) boat 0 right (empty,goat,cabbage) boat right 0 right wolfe (right,boat) boat 0 - (empty,goat,cabbage) (left,right) =csw 1 - - - =csw.table stop bank in1 csg nsg 0 left (empty,wolfe,cabbage) boat left 0 left goat (left,boat) boat 0 right (empty,wolfe,cabbage) boat right 0 right goat (right,boat) boat 0 - (empty,wolfe,cabbage) (left,right) =csg 1 - - - =csg.table stop bank in1 csc nsc 0 left (empty,goat,wolfe) boat left 0 left cabbage (left,boat) boat 0 right (empty,goat,wolfe) boat right 0 right cabbage (right,boat) boat 0 - (empty,goat,wolfe) (left,right) =csc 1 - - - =csc.table bank nsw nsg nsc out.default OK right left left - notOK left right right - notOK right - left left notOK left - right right notOK right (right,boat) (right,boat) (right,boat) done # map input (in) into any legal input.table bank in csw csg csc in1.default empty right wolfe (right,boat) - - =in left wolfe (left,boat) - - =in right goat - (right,boat) - =in left goat - (left,boat) - =in right cabbage - - (right,boat) =in left cabbage - - (left,boat) =in.end out in(boat)

41 .model spec.inputs out.outputs Acc.mv out 3 OK notOK done.mv CS,NS 3 a b c.table CS ->Acc.default 1 b 0.table out CS ->NS OK a a notOK a b done a c - b b - c c.latch NS CS.reset CS a.end spec.mva for wolf-goat-cabbage rl wolfe.mv stg_extract fixed.mva echo "Synthesis..." determinize -lci spec.mva spec_dci.mva support in(4),out(3) spec_dci.mva spec_dci_supp.mva support in(4),out(3) fixed.mva fixed_supp.mva product -l fixed_supp.mva spec_dci_supp.mva p.mva support in(4) p.mva p_supp.mva determinize -lci p_supp.mva p_dci.mva prefix p_dci.mva p_dci_pre.mva progressive -i 0 p_dci_pre.mva x.mva minimize x.mva x-min.mva prefix x-min.mva x-min.mva echo "Verification..." support in(4),out(3) x.mva x_supp.mva product x_supp.mva fixed_supp.mva prod.mva support in(4),out(3) spec.mva spec_supp.mva check prod.mva spec_supp.mva lang.script

42 Wolf, goat, cabbage x.mva

43 Minimized x-min.mva

44 Other Games 1.Toe-tac-tic (solvable) –Like tic-tac-toe –Except that any player can play either X or O at any time –A player wins when he completes a line or either X’s or O’s 2.Board game (too many states) –4 x 4 board –Each player has 4 pieces which initially at the top and bottom rows of the board. –Any piece can move forward, left or right –Player wins when he moves one of his pieces to the other side –12870 reachable states – can’t do it right now

45 FSM Application - splitting FSM blif files FSM2 FSM1 u v i o This is just a syntactic change. Nothing has been done yet. X

46 Latch split i o S i cs 1 cs 2 o mvsis 05> _split -h Usage: _split [-v] splits the current network S into two parts: F and X generates the script to solve the equation F * X = S -v : toggles verbose [default = no] : the list of latches to be included in X no spaces are allowed in the latch list the numbers of latches are zero-based for example: 0,3,5-7,9 mvsis 05>

47 Latch_split example.model s27.bench.inputs G0 G1 G2 G3.outputs G17.reset G5 0.latch G10 G5.reset G6 0.latch G11 G6.reset G7 0.latch G13 G7.table G0 G1 G3 G5 G6 G7 G17.default 0 1 1 - - - - 1 1 - 0 - - - 1 1 - - - - 1 1 - - - 1 - - 1 - 1 - - 0 - 1 - - 0 - 0 - 1 - - - - 0 1 1.table G0 G1 G3 G5 G7 G10.default 0 1 1 - - - 1 1 - 0 - - 1 1 - - 1 - 1 1 - - - 1 1.table G0 G1 G3 G5 G6 G7 G11.default 0 0 - - 0 1 - 1 - 0 1 0 - 0 1.table G1 G2 G7 G13.default 0 1 0 - 1 - 0 1 1.end.model s27.bench.inputs G0 G1 G2 G3 G5 G6.outputs G17.latch G13 G7 0.names G0 G1 G3 G5 G6 G7 G17 11---- 1 1-0--- 1 1----1 1 ---1-- 1 -1--0- 1 --0-0- 1 ----01 1.names G0 G1 G3 G5 G7 G10 11--- 1 1-0-- 1 1--1- 1 1---1 1.names G0 G1 G3 G5 G6 G7 G11 0--01- 1 -010-0 1.names G1 G2 G7 G13 10- 1 -01 1.end.model s27.bench.inputs G0 G1 G2 G3 G7.outputs G17.latch G10 G5 0.latch G11 G6 0.names G0 G1 G3 G5 G6 G7 G17 11---- 1 1-0--- 1 1----1 1 ---1-- 1 -1--0- 1 --0-0- 1 ----01 1.names G0 G1 G3 G5 G7 G10 11--- 1 1-0-- 1 1--1- 1 1---1 1.names G0 G1 G3 G5 G6 G7 G11 0--01- 1 -010-0 1.names G1 G2 G7 G13 10- 1 -01 1.end s27f (F) s27a (X’) S

48 # Language solving script generated by MVSIS # for sequential network "s27.blif" on Wed Feb 18 21:35:53 2004 # Command line was: "split 0,1". echo "Solving the language equation... " solve s27f.blif s27.blif G0,G1,G2,G3,G7 G5,G6 s27x.aut psa s27x.aut echo "Verifying the containment of the known implementation... " read_blif s27a.blif latch_expose stg_extract s27a.aut support G0,G1,G2,G3,G7,G5,G6 s27a.aut s27a.aut check s27a.aut s27x.aut read_blif s27.blif

49 s27x.aut

50 s27x-dcmin.aut s27a.blif inputsoutputs G0, G1, G2, G3, G7, G5, G6

51 FSM networks - Node Minimization Given a NDFSM CSF, find the “smallest” FSM Y, such that Y is well-defined and Y is called a reduction of CSF

52 State graph of X It generally looks like non-accepting don’t care state

53 C-compatibility - dcmin Two states and are c-compatible if their care sets do not intersect, i.e. the care set of one is completely contained in the don’t care set of the other. s1s1s1s1 s2s2s2s2 states u -space Careset Careset RemainingDC X (cs,u,v,ns) u v

54 A simple state reduction method-dcmin Let be the relation for the incomplete CSF X, and computeLet be the relation for the incomplete CSF X, and compute –i.e. those states and inputs for which there exists a next state and output (the next state can be either accepting or not). –i.e. those states and inputs for which there exists a next state and output (the next state can be either accepting or not). Order this BDD with the u variables first, and let be the unique functions below the u variables pointed to.Order this BDD with the u variables first, and let be the unique functions below the u variables pointed to. Two states and are c-compatible if and only if for all i, i.e. they have no minterm u in common.Two states and are c-compatible if and only if for all i, i.e. they have no minterm u in common. So is a clique of states that can't be merged, i.e. are not c- compatible and must have different colors.So is a clique of states that can't be merged, i.e. are not c- compatible and must have different colors. Then the c-incompatibility graph is which has to be colored.Then the c-incompatibility graph is which has to be colored. Suppose is the assignment of states s to colors c. The new automaton relation for X is thenSuppose is the assignment of states s to colors c. The new automaton relation for X is then

55 Simple state reduction Mergedstates Note that this is a “simple” coloring problem in contrast to the compatibilities problem normally associated with state minimization for incompletely specified FSMs. In contrast, here a group of states is “c-compatible” iff they are pair-wise c- compatible. u -space Careset Careset Careset RemainingDC

56 Other ideas on reduction of CSF CFThis problem is similar to SOP minimization when using CF to minimize the node in the combinational network. CSFMany cost functions are possible. If we try to minimize the number of states in CSF, it is the problem of minimizing a PNDFSM – –T. Kam et. al., DAC 1994. We might want to look for a good implementation directly, rather than first minimizing the number of states. –Similarly, for a node in the combinational circuit, looking for a small SOP, or the minimum number of literals in FF, may be misleading. A specialized algorithm has been developed to check whether a combinational solution (a single-state reduction) exists. CSF –The problem is reduced to SAT with as many variables as there are states + transitions in the CSF. Solution is practical for, say, 100 states and 500 transitions. –A similar algorithm can be developed to check whether a 2 or 3 state solution exists more variables, the SAT problem is harder

57 Iterative language solving The problem of computing the CSF can be iterative. 1.Given F and S 2.Split F into F 1 and F 2 3.Solve F 1 * X = S. 4.If we can reduce X to a smaller implementation than F 2, replace F 2 5.Solve F 2 * X = S 6.If we can reduce X to a smaller implementation than F 1, replace F 1 7.Set F = F 1 * F 2 8.If either F 1 or F 2 has changed, go to 2

58 FSM Windowing X FSM 3 FSM 2 FSM 1 i X1X1X1X1 X2X2X2X2 X3X3X3X3 X = X 1 * X 2 * X 3

59 Compositionally Progressive X should be compositionally progressive (c-progressive) with F –i.e. for every product state cs of X * F, the next state ns and output o should be defined for all i. Roland Jiang has proposed a way to use this to additionally trim the solution X during the subset construction. But he is not 100% sure it is right. Nina and Tiziano have another method for trimming and have proved that the largest c-progressive solution can contain well-defined FSM sub-behaviors that are not c-progressive. Roland has demonstrated that the above paper is wrong. Being c-progressive does not necessarily imply no combinational loops To hear a more detailed discussion, attend MVSIS weekly meeting Friday, 11- 1pm in DOP center library (fishbowl) There might be a connection here with omega-automata. F X i o u v spec

60 Future developments Objective is to push to the limit, the size of application that can be done –Keep multi-level MV structure, given in MVSIS, as long as possible (lecture on this later) –Use SAT in subset construction The bottleneck looks to be extracting good sub- behavior of CSF (reduction) –A sub-graph of the CSF usually not good enough –“Simplified” (dcmin) state minimization of CSF may be good first step? Try for a good sub-behavior more directly without constructing CSF Try hierarchy and windowing applied to FSM network


Download ppt "Outline Composition, Conformance Topologies Proof of solution Node flexibilities Examples Node minimization Windowing C-progressive."

Similar presentations


Ads by Google