the synthesis of cyclic circuits with sat and interpolation by john backes and marc riedel ece...

21
The Synthesis of Cyclic Circuits with SAT and Interpolation By John Backes and Marc Riedel ECE University of Minnesota

Upload: owen-coyle

Post on 26-Mar-2015

218 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: The Synthesis of Cyclic Circuits with SAT and Interpolation By John Backes and Marc Riedel ECE University of Minnesota

The Synthesis of Cyclic Circuits with SAT and Interpolation

By John Backes and Marc Riedel

ECE University of Minnesota

Page 2: The Synthesis of Cyclic Circuits with SAT and Interpolation By John Backes and Marc Riedel ECE University of Minnesota

Outline Motivation For Cyclic Circuits General Method Old Approach New Approach Results

Page 3: The Synthesis of Cyclic Circuits with SAT and Interpolation By John Backes and Marc Riedel ECE University of Minnesota

Motivation

Cyclic Circuit: 2 functions, 5 variables, 2 fan-in 4 gates.

cgab decf

cdeabf decabg

a

bc

c

de

Acyclic Circuit: at least 3 fan-in 4 gates.

a b c

c d e

f

g

Page 4: The Synthesis of Cyclic Circuits with SAT and Interpolation By John Backes and Marc Riedel ECE University of Minnesota

How can one make a cyclic circuit?

Acyclic

f0 f1 f2

b ca d

f0 f1 f2

b ca d

f0

f2f1

a c

a b

c d

Consder some acyclic circuit Pick support variables Pick target support sets in a cyclic fashion

Page 5: The Synthesis of Cyclic Circuits with SAT and Interpolation By John Backes and Marc Riedel ECE University of Minnesota

What is wrong with the old approach? Even if a solution exists at a functional level, the

gate representation may not be combinational. Old method uses BDDs.

These do not scale well with the size of the circuit.

Old method for functional dependencies relies on algebraic manipulation. Also not very robust and doesn’t scale well.

Page 6: The Synthesis of Cyclic Circuits with SAT and Interpolation By John Backes and Marc Riedel ECE University of Minnesota

a

a

a

b

b

b

gh

f

Jiang, Mishenko, Brayton, “On Breakable Cyclic Definitions”, ICCAD04

Combinational on Functional Level

Page 7: The Synthesis of Cyclic Circuits with SAT and Interpolation By John Backes and Marc Riedel ECE University of Minnesota

Combinational on Functional Level

Jiang, Mishenko, Brayton, “On Breakable Cyclic Definitions”, ICCAD04

0

0

0

0

0

0

gh

f

Page 8: The Synthesis of Cyclic Circuits with SAT and Interpolation By John Backes and Marc Riedel ECE University of Minnesota

Jiang, Mishenko, Brayton, “On Breakable Cyclic Definitions”, ICCAD04

f

gh

Combinational on Functional Level

Page 9: The Synthesis of Cyclic Circuits with SAT and Interpolation By John Backes and Marc Riedel ECE University of Minnesota

Combinational on Functional Level

a

a

a

b

b

b

gh

f

a

bJiang, Mishenko, Brayton, “On Breakable Cyclic Definitions”, ICCAD04

Page 10: The Synthesis of Cyclic Circuits with SAT and Interpolation By John Backes and Marc Riedel ECE University of Minnesota

What is better with the new approach Uses SAT-based method for functional

dependency. SAT-based cyclic analysis during synthesis.

This scales better for larger benchmarks.

Checks to see if functions are combinational at the functional level. If the solution is combinational at the functional level,

there must exist a combinational mapping to gates.

Page 11: The Synthesis of Cyclic Circuits with SAT and Interpolation By John Backes and Marc Riedel ECE University of Minnesota

The Notion of Dependency

We say a function f is dependent on a function g (for some assignment of the variables in f ’s support set) if the value of g toggles the value of f.

If g is a don’t-care for this input assignment, then f does not depend on g.

Page 12: The Synthesis of Cyclic Circuits with SAT and Interpolation By John Backes and Marc Riedel ECE University of Minnesota

If there exists a cycle in any induced dependency graph for a circuit, then the circuit is not combinational.

If every induced dependency graph is acyclic, then the circuit is combinational.

The Notion of Dependency

f0

f2f1

a c

a b

c d

f0

f2f1

a c

a b

c d

