Chapter 3

59
Chapter 3 • How transistors operate and form simple switches • CMOS logic gates • PLA, PAL, FPGA • Basic electrical characteristics of logic circuits

description

Chapter 3. How transistors operate and form simple switches CMOS logic gates PLA, PAL, FPGA Basic electrical characteristics of logic circuits. Transistor Switches. Logic Circuits are built with Transistors “A full treatment of transistor behavior is beyond the scope of this text” MOSFETs - PowerPoint PPT Presentation

Transcript of Chapter 3

Page 1: Chapter 3

Chapter 3

• How transistors operate and form simple switches

• CMOS logic gates

• PLA, PAL, FPGA

• Basic electrical characteristics of logic circuits

Page 2: Chapter 3

Transistor Switches

• Logic Circuits are built with Transistors– “A full treatment of transistor behavior is

beyond the scope of this text”

• MOSFETs– NMOS - nchannel– PMOS – pchannel

Page 3: Chapter 3

NMOS vs PMOS

Drain Source

x = "low" x = "high"

(a) A simple switch controlled by the input x

V D V S

(b) NMOS transistor

Gate

(c) Simplified symbol for an NMOS transistor

V G

Substrate (Body)

Gate

x = "high" x = "low"

(a) A switch with the opposite behavior

V G

V D V S

(b) PMOS transistor

(c) Simplified symbol for a PMOS transistor

V DD

Drain Source

Substrate (Body)

Page 4: Chapter 3

NMOS & PMOS in Logic Circuits

(a) NMOS transistor

V G

V D

V S = 0 V

V S = V DD

V D

V G

Closed switch whenV G =V DD

V D = 0 V

Open switch whenV G = 0 V

V D

Open switch whenV G =V DD

V D

V DD

Closed switch whenV G = 0 V

V D =V DD

V DD

(b) PMOS transistor

Page 5: Chapter 3

NMOS Inverter

(b) Simplified circuit diagram

V x

V f

V DD

x f

(c) Graphical symbols

x f

R

V x

V f

R +

-

(a) Circuit diagram

5 V

Page 6: Chapter 3

NMOS NAND vs AND

V f

V DD

(a) Circuit

(c) Graphical symbols

(b) Truth table

f f

0 0 1 1

0 1 0 1

1 1 1 0

x 1 x 2 f

V x 2

V x 1

x 1

x 2

x 1

x 2

(a) Circuit

(c) Graphical symbols

(b) Truth table

f f

0 0 1 1

0 1 0 1

0 0 0 1

x 1 x 2 f

V f

V DD

A

V x 1

V x 2

x 1

x 2

x 1

x 2

V DD

Page 7: Chapter 3

NOR and OR

What would an OR gate look like?

V x 1 V x 2

V f

V DD

(a) Circuit

(c) Graphical symbols

(b) Truth table

f

0

0

1

1

0

1

0

1

1

0

0

0

x 1 x 2 f

f x 1

x 2

x 1

x 2

Page 8: Chapter 3

SN7408 - QUADRUPLE 2-INPUT POSITIVE-AND GATES

Page 9: Chapter 3

What’s Wrong With this Picture?

V x

V f

V DD

R

When Vx is high there is a constant current through R

Page 10: Chapter 3

Structure of an NMOS Circuit

V f

V DD

V x 2

V x 1

V f

V DD

Pull-down network

V x 1

V x n

(PDN)

Page 11: Chapter 3

Structure of a CMOS circuit

V f

V DD

Pull-down network

Pull-up network

V x 1

V x n

(PUN)

(PDN)

Page 12: Chapter 3

V f

V DD

V x

T 1

T 2

(a) Circuit

V f

V DD

(b) Truth table and transistor states

on

on

on

off

0

1 0

0

1

1

0

1

off

off

on

off

off

on

f

off

on

1

1

1

0

off

off on

on

V x 1

V x 2

T 1 T 2

T 3

T 4

x 1 x 2 T 1 T 2 T 3 T 4

Page 13: Chapter 3

V f

V DD

V x 1

V x 2

V DD

Page 14: Chapter 3

V f

V DD

V x 1

V x 2

V DD

Vf

