Sunteți pe pagina 1din 140

i oh C842 NE CE

U M & A saxeT

ECEN248 Texas A&M University


Sections: Choi

Introduction to Digital Logic Design


With Verilog Lab

Chapter 1
-Technology, Trends, and Design Flow

Fundamentals of Digital Logic Brown-Vranesic


i oh C842 NE CE
U M & A saxeT

Figure 1.1. A silicon wafer (courtesy of Altera Corp.).


Fundamentals of Digital Logic Brown-Vranesic
i oh C842 NE CE
U M & A saxeT

Table 1.1. A sample of the International Technology Roadmap for Semiconductors.

Fundamentals of Digital Logic Brown-Vranesic


i oh C842 NE CE
U M & A saxeT

Group of 8 logic cells Memory block

Interconnection
wires

Figure 1.2. A field


- programmable gate array chip
(courtesy of Altera Corp.).
Fundamentals of Digital Logic Brown-Vranesic
i oh C842 NE CE
U M & A saxeT

Figure 1.3. The development


process.

Fundamentals of Digital Logic Brown-Vranesic


i oh C842 NE CE
U M & A saxeT

Design concept

Initial design

Simulation Redesign

No
Design correct?

Yes

Successful design

Figure 1.4. The basic design loop.


Fundamentals of Digital Logic Brown-Vranesic
i oh C842 NE CE
U M & A saxeT

Figure 1.5. A digital


hardware system (Part a).

Fundamentals of Digital Logic Brown-Vranesic


i oh C842 NE CE
U M & A saxeT

Figure 1.5. A digital


hardware system (Part b).

Fundamentals of Digital Logic Brown-Vranesic


i oh C842 NE CE
U M & A saxeT

Figure 1.6. A printed circuit board.


Fundamentals of Digital Logic Brown-Vranesic
i oh C842 NE CE
U M & A saxeT

Figure 1.7. Design flow for


logic circuits.

Fundamentals of Digital Logic Brown-Vranesic


i oh C842 NE CE
U M & A saxeT

Implementation

Build prototype

Testing Modify prototype

Yes

No
Correct? Minor errors?

Yes No

Finished PCB Go to A, B, C, or D in Figure 1.7

Figure 1.8. Completion of PCB development.


Fundamentals of Digital Logic Brown-Vranesic
i oh C842 NE CE
U M & A saxeT

ECEN248 Texas A&M University


Sections: Choi

Introduction to Digital Logic Design


With Verilog Lab

Chapter 2
-Logic, Gates, Boolean Expressions, and Hardware Description

Fundamentals of Digital Logic Brown-Vranesic


i oh C842 NE CE
U M & A saxeT

x = 0 x = 1

(a) Two states of a switch

(b) Symbol for a switch

Figure 2.1. A binary switch.

Fundamentals of Digital Logic Brown-Vranesic


i oh C842 NE CE
U M & A saxeT

S
Battery x Light

(a) Simple connection to a battery

S
Power
supply x Light

(b) Using a ground connection as the return path

Figure 2.2. A light controlled by a switch.


Fundamentals of Digital Logic Brown-Vranesic
i oh C842 NE CE
U M & A saxeT

S S
Power
supply x1 x2 Light

(a) The logical AND function (series connection)

x1

Power
supply S Light

x2

(b) The logical OR function (parallel connection)

Figure 2.3. Two basic functions.


Fundamentals of Digital Logic Brown-Vranesic
i oh C842 NE CE
U M & A saxeT

X1
S
Power
supply S X3 Light

X2

Figure 2.4. A series- parallel connection.


Fundamentals of Digital Logic Brown-Vranesic
i oh C842 NE CE
U M & A saxeT

Power
supply x S Light

Figure 2.5. An inverting circuit.

Fundamentals of Digital Logic Brown-Vranesic


i oh C842 NE CE
U M & A saxeT

Figure 2.6. A truth table for the AND and OR operations.

Fundamentals of Digital Logic Brown-Vranesic


i oh C842 NE CE
U M & A saxeT

Figure 2.7. Three- input AND and OR operations.

Fundamentals of Digital Logic Brown-Vranesic


i oh C842 NE CE
U M & A saxeT
x1
x2
x1
x1 x2 x1 x2 xn
x2

xn

(a) AND gates

x1
x2
x1
x1 + x2 x1 + x2 + + xn
x2

xn

(b) OR gates

x x

(c) NOT gate


Figure 2.8. The basic gates.
Fundamentals of Digital Logic Brown-Vranesic
i oh C842 NE CE
U M & A saxeT

x
1
x
2
f = (x + x ) x
x 1 2 3
3

Figure 2.9. The function from Figure 2.4.

Fundamentals of Digital Logic Brown-Vranesic


i oh C842 NE CE
x1 0 0 1 1 1 1 0 0 U M & A saxeT
A
1 1 0 1 f
0 0 01 B
0 1 0 1
x2
f = x1 + x1 x2
(a) Network that implements
x 1
x x (
f x x, ) A B 1 0
1 2 1 2

