eece 353: digital systems design lecture 9: adders...

36
EECE 353: Digital Systems Design Lecture 9: Adders, Subtractors, Multipliers Cristian Grecu [email protected] Course web site: http://courses.ece.ubc.ca/353/

Upload: lebao

Post on 13-May-2018

233 views

Category:

Documents


1 download

TRANSCRIPT

EECE 353: Digital Systems DesignLecture 9: Adders, Subtractors, Multipliers

Cristian [email protected]

Course web site: http://courses.ece.ubc.ca/353/

Lecture 9, Page 2

Introduction to Lecture 9In Lab 3, your datapath containsan ALU that can perform addition,subtraction, and multiplication.

In this slide set, we will look at howto perform these operations.

Multi-cycle operation and division will come later, when we talkabout datapath circuits

“Typus Arithmeticae”, from "Margarita Philosophica," 1504 by Gregor Reisch

Lecture 9, Page 3

Adders

Lecture 9, Page 4

Lecture 9, Page 5

Connecting full-adders to make a multi-bit carry-propagate(ripple-carry) adder

Lecture 9, Page 6

Lecture 9, Page 7

Lecture 9, Page 8

Lecture 9, Page 9

Lecture 9, Page 10

Carry-Lookahead Adders (Sect 5.4.1 of text)

propagateor

Lecture 9, Page 11

Propagate

propagate

propagate

Lecture 9, Page 12

propagate

Lecture 9, Page 13

Lecture 9, Page 14

propagated

propagated

propagated

Lecture 9, Page 15

Lecture 9, Page 16

Lecture 9, Page 17

Lecture 9, Page 18

Lecture 9, Page 19

Lecture 9, Page 20

7 Δ

(11+N/2)* Δ

Lecture 9, Page 21

On the previous slide:After c4, c8, c12, … are propagated through the carry-skip structure

(chain of AND/OR gates), need to evaluate the correct partial sums.

According to slide 15, each 4-input adder block consists of 4 FA cells connected in a ripple carry structure.

For each FA cell, the delay from carry-in to carry-out is 2Δ (slide 7)For each 4-bit adder, there are 3 carry-in to carry-out transitions

Therefore, 6 Δ delay is taken by computing the correct 4-bit partial sums

For a N-bit carry-skip adder made of k-bit ripple carry adders, the critical path delay is 2(k-1)+(N/2-2)

Lecture 9, Page 22

Carry-Select Adder

Exercise: what is the critical path delay of this adder?

Lecture 9, Page 23

Lecture 9, Page 24

Lecture 9, Page 25

Lecture 9, Page 26

Lecture 9, Page 27

Multiplication

Lecture 9, Page 28

Lecture 9, Page 29

Lecture 9, Page 30

Lecture 9, Page 31

Lecture 9, Page 32

Lecture 9, Page 33

Large Multipliers

Lecture 9, Page 34

Lecture 9, Page 35

Lecture 9, Page 36

Summary of this lecture

Adders and Subtractors:- Carry-propagate adders- Carry-lookahead adders- Carry-skip adders- Carry-select adders- Carry-save adders

Multipliers:- Array multipliers

Each of these structures is “combinational” (computes the results in one cycle). We can also implement these using multi-cycle techniques using a controller and datapath. We’ll see this later in the course.