ELEC 2200-002 Digital Logic Circuits Fall 2015 Logic Synthesis (Chapters 2-5) Vishwani D. Agrawal...

34
ELEC 2200-002 Digital Logic Circuits Fall 2015 Logic Synthesis (Chapters 2-5) Vishwani D. Agrawal James J. Danaher Professor Department of Electrical and Computer Engineering Auburn University, Auburn, AL 36849 http://www.eng.auburn.edu/~vagrawal [email protected] Fall 2015, Nov Fall 2015, Nov 6 . . . 6 . . . ELEC2200-002 Lecture 6 ELEC2200-002 Lecture 6 1

description

Synthesis Procedure Minimization – Obtain MSOP or MPOS. This is also known as two-level minimization because the result can be implemented as a two-level AND-OR or NAND-NAND or NOR-NOR circuit. Technology mapping – Considering design requirements, transform the minimized form into one of the technologically realizable forms: Programmable logic array (PLA) Standard cell library Field programmable gate array (FPGA) Others... Fall 2015, Nov 6... ELEC Lecture 6 3

Transcript of ELEC 2200-002 Digital Logic Circuits Fall 2015 Logic Synthesis (Chapters 2-5) Vishwani D. Agrawal...

Page 1: ELEC 2200-002 Digital Logic Circuits Fall 2015 Logic Synthesis (Chapters 2-5) Vishwani D. Agrawal James J. Danaher Professor Department of Electrical and.

ELEC 2200-002Digital Logic Circuits

Fall 2015Logic Synthesis (Chapters 2-5)

Vishwani D. AgrawalJames J. Danaher Professor

Department of Electrical and Computer EngineeringAuburn University, Auburn, AL 36849http://www.eng.auburn.edu/~vagrawal

[email protected]

Fall 2015, Nov 6 . . .Fall 2015, Nov 6 . . . ELEC2200-002 Lecture 6ELEC2200-002 Lecture 6 11

Page 2: ELEC 2200-002 Digital Logic Circuits Fall 2015 Logic Synthesis (Chapters 2-5) Vishwani D. Agrawal James J. Danaher Professor Department of Electrical and.

Logic SynthesisDefinition: To design a logic circuit such that it meets the specifications and can be economically manufactured:

Performance – meets delay specification, or has minimum delay.Cost – uses minimum hardware, smallest chip area, smallest number of gates or transistors.Power – meets power specification, or consumes minimum power.Testablility – has no redundant (untestable) logic and is easily testable.

Fall 2015, Nov 6 . . .Fall 2015, Nov 6 . . . ELEC2200-002 Lecture 6ELEC2200-002 Lecture 6 22

Page 3: ELEC 2200-002 Digital Logic Circuits Fall 2015 Logic Synthesis (Chapters 2-5) Vishwani D. Agrawal James J. Danaher Professor Department of Electrical and.

Synthesis ProcedureMinimization – Obtain MSOP or MPOS. This is also known as two-level minimization because the result can be implemented as a two-level AND-OR or NAND-NAND or NOR-NOR circuit.Technology mapping – Considering design requirements, transform the minimized form into one of the technologically realizable forms:

Programmable logic array (PLA)Standard cell libraryField programmable gate array (FPGA)Others . . .

Fall 2015, Nov 6 . . .Fall 2015, Nov 6 . . . ELEC2200-002 Lecture 6ELEC2200-002 Lecture 6 33

Page 4: ELEC 2200-002 Digital Logic Circuits Fall 2015 Logic Synthesis (Chapters 2-5) Vishwani D. Agrawal James J. Danaher Professor Department of Electrical and.

References on Synthesis

G. De Micheli, Synthesis and Optimization of Digital Circuits, New York: McGraw-Hill, 1994.S. Devadas, A. Ghosh and K. Keutzer, Logic Synthesis, New York: McGraw-Hill, 1994.

Fall 2015, Nov 6 . . .Fall 2015, Nov 6 . . . ELEC2200-002 Lecture 6ELEC2200-002 Lecture 6 44

Page 5: ELEC 2200-002 Digital Logic Circuits Fall 2015 Logic Synthesis (Chapters 2-5) Vishwani D. Agrawal James J. Danaher Professor Department of Electrical and.

Programmable Logic Array (PLA)

