Data, Array Subsystems
Data, Array Subsystems
UNIT - IV
SUBSYSTEM DESIGN
P.VIDYA SAGAR ( ASSOCIATE PROFESSOR)
Departmentof ElectronicsandCommunicationEngineering,VBIT
CONTENTS
– Example:
1100 : 1210 multiplicand
0101 : 510 multiplier
1100
0000 partial
1100 products
0000
00111100 : 6010 product
– M x N-bit multiplication
– Produce N M-bit partial products
– Sum these to produce M+N-bit product
– Product:
N 1 M 1
M 1 N 1
P y j 2 j xi 2 i xi y j 2 i j
j 0 i0 i0 j0
y5 y4 y3 y2 y1 y0 multiplicand
x5 x4 x3 x2 x1 x0 multiplier
x0y5 x0y4 x0y3 x0y2 x0y1 x0y0
x1y5 x1y4 x1y3 x1y2 x1y1 x1y0
x2y5 x2y4 x2y3 x2y2 x2y1 x2y0 partial
x3y5 x3y4 x3y3 x3y2 x3y1 x3y0 products
x4y5 x4y4 x4y3 x4y2 x4y1 x4y0
x5y5 x5y4 x5y3 x5y2 x5y1 x5y0
p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0 product
x0
partial products
multiplier x
x15
skew array
for rectangular
layout
X3 X2 X1 X0
× Y3 Y2 Y1 Y0
X3Y0 X2Y0 X1Y0 X0Y0
X3Y1 X2Y1 X1Y1 X0Y1
X3Y2 X2Y2 X1Y2 X0Y2
X3Y3 X2Y3 X1Y3 X0Y3
P7 P6 P5 P4 P3 P2 P1 P0
x0
x1
CSA
A rr a y
x2
x3
C PA
p7 p6 p5 p4 p3 p2 p1 p0
A B
S in A C in critical p a t h A B
A B
B S in
= Cout C in = Cout C in
Cout C in
Sout
Cout Sout Sout
Sout
y3 y2 y1 y0
x0
p0
x1
p1
x2
p2
x3
p3
p7 p6 p5 p4
a2 b2 c 2 a1 b1 c 1 a0 b0 c 0
carry-ripple
adder
FA FA FA
s2 s1 s0
a2 b2 c 2 a1 b 1 c 1 a0 b0 c 0
carry-save
FA FA FA adder
z3 y2 z2 y1 z1 y0
n 2 n2 n 2
XY xn1 yn1 2 2n2
xi y j 2 i j
( x n1 yi yn1 xi )2 in1
yi 1 y i
i0 j0 i0
xi 1 xi
2n2 n1
XY (x n1 yn1 xn1 yn1 ) 2 (xn1 yn1 ) 2
n 2n 2 n2
i j
x y 2 i j
n1 i n1 i
( x y y x )2 i n1
xi y j 2 i j
( xn1 yi y n1 xi)2i n1
i0 j0 i0
a Cin P0
x3y1 + x2y1 + x1y1 + x0y1
+ b P1
x3 y3 x3y2 + x2y2 + x1y2 + x0y2
P2
Cout Sum x3y 3 + x2y3 + x1y3 + x0y3 x3
1 +
+ + + + + y3
P7 P6 P5 P4 P3
– Instead of 3Y, try –Y, then increment next partial product to add 4Y
– Similarly, for 2Y, try –2Y + 4Y in next partial product
0 x-1
s ssssssssssssss s ssss x0
s sssssss s PP0
s ssssssssss s ss s
s sssss s PP1
s ssssss ss s
s s s s PP2
multiplier x
s ss s
s s PP3
s
PP4
PP5
PP6
PP7 x15
0 x16
PP8
0 x17
11011
00000 11011
– Use the LSB (least significant bit) and the previous LSB to
determine the arithmetic action.
– If it is the FIRST pass, use 0 as the previous LSB.
– Possible arithmetic actions:
– 00 no arithmetic operation
– 11 no arithmetic operation
– And we added 5 leading zeros to the multiplier to get the beginning product:
00000 11011
00000 11011 0
(Note: Since this is the first pass, we use 0 for the previous LSB)
00000 11011 0
The last two bits are 10, so we need to:
subtract the multiplicand from left half of product
11110 11011 0
– Before ASR
11110 11011 0
– After ASR
11111 01101 1
(left-most bit was 1 , so a 1 was shifted in on the left)
– Pass 1 is complete.
11111 01101 1
11111 01101 1
The last two bits are 1 1 , so we do NOT need to perform an arithmetic action --
just proceed to step 2.
– Before ASR
11111 01101 1
– After ASR
11111 10110 1
(left-most bit was 1 , so a 1 was shifted in on the left)
– Pass 2 is complete.
11111 10110 1
11111 10110 1
The last two bits are 01, so we need to:
00001 10110 1
– Before ASR
00001 10110 1
– After ASR
00000 11011 0
(left-most bit was 0, so a 0 was shifted in on the left)
– Pass 3 is complete.
00000 11011 0
00000 11011 0
The last two bits are 10, so we need to:
subtract the multiplicand from the left half of the product
11110 11011 0
– Before ASR
11110 11011 0
– After ASR
11111 01101 1
(left-most bit was 1 , so a 1 was shifted in on the left)
– Pass 4 is complete.
11111 01101 1
11111 01101 1
The last two bits are 1 1 , so we do NOT need to perform an arithmetic action --
just proceed to step 2.
– Before ASR
11111 01101 1
– After ASR
11111 10110 1
(left-most bit was 1 , so a 1 was shifted in on the left)
– Pass 5 is complete.
11111 10110
– To confirm we have the correct answer, convert the 2's complement final product back to
decimal.
(-5) x 2
Equality comparator: A = B
Magnitude comparator: A<B
A7
A6 A3
A5
A4
A2
allones allzeros
A3 A1
A2
A0
A1
A0
A 7
A 6
A 5
A 4
A 3
allones
A 2
A 1
A 0
B[3]
A[3]
B[2]
A[2] A=B
B[1]
A[1]
B[0]
A[0]
A2 Z
B1 A= B
A1
B0
A0
Logical Shift:
Shifts number left or right and fills with 0’s
1 0 1 1 LSR 1 = 0101 1 0 1 1 LSL1 = 0110
Arithmetic Shift:
Shifts number left or right. Rt shift sign extends
1 0 1 1 ASR1 = 1 1 0 1 1 0 1 1 ASL1 = 0110
Rotate:
Shifts number left or right and fills with lost bits
1 0 1 1 ROR1 = 1 1 0 1 1 0 1 1 ROL1 = 0 1 1 1
• A rotate is a shift in which the bits shifted out are inserted into the positions vacated
• The circuit rotates its contents left from 0 to 3 positions depending on Selector S.
57 Departmentof ElectronicsandCommunicationEngineering,VBIT
58 Departmentof ElectronicsandCommunicationEngineering,VBIT VIDYA SAGAR P
Logarithmic Barrel
Shifter
– Single-bit Addition
– Carry-Ripple Adder
– Carry-Skip Adder
– Carry-Lookahead Adder
– Carry-Select Adder
– Carry Save Adder
A B
Half Adder Full Adder
A B Cout C
S A B C
S A B Cout Cout MAJ ( A, B,C)
S
C out A B S
A B Cout S A B C Cou S
t
0 0 0 0
0 0 0 0 0
0 1 0 1
0 0 1 0 1
1 0 0 1
0 1 0 0 1
1 1 1 0
0 1 1 1 0
1 0 0 0 1
1 0 1 1 0
1 1 0 1 0
1 1 1 1 1
A A
A B B
B S B
C C C
A B B
S
A C C C A
J
MA
B C out
C out
C B
B B C A
A B B
A A
AN...1 BN...1
Cout Cin Cout Cin
00000 11111 carries
Cout Cin 1111 1111 A4...1
+
+0000 +0000 B4...1
1111 0000 S4...1
SN...1
A4 B4 A3 B3 A2 B2 A1 B1
Cout Cin
C3 C2 C1
S4 S3 S2 S1
A4 B4 A3 B3 A2 B2 A1 B1 Cin
1: Bitwise PG logic
G4 P4 G3 P3 G2 P2 G1 P1 G0 P0
2: Group PG logic
C3 C2 C1 C0
3: Sum logic
C4
Cout S4 S3 S2 S1
0 0 0
+ + +
C out C 12 C8 C4
1 1 1 C in
+ + + +
1
1
0
0
S 16:13 S 12:9 S 8:5 S 4:1
– The carry-save adder block is the same circuit as the full adder
The name “carry-save” arises from the fact that we save the carry-out word instead
using it immediately to calculate a final sum.
X4 Y4 Z4 X3 Y3 Z3 X2 Y2 Z2 X1 Y1 Z 1
C4 S 4 C3 S 3 C2 S 2 C1 S 1
n-bit CSA
CN...1 SN...1
The simplest counter circuits can be built using T flip-flops because the toggle feature is
naturally suited for the implementation of the counting operation. Counters are available in
two categories.
1.Asynchronous(Ripple counters) Asynchronous counters, also known as ripple counters,
are not clocked by a common pulse and hence every ip- op in the counter changes at
different times.
EX:- Binary ripple counters, BCD ripple counters
2.Synchronous counters A synchronous counter however, has an internal clock, and the
external event is used to produce a pulse which is synchronized with this internalclock.
E.X.:- Binary counter, Up-down Binary counter, BCD Binary counter, Ring counter, Johnson
Counter.
A 3-bit down-counter
SRAM
DRAM
ROM
Serial Access Memories
Content Addressable Memory
Mask Programmed ROMs -Data is written during chip fabrication using a photo mask
Fused ROMs -Data is written by blowing the fuse electrically, hence cannot be modified later
Programmable Read Only Memories (PROMs) :Data is written after chip fabrication
Erasable PROMs -Complete block is erased using UV light which is penetrated through glass
window
Flash - Programmed using high electrical voltage. Erases data in blocks hence faster
mwords
k = Log2(m) address input signals …
or m = 2 k words
e.g., 4,096 x 8 memory:
n bits perword
32,768 bits
memoryexternalview
1 2 address input signals
r/ w
8 input/output data signals 2k × n read and writememory
enable
Memory access
A0
r/w: selects read or write …
Ak-1
enable: read or write only when asserted
…
multiport: multiple accesses to different locations simultaneously
Qn-1 Q0
…
Store software program for general-purposeprocessor Ak-1
…
Store constant data (parameters) needed bysystem
Implement combinational circuits (e.g.,decoders)
Qn-1 Q0
NOR-basedROM
In order to Read fromthe
array, the Row line is asserted
and the desired Column line
isobserved
a NOR-based ROMis
similar to a HexKeypad
(c)
can be erased and reprogrammed thousands oftimes
Reducedstoragepermanence (d)
programlasts about10yearsbutis susceptibleto radiationand
electric noise,Typically usedduringdesigndevelopment .
clk
Din Dout
8
clk
Sin
P0 P1 P2 P3
P0 P1 P2 P3
shift/load
clk
Sout
b it
w r ite
w r ite _ b
read
read_ b
N1 >> N2
1 .0
w o rd b it
0 .5
A
0 .0
0 100 200 300 400 500 600
time (ps)
bit bit_b
Drive one bitline high, the other low
word
Then turn on wordline P1 P2
Bitlines overpower cell with new value N2 N4
N2 >> P1 bit_b
1.0
0.5
word
0.0
0 100 200 300 400 500 600 700
time (ps)
DRAM store their contents as charge on a capacitor rather than in a feedback loop.
The cell must be periodically read and refreshed so that its contents do not leak away.
Like SRAM accessed by asserting wordline to connect the capacitor to the bitline.
When wordline rises the capacitor shares its charge with the bitline causing a voltage
change that can be sensed.
some DRAMs drive the wordline to Vddp=Vdd+Vt to avoid degraded level when writing a ‘1’.
DRAM capacitor must be physically small as possible to achieve good density.
According to charge-sharing equation the voltage swing on bitline during readout is
adr data/key
read
CAM match
write
01 0 1 1 0 X
01
10 0 1 1 X X
11 1 0 0 1 1
0 1 1 0 1
Content Addressable
Memory