ecen 4703 switching and finite automata theory

42
1 ECEN 4703 ECEN 4703 Switching and Finite Switching and Finite Automata Theory Automata Theory Sunil P Khatri Sunil P Khatri University of Colorado, University of Colorado, Boulder Boulder Spring 2002 Spring 2002 Modified from lecture notes Modified from lecture notes of Robert K Brayton, of Robert K Brayton, University of California, University of California, Berkeley Berkeley

Upload: bowie

Post on 22-Feb-2016

54 views

Category:

Documents


0 download

DESCRIPTION

ECEN 4703 Switching and Finite Automata Theory. Sunil P Khatri University of Colorado, Boulder Spring 2002 Modified from lecture notes of Robert K Brayton, University of California, Berkeley. Introduction. Motivation for Logic Synthesis - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: ECEN 4703 Switching and Finite Automata Theory

1

ECEN 4703ECEN 4703Switching and Finite Switching and Finite

Automata TheoryAutomata TheorySunil P Khatri Sunil P Khatri

University of Colorado, BoulderUniversity of Colorado, BoulderSpring 2002Spring 2002

Modified from lecture notes of Modified from lecture notes of Robert K Brayton, University of Robert K Brayton, University of

California, BerkeleyCalifornia, Berkeley

Page 2: ECEN 4703 Switching and Finite Automata Theory

2

IntroductionIntroductionMotivation for Logic SynthesisMotivation for Logic Synthesis• Commercial success - used almost Commercial success - used almost

everywhere VLSI is doneeverywhere VLSI is done• But more general – But more general –

– Generally - discrete functions of Generally - discrete functions of discrete valued variablesdiscrete valued variables

• Body of useful and general Body of useful and general techniques techniques – can be applied to other areascan be applied to other areas

Page 3: ECEN 4703 Switching and Finite Automata Theory

3

ApplicationsApplicationsFoundationFoundation for for• Combinational and sequential logic synthesisCombinational and sequential logic synthesis• Automatic test vector generationAutomatic test vector generation• Timing and false paths analysisTiming and false paths analysis• Formal verificationFormal verification• Asynchronous synthesisAsynchronous synthesis• Automata theoryAutomata theory• Optimal clocking schemesOptimal clocking schemes• Hazard analysisHazard analysis• Power estimationPower estimation• General combinatorial problemsGeneral combinatorial problems

Page 4: ECEN 4703 Switching and Finite Automata Theory

4

Outline of ClassOutline of ClassClass notes: (see class web page)Class notes: (see class web page)• IntroductionIntroduction

– Logic functions and their representationLogic functions and their representation– Unate recursive paradigm,Unate recursive paradigm,– Two Level logic minimization (ESPRESSO) Two Level logic minimization (ESPRESSO) – Quine McCluskey methodQuine McCluskey method

• Multi-level logic synthesisMulti-level logic synthesis– Introduction (Boolean networks, factored forms)Introduction (Boolean networks, factored forms)– DivisionDivision– SimplificationSimplification

• full_simplifyfull_simplify– TestingTesting– Technology mappingTechnology mapping

• Advanced technology mapping Advanced technology mapping

Page 5: ECEN 4703 Switching and Finite Automata Theory

5

Outline of ClassOutline of Class• Multi-level logic synthesis (contd.)Multi-level logic synthesis (contd.)

– Delay analysis (true and false paths)Delay analysis (true and false paths)– Timing optimizationTiming optimization– Constant delay paradigm (sizing) Constant delay paradigm (sizing)

• Sequential logic synthesisSequential logic synthesis– Introduction (FSM networks) Introduction (FSM networks) – Retiming and resynthesisRetiming and resynthesis– Asynchronous synthesisAsynchronous synthesis– Node minimization?Node minimization?– ** State minimization **** State minimization **

Page 6: ECEN 4703 Switching and Finite Automata Theory

6

The Boolean n-cube BThe Boolean n-cube Bnn

• B = { 0,1}B = { 0,1}• BB22 = {0,1} X {0,1} = {00, 01, 10, 11} = {0,1} X {0,1} = {00, 01, 10, 11}

B0B1 B2

B3 B4

Page 7: ECEN 4703 Switching and Finite Automata Theory

7