0 0 1 1 0
x 1
0 1 1 1 0 2 0
1 0 0 0 0 1
1 1 1 A
0 1 0

(b) Truth table 1


B
0
1
f
0 Time
(c) Timing diagram

0011 1100
x
1
1 1 0 1
0101 g
x
2

(d) Network that implementsg = x + x


1 2
Figure 2.10. An example of logic networks.
Fundamentals of Digital Logic Brown-Vranesic
i oh C842 NE CE
U M & A saxeT

Figure 2.11. Proof of DeMorgans theorem in 15a.

Fundamentals of Digital Logic Brown-Vranesic


i oh C842 NE CE
U M & A saxeT

x y x y

(a) Constant 1 (b) Constant 0 (e) x y (f) x + y

x y
x x x x x y
z

(c) Variable x (d) x (g) x y (h) xy+z

Figure 2.12. The Venn diagram representation.

Fundamentals of Digital Logic Brown-Vranesic


i oh C842 NE CE
U M & A saxeT

x y x y

z z

(a) x (d) x y

x y x y

z z

(b) y + z (e) x z

x y x y

z z

(c) x ( y + z) (f) x y + x z

Figure 2.13. Verification of the distributive property.


Fundamentals of Digital Logic Brown-Vranesic
i oh C842 NE CE
U M & A saxeT

x y x y

z z x y x y

x y xy z z

yz x y+ x z
x y x y

z z x y

xz xz z

x y + x z+ y z

Figure 2.14. Verification of xy+xz+y z =xy+xz.

Fundamentals of Digital Logic Brown-Vranesic


i oh C842 NE CE
U M & A saxeT

Figure 2.15. A function to be synthesized.

Fundamentals of Digital Logic Brown-Vranesic


i oh C842 NE CE
U M & A saxeT

x1
x2

(a) Canonical sum-of-products

x1
f
x2

(b) Minimal-cost realization

Figure 2.16. Two implementations of a function in Figure 2.15.


Fundamentals of Digital Logic Brown-Vranesic
i oh C842 NE CE
U M & A saxeT

Figure 2.17 Three- variable minterms and maxterms.

Fundamentals of Digital Logic Brown-Vranesic


i oh C842 NE CE
U M & A saxeT

Figure 2.18. A three- variable function.

Fundamentals of Digital Logic Brown-Vranesic


i oh C842 NE CE
U M & A saxeT

x2

f
x3
x1

(a) A minimal sum-of-products realization

x1
x3
f

x2

(b) A minimal product-of-sums realization

Figure 2.19. Two realizations of a function in Figure 2.18.


Fundamentals of Digital Logic Brown-Vranesic
i oh C842 NE CE
U M & A saxeT

x1
x2
x1
x1 x2 x1 x2 xn
x2

xn

(a) NAND gates

x1
x2
x1
x1 + x2 x1 + x2 + + xn
x2

xn

(b) NOR gates

Figure 2.20. NAND and NOR gates.


Fundamentals of Digital Logic Brown-Vranesic
i oh C842 NE CE
U M & A saxeT

x1
x1 x1
x2 x2
x2

(a) x1 x2 = x1 + x2

x1
x1 x1
x2 x2
x2

(b) x1 + x2 = x1 x2

Figure 2.21. DeMorgans theorem in terms of logic gates.


Fundamentals of Digital Logic Brown-Vranesic
i oh C842 NE CE
U M & A saxeT

x1 x1
x2 x2
x3 x3
x4 x4
x5 x5

x1
x2
x3
x4
x5

Figure 2.22. Using NAND gates to implement a sum


- of- products.
Fundamentals of Digital Logic Brown-Vranesic
i oh C842 NE CE
U M & A saxeT

x1 x1
x2 x2

x3 x3
x4 x4
x5 x5

x1
x2

x3
x4
x5

Figure 2.23. Using NOR gates to implement a product- of sums.


Fundamentals of Digital Logic Brown-Vranesic
i oh C842 NE CE
U M & A saxeT

x1

x2 f

x3

(a) POS implementation

x1

x2 f

x3

(b) NOR implementation

Figure 2.24. NOR


- gate realization of the function in Example 2.4.
Fundamentals of Digital Logic Brown-Vranesic
i oh C842 NE CE
U M & A saxeT

x1

f
x2

x3

(a) SOP implementation

x1

f
x2

x3

(b) NAND implementation

Figure 2.25. NAND


- gate realization of the function in Example 2.3.
Fundamentals of Digital Logic Brown-Vranesic
i oh C842 NE CE
U M & A saxeT

Figure 2.26. Truth table for a three- way light control.


Fundamentals of Digital Logic Brown-Vranesic
i oh C842 NE CE
U M & A saxeT

x1
x2
x3

(a) Sum-of-products realization

x3
x2
x1

Figure 2.27. Implementation f

of the function in Figure 2.26.

Fundamentals of Digital Logic Brown-Vranesic (b) Product-of-sums realization


i oh C842 NE CE
U M & A saxeT

s x1 x2 f (s, x1, x2)


x1 s

