reminders - eecs · reminders • hw3 – project ... non-inverting logic ... • full adder –...

20
1 EECS 427 Lecture 8: Adders Readings: 11 1-11 3 3 EECS 427 F09 Lecture 8 1 Readings: 11.1 11.3.3 Reminders HW3 – project initial proposal: due Wednesday 10/7 You can schedule a half-hour appointment with me to You can schedule a half hour appointment with me to discuss your initial proposal before submission Email your initial proposal (one per group) in doc format to [email protected] by 7 pm on Wednesday night Limit your write-up to 4 pages maximum. Keep it brief and clear. Quiz 1 on Wednesday 10/14 Samples (with solutions) from past terms are posted Samples (with solutions) from past terms are posted Half-lecture review next Monday CAD4 is due Wednesday 10/14 You can submit it by Thursday 10/15 at noon EECS 427 F09 2 Lecture 8

Upload: doliem

Post on 01-Sep-2018

213 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Reminders - EECS · Reminders • HW3 – project ... non-inverting logic ... • Full adder – Mirror adder – Transmission-gate adder – Manchester carry chain • Adder topologies

1

EECS 427Lecture 8: AddersReadings: 11 1-11 3 3

EECS 427 F09 Lecture 8 1

Readings: 11.1 11.3.3

Reminders

• HW3 – project initial proposal: due Wednesday 10/7– You can schedule a half-hour appointment with me toYou can schedule a half hour appointment with me to

discuss your initial proposal before submission– Email your initial proposal (one per group) in doc format to

[email protected] by 7 pm on Wednesday night– Limit your write-up to 4 pages maximum. Keep it brief and

clear.

• Quiz 1 on Wednesday 10/14Samples (with solutions) from past terms are posted– Samples (with solutions) from past terms are posted

– Half-lecture review next Monday

• CAD4 is due Wednesday 10/14– You can submit it by Thursday 10/15 at noon

EECS 427 F09 2Lecture 8

Page 2: Reminders - EECS · Reminders • HW3 – project ... non-inverting logic ... • Full adder – Mirror adder – Transmission-gate adder – Manchester carry chain • Adder topologies

2

Last Time

• Dynamic circuits – high performanceD i l i ti d d i– Dynamic logic – non-ratioed, dynamic power only, no static current, higher activity, low noise margin

– Domino logic – can be safely cascaded, only non-inverting logic

– Footless domino – ripple precharge, delayed clock, extra power

EECS 427 F09 Lecture 8 3

, p– Dual-rail domino – both inverting and non-

inverting outputs– NP CMOS – cascade n- and p- evaluation

networks

Overview

• Full adder– Mirror adder– Transmission-gate adder– Manchester carry chain

• Adder topologies– Ripple carry– Carry bypass– Carry select– Carry lookahead

EECS 427 F09 Lecture 8 4

• Carry lookahead adder– Kogge-Stone– Radix 2 or Radix 4– Sparse tree, Brent-Kung

Page 3: Reminders - EECS · Reminders • HW3 – project ... non-inverting logic ... • Full adder – Mirror adder – Transmission-gate adder – Manchester carry chain • Adder topologies

3

Full Adder

A B

C tCin Full Cout

Sum

Cin Fulladder

EECS 427 F09 Lecture 8 5

The Binary Adder

A B

C tCin Full

S A B Ci =

Cout

Sum

Cin Fulladder

EECS 427 F09 Lecture 8 6

i

A= BCi ABCi ABCi ABCi+ + +

Co AB BCi ACi+ +=

Page 4: Reminders - EECS · Reminders • HW3 – project ... non-inverting logic ... • Full adder – Mirror adder – Transmission-gate adder – Manchester carry chain • Adder topologies

4

Express Sum and Carry as a function of P, G, D

Define 3 new variables which ONLY depend on A, B

Generate (G) = AB

WHY?Generate (G) = AB

Propagate (P) = A B

Delete = A B

EECS 427 F09 Lecture 8 7

Can also derive expressions for S and Co based on D and P

The Ripple-Carry Adder

A0 B0 A1 B1 A2 B2 A3 B3

Worst case delay linear with the number of bits

FA FA FA FA

S0 S1 S2 S3

Ci,0 Co,0

( Ci,1)

Co,1 Co,2 Co,3

t = O(N)

EECS 427 F09 Lecture 8 8