Boolean FunctionsBoolean Functions ff(x) : B(x) : Bnn B B B = {0, 1}, x = (xB = {0, 1}, x = (x11, x, x22, …, x, …, xnn))• xx11, x, x22, … are , … are variablesvariables• xx11, x, x11, x, x22, x, x22, … are , … are literalsliterals• each vertex of Beach vertex of Bnn is mapped to 0 or 1 is mapped to 0 or 1• the the onset onset of of ff is is {x|{x|ff(x)=1} =(x)=1} =f f 1 1 = = f f -1-1(1) (1) • the the offset offset of of ff is is {x|{x|ff(x)=0} =(x)=0} =f f 0 0 = = f f -1-1(0)(0)• if if f f 11 = B = Bnn, , ff is the is the tautologytautology, i.e. , i.e. ff 1 1 • if if f f 00 = B = Bnn ( (f f 11 = = ), ), ff is is not satisfiablenot satisfiable• if f(x) = g(x) for all x if f(x) = g(x) for all x BBnn, then f and g are, then f and g are

equivalentequivalentWe write simply We write simply ff instead of instead of f f 11

Page 8: ECEN 4703 Switching and Finite Automata Theory

8

LiteralsLiteralsA literal is a variable or its negationA literal is a variable or its negation

y, yy, yIt represents a It represents a logic functionlogic functionLiteral xLiteral x11 represents the logic function f, where represents the logic function f, where ff = {x|x = {x|x11 = 1} = 1}

f = xf = x1 1 f = xf = x1 1

xx1 1 xx11

Literal xLiteral x11 represents logic function g where represents logic function g where gg = {x| x = {x| x11 = 0} = 0}

Page 9: ECEN 4703 Switching and Finite Automata Theory

9

Boolean FormulasBoolean FormulasBoolean formulasBoolean formulas can be represented by can be represented by

formulas defined as catenations offormulas defined as catenations of• parentheses ( , )parentheses ( , )• literals x, y, z, x, y, zliterals x, y, z, x, y, z• Boolean operators Boolean operators (OR), (OR), XX (AND) (AND)• complementation, e.g. x + ycomplementation, e.g. x + yExamplesExamples

f = xf = x11 XX x x22 + x + x11 XX x x22 = (x = (x11+x+x22) ) X X (x(x11+x+x22))h = a + b X c = a h = a + b X c = a XX (b + c) (b + c)

We usually replace We usually replace XX by catenation, e.g. a by catenation, e.g. a X X bbabab

Page 10: ECEN 4703 Switching and Finite Automata Theory

10

Logic functions Logic functions • There are 2There are 2nn vertices in input space B vertices in input space Bnn

• There are 2There are 222nn distinct logic distinct logic functionsfunctions. . – Each subset of vertices is a distinct logic function: Each subset of vertices is a distinct logic function:

ff B Bnn

111111

000000

xx33

xx11

xx22

000 000 11001 001 00010 010 11011 011 00100 100 11101 101 00110 110 11111 111 00

““truth table”truth table”

Page 11: ECEN 4703 Switching and Finite Automata Theory

11

Logic FunctionsLogic Functions• However, there are infinite However, there are infinite

number of logic number of logic formulasformulasf = x + yf = x + y

= xy + xy + xy= xy + xy + xy = xx + xy + y= xx + xy + y = (x + y)(x + y) + xy= (x + y)(x + y) + xy

• Synthesis = Find the best Synthesis = Find the best formula (or “representation”)formula (or “representation”)

Page 12: ECEN 4703 Switching and Finite Automata Theory

12

Boolean Operations - Boolean Operations - AND, OR, COMPLEMENTAND, OR, COMPLEMENT

f : Bf : Bnn B Bg : Bg : Bnn B B

• AND - fg = h such thatAND - fg = h such thath = {x| f(x)=1 and g(x)=1}h = {x| f(x)=1 and g(x)=1}

• OR - f + g = h such thatOR - f + g = h such thath = {x| f(x)=1 or g(x)=1}h = {x| f(x)=1 or g(x)=1}

• COMPLEMENT - f = h such thatCOMPLEMENT - f = h such thath = {x| f(x) = 0}h = {x| f(x) = 0}

Page 13: ECEN 4703 Switching and Finite Automata Theory

13

