Docsity

Carry Lookahead Adder Notes, Schemes and Mind Maps of Logic

Toggle sidebar
bg1
cla-1 cla-1
Carry Lookahead Adder Notes
Carry Lookahead Adder (CLA)
A fast but costly adder.
Speed due to computing carry bit iwithout waiting for carry bit i−1.
These Notes
Intended to supplement other sources.
For a basic introduction see Brown & Vranesic 3rd Edition Section 3.4.
Describe an ordinary (also called flat) and hierarchical CLA.
Provide simple delay and cost estimates.
The cost analysis for the hierarchical CLAs has been omitted for now.
cla-1 LSU EE 3755 Lecture Transparency. Formatted 8:33, 23 April 2014 from cla. cla-1
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19

Partial preview of the text

Download Carry Lookahead Adder Notes and more Schemes and Mind Maps Logic in PDF only on Docsity!

Carry Lookahead Adder Notes

Carry Lookahead Adder (CLA)

A fast but costly adder.Speed due to computing carry bit

i

without waiting for carry bit

i

These Notes

Intended to supplement other sources.

For a basic introduction see Brown & Vranesic 3rd Edition Section 3.4. Describe an ordinary (also called

flat

) and

hierarchical

CLA.

Provide simple delay and cost estimates.The cost analysis for the hierarchical CLAs has been omitted for now.

LSU EE 3755 Lecture Transparency. Formatted

8:33,

23 April 2014 from cla.

Carry Lookahead Cell (CLC)

a

b

a

i^

b

i

CLC CLC

i

g p

p

i

g

i

s si

c

ci

Operates on single bits.

Ports for CLC

i

Operands and Carry In

a,

b

,^

c

Sum

s^

a

b

c

Propagate Signal

p^

a

b

Generate Signal

g^

ab

LSU EE 3755 Lecture Transparency. Formatted

8:33,

23 April 2014 from cla.

Overview of CLA

Structure of

n

-bit Carry Lookahead Adder

a^0

b^0

CLC

0

g^0 p^0

s^0

c^0

CLC

a^1

b^1

CLC

1

g^1 p^1

s^1

c^1

CLC

A B

carry in

S

Carry Generation Logic

a^2

b^2

CLC

2

g^2 p^2

s^2

c^2

CLC

an-

bn-

CLC

n-

gn-1 pn-

sn-

cn-

CLC

cn

carry out

g- Types of carry generation logic (CGL):

lookahead

and

ripple

With lookahead CGL adder above is a CLA.With ripple CGL adder above is equivalent to a ripple adder. Note:

g

−

1

is used as a synonym for

c

LSU EE 3755 Lecture Transparency. Formatted

8:33,

23 April 2014 from cla.

Carry Generation Logic

Lookahead CGL for first three cells.

a^0

b^0

CLC

0

g^0 p^0

s^0

c^0

CLC

a^1

b^1

CLC

1

g^1 p^1

s^1

c^1

CLC

A B

carry in

S

a^2

b^2

CLC

2

g^2 p^2

s^2

c^2

CLC

a^3

b^3

CLC

3

g^3 p^3

s^3

c^3

CLC

g-

LSU EE 3755 Lecture Transparency. Formatted

8:33,

23 April 2014 from cla.

Generalization of Lookahead Carry Generation

c^0

g

−

c^1

g

−

p 1 0

g

c^2

g

−

p 1

p 0 1

g

p 0 1

g

c^3

g

−

p 1

p 0

p 1 2

g

p 0

p 1 2

g

p 1 2

g

Generalizing we get^ ci

g

−

p 1

p 0

p

i−

1

g

p 0

p 1 2

p

i−

1

g

p 1

p 2

p

i−

1

g

i−

p 2 i−

1

g

i−

1

i−

1 ∑ j=

−

g 1 j

i−

1 ∏ k=j

pk

LSU EE 3755 Lecture Transparency. Formatted

8:33,

23 April 2014 from cla.

CLA Delay Analysis

Delay ModelsAbout These Models

Intended for hand analysis.These models for making rough comparisons of different kinds of adders.

For example, ripple adder v. carry lookahead adder. These models too crude for choosing between adders with delays within 40% of each other

in such cases write HDL descriptions

and use synthesis program to determine delays.

LSU EE 3755 Lecture Transparency. Formatted

8:33,

23 April 2014 from cla.

How To Analyze Delay of Combinational Circuit—A ReviewSteps

(0) Mark all inputs to the circuit with time

t

(1) If all gate outputs are marked with a time then go to step (2).Otherwise, consider gates that do not have a time marked at their outputs

