15
State university of New York at New Paltz Electrical and Computer Engineering Department Logic Synthesis Optimization Lect15: Heuristic Two Level Logic Minimization Dr. Yaser Khalifa Electrical and Computer Engineering Department State University of New York at New Paltz

State university of New York at New Paltz Electrical and Computer Engineering Department Logic Synthesis Optimization Lect15: Heuristic Two Level Logic

Embed Size (px)

Citation preview

Page 1: State university of New York at New Paltz Electrical and Computer Engineering Department Logic Synthesis Optimization Lect15: Heuristic Two Level Logic

State university of New York at New PaltzElectrical and Computer Engineering Department

Logic Synthesis OptimizationLect15: Heuristic Two Level Logic

Minimization

Dr. Yaser KhalifaElectrical and Computer Engineering Department

State University of New York at New Paltz

Page 2: State university of New York at New Paltz Electrical and Computer Engineering Department Logic Synthesis Optimization Lect15: Heuristic Two Level Logic

Unate Function

Definition :If, in the minimum sum-of-product form of a switching function, each variable appears either in its true form or its complemented form, but not both, then the function is called a unate function.

Ex) f1(x1 x2 x3)= x1 + x2 x3’ : unatef1(x1 x2 x3)= x1 + x1’ x2 x3’ : ≠ unate due to x1 & x1’

Th

A switching function is unate if and only if it can be expressed as a sum of essential prime cubes, all intersecting at a common subcube.

Page 3: State university of New York at New Paltz Electrical and Computer Engineering Department Logic Synthesis Optimization Lect15: Heuristic Two Level Logic

Heuristic Logic Minimization

Heuristic Logic Minimization (cube-based)

② Unate recursive paradigm : ESPRESSO(or in English; Divide-and-Conquer!)

i.e. Decomposition Make use of Shannon’s expansion to recursively operate on subsets of logic cover until cover has unate property.

Why looking for the unate property recursively?

Every prime of a unate function is essential.

Minimum form is given as the union of all EPIs.

Note that min form = EPIs + minimum PIs in general.

If F is a unate function, min form = EPIs : this is good to find min. form.

In ESPRESSO, used for complementation and tautology checking.

Page 4: State university of New York at New Paltz Electrical and Computer Engineering Department Logic Synthesis Optimization Lect15: Heuristic Two Level Logic

(b) Shannon Expansion

xjxj jjfxfxf

1

xx jjff

0x1xx jjjfff

where

Complementation

xjxjjj

fx)f(xf )(

xjxjjj

(f)x(f)x

Page 5: State university of New York at New Paltz Electrical and Computer Engineering Department Logic Synthesis Optimization Lect15: Heuristic Two Level Logic

How to determine if a function is unate :

The definition on prev. page requires the min. form of the function. But we are looking for it. Thus, we need another method.

A function is unate if it is unate in all its variables. A function is unate in xj if it is monotone in xj.

Thus, a function is unate if it is monotone in all its variables

Monotone in xj?

xj change causes all changing outputs to change in the same direction.

If xj of 0 1 causes all changing outputs to change

from 0 1 : monotone increasing in xj

from 1 0 : monotone decreasing in xj

Page 6: State university of New York at New Paltz Electrical and Computer Engineering Department Logic Synthesis Optimization Lect15: Heuristic Two Level Logic

A B C D F=C’D +ABD

F1=C’D +ABD+A’B’C’

0 0 0 0 1

0 0 0 1 1 1

0 0 1 0

0 0 1 1

0 1 0 0

0 1 0 1 1 1

0 1 1 0

0 1 1 1

1 0 0 0

1 0 0 1 1 1

1 0 1 0

1 0 1 1

1 1 0 0

1 1 0 1 1 1

1 1 1 0

1 1 1 1 1 1

Both OK for D: 0 1

Page 7: State university of New York at New Paltz Electrical and Computer Engineering Department Logic Synthesis Optimization Lect15: Heuristic Two Level Logic

A B D C F=C’D +ABD

F1=C’D +ABD+A’B’C’

0 0 0 0 1

0 0 0 1

0 0 1 0 1 1

0 0 1 1

0 1 0 0

0 1 0 1

0 1 1 0 1 1

0 1 1 1

1 0 0 0

1 0 0 1

1 0 1 0 1 1

1 0 1 1

1 1 0 0

1 1 0 1

1 1 1 0 1 1

1 1 1 1 1 1

Both OK for C: 0 1

Page 8: State university of New York at New Paltz Electrical and Computer Engineering Department Logic Synthesis Optimization Lect15: Heuristic Two Level Logic

A B C D F=C’D +ABD

F1=C’D +ABD+A’B’C’

0 0 0 0 1

1 0 0 0

0 0 0 1 1 1

1 0 0 1 1 1

0 0 1 0

1 0 1 0

0 0 1 1

1 0 1 1

0 1 0 0

1 1 0 0

0 1 0 1 1 1

1 1 0 1 1 1

0 1 1 0

1 1 1 0

0 1 1 1

1 1 1 1 1 1

F1 NOT OK for A: 0 1

Page 9: State university of New York at New Paltz Electrical and Computer Engineering Department Logic Synthesis Optimization Lect15: Heuristic Two Level Logic

Heuristic Minization Operators

• Expand– Make implicants prime– Remove covered implicants

• Reduce– Reduce size of each implicant while preserving cover

• Reshape– Modify implicant pairs: enlarge one implicant enabling

the reduction of another

• Irredendant– Make cover irredundant

Page 10: State university of New York at New Paltz Electrical and Computer Engineering Department Logic Synthesis Optimization Lect15: Heuristic Two Level Logic

Example

• On-set: 0000 10010 10100 10110 11000 11010 10101 10111 11001 11011 11101 1

• Prime implicants: | 0**0 1

| *0*0 1

| 01** 1

| 10** 1

| 1*01 1

| *101 1

Page 11: State university of New York at New Paltz Electrical and Computer Engineering Department Logic Synthesis Optimization Lect15: Heuristic Two Level Logic

Example

• Expand 0000 to = 0**0– Drop 0100, 0010. 0110 from the cover

• Expand 1000 to = *0*0– Drop 1010 from the cover

• Expand 0101 to = 01** – Drop 0111 from the cover

• Expand 1001 to = 10**– Drop 1011 from the cover

• Expand 1101 to = 1*01• Cover is { }

Page 12: State university of New York at New Paltz Electrical and Computer Engineering Department Logic Synthesis Optimization Lect15: Heuristic Two Level Logic

Example reduction

• Reduce 0**0 to nothing.

• Reduce = *0*0 to = 00*0

• Reduce = 1*01 to = 1101

• Cover is {}

Page 13: State university of New York at New Paltz Electrical and Computer Engineering Department Logic Synthesis Optimization Lect15: Heuristic Two Level Logic

Example reshape

• Reshape { to {• Where = 10*1

• Cover is {}

Page 14: State university of New York at New Paltz Electrical and Computer Engineering Department Logic Synthesis Optimization Lect15: Heuristic Two Level Logic

Example second expansion

• Expand = 10*1 = 10** • Expand = 1101 to = *101

• Cover is { }

Page 15: State university of New York at New Paltz Electrical and Computer Engineering Department Logic Synthesis Optimization Lect15: Heuristic Two Level Logic

Summary of Example

• Expansion:– Cover: { }– Prime, redundant, minimal w.r.t single cube containment

• Reduction: eliminated– B = *0*0 reduced to b = 00*0– E = 1*01 reduced to e = 1101– Cover: { }

• Reshape:– {} reshaped to {} where d = 10*1

• Second expansion – Cover: { }– Prime, irredundant (= minimal)