CubesCubes• The AND of a set of literal functions The AND of a set of literal functions

(“conjunction” of literals) is a (“conjunction” of literals) is a cubecubeC = xyC = xy

is a cubeis a cubeC = (x=1)(y=0)C = (x=1)(y=0)

x =1x =1 y =0y =0 xyxy

zz

yyxx

Page 14: ECEN 4703 Switching and Finite Automata Theory

14

CubesCubes• If C If C f, C a cube, then C is an f, C a cube, then C is an implicantimplicant

of f.of f.• If C If C B Bnn, and C has k literals, then |C| has, and C has k literals, then |C| has 22n-kn-k vertices. vertices.Example 1Example 1 C = x y C = x y B B33..k = 2 , n = 3.k = 2 , n = 3.

C = {100, 101}.C = {100, 101}.|C| = 2 = 2|C| = 2 = 23-2.3-2.

• If k=n, the cube is a If k=n, the cube is a minterm.minterm.

Page 15: ECEN 4703 Switching and Finite Automata Theory

15

Representation of Representation of Boolean functionsBoolean functions

• The truth table of a function f : BThe truth table of a function f : Bnn B is a B is a tabulation of its value at each of the 2tabulation of its value at each of the 2n n

vertices of Bvertices of Bnn. . • For For

f = abcd + abcd + abcd + abcd + abcd + abcd + abcd + f = abcd + abcd + abcd + abcd + abcd + abcd + abcd + abcdabcd

the truth table is the truth table is

This is intractable for large nThis is intractable for large n (but (but canonicalcanonical))

Canonical means that if two functions are the same, Canonical means that if two functions are the same, then the canonical representations of each are then the canonical representations of each are isomorphic.isomorphic.

abcd fabcd f0 0000 00 0000 01 0001 11 0001 12 0010 02 0010 03 0011 13 0011 14 0100 04 0100 05 0101 15 0101 16 0110 06 0110 07 0111 07 0111 0

abcd fabcd f 8 1000 08 1000 0 9 1001 19 1001 110 1010 010 1010 011 1011 111 1011 112 1100 012 1100 013 1101 113 1101 114 1110 114 1110 115 1111 115 1111 1

Page 16: ECEN 4703 Switching and Finite Automata Theory

16

Sum-of-Products Sum-of-Products Representation - SOPRepresentation - SOP

• A function can be represented by a sum of A function can be represented by a sum of cubes (products):cubes (products):

f = ab + ac + bcf = ab + ac + bcSince each cube is a product of literals, this Since each cube is a product of literals, this

is a “sum of products” representationis a “sum of products” representation• A SOP can be thought of as a set of cubes FA SOP can be thought of as a set of cubes F

F = {ab, ac, bc} = CF = {ab, ac, bc} = C• A set of cubes that represents f is called a A set of cubes that represents f is called a

covercover of f. F={ab, ac, bc} is a cover of of f. F={ab, ac, bc} is a cover of f = ab + ac + bc. f = ab + ac + bc.

Page 17: ECEN 4703 Switching and Finite Automata Theory

17

SOPSOP

• Covers (SOP’s) can efficiently represent Covers (SOP’s) can efficiently represent many logic functions (i.e. for many, there many logic functions (i.e. for many, there exist small covers).exist small covers).

• Two-level minimization seeks the minimum Two-level minimization seeks the minimum size cover (least number of cubes)size cover (least number of cubes)

bcbc

acac ababcc

aa

bb

= onset minterm= onset mintermNote that each onset Note that each onset minterm is “covered” minterm is “covered” by at least one by at least one of the cubes, andof the cubes, andcovers no offset mintermcovers no offset minterm..

Page 18: ECEN 4703 Switching and Finite Automata Theory

18

IrredundantIrredundant

• Let F = {cLet F = {c11, c, c22, …, c, …, ckk} be a cover for f.} be a cover for f.f = f = ii

kk=1=1 c cii

A cube cA cube cii F is F is irredundantirredundant if F\{c if F\{cii} } f f

Example 2:Example 2: f = ab + ac + bc f = ab + ac + bcbcbc

acac ababcc

aa

bb

bcbc

acacNot coveredNot covered

F\{ab} F\{ab} f

Page 19: ECEN 4703 Switching and Finite Automata Theory