A direct implementation of multi-output function as a two-level circuit in MOS technology.PLA styles:

NAND-NANDNOR-NOR

Textbook, Chapter 5.

Fall 2015, Nov 6 . . .Fall 2015, Nov 6 . . . ELEC2200-002 Lecture 6ELEC2200-002 Lecture 6 55

Page 6: ELEC 2200-002 Digital Logic Circuits Fall 2015 Logic Synthesis (Chapters 2-5) Vishwani D. Agrawal James J. Danaher Professor Department of Electrical and.

0

4

12

8 1

1

5

13 1

9 1

3 7 1

15 1

11 1

2 6

14

10 1

0

4

12 8

1 1

5 1

13 1

9 1

3 7 1

15 1

11

2 6

14

10

Example: Two-Output FunctionNeed four products: P1, P2, P3, P4

Fall 2015, Nov 6 . . .Fall 2015, Nov 6 . . . ELEC2200-002 Lecture 6ELEC2200-002 Lecture 6 66

F1 A

B

C

D

F2 A

B

C

D

Page 7: ELEC 2200-002 Digital Logic Circuits Fall 2015 Logic Synthesis (Chapters 2-5) Vishwani D. Agrawal James J. Danaher Professor Department of Electrical and.

Two-Level AND-OR ImplementationAlso known as technology-independent circuit.

Fall 2015, Nov 6 . . .Fall 2015, Nov 6 . . . ELEC2200-002 Lecture 6ELEC2200-002 Lecture 6 77

A

B

C

D

F1

F2

P1

P2

P3

P4

INPUTS AND OR

Page 8: ELEC 2200-002 Digital Logic Circuits Fall 2015 Logic Synthesis (Chapters 2-5) Vishwani D. Agrawal James J. Danaher Professor Department of Electrical and.

INPUTS NAND NAND

NAND-NAND Implementation

Fall 2015, Nov 6 . . .Fall 2015, Nov 6 . . . ELEC2200-002 Lecture 6ELEC2200-002 Lecture 6 88

A

B

C

D

F1

F2

1P

2P

4P

3P

Page 9: ELEC 2200-002 Digital Logic Circuits Fall 2015 Logic Synthesis (Chapters 2-5) Vishwani D. Agrawal James J. Danaher Professor Department of Electrical and.

A NAND Gate in nMOS Technology

Fall 2015, Nov 6 . . .Fall 2015, Nov 6 . . . ELEC2200-002 Lecture 6ELEC2200-002 Lecture 6 99

VDD

X

Y

XY

GND

VDD

X

Y

XY

GND

VDD

X

Y

XY

GND

R. C. Jaeger and T, N. Blalock, Microelectronic Circuit Design,Boston: McGraw-Hill, 2008, Section 6.8.2.

Depletionload

Enhancementload

Page 10: ELEC 2200-002 Digital Logic Circuits Fall 2015 Logic Synthesis (Chapters 2-5) Vishwani D. Agrawal James J. Danaher Professor Department of Electrical and.

NAND-NAND PLA

Fall 2015, Nov 6 . . .Fall 2015, Nov 6 . . . ELEC2200-002 Lecture 6ELEC2200-002 Lecture 6 1010

A B C D F1 F2

1P

2P

4P

3P

VDD

VDD

VDD

VDD

VDD

VDD

GND

Page 11: ELEC 2200-002 Digital Logic Circuits Fall 2015 Logic Synthesis (Chapters 2-5) Vishwani D. Agrawal James J. Danaher Professor Department of Electrical and.

NAND-NAND PLA SCHEMATIC

Fall 2015, Nov 6 . . .Fall 2015, Nov 6 . . . ELEC2200-002 Lecture 6ELEC2200-002 Lecture 6 1111

A B C D F1 F2

1P

2P

4P

3P

INP

UTS

OU

TPU

TS

AND-plane OR-plane

Tran

sist

ors

atcr

oss-

poin

ts

Page 12: ELEC 2200-002 Digital Logic Circuits Fall 2015 Logic Synthesis (Chapters 2-5) Vishwani D. Agrawal James J. Danaher Professor Department of Electrical and.

Standard-Cell DesignObtain two-level minimized form.Map the design onto predesigned building blocks called standard cells (technology mapping).Standard-cell library contains predesigned logic cells in the technology of manufacture. Examples of technology:

