Вы находитесь на странице: 1из 70

Basic Building Blocks 

Amir M. Sodagar 

Spring 2003

Amir M. Sodagar  K.N.Toosi University of Technology  1 
Full Adders, Conv. Static CMOS 
q  Conventional Static CMOS Implementation 

[Martin, 2000]

Amir M. Sodagar  K.N.Toosi University of Technology  2 
Full Adders, TG 
q  Transmission­Gate Implementation 

[Martin, 2000]

Amir M. Sodagar  K.N.Toosi University of Technology  3 
Full Adders, Fully­Diff. 
q  A fully­differential implementation 

[Martin, 2000]

Amir M. Sodagar  K.N.Toosi University of Technology  4 
Full Adders, Fully­Diff. 
q  A fully differential full adder in which the 
carry­in is known to be a “0”. 

[Martin, 2000]

Amir M. Sodagar  K.N.Toosi University of Technology  5 
Full Adders, Manchester 
q  Manchester­type Full Adder 
o  To be effectively used in Carry­Skip Adders 

With non­complemented carry  With complemented carry
[The VLSI Handbook’2000] 

Amir M. Sodagar  K.N.Toosi University of Technology  6 
Adders 
q  Adders 
Ø Serial Adder 
Ø Ripple Carry Adder 
Ø Carry Skip Adder 
Ø Carry Select Adder 
Ø Carry Save Adder 
Ø Carry Look­Ahead Adder 
Ø Conditional Carry Adder

Amir M. Sodagar  K.N.Toosi University of Technology  7 
Adders 
q  Possible symbols for full adders used in the 
proceeding adder architectures. 

[Martin, 2000]

Amir M. Sodagar  K.N.Toosi University of Technology  8 
Adders, Serial 
q  A Serial Adder 

[Martin, 2000]

Amir M. Sodagar  K.N.Toosi University of Technology  9 
Adders, Ripple­Carry 
q  A fast 4­bit ripple­carry adder based on 
using complemented inputs 

[Martin, 2000]

Amir M. Sodagar  K.N.Toosi University of Technology  10 


Adders, Carry­Skip 
q  Carry Skip Adder 

p i =XOR(x i , y i )

[The VLSI Handbook’2000] 

Amir M. Sodagar  K.N.Toosi University of Technology  11 


Adders, Carry­Skip 
q  Carry Skip Adder 
Ø In a ripple carry adder, a carry propagates 
through the i­th FA when p i =XOR(x i , y i )=1. 
Ø A carry skip adder is a ripple carry adder that is 
partitioned into several blocks of FAs, attaching 
a carry skip circuit to each block. 
o A carry skip circuit detects the carry propagation 
condition of the block and lets the carry from the 
next lower block bypass the block when the condition 
holds. 
C h+1 =OR(C j+k , C h .[p j .p j+1 …p j+k­1 ]) 

[Uyemura, 99]

Amir M. Sodagar  K.N.Toosi University of Technology  12 


Adders, Carry­Select 
q  Carry­select adder 
Ø A 5­bit building block 

[Martin, 2000]

Amir M. Sodagar  K.N.Toosi University of Technology  13 


Adders, Carry­Select 
q  Differential realization of 

The multiplexor  The logic required for generating C out

[Martin, 2000] 

Amir M. Sodagar  K.N.Toosi University of Technology  14 


Adders, Conditional­Carry 
q  Conditional­Carry Adder 

[Martin, 2000]

Amir M. Sodagar  K.N.Toosi University of Technology  15 


Adders, Carry­Save 
q  Carry­save adder 
Ø  This technique is important when a number of additions 
are necessary (e.g. a DSP application or an array 
multiplier). 

[Martin, 2000]

Amir M. Sodagar  K.N.Toosi University of Technology  16 