19

PrimePrime• A A literalliteral jj of cube of cube ccii FF ( = ( =f f ) is ) is primeprime if if

((F F \\ {{ccii }) }) { {c’c’ii } } ff where where c’c’ii is is ccii with literal with literal jj of of ccii deleted. deleted.• A A cubecube of F is prime if all its literals are of F is prime if all its literals are

primeprime..Example 3Example 3f = ab + ac + bcf = ab + ac + bccci i = ab; c’= ab; c’i i = a (literal b deleted)= a (literal b deleted)F \ {cF \ {ci i } } {c’ {c’i i } = a + ac + bc } = a + ac + bc

bcbc

acacaa

cc

aa

bb

Not equal to f sinceNot equal to f sinceoffset vertex is coveredoffset vertex is covered

F=ac + bc + a =F=ac + bc + a =F \{ci } {c’i }

Page 20: ECEN 4703 Switching and Finite Automata Theory

20

Prime and Irredundant Prime and Irredundant CoversCovers

• Definition 1 Definition 1 A cover is prime A cover is prime (irredundant) if all its cubes are prime (irredundant) if all its cubes are prime (irredundant). (irredundant).

• Definition 2 Definition 2 A prime of f is A prime of f is essentialessential (essential prime) if there is a minterm (essential prime) if there is a minterm (essential vertex) in that prime but in no (essential vertex) in that prime but in no other prime. other prime.

Page 21: ECEN 4703 Switching and Finite Automata Theory

21

Prime and Irredundant Prime and Irredundant CoversCovers

Example 4Example 4f = abc + bd + cd is prime and irredundant.f = abc + bd + cd is prime and irredundant.abc is abc is essentialessential since abcd since abcdabc, but not in bd abc, but not in bd

or cd or ador cd or ad

Why is abcd not an essential vertex of abc?Why is abcd not an essential vertex of abc?What is an essential vertex of abc?What is an essential vertex of abc?What other cube is essential? What What other cube is essential? What primeprime is not is not

essential?essential?

abcabc

bdbd

cdcdddaa

ccbb

Page 22: ECEN 4703 Switching and Finite Automata Theory

22

PLA’s - Multiple Output PLA’s - Multiple Output Boolean FunctionsBoolean Functions

• A PLA is a function f : BA PLA is a function f : Bnn B Bmm represented in SOP form:represented in SOP form:

aa

aaaa

aa

aa

~b~b cc dd

bb

~b~b

~b~b

~b~b

~c~c

~c~c

cc

cc

~d~d

~d~ddd

~d~d

f2f2 f3f3f1f1

n=4, m=3n=4, m=3

Page 23: ECEN 4703 Switching and Finite Automata Theory

23

PLA’s (contd)PLA’s (contd)• Each distinct cube appears just Each distinct cube appears just

once in the AND-plane, and can be once in the AND-plane, and can be shared by (multiple) outputs in the shared by (multiple) outputs in the OR-plane, e.g., cube a~bc~d.OR-plane, e.g., cube a~bc~d.

• Extensions from single output to Extensions from single output to multiple output minimization multiple output minimization theory are straightforward.theory are straightforward.

• Multi-level logic can be viewed Multi-level logic can be viewed mathematically as a connection of mathematically as a connection of single output functions.single output functions.

Page 24: ECEN 4703 Switching and Finite Automata Theory

24

Shannon (Boole) cofactorsShannon (Boole) cofactors

Let Let f : Bf : Bnn B be a Boolean function, B be a Boolean function, and x= and x= (x(x11, x, x22, …, x, …, xnn) the variables in the ) the variables in the support of f. The cofactor fsupport of f. The cofactor faa of f by a of f by a literal a=xliteral a=xii or a=x or a=xii is is

ffxxii (x (x11, x, x22, …, x, …, xnn) = f (x) = f (x11, …, x, …, xi-1i-1, 1, x, 1, xi+1i+1,…, x,…, xnn))ffxxii (x (x11, x, x22, …, x, …, xnn) = f (x) = f (x11, …, x, …, xi-1i-1, 0, x, 0, xi+1i+1,…, x,…, xnn) )

Page 25: ECEN 4703 Switching and Finite Automata Theory

25

