the analysis of cyclic circuits with boolean satisfiability

Post on 30-Dec-2015

34 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

DESCRIPTION

The Analysis of Cyclic Circuits with Boolean Satisfiability. inputs. outputs. combinational logic. Combinational Circuits. The current outputs depend only on the current inputs. Circuits with Cycles. 0. 0. x. AND. a. OR. =. +. +. +. 0. 0. f. b. (. a. x. (. d. c. (. - PowerPoint PPT Presentation

TRANSCRIPT

The Analysis of Cyclic Circuits with Boolean Satisfiability

),,( 11 mxxf a

),,( 12 mxxf a

),,( 1 mn xxf a

inputs outputs

The current outputs depend only on the current inputs.

Combinational Circuits

1x

2x

mx

miix

,,1

{0,1}

nj

mjf

,,1

{0,1}{0,1}:

combinationallogic

x0

0

0

a

b

c

d

AND

AND

OR

OR

AND

OR

x

x

0

)))((( 1fcdxab1f 0

Circuits with Cycles

x1 x1

x

x

a

b

c

d

AND

AND

OR

OR

AND

OR

1

11

)))((( 1fcdab1f

Circuits with Cycles

1

1

x

x

x

a

b

c

d

AND

AND

OR

OR

AND

OR

1

))(( cdab1f

)(2 abxcdf

Circuit is cyclic yet combinational;computes functions f1 and f2 with 6 gates.

An acyclic circuit computing these functions requires 8 gates.

Circuits with Cycles

Circuit Model

0

0

AND

1

AND

Perform static analysis in the “floating-mode”. At the outset:

11

1AND

• all wires are assumed to have unknown/undefined values ( ).• the primary inputs assume definite values in {0, 1}.

a “controlling” input

full set of“non-controlling” inputs

unknown/undefinedoutput

Circuit Model

During the analysis, only signals driven (directly or indirectly) by the primary inputs are assigned definite values.

1

ORAND

Perform static analysis in the “floating-mode”. At the outset:

• all wires are assumed to have unknown/undefined values ( ).• the primary inputs assume definite values in {0, 1}.

Exhaustive Analysis Assign values to

every wire Step through all

primary inputs values Propagate all values

a

b

c

d

AND

AND

OR

OR

AND

OR

x

x

1

1 1

0

0

0

Why use Boolean Satisfiability?

BDD-based analysis is slow for large problem sizes

SAT-based methods are known to be a good solution for large problem sizes in practice

SAT Based Analysis of Cyclic Circuits Find feedback arc set Introduce dummy variables Encode the circuit computation for ternary-

valued logic (0, 1, ) SAT Question: Is there any input

assignment that produces values somewhere in the circuit?

┴┴

┴ ┴

Feedback and Dummy Variables

NAND

NAND

NAND

NAND

a

b

NAND

NAND

NAND

NAND

a

b

d

e

dummy

dummy

Ternary Logic Conversion

a0

a1

b0

b1

f0f1

Ternary AND Encoding SchemeBinary AND

AND

ab

f

The SAT Question

AND

xi

xn

.

.

.

OR

yi

yn

.

.

.AND

SAT?g3

g1

g2

equivalence checking

checking

“For any input assignment (where all dummy variables are assigned their correct values) does a value persist?”

┴┴

The Final SAT Instance

AND

OR

AND

SAT?g3

g2

g1

AND

OR

AND

SAT?g3

g2

g1

XOR

XOR

b

a

e0

e1

d0

d1

equivalence checking

checking

equivalence checking

checking

dual-rail NANDs

dummies

dummies

y1

y0

x1

x0

b

a

e0

e1

d0

d1

dual-rail NANDs

dummies

dummiesXOR

XOR

equivalence checking

checking

equivalence checking

checking

y1

y0

x1

x0

NAND

NAND

NAND

NAND

a

b

AND

xi

xn

.

.

.

OR

yi

yn

.

.

.AND

SAT?g3

g1

g2

NAND

NAND

NAND

NAND

a

b

d

e

dummy

dummy

Runtimes (seconds)

Circuit Area BDD Based SAT Based Ratio

5xp1 218 0.10 0.01 10.00

bbara 135 0.01 < 0.01 1.00

clip 292 0.09 0.01 9.00

cse 346 0.13 0.03 4.33

dk16 426 0.09 0.03 3.00

duke2 664 2.35 0.07 33.57

ex1 514 0.36 0.07 5.14

keyb 401 0.24 0.03 8.00

misex3 1065 19.05 0.16 119.00

planet 890 1.03 0.08 12.88

planet1 882 1.40 0.11 12.73

pma 388 0.13 0.02 6.50

s1 555 0.56 0.06 9.33

s1488 1036 1.43 0.13 11.00

s386 224 0.02 0.02 1.00

sand 807 3.15 0.07 45.00

average 552 1.88 0.06 18.22

Further Work

AnalysisBetter feedback arc algorithmTry different encoding schemes

Synthesis Implement new version of CYCLIFY with ABC

top related