Adders, Carry­Save 
q  Carry­save adder 
Ø  The basic idea is to save the carry propagates until the very last 
addition, where a very fast adder is used that is optimized for fast 
carry propagate speed. 
o  At all levels before the last, the carry­outputs are not rippled through 
the adders. Rather, they are shifted to a more significant position and 
added to the carry­ins of the next adder. 
o  To be specific, consider the carry­out of the i­th bit of an adder. This 
will be sent to the i+1th carry­in of the next adder. 
o  Notice that the top­level carry­outs are shifted right before being 
added into the next stage down. The same is true for the carry­outs at 
the second level down. 
Ø  The critical path for this architecture would be through the two left­ 
most full adders and then the carry propagation through the 
bottom row of full adders. 
o  The delay through this path would normally be minimized through the 
use of techniques such as carry­propagate adders or carry­select 
adders. 

[Martin, 2000]

Amir M. Sodagar  K.N.Toosi University of Technology  17 


Latches 
q  Using two cross­coupled inverters to store a 
logic “0” or “1”. 

[Martin, 2000]

Amir M. Sodagar  K.N.Toosi University of Technology  18 


Latches 
q  A transmission­gate­ 
based latch 

q  A simplified latch 
with hysteresis 

[Martin, 2000]

Amir M. Sodagar  K.N.Toosi University of Technology  19 


Latches 
q  An alternative clocked latch 

[Martin, 2000]

Amir M. Sodagar  K.N.Toosi University of Technology  20 


Latches 
q  A latch based on 
cross­coupled NOR 
gates 

q  A CMOS realization 

[Martin, 2000]

Amir M. Sodagar  K.N.Toosi University of Technology  21 


Latches 
q  A pseudo­NMOS 
biphase latch 

q  A compromise 
biphase latch 

[Martin, 2000]

Amir M. Sodagar  K.N.Toosi University of Technology  22 


Latches 
q  True Single­Phase Clock (TSPC) Latches 

N­block latch  P­block latch

[Uyemura, 99] 

Amir M. Sodagar  K.N.Toosi University of Technology  23 


Latches 
q  Dynamic CMOS latches 
Dynamic latches 
Ø A TG­based realization  must be refreshed 
periodically.

Ø An inverter­based 
realization 

[Martin, 2000] 

Amir M. Sodagar  K.N.Toosi University of Technology  24 


Flip­Flops 
q  SR flip­flop 
Ø Characteristic table 

Ø Master­slave architecture 

[Martin, 2000]

Amir M. Sodagar  K.N.Toosi University of Technology  25 


Flip­Flops 
q  A negative edge­sensitive SR FF 
Ø  When the clock is high, the outputs of AND gates a and b are affected by 
inputs S and R. this has no effect on the NOR­based cross­coupled latch. 
The high clock signal also guarantees that the output of NOR gates e and 
f, and therefore the inputs to the cross­coupled latch are both “0”. 
Ø  When clock goes low, the NOR gates e and f pass the results to the latch. 
A short time later, the delay time through inverters a and b to be exact, 
AND gates a and b are disabled by the output of inverter b going low. 
Ø  Thus, the only time the S and R inputs can pass through to the latch is 
during the negative edge of clock. 

[Martin, 2000]

Amir M. Sodagar  K.N.Toosi University of Technology  26 


Flip­Flops 
q  A master­slave D FF 

[Martin, 2000]

Amir M. Sodagar  K.N.Toosi University of Technology  27 


Flip­Flops 
q  A CMOS D­FF with 
asynchronous 
set/reset and 
output buffers 

[Martin, 2000]

Amir M. Sodagar  K.N.Toosi University of Technology  28 


Flip­Flops 
q  A TG­based master­slave D­FF 

[Martin, 2000]

Amir M. Sodagar  K.N.Toosi University of Technology  29 


Flip­Flops 
q  JK FF 

JK­FF using a D­FF  JK­FF based on cross­coupled 
NOR gates
[Martin, 2000] 

Amir M. Sodagar  K.N.Toosi University of Technology  30 


Flip­Flops 
q  A CMOS JK­FF 

[Martin, 2000]

Amir M. Sodagar  K.N.Toosi University of Technology  31 


Flip­Flops 
q  A TG­based JK­FF 

[Martin, 2000]

Amir M. Sodagar  K.N.Toosi University of Technology  32 