90 nanometer CMOS65 nanometer CMOS45 nanometer CMOS. . .

This is known as application-specific integrated circuit (ASIC).

Fall 2015, Nov 6 . . .Fall 2015, Nov 6 . . . ELEC2200-002 Lecture 6ELEC2200-002 Lecture 6 1212

Page 13: ELEC 2200-002 Digital Logic Circuits Fall 2015 Logic Synthesis (Chapters 2-5) Vishwani D. Agrawal James J. Danaher Professor Department of Electrical and.

Technology MappingFind a common logic element, e.g., two-input NAND gate or inverter (one-input NAND).MSOP is converted into NAND-NAND circuit.Split larger input gates into two-input NAND gates and inverters.Cover the circuit with standard cells, also split into two-input NAND gates and inverters (graph-matching).

Fall 2015, Nov 6 . . .Fall 2015, Nov 6 . . . ELEC2200-002 Lecture 6ELEC2200-002 Lecture 6 1313

Page 14: ELEC 2200-002 Digital Logic Circuits Fall 2015 Logic Synthesis (Chapters 2-5) Vishwani D. Agrawal James J. Danaher Professor Department of Electrical and.

A Typical Cell LibraryName Area units (cost) Inputs Output function, Z

Inverter 2 A

NAND2 3 A, B

NAND3 4 A, B, C

NAND4 5 A, B, C, D

AOI21 4 A, B, C

OAI21 4 A, B, C

AOI22 5 A, B, C, D

XOR 4 A, B

Fall 2015, Nov 6 . . .Fall 2015, Nov 6 . . . ELEC2200-002 Lecture 6ELEC2200-002 Lecture 6 1414

AZ ABZ

ABCZ

ABCDZ CABZ

CDABZ BABAZ

S. Devadas, A. Ghosh and K. Keutzer, Logic Synthesis, New York: McGraw-Hill1994, Section 7.7, pp. 185-198.

