EE365 Adv. Digital Circuit Design Clarkson University Lecture #9 Math Units ROMs

Post on 11-Jan-2016

33 views 0 download

description

EE365 Adv. Digital Circuit Design Clarkson University Lecture #9 Math Units ROMs. Topics. Comparators Adders Multipliers ROMs. Lect #9. Rissacher EE365. 4-bit comparator. EQ_L. Equality Comparators. 1-bit comparator. Lect #9. Rissacher EE365. 8-bit Magnitude Comparator. Lect #9. - PowerPoint PPT Presentation

transcript

EE365Adv. Digital Circuit Design

Clarkson University

Lecture #9

Math Units

ROMs

Topics

• Comparators

• Adders

• Multipliers

• ROMs

Rissacher EE365Lect #9

Equality Comparators

• 1-bit comparator

• 4-bit comparator

EQ_L

Rissacher EE365Lect #9

8-bit Magnitude Comparator

Rissacher EE365Lect #9

Other conditions

Rissacher EE365Lect #9

Adders• Basic building block is “full adder”

– 1-bit-wide adder, produces sum and carry outputs

• Truth table:X Y Cin S Cout

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

Rissacher EE365Lect #9

Full-adder circuit

Rissacher EE365Lect #9

Ripple adder

• Speed limited by carry chain• Faster adders eliminate or limit carry chain

– 2-level AND-OR logic ==> 2n product terms– 3 or 4 levels of logic, carry look-ahead

Rissacher EE365Lect #9

74x2834-bit

adder

• Uses carry look-ahead internally

Rissacher EE365Lect #9

“generate”

“propagate”

“half sum”

carry-in from previous stage

Rissacher EE365Lect #9

Ripple carry

between groups

Rissacher EE365Lect #9

Look-ahead carry between

groups

Rissacher EE365Lect #9

• Subtraction is the same as addition of the two’s complement.

• The two’s complement is the bit-by-bit complement plus 1.

• Therefore, X – Y = X + Y + 1 .– Complement Y inputs to adder, set Cin to 1.

– For a borrow, set Cin to 0.

Subtraction

Rissacher EE365Lect #9

Full subtractor = full adder, almost

Rissacher EE365Lect #9

Multipliers

• 8x8 multiplier

Rissacher EE365Lect #9

Full-adder array

Rissacher EE365Lect #9

Faster carry chain

Rissacher EE365Lect #9

Read-Only Memories

Rissacher EE365Lect #9

Why “ROM”?

• Program storage– Boot ROM for personal computers– Complete application storage for embedded

systems.

• Actually, a ROM is a combinational circuit, basically a truth-table lookup.– Can perform any combinational logic function– Address inputs = function inputs– Data outputs = function outputs

Rissacher EE365Lect #9

Logic-in-ROM

example

Rissacher EE365Lect #9

4x4 multiplier example

Rissacher EE365Lect #9

Internal ROM

structure

PDP-11 boot ROM(64 words, 1024 diodes)

Rissacher EE365Lect #9

Two-dimensional decoding

?Rissacher EE365Lect #9

Larger example, 32Kx8 ROM

Rissacher EE365Lect #9

Today’s ROMs• 256K bytes, 1M byte, or larger

• Use MOS transistors

Rissacher EE365Lect #9

EEPROMs, Flash PROMs

• Programmable and erasable using floating-gate MOS transistors

Rissacher EE365Lect #9

Typical commercial EEPROMs

Rissacher EE365Lect #9

EEPROM programming

• Apply a higher voltage to force bit change– E.g., VPP = 12 V– On-chip high-voltage “charge pump” in newer chips

• Erase bits– Byte-byte– Entire chip (“flash”)– One block (typically 32K - 66K bytes) at a time

• Programming and erasing are a lot slower than reading (milliseconds vs. 10’s of nanoseconds)

Rissacher EE365Lect #9

Microprocessor EPROM application

Rissacher EE365Lect #9

ROM control and I/O signals

Rissacher EE365Lect #9

Next time

• Latches

• Flip Flops

• Clocking

Rissacher EE365Lect #9