Goal: Make the fastest possible carry path circuit

td = O(N)

tadder = (N-1)tcarry + tsum

Page 5: Reminders - EECS · Reminders • HW3 – project ... non-inverting logic ... • Full adder – Mirror adder – Transmission-gate adder – Manchester carry chain • Adder topologies

5

Complementary Static CMOS Full Adder

A B

VDD

VDD

Ci BA

A B

B

A

Ci

Ci A

X

A B B

A

B

Ci

Ci

VDD

S

EECS 427 F09 Lecture 8 9

28 Transistors

A B B VDD

A

B

A CiB

Co

Inversion Property

A B A B

S

CoCi FA

S

CoCi FA

EECS 427 F09 Lecture 8 10

Page 6: Reminders - EECS · Reminders • HW3 – project ... non-inverting logic ... • Full adder – Mirror adder – Transmission-gate adder – Manchester carry chain • Adder topologies

6

Minimize Critical Path by Reducing Inverting Stages Along Carry Path

A

Even cell Odd cell

A B A B A B BA3

FA FA FA FA

A0 B0

S0

A1 B1

S1

A2 B2

S2

B3

S3

Ci,0 Co,0 Co,1 Co,3Co,2

EECS 427 F09 Lecture 8 11

Exploit Inversion Property

Allows us to remove inverter in carry chain at what cost?

A Better Structure: Mirror Adder

VDD VDD A

VDD

VDD

Ci

A

BA

B

A

A BDelete

Generate"1"-Propagate

"0"-Propagate

VDD

Ci

A B C

Ci

A

Ci

BBA

SCo

EECS 427 F09 Lecture 8 12

BBA A B Ci

B

A

24 transistors

Page 7: Reminders - EECS · Reminders • HW3 – project ... non-inverting logic ... • Full adder – Mirror adder – Transmission-gate adder – Manchester carry chain • Adder topologies

7

Mirror Adder LayoutVDD

CiA BB

Co

A Ci Co Ci A B

EECS 427 F09 Lecture 8 13

GND

S

Mirror Adder Details

• NMOS and PMOS chains are completely symmetric. Maximum of 2 series transistors in carry generationy g

• In layout critical to minimize capacitance at node Co. Reduction of junction capacitances is particularly important

• Capacitance at node Co is composed of 4 junction capacitances, 2 internal gate capacitances, and 6 gate capacitances in connecting adder cell

EECS 427 F09 Lecture 8 14

• Transistors connected to Ci are closest to output

• Only optimize transistors in carry stage for speedTransistors in sum stage can be small

Page 8: Reminders - EECS · Reminders • HW3 – project ... non-inverting logic ... • Full adder – Mirror adder – Transmission-gate adder – Manchester carry chain • Adder topologies

8

Sizing Mirror Adder

VDD

VDDA6

VDD VDD

6 B

6 Ci

Ci

3 Ci

A4 4 4

CiB

4

2

VDD

A12 12 4

BB

12 4

6 2

Generate

0-Propagate

1-Propagate

Delete

A

A

Co S

EECS 427 F09 Lecture 8 15

Fanout (effective) ~2

3 A

3 B

A2 2 2

CiBA6 6 2B

B

Transmission Gate Full Adder

AVDD

VDDCi

P

A

B

P

VDDA

A A

DD

Ci

P

AB VDD

i

C

S

P

P

P

Sum Generation

Carry Generation

EECS 427 F09 Lecture 8 16

Ci

A

Ci

Co

Ci

P

P Carry Generation

Setup

Page 9: Reminders - EECS · Reminders • HW3 – project ... non-inverting logic ... • Full adder – Mirror adder – Transmission-gate adder – Manchester carry chain • Adder topologies

9

Manchester Carry Chain

VPi

VDD

CoCi

Gi

Di

Pi

Pi

VDD

CoCi

Gi

EECS 427 F09 Lecture 8 17

Pi

StaticDynamic

Manchester Carry Chain

•Implement P with pass-transistors•Implement G with pull-up OR kill (delete) with pull-down (note inversion)•Use dynamic logic to reduce complexity and speed up

G2

C3

G3

Ci,0

P0

G1

VDD

G0

P1 P2 P3

Use dynamic logic to reduce complexity and speed up

EECS 427 F09 Lecture 8 18

C3C2C1C0

