Minimization of P-Circuits using Boolean Relations Anna Bernasconi University of Pisa Valentina...

28
Minimization of P-Circuits using Boolean Relations Anna Bernasconi University of Pisa Valentina Ciriani and Gabriella Trucco University of Milano Tiziano Villa University of Verona

Transcript of Minimization of P-Circuits using Boolean Relations Anna Bernasconi University of Pisa Valentina...

Page 1: Minimization of P-Circuits using Boolean Relations Anna Bernasconi University of Pisa Valentina Ciriani and Gabriella Trucco University of Milano Tiziano.

Minimization of P-Circuits using Boolean Relations

Minimization of P-Circuits using Boolean Relations

Anna BernasconiUniversity of Pisa

Valentina Ciriani and Gabriella TruccoUniversity of Milano

Tiziano VillaUniversity of Verona

Page 2: Minimization of P-Circuits using Boolean Relations Anna Bernasconi University of Pisa Valentina Ciriani and Gabriella Trucco University of Milano Tiziano.

OutlineOutlineOutlineOutline

Scenario: logic synthesis with critical signals

Problem definition

P-circuits

Boolean relations

Synthesis of P-circuits with Boolean relations

Experimental results

Page 3: Minimization of P-Circuits using Boolean Relations Anna Bernasconi University of Pisa Valentina Ciriani and Gabriella Trucco University of Milano Tiziano.

ScenarioScenarioScenarioScenario

Logic synthesis

In presence of critical signals that should be moved toward the output

Application objectives:To decrease power consumption:

signals with high switching activityTo decrease circuit delay:

signals with high delay

Page 4: Minimization of P-Circuits using Boolean Relations Anna Bernasconi University of Pisa Valentina Ciriani and Gabriella Trucco University of Milano Tiziano.

ProblemProblem

Restructuring (or synthesis) of a circuit in order to move critical signals near to the output:whileminimizing the circuit areakeeping the number of levels bounded performing an efficient minimization (using

Boolean relations)

Page 5: Minimization of P-Circuits using Boolean Relations Anna Bernasconi University of Pisa Valentina Ciriani and Gabriella Trucco University of Milano Tiziano.

Simple solution: ShannonSimple solution: Shannon

Shannon decomposition

x is the critical signal

fx=0 and fx=1 do not depend on x

x is near to the output

f x f x 1 x f x 0

x

fx=1

fx=0

Page 6: Minimization of P-Circuits using Boolean Relations Anna Bernasconi University of Pisa Valentina Ciriani and Gabriella Trucco University of Milano Tiziano.

Problem of Shannon approachProblem of Shannon approachProblem of Shannon approachProblem of Shannon approach

x3 x4

x1 x2

00

01

11

10

00 01 11 10

1

1

1

10

00

1

0

1 0

0 1 0

1

0

x3 x4x1 = 0

0

1

00 01 11 10

1 10

00

0

1 0

x3 x4x1 = 1

0

1

00 01 11 10

1 11

00

0

1 0

x2

x2

two cubes

It is not synthesis oriented

Page 7: Minimization of P-Circuits using Boolean Relations Anna Bernasconi University of Pisa Valentina Ciriani and Gabriella Trucco University of Milano Tiziano.

(x,p)-Decomposition (x,p)-Decomposition (x,p)-Decomposition (x,p)-Decomposition

let p be a function non depending on x

and do not depend on x

f ( x p ) f x p ( x p ) f x p

pxf pxf

xfx=p

fx=p

p

Page 8: Minimization of P-Circuits using Boolean Relations Anna Bernasconi University of Pisa Valentina Ciriani and Gabriella Trucco University of Milano Tiziano.

Problem of the approachProblem of the approachProblem of the approachProblem of the approach

x3 x4

x1 x2

00

01

11

10

00 01 11 10

1

1

0

01

00

0

1

* 1

1 0 1

0

1

x3 x4x1 = x2

0

1

00 01 11 10

1 01

11

1

0 1

x3 x4

x1 = x2

0

1

00 01 11 10

0 00

00

1

* 1

x2

x2

It is not area oriented

Let x = x1 and p = x2

Page 9: Minimization of P-Circuits using Boolean Relations Anna Bernasconi University of Pisa Valentina Ciriani and Gabriella Trucco University of Milano Tiziano.

The idea The idea The idea The idea

try not to split the cubes

idea:

the crossing cubes that do not depend on x are not projected

problem: how to identify the points that may form crossing cubes that do not depend on x?

They are in the intersection:

I f x p f x p

Page 10: Minimization of P-Circuits using Boolean Relations Anna Bernasconi University of Pisa Valentina Ciriani and Gabriella Trucco University of Milano Tiziano.

ExampleExampleExampleExamplex3 x4

0

1

00 01 11 10

0 00

11 1 0

x3 x4

0

1

00 01 11 10

1 01

11

0

0 0

x2

x2

1

x3 x4

0

1

00 01 11 10

0 00

11 0 0

x2

0Intersection

x1 = 0

x1 = 1

x3 x4

x1 x2

00

01

11

10

00 01 11 10

0

0

1

00

11