Vf = X1X2 = X1 + X2

Vf = X1X2

PUN = Vf

PDN = Vf

Page 15: Chapter 3

f = X1 + X2X3

V f

V DD

V x 1

V x 2

V x 3

Page 16: Chapter 3

Types of Integrated Circuits

• Standard Logic

• Programmable Logic

• Custom Logic

Page 17: Chapter 3

7400 Series Standard Chips - random logicV DD

x 1 x 2 x 3

f

7404

7408 7432

= x1x2 + x2x3

Page 18: Chapter 3

Standard Logic

• Seldom used – with exception of buffers• SSI

– Earliest devices only a few logic gates/transistors

• MSI– 10 to100 gates

• LSI– Greater than MSI

• VLSI

Page 19: Chapter 3

PLDs – Programmable Logic Devices

• PLA – Programmable Logic Array

• PAL – Programmble Array Logic

• CPLD – Complex PLD

• FPGA – Field Programmable Gate Arrays

• Custom Chips

• ASIC – Application Specific Integrated Circuit

• Gate Arrays

• Memory

SPLDs}

Page 20: Chapter 3

PLA – Programmable Logic Array

• Based on the idea that logic functions can be realized in SoP form

• “Modest” size circuits– Inputs & Outputs of not more than 32

Page 21: Chapter 3

f1

P1

P2

f2

x1 x2 x3

OR plane

Programmable

AND plane

connections

P3

P4

Page 22: Chapter 3

f1

P1

P2

f2

x1 x2 x3

OR plane

Programmable

AND plane

connections

P3

P4

f1 = x1x2 + x1x3 + x1x2x3

f2 = x1x2 + x1x2x3 + x1x2

Page 23: Chapter 3

f 1

P 1

P 2

f 2

x 1 x 2 x 3

OR plane

AND plane

P 3

P 4

Page 24: Chapter 3

PAL – Programmble Array Logic

• PLA’s Programmable Fuses– Fabrication difficult– Fuses slow down circuit

• PALs– Only AND plane is programmable– OR plane is fixed

• “Modest” size circuits– Inputs & Outputs of not more than 32

Page 25: Chapter 3

f 1

P 1

P 2

f 2

x 1 x 2 x 3

AND plane

P 3

P 4

Page 26: Chapter 3

PAL Macrocell

f 1

To AND plane

D Q

Clock

SelectEnable

Flip-flop

Page 27: Chapter 3

CPLD – Complex PLD

• Multiple Circuit blocks on a single chip

• Each circuit block similar to PAL or PLA

• Typical CPLDs– 16 Macro cells in each PAL like block– 5 to 20 inputs to each OR gate– 2 to more than 100 PAL like blocks

Page 28: Chapter 3

Structure of a complex programmable logic device (CPLD).

PAL-likeblock

I/O

blo

ck

PAL-likeblock

I/O b

lock

PAL-likeblock

I/O

blo

ck

PAL-likeblock

I/O b

lock

Interconnection wires

Page 29: Chapter 3

A section of a CPLD

D Q

D Q

D Q

PAL-like block (details not shown)

PAL-like block Note how output pin can be used as an input pin but associated macrocell cannot be used – some CPLDs include additional wiring to get around this limitation

Page 30: Chapter 3

Equivalent Gates

• Two input NAND gate used as measure of circuit size

• SPLD, CPLD macrocell = 20 Equivalent Gates

• PAL with 8 Macrocells can hold circuit of about 160 EG

• CPLD with 500 macrocells can hold circuit of about 10,000 EG

• Today’s logic circuits demand circuits greater than 10,000 EG

Page 31: Chapter 3

Memory as Logic

Address Data

How Memory Works

•Supply address

•Get Data

Page 32: Chapter 3

Memory as Logic

Address Data

Consider an 8 location memory chip with one binary bit at each location

•How many bits to address a location?

•How many bits at each location?

Page 33: Chapter 3

Memory as Logic

Address Data

A2 A1 A0 Data 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 1 1 0 0 0 1 0 1 1 1 1 0 0 1 1 1 0

f= A2A1A0 + A2A1A0

What would you name this?

Page 34: Chapter 3