CBAZ )(

Page 15: ELEC 2200-002 Digital Logic Circuits Fall 2015 Logic Synthesis (Chapters 2-5) Vishwani D. Agrawal James J. Danaher Professor Department of Electrical and.

NAND3 Cell in TransistorsNAND3 Cell in Transistors

Fall 2015, Nov 6 . . .Fall 2015, Nov 6 . . . ELEC2200-002 Lecture 6ELEC2200-002 Lecture 6 1515

A

B

C

Z

VDD

GND

Page 16: ELEC 2200-002 Digital Logic Circuits Fall 2015 Logic Synthesis (Chapters 2-5) Vishwani D. Agrawal James J. Danaher Professor Department of Electrical and.

NAND3 Cell Graphs

Fall 2015, Nov 6 . . .Fall 2015, Nov 6 . . . ELEC2200-002 Lecture 6ELEC2200-002 Lecture 6 1616

Directed AcyclicGraph (DAG)(tree)Root ≡ OutputOne-input node (NOT)Two-input node (NAND)

Page 17: ELEC 2200-002 Digital Logic Circuits Fall 2015 Logic Synthesis (Chapters 2-5) Vishwani D. Agrawal James J. Danaher Professor Department of Electrical and.

NAND4 Cell

Fall 2015, Nov 6 . . .Fall 2015, Nov 6 . . . ELEC2200-002 Lecture 6ELEC2200-002 Lecture 6 1717

Page 18: ELEC 2200-002 Digital Logic Circuits Fall 2015 Logic Synthesis (Chapters 2-5) Vishwani D. Agrawal James J. Danaher Professor Department of Electrical and.

AOI21 Cell

Fall 2015, Nov 6 . . .Fall 2015, Nov 6 . . . ELEC2200-002 Lecture 6ELEC2200-002 Lecture 6 1818

Page 19: ELEC 2200-002 Digital Logic Circuits Fall 2015 Logic Synthesis (Chapters 2-5) Vishwani D. Agrawal James J. Danaher Professor Department of Electrical and.

OAI21 Cell

Fall 2015, Nov 6 . . .Fall 2015, Nov 6 . . . ELEC2200-002 Lecture 6ELEC2200-002 Lecture 6 1919

Page 20: ELEC 2200-002 Digital Logic Circuits Fall 2015 Logic Synthesis (Chapters 2-5) Vishwani D. Agrawal James J. Danaher Professor Department of Electrical and.

AOI22 Cell in TransistorsAOI22 Cell in Transistors

Fall 2015, Nov 6 . . .Fall 2015, Nov 6 . . . ELEC2200-002 Lecture 6ELEC2200-002 Lecture 6 2020

A

B

C

D

VDD

GND

Z

Observe that in a CMOS circuit, any vector of input variables connects the output Zeither to GND or to VDD, giving it a value 0 or 1, respectively. Examining the pull-downnetwork, we notice that the output is connected to GND if AB = 1 or CD =1. Thatgives the output function as, . The cell, therefore, is AOI22.CDABZ

Pull-up network

Pull-down network

Page 21: ELEC 2200-002 Digital Logic Circuits Fall 2015 Logic Synthesis (Chapters 2-5) Vishwani D. Agrawal James J. Danaher Professor Department of Electrical and.

AOI22 Cell

Fall 2015, Nov 6 . . .Fall 2015, Nov 6 . . . ELEC2200-002 Lecture 6ELEC2200-002 Lecture 6 2121

Page 22: ELEC 2200-002 Digital Logic Circuits Fall 2015 Logic Synthesis (Chapters 2-5) Vishwani D. Agrawal James J. Danaher Professor Department of Electrical and.

XOR Cell

Fall 2015, Nov 6 . . .Fall 2015, Nov 6 . . . ELEC2200-002 Lecture 6ELEC2200-002 Lecture 6 2222

Page 23: ELEC 2200-002 Digital Logic Circuits Fall 2015 Logic Synthesis (Chapters 2-5) Vishwani D. Agrawal James J. Danaher Professor Department of Electrical and.

NAND Graphs for Library CellsName Area units (cost) Inputs NAND graph

Inverter 2 A

NAND2 3 A, B

NAND3 4 A, B, C

NAND4 5 A, B, C, D

AOI21 4 A, B, C

OAI21 4 A, B, C

AOI22 5 A, B, C, D

XOR 4 A, B

Fall 2015, Nov 6 . . .Fall 2015, Nov 6 . . . ELEC2200-002 Lecture 6ELEC2200-002 Lecture 6 2323

Page 24: ELEC 2200-002 Digital Logic Circuits Fall 2015 Logic Synthesis (Chapters 2-5) Vishwani D. Agrawal James J. Danaher Professor Department of Electrical and.

Technology Mapping ProcedureObtain MSOP.Convert to two-level AND-OR circuit.Transform to two-level NAND-NAND circuit.Transform to two-input NAND and inverter tree network.Perform an optimal pattern matching to obtain a minimum cost tree covering.

Fall 2015, Nov 6 . . .Fall 2015, Nov 6 . . . ELEC2200-002 Lecture 6ELEC2200-002 Lecture 6 2424

Page 25: ELEC 2200-002 Digital Logic Circuits Fall 2015 Logic Synthesis (Chapters 2-5) Vishwani D. Agrawal James J. Danaher Professor Department of Electrical and.

INPUTS NAND NAND

Previous Example: 2-Level NAND(Slide 8)

Fall 2015, Nov 6 . . .Fall 2015, Nov 6 . . . ELEC2200-002 Lecture 6ELEC2200-002 Lecture 6 2525

A

B

C

D

F1

F2

1P

2P

4P

3P

Page 26: ELEC 2200-002 Digital Logic Circuits Fall 2015 Logic Synthesis (Chapters 2-5) Vishwani D. Agrawal James J. Danaher Professor Department of Electrical and.

A Simple Technology Mapping

Fall 2015, Nov 6 . . .Fall 2015, Nov 6 . . . ELEC2200-002 Lecture 6ELEC2200-002 Lecture 6 2626

B

C

F1

F2

2PD

A

Cost = 24

NAND2 (3)NAND2 (3)

NAND2 (3)

NAND3 (4) NAND3 (4)

(2)

(2)

NAND2 (3)

Page 27: ELEC 2200-002 Digital Logic Circuits Fall 2015 Logic Synthesis (Chapters 2-5) Vishwani D. Agrawal James J. Danaher Professor Department of Electrical and.

Optimum Mapping: Convert NAND Circuit to Directed Acyclic Graph (DAG)

Fall 2015, Nov 6 . . .Fall 2015, Nov 6 . . . ELEC2200-002 Lecture 6ELEC2200-002 Lecture 6 2727

A

B

C

D

F1

F2

2P

4P

3P

1P

Each node is aNAND gate.(NOT ≡ 1-input NAND)

Page 28: ELEC 2200-002 Digital Logic Circuits Fall 2015 Logic Synthesis (Chapters 2-5) Vishwani D. Agrawal James J. Danaher Professor Department of Electrical and.

Split DAG into Trees (Forest)

Fall 2015, Nov 6 . . .Fall 2015, Nov 6 . . . ELEC2200-002 Lecture 6ELEC2200-002 Lecture 6 2828

A

B

C

D

F1

F2

2P

D

CB

2P

2P

A

D Cost = 24

Page 29: ELEC 2200-002 Digital Logic Circuits Fall 2015 Logic Synthesis (Chapters 2-5) Vishwani D. Agrawal James J. Danaher Professor Department of Electrical and.

Split Nodes With More Than Split Nodes With More Than Two BranchesTwo Branches

(Use NAND3, NAND4 Graphs)(Use NAND3, NAND4 Graphs)

Fall 2015, Nov 6 . . .Fall 2015, Nov 6 . . . ELEC2200-002 Lecture 6ELEC2200-002 Lecture 6 2929

≡2P 2Por F2 or F2

≡NAND4

or

Page 30: ELEC 2200-002 Digital Logic Circuits Fall 2015 Logic Synthesis (Chapters 2-5) Vishwani D. Agrawal James J. Danaher Professor Department of Electrical and.

Uniform Branching (1 or 2)

Fall 2015, Nov 6 . . .Fall 2015, Nov 6 . . . ELEC2200-002 Lecture 6ELEC2200-002 Lecture 6 3030

A

B

C

D

F1

F2

2PC

B

D

D

2P

2P

ACost = 32

Page 31: ELEC 2200-002 Digital Logic Circuits Fall 2015 Logic Synthesis (Chapters 2-5) Vishwani D. Agrawal James J. Danaher Professor Department of Electrical and.

Graph Matching

Fall 2015, Nov 6 . . .Fall 2015, Nov 6 . . . ELEC2200-002 Lecture 6ELEC2200-002 Lecture 6 3131

A

B

C

D

F1

F2

2PC

B

D

D

2P

2P

A

NAND3 (4)

NAND3 (4)

OAI21 (4)

NAND2 (3)

NAND2 (3)

(2)

(2)

Cost = 22

Nodes insertedFor pattern matching

Page 32: ELEC 2200-002 Digital Logic Circuits Fall 2015 Logic Synthesis (Chapters 2-5) Vishwani D. Agrawal James J. Danaher Professor Department of Electrical and.

Technology Mapping

Fall 2015, Nov 6 . . .Fall 2015, Nov 6 . . . ELEC2200-002 Lecture 6ELEC2200-002 Lecture 6 3232

A

B

C

D

F1

F2

2PC

B

D

D

2P

2P

A

OAI21 (4)

NAND3 (4)

NAND3 (4)

NAND2 (3)

NAND2 (3)

(2)

(2)

Cost = 22

Inverters insertedFor pattern matching

(2)

Page 33: ELEC 2200-002 Digital Logic Circuits Fall 2015 Logic Synthesis (Chapters 2-5) Vishwani D. Agrawal James J. Danaher Professor Department of Electrical and.

Mapped Circuit

Fall 2015, Nov 6 . . .Fall 2015, Nov 6 . . . ELEC2200-002 Lecture 6ELEC2200-002 Lecture 6 3333

B

C

F1

F2

2PD

A

Cost = 22NAND2 (3)

NAND3 (4) NAND3 (4)

(2)

(2)

NAND2 (3)

AOI21 (4)

Page 34: ELEC 2200-002 Digital Logic Circuits Fall 2015 Logic Synthesis (Chapters 2-5) Vishwani D. Agrawal James J. Danaher Professor Department of Electrical and.

Original Reference

K. Keutzer, “DAGON: Technology Binding and Local Optimization by DAG matching,” Proc. 24th Design Automation Conf., 1987, pp. 341-347.

Fall 2015, Nov 6 . . .Fall 2015, Nov 6 . . . ELEC2200-002 Lecture 6ELEC2200-002 Lecture 6 3434