chapter 5 - university of houstonjhuang/jch/ld/chapter5.pdfchapter 5 logic design with msi...

97
Chapter 5 Logic Design with MSI Components and Programmable Logic Devices

Upload: others

Post on 17-May-2020

13 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

Chapter 5

Logic Design with MSI Components and Programmable Logic Devices

Page 2: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 1

The complexity of a chip

Scale of integration:• SSI 1 - 10 gates• MSI 10 - 100 gates• LSI 100 - 1000 gates• VLSI > 1000 gates

Page 3: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 2

Specialized MSI components

• adders• comparators• encoders/decoders• multiplexers/demultiplexers

Page 4: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 3

Half Adder

x y sum carry

0011

0101

0110

0001

x Sum

y Carry

sum = x’y + xy’

carry = xy

Page 5: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 4

Full Adder

0 00 10 11 00 11 01 01 1

0 0 00 0 10 1 00 1 11 0 01 0 11 1 01 1 1

ci+1 sixi yi ci

xisi

yi

ci+1ci

Page 6: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 5

The Karnaugh maps for a full adder

Page 7: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 6

SUM and CARRY functions

SUM = x'y'c + x'yc' + xy'c' + xycCARRY = xy + yc + cx

Page 8: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 7

A realization of the binary full adder

Page 9: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 8

Parallel (ripple) binary adder

Designed to add two binary numbers bit by bit

Page 10: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 9

Parallel binary subtracter constructed by using a parallel binary adder

Page 11: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 10

Parallel binary adder/subtracter

Page 12: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 11

Carry-look-ahead adder

• Problem: the time required to do addition is proportional to the number of bits involved.

• Solution: compute the carry for each stage independently by using a carry-look-ahead network.

Page 13: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 12

Carry-Look-ahead Adder

Recall thatci+1 = xiyi + xici + yici =xiyi + (xi + yi)ci

Let gi = xiyi be the carry-generate function, andpi = xi + yi be the carry-propagate function.

Then we can write ci+1 = gi + pici and c1 = g0 + p0c0

c2 = g1 + p1g0 + p1p0c0

c3 = g2 + p2g1 + p2p1g0 + p2p1p0c0

…We see that all carry signal ci can be computed by a two level logic circuit.

Page 14: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 13

A carry lookahead adder. (a) General organization. (b) Sigma block

Σ ΣΣ

Page 15: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 14

A 4-bit carry lookahead adder

Page 16: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 15

Cascade connection of 4-bit carry lookahead adders

Page 17: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 16

A 4-bit carry look-ahead generator

Page 18: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 17

A 16-bit high-speed adder

Page 19: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 18

Organization of a single-decade decimal adder

Page 20: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 19

Organization of a single-decade BCD adder

Page 21: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 20

A single-decade BCD adder

Page 22: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 21

Organization of a 1-bit comparator

Page 23: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 22

From the truth table (Table 5.4) on page 247 we obtained

Gi+1 = AiB'i + AiGi + B'iGi

Ei+1 = A'iB'iEi + AiBiEi

Li+1 = A'iBi + BiLi + A'iLi

Page 24: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 23

Comparing two binary numbers A and B. (a) 1-bit comparator network. (b) Cascade connection of 1-bit comparators.

Page 25: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 24

D0D1D2D3D4D5D6D7

D0D1D2D3D4D5D6D7

8x3 encoder

3x8 decoder

Main function of encoder and decoder

The purpose is to reduce the number of wires required for interconnection.

(sender) (receiver)

Page 26: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 25

A 2n-to-n-line encoder symbol

Page 27: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 26

An 8-to-3-line encoder

Page 28: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 27

Symbol for an n-to-2n-line decoder

Page 29: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 28

A 3-to-8-line decoder

(a) Logic diagram.

(b) Truth table.

(c) Symbol

Page 30: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 29

Decoder realization of f1(x2,x1,x0) = Σm(1,2,4,5) and f2(x2,x1,x0) = Σm(1,5,7)