Counters 
Ø  Counters that produce an output signal that is an integer submultiple of an 
input or clock signal are often called dividers. 

q  A ripple counter 
Ø  The maximum input frequency of this counter is constrained only by how 
fast the first flip­flop can toggle. This makes the ripple counter one of the 
fastest available, particularly if a biphase flip­flop is used for the first 
stage. 
Ø  However, the time from when the first flip­flop changes to when the last 
flip­flop has settled can be quite large. 
o  This is because the changes ripple through from flip­flop to flip­flop. 
o  This makes the counter a poor choice for use in synchronous circuits. 

[Martin, 2000]

Amir M. Sodagar  K.N.Toosi University of Technology  33 


Counters 
q  A serial­carry synchronous counter 
Ø  The AND gates are used as a carry­in to each flip­flop. 
o  If all the preceding flip­flops are in “1” state, then the output of 
the AND gate will be one and the next flip­flop will toggle on 
the next activating clock edge. 
Ø  The major speed limitation is the time it takes the signal 
to ripple through the AND gates when all AND gates are 
changing. 

[Martin, 2000]

Amir M. Sodagar  K.N.Toosi University of Technology  34 


Counters 
q  A carry­lookahead synchronous counter 
Ø A separate AND gate is used for generating 
every carry­in. 
o Thus there is only one gate delay from the time the 
clock changes to when all carry­ins are stable, 
although the delay can be moderately large for the 
AND gates having a large fan­in. 

[Martin, 2000]

Amir M. Sodagar  K.N.Toosi University of Technology  35 


Multipliers 
q  Digital Multipliers 
Ø  Unsigned 
o  Sequential Multiplier (Shift­and­Add) 
o  Array Multiplier 
o  Systolic Array Multiplier 
o  Multiplier Based on Wallace Tree 
o  Multiplier Based on Redundant Binary Adder Tree 
o  … 

Ø  Signed 
o  Baugh­Wooley 
o  Booth 
o  Array 
o  …

Amir M. Sodagar  K.N.Toosi University of Technology  36 


Multipliers 
q  Review: Unsigned Multiplication 

0 1 1 1 0 1  multiplicand (29) 
x  1 0 1 0 1 1  multiplier (43) 
­­­­­­­­­­­­­­­­­­­­­­­­ 
0 1 1 1 0 1  partial product 
0 1 1 1 0 1 
•  product = 0 
0 0 0 0 0 0 
•  for i = 0 to n-1 
0 1 1 1 0 1  –  compute partial product 
0 0 0 0 0 0  (AND operation) 
0 1 1 1 0 1  –  left­shift partial product by i 
–  product += partial product 
­­­­­­­­­­­­­­­­­­­­­­­­­­­­ 
1 0 0 1 1 0 1 1 1 1 1  product 
[U of Alabama, 2003]

Amir M. Sodagar  K.N.Toosi University of Technology  37 


Multipliers, Shift & Add 
q  Shift and Add Multiplier 
Ø  for i = 0 to n-1 
o  pp = B × a[0] 
o  P[2n-1:n] += pp  B  multiplicand 
o  P = P >> 1 

pp 

adder 

product P 

multiplier 
[U of Alabama, 2003]

Amir M. Sodagar  K.N.Toosi University of Technology  38 


Multipliers, Array Mult. 
q  A 4x4­bit Array Multiplier 

Critical Path 1 

Critical Path 2

[Martin, 2000] 

Amir M. Sodagar  K.N.Toosi University of Technology  39 


Multipliers, Array Mult. 
q  A 6x6­bit Array Multiplier
q  Adders a0­f0 
may be eliminated => 
this eliminates adders a1­a6 
q  Complexity: 
CSA ­ 5x6 adders 
A 5  (including 5 half adders) 
CPA – 6 adders (2 HAs) 
B 0 
q  Delay: 
B 1  proportional to n + 
delay of CPA (f6 – b6) 
q  How to improve 
performance? 
Ø  decrease the number of 
partial products 
Ø  improve the speed of the 
addition of the partial 
products 

Amir M. Sodagar  K.N.Toosi University of Technology  40 