and find one in which all inputs are marked with a time. Mark the output of the gate with time max

{t

, t 1

,... , t 2

}n

tg

where

t

,... , t 1

n^

are the times marked on the gate’s inputs

and

t

g^

is the delay of the gate based on the model in use.

Go to step (1).(2) The circuit delay is the largest time assigned to a wire.

LSU EE 3755 Lecture Transparency. Formatted

8:33,

23 April 2014 from cla.

CLA Delay Analysis

Critical

(longest) Path

Starts at inputs, flows through

p

0

(or any other

p

),i

c

n−

, ending at 1

s

n−

You can follow along by following the

red

path!

a^0

b^0

CLC

0

g^0 p^0

s^0

c^0

a^1

b^1

CLC

1

g^1 p^1

s^1

c^1

CLC

A B

carry in

S

an-

bn-

CLC

n-

gn-1 pn-

sn-

cn-

g-

cn

gn- pn- g pn- n-

carry out

t=

0+

1

1+

1

2+

1

3+

2

1+

lg

n

1+lg n+

lg

n

1+2lg

n+ 2

UnrealisticDelay ConservativeDelay

0+

1

t=

Unrealistic DelayConservative Delay

Red Wires on Critical Path

3+2lg

n

5

Delays (longestpath to output).

gn-

LSU EE 3755 Lecture Transparency. Formatted

8:33,

23 April 2014 from cla.

Comparison

n-bit ripple: Delay 2

n.

n-bit CLA: Delay 5 or 3 + 2

⌈lg

n

8-bit ripple: Delay 16.8-bit CLA: Delay 5 or 8.32-bit ripple: Delay 64.32-bit CLA: Delay 5 or 13.64-bit ripple: Delay 128.64-bit CLA: Delay 5 or 15.CLA looks much better

until we compute the cost!

LSU EE 3755 Lecture Transparency. Formatted

8:33,

23 April 2014 from cla.

CLA Cost Analysis

Cost Model

Cost of

a

-input AND Gate:

a

Cost of 3-input XOR Gate:

LSU EE 3755 Lecture Transparency. Formatted

8:33,

23 April 2014 from cla.

CLA v. Ripple Cost Comparison

Cost of Selected Sizes

n-bit ripple: 10

n

n-bit CLA: 7

n

1 6 n (n

n

8-bit ripple: 808-bit CLA: 212 or 2

.^65

×

cost of ripple adder.

32-bit ripple: 32032-bit CLA: 6736 or 21

×

cost of ripple adder.

64-bit ripple: 64064-bit CLA: 48288 or 75

×

cost of ripple adder. LSU EE 3755 Lecture Transparency. Formatted

8:33,

23 April 2014 from cla.

Hierarchical CLA

Instead of using

n

1-bit carry lookahead cells

use

m l

-bit

Carry Lookahead Blocks

. (Note that

n

l

×

m

Structure:

a^0

b^0

CLB-x

0

P^0

s^0

c^0

CLB-x

a^1

b^1

CLB-x

1

G^1 P^1

s^1

c^1

CLB-x

A B

carry in

S

Carry Generation Logic

a^2

b^2

CLB-x

2

G^2 P^2

s^2

c^2

CLB-x

a^  

b^ 



CLB-x





P^ 

 G^ 



s^ 



c^ 



CLB-x

c^ 

carry out

G^



G^0

l bits

l bits

l bits

lm bits

lm bits

The CLB-x blocks can contain any kind of

l

-bit adder, including

ripple

and

CLA

Carry generation logic (CGL) can be

ripple

or

lookahead

LSU EE 3755 Lecture Transparency. Formatted

8:33,

23 April 2014 from cla.

We will consider two kinds of CLB-x modules:

CLB-c

,^

in which the

l

-bit adder is a CLA.

CLB-r

,^

in which the

l

-bit adder is a ripple adder. LSU EE 3755 Lecture Transparency. Formatted

8:33,

23 April 2014 from cla.

Carry Lookhead Block (CLB-x)

CLB-x contains an

l

-bit adder of type

x

e.g.

, ripple or CLA)

and logic to compute

P

and

G

a^0

b^0

a^1

b^1

al-

bl-

al-

bl-3 bl-

al-

G P

G P^ 



l-bittype-xadder

CLB-x CLB-x



cin

c^ 

s s

a^

b

a^

B[( b

i+1)l

-1:

il]

A[(

i+1)l

-1:

il]

S[(

i+1)l

-1:

il]

l bits

l bits

l bits of B from bit # il to bit # (i+1)l-1.

LSU EE 3755 Lecture Transparency. Formatted

8:33,

23 April 2014 from cla.