000 0
f x1 0
001 0 f
s x2 1
010 1
x2
011 1
(b) Circuit (c) Graphical symbol
100 0
101 1
110 0 s f (s, x1, x2)
111 1 0 x1

(a)Truth table 1 x2

(d) More compact truth-table representation

Figure 2.28. Implementation of a multiplexer.

Fundamentals of Digital Logic Brown-Vranesic


i oh C842 NE CE
Design conception U M & A saxeT

DESIGN ENTRY

Schematic capture Verilog

Synthesis

Figure 2.29. A typical CAD Functional simulation

system.
No
Design correct?

Yes

Physical design

Timing simulation

No
Timing requirements met?

Chip configuration
Fundamentals of Digital Logic Brown-Vranesic
i oh C842 NE CE
U M & A saxeT

x1
x2
f

x3

Figure 2.30. A simple logic function.

Fundamentals of Digital Logic Brown-Vranesic


i oh C842 NE CE
U M & A saxeT

module example1 (x1, x2, x3, f);


input x1, x2, x3;
output f;

and (g, x1, x2);


not (k, x2);
and (h, k, x3);
or (f, g, h);

endmodule

Figure 2.31. Verilog code for the circuit in Figure 2.30.

Fundamentals of Digital Logic Brown-Vranesic


i oh C842 NE CE
U M & A saxeT

module example2 (x1, x2, x3, x4, f, g, h);


input x1, x2, x3, x4;
output f, g, h;

and (z1, x1, x3);


and (z2, x2, x4);
or (g, z1, z2);
or (z3, x1, ~x3);
or (z4, ~x2, x4);
and (h, z3, z4);
or (f, g, h);

endmodule

Figure 2.32. Verilog code for a four- input circuit.

Fundamentals of Digital Logic Brown-Vranesic


i oh C842 NE CE
U M & A saxeT

x1
x3

x2
x4

Figure 2.33. Logic circuit for the code in Figure 2.32.

Fundamentals of Digital Logic Brown-Vranesic


i oh C842 NE CE
U M & A saxeT

module example3 (x1, x2, x3, f);


input x1, x2, x3;
output f ;

assign f = (x1 & x2) | (~x2 & x3);

endmodule

Figure 2.34. Using the continuous assignment to specify


the circuit in Figure 2.30.

Fundamentals of Digital Logic Brown-Vranesic


i oh C842 NE CE
U M & A saxeT

module example4 (x1, x2, x3, x4, f, g, h);


input x1, x2, x3, x4;
output f, g, h;

assign g = (x1 & x3) | (x2 & x4);


assign h = (x1 | ~x3) & (~x2 | x4);
assign f = g | h;

endmodule

Figure 2.35. Using the continuous assignment to specify


the circuit in Figure 2.33.

Fundamentals of Digital Logic Brown-Vranesic


i oh C842 NE CE
U M & A saxeT

// Behavioral specification
module example5 (x1, x2, x3, f);
input x1, x2, x3;
output f ;
reg f ;

always @(x1 or x2 or x3)


if (x2 == 1)
f = x1;
else
f = x3;

endmodule

Figure 2.36. Behavioral specification of the circuit


in Figure 2.30.
Fundamentals of Digital Logic Brown-Vranesic
i oh C842 NE CE
U M & A saxeT

// Behavioral specification
module example5 (x1, x2, x3, f);
input x1, x2, x3;
output reg f ;

always @(x1, x2, x3)


if (x2 == 1)
f = x1;
else
f = x3;

endmodule

Figure 2.37. A simpler version of the code in Figure 2.36.

Fundamentals of Digital Logic Brown-Vranesic


i oh C842 NE CE
U M & A saxeT

x1 x2 x1 x2

x3 x3

(a) Function A (b) Function B

x1 x2 x1 x2

x3 x3

(c) Function C (d) Function f

Figure 2.38. The Venn diagrams for Example 2.11.


Fundamentals of Digital Logic Brown-Vranesic
i oh C842 NE CE
U M & A saxeT

x3
x3

x1 x2 x1 x2

x4 x4

(a) (b)

Figure P2.1. Two attempts to draw a four- variable Venn diagram.

Fundamentals of Digital Logic Brown-Vranesic


i oh C842 NE CE
U M & A saxeT

m0 x4

x1 x2 x1 x2

m1
x
m2
x3 3

Figure P2.2. A four- variable Venn diagram.

Fundamentals of Digital Logic Brown-Vranesic


i oh C842 NE CE
U M & A saxeT

x1 1
0

x2 1
0

x3 1
0

f 1
0

Time

Figure P2.3. A timing diagram representing a logic function.

Fundamentals of Digital Logic Brown-Vranesic


i oh C842 NE CE
U M & A saxeT

1
x1
0

x2 1
0

x3 1
0

f 1
0

Time

Figure P2.4. A timing diagram representing a logic function.

Fundamentals of Digital Logic Brown-Vranesic


i oh C842 NE CE
U M & A saxeT

ECEN248 Texas A&M University


Sections: Choi

Introduction to Digital Logic Design


With Verilog Lab