Page 31: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 30

Decoder realization of Boolean functionsf1 = ΠM(2, 7) and f2 = ΠM(0, 5, 7)

Page 32: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 31

A decoder realization of f1(x2,x1,x0) = ΠM(0,1,3,5) and f2(x2,x1,x0) = ΠM(1,3,6,7) (a) Using output or-gates. (b) Using output nor-gates.

Page 33: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 32

A 3-to-8-line decoder using nand-gates

Page 34: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 33

Realization of the pair of maxterm canonical expressions f1(x2,x1,x0) = ΠM(0,3,5) and f2(x2,x1,x0) = ΠM(2,3,4) with a 3-to-8-line decoder and two and-gates.

Page 35: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 34

Realization of the Boolean expressions f1(x2,x1,x0) = ΠM(0,1,3,4,7) with a 3-to-8-line decoder and two nand-gates.

Page 36: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 35

A decoder realization of f1(x2,x1,x0) = Σm(0,2,6,7) and f2(x2,x1,x0) = Σm(3,5,6,7) (a) Using output and-gates. (b) Using output nand-gates.

Page 37: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 36

And-gate 2-to-4-line decoder with an enable input. (a) Logic diagram. (b) Compressed truth table. (c) Symbol.

Page 38: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 37

Nand-gate 2-to-4-line decoder with an enable input

Page 39: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 38

A 4-to-16-line decoder constructed from 2-to-4-line decoder

Page 40: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 39

D0D1D2D3D4D5D6D7

D0D1D2D3D4D5D6D7

8x1 multiplexer

1x8 demultiplexer

Main function of multiplexer and demultiplexer

The purpose is to reduce the number of wires required for interconnection by making the signals to time-share the link.

(sender) (receiver)

S2 S1 S0 S2 S1 S0control signal control signal

Page 41: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 40

A multiplexer/demultiplexer arrangement for information transmission.

Page 42: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 41

A 4-to-1-line multiplexer

Page 43: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 42

Demultiplexer

Page 44: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 43

A 2n-to-1-line multiplexer symbol

Page 45: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 44

MUX implementation of a Boolean function

• Any Boolean function of n variables can be implemented by a multiplexer with n control inputs in a straightforward manner.

Page 46: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 45

Example: f(x, y, z) = Σm(2, 5, 6, 7)

x y z | f(x, y, z) | =0 0 0 | f(0, 0, 0) | 00 0 1 | f(0, 0, 1) | 00 1 0 | f(0, 1, 0) | 10 1 1 | f(0, 1, 1) | 01 0 0 | f(1, 0, 0) | 01 0 1 | f(1, 0, 1) | 11 1 0 | f(1, 1, 0) | 11 1 1 | f(1, 1, 1) | 1

Page 47: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 46

MUX implementation of a Boolean function

• Even better, any Boolean function of n variables can be implemented by a multiplexer with n-1 control inputs as illustrated in the following.

Page 48: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 47

Implementing a function of 3 variables with a 4x1 MUX: Method 1

I0

I1

I2

I3s1 s0

f(x, y, z)

x y

Page 49: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 48

Using a multiplexer to implement a Boolean function: Method 1

Note that the output of a 4x1 multiplexer is

F(x, y, z) = x'y'I0 + x'yI1 + xy'I2 + xyI3

Now, given a Boolean function

f(x, y, z) = f(0, 0, 0)x'y'z' + f(0, 1, 0)x'yz' + f(1, 0, 0)xy'z' + f(1, 1, 0)xyz' +f(0, 0, 1)x'y'z + f(0, 1, 1)x'yz + f(1, 0, 1)xy'z + f(1, 1, 1)xyz

Page 50: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 49

The value for input I0 is to be determined as follows.

if f(0, 0, 0) = and f(0, 0, 1) = then f(0, 0, 0)x'y'z' +

f(0, 0, 1)x'y'z =