Multipliers, Array Mult. 
q  A 6x6­bit Array Multiplier 
X6  X5  X4  X3  X2  X1 

Y1 

P1 
Y2
+  +  +  +  + 

P2 
Y3 
+  +  +  +  + 

P3
Y4 
+  +  +  +  + 

P4 
Y5 
+  +  +  +  + 

P5 
Y6 
+  +  +  +  + 

P6 

+  +  +  +  + 

C P11  P10  P9  P8  P7 

Amir M. Sodagar  K.N.Toosi University of Technology  41 


Pipelining 
q  Basic Concept 
Ø Parallel Adder 
A  B 

C in  C out
FA  FA  FA 


Amir M. Sodagar  K.N.Toosi University of Technology  42 
Pipelining 
q  Basic Concept  A 2  B 2 
Ø Pipelined Adder 
A 1  B 1  D  D 

A 0  B 0  D  D  D  D 
C in  C out 
FA  D  FA  D  FA  D 

D  D  D 

D  D  S 2

D  S 1 

S 0 
Amir M. Sodagar  K.N.Toosi University of Technology  43 
Pipelining 
q  Basic Concept  0  0 
A 2  1  B 2  0 


Ø Pipelined Adder  1  1 
A 1  0  B 1  1  D  D 
1  1 
0  0 
A 0  0  B 0  1  D  D  D  D 
1  0 
0 1 0  0 
C in  FA  D  FA  D  FA  D  C 
1  out 

D  D  D 
S 2 
D  D 
S 1  A=110, 001, 010 
D  T1   T2    T3   T4    T5   T6    T7
B=011, 110, 010 
S 0  f
C in =0, 1, 0 
Amir M. Sodagar  K.N.Toosi University of Technology  44 
Pipelining 
q  Basic Concept 
A 2  0  B 2  0 


Ø Pipelined Adder 
A 1  1  B  1  D  D 
0  1  1  0  1 

A 0  0  B  0  D  D  D  D 
0  0  1  1  1 
0 1  1  0  1 
C in  FA  D  FA  D  FA  D  C 
0  0  out 

D  D  D 

S 2 
D  D 
S 1  A=110, 001, 010 
D  T1   T2    T3   T4    T5   T6    T7
B=011, 110, 010 
S 0  f
C in =0, 1, 0 
Amir M. Sodagar  K.N.Toosi University of Technology  45 
Pipelining 
q  Basic Concept 
A 2  B 2  0 

Ø Pipelined Adder 
A 1  1  B 1  1  D  D 
1  0 

A 0  0  B 0  0  D  D  D  D 
0  1  0  1 
0  0  1  1 
C in  FA  D  FA  D  1  FA  1 
D  C 
0  0  0  out 

D  D  D 
0  0 
S 2 
D  D 

S 1  A=110, 001, 010 
D  T1   T2    T3   T4    T5   T6    T7
B=011, 110, 010 
S 0  f
C in =0, 1, 0 
Amir M. Sodagar  K.N.Toosi University of Technology  46 
Pipelining 
q  Basic Concept 
A 2  B 2 
Ø Pipelined Adder 
A 1  B 1  D  D 
0  0 

A 0  B 0  D  D  D  D 
1  1  1  0 
0  1  1  1 
C in  FA  D  FA  D  FA  D 1  C 
0  0  out 

D  D  D 
0  0 
S 2  0 
D  D 

S 1  0  A=110, 001, 010 
D  T1   T2    T3   T4    T5   T6    T7
1  B=011, 110, 010 
S 0  f
C in =0, 1, 0 
Amir M. Sodagar  K.N.Toosi University of Technology  47 
Pipelining 
q  Basic Concept 
A 2  B 2 
Ø Pipelined Adder 
A 1  B 1  D  D 

A 0  B 0  D  D  D  D 
0  0 
1  0  1 1 
C in  FA  D  FA  D  FA  D  C 
1  out 