Chapter 3
-Implementation Technology

Fundamentals of Digital Logic Brown-Vranesic


i oh C842 NE CE
U M & A saxeT

Voltage

V DD

Logic value 1

V 1,min

Undefined

V 0,max

Logic value 0

VSS (Gnd)

Figure 3.1. Logic values as voltage levels.


Fundamentals of Digital Logic Brown-Vranesic
i oh C842 NE CE
U M & A saxeT
x = "low" x = "high"

(a) A simple switch controlled by the input x

Gate

Source Drain
Substrate (Body)

(b) NMOS transistor

VG

VS VD

(c) Simplified symbol for an NMOS transistor

Figure 3.2. NMOS transistor as a switch.


Fundamentals of Digital Logic Brown-Vranesic
i oh C842 NE CE
U M & A saxeT
x = "high" x = "low"

(a) A switch with the opposite behavior of Figure 3.2 a

Gate

Drain Source
VDD
Substrate (Body)

(b) PMOS transistor

VG

VS VD

(c) Simplified symbol for a PMOS transistor

Figure 3.3. PMOS transistor as a switch.


Fundamentals of Digital Logic Brown-Vranesic
i oh C842 NE CE
U M & A saxeT
VD VD = 0 V VD

VG

VS = 0 V
Closed switch Open switch
whenVG = VDD whenVG = 0 V

(a) NMOS transistor

VS = VDD VDD VDD

VG

VD VD VD = VDD
Open switch Closed switch
whenVG = VDD whenVG = 0 V

(b) PMOS transistor

Figure 3.4. NMOS and PMOS transistors in logic circuits.


Fundamentals of Digital Logic Brown-Vranesic
i oh C842 NE CE
U M & A saxeT
VDD

R R
+
5V
- Vf Vf

Vx Vx

(a) Circuit diagram (b) Simplified circuit diagram

x f x f

(c) Graphical symbols

Figure 3.5. A NOT gate built using NMOS technology.


Fundamentals of Digital Logic Brown-Vranesic
i oh C842 NE CE
U M & A saxeT
VDD

Vf

Vx
1

x1 x2 f

0 0 1
Vx
2 0 1 1
1 0 1
1 1 0

(a) Circuit (b) Truth table

x1 x1
f f
x2 x2

(c) Graphical symbols

Figure 3.6. NMOS realization of a NAND gate.


Fundamentals of Digital Logic Brown-Vranesic
i oh C842 NE CE
U M & A saxeT
V DD

x1 x2 f
Vf
0 0 1
Vx Vx 0 1 0
1 2
1 0 0
1 1 0

(a) Circuit (b) Truth table

x1 x1
x2 f x2 f

(c) Graphical symbols

Figure 3.7. NMOS realization of a NOR gate.


Fundamentals of Digital Logic Brown-Vranesic
i oh C842 NE CE
VDD VDD
U M & A saxeT

Vf

A
Vx1

x1 x2 f

Vx2 0 0 0
0 1 0
1 0 0
1 1 1

(a) Circuit (b) Truth table

x1 x1
f f
x2 x2

(c) Graphical symbols

Figure 3.8. NMOS realization of an AND gate.


Fundamentals of Digital Logic Brown-Vranesic
i oh C842 NE CE
U M & A saxeT
V DD V DD

Vf

x1 x2 f

0 0 0
Vx Vx 0 1 1
1 2

1 0 1
1 1 1

(a) Circuit (b) Truth table

x1 x1
x2 f x2 f

(c) Graphical symbols

Figure 3.9. NMOS realization of an OR gate.


Fundamentals of Digital Logic Brown-Vranesic
i oh C842 NE CE
U M & A saxeT

VDD

Vf

Vx
1
Pull-down network
(PDN)
Vx
n

Figure 3.10. Structure of an NMOS circuit.

Fundamentals of Digital Logic Brown-Vranesic


i oh C842 NE CE
U M & A saxeT

V DD

Pull-up network
(PUN)

Vf

Vx
1
Pull-down network
(PDN)
Vx
n

Figure 3.11. Structure of a CMOS circuit.

Fundamentals of Digital Logic Brown-Vranesic


i oh C842 NE CE
U M & A saxeT

VDD

T1

Vx Vf
x T1 T2 f
T2
0 on off 1
1 off on 0

(a) Circuit (b) Truth table and transistor states

Figure 3.12. CMOS realization of a NOT gate.

Fundamentals of Digital Logic Brown-Vranesic


i oh C842 NE CE
U M & A saxeT

V DD

T1 T2

Vf

Vx
1 T3 x1 x2 T1 T2 T3 T4 f

0 0 on on off off 1
0 1 on off off on 1
Vx
2 T4 1 0 off on on off 1
1 1 off off on on 0

(a) Circuit (b) Truth table and transistor states

Figure 3.13. CMOS realization of a NAND gate.

Fundamentals of Digital Logic Brown-Vranesic


i oh C842 NE CE
U M & A saxeT

V DD

Vx
1 T1

Vx
2 T2