Page 13: The Synthesis of Cyclic Circuits with SAT and Interpolation By John Backes and Marc Riedel ECE University of Minnesota

The Notion of Dependency

If there exists a cycle in any induced dependency graph for a circuit, then the circuit is not combinational.

If every induced dependency graph is acyclic, then the circuit is combinational.

f0

f2f1

a c

a b

c d

f0

f2f1

a c

a b

c d

Page 14: The Synthesis of Cyclic Circuits with SAT and Interpolation By John Backes and Marc Riedel ECE University of Minnesota

Checking Cyclic Dependency With SAT

Consider some function f (x0, x1, … , xn) and a copy of the same function with disjoint support f* (x0*, x1*, … , xn*).

The satisfiability of the following clauses indicates if function f is dependent on function xi for some assignment of the support variables of f.

Page 15: The Synthesis of Cyclic Circuits with SAT and Interpolation By John Backes and Marc Riedel ECE University of Minnesota

Functional Dependency C.-C. Lee, J.-H. R. Jiang, C.-Y. Huang, and A. Mishchenko, “Scalable

exploration of functional dependency by interpolation and incremental SAT solving”, ICCAD ‘07

If SAT, the dependency function h does not exist.

If UNSAT, Craig Interpolation can be used to derive an expression for h.

f0 Left

f0 f1 f2 f3

x0 x1 xn

f0 ≠ f0*

f0 Right

f3* f2* f1* f0*

x0*x1* xn*

f2 = f2* f3 = f3* f1 = f1*

g1

SAT?

. . . . . .

Tells us if f0 (x0, x1, … , xn) can be expressed in terms of some function h (f0, f1, f2, f3)

Page 16: The Synthesis of Cyclic Circuits with SAT and Interpolation By John Backes and Marc Riedel ECE University of Minnesota

Combining Functional Dependency with Cyclic Dependencies Functional dependency tells us if a function can

be represented with a specific support set. Does not tell us if functions can be represented in a

cyclic fashion. We can combine the SAT instances for

functional dependencies and cyclic dependencies to determine if a dependency graph is combinational. Allows us to consider a functional representation that

may be more compact than an acyclic representation.

Page 17: The Synthesis of Cyclic Circuits with SAT and Interpolation By John Backes and Marc Riedel ECE University of Minnesota

General Steps of Algorithm

1. Choose a dependency graph.2. Locate all the cycles.3. For each target function, create SAT instance to assert

that a dependency function exists.4. For each dependency in each cycle, create a SAT

instance that asserts the dependency holds for some PI assignment.

5. Create the logical OR of the instances in steps 3 and 4.6. If the instance created in step 5 is unsatisfiable, then the

dependency graph is combinational.

Page 18: The Synthesis of Cyclic Circuits with SAT and Interpolation By John Backes and Marc Riedel ECE University of Minnesota

f2 Left

f2 f0 c d

SAT?

f2 ≠ f2*

f2 Right

d* c* f0* f2*

f1 Left

f1 f2 a c

f1 Right

c* a* f2* f1*

c = c* d = d* f0 = f0* a = a* c = c* f2 = f2* f1 ≠ f1*

g2 g3

f0 Left

f0 f1 a b

a b c d

f0 ≠ f0*

f0 Right

b* a* f1* f0*

a = a* b = b* f1 = f1*

g1

a* b* c* d* a b c d a* b* c* d* a b c d a* b* c* d*

g4

f0

f2f1

a c

a b

c d

g1, g2, and g3 check for functional dependencies

g4 checks to see if there is an induced cyclic dependency

Page 19: The Synthesis of Cyclic Circuits with SAT and Interpolation By John Backes and Marc Riedel ECE University of Minnesota

Results

Page 20: The Synthesis of Cyclic Circuits with SAT and Interpolation By John Backes and Marc Riedel ECE University of Minnesota

Further work Develop good technology mapping strategy.

Some ideas based on work in ICCAD08. Integrate into full synthesis methodology.

Branch and bound.Dynamic programming.Partially completed:

Biggest problem is searching for good heuristic for candidate functions.

Page 21: The Synthesis of Cyclic Circuits with SAT and Interpolation By John Backes and Marc Riedel ECE University of Minnesota

Acknowledgements

Alan Mishchenko

ABC: A System for Sequential Synthesis and Verification was used to along with MiniSat to implement the SAT Based algorithm

Research funding was provided by FENA