D  D  D 
0  0 
S 2  0 
D  D 
0  0 
S 1  0  A=110, 001, 010 
D  T1   T2    T3   T4    T5   T6    T7
0  B=011, 110, 010 
S 0  1  f
C in =0, 1, 0 
Amir M. Sodagar  K.N.Toosi University of Technology  48 
Pipelining 
q  Basic Concept 
A 2  B 2 
Ø Pipelined Adder 
A 1  B 1  D  D 

A 0  B 0  D  D  D  D 
0 1 1 
C in  FA  D  FA  D  FA  D  C 
out 

D  D  D 

S 2  0 
D  D  0 

S 1  0  A=110, 001, 010 
D  0 
T1   T2    T3   T4    T5   T6    T7
0  B=011, 110, 010 
S 0  0  f
1  C in =0, 1, 0 
Amir M. Sodagar  K.N.Toosi University of Technology  49 
Multipliers, Pipelined Array Mult. 
x4  x3 

Pipelined 
y4  y3  y2  y1  x2  x1 

Array 
Multiplier 
+  0 

+  +  0 

+  +  +  0 

+  + 

p8  p7  p6  p5  p4  p3  p2  p1

Amir M. Sodagar  K.N.Toosi University of Technology  50 


Multipliers, Pipelined Array Mult. 
q  Pipelined 
Array 
Multiplier

Amir M. Sodagar  K.N.Toosi University of Technology  51 


Multipliers, Wallace Tree 
q  Wallace­Tree Multiplier 

[The VLSI Handbook’2000]

Amir M. Sodagar  K.N.Toosi University of Technology  52 


PLAs 
q  Programmable 
Logic Arrays 
(PLAs), 
Simplified 
Architecture 

OR  AND 
Program  Program 
Cell Cell 
[Geiger, Allen, Stradr, 1990] 

Amir M. Sodagar  K.N.Toosi University of Technology  53 


PLAs 
q  Programmable Logic Arrays (PLAs) 
Ø A NOR­NOR PLA architecture 

[Martin, 2000]

Amir M. Sodagar  K.N.Toosi University of Technology  54 


PLAs 
q  Programmable Logic Arrays (PLAs) 
Ø  A pseudo­NMOS OR­AND or equivalently NOR­NOR PLA 

[Martin, 2000]

Amir M. Sodagar  K.N.Toosi University of Technology  55 


Multiplexors 
q  An inverted­tree multiplexor 
Ø  A pseudo­NMOS load pulls the 
internal nodes high 
Ø  This load can be replaced 
by a dynamic load. 
Ø  The output inverter also serves 
as a buffer. 

[Martin, 2000]

Amir M. Sodagar  K.N.Toosi University of Technology  56 


Multiplexors 
q  Realizing a multiplexor using two levels of NOR gates 

This circuit can be laid out very densely 
using a programmable logic array (PLA)­ 
like layout.

[Martin, 2000] 

Amir M. Sodagar  K.N.Toosi University of Technology  57 


Multiplexors 
q  A PLA­like implementation of the circuit 
Ø  There are fewer NMOSs in series between any node and ground. 
o  Increases the speed, 
o  Allows the transistors to be taken with smaller widths => saving on area. 
Ø  A modern design might have the pseudo­NMOS loads replaced with dynamic loads. 

[Martin, 2000]

Amir M. Sodagar  K.N.Toosi University of Technology  58 


Multiplexors 
q  Another possibility for a multiplexor 
Ø  Combination of a PLA­like structure and N­channel 
transmission gates 

[Martin, 2000]

Amir M. Sodagar  K.N.Toosi University of Technology  59 


Multiplexors 
q  A bipolar current­mode multiplexor 
Must be connected to Vcc.

[Martin, 2000] 

Amir M. Sodagar  K.N.Toosi University of Technology  60 


Decoders 
q  A 3­to 1­of­8 decoder based on a tree structure 
Ø  In addition to not requiring many transistors, the output 
inverters can be taken wider and can therefore drive 
larger loads. 

[Martin, 2000]

Amir M. Sodagar  K.N.Toosi University of Technology  61 