x1 x2 T1 T2 T3 T4 f
Vf
0 0 on on off off 1
T3 T4 0 1 on off off on 0
1 0 off on on off 0
1 1 off off on on 0

(a) Circuit (b) Truth table and transistor states

Figure 3.14. CMOS realization of a NOR gate.

Fundamentals of Digital Logic Brown-Vranesic


i oh C842 NE CE
U M & A saxeT

V DD V DD

Vf

Vx
1

Vx
2

Figure 3.15. CMOS realization of an AND gate.


Fundamentals of Digital Logic Brown-Vranesic
i oh C842 NE CE
U M & A saxeT
V DD

Vf

Vx
1

Vx
2

Vx
3

Figure 3.16. The circuit for Example 3.1.


Fundamentals of Digital Logic Brown-Vranesic
i oh C842 NE CE
V DD U M & A saxeT

Vf

Vx
1

Vx
2

Vx
3

Vx
4

Figure 3.17. The circuit for Example 3.2.


Fundamentals of Digital Logic Brown-Vranesic
i oh C842 NE CE
U M & A saxeT

V DD

Vf Vx Vx Vf
1 2

Vx
1
L L H
L H H
H L H
Vx H H L
2

(a) Circuit (b) Voltage levels

Figure 3.18. Voltage levels in the circuit in Figure 3.13.


Fundamentals of Digital Logic Brown-Vranesic
i oh C842 NE CE
U M & A saxeT

x1 x2 f

0 0 1 x1
0 1 1 f
x2
1 0 1
1 1 0

(a) Positive logic truth table and gate symbol

x1 x2 f

1 1 0 x1
1 0 0 f
x2
0 1 0
0 0 1

(b) Negative logic truth table and gate symbol

Figure 3.19. Interpretation of the circuit in Figure 3.18.


Fundamentals of Digital Logic Brown-Vranesic
i oh C842 NE CE
U M & A saxeT

x1 x2 f
Vx Vx Vf
1 2 0 0 0 x1
0 1 0 f
L L L x2
1 0 0
L H L
1 1 1
H L L
H H H
(b) Positive logic
(a) Voltage levels

x1 x2 f

1 1 1 x1
1 0 1 f
x2
0 1 1
0 0 0
(c) Negative logic

Figure 3.20. Interpretation of voltage levels.

Fundamentals of Digital Logic Brown-Vranesic


i oh C842 NE CE
U M & A saxeT

(a) Dual-inline package

VDD

Gnd

(b) Structure of 7404 chip

Figure 3.21. A 7400


- series chip.
Fundamentals of Digital Logic Brown-Vranesic
i oh C842 NE CE
U M & A saxeT
VDD

7404

7408 7432

x1
x2
x3
f

Figure 3.22. An implementation of f = x1x2 + x2x3.


Fundamentals of Digital Logic Brown-Vranesic
Fundamentals of Digital Logic Brown-Vranesic Pin 1
Pin 2 Pin 12
Pin 4 Pin 14
Pin 6 Pin 16
Pin 8 Pin 18
Pin 19
Pin 3 Pin 11
Pin 5 Pin 13
Pin 7 Pin 15

Figure 3.23. The 74244 buffer chip.


Pin 9 Pin 17
U M & A saxeT
i oh C842 NE CE
i oh C842 NE CE
U M & A saxeT

Logic gates
Inputs and Outputs
(logic variables) programmable (logic functions)
switches

Figure 3.24. Programmable logic device as a black box.

Fundamentals of Digital Logic Brown-Vranesic


i oh C842 NE CE
U M & A saxeT
x1 x2 xn

Input buffers
and
inverters

x1 x1 xn xn

P1

AND plane OR plane


Pk

f1 fm

Figure 3.25. General structure of a PLA.


Fundamentals of Digital Logic Brown-Vranesic
i oh C842 NE CE
U M & A saxeT
x1 x2 x3

Programmable
connections

OR plane
P1

P2

P3

P4

AND plane

f1 f2
Figure 3.26. Gate-level diagram of a PLA.
Fundamentals of Digital Logic Brown-Vranesic
i oh C842 NE CE
U M & A saxeT
x1 x2 x3

OR plane
P1

P2

P3

P4

AND plane

f1 f2

Figure 3.27. Customary schematic for the PLA in Figure 3.26.


Fundamentals of Digital Logic Brown-Vranesic
i oh C842 NE CE
U M & A saxeT
x1 x2 x3

P1

f1
P2

P3

f2
P4

AND plane

Figure 3.28. An example of a PLA.


Fundamentals of Digital Logic Brown-Vranesic
i oh C842 NE CE
U M & A saxeT

Select
Enable

f1
Flip-flop

D Q

Clock

To AND plane

Figure 3.29. Extra circuitry added to OR


- gate from Figure 3.28.
Fundamentals of Digital Logic Brown-Vranesic
i oh C842 NE CE
U M & A saxeT

Figure 3.30. A PLD programming unit (courtesy of Data IO Corp).


Fundamentals of Digital Logic Brown-Vranesic
i oh C842 NE CE
U M & A saxeT