Shannon (Boole) CofactorShannon (Boole) Cofactor• The The cofactorcofactor f fCC of f by a of f by a cubecube C is just f with C is just f with

the fixed values indicated by the literals of C, the fixed values indicated by the literals of C, e.g. if C=xe.g. if C=xi i xxjj, then x, then xi i =1, and x=1, and xj j =0.=0.

• If C= xIf C= x1 1 xx4 4 xx66, f, fCC is just the function f restricted is just the function f restricted to the subspace where xto the subspace where x1 1 =x=x6 6 =1 and x=1 and x4 4 =0.=0.

• As a function, fAs a function, fCC does not depend on x does not depend on x11,x,x4 4 or or xx66

(However, we still consider f(However, we still consider fCC as a function of as a function of all all nn variables, it just happens to be variables, it just happens to be independent of xindependent of x11,x,x4 4 and xand x66).).

• xx11f f f fxx11

Example:Example: f= ac + a c , af = ac, f f= ac + a c , af = ac, faa=c=c

Page 26: ECEN 4703 Switching and Finite Automata Theory

26

Fundamental TheoremFundamental Theorem

Theorem 1Theorem 1 Let c be a cube and f a Let c be a cube and f a function. Then c function. Then c f f f fcc 1. 1.

ProofProof. We use the fact that xf. We use the fact that xfxx = xf, and f = xf, and fx x is is independent of x.independent of x.

If:If: Suppose f Suppose fcc 1. Then cf=f 1. Then cf=fccc=c. Thus, c=c. Thus, c c f. f.

ffcc

Page 27: ECEN 4703 Switching and Finite Automata Theory

27

Proof (contd)Proof (contd)Only if.Only if. Assume c Assume c f fThen c Then c cf = cf cf = cfcc. But f. But fcc is independent of is independent of

literals l literals l c. If f c. If fcc 1, then 1, then m m B Bnn, f, fcc(m)=0. (m)=0. Let mLet mii’=m’=mii, if x, if xiic and xc and xiic. c. or if mor if mii=0, x=0, xi i c c or mor mii=1, x=1, xi i c. c. mmii’=m’=mii otherwise. otherwise.i.e. we make the literals of m’ agree with c, i.e. i.e. we make the literals of m’ agree with c, i.e.

m’ m’ c. But then f c. But then fcc(m’) = f(m’) = fcc(m) = 0,(m) = 0,Hence, c(m’)=1 Hence, c(m’)=1 and fand fcc(m’) c(m’)= 0,(m’) c(m’)= 0,contradicting c contradicting c cf cfcc..

m= 000m= 000m’= 101m’= 101

mm

m’m’

C=xzC=xz

Page 28: ECEN 4703 Switching and Finite Automata Theory

28

Cofactor of CoversCofactor of CoversDefinition 3Definition 3 The The cofactor of a covercofactor of a cover F is the sum F is the sum

of the cofactors of each of the cubes of F.of the cofactors of each of the cubes of F.Note:Note: If F={c If F={c11, c, c22,…, c,…, ckk} is a cover of f, then F} is a cover of f, then Fcc= =

{(c{(c11))cc, (c, (c22))cc,…, (c,…, (ckk))cc} is a cover of f} is a cover of fcc..

Suppose F(x) is a cover of f(x), i.e.Suppose F(x) is a cover of f(x), i.e.

Then for 1Then for 1jjn,n,

is a cover of fis a cover of fxxjj(x)(x)

( ) { }ii j i

i i j

F x c c

( ) ( )j jx i x

i

F x c

Page 29: ECEN 4703 Switching and Finite Automata Theory

29

Definition 4Definition 4 The cofactor C The cofactor Cxxjj of a cube C of a cube Cwith respect to a literal xwith respect to a literal xjj is is• C if xC if xjj and x and xjj do not appear in C do not appear in C• C\{xC\{xjj} if x} if xjj appears positively in C, i.e. appears positively in C, i.e.

xxjjCC• if xif xjj appears negatively in C, i.e. x appears negatively in C, i.e. xjjCC

Example 5Example 5 If C = xIf C = x1 1 xx44 x x66,,CCxx22 = C (x = C (x22 and x and x22 do not appear in C ) do not appear in C )CCxx11 = x = x44 x x6 6 (x(x11 appears positively in C) appears positively in C)CCxx4 4 = = (x (x44 appears negatively in C) appears negatively in C)