1

1

1 0

1 0 0

0

1

We can remove the

points of the intersection

x = x1 and p = 0

Page 11: Minimization of P-Circuits using Boolean Relations Anna Bernasconi University of Pisa Valentina Ciriani and Gabriella Trucco University of Milano Tiziano.

ExampleExampleExampleExamplex3 x4

0

1

00 01 11 10

0 00

00 1 0

x3 x4

0

1

00 01 11 10

1 01

00

0

0 0

x2

x2

1

x3 x4

0

1

00 01 11 10

0 00

11 0 0

x2

0Intersection

x1 = 0

x1 = 1

x3 x4

x1 x2

00

01

11

10

00 01 11 10

0

*

1

00

11

1

1

1 0

1 0 0

0

1

We can remove the

points of the intersection

But some cubes

could be split!

Page 12: Minimization of P-Circuits using Boolean Relations Anna Bernasconi University of Pisa Valentina Ciriani and Gabriella Trucco University of Milano Tiziano.

ExampleExampleExampleExamplex3 x4

0

1

00 01 11 10

0 00

** 1 0

x3 x4

0

1

00 01 11 10

1 01

**

0

0 0

x2

x2

1

x3 x4

0

1

00 01 11 10

0 00

11 0 0

x2

0Intersection

x1 = 0

x1 = 1

x3 x4

x1 x2

00

01

11

10

00 01 11 10

0

*

1

00

11

1

1

1 0

1 0 0

0

1

We insert don’t cares instead

at the points of the intersection

Page 13: Minimization of P-Circuits using Boolean Relations Anna Bernasconi University of Pisa Valentina Ciriani and Gabriella Trucco University of Milano Tiziano.

ExampleExampleExampleExamplex3 x4

0

1

00 01 11 10

0 00

** 1 0

x3 x4

0

1

00 01 11 10

1 01

**

0

0 0

x2

x2

1

x3 x4

0

1

00 01 11 10

0 00

11 0 0

x2

0Intersection

x1 = 0

x1 = 1

x3 x4

x1 x2

00

01

11

10

00 01 11 10

0

*

1

00

11

1

1

1 0

1 0 0

0

1

The cubes are

not split

Page 14: Minimization of P-Circuits using Boolean Relations Anna Bernasconi University of Pisa Valentina Ciriani and Gabriella Trucco University of Milano Tiziano.

ExampleExampleExampleExamplex3 x4

0

1

00 01 11 10

0 00

10 1 0

x3 x4

0

1

00 01 11 10

1 01

11

0

0 0

x2

x2

1

x3 x4

0

1

00 01 11 10

0 00

11 0 0

x2

0Intersection

x1 = 0

x1 = 1

x3 x4

x1 x2

00

01

11

10

00 01 11 10

0

*

1

00

11

1

1

1 0

1 0 0

0

1

The cubes are

not split

Page 15: Minimization of P-Circuits using Boolean Relations Anna Bernasconi University of Pisa Valentina Ciriani and Gabriella Trucco University of Milano Tiziano.

ExampleExampleExampleExamplex3 x4

0

1

00 01 11 10

0 00

10 1 0

x3 x4

0

1

00 01 11 10

1 01

11

0

0 0

x2

x2

1

x3 x4

0

1

00 01 11 10

0 00

*1 0 0

x2

0Intersection

x1 = 0

x1 = 1

x3 x4

x1 x2

00

01

11

10

00 01 11 10

0

*

1

00

11

1

1

1 0

1 0 0

0

1

Before minimizing the intersection, we set as don’t cares the points that are covered in both spaces

The cubes are

not split

Page 16: Minimization of P-Circuits using Boolean Relations Anna Bernasconi University of Pisa Valentina Ciriani and Gabriella Trucco University of Milano Tiziano.

P-circuit of a completely specified P-circuit of a completely specified Boolean function fBoolean function fP-circuit of a completely specified P-circuit of a completely specified Boolean function fBoolean function f

Let

A P-circuit P(f) P-circuit P(f) is:is:

wherewhere

P ( f ) (x SOP ( p)) SOP ( f )

( x SOP ( p)) SOP ( f = ) SOP ( f I )

I f x p f x p

fxp \ I f f xp

fxp \ I f f xp

f I I

P( f ) f

Page 17: Minimization of P-Circuits using Boolean Relations Anna Bernasconi University of Pisa Valentina Ciriani and Gabriella Trucco University of Milano Tiziano.

P-circuitsP-circuitsP-circuitsP-circuits

The intersection The intersection does not does not dependdepend on x on x

An optimal P-circuit optimal P-circuit P*(f) P*(f) for the function f is a P-circuit with minimum cost that can be synthesized for f

Page 18: Minimization of P-Circuits using Boolean Relations Anna Bernasconi University of Pisa Valentina Ciriani and Gabriella Trucco University of Milano Tiziano.

P-circuit of an incompletely specified P-circuit of an incompletely specified Boolean function fBoolean function fP-circuit of an incompletely specified P-circuit of an incompletely specified Boolean function fBoolean function f

Let f = {f on, f dc }, with f on ∩ f dc = ∅;