d
boar
t
ir cui
d c
rinte
P

Figure 3.31. A PLCC package with socket.


Fundamentals of Digital Logic Brown-Vranesic
i oh C842 NE CE
U M & A saxeT

PAL-like PAL-like
block block

I/O block
I/O block

Interconnection wires

PAL-like PAL-like
block block

I/O block
I/O block

Figure 3.32. Structure of a complex programmable logic device (CPLD).


Fundamentals of Digital Logic Brown-Vranesic
i oh C842 NE CE
U M & A saxeT

PAL-like block (details not shown)

PAL-like block

D Q

D Q

D Q

Figure 3.33. A section of the CPLD in Figure 3.32.


Fundamentals of Digital Logic Brown-Vranesic
i oh C842 NE CE
U M & A saxeT

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

To computer

Printed
circuit board

(b) JTAG programming

Figure 3.34. CPLD packaging and programming.


Fundamentals of Digital Logic Brown-Vranesic
i oh C842 NE CE
U M & A saxeT

Figure 3.35. A field


-
programmable gate array (FPGA).

Fundamentals of Digital Logic Brown-Vranesic


i oh C842 NE CE
U M & A saxeT
x1

0/1

0/1 x1 x2 f1
f
0/1 0 0 1
0 1 0
0/1
1 0 0
x2 1 1 1

(a) Circuit for a two-input LUT (b) f 1 = x 1 x 2 + x 1 x 2

x1

0
f1
0

1
x2

(c) Storage cell contents in the LUT

Figure 3.36. A two


- input lookup table (LUT).
Fundamentals of Digital Logic Brown-Vranesic
i oh C842 NE CE
U M & A saxeT

x1
x2

0/1
0/1
0/1
0/1
f
0/1
0/1
0/1
0/1
x3

Figure 3.37. A three- input LUT.


Fundamentals of Digital Logic Brown-Vranesic
i oh C842 NE CE
U M & A saxeT

Select

Out
Flip-flop
In1
In2 LUT D Q
In3
Clock

Figure 3.38. Inclusion of a flip


- flop in an FPGA logic block.

Fundamentals of Digital Logic Brown-Vranesic


i oh C842 NE CE
f
U M & A saxeT
x3

x1

x1 0 x2 0
0 f1 1 f2
0 0
x2 x2 x3
1 0

f1 0
1 f
1
f2
1

Figure 3.39. A section of a programmed FPGA.


Fundamentals of Digital Logic Brown-Vranesic
i oh C842 NE CE
U M & A saxeT

x1 f2

x2
x3
f1

Figure 3.40. A section of two rows in a standard- cell chip.

Fundamentals of Digital Logic Brown-Vranesic


i oh C842 NE CE
U M & A saxeT

Figure 3.41. A sea- of- g


ates gate array.
Fundamentals of Digital Logic Brown-Vranesic
i oh C842 NE CE
U M & A saxeT
f1

x1

x2

x3

Figure 3.42. The logic function f1 = x2x3+x1x3 in the gate array of Figure 3.41.
Fundamentals of Digital Logic Brown-Vranesic
i oh C842 NE CE
U M & A saxeT

V = 0V
G

SiO 2

V = 0V
S
V
D

++++++ ++++ ++++++++++++ +++ ++++++


++++++ ++++++++++++ ++++++
+++++++++++ +++++++++++++++++++++++
+++++++++ Substrate (type p) +++++++++

Source (type n) Drain (type n)

(a) WhenV GS = 0 V, the transistor is off

Figure 3.43a. NMOS transistor when turned off.


Fundamentals of Digital Logic Brown-Vranesic
i oh C842 NE CE
U M & A saxeT
VDD

VG = 5 V

SiO2

VS = 0 V
VD = 0 V

++++++ ++++ +++ ++++++


++++++ ++++++
+++++++++++ +++++++++++++++++
+++++++++ ++ +++++++ ++++++++++

Channel (type n)

(b) When VGS = 5 V, the transistor is on

Figure 3.43b. NMOS transistor when turned on.


Fundamentals of Digital Logic Brown-Vranesic
i oh C842 NE CE
U M & A saxeT

ID

Triode Saturation

0 V GS V T
VDS

Figure 3.44. The current- voltage relationship in the NMOS transistor.


Fundamentals of Digital Logic Brown-Vranesic
i oh C842 NE CE
U M & A saxeT

VDD VDD

Vf I stat V f = V OL

Vx RDS

(a) NMOS NOT gate (b) Vx = 5 V

Figure 3.45. Voltage levels in the NMOS inverter.


Fundamentals of Digital Logic Brown-Vranesic
i oh C842 NE CE
U M & A saxeT
Vf

V OH = V DD Slope = 1

V OL = 0 V
VT V IL V IH ( V DD V T ) V DD
Vx
V DD
2

Figure 3.46. The voltage transfer characteristic for the CMOS inverter.
Fundamentals of Digital Logic Brown-Vranesic
i oh C842 NE CE
U M & A saxeT
N1 N2
A
x f

(a) A NOT gate driving another NOT gate