FPGA – Field Programmable Gate Arrays

• Quite different from SPLDs and CPLDs

• FPGAs don’t have AND or OR planes

• Logic blocks – most common are LUTs

• I/O blocks

• Interconnection wires

• Greater than 1M EG

Page 35: Chapter 3
Page 36: Chapter 3

(a) Circuit for a two-input LUT

x 1

x 2

f

0/1

0/1

0/1

0/1

0

0

1

1

0

1

0

1

1

0

0

1

x 1 x 2

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

(c) Storage cell contents in the LUT

x 1

x 2

1

0

0

1

f 1

f 1

Page 37: Chapter 3

A three-input LUT.

f

0/1

0/1

0/1

0/1

0/1

0/1

0/1

0/1

x 2

x 3

x 1

Page 38: Chapter 3

Inclusion of a flip-flop in an FPGA logic block.

Out

D Q

Clock

Select

Flip-flop In1

In2

In3

LUT

Page 39: Chapter 3

A section of a programmed FPGA.

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

Page 40: Chapter 3

Custom Chips, Standard Cells, & Gate Arrays

• Programmable switches– Size issue– Speed issue

Page 41: Chapter 3

Custom Chips

• Complete flexibility in transistor placement and connection

• Large design effort

• Large cost

• Large quantities

Page 42: Chapter 3

ASICsApplication Specific Integrated Circuits

• Standard Cell Libraries

• Configurable connections

Page 43: Chapter 3

Gate Arrays

• Gates prefabricated

• Connections added later

Page 44: Chapter 3

In-System Programmingvs?

•Compare Teensy++ to ATtiny261

Out of System Programming

Page 45: Chapter 3

Programming

• PALs & PLAs usually programmed out of systems

• CPLDs usually programmed via JTAG in-system

• FPGAs programmed via JTAG in-system

• PALs, PLAs, & CPLDs nonvolatile

• FPGAs volatile

Page 46: Chapter 3

Practical Aspects

• Transistor Operation

• Static Operation - Voltage Levels

• Dynamic Operation – Transition Times

• Power Dissipation

Page 47: Chapter 3

0

Triode

V DS

Saturation

V GS V T –

I D

The current-voltage relationship in the NMOS transistor.

Page 48: Chapter 3

V G

V D

V S = 0 V

Open switch whenV G = 0 V

V D

Page 49: Chapter 3

V G

V D

V S = 0 V

Closed switch whenV G =V DD

V D = 0 V

Page 50: Chapter 3

Logic Values as Voltage Levels

VOH

VOL

VIH

VIL

Logic Value 0

Logic Value 1

High Noise Margin VOH – VIH

Low Noise Margin VIL - VOL

Page 51: Chapter 3

Dynamic Operation

• Ideal gates – Switch immediately in response to a change in

inputs– Transition logic states in zero time

• We don’t live in an Ideal World

Page 52: Chapter 3

Propagation delay

V DD

V DD

Gnd

Gnd

V x

V A

50% 50%

90%

Propagation delay

10%

t r

50%

90%

50%

10%

t f

Rise Time Fall Time

Page 53: Chapter 3

Power Dissipation

• Static power consumption

• Dynamic power consumption

Page 54: Chapter 3

Static Power Consumption

V x

V f

V DD

R

V f

V DD

V x

T 1

T 2

Page 55: Chapter 3

Dynamic Power Consumption

VDD

Vf

Vx

IDVx

Vf

ID

Page 56: Chapter 3

Fan-in Fan-out

• Fan-in– Number of inputs to the gate– No choice really

• Fan-out– Number of inputs being driven– Increase in capacitance slows down rise time– Increase in load changes DC levels

Page 57: Chapter 3

Buffers

• Non-inverting

• Inverting

• Tri-state x f

e

(b)

x f

e

(a)

x f

e

(c)

x f

e

(d)

Tri-state buffers

Page 58: Chapter 3

Reading• Chapter 3

Laboratory Preparation• None

Page 59: Chapter 3

Homework Problems• For SN74HCT00N and MM74HCT00N

– Calculate Noise Margins– Find rise and fall times– Find propagation delay

• some datasheets show this as tt

– Compare the two datasheets