digital circuits - unc charlotte faqjmconrad/ecgr2181-2006-01/... · digital design principles and...

33
3-1 Logic System Design I Digital Circuits ECGR2181 Chapter 3 Notes Data A-data B-data here new-A new-B A B A B S V CC Z

Upload: others

Post on 16-Apr-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Digital Circuits - UNC Charlotte FAQjmconrad/ECGR2181-2006-01/... · Digital Design Principles and Practices, 3/e Additional Terms • Sinking/Sourcing Current – (sect. 3.5.2, p

3-1Logic System Design I

Digital Circuits

ECGR2181Chapter 3 Notes

�������� ��������

Data

A-data

B-datahere

new-A

new-B

A

B

A

B

S

VCC

Z

Page 2: Digital Circuits - UNC Charlotte FAQjmconrad/ECGR2181-2006-01/... · Digital Design Principles and Practices, 3/e Additional Terms • Sinking/Sourcing Current – (sect. 3.5.2, p

Logic System Design I 3-2

What is a digital system?

It is a organized collection of digital elements which is designed to perform specified operations on a set of digital inputs and to generate a set of digital responses.

A digital system can be as simple as a block of combinational logic or as complex as a microprocessor.

Page 3: Digital Circuits - UNC Charlotte FAQjmconrad/ECGR2181-2006-01/... · Digital Design Principles and Practices, 3/e Additional Terms • Sinking/Sourcing Current – (sect. 3.5.2, p

Logic System Design I 3-3

Characteristics of Digital Systems

What are the characteristics of a digital system?

• Data processing and storage.

• Coordinate and sequence its internal operations.

• Cooperate in transferring data to & from itself.

• Sequences operations of external entities.

Page 4: Digital Circuits - UNC Charlotte FAQjmconrad/ECGR2181-2006-01/... · Digital Design Principles and Practices, 3/e Additional Terms • Sinking/Sourcing Current – (sect. 3.5.2, p

Logic System Design I 3-4

Overview of a digital system

Digital SystemInputs Outputs

SequencingProcessing

Storage

DataControl

DataControl

Page 5: Digital Circuits - UNC Charlotte FAQjmconrad/ECGR2181-2006-01/... · Digital Design Principles and Practices, 3/e Additional Terms • Sinking/Sourcing Current – (sect. 3.5.2, p

Logic System Design I 3-5

Input & Output Signals

Data:•Multi-bit: “values”

•Single-bit: decision-making / information

Control: {generally single-bit signals}

•Sequencing operations of system

•Coordinating operations with external units

Page 6: Digital Circuits - UNC Charlotte FAQjmconrad/ECGR2181-2006-01/... · Digital Design Principles and Practices, 3/e Additional Terms • Sinking/Sourcing Current – (sect. 3.5.2, p

Logic System Design I 3-6

Introduction to Digital Systems

Nomenclature: (Terms to know.)

Word: A group of binary bits. Typically represents some element of data. The number of bits in a word is indeterminate unless specified. [Example: “24-bit word”]

Byte: An 8-bit word.

Nibble: A 4-bit word.

Page 7: Digital Circuits - UNC Charlotte FAQjmconrad/ECGR2181-2006-01/... · Digital Design Principles and Practices, 3/e Additional Terms • Sinking/Sourcing Current – (sect. 3.5.2, p

Logic System Design I 3-7

Introduction to Digital Systems

Structure of digital systems: “system” vs. “module”

• For small systems which can be conveniently designedmonolithically the terms “system” and “module” may beused interchangeably.

• A digital system can be created as a monolithic structure.

• Complex systems often need to be partitioned into somenumber of subsystems -- “modules”

Page 8: Digital Circuits - UNC Charlotte FAQjmconrad/ECGR2181-2006-01/... · Digital Design Principles and Practices, 3/e Additional Terms • Sinking/Sourcing Current – (sect. 3.5.2, p

Logic System Design I 3-8

Introduction to Digital Systems

Single module system:

moduledata in

controldata out

control

System

Page 9: Digital Circuits - UNC Charlotte FAQjmconrad/ECGR2181-2006-01/... · Digital Design Principles and Practices, 3/e Additional Terms • Sinking/Sourcing Current – (sect. 3.5.2, p

Logic System Design I 3-9

Introduction to Digital Systems

Multiple module system:

module

data in

control

data out

control

System

module

module

data in

control

Page 10: Digital Circuits - UNC Charlotte FAQjmconrad/ECGR2181-2006-01/... · Digital Design Principles and Practices, 3/e Additional Terms • Sinking/Sourcing Current – (sect. 3.5.2, p

Logic System Design I 3-10

Examples of digital systems

• Data Selector: Route input data to one of two outputs.

• Data Converter: Inputs a 32-bit data word and outputs it as 4 bytes.

• Message Generator: Outputs a fixed message when a “start” command is received

• Communications Buffer: Receives and stores a “block”of data. When the block is complete, it resends thestored data.

• Microprocessor: “Does everything!”

Page 11: Digital Circuits - UNC Charlotte FAQjmconrad/ECGR2181-2006-01/... · Digital Design Principles and Practices, 3/e Additional Terms • Sinking/Sourcing Current – (sect. 3.5.2, p

Logic System Design I 3-11

A first look at the design process

1. Understand the functional specification.

2. Create a block diagram from the external viewpoint.

3. Fill in the major internal components.

4. Determine the sequence of operations which must occur within the module

Page 12: Digital Circuits - UNC Charlotte FAQjmconrad/ECGR2181-2006-01/... · Digital Design Principles and Practices, 3/e Additional Terms • Sinking/Sourcing Current – (sect. 3.5.2, p

Logic System Design I 3-12

Data Selector

Route input data to one of two outputs.

Specification: When a new data word arrives at the input, the module inspects the state of the most significant bit and routes the data to output A if the bit is true and to B if the bit is false. The last value sent to either output is retained until replaced.

Data

A-data

B-datahere

new-A

new-B

A

B

Page 13: Digital Circuits - UNC Charlotte FAQjmconrad/ECGR2181-2006-01/... · Digital Design Principles and Practices, 3/e Additional Terms • Sinking/Sourcing Current – (sect. 3.5.2, p

Logic System Design I 3-13

Data Converter

Inputs 32-bit data word and outputs it as 4 bytes.

Specification: When a new data word arrives at the input, the module accepts it and then outputs the word as 4 bytes.

IN

ready

OUT

new

REG

Page 14: Digital Circuits - UNC Charlotte FAQjmconrad/ECGR2181-2006-01/... · Digital Design Principles and Practices, 3/e Additional Terms • Sinking/Sourcing Current – (sect. 3.5.2, p

Logic System Design I 3-14

Message Generator

Outputs a fixed message when a “start” command is received.

Specification: When a “start” command is received, the module retrieves the bytes of a message stored in an internal ROM and outputs them sequentially.

startDOUT

newROM

Memory

Page 15: Digital Circuits - UNC Charlotte FAQjmconrad/ECGR2181-2006-01/... · Digital Design Principles and Practices, 3/e Additional Terms • Sinking/Sourcing Current – (sect. 3.5.2, p

Logic System Design I 3-15

Communications Buffer

Receives and stores a “block” of data. When the block is complete, it resends the data.

Specification: The module receives a series of data bytes and stores them in an internal memory. Intake of data stops when a byte of all 1’s is received. Then it resends the message with pairs of bytes packed in 16-bit words.

IN

here

OUT

newRAM

Memory

Page 16: Digital Circuits - UNC Charlotte FAQjmconrad/ECGR2181-2006-01/... · Digital Design Principles and Practices, 3/e Additional Terms • Sinking/Sourcing Current – (sect. 3.5.2, p

Logic System Design I 3-16

Digital Logic

Binary system -- 0 & 1, LOW & HIGH, negated and asserted.Basic building blocks -- AND, OR, NOT

(c)

X NOT X

10 1

0

NOT XX(a)

X

0

1

X AND YY

0

1

10

10

0001

X AND YXY (b)

X

0

1

X OR YY

0

1

10

10

0111

X OR YX′ X • Y X + Y

XY

Copyright © 2000 by Prentice Hall, Inc. Digital Design Principles and Practices, 3/e

Page 17: Digital Circuits - UNC Charlotte FAQjmconrad/ECGR2181-2006-01/... · Digital Design Principles and Practices, 3/e Additional Terms • Sinking/Sourcing Current – (sect. 3.5.2, p

Logic System Design I 3-17

NAND and NOR

(a)

X

0

1

X NAND YY

0

1

10

10

1110

X NAND YXY (b)

X

0

1

X NOR YY

0

1

10

10

1000

X NOR Y(X • Y)′ (X + Y)′

XY

Copyright © 2000 by Prentice Hall, Inc. Digital Design Principles and Practices, 3/e

Page 18: Digital Circuits - UNC Charlotte FAQjmconrad/ECGR2181-2006-01/... · Digital Design Principles and Practices, 3/e Additional Terms • Sinking/Sourcing Current – (sect. 3.5.2, p

Logic System Design I 3-18

Truth TablesXY

Z

F

X • Y

X′ • Y′ • Z

X′

Y′ X • Y + X′ • Y′ • Z

X Y Z FXY X’ Y’ X’+Y’+Z

Page 19: Digital Circuits - UNC Charlotte FAQjmconrad/ECGR2181-2006-01/... · Digital Design Principles and Practices, 3/e Additional Terms • Sinking/Sourcing Current – (sect. 3.5.2, p

Logic System Design I 3-19

More Practice

X Y Z F

Page 20: Digital Circuits - UNC Charlotte FAQjmconrad/ECGR2181-2006-01/... · Digital Design Principles and Practices, 3/e Additional Terms • Sinking/Sourcing Current – (sect. 3.5.2, p

Logic System Design I 3-20

Many representations of digital logic

Transistor-levelcircuit diagrams

A

B

S

VCC

Z

Page 21: Digital Circuits - UNC Charlotte FAQjmconrad/ECGR2181-2006-01/... · Digital Design Principles and Practices, 3/e Additional Terms • Sinking/Sourcing Current – (sect. 3.5.2, p

Logic System Design I 3-21

Truth tables

Logic diagrams

A

S

B

Z

SNASN

SB

Table 1 -1Truth table for the multiplexer function.

S A B Z

0 0 0 0

0 0 1 0

0 1 0 1

0 1 1 1

1 0 0 0

1 0 1 1

1 1 0 0

1 1 1 1

Page 22: Digital Circuits - UNC Charlotte FAQjmconrad/ECGR2181-2006-01/... · Digital Design Principles and Practices, 3/e Additional Terms • Sinking/Sourcing Current – (sect. 3.5.2, p

Logic System Design I 3-22

Logic levels

Switching threshold varies with voltage, temp, process, etc.• need “noise margin”

Operating closer to the tolerances requires an increase in attention to “analog” behavior.

Logic voltage levels decreasing with process• 5 -> 3.3 -> 2.5 -> 1.8 V

5.0 V

3.5 V

1.5 V

0.0 V

Logic 1 (HIGH)

Logic 0 (LOW)

undefinedlogic level

Copyright © 2000 by Prentice Hall, Inc. Digital Design Principles and Practices, 3/e

Page 23: Digital Circuits - UNC Charlotte FAQjmconrad/ECGR2181-2006-01/... · Digital Design Principles and Practices, 3/e Additional Terms • Sinking/Sourcing Current – (sect. 3.5.2, p

Logic System Design I 3-23

MOS Transistors

VIN

Copyright © 2000 by Prentice Hall, Inc. Digital Design Principles and Practices, 3/e

gatedrain

source

Voltage-controlled resistance:increase Vgs ==> decrease Rds

Note: normally, Vgs ≥0� Vgs

+

−Copyright © 2000 by Prentice Hall, Inc.

Digital Design Principles and Practices, 3/e

gate drain

sourceVoltage-controlled resistance:decrease Vgs ==> decrease Rds

Note: normally, Vgs ≤ 0

Vgs+

Copyright © 2000 by Prentice Hall, Inc. Digital Design Principles and Practices, 3/e

NMOS

PMOS

Voltage-controlled resistance

Page 24: Digital Circuits - UNC Charlotte FAQjmconrad/ECGR2181-2006-01/... · Digital Design Principles and Practices, 3/e Additional Terms • Sinking/Sourcing Current – (sect. 3.5.2, p

Logic System Design I 3-24

CMOS Inverter

VIN

VDD = +5.0 V

VOUT

Q2(p-channel)

Q1(n-channel)

0.05.0

VIN

(L)(H)

(H)(L)

Q1

offon

Q2

onoff

5.00.0

VOUT(b)

(c)

(a)

IN OUT

Copyright © 2000 by Prentice Hall, Inc. Digital Design Principles and Practices, 3/e

Page 25: Digital Circuits - UNC Charlotte FAQjmconrad/ECGR2181-2006-01/... · Digital Design Principles and Practices, 3/e Additional Terms • Sinking/Sourcing Current – (sect. 3.5.2, p

Logic System Design I 3-25

Alternate transistor symbols

Q2(p-channel)

VIN

VDD = +5.0 V

VOUT

Q1(n-channel)

on whenVIN is low

on whenVIN is high

Copyright © 2000 by Prentice Hall, Inc. Digital Design Principles and Practices, 3/e

Page 26: Digital Circuits - UNC Charlotte FAQjmconrad/ECGR2181-2006-01/... · Digital Design Principles and Practices, 3/e Additional Terms • Sinking/Sourcing Current – (sect. 3.5.2, p

Logic System Design I 3-26

Switch model

VDD = +5.0 V

VOUT = HVIN = L

(a)VDD = +5.0 V

VOUT = LVIN = H

(b)

Copyright © 2000 by Prentice Hall, Inc. Digital Design Principles and Practices, 3/e

Page 27: Digital Circuits - UNC Charlotte FAQjmconrad/ECGR2181-2006-01/... · Digital Design Principles and Practices, 3/e Additional Terms • Sinking/Sourcing Current – (sect. 3.5.2, p

Logic System Design I 3-27

CMOS NAND Gates

Use 2n transistors for n-input gateVDD

A

B

Z

Q1

Q3

Q2 Q4A

LLHH

B

LHLH

Q1

offoffonon

Q2

ononoffoff

Q3

offonoffon

Q4

onoffonoff

Z

HHHL

AB

Z

(a)

(b)

(c)

Copyright © 2000 by Prentice Hall, Inc. Digital Design Principles and Practices, 3/e

Page 28: Digital Circuits - UNC Charlotte FAQjmconrad/ECGR2181-2006-01/... · Digital Design Principles and Practices, 3/e Additional Terms • Sinking/Sourcing Current – (sect. 3.5.2, p

Logic System Design I 3-28

CMOS NAND -- switch model

VDD

A = L

Z = H

(a)

B = L

VDD

A = H

Z = H

(b)

B = L

VDD

A = H

Z = L

(c)

B = H

Copyright © 2000 by Prentice Hall, Inc. Digital Design Principles and Practices, 3/e

VDD

A = L

Z = H

(a)

B = L

VDD

A = H

Z = H

(b)

B = L

VDD

A = H

Z = L

(c)

B = H

Copyright © 2000 by Prentice Hall, Inc. Digital Design Principles and Practices, 3/e

VDD

A = L

Z = H

(a)

B = L

VDD

A = H

Z = H

(b)

B = L

VDD

A = H

Z = L

(c)

B = H

Copyright © 2000 by Prentice Hall, Inc. Digital Design Principles and Practices, 3/e

Page 29: Digital Circuits - UNC Charlotte FAQjmconrad/ECGR2181-2006-01/... · Digital Design Principles and Practices, 3/e Additional Terms • Sinking/Sourcing Current – (sect. 3.5.2, p

Logic System Design I 3-29

CMOS NAND -- more inputs (3)

A

LLLLHHHH

ABC

Z

B

LLHHLLHH

C

LHLHLHLH

Q1

offoffoffoffonononon

Q3

offoffononoffoffonon

Q5

offonoffonoffonoffon

Q6

onoffonoffonoffonoff

Q4

ononoffoffononoffoff

Q2

ononononoffoffoffoff

Z

HHHHHHHL

VDD

B

C

Z

Q3

A Q1

Q5

Q2 Q4 Q6

(a) (b)

(c)

Copyright © 2000 by Prentice Hall, Inc. Digital Design Principles and Practices, 3/e

Page 30: Digital Circuits - UNC Charlotte FAQjmconrad/ECGR2181-2006-01/... · Digital Design Principles and Practices, 3/e Additional Terms • Sinking/Sourcing Current – (sect. 3.5.2, p

Logic System Design I 3-30

CMOS NOR Gates

Like NAND -- 2n transistors for n-input gate

A

LLHH

B

LHLH

Q1

offoffonon

Q2

ononoffoff

Q3

offonoffon

Q4

onoffonoff

Z

HLLL

AB

Z

VDD

A

B

Z

Q2

Q4

Q1 Q3

(a)

(b)

(c)

Copyright © 2000 by Prentice Hall, Inc. Digital Design Principles and Practices, 3/e

Page 31: Digital Circuits - UNC Charlotte FAQjmconrad/ECGR2181-2006-01/... · Digital Design Principles and Practices, 3/e Additional Terms • Sinking/Sourcing Current – (sect. 3.5.2, p

Logic System Design I 3-31

NAND vs. NOR

PMOS transistors have higher “on” resistance than NMOS transistors.

VDD

A

B

Z

Q1

Q3

Q2 Q4A

LLHH

B

LHLH

Q1

offoffonon

Q2

ononoffoff

Q3

offonoffon

Q4

onoffonoff

Z

HHHL

AB

Z

(a)

(b)

(c)

Copyright © 2000 by Prentice Hall, Inc. Digital Design Principles and Practices, 3/e

NAND

A

LLHH

B

LHLH

Q1

offoffonon

Q2

ononoffoff

Q3

offonoffon

Q4

onoffonoff

Z

HLLL

AB

Z

VDD

A

B

Z

Q2

Q4

Q1 Q3

(a)

(b)

(c)

Copyright © 2000 by Prentice Hall, Inc. Digital Design Principles and Practices, 3/e

NOR

Result: NAND gates are preferred in CMOS.

Page 32: Digital Circuits - UNC Charlotte FAQjmconrad/ECGR2181-2006-01/... · Digital Design Principles and Practices, 3/e Additional Terms • Sinking/Sourcing Current – (sect. 3.5.2, p

Logic System Design I 3-32

(a)

(b)

(c)

tr tf

tr tf

HIGH

LOW

VIHmin

VILmax

Copyright © 2000 by Prentice Hall, Inc. Digital Design Principles and Practices, 3/e

Additional Terms• Sinking/Sourcing Current – (sect. 3.5.2, p. 106) current entering/leaving the output of

a device.

• Fanout – (sect. 3.5.4) how many gate inputs can a particular device drive and still maintain digital logic characteristics.

• Unused Inputs – (sect. 3.5.6) always connect unused inputs to either power supply rail (Vcc or Gnd.) – Static conditions – may appear to be stable,

– Dynamic conditions – could be unstable

– Makes circuit behavior unpredictable.

• ESD – Electro-Static Discharge. (sect. 3.5.7) ESD involves the discharge of static electricity and is the deadly enemy of electronic circuits, especially, CMOS devices. ESD damage can be avoided with the use of ESD straps and rubber mats.

• Transition Time – (sect. 3.6.1) time required for signal to transit the abnormal region. The time to transit the abnormal region may be different for traversing the region in different directions.

Page 33: Digital Circuits - UNC Charlotte FAQjmconrad/ECGR2181-2006-01/... · Digital Design Principles and Practices, 3/e Additional Terms • Sinking/Sourcing Current – (sect. 3.5.2, p

Logic System Design I 3-33

More Terms …• Propagation Delay – (sect. 3.6.2) time required for a change on the input to produce a

change on the output.

• Current Spikes – (sect. 3.6.4) typically seen on the power rails. Produced when many outputs change at the same time. Switching Power Supplies often produce these effects. {t/s note: check frequency to help find source}

• Decoupling Capacitors – (sect. 3.6.4) distributes the filtering on the board and aids in the reduction of noise on the power rails.

• Ground Bounce – (sect. 3.6.6) read the text. {describe how it looks on an o’scope}

• Three-state Outputs – (sect. 3.7.3) devices whose outputs are one of three states, high, low and high impedance. Used to drive an output from multiple, mutually exclusive sources (or devices.)

• Different types of Logic Families:– TTL – Transitor-Transitor Logic

– CMOS – Complementary Metal Oxide Semiconductor

– ECL – Emitter-Coupled Logic

• Take extreme care when interfacing TTL and CMOS logic devices