V DD VDD

VA
Vx
Vf

(b) The capacitive load at node A

Figure 3.47. Parasitic capacitance in integrated circuits.


Fundamentals of Digital Logic Brown-Vranesic
i oh C842 NE CE
U M & A saxeT

VDD

Vx
50% 50%

Gnd

Propagation delay Propagation delay

VDD
90% 90%
VA 50% 50%

Gnd 10% 10%

tr tf

Figure 3.48. Voltage waveforms for logic gates.


Fundamentals of Digital Logic Brown-Vranesic
i oh C842 NE CE
U M & A saxeT

+ W2
W1
+

L
L

(a) Small transistor (b) Larger transistor

Figure 3.49. Transistor sizes.

Fundamentals of Digital Logic Brown-Vranesic


i oh C842 NE CE
U M & A saxeT

VDD

Vx ID
ID

Vf Vf

Vx

(a) Current flow when input Vx (b) Current flow when input Vx
changes from 0 V to 5 V changes from 5 V to 0 V

Figure 3.50. Dynamic current flow in CMOS circuits.

Fundamentals of Digital Logic Brown-Vranesic


i oh C842 NE CE
U M & A saxeT

V DD

V DD

A B

(a) NMOS transistor (b) PMOS transistor

Figure 3.51. NMOS and PMOS transistors used in the opposite way
from Figure 3.4.

Fundamentals of Digital Logic Brown-Vranesic


i oh C842 NE CE
U M & A saxeT

Logic Logic
Vf Voltage
value value
Vx1 x1 x2 Vf f

0 0 1.5 V 0
VDD 0 1 1.5 V 0
Vx2 1.5 V
1 0 0
1 1 3.5 V 1

(a) An AND gate circuit (b) Truth table and voltage levels

Figure 3.52. A Poor implementation of a CMOS AND gate.

Fundamentals of Digital Logic Brown-Vranesic


i oh C842 NE CE
U M & A saxeT
V DD

Vf

Vx
1

Vx
2

Vx
3

Vx
k

Figure 3.53. High fan-in NMOS NAND gate.


Fundamentals of Digital Logic Brown-Vranesic
i oh C842 NE CE
U M & A saxeT

VDD

Vf

Vx1 Vx2 Vxk

Figure 3.54. High fan


- in NMOS NOR gate.

Fundamentals of Digital Logic Brown-Vranesic


i oh C842 NE CE
U M & A saxeT

N1
Vf
f To inputs of To inputs of
x x
n other inverters n other inverters

Cn

(a) Inverter that drives n other inverters (b) Equivalent circuit for timing purposes

V f for n =1
VDD

V f for n = 4

Gnd
0 Time

(c) Propagation times for different values of n

Figure 3.55. The effect of fan


- out on propagation delay.
Fundamentals of Digital Logic Brown-Vranesic
i oh C842 NE CE
U M & A saxeT

V DD

Vx
Vf

(a) Implementation of a buffer

x f

(b) Graphical symbol

Figure 3.56. A noninverting buffer.


Fundamentals of Digital Logic Brown-Vranesic
i oh C842 NE CE
U M & A saxeT
e= 0

e x f

x f
e= 1
x f

(a) A tri-state buffer (b) Equivalent circuit

e x f e
0 0 Z
0 1 Z
x f
1 0 0
1 1 1

(c) Truth table (d) Implementation

Figure 3.57. Tri- state buffer.


Fundamentals of Digital Logic Brown-Vranesic
i oh C842 NE CE
U M & A saxeT

e e

x f x f

(a) (b)

e e

x f x f

(c) (d)

Figure 3.58. Four types of tri- state buffers.


Fundamentals of Digital Logic Brown-Vranesic
i oh C842 NE CE
U M & A saxeT

x1 f

x2

Figure 3.59. An application of tri- state buffers.

Fundamentals of Digital Logic Brown-Vranesic


i oh C842 NE CE
U M & A saxeT

x f s f

0 Z
1 x
s

(a) Circuit (b) Truth table

s= 0

x f=Z s

s= 1 x f
x f=x s

(c) Equivalent circuit (d) Graphical symbol

Figure 3.60. A transmission gate.


Fundamentals of Digital Logic Brown-Vranesic
i oh C842 NE CE
U M & A saxeT

x1 x2 f = x 1 x2

0 0 0
0 1 1
x1
1 0 1 f = x1 x 2
x2
1 1 0

(a) Truth table (b) Graphical symbol

x1
x2

f = x1 x2

(c) Sum-of-products implementation

Figure 3.61a. Exclusive- ORgate.


Fundamentals of Digital Logic Brown-Vranesic
i oh C842 NE CE
U M & A saxeT

x1
x2

f = x1 x 2

(d) CMOS implementation

Figure 3.61b. CMOS Exclusive- ORgate.

Fundamentals of Digital Logic Brown-Vranesic


i oh C842 NE CE
U M & A saxeT

x1

x2 f

Figure 3.62. A 2
- to
- 1multiplexer built using transmission gates.