Page 10: Reminders - EECS · Reminders • HW3 – project ... non-inverting logic ... • Full adder – Mirror adder – Transmission-gate adder – Manchester carry chain • Adder topologies

10

Carry-Bypass Adder

Also called Carry-Skip

P0 G1 P0 G1 P2 G2 P3 G3

Co,3Co,2Co,1Co,0Ci,0

FA FA FA FA,,,,,

FA FA FA FA

P0 G1 P0 G1 P2 G2 P3 G3

Co,2Co,1Co,0Ci,0

Co,3

ulti

plex

er

BP=PoP1P2P3

EECS 427 F09 Lecture 8 19

Mu

Idea: If (P0 and P1 and P2 and P3 = 1)then Co3 = Ci,0, else “delete” or “generate”

Carry-Bypass Adder (cont.)

Setup

Bit 0–3

tsetup Setup

Bit 4–7

tbypassSetup

Bit 8–11

Setup

Bit 12–15

Carrypropagation

Sum

M bits

tsum

Carrypropagation

Sum

Carrypropagation

Sum

Carrypropagation

Sum

EECS 427 F09 Lecture 8 20

tadder = tsetup + Mtcarry + (N/M-1)tbypass + (M-1)tcarry + tsum

Inner blocks do not contribute to worst-case delay since they have time to compute while bits 0-3 are propagating (assuming they have a generate or delete)

Page 11: Reminders - EECS · Reminders • HW3 – project ... non-inverting logic ... • Full adder – Mirror adder – Transmission-gate adder – Manchester carry chain • Adder topologies

11

Carry Ripple versus Carry Bypass

tp

ripple adder

bypass adder

EECS 427 F09 Lecture 8 21

N4..8

Carry-Select Adder

Setup

P G

Basic idea: Precompute both

"0" Carry Propagation

"1" Carry Propagation

M lti lC C

"0"

"1"

P,G Precompute both possibilities, choose when Cin available

EECS 427 F09 Lecture 8 22

Multiplexer

Sum Generation

Co,k-1 Co,k+3

Carry Vector

Page 12: Reminders - EECS · Reminders • HW3 – project ... non-inverting logic ... • Full adder – Mirror adder – Transmission-gate adder – Manchester carry chain • Adder topologies

12

Carry Select Adder: Critical Path

Setup

Bit 0–3 Bit 4–7 Bit 8–11 Bit 12–15

Setup Setup Setup

0

1

Multiplexer

1-Carry

0-Carry

Ci,0 Co,3 Co,7 Co,11 Co,15

0

1

Multiplexer

1-Carry

0-Carry 0

1

Multiplexer

1-Carry

0-Carry 0-Carry0

1

Multiplexer

1-Carry

EECS 427 F09 Lecture 8 23

Sum Generation

S0–3

Sum Generation

S4–7

Sum Generation

S8–11

Sum Generation

S12–15

tadd = tsetup + Mtcarry + (N/M)tmux + tsum

Linear Carry Select

S t S t S t S t

Bit 0-3 Bit 4-7 Bit 8-11 Bit 12-15

Setup

"0" Carry

"1" Carry

Multiplexer

"0"

"1"

Setup

"0" Carry

"1" Carry

Multiplexer

"0"

"1"

Setup

"0" Carry

"1" Carry

Multiplexer

"0"

"1"

Setup

"0" Carry

"1" Carry

Multiplexer

"0"

"1"

(1)

(1)

(5)(6) (7) (8)

(5) (5) (5)(5)

EECS 427 F09 Lecture 8 24

Sum Generation Sum Generation Sum Generation Sum Generation

S0-3 S4-7 S8-11 S12-15

Ci,0(9)

(10)

tadd = tsetup + M*tcarry + (N/M)tmux + tsum

Page 13: Reminders - EECS · Reminders • HW3 – project ... non-inverting logic ... • Full adder – Mirror adder – Transmission-gate adder – Manchester carry chain • Adder topologies

13

Square Root Carry Select

Setup Setup Setup Setup

Bit 0-1 Bit 2-4 Bit 5-8 Bit 9-13 Bit 14-19

"0" Carry

"1" Carry

Multiplexer

"0"

"1"

"0" Carry

"1" Carry

Multiplexer

"0"

"1"

"0" Carry

"1" Carry

Multiplexer

"0"

"1"

"0" Carry

"1" Carry

Multiplexer

