ICS 252 Introduction to Computer Design Lecture 9 Winter 2004 Eli Bozorgzadeh Computer Science...

14
ICS 252 Introduction to Computer Design Lecture 9 Winter 2004 Eli Bozorgzadeh Computer Science Department-UCI

Transcript of ICS 252 Introduction to Computer Design Lecture 9 Winter 2004 Eli Bozorgzadeh Computer Science...

Page 1: ICS 252 Introduction to Computer Design Lecture 9 Winter 2004 Eli Bozorgzadeh Computer Science Department-UCI.

ICS 252 Introduction to Computer Design

Lecture 9

Winter 2004

Eli BozorgzadehComputer Science Department-UCI

Page 2: ICS 252 Introduction to Computer Design Lecture 9 Winter 2004 Eli Bozorgzadeh Computer Science Department-UCI.

2 Winter 2004 ICS 252-Intro to Computer Design

• Reference– Lecture note by Rajesh Gupta on resource

sharing[©Gupta]

• http://www.ics.uci.edu/~rgupta/ics252.html (lecture 8)

– Chapter 7 of the textbook

• Administrative– Midterm 1: Feb 13, 10 a.m. in the class– Will email you to meet me for your final project

early next week

Page 3: ICS 252 Introduction to Computer Design Lecture 9 Winter 2004 Eli Bozorgzadeh Computer Science Department-UCI.

3 Winter 2004 ICS 252-Intro to Computer Design

Logic Optimization

• Logic synthesis synonymous with logic optimization

• Optimization depending on • Implementation style

– Two-level (PLA)– Multi-level (cell- or array-based)

• Circuit operation– Combinational– Sequential

Page 4: ICS 252 Introduction to Computer Design Lecture 9 Winter 2004 Eli Bozorgzadeh Computer Science Department-UCI.

4 Winter 2004 ICS 252-Intro to Computer Design

Agenda

• Combinational logic design basics

• Exact optimization for two-level logic

• Heuristic optimization for two-level logic

• Symbolic optimization and encoding problems

Page 5: ICS 252 Introduction to Computer Design Lecture 9 Winter 2004 Eli Bozorgzadeh Computer Science Department-UCI.

5 Winter 2004 ICS 252-Intro to Computer Design

Combinational logic design basics• Two-level representation• Cubes and covers

– Cover C of f if fONCfONUfDC

• Minimum cover – No cover with fewer cubes

• Irredundant cover– If no subset of C is a cover of f– No implicant can be dropped

• Minimal cover w.r.t. single-cube containment (SCC)– No cube of C is contained in another cube of C

• Irredundant SCC (is it true for converse?

Page 6: ICS 252 Introduction to Computer Design Lecture 9 Winter 2004 Eli Bozorgzadeh Computer Science Department-UCI.

6 Winter 2004 ICS 252-Intro to Computer Design

Cont…

• Prime implicants– Prime implicant not contained by any other

implicant– A product of literals where no literal can be

dropped– Geometrically : largest size cube without

intersecting the OFF-SET

• Essential prime implicant– Must be contained in any cover of the

function

Page 7: ICS 252 Introduction to Computer Design Lecture 9 Winter 2004 Eli Bozorgzadeh Computer Science Department-UCI.

7 Winter 2004 ICS 252-Intro to Computer Design

Exact optimization for two-level logic

• Goals:– Reduce number of implicants– Reduce number of literals

• Determine minimum cover of f• Quine:

– There exists a minimum cover that is prime

• Look just for prime implicants• Quine-McCluskey method:

– Compute prime implicants– Determine minimum cover

Page 8: ICS 252 Introduction to Computer Design Lecture 9 Winter 2004 Eli Bozorgzadeh Computer Science Department-UCI.

8 Winter 2004 ICS 252-Intro to Computer Design

Prime implicant table

• A binary-valued matrix A

• Columns are prime implicants

• Rows are minterms in the ON-SET

• aij=1 iff prime cover j covers minterm I

• Example:– f=a’b’c’+a’b’c+ab’c+abc+abc’– Primes?– Implicant table?

Page 9: ICS 252 Introduction to Computer Design Lecture 9 Winter 2004 Eli Bozorgzadeh Computer Science Department-UCI.

9 Winter 2004 ICS 252-Intro to Computer Design

Cover

• A Cover can be represented by a (hyper)graph with minterms as vertices and primes as edges (hyper)

a

b

c

Page 10: ICS 252 Introduction to Computer Design Lecture 9 Winter 2004 Eli Bozorgzadeh Computer Science Department-UCI.

10 Winter 2004 ICS 252-Intro to Computer Design

Covering problem

• Given A, cover all the rows with least number of columns

• A minimum cover is a minimum set of columns which covers all rows.

• Determine x such that Ax1• Minimize cardinality of x• A can be seen as incidence matrix of a

hypergraph• Column covering as an edge covering

problem

Page 11: ICS 252 Introduction to Computer Design Lecture 9 Winter 2004 Eli Bozorgzadeh Computer Science Department-UCI.

11 Winter 2004 ICS 252-Intro to Computer Design

Covering

• Brute force : consider all possible values

• Complexity?

• Use pruning: Petrick’s method

Page 12: ICS 252 Introduction to Computer Design Lecture 9 Winter 2004 Eli Bozorgzadeh Computer Science Department-UCI.

12 Winter 2004 ICS 252-Intro to Computer Design

Petrick’s method

• Write covering clauses of the reduced table in POS form

• Multiply out POS form into SOP form

• Select cube of minimum size

Page 13: ICS 252 Introduction to Computer Design Lecture 9 Winter 2004 Eli Bozorgzadeh Computer Science Department-UCI.

13 Winter 2004 ICS 252-Intro to Computer Design

Example• POS form

– p1(p1+p2)(p2+p3)(p3+p4)p4=1

• SOP form– p1p2p4+p1p3p4=1

• Two minimum covers of cardinality 3

• Solution {p1,p2,p4}, {p1,p3,p4}

Page 14: ICS 252 Introduction to Computer Design Lecture 9 Winter 2004 Eli Bozorgzadeh Computer Science Department-UCI.

14 Winter 2004 ICS 252-Intro to Computer Design

Heuristic Method

• Local minimum cover– Given an initial cover– Make it prime– Make it irredundant

• Iterative improvement– Reduce cover cardinality by modifying

implicants.