and thus we should

let I0 =

0 0 0=x'y'0 0

0 1 x'y'z z

1 0 x'y'z' z'

1 1 x'y'=x'y'1 1

The value for I1 , I2 , and I3 are to be determined in a similar manner.

Page 51: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 50

Implementing a function of 3 variables with a 4x1 MUX: Method 2

I0

I1

I2

I3s1 s0

f(x, y, z)

y z

Page 52: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 51

Using a multiplexer to implement a Boolean function: Method 2

Note that the output of a 4x1 multiplexer is

F(x, y, z)= I0y'z' + I1y'z + I2yz' + I3yz

Now, given a Boolean function

f(x, y, z) = f(0, 0, 0)x'y'z' + f(0, 0, 1)x'y'z + f(0, 1, 0)x'yz' + f(0, 1, 1)x'yz + f(1, 0, 0)xy'z' + f(1, 0, 1)xy'z + f(1, 1, 0)xyz' + f(1, 1, 1)xyz

Page 53: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 52

The value for input I0 is to be determined as follows.

if f(0, 0, 0) = and f(0, 0, 1) = then f(0, 0, 0)x'y'z' +

f(1, 0, 0)xy'z' =

and thus we should

let I0 =

0 0 0=0y'z' 0

0 1 xy'z' x

1 0 x'y'z' x'

1 1 y'z'=1y'z' 1

The value for I1 , I2 , and I3 are to be determined in a similar manner.

Page 54: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 53

A multiplexer tree to form a 16-to-1-line multiplexer

Page 55: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 54

Realization of a three-variable function using a 8-to-1-line multiplexer. (a) Three-variable truth table. (b) General realization.

Page 56: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 55

Example: realization of f(x,y,z) = Σm(0,2,3,5)

Page 57: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 56

Realizing a 3-variable Boolean function with a 4-to-1 multiplexer

Page 58: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 57

Realization of f(x,y,z) = Σm(0,2,3,5) using a 4-to-1-line multiplexer

Page 59: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 58

Obtaining multiplexer realizations using Karnaugh maps. (a) Cell groupings corresponding to the data line functions. (b) Karnaugh maps for the Ii subfunctions.

Page 60: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 59

Realization of f(x,y,z) = Σm(0,2,3,5). (a) Karnaugh map.(b) I0, I1, I2, and I3 submaps.

Page 61: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 60

Using Karnaugh maps to obtain multiplexer realizations under various assignments to the select inputs. (a) Applying input variables y and z to the S1 and S0 select lines. (b) Applying input variables x and y to the S0 and S1 select lines.

Page 62: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 61

Alternative realizations of f(x,y,z) = Σm(0,2,3,5).

Page 63: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 62

A select line assignment and corresponding data line functions for a multiplexer realization of a four-variable function.

Page 64: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 63

Realizations of f(w,x,y,z) = Σm(0,1,5,6,7,9,12,15).

Page 65: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 64

Using a four-variable Karnaugh map to obtain a Boolean function realization with a 4-to-1-line multiplexer.

Page 66: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 65

Realizations of the Boolean functionf(w,x,y,z) = Σm(0,1,5,6,7,9,13,14).

Page 67: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 66

General structure of Programmable Logic Devices (PLDs)

Page 68: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 67

Buffer/inverter. (a) Symbol. (b) Logic equivalent

Page 69: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 68

Types of PLDs

ProgrammableProgrammableFixed

FixedProgrammableProgrammable

PROMPLAPAL

OR-arrayAND-arrayDevice

Page 70: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 69

Programming by blowing fuses. (a) Before programming. (b) After programming.

Page 71: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 70

PLD notation

Page 72: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 71

Structure of a PROM

Page 73: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 72

A 2n × m PROM. (a) Logic diagram. (b) Representation in PLD notation.

Page 74: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 73

Using a PROM for logic design. (a) Truth table. (b) PROM realization.

Page 75: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 74