"0"

"1"

Ci,0

(4) (5) (6) (7)

(1)

(1)

(3) (4) (5) (6)

Mux

(7)

(8)

(3)

EECS 427 F09 Lecture 8 25

Sum Generation Sum Generation Sum Generation Sum Generation

S0-1 S2-4 S5-8 S9-13

Sum

S14-19 (9)

summuxcarrysetupadd ttNMttt 2

Adder Delays - Comparison

Ripple adder40

50

Linear select

Ripple adder

t p(in

uni

t del

ays)

10

20

30

40

EECS 427 F09 Lecture 8 26

Square root select

20 40N

600

10

0

Page 14: Reminders - EECS · Reminders • HW3 – project ... non-inverting logic ... • Full adder – Mirror adder – Transmission-gate adder – Manchester carry chain • Adder topologies

14

Lookahead - Basic Idea

AN-1, BN-1A1, B1 • • •A0, B0

P1PN-1

Ci, N-1P0

Ci,0 Ci,1

EECS 427 F09 Lecture 8 27

Co k f A k Bk Co k 1– Gk PkCo k 1–+= =

S1 • • • SN-1S0

4-bit Lookahead Adder

C G P G P C+ +

Expanding Lookahead equations: VDD

GCo k Gk Pk Gk 1– Pk 1– Co k 2–+ +=

Co k Gk Pk Gk 1– P k 1– P1 G0 P0 Ci 0+ + + +=

All the way:

Co,3

Ci,0

P0

G0

G1

G2

G3

EECS 427 F09 Lecture 8 28

P0

P1

P2

P3

Page 15: Reminders - EECS · Reminders • HW3 – project ... non-inverting logic ... • Full adder – Mirror adder – Transmission-gate adder – Manchester carry chain • Adder topologies

15

Logarithmic Lookahead Adder

A

F

A6AA4A3A2A1

A0

A7A6A5A4A3A2A1

A0

A1

A2

A3

A4

A5

F

tp N

EECS 427 F09 Lecture 8 29

5

A6

A7

tp log2(N)

Carry Lookahead Trees

Co 0 G0 P0Ci 0+=

Co 1 G1 P1 G0 P1P0 Ci 0+ +=

Co 2 G2 P2G1 P2 P1G0 P+ 2 P1P0Ci 0+ +=

G2 P2G1+ = P2P1 G0 P0Ci 0+ + G 2:1 P2:1Co 0+=

Can continue building the tree hierarchically.

EECS 427 F09 Lecture 8 30

In general

Gj:k = Gj + Pj Gj-1:k

Pj:k = Pj Pj-1:k

Page 16: Reminders - EECS · Reminders • HW3 – project ... non-inverting logic ... • Full adder – Mirror adder – Transmission-gate adder – Manchester carry chain • Adder topologies

16

Tree Adder

S0

S1

S2

S3

S4

S5

S6

S7

S8

S9

S10

S11

S12

S13

S14

S15

EECS 427 F09 Lecture 8 31

16-bit radix-2 Kogge-Stone tree

(A0,

B0)

(A1,

B1)

(A2,

B2)

(A3,

B3)

(A4,

B4)

(A5,

B5)

(A6,

B6)

(A7,

B7)

(A8,

B8)

(A9,

B9)

(A10

, B10

)

(A11

, B11

)

(A12

, B12

)

(A13

, B13

)

(A14

, B14

)

(A15

, B15

)

Domino Adder

VDD

VDD

Clk G = a b

Clk Pi= ai + bi

Clk

ai bi

Gi = aibi

Clk

ai

bi

EECS 427 F09 Lecture 8 32

Propagate Generate

Page 17: Reminders - EECS · Reminders • HW3 – project ... non-inverting logic ... • Full adder – Mirror adder – Transmission-gate adder – Manchester carry chain • Adder topologies

17

Domino Adder

VDDVDD

Clkk

Pi:i-k+1

Pi-k:i-2k+1

Pi:i-2k+1

Clkk

Gi:i-k+1

Pi:i-k+1

Gi-k:i-2k+1

Gi:i-2k+1

EECS 427 F09 Lecture 8 33

Propagate Generate

Domino SumVDD

Clk

Sum

VDD

Clkd

Keeper

Gi:0

Clk

Clk

Gi 0

Clkd

Si0

EECS 427 F09 Lecture 8 34