Define

A P-circuit P(f) P-circuit P(f) is:is:

wherewhere

P ( f ) (x SOP ( p)) SOP ( f )

( x SOP ( p)) SOP ( f = ) SOP ( f I )

I ( f x = po n f x = p

d c ) ( f x po n f x p

d c )

fxpon \ I f f xp

on f xpdc

fxpon \ I f f xp

on f xpdc

f I I

f on P( f ) f on f dc

Page 19: Minimization of P-Circuits using Boolean Relations Anna Bernasconi University of Pisa Valentina Ciriani and Gabriella Trucco University of Milano Tiziano.

Boolean RelationsBoolean Relations

A Boolean relation is a one-to-many multi-output Boolean mapping

R : {0,1}n {0,1}➝ m

A point in the input set {0,1}n can be associated with several points in the output set {0,1}m, which cannot always be represented using don’t cares

Page 20: Minimization of P-Circuits using Boolean Relations Anna Bernasconi University of Pisa Valentina Ciriani and Gabriella Trucco University of Milano Tiziano.

Boolean RelationsBoolean Relations

The set of multi-output functions compatible with a Boolean relation R is defined as

F(R) = { f | f R and f is a function}. ⊆

The solution of a Boolean relation R is a multi-output Boolean function f F(R)∈

The function f is an optimal solution of R according to a given cost function c, if

for all f′ F(R), c(f) ≤ c(f′) ∈

Page 21: Minimization of P-Circuits using Boolean Relations Anna Bernasconi University of Pisa Valentina Ciriani and Gabriella Trucco University of Milano Tiziano.

Minimization of P-circuits using Boolean Relation Minimization of P-circuits using Boolean Relation

P-circuit minimization: find the sets f =, f ≠ , f I leading to a P-circuit of

minimal cost

This problem can be formalized and efficiently solved using Boolean relations

We define a relation R s.t. F(R) corresponds exactly to the set of all possible

P-circuits for fan optimal solution of R is an optimal P-circuit

P∗(f) for f

Page 22: Minimization of P-Circuits using Boolean Relations Anna Bernasconi University of Pisa Valentina Ciriani and Gabriella Trucco University of Milano Tiziano.

f: {0,1}n → {0,1} Rf : {0,1}n−1 → {0,1}3

Input set: space spanned by all the variables but the critical signal xi

Output set: all possible tuples of functions f =, f ≠ , f I defining a P-circuit for f

Minimization of P-circuits using Boolean Relation Minimization of P-circuits using Boolean Relation

Page 23: Minimization of P-Circuits using Boolean Relations Anna Bernasconi University of Pisa Valentina Ciriani and Gabriella Trucco University of Milano Tiziano.

P-circuit minimization

selecting among all possible functions compatible with Rf ,each corresponding to a tuple f =, f ≠ , f I , the one whose overall SOP representation is minimal

Minimization of P-circuits using Boolean Relation Minimization of P-circuits using Boolean Relation

Page 24: Minimization of P-Circuits using Boolean Relations Anna Bernasconi University of Pisa Valentina Ciriani and Gabriella Trucco University of Milano Tiziano.

Incompletely Specified Functions Incompletely Specified Functions

Page 25: Minimization of P-Circuits using Boolean Relations Anna Bernasconi University of Pisa Valentina Ciriani and Gabriella Trucco University of Milano Tiziano.

Experimental results Experimental results Experimental results Experimental results

ESPRESSO benchmark suite

Linux Intel Core i7, 3.40 GHz CPU, 8GB RAM

CUDD library for OBDDs to represent functions

BREL (Bañeres, Cortadella, and Kishinevsky, 2009) for the synthesis of Boolean relations

Multioutput benchmarks have been synthesized minimizing each single output independently from the others

Page 26: Minimization of P-Circuits using Boolean Relations Anna Bernasconi University of Pisa Valentina Ciriani and Gabriella Trucco University of Milano Tiziano.

Experimental results Experimental results Experimental results Experimental results

μL and μBDD: refer to P-circuits synthesized with cost function μL

that minimizes the number of literals

and μBDD that minimizes the size of the BDDs used for representing the relations

modeling the P-circuit minimization problem using Boolean relations pays significantly:

P-circuit μL and P-circuit μBDD turned out to be more compact than the corresponding P-circuits proposed BCVT2009 in about 92% and 78% of our experiments, respectively

Page 27: Minimization of P-Circuits using Boolean Relations Anna Bernasconi University of Pisa Valentina Ciriani and Gabriella Trucco University of Milano Tiziano.

Experimental results Experimental results Experimental results Experimental results

Page 28: Minimization of P-Circuits using Boolean Relations Anna Bernasconi University of Pisa Valentina Ciriani and Gabriella Trucco University of Milano Tiziano.

ConclusionsConclusionsConclusionsConclusions

We showed that to explore all possible P-circuit solutions one must cast the problem as the minimization of a Boolean relation

In the experiments we report major improvements with respect to the previously published results

Future work: investigate the impact of using more general

cofactoring functions address simultaneously multi-ouput functions

trading-off quality of results vs. scalability