Decoders 
q  A two­level approach for realizing a 6­to 1­of­64 decoder 
Ø  When realizing decoders having more than 8 outputs, a two­level approach 
is usually taken. 
Ø  Latches might be added to the output of the first­level decoders in order to 
pipeline the circuits when latent time delay is not a problem and large 
throughput is desired. 

A 4­input inverting decoder

[Martin, 2000] 

Amir M. Sodagar  K.N.Toosi University of Technology  62 


Combinational Shifters 
q  Binary Shifter 
Right  nop  Left 

A i  B i 

A i­1  B i­1 

Bit­Slice i 

...

Amir M. Sodagar  K.N.Toosi University of Technology  63 


Combinational Shifters 
q  Barrel Shifter 
Ø  A barrel shifter is a circuit that will shift the contents of a bus a 
specified number of positions left or right as specified by a control 
word. 
o  Normally, when shifting to the right, the positions vacated will be filled 
with values from the left, or if no values are available, then filled with 
0s. 
o  Alternatively, when no values are available, the vacated positions may 
be filled with the value of the most significant digit (i.e., the most left 
digit). 
o  As a third alternative, some shifters may actually rotate the contents of 
a bus filling the least significant bits with the previous contents of of 
the most significant bits for a shift left and vice versa for a shift right. 
o  The actual functionality is application dependent. 
Ø  A barrel shifter 
o  essentially consists of a number of multiplexors, one for each bit of the 
bus. 
o  normally contains a decoder as well that is used to supply the 
necessary control bits to the multiplexors. 
[Martin, 2000]

Amir M. Sodagar  K.N.Toosi University of Technology  64 


Combinational Shifters 
q  Barrel Shifter 
Ø  A 4­bit barrel shifter with a programmable shift of 0 to 3 bits. 
o  The LSBs are rotated into vacated most­significant positions. 

(MSB) 
(MSB) 

(LSB) 
(LSB)
[Martin, 2000] 

Amir M. Sodagar  K.N.Toosi University of Technology  65 


Combinational Shifters 
q  Barrel Shifter 
Ø  Operation: No shift 

1  0       0        0 

(MSB) 
(MSB) 
0  1  0        0 

0        0  1  0 

0        0       0  1
(LSB) 
(LSB) 
[Martin, 2000] 

Amir M. Sodagar  K.N.Toosi University of Technology  66 


Combinational Shifters 
q  Barrel Shifter, A different view 
A 3 
B 3 

Sh1 
A 2 
B 2 

Sh2  : Data Wire
A 1 
B 1  : Control Wire 

Sh3 
A 0 
B 0 

Sh0  Sh1  Sh2  Sh3 

Amir M. Sodagar  K.N.Toosi University of Technology  67 


Combinational Shifters 
q  Barrel Shifter, Layout 
Ø Area is dominated by wiring 

A 3 

A 2 

A 1 

A 0

Sh0  Sh 1  S h2  Sh3 


B uffer 
Amir M. Sodagar  K.N.Toosi University of Technology  68 
Combinational Shifters 
q  Barrel Shifter 
Ø  A modified architecture 
o  The vacated bits are filled with the MSB of the input 

[Martin, 2000]

Amir M. Sodagar  K.N.Toosi University of Technology  69 


Combinational Shifters 
q  Barrel Shifter 
Ø  In the 4­bit examples just presented, each output bus is 
the equivalent of a 4­bit NOR gate. If this approach was 
used for a 32­bit barrel shifter, the junction capacitance 
on each line would be excessively large. 
Ø  For larger barrel shifters, a multistage approach is 
necessary, similar to what has been described for 
decoders. 
o  For example, assume a bus has 32 bits. Then a five­stage 
approach might be adopted. 
§  The first stage would shift the input either left by 1 bit, right by 1 
bit, or leave it unshifted. 
§  The second stage would shift its input either left by 2 bits, right by 
2 bit, or leave it unshifted. 
§  And so on for the third to the fifth stages. 
§  The combination of all five stages would allow a shift left or right 
by any integer between 0 and 31. 
[Martin, 2000]

Amir M. Sodagar  K.N.Toosi University of Technology  70 

Вам также может понравиться