Presentation is loading. Please wait.

Presentation is loading. Please wait.

Sequential Optimization without State Space Exploration A. Mehrota, S. Qadeer, V. Singhal, R. Brayton, A. Sangiovanni-Vincentelli, A. Aziz Presented by:

Similar presentations


Presentation on theme: "Sequential Optimization without State Space Exploration A. Mehrota, S. Qadeer, V. Singhal, R. Brayton, A. Sangiovanni-Vincentelli, A. Aziz Presented by:"— Presentation transcript:

1 Sequential Optimization without State Space Exploration A. Mehrota, S. Qadeer, V. Singhal, R. Brayton, A. Sangiovanni-Vincentelli, A. Aziz Presented by: Andrew Mihal

2 Outline Goal Definitions Combinational Redundancies Sequential Redundancies Experimental Results Future Work

3 Main Idea Optimize a sequential circuit for area Locate and remove redundancies in the circuit Avoid exploring state space (exponential) Search for redundancies using a method based on implications and recursive learning Result is a safe delayed replacement of original circuit Scales well and works on large circuits

4 Definitions Redundancy: a net that does not affect circuit operation Similar to an untestable stuck-at fault Compatible redundancies: a set of redundant nets that are independent Remove one redundancy and the other redundancies don't go away Can simultaneously remove all redundancies

5 Example n1 = 0  n2 unobservable n1 = 1  n2 = 1 Therefore n2 is stuck-at-1 redundant Can replace n2 with constant 1. Similarly, n1 is stuck-at-1 redundant But these redundancies are not compatible Cannot be simultaneously replaced n1 n2 n o

6 Finding Combinational Redundancies Choose a net Assign it a value v and do implications. Switch to v’ and do implications. Find a commonality between the sets of implications. Redundancy if: A net n is constant b in both sets of implications n is constant in one set and unobservable in the other

7 Implication Rules 1 1 1 C2 0 0 C3 1 1 1 C5C6 0/1 1 0 0 C4 C1 bb’ b

8 0  O1O2    Implication Rules  means that a net is unobservable

9 Recursive Learning When no implication rules apply, recursively make another assumption Helps to find more redundancies

10 Recursive Example a = 0  b a d c e f g 0

11 Recursive Example a = 0  d = 0  b a d c e f g 0 0

12 Recursive Example a = 0  d = 0  f = 0 b a d c e f g 0 0 0

13 Recursive Example a = 0  d = 0  f = 0 a = 1  ? b a d c e f g 1

14 Recursive Example a = 0  d = 0  f = 0 a = 1  ? d = 0  b a d c e f g 1 0

15 Recursive Example a = 0  d = 0  f = 0 a = 1  ? d = 0  f = 0 b a d c e f g 1 0 0

16 Recursive Example a = 0  d = 0  f = 0 a = 1  ? d = 0  f = 0 d = 1  b a d c e f g 1 1

17 Recursive Example a = 0  d = 0  f = 0 a = 1  ? d = 0  f = 0 d = 1  b = 1 b a d c e f g 1 1 1

18 Recursive Example a = 0  d = 0  f = 0 a = 1  ? d = 0  f = 0 d = 1  b = 1  e = 1 b a d c e f g 1 1 1 1

19 Recursive Example a = 0  d = 0  f = 0 a = 1  ? d = 0  f = 0 d = 1  b = 1  e = 1  f =  f is stuck-at-0 redundant b a d c e f g 1 1 1 1 

20 Recursive Example a = 0  f = 0 a = 1  f is stuck-at-0 redundant  f is stuck-at-0 redundant and can be replaced with constant 0 b a d c e f g

21 Problem This algorithm can find incompatible redundancies   1 1 1 1 1 0 0 0

22 Solution Don’t let the algorithm overwrite an existing label a b a2 a1 d c e a=0  c=1 a=1  c=0, d=1  e=0 No redundancies found

23 Solution We missed a redundancy! a b a2 a1 d c e a=1  d=1  c=0  d=   a2=  A2 is stuck-at-0 redundant

24 Solution It is safe to overwrite a constant label with a  The authors prove it But first, we need more definitions

25 Definitions Circuit A graph G = (V, E) V = PI’s, PO’s, gates, latches E = wires Assumption A labeling of the nets P  E Each net n  P is labeled with value v  {0,1}

26 Definitions A P The set of all possible assumptions on P Consistent An assumption A  A P is consistent if there exists an assignment to the PI’s that satisfies it PI’sPO’s 0 1 Inconsistent assumption

27 Definitions Parent and Child nets Share a common node v Parent is an input to v Child is an output of v Sibling nets v Parent Child v Siblings

28 Definitions Implication graph A DAG that details the implications leading from an assumption to a label a b a2 a1 d c e a=1 c=0 d=  Assumption Label

29 Definitions Compatible labels A set of labels C derived from an assumption A is compatible if: Each label c  C has a valid implication graph G c Each label in G c  C This means that no two implication graphs may have contradicting nodes

30 Label Compatibility   0 0 a a1 a2 a=0 a1=0a2=  a=0 a2=0a1=  Incompatibility!