Page 30: ECEN 4703 Switching and Finite Automata Theory

30

Example 6Example 6F = abc + bd + cdF = abc + bd + cdFFbb = ac + cd = ac + cd

(Just drop b everywhere and throw away (Just drop b everywhere and throw away cubes containing literal b)cubes containing literal b)

Page 31: ECEN 4703 Switching and Finite Automata Theory

31

Shannon ExpansionShannon Expansion

f : Bf : Bnn B BTheorem 2Theorem 2

Theorem 3Theorem 3 F is a cover of f. Then F is a cover of f. Then

is also a cover of f.is also a cover of f.

We say that f (F) is We say that f (F) is expanded aboutexpanded about x xii. x. xii is called is called the the splitting variablesplitting variable..

i i

ii x xf x f x f

i iii x xF x F x F

Page 32: ECEN 4703 Switching and Finite Automata Theory

32

Example 7Example 7

=>=>

Cube Cube bcbc got split into two cubes got split into two cubes

( ) ( )a a

F ab ac bc

F aF aF a b c bc a bc

ab ac abc abc

cc

aa

bbcc

aa

bb

bcbc

Page 33: ECEN 4703 Switching and Finite Automata Theory

33

Cover MatrixCover MatrixWe sometimes use matrix notation to We sometimes use matrix notation to

represent a cover:represent a cover:

Example 8Example 8 F = ac + cd =F = ac + cd =

a b c da b c d a b c da b c dacac 1 2 1 2 or 1 - 1 - 1 2 1 2 or 1 - 1 - cdcd 2 2 0 1 - - 0 1 2 2 0 1 - - 0 1

Each row represents a cube. 1 means that the Each row represents a cube. 1 means that the positive literal appears in the cube, 0 the positive literal appears in the cube, 0 the negative. The 2 (or -) here represents that negative. The 2 (or -) here represents that the variable does the variable does not appearnot appear in the cube. It in the cube. It also represents both 0 and 1 values.also represents both 0 and 1 values.

Page 34: ECEN 4703 Switching and Finite Automata Theory

34

Example 9Example 9ac = 1 2 0 2 = {1, {0,1}, 0, {0,1}}ac = 1 2 0 2 = {1, {0,1}, 0, {0,1}}

= {1000, 1100, 1001, 1101}= {1000, 1100, 1001, 1101}

2 is sometimes called “input don’t care”, 2 is sometimes called “input don’t care”, but this is confusing so we won’t use the but this is confusing so we won’t use the term. term.

Page 35: ECEN 4703 Switching and Finite Automata Theory

35

Incompletely Specified Incompletely Specified FunctionsFunctions

FF = (f, d, r) : B = (f, d, r) : Bnn {0, 1, *} {0, 1, *}where * represents “don’t care”. where * represents “don’t care”.

(Sometimes we use 2 in place of *)(Sometimes we use 2 in place of *)

• f = onset function - f = onset function - f(x)=1 f(x)=1 FF(x)=1 (x)=1 • r = offset function - r = offset function - r(x)=1 r(x)=1 FF(x)=0 (x)=0 • d = don’t care function - d = don’t care function - d(x)=1 d(x)=1 FF(x)=*(x)=*

(f,d,r) forms a (f,d,r) forms a partitionpartition of B of Bnn. i.e.. i.e.• f + d + r = Bf + d + r = Bnn

• fd =fd = fr = dr = fr = dr = (pairwise disjoint) (pairwise disjoint)

Page 36: ECEN 4703 Switching and Finite Automata Theory

36

A completely specified function g is a A completely specified function g is a covercover for for FF=(f,d,r) if=(f,d,r) if

ff g g f+d f+d((Thus gr = Thus gr = ). Thus, if x). Thus, if xd (i.e. d(x)=1), d (i.e. d(x)=1),

then g(x) can be 0 or 1, but if xthen g(x) can be 0 or 1, but if xf, then f, then g(x)=1 and if xg(x)=1 and if xr, then g(x)=0.r, then g(x)=0.

(We “don’t care” which value g has at x(We “don’t care” which value g has at xd) d)