Fundamentals of Digital Logic Brown-Vranesic


i oh C842 NE CE
U M & A saxeT

x1 x2 x3

NOR plane

VDD VDD VDD

S1

VDD

S2

VDD

S3

NOR plane f1 f2

Figure 3.63. An example of a NOR


- NOR PLA.
Fundamentals of Digital Logic Brown-Vranesic
i oh C842 NE CE
U M & A saxeT
x1 x2 xn

VDD

=
Ve
S1
VDD

(b) A programmable switch


S2

VDD Ve

Sk ++++
+++++
++++ + ++++++ ++++ +

(c) EEPROM transistor


(a) Programmable NOR-plane

Figure 3.64. Using EEPROM transistors to create a


programmable NOR plane.
Fundamentals of Digital Logic Brown-Vranesic
i oh C842 NE CE
U M & A saxeT
x1 x2 x3 x4
NOR plane

V DD

V DD

S1

S2

S3

S4

S5

S6

NOR plane

f1 f2
Figure 3.65. Programmable version of a NOR-NOR PLA.
Fundamentals of Digital Logic Brown-Vranesic
i oh C842 NE CE
U M & A saxeT
x1 x2 x3 x4
NOR plane
V DD

V DD

P1

P2

P3

P4

P5

P6

NOR plane

Figure 3.66. A NOR-NOR PLA used for sum-of-


f1 f2
products.
Fundamentals of Digital Logic Brown-Vranesic
i oh C842 NE CE
U M & A saxeT
x1 x2 x3 x4

VDD

P1

P2
f1
P3

P4

P5
f2

P6

NOR plane

Figure 3.67. PAL programmed to implement two functions in Figure 3.66.


Fundamentals of Digital Logic Brown-Vranesic
i oh C842 NE CE
U M & A saxeT

x1 0 Vf
0 1
f1
0
x2
1
VA

1 0 0
SRAM SRAM SRAM

(to other wires)

Figure 3.68. Pass- transistor switches in FPGAs.

Fundamentals of Digital Logic Brown-Vranesic


i oh C842 NE CE
U M & A saxeT

V DD

SRAM
1
VB
VA To logic block

Figure 3.69. Restoring a high voltage level.

Fundamentals of Digital Logic Brown-Vranesic


i oh C842 NE CE
U M & A saxeT

Figure 3.70. The AOI cell for Example 3.9.

Fundamentals of Digital Logic Brown-Vranesic


i oh C842 NE CE
U M & A saxeT

Figure 3.71. Circuit for Example 3.9.


Fundamentals of Digital Logic Brown-Vranesic
i oh C842 NE CE
U M & A saxeT

Figure 3.72. The pseudo


- NMOS inverter.

Fundamentals of Digital Logic Brown-Vranesic


i oh C842 NE CE
U M & A saxeT

x1
x2

x3

Figure P3.1. A sum


- of- products CMOS circuit.

Fundamentals of Digital Logic Brown-Vranesic


i oh C842 NE CE
U M & A saxeT

x1
x2

x3
g

Figure P3.2. A CMOS circuit built with multiplexers.

Fundamentals of Digital Logic Brown-Vranesic


i oh C842 NE CE
U M & A saxeT

x1 A
x2 h
x3

Figure P3.3. Circuit for problem 3.3.

Fundamentals of Digital Logic Brown-Vranesic


i oh C842 NE CE
U M & A saxeT

V DD

Vf

Vx
1

Vx
2

Vx
3

Figure P3.4. A three- input CMOS circuit.


Fundamentals of Digital Logic Brown-Vranesic
i oh C842 NE CE
U M & A saxeT
V DD

Vx
1

Vx
2

Vx
3

Vx
4

Vf

Figure P3.5. A four- input CMOS circuit.


Fundamentals of Digital Logic Brown-Vranesic
i oh C842 NE CE
U M & A saxeT

Vf
Vx1

Vx2

Vx3

Figure P3.6. The PDN in a CMOS circuit.


Fundamentals of Digital Logic Brown-Vranesic
i oh C842 NE CE
U M & A saxeT

V DD

Vx
1

Vx
2

Vf
Vx
3
Vx
4

Figure P3.7. The PUN in a CMOS circuit.

Fundamentals of Digital Logic Brown-Vranesic


i oh C842 NE CE
U M & A saxeT

Figure P3.8. The pseudo


- PMOS inverter.
Fundamentals of Digital Logic Brown-Vranesic
i oh C842 NE CE
U M & A saxeT

in 1 in2 in 3

out

in4 in5 in 6 in 7

Figure P3.9. A gate- array logic cell.

Fundamentals of Digital Logic Brown-Vranesic


i oh C842 NE CE
U M & A saxeT

Vx
1

Vx
2

Vf

Figure P3.10. Circuit for problem 3.54.

Fundamentals of Digital Logic Brown-Vranesic


i oh C842 NE CE
U M & A saxeT

Vx1

Vx2
Vf

Figure P3.11. Circuit for problem 3.55.

Fundamentals of Digital Logic Brown-Vranesic

S-ar putea să vă placă și