31 Label Compatibility One way to ensure compatible labels is to never switch a label But this misses some redundancies, as we saw before Now we will prove that it is safe to replace a constant label with a  label

32 Proof by Contradiction Assume that replacing a constant label by a  label creates an incompatibility m =  Assumption m = a New Implication Graph Incompatibility! Existing Implication Graph nini

33 Show that the existing implication graph can always be rewritten to not use m=a 3 cases to consider: n i-1 is a child of n i n i-1 and n i are siblings n i-1 is a parent of n i These are the only implication relationships allowed given our implication rules Proof by Contradiction m = a nini n i-1

34 Case 1: Child We have two pieces of information 1. n i-1 implies n i =a using some rule 2. something implies n i =  using some rule No assignment satisfies both 1 and 2 Thus, case 1 cannot happen n i-1 =1 ni=1ni=1 n i-1 =  ni=ni= n i-1 =0 ni=ni= 0

35 Case 2: Sibling 1. n i+1 is a sibling Rewrite without using n i =a n i-1 =a ni=ani=a n i+1 =a n i-1 =a ni=ani=a n i+1 =a

36 Case 2: Sibling 2. n i+1 is a parent Rewrite without using n i =a n i-1 =a ni=ani=a n i+1 =a n i-1 =a ni=ani=a n i+1 =a

37 Case 2: Sibling 3. n i+1 is a child Rewrite without using n i =a n i+1 =  ni=ni= n i+1 =0 ni=ni= 0 ni=ni= 0 n’

38 Case 2: Sibling What about this case? If n i+1 = , then n i+2, n i+3, … must also be  because a  can only imply a  n i+1 =  ni=ni= n i-1 =c i-1 n i-2 =c i-2 n i+1 =  n i =c i n i+2 =  Contains no  labels Can be modified not to use m=a

39 Case 3: Parent Same as case 2: sibling n i-1 =a n i+1 =a ni=ani=a n i-1 =a n i+1 =a ni=ani=a

40 Case 3: Parent Same as case 2: parent n i-1 =a ni=ani=a n i+1 =a n i-1 =a ni=ani=a n i+1 =a

41 Case 3: Parent Same as case 3: child n i+1 =0 ni=ni= 0 ni=ni= 0 n’ n i+1 =  ni=ni=

42 Proof Summary In every case, existing implication graph can be modified to be compatible with m=  Therefore no incompatibility arises when replacing m=a with m= , given a consistent initial assumption

43 Original Algorithm for Optimization Now we have formalized the way implications are found Next, apply to sequential circuits Choose a net Assign it a value v and do implications. Switch to v’ and do implications. Find a commonality between the sets of implications. Redundancy if: A net n is constant b in both sets of implications n is constant in one set and unobservable in the other

44 Sequential Redundancies Extend labeling algorithm to include time stamp with each label New implication rule for latches: Gate implication rules are the same Implicator time stamps must be the same n t =an t+1 =a

45 Sequential Redundancies Time t is the time of the assumption Implications can go forward across latches t+1, t+2,... And backwards t-1, t-2,... We can still overwrite a constant label with a  label But we cannot overwrite a constant label with a different constant, even at a different time step

46 C-delayed Replacement A net may become stuck-at-n redundant at some time t+c Removing the redundancy may change circuit behavior in the time between t and t+c This is because latch outputs will initialize non- deterministically. Assume no designated reset state After time t+c the optimized circuit will behave the same as the unoptimized circuit

47 C-delayed Replacement This is allowed The initial c period corresponds to a reset period, before the optimized circuit can be used Most designers use lengthy resets anyway In experimental results, c < 10000 10000 clocks = 100us at 100MHz Not a severe restriction

48 When to Remove a Sequential Redundancy Replace net n with constant v if n t’ = v or n t’ is unobservable for all assumptions For each assumption, there is an implication graph that shows n t’ =v or n t’ = 

49 When to Remove a Sequential Redundancy Let t’’ be the least time offset on any label in those graphs If t’’ > t’ then c = 0 Else c = t’ - t’’ n is c-cycle stuck-at-v redundant Replace n with constant v to get a c-delayed safe replacement of the circuit

50 Experimental Results First run script.rugged on test circuit Map to two-input gates and inverters Run recursive learning redundancy removal algorithm Compare optimized circuit area CPU times from << 1 minute to 100 minutes on a dual Alpha 300 with 2GB RAM

51 Experimental Results CircuitAreaOptimized Area% Improvement S4996055814.0 S8204994921.4 S95392063231.3 S1269114010944.0 S15121337109218.3 S3384377537450.8 S53783616226137.5 S132077681631717.8 S3593232092320060.3 S3858429252286562.9

52 Future Work This algorithm does not find the complete set of redundancies Heuristics to choose good assumptions Heuristics to choose good nets to recursively learn on Find redundancies other than stuck-at- constant redundancies Avoid mapping to two-input gates Extend to multivalued circuits


Download ppt "Sequential Optimization without State Space Exploration A. Mehrota, S. Qadeer, V. Singhal, R. Brayton, A. Sangiovanni-Vincentelli, A. Aziz Presented by:"

Similar presentations


Ads by Google