Page 37: ECEN 4703 Switching and Finite Automata Theory

37

Primes of Incompletely Primes of Incompletely Specified FunctionsSpecified Functions

Definition 5Definition 5 A cube c is A cube c is primeprime of of FF=(f,d,r) if =(f,d,r) if ccf+d (an implicant of f+d), and no other f+d (an implicant of f+d), and no other implicant (of f+d) contains c, i.e.implicant (of f+d) contains c, i.e.

(i.e. it is simply a prime of f+d)(i.e. it is simply a prime of f+d)

Definition 6Definition 6 Cube c Cube cjj of cover F={c of cover F={cii} is } is redundantredundant if f if f F\{c F\{cjj}. Otherwise it is }. Otherwise it is irredundantirredundant..

NoteNote that c that cf+d f+d cr = cr =

ccdfcc ~,~,~

Page 38: ECEN 4703 Switching and Finite Automata Theory

38

Example:Logic MinimizationExample:Logic MinimizationConsiderConsider FF(a,b,c)=(f,d,r), where f={abc, (a,b,c)=(f,d,r), where f={abc,

abc, abc} and d ={abc, abc}, and the abc, abc} and d ={abc, abc}, and the sequence of covers illustrated below:sequence of covers illustrated below:

FF11= = abc + abc+ abc

abc is redundanta is prime

FF33= a+= a+abc Expand Expand abc bc

Expand abcExpand abcaa

FF22= a+= a+abc + abc

FF44= a= a+bc

offoffonon

Don’t Don’t carecare

aa

ccbb

Page 39: ECEN 4703 Switching and Finite Automata Theory

39

Checking for Prime and Checking for Prime and IrredundantIrredundant

Let G={cLet G={cii} be a cover of } be a cover of FF=(f,d,r). Let D be a =(f,d,r). Let D be a cover for d.cover for d.

• cciiG is G is redundantredundant iff iff ccii (G\{c (G\{cii})})D D G Gi i (1)(1)

(Since c(Since cii (G\{c (G\{cii}) + D and c}) + D and cii = c = ciif+cf+ciid, henced, hencecciiff G\{c G\{cii}. Thus f}. Thus f G\{c G\{cii}.)}.)

• A literal l A literal l c cii is is primeprime if (c if (cii\{ l }) \{ l }) ( = (c( = (cii))ll ) ) is is not an implicant of not an implicant of FF..

• A cube cA cube cii is a prime of is a prime of FF iff all literals l iff all literals l c cii are prime.are prime.

Literal l Literal l c cii is not prime is not prime (c (cii))ll f+d f+d (2)(2)

Page 40: ECEN 4703 Switching and Finite Automata Theory

40

Note:Note: Both tests Both tests (1)(1) and and (2)(2) can be can be checked by checked by tautologytautology::

1)1) (G(Gii))ccii 1 (implies c 1 (implies cii redundant) redundant)2)2) (F(FD)D)((cci)i)ll

1 (implies l not prime) 1 (implies l not prime)

Page 41: ECEN 4703 Switching and Finite Automata Theory

41

ExampleExampleF={abc, abc, abc}F={abc, abc, abc}D={ac}D={ac}R={ab,ac}R={ab,ac}

Expand abc Expand abc ab= (c ab= (cii))ll = (abc) = (abc)cc Check ab Check ab f+d f+d (f+d) (f+d)abab = 1 = 1• (f+d)(f+d)abab = c +c = c +c 1 1 OKOKExpand abExpand ab a. Check a a. Check a f+d f+d • (f+d)(f+d)aa = bc + bc +c = bc + bc +c 1 1 OKOK F= a + abc + abcF= a + abc + abcCheck if abc is redundantCheck if abc is redundant• abc abc a+ abc + ac = F\{abc} a+ abc + ac = F\{abc} D D• (a+ abc + ac )(a+ abc + ac )abcabc = 1 = 1 OKOK

Page 42: ECEN 4703 Switching and Finite Automata Theory

42

Cover is now F = a + abc and D = ac Cover is now F = a + abc and D = ac

Check if abc is redundantCheck if abc is redundantabc abc a+ ac = F\{abc } a+ ac = F\{abc } D D• (a+ ac )(a+ ac )abcabc = = NOT REDUNDANTNOT REDUNDANT