Logic diagram of an n × p × m PLA

Page 76: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 75

Example of combinational logic design using a PLA. (a) Maps showing the multiple-output prime implicants. (b) Partial covering of the f1 and f2 maps. (c) Maps for the multiple-output minimal sum. (d) Realization using a 3 × 4 × 2 PLA.

Page 77: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 76

Example of combinational logic design using a PLA. (a) Maps showing the multiple-output prime implicants. (b) A multiple-output minimal sum covering. (c) Alternative multiple-output minimal sum covering. (d) Realization using a 3 × 4 × 2 PLA.

Page 78: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 77

Exclusive-or-gate with a programmable fuse. (a) Circuit diagram. (b) Symbolic representation.

Page 79: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 78

General structure of a PLA having true and complemented output capability

Page 80: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 79

Karnaugh maps for the functions f1(x,y,z) = Σm(1,2,3,7) and f2(x,y,z) = Σm(0,1,2,6)

Page 81: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 80

Two realizations of f1(x,y,z) = Σm(1,2,3,7) and f2(x,y,z) = Σm(0,1,2,6).

Page 82: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 81

A simple four-input, three-output PAL device.

Page 83: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 82

An example of using a PAL device to realize two Boolean functions. (a) Karnaugh maps. (b) Realization.

Page 84: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 83

A PLD programming unit

Page 85: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 84

A PLCC package with socket

Printed circuit board

Page 86: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 85

Limitations of PLAs and PALs

These chips are limited to fairly modest size, typically supporting a combined number of inputs plus outputs of not more than 32.

Slide 3.31.1

Page 87: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 86

Complex Programmable Logic Devices (CPLDs)

A CPLD comprises multiple PAL-like blocks on a single chip with internal wiring resources to connect the circuit blocks.

It is made to implement complex circuits that cannot be done on a PAL or PLA.

Page 88: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 87

I/O b

lock

PAL-like

block PAL-like

block I/O

block

Structure of a CPLD

PAL-likeblock

I/O b

lock

PAL-likeblock

I/O block

Interconnection wires

Page 89: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 88

D Q

D Q

D Q

PAL-like block (details not shown)

PAL-like block

A section of a CPLD

Page 90: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 89

CPLD packaging and programming

(a) CPLD in a Quad Flat Pack (QFP) package

Printed circuit board

To computer

(b) JTAG programming

Page 91: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 90

A Measure of Circuit Size

A commonly used measure is the total number of two-input NAND gates that would be needed to build the circuit.

It is called the number of equivalent gates.

Page 92: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 91

Field-Programmable Gate Arrays (FPGAs)

An FPGA is a PLD that supports implementation of large logic circuits.

It is different from others in that it does not contain AND or OR planes. Instead, it contains logic blocks as depicted in the next slide.

Page 93: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 92

Structure of an FPGA

Logic block Interconnection switches

I/O block

I/O block

I/O block I/O b

lock

Page 94: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 93

Typical FPGAs

FPGAs can be used to implement logic circuits of more than a few hundred thousand equivalent gates in size.

The most commonly used logic block is a lookup table (LUT) as depicted in Fig. 3.36.

Slide 3.35.1

Page 95: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 94

0/1

0/1

0/1

0/1

x

f

A two-input lookup table

y

Page 96: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 95

f

0/1

0/1

0/1

0/1

0/1

0/1

0/1

0/1

x 2

x 3

x 1

A three-input LUT

Page 97: Chapter 5 - University of Houstonjhuang/JCH/LD/chapter5.pdfChapter 5 Logic Design with MSI Components and Programmable Logic Devices J. C. Huang, 2004 Digital Logic Design 1 The complexity

J. C. Huang, 2004 Digital Logic Design 96

0 1 0 0

0 1 1 1

0 0 0 1

x 1

x 2

x 2

x 3

f 1

f 2

f 1 f 2

f

x 1

x 2

x 3 f

A section of a programmed FPGA