Gi:0

Clk

Si1

Page 18: Reminders - EECS · Reminders • HW3 – project ... non-inverting logic ... • Full adder – Mirror adder – Transmission-gate adder – Manchester carry chain • Adder topologies

18

Tree Adder

S0

S1

S2

S3

S4

S5

S6

S7

S8

S9

S1

0

S1

1

S1

2

S1

3

S1

4

S1

5

0)

1)

2)

3)

4)

5)

6)

7)

8)

9)

0) )

2)

3)

4)

5)

EECS 427 F09 Lecture 8 35

(a0,

b0

(a1,

b1

(a2,

b2

(a3,

b3

(a4,

b4

(a5,

b5

(a6,

b6

(a7,

b7

(a8,

b8

(a9,

b9

(a1

0,

b1

0

(a1

1,

b1

1

(a1

2,

b1

2

(a1

3,

b1

3

(a1

4,

b1

4

(a1

5,

b1

5

16-bit radix-4 Kogge-Stone Tree

Sparse Tree

S1

S3

S5

S7

S9

S1

1

S1

3

S1

5

S0

S2

S4

S6

S8

S1

0

S1

2

S1

4

EECS 427 F09 Lecture 8 36

(a0,

b0)

(a1,

b1)

(a2,

b2)

(a3,

b3)

(a4,

b4)

(a5,

b5)

(a6,

b6)

(a7,

b7)

(a8,

b8)

(a9,

b9)

(a1

0,

b1

0)

(a1

1,

b1

1)

(a1

2,

b1

2)

(a1

3,

b1

3)

(a1

4,

b1

4)

(a1

5,

b1

5)

16-bit radix-2 sparse tree with sparseness of 2

Page 19: Reminders - EECS · Reminders • HW3 – project ... non-inverting logic ... • Full adder – Mirror adder – Transmission-gate adder – Manchester carry chain • Adder topologies

19

Tree Adder

S0

S1

S2

S3

S4

S5

S6

S7

S8

S9

S10

S11

S12

S13

S14

S15

EECS 427 F09 Lecture 8 37

(A0,

B0)

(A1,

B1)

(A2,

B2)

(A3,

B3)

(A4,

B4)

(A5,

B5)

(A6,

B6)

(A7,

B7)

(A8,

B8)

(A9,

B9)

(A10

, B

10)

(A11

, B

11)

(A12

, B

12)

(A13

, B

13)

(A14

, B

14)

(A15

, B

15)

Brent-Kung Tree

Radix 2 vs. Radix 4

• Fanout considerationEasier to drive large fanouts with Radix 2– Easier to drive large fanouts with Radix-2

– Radix-4 has fewer stages and could have speed advantage when driving low fanouts

• Wire length consideration– Radix-4 has longer wires (64 bits: crosses 48 bit

slices vs. 32 in radix-2). Fewer logic stages ) g gprecedes large wireload.

• Logic consideration– Radix-2 has lower stack heights

EECS 427 F09 Lecture 8 38

Page 20: Reminders - EECS · Reminders • HW3 – project ... non-inverting logic ... • Full adder – Mirror adder – Transmission-gate adder – Manchester carry chain • Adder topologies

20

Full vs. Sparse Trees

• Not all the carries are calculated in sparse treesOnly every 2nd 4th etc– Only every 2 d, 4 , etc.

– Reduced (uneven) input capacitance– Fewer transistors and wires– Lower power

• Sparse tree adders need to recover missing carries– Ripple (extra gate delay)

P t ( t f t)

EECS 427 F09 Lecture 8 39

– Precompute (extra fanout)– Complex precomputation can get into the critical path

Overview

• Full adder– Mirror adder – size it carefully– Transmission-gate adder – efficient XOR implementation– Manchester carry chain – long RC chain

• Adder topologies– Ripple carry – simple, small adders– Carry bypass – skip in groups– Carry select – precomputation to shorten the critical path– Carry lookahead – compute carry-in for higher order bits to shorten the critical

path

EECS 427 F09 Lecture 8 40

• Carry look-ahead adder– Kogge-Stone – full tree, regular interconnect, consistent fanout, large area and

high power– Radix 2 or Radix 4 – tradeoff between gate complexity and tree depth– Sparse tree, Brent-Kung – fewer gates, fewer wires, some high-fanout gates

slows down the performance