SlideShare a Scribd company logo
1 of 115
04/15/17 Kishore Prabhala, Digital Design 1
Digital Design and EDA
Tools
Kishore Prabhala
Director,
VLSI Design Centre,
PSK Research Foundation
Opposite Acharya Nagarjuna University Mens
Hostel
Nagarjuna Nagar – 522 510
prabhalakishore@gmail.com
04/15/17 Kishore Prabhala, Digital Design 2
Digital Systems
 Integrated Circuits (ICs): Combinational
logic circuits, memory elements,
analog interfaces
 Printed Circuits (PC) boards: substrate for ICs
and interconnection, distribution of CLK, Vdd,
and GND signals, heat dissipation
 Power Supplies: Converts line AC voltage to regulated
DC low voltage levels
 Chassis (rack, card case, ...)
 1-25 conductive layers: holds boards, power supply,
fans, provides physical interface to user or other systems
 Connectors and Cables
04/15/17 Kishore Prabhala, Digital Design 3
Integrated Circuits
 Primarily Crystalline Silicon
 1mm - 25mm on a side
 200 - 400M effective transistors
 (50 - 75M “logic gates")
 3 - 10 conductive layers
 2007 feature size ~ 65nm = 0.065 x 10-
6
m
45nm coming on line
 “CMOS” most common -
complementary metal oxide
semiconductor
 Package provides:
 Spreading of chip-level signal paths
to board-level
 Heat dissipation.
 Ceramic or plastic with gold wires
Chip in Package
04/15/17 Kishore Prabhala, Digital Design 4
Printed Circuit Boards
 Fiberglass or
ceramic
 1-20in on a side
 IC packages are
soldered down
04/15/17 Kishore Prabhala, Digital Design 5
Integrated Circuits
Moore’s Law has fueled
innovation for the last 3 decades,
“Number of transistors on a die
doubles every 18 months”
04/15/17 Kishore Prabhala, Digital Design 6
Integrated Circuits
Uses for Digital IC technology today:
 Standard Microprocessors
 Used in desktop PCs, and embedded applications (ex: automotive)
 Simple system design (mostly software development)
 Memory chips (DRAM, SRAM)
 Application specific ICs (ASICs)
 custom designed to match particular application
 can be optimized for low-power, low-cost, high-performance
 high-design cost / relatively low manufacturing cost
 Field programmable logic devices (FPGAs, CPLDs)
 customized to particular application after fabrication
 short time to market, relatively high part cost
 Standardized low-density components
 still manufactured for compatibility with older system designs
04/15/17 Kishore Prabhala, Digital Design 7
Digital vs. Analog Waveforms
Analog:
values vary over a broad range
continuously
Digital:
only assumes discrete values
+5
V
–5
Time
+5
V
–5
1 0 1
Time
04/15/17 Kishore Prabhala, Digital Design 8
Logic Circuits
Truth
Table
Logic
Expression
Gate
Symbol
Logic
Function
Inverter AND OR EX-OR
A X X X X
A A A
BBB
X = A X = AB X = A + B X = A + B
A X
0 1
01
A X
0
0
1
1
0
0
01
1 1
0
0
B A X
0
1
1
1
0
0
01
1 1
0
1
B A X
0
1
0
1
0
0
01
1 1
0
1
B
04/15/17 Kishore Prabhala, Digital Design 9
MOS Transistor-level Logic Circuits
 MOSFET (Metal Oxide
Semiconductor Field Effect
Transistor), nMOS, pMOS and CMOS
The gate acts like a capacitor. A
high voltage on the gate
attracts charge into the
channel. If a voltage exists
between the source and drain
a current will flow. In its
simplest approximation, the
device acts like a switch. pMOS
nMOS
04/15/17 Kishore Prabhala, Digital Design 10
CMOS Logic Gates
Inverter (NOT
gate)
NAND
BAY •=
NOR
AY =
BAY +=
04/15/17 Kishore Prabhala, Digital Design 11
Logic and Layout: Inverter with VLSI
Stick Diagram
OutIn
VDD
M2
M1
04/15/17 Kishore Prabhala, Digital Design 12
Logic and Layout: NAND Gate with
VLSI Stick Diagram
B
VDD
A
04/15/17 Kishore Prabhala, Digital Design 13
Properties of Complementary CMOS
Gates
 High noise margins: Vih, Voh, Vdd,
Gnd
 No static power consumption
from Vdd to Ground in a steady
state
 Delay a function of load
capacitance and transistor
resistance
 Dynamic CMOS - relies on
temporary storage of signal
values on the capacitance of
04/15/17 Kishore Prabhala, Digital Design 14
CMOS Delay Model
CL
B
Rn
A
Rp
B
Rp
A
Rn
Cint
B
Rp
A
Rp
A
Rn
B
Rn CL
Cint
NAND2
A
ReqA
A
Rp
A
Rp
A
Rn CL
INV NOR2
04/15/17 Kishore Prabhala, Digital Design 15
Input Pattern Effects on Delay
 Delay is dependent on
the pattern of inputs
 Low to high transition
 both inputs go low
 delay is 0.69 Rp/2 CL
 one input goes low
 delay is 0.69 Rp CL
 High to low transition
 both inputs go high
 delay is 0.69 2Rn CL
CL
B
Rn
A
Rp
B
Rp
A
Rn Cint
Rise and Fall times of output is a
key based on load
04/15/17 Kishore Prabhala, Digital Design 16
Delay Dependence on Input Patterns
-0.5
0
0.5
1
1.5
2
2.5
3
0 100 200 300 400
A=B=1→0
A=1, B=1→0
A=1 →0, B=1
time [ps]
Voltage[V]
Input Data
Pattern
Delay
(psec)
A=B=0→1 67
A=1,
B=0→1
64
A= 0→1,
B=1
61
A=B=1→0 45
A=1,
B=1→0
80
A= 1→0,
B=1
81NMOS = 0.5µm/0.25 µm
PMOS = 0.75µm/0.25 µm
CL = 100 fF
Rise and Fall times of output is
a key based on load
04/15/17 Kishore Prabhala, Digital Design 17
Fan-In Considerations in CMOS
DCBA
D
C
B
A
C3
C2
C1
Distributed RC model
(Elmore delay)
tpHL = 0.69 Reqn(C1+2C2+3C3+4CL)
Propagation delay deteriorates
rapidly as a function of fan-in –
quadratically in the worst case.
04/15/17 Kishore Prabhala, Digital Design 18
Complex CMOS Gate
OUT = D + A • (B + C)
D
A
B C
D
A
B
C
04/15/17 Kishore Prabhala, Digital Design 19
Decoders
 A decoder is a combinational digital circuit
with a number of inputs ‘n’ and a number
of outputs ‘m’, where m= 2n
 Only one of the outputs is enabled at a
time. The output enabled is the one
specified by the binary number formed at
the inputs of the decoder.
 On the circuit below, the inputs of the
decoder are connected on three switches,
forming the number 5 [(101)2], thus only
LED #5 will be ON
04/15/17 Kishore Prabhala, Digital Design 20
Decoders digram
0
1
0
1
0
1 0 1 2 3 4 5 6 7
0 1 0 10 1
A 2
Y 2
A 0
Y 0
Y 1
Y 3
3/8DEC.
Y 6
Y 4
Y 5
Y 7
A 1
04/15/17 Kishore Prabhala, Digital Design 21
1-to-2 Decoder1-to-2 Decoder
 Truth table shown at right
 This one can be implemented
by just a simple fan-out and
an inverter:
x y0 y1
0 1 0
1 0 1
x
y1
y0
Circuit schematic
Icon
x
y1
y0
04/15/17 Kishore Prabhala, Digital Design 22
2 to 4 Decoder – Truth Table
 2 to 4 decoder
X1 X0 Y0 Y1 Y2 Y3
0 0 1 0 0 0
0 1 0 1 0 0
1 0 0 0 1 0
1 1 0 0 0 1
04/15/17 Kishore Prabhala, Digital Design 23
2 to 4 Decoder Equations with Logic
0 1 0
1 1 0
2 1 0
3 1 0
Y X X
Y X X
Y X X
Y X X
=
=
=
=
04/15/17 Kishore Prabhala, Digital Design 24
3 to 8 Decoder – Truth Table
x2 x1 x0 y0 y1 y2 y3 y4 y5 y6 y7
0 0 0 1 0 0 0 0 0 0 0
0 0 1 0 1 0 0 0 0 0 0
0 1 0 0 0 1 0 0 0 0 0
0 1 1 0 0 0 1 0 0 0 0
1 0 0 0 0 0 0 1 0 0 0
1 0 1 0 0 0 0 0 1 0 0
1 1 0 0 0 0 0 0 0 1 0
1 1 1 0 0 0 0 0 0 0 1
04/15/17 Kishore Prabhala, Digital Design 25
3 to 8 Decoder Equations & Logic
0 2 1 0
1 2 1 0
2 2 1 0
3 2 1 0
Y X X X
Y X X X
Y X X X
Y X X X
=
=
=
=
4 2 1 0
5 2 1 0
6 2 1 0
7 2 1 0
Y X X X
Y X X X
Y X X X
Y X X X
=
=
=
=
04/15/17 Kishore Prabhala, Digital Design 26
Encoders
 Opposite of a decoder
 2n
to n encoder
 2n
inputs
 n outputs
 For each input, the circuit will
produce an “encoded” output
04/15/17 Kishore Prabhala, Digital Design 27
Example: 4 to 2 Binary Encoder
Truth Table
X3 X2 X1 X0 Y1 Y0
0 0 0 1 0 0
0 0 1 0 0 1
0 1 0 0 1 0
1 0 0 0 1 1
Assume only one input high at a time!!
0 1 3
1 2 3
Y X X
Y X X
= +
= +
04/15/17 Kishore Prabhala, Digital Design 28
Multiplexer(MUX)/Data Selector
 N to 1 multiplexer (or multiplexor)
 N=2k
data input lines, D0..(N−1)
 k=log2(N) control inputs, S(k−1)..0
 Binary encoding of index of selected data
 One output:
 This circuit will “connect” just the selected
input to the output.
 The selected input is specified by decoding the
control inputs.
( 1)..0kSF D −
=
04/15/17 Kishore Prabhala, Digital Design 29
The Simplest MultiplexerThe Simplest Multiplexer
 2-to-1 multiplexer truth table
 Output is a copy of
 D0 if S0=0
 D1 if S0=1
D0 D1 S0 F
D0 d 0 D0
d D1 1 D1
VCC
D[0..1] INPUT
2
2
2
and2_2b
inst1
2
or2_bus
inst2
FOUTPUT
VCC
S[0] INPUT
x y[0..1]
decoder_1-to-2
inst
D[0..1]
S[0]
F
mux_2-to-1
inst
example 2-to-1
MUX Icon
Schematic,
using 1-to-2
Decoder module
04/15/17 Kishore Prabhala, Digital Design 30
Example: 4 to 1 MUX Truth Table
D0 D1 D2 D3 S1 S0 F
D0 d d d 0 0 D0
d D1 d d 0 1 D1
d d D2 d 1 0 D2
d d d D3 1 1 D3
d = don’t care / Di = data on input i
Data Inputs
Control
Inputs
Output
04/15/17 Kishore Prabhala, Digital Design 31
4 to 1 MUX Equation
0 1 2 3F D AB D AB D AB D AB= + + +
2x4 Decoder Only a single AND gate will
be “ON” at a time.
Output
Control Inputs
Data Inputs
04/15/17 Kishore Prabhala, Digital Design 32
4-to-1 MUX from three4-to-1 MUX from three
2-to-1 MUXes2-to-1 MUXes
 Try building some larger sizes for yourself…
D[0..1]
S[0]
F
mux_2-to-1
inst
D[0..1]
S[0]
F
mux_2-to-1
inst1
D[0..1]
S[0]
F
mux_2-to-1
inst2
VCC
D[0..3] INPUT
VCC
S[1..0] INPUT
S[0]
FOUTPUT
F[0]
F[1]
S[1]
F[0..1]
D[2..3]
D[0..1]
D[0..3]
04/15/17 Kishore Prabhala, Digital Design 33
Logic with multiplexers
 You can implement any n-input logic
function with a single 2n
-to-1 multiplexer,
by feeding appropriate constants into the
MUX’s data inputs.
 Namely, the list of the function’s output values
from its truth table
 The multiplexer implements a “lookup
table”
 it simply looks up the function result from the
indicated row of the truth table
 Of course, this is generally not the most
hardware-efficient way to implement a
given function.
04/15/17 Kishore Prabhala, Digital Design 34
MUX Application Example
 Using a 4x1 MUX, design a logic
circuit which implements:
Y a b= ⊕
We have,
Y
0 1 2 3Y D AB D AB D AB D AB= + + +
04/15/17 Kishore Prabhala, Digital Design 35
Example
 Using a 4x1 MUX, design a logic
circuit which implements:
Y a b= ⊕
a b Y Dn
0 0 0 D0
0 1 1 D1
1 0 1 D2
1 1 0 D3
0 1 1 0Y AB AB AB AB AB AB= + + + = +
04/15/17 Kishore Prabhala, Digital Design 36
Solution
04/15/17 Kishore Prabhala, Digital Design 37
Multi-bit Multiplexers
 J-bit nx1 mux
sel
d0
d1
…
dn-1
d2 F
J bits
deep
log2n
J bits
deep
[ ] [ ]
0
j
i i
i
F j D j m
=
= ∑
j=0 to 3
This is just J separate nx1 multiplexers
04/15/17 Kishore Prabhala, Digital Design 38
Example: 1 to 4 DeMUX Truth Table
D A B F0 F1 F2 F3
D 0 0 D 0 0 0
D 0 1 0 D 0 0
D 1 0 0 0 D 0
D 1 1 0 0 0 D
d = don’t care / Di = data on input i
04/15/17 Kishore Prabhala, Digital Design 39
CMOS Transmission Gate
 Transmission gates are the
way to build “switches” in
CMOS
 In general, both transistor
types are needed:
 nFET to pass zeros
 pFET to pass ones
 The transmission gate is bi-
directional (unlike logic
gates)
A B
C
C
A B
C
C
04/15/17 Kishore Prabhala, Digital Design 40
Transmission Gate XOR
A
B
F
B
A
B
B
M1
M2
M3/M4
04/15/17 Kishore Prabhala, Digital Design 41
Pass-Transistor Based Multiplexer
A
M2
M1
B
S
S
S F
VDD
04/15/17 Kishore Prabhala, Digital Design 42
4-to-1 Multiplexer
 This version has
less delay from in
to out
 Care must be
taken to avoid
turning on multiple
paths
simultaneously
(shorting together
the inputs)
36 Transistors
04/15/17 Kishore Prabhala, Digital Design 43
4-to-1 Multiplexer
 The series
connection of
pass-
transistors in
each branch
effectively
forms the AND
of s1 and s0 (or
their
complement)
 20
transistors
04/15/17 Kishore Prabhala, Digital Design 44
CMOS Sequential Latch & Flip Flop
 Positive Level-sensitive
latch:
 Latch Transistor
Level:
clk’
clk
clk
clk’
Positive Edge-triggered
flip-flop built from two
level-sensitive latches:
04/15/17 Kishore Prabhala, Digital Design 45
Two Phase Non-Overlapping Clocking
Combinational
Logic
R
E
G
R
E
G
In Out
State
P1 P2
CLK
P1
P2
1/2 Register 1/2 Register
04/15/17 Kishore Prabhala, Digital Design 46
Verilog Structural description exampleVerilog Structural description example
04/15/17 Kishore Prabhala, Digital Design 47
module gates (o,i0,i1,i2,i3);
output o;
input i0,i1,i2,i3;
wire s1, s2;
and (s1, i0, i1);
and (s2, i2, i3);
and (o, s1, s2);
endmodule
i0
i1
i2
i3
Output
S1
S2
Verilog Structural description exampleVerilog Structural description example
04/15/17 Kishore Prabhala, Digital Design 48
Combinational circuit descriptionCombinational circuit description
modulemodule gates (d, a, c);gates (d, a, c);
outputoutput d;d;
inputinput a, c;a, c;
////wirewire b;b;
assignassign d = c ^ (~a);d = c ^ (~a);
//// assignassign b = ~a;b = ~a;
//// assignassign d = c ^ b;d = c ^ b;
endmoduleendmodule
a
b
c
d
04/15/17 Kishore Prabhala, Digital Design 49
Case Study of a Simple Logic Design:
Seven Segment Display
L1
L
6
L2
L3
L
7
L
4
L
5
04/15/17 Kishore Prabhala, Digital Design 50
Case Study
B3 B2 B1 B0 Val L1 L2 L3 L4 L5 L6 L7
0 0 0 0 0 1 0 1 1 1 1 1
0 0 0 1 1 0 0 0 0 0 1 1
0 0 1 0 2 1 1 1 0 1 1 0
0 0 1 1 3 1 1 1 0 0 1 1
0 1 0 0 4 0 1 0 1 0 1 1
0 1 0 1 5 1 1 1 1 0 0 1
0 1 1 0 6 1 1 1 1 1 0 1
0 1 1 1 7 1 0 0 0 0 1 1
1 0 0 0 8 1 1 1 1 1 1 1
1 0 0 1 9 1 1 1 1 0 1 1
L1
L
6
L2
L3
L
7
L
4
L
5
04/15/17 Kishore Prabhala, Digital Design 51
Case Study (cont.)
Some gate level implementation
of the Boolean function for L4
04/15/17 Kishore Prabhala, Digital Design 52
Basic Arithmetic Elements
Half Adder
04/15/17 Kishore Prabhala, Digital Design 53
Half Adder-Truth Table
 S=A+B (arithmetic sum)
A B S1 S0
0 0 0 0
0 1 0 1
1 0 0 1
1 1 1 0
0S a b= ⊕
1S ab=
04/15/17 Kishore Prabhala, Digital Design 54
Half Adder Circuit
04/15/17 Kishore Prabhala, Digital Design 55
Full Adder-Truth Table
 S=A+B+C
(arithmetic sum)
A B C S1 S0
0 0 0 0 0
0 0 1 0 1
0 1 0 0 1
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
0S a b c= ⊕ ⊕
1S ab ac bc= + +
04/15/17 Kishore Prabhala, Digital Design 56
Full Adder equations and Logic
0S a b c= ⊕ ⊕
Cout = ab + ac + bc or ab + (a⊕b
04/15/17 Kishore Prabhala, Digital Design 57
17
AND2 18
OR2
19 coutOUTPUT
16
AND2
VCC14 Cin INPUT
VCC13 B INPUT
10
XOR
11
XOR
15 sumOUTPUT
VCC12 A INPUT
Synthesis
Full Adder Circuit
S(0)
S(1)
C
A
B
S(0)
S(1)
Simulation
04/15/17 Kishore Prabhala, Digital Design 58
Full Adder from Two Half AddersFull Adder from Two Half Adders
 Given bits a,b,c, computes (s1s0)2 = a + b + c.
 Can build it using two half adders to compute the
low-order bit of the sum as s0 = (a⊕b)⊕c.
 Plus an extra OR gate needed to combine the carries.
04/15/17 Kishore Prabhala, Digital Design 59
Full Adder DesignFull Adder Design
VDD
VDD
VDD
VDD
A B
Ci
S
Co
X
B
A
Ci A
BBA
Ci
A B Ci
Ci
B
A
Ci
A
B
BA
Co = AB + Ci(A+B)
28 transistors
04/15/17 Kishore Prabhala, Digital Design 60
Full Adder Design with less transistorsFull Adder Design with less transistors
VDD
Ci
A
BBA
B
A
A B
Kill
Generate
"1"-Propagate
"0"-Propagate
VDD
Ci
A B Ci
Ci
B
A
Ci
A
BBA
VDD
S
Co
24 transistors
04/15/17 Kishore Prabhala, Digital Design 61
Conceptualization
 4-bit adder (worst case)
1111
1111
11110
111
For the “worst case” we need to add
three bits to generate a single output bit
with a possible carry out.
Can we use our single bit adder for this?
04/15/17 Kishore Prabhala, Digital Design 62
Ripple Carry Adder
 We can cascade several full adders
to create a ripple carry adder
 The circuit gets its name because
the carry bit “ripples” from one bit
position to the next
04/15/17 Kishore Prabhala, Digital Design 63
Four Bit “Ripple” Adder
1-BitF.A.
C out S um
A B C in
1-BitF.A.
C out S um
A B C in
1-BitF.A.
C out S um
A B C in
1-BitF.A.
C out S um
A B C in
A 3 B 3 A 0 B 0A 2 B 2 A 1 B 1
0
S 3 S 2 S 1 S 0
C out
04/15/17 Kishore Prabhala, Digital Design 64
8-bit Ripple Carry Adder
 Use two 4-bit adders
04/15/17 Kishore Prabhala, Digital Design 65
16-bit Ripple Carry Adder
 Use two 8-bit adders
04/15/17 Kishore Prabhala, Digital Design 66
Subtraction Circuit
 Calculate 2’s complement of B
 Add –B to A
( ) 1S A B A B A B= − = + − = + +
B
1+
1S A B= + +
04/15/17 Kishore Prabhala, Digital Design 67
Add/Sub Circuit Module
04/15/17 Kishore Prabhala, Digital Design 68
Function Table for Add/Sub Module
Add Functional
Result
0 S=A+B
1 S=A-B
Add is a control input. It is active low. This means
that the module will compute A+B when Add=0. It
will compute A-B when Add=1.
04/15/17 Kishore Prabhala, Digital Design 69
Add/Sub Circuit
Design using Modules
04/15/17 Kishore Prabhala, Digital Design 70
Add/Sub Circuit
04/15/17 Kishore Prabhala, Digital Design 71
Add/Sub Circuit
Add operation. Add=0
0 0
S A B= +
04/15/17 Kishore Prabhala, Digital Design 72
Add/Sub Circuit
Sub operation. Add=1
1 1
1S A B= + +
B
04/15/17 Kishore Prabhala, Digital Design 73
Equal Comparator
 Design a logic circuit which will
compute
F0 = (A = B)
04/15/17 Kishore Prabhala, Digital Design 74
2-bit Equal Comparator Truth Table
b1 b0 a1 a0 F0
0 0 0 0 1
0 0 0 1 0
0 0 1 0 0
0 0 1 1 0
0 1 0 0 0
0 1 0 1 1
0 1 1 0 0
0 1 1 1 0
04/15/17 Kishore Prabhala, Digital Design 75
2-bit Equal Comparator Truth Table
b1 b0 a1 a0 F0
1 0 0 0 0
1 0 0 1 0
1 0 1 0 1
1 0 1 1 0
1 1 0 0 0
1 1 0 1 0
1 1 1 0 0
1 1 1 1 1
04/15/17 Kishore Prabhala, Digital Design 76
Solution
( )( )0 1 1 0 0F a b a b= ⊕ ⊕
You can show,
04/15/17 Kishore Prabhala, Digital Design 77
N-bit Equal Comparator
( ) ( )( )0 1 1 1 1 0 0n nF a b a b a b− −= ⊕ ⊕ ⊕K
04/15/17 Kishore Prabhala, Digital Design 78
Not Equal Comparator
 Design a logic circuit which will
compute
F = (A <> B)
F = (A = B)
i.e. Just invert our Equal Comparator circuit
04/15/17 Kishore Prabhala, Digital Design 79
Magnitude Comparator
 Design a logic circuit which will
compute
F2 = (A>B)
F1 = (A<B)
Let’s develop a truth table for 2-bits
04/15/17 Kishore Prabhala, Digital Design 80
2-bit Magnitude (unsigned) Comparator
Truth Table
b1 b0 a1 a0 F2 F1
0 0 0 0 0 0
0 0 0 1 1 0
0 0 1 0 1 0
0 0 1 1 1 0
0 1 0 0 0 1
0 1 0 1 0 0
0 1 1 0 1 0
0 1 1 1 1 0
04/15/17 Kishore Prabhala, Digital Design 81
Arithmetic Logic Units (ALUs)
The most commonly used circuits in
any microprocessor
04/15/17 Kishore Prabhala, Digital Design 82
Arithmetic Logic Unit (ALU)
A,B are data inputs of n bits each in depth
S is a control input. We have 2m
operations
F is the output
04/15/17 Kishore Prabhala, Digital Design 83
Example
 Let n=4,m=3
 We have A[3..0] and B[3..0]
 With m=3, we have 23
= 8 operations
 Let’s look at a possible function table
04/15/17 Kishore Prabhala, Digital Design 84
Function Table
s2 s1 s0 Function
0 0 0 F=AB
0 0 1 F=A+B (logical OR)
0 1 0 F=NOT A
0 1 1 F=A XOR B
1 0 0 F=A+B (Arithmetic)
1 0 1 F=A-B
1 1 0 F=A + 1
1 1 1 F=A - 1
04/15/17 Kishore Prabhala, Digital Design 85
Design using a Truth Table
 How large is the truth table?
 2n from data inputs A and B
 Example: n=8, we have 16 data inputs
 A[7..0] and B[7..0]
 3 control inputs
 Total of 2n+3 inputs
 N=8, we have 19 inputs
 Our truth table will have
 192
(361) rows and 8 outputs
 Too complex. Let’s explore another
alternative using a “system” or modular
approach
04/15/17 Kishore Prabhala, Digital Design 86
Design using Modules
 Note:
 For S2=0, we have logic operations
 For S2=1, we have arithmetic
operations
 So, let’s use S2 to control a 2x1 MUX
 to select between logic and arithmetic
operations, so our top level design
would look like:
04/15/17 Kishore Prabhala, Digital Design 87
ALU Design
04/15/17 Kishore Prabhala, Digital Design 88
ALU Design S2=0
With S2=0, F is the output from
the logic module
04/15/17 Kishore Prabhala, Digital Design 89
ALU Design S2=1
With S2=1, F is the output from
the arithmetic module
04/15/17 Kishore Prabhala, Digital Design 90
Logic Module Design
04/15/17 Kishore Prabhala, Digital Design 91
Function Table for Logic Module
 S2=0
s2 s1 s0 Function
0 0 0 F=AB
0 0 1 F=A+B (logical OR)
0 1 0 F=NOT A
0 1 1 F=A XOR B
We can use a 4x1 mux to
implement this module
04/15/17 Kishore Prabhala, Digital Design 92
Logic Module Design
04/15/17 Kishore Prabhala, Digital Design 93
Logic Module Design
AND Operation
S[1..0]=00
0 0
F=AB
04/15/17 Kishore Prabhala, Digital Design 94
Logic Module Design
OR Operation
S[1..0]=01
0 1
F=A+B
04/15/17 Kishore Prabhala, Digital Design 95
Logic Module Design
NOT Operation
S[1..0]=10
1 0
F=A
04/15/17 Kishore Prabhala, Digital Design 96
Logic Module Design
XOR Operation
S[1..0]=11
1 1
F=A XOR B
04/15/17 Kishore Prabhala, Digital Design 97
What do these logic modules
look like?
04/15/17 Kishore Prabhala, Digital Design 98
AND Module
04/15/17 Kishore Prabhala, Digital Design 99
OR Module
04/15/17 Kishore Prabhala, Digital Design 100
NOT Module
A F
04/15/17 Kishore Prabhala, Digital Design 101
XOR Module
04/15/17 Kishore Prabhala, Digital Design 102
Arithmetic Module
Let’s use our ADD/SUB Module
04/15/17 Kishore Prabhala, Digital Design 103
Add/Sub Circuit Module
04/15/17 Kishore Prabhala, Digital Design 104
Function Table for Arithmetic Ops
s2 s1 s0 Function
1 0 0 F=A+B (Arithmetic)
1 0 1 F=A-B
1 1 0 F=A + 1
1 1 1 F=A - 1
Note:
S0 can be use to indicate Addition or Subtraction.
S1 can be use to indicate the B data input
04/15/17 Kishore Prabhala, Digital Design 105
Arithmetic Module Design
B
A
S
04/15/17 Kishore Prabhala, Digital Design 106
Arithmetic Module Design
B
A
S
0
0
F=A+B
S[1..0]=00
04/15/17 Kishore Prabhala, Digital Design 107
Arithmetic Module Design
B
A
S
1
0
F=A-B
S[1..0]=01
04/15/17 Kishore Prabhala, Digital Design 108
Arithmetic Module Design
B
A
S
0
1
F=A+1
S[1..0]=10
04/15/17 Kishore Prabhala, Digital Design 109
Arithmetic Module Design
B
A
S
1
1
F=A-1
S[1..0]=11
04/15/17 Kishore Prabhala, Digital Design 110
Overall Design
We have
04/15/17 Kishore Prabhala, Digital Design 111
ALU Design
04/15/17 Kishore Prabhala, Digital Design 112
Logic Module Design
04/15/17 Kishore Prabhala, Digital Design 113
Arithmetic Module Design
B
A
S
04/15/17 Kishore Prabhala, Digital Design 114
Total Design
Logic Module
Arithmetic Module
04/15/17 Kishore Prabhala, Digital Design 115
VLSI Design Centre
 Learn to design Digital Design with
Electronic Design Automation tools
 www.pskrf.com
 Thank YOU

More Related Content

What's hot

Digital Logic & Design (DLD) presentation
Digital Logic & Design (DLD) presentationDigital Logic & Design (DLD) presentation
Digital Logic & Design (DLD) presentationfoyez ahammad
 
IS 151 Lecture 9
IS 151 Lecture 9IS 151 Lecture 9
IS 151 Lecture 9wajanga
 
Encoders and decoders
Encoders and decodersEncoders and decoders
Encoders and decodersGaditek
 
Combinational circuits
Combinational circuits Combinational circuits
Combinational circuits DrSonali Vyas
 
FYBSC IT Digital Electronics Unit IV Chapter I Multiplexer, Demultiplexer, AL...
FYBSC IT Digital Electronics Unit IV Chapter I Multiplexer, Demultiplexer, AL...FYBSC IT Digital Electronics Unit IV Chapter I Multiplexer, Demultiplexer, AL...
FYBSC IT Digital Electronics Unit IV Chapter I Multiplexer, Demultiplexer, AL...Arti Parab Academics
 
Basic electronics
Basic electronicsBasic electronics
Basic electronicsMantra VLSI
 
COMPUTER ORGANIZATION -Multiplexer,Demultiplexer, Encoder
COMPUTER ORGANIZATION -Multiplexer,Demultiplexer, EncoderCOMPUTER ORGANIZATION -Multiplexer,Demultiplexer, Encoder
COMPUTER ORGANIZATION -Multiplexer,Demultiplexer, EncoderVanitha Chandru
 
Combinational circuit
Combinational circuitCombinational circuit
Combinational circuitsabina deshar
 
Digital Logic Circuits
Digital Logic CircuitsDigital Logic Circuits
Digital Logic Circuitssathish sak
 
encoder and decoder in digital electronics
encoder and decoder in digital electronicsencoder and decoder in digital electronics
encoder and decoder in digital electronicsvikram rajpurohit
 
Decoders
DecodersDecoders
DecodersRe Man
 

What's hot (20)

Digital Logic & Design (DLD) presentation
Digital Logic & Design (DLD) presentationDigital Logic & Design (DLD) presentation
Digital Logic & Design (DLD) presentation
 
IS 151 Lecture 9
IS 151 Lecture 9IS 151 Lecture 9
IS 151 Lecture 9
 
Digital Logic Design
Digital Logic Design Digital Logic Design
Digital Logic Design
 
Chapter1
Chapter1Chapter1
Chapter1
 
STLD-Combinational logic design
STLD-Combinational  logic design STLD-Combinational  logic design
STLD-Combinational logic design
 
Encoders and decoders
Encoders and decodersEncoders and decoders
Encoders and decoders
 
Combinational circuits
Combinational circuits Combinational circuits
Combinational circuits
 
FYBSC IT Digital Electronics Unit IV Chapter I Multiplexer, Demultiplexer, AL...
FYBSC IT Digital Electronics Unit IV Chapter I Multiplexer, Demultiplexer, AL...FYBSC IT Digital Electronics Unit IV Chapter I Multiplexer, Demultiplexer, AL...
FYBSC IT Digital Electronics Unit IV Chapter I Multiplexer, Demultiplexer, AL...
 
Bds lab 4
Bds lab 4Bds lab 4
Bds lab 4
 
Deld lab manual
Deld lab manualDeld lab manual
Deld lab manual
 
Basic electronics
Basic electronicsBasic electronics
Basic electronics
 
COMPUTER ORGANIZATION -Multiplexer,Demultiplexer, Encoder
COMPUTER ORGANIZATION -Multiplexer,Demultiplexer, EncoderCOMPUTER ORGANIZATION -Multiplexer,Demultiplexer, Encoder
COMPUTER ORGANIZATION -Multiplexer,Demultiplexer, Encoder
 
Ch1 2
Ch1 2Ch1 2
Ch1 2
 
Combinational circuit
Combinational circuitCombinational circuit
Combinational circuit
 
Encoder
EncoderEncoder
Encoder
 
Digital Logic Circuits
Digital Logic CircuitsDigital Logic Circuits
Digital Logic Circuits
 
encoder and decoder in digital electronics
encoder and decoder in digital electronicsencoder and decoder in digital electronics
encoder and decoder in digital electronics
 
Encoders and decoders
Encoders and decodersEncoders and decoders
Encoders and decoders
 
Decoders
DecodersDecoders
Decoders
 
EE8351 DLC
EE8351 DLCEE8351 DLC
EE8351 DLC
 

Similar to Digital Design for B.Tech. / B.Sc.

ENG 202 – Digital Electronics 1 - Chapter 4 (1).pptx
ENG 202 – Digital Electronics 1 - Chapter 4 (1).pptxENG 202 – Digital Electronics 1 - Chapter 4 (1).pptx
ENG 202 – Digital Electronics 1 - Chapter 4 (1).pptxAishah928448
 
Combinational and sequential logic
Combinational and sequential logicCombinational and sequential logic
Combinational and sequential logicDeepak John
 
Digital electronics nandhini kusuma
Digital electronics nandhini kusumaDigital electronics nandhini kusuma
Digital electronics nandhini kusumakusuma11
 
Digital electronics nandhini kusuma
Digital electronics nandhini kusumaDigital electronics nandhini kusuma
Digital electronics nandhini kusumakusuma11
 
computer logic and digital design chapter 1
computer logic and digital design chapter 1computer logic and digital design chapter 1
computer logic and digital design chapter 1tendaisigauke3
 
Combinational circuits
Combinational circuitsCombinational circuits
Combinational circuitsHareem Aslam
 
2016 03-03 marchand
2016 03-03 marchand2016 03-03 marchand
2016 03-03 marchandSCEE Team
 
Mini Project 1 - 2-to-4 Decoder with Enable Input E and 4-to-2 Line Priority...
Mini Project 1 -  2-to-4 Decoder with Enable Input E and 4-to-2 Line Priority...Mini Project 1 -  2-to-4 Decoder with Enable Input E and 4-to-2 Line Priority...
Mini Project 1 - 2-to-4 Decoder with Enable Input E and 4-to-2 Line Priority...AIMST University
 
unit-6_combinational_jbiunkjnjbkjbjjcircuit-2.ppt
unit-6_combinational_jbiunkjnjbkjbjjcircuit-2.pptunit-6_combinational_jbiunkjnjbkjbjjcircuit-2.ppt
unit-6_combinational_jbiunkjnjbkjbjjcircuit-2.pptJ. Glory Precious
 
Digital electronics lab
Digital electronics labDigital electronics lab
Digital electronics labswatymanoja
 
Decodder presentation by ibrar
Decodder presentation by ibrarDecodder presentation by ibrar
Decodder presentation by ibraribrar562
 
combinational-circuit (1).ppt
combinational-circuit (1).pptcombinational-circuit (1).ppt
combinational-circuit (1).pptThanmayiKumar
 

Similar to Digital Design for B.Tech. / B.Sc. (20)

Chapter-04.pdf
Chapter-04.pdfChapter-04.pdf
Chapter-04.pdf
 
ENG 202 – Digital Electronics 1 - Chapter 4 (1).pptx
ENG 202 – Digital Electronics 1 - Chapter 4 (1).pptxENG 202 – Digital Electronics 1 - Chapter 4 (1).pptx
ENG 202 – Digital Electronics 1 - Chapter 4 (1).pptx
 
ATT SMK.pptx
ATT SMK.pptxATT SMK.pptx
ATT SMK.pptx
 
Combinational and sequential logic
Combinational and sequential logicCombinational and sequential logic
Combinational and sequential logic
 
Digital electronics nandhini kusuma
Digital electronics nandhini kusumaDigital electronics nandhini kusuma
Digital electronics nandhini kusuma
 
Digital electronics nandhini kusuma
Digital electronics nandhini kusumaDigital electronics nandhini kusuma
Digital electronics nandhini kusuma
 
5. Arithmaticn combinational Ckt.ppt
5. Arithmaticn combinational Ckt.ppt5. Arithmaticn combinational Ckt.ppt
5. Arithmaticn combinational Ckt.ppt
 
Chapter1.ppt
Chapter1.pptChapter1.ppt
Chapter1.ppt
 
computer logic and digital design chapter 1
computer logic and digital design chapter 1computer logic and digital design chapter 1
computer logic and digital design chapter 1
 
Combinational circuits
Combinational circuitsCombinational circuits
Combinational circuits
 
amba.ppt
amba.pptamba.ppt
amba.ppt
 
Combinational circuits
Combinational circuitsCombinational circuits
Combinational circuits
 
2016 03-03 marchand
2016 03-03 marchand2016 03-03 marchand
2016 03-03 marchand
 
Mini Project 1 - 2-to-4 Decoder with Enable Input E and 4-to-2 Line Priority...
Mini Project 1 -  2-to-4 Decoder with Enable Input E and 4-to-2 Line Priority...Mini Project 1 -  2-to-4 Decoder with Enable Input E and 4-to-2 Line Priority...
Mini Project 1 - 2-to-4 Decoder with Enable Input E and 4-to-2 Line Priority...
 
Combinational Ckt.pdf
Combinational Ckt.pdfCombinational Ckt.pdf
Combinational Ckt.pdf
 
unit-6_combinational_jbiunkjnjbkjbjjcircuit-2.ppt
unit-6_combinational_jbiunkjnjbkjbjjcircuit-2.pptunit-6_combinational_jbiunkjnjbkjbjjcircuit-2.ppt
unit-6_combinational_jbiunkjnjbkjbjjcircuit-2.ppt
 
Digital electronics lab
Digital electronics labDigital electronics lab
Digital electronics lab
 
Decodder presentation by ibrar
Decodder presentation by ibrarDecodder presentation by ibrar
Decodder presentation by ibrar
 
microprocessors
microprocessorsmicroprocessors
microprocessors
 
combinational-circuit (1).ppt
combinational-circuit (1).pptcombinational-circuit (1).ppt
combinational-circuit (1).ppt
 

Recently uploaded

如何办理萨省大学毕业证(UofS毕业证)成绩单留信学历认证原版一比一
如何办理萨省大学毕业证(UofS毕业证)成绩单留信学历认证原版一比一如何办理萨省大学毕业证(UofS毕业证)成绩单留信学历认证原版一比一
如何办理萨省大学毕业证(UofS毕业证)成绩单留信学历认证原版一比一ga6c6bdl
 
定制(UI学位证)爱达荷大学毕业证成绩单原版一比一
定制(UI学位证)爱达荷大学毕业证成绩单原版一比一定制(UI学位证)爱达荷大学毕业证成绩单原版一比一
定制(UI学位证)爱达荷大学毕业证成绩单原版一比一ss ss
 
(MEGHA) Hinjewadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune E...
(MEGHA) Hinjewadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune E...(MEGHA) Hinjewadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune E...
(MEGHA) Hinjewadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune E...ranjana rawat
 
Dubai Call Girls O528786472 Call Girls In Dubai Wisteria
Dubai Call Girls O528786472 Call Girls In Dubai WisteriaDubai Call Girls O528786472 Call Girls In Dubai Wisteria
Dubai Call Girls O528786472 Call Girls In Dubai WisteriaUnited Arab Emirates
 
Call Girls Dubai Slut Wife O525547819 Call Girls Dubai Gaped
Call Girls Dubai Slut Wife O525547819 Call Girls Dubai GapedCall Girls Dubai Slut Wife O525547819 Call Girls Dubai Gaped
Call Girls Dubai Slut Wife O525547819 Call Girls Dubai Gapedkojalkojal131
 
Pallawi 9167673311 Call Girls in Thane , Independent Escort Service Thane
Pallawi 9167673311  Call Girls in Thane , Independent Escort Service ThanePallawi 9167673311  Call Girls in Thane , Independent Escort Service Thane
Pallawi 9167673311 Call Girls in Thane , Independent Escort Service ThanePooja Nehwal
 
(ANIKA) Wanwadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(ANIKA) Wanwadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(ANIKA) Wanwadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(ANIKA) Wanwadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
9004554577, Get Adorable Call Girls service. Book call girls & escort service...
9004554577, Get Adorable Call Girls service. Book call girls & escort service...9004554577, Get Adorable Call Girls service. Book call girls & escort service...
9004554577, Get Adorable Call Girls service. Book call girls & escort service...Pooja Nehwal
 
FULL ENJOY - 8264348440 Call Girls in Hauz Khas | Delhi
FULL ENJOY - 8264348440 Call Girls in Hauz Khas | DelhiFULL ENJOY - 8264348440 Call Girls in Hauz Khas | Delhi
FULL ENJOY - 8264348440 Call Girls in Hauz Khas | Delhisoniya singh
 
哪里办理美国宾夕法尼亚州立大学毕业证(本硕)psu成绩单原版一模一样
哪里办理美国宾夕法尼亚州立大学毕业证(本硕)psu成绩单原版一模一样哪里办理美国宾夕法尼亚州立大学毕业证(本硕)psu成绩单原版一模一样
哪里办理美国宾夕法尼亚州立大学毕业证(本硕)psu成绩单原版一模一样qaffana
 
定制(USF学位证)旧金山大学毕业证成绩单原版一比一
定制(USF学位证)旧金山大学毕业证成绩单原版一比一定制(USF学位证)旧金山大学毕业证成绩单原版一比一
定制(USF学位证)旧金山大学毕业证成绩单原版一比一ss ss
 
《1:1仿制麦克马斯特大学毕业证|订制麦克马斯特大学文凭》
《1:1仿制麦克马斯特大学毕业证|订制麦克马斯特大学文凭》《1:1仿制麦克马斯特大学毕业证|订制麦克马斯特大学文凭》
《1:1仿制麦克马斯特大学毕业证|订制麦克马斯特大学文凭》o8wvnojp
 
Call Girls Delhi {Rs-10000 Laxmi Nagar] 9711199012 Whats Up Number
Call Girls Delhi {Rs-10000 Laxmi Nagar] 9711199012 Whats Up NumberCall Girls Delhi {Rs-10000 Laxmi Nagar] 9711199012 Whats Up Number
Call Girls Delhi {Rs-10000 Laxmi Nagar] 9711199012 Whats Up NumberMs Riya
 
Gaya Call Girls #9907093804 Contact Number Escorts Service Gaya
Gaya Call Girls #9907093804 Contact Number Escorts Service GayaGaya Call Girls #9907093804 Contact Number Escorts Service Gaya
Gaya Call Girls #9907093804 Contact Number Escorts Service Gayasrsj9000
 
VIP Call Girls Kavuri Hills ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With ...
VIP Call Girls Kavuri Hills ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With ...VIP Call Girls Kavuri Hills ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With ...
VIP Call Girls Kavuri Hills ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With ...Suhani Kapoor
 
High Profile Call Girls In Andheri 7738631006 Call girls in mumbai Mumbai ...
High Profile Call Girls In Andheri 7738631006 Call girls in mumbai  Mumbai ...High Profile Call Girls In Andheri 7738631006 Call girls in mumbai  Mumbai ...
High Profile Call Girls In Andheri 7738631006 Call girls in mumbai Mumbai ...Pooja Nehwal
 
Kalyan callg Girls, { 07738631006 } || Call Girl In Kalyan Women Seeking Men ...
Kalyan callg Girls, { 07738631006 } || Call Girl In Kalyan Women Seeking Men ...Kalyan callg Girls, { 07738631006 } || Call Girl In Kalyan Women Seeking Men ...
Kalyan callg Girls, { 07738631006 } || Call Girl In Kalyan Women Seeking Men ...Pooja Nehwal
 
Call Girls Service Kolkata Aishwarya 🤌 8250192130 🚀 Vip Call Girls Kolkata
Call Girls Service Kolkata Aishwarya 🤌  8250192130 🚀 Vip Call Girls KolkataCall Girls Service Kolkata Aishwarya 🤌  8250192130 🚀 Vip Call Girls Kolkata
Call Girls Service Kolkata Aishwarya 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 

Recently uploaded (20)

如何办理萨省大学毕业证(UofS毕业证)成绩单留信学历认证原版一比一
如何办理萨省大学毕业证(UofS毕业证)成绩单留信学历认证原版一比一如何办理萨省大学毕业证(UofS毕业证)成绩单留信学历认证原版一比一
如何办理萨省大学毕业证(UofS毕业证)成绩单留信学历认证原版一比一
 
定制(UI学位证)爱达荷大学毕业证成绩单原版一比一
定制(UI学位证)爱达荷大学毕业证成绩单原版一比一定制(UI学位证)爱达荷大学毕业证成绩单原版一比一
定制(UI学位证)爱达荷大学毕业证成绩单原版一比一
 
(MEGHA) Hinjewadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune E...
(MEGHA) Hinjewadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune E...(MEGHA) Hinjewadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune E...
(MEGHA) Hinjewadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune E...
 
Dubai Call Girls O528786472 Call Girls In Dubai Wisteria
Dubai Call Girls O528786472 Call Girls In Dubai WisteriaDubai Call Girls O528786472 Call Girls In Dubai Wisteria
Dubai Call Girls O528786472 Call Girls In Dubai Wisteria
 
Call Girls Dubai Slut Wife O525547819 Call Girls Dubai Gaped
Call Girls Dubai Slut Wife O525547819 Call Girls Dubai GapedCall Girls Dubai Slut Wife O525547819 Call Girls Dubai Gaped
Call Girls Dubai Slut Wife O525547819 Call Girls Dubai Gaped
 
Low rate Call girls in Delhi Justdial | 9953330565
Low rate Call girls in Delhi Justdial | 9953330565Low rate Call girls in Delhi Justdial | 9953330565
Low rate Call girls in Delhi Justdial | 9953330565
 
Pallawi 9167673311 Call Girls in Thane , Independent Escort Service Thane
Pallawi 9167673311  Call Girls in Thane , Independent Escort Service ThanePallawi 9167673311  Call Girls in Thane , Independent Escort Service Thane
Pallawi 9167673311 Call Girls in Thane , Independent Escort Service Thane
 
🔝 9953056974🔝 Delhi Call Girls in Ajmeri Gate
🔝 9953056974🔝 Delhi Call Girls in Ajmeri Gate🔝 9953056974🔝 Delhi Call Girls in Ajmeri Gate
🔝 9953056974🔝 Delhi Call Girls in Ajmeri Gate
 
(ANIKA) Wanwadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(ANIKA) Wanwadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(ANIKA) Wanwadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(ANIKA) Wanwadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
9004554577, Get Adorable Call Girls service. Book call girls & escort service...
9004554577, Get Adorable Call Girls service. Book call girls & escort service...9004554577, Get Adorable Call Girls service. Book call girls & escort service...
9004554577, Get Adorable Call Girls service. Book call girls & escort service...
 
FULL ENJOY - 8264348440 Call Girls in Hauz Khas | Delhi
FULL ENJOY - 8264348440 Call Girls in Hauz Khas | DelhiFULL ENJOY - 8264348440 Call Girls in Hauz Khas | Delhi
FULL ENJOY - 8264348440 Call Girls in Hauz Khas | Delhi
 
哪里办理美国宾夕法尼亚州立大学毕业证(本硕)psu成绩单原版一模一样
哪里办理美国宾夕法尼亚州立大学毕业证(本硕)psu成绩单原版一模一样哪里办理美国宾夕法尼亚州立大学毕业证(本硕)psu成绩单原版一模一样
哪里办理美国宾夕法尼亚州立大学毕业证(本硕)psu成绩单原版一模一样
 
定制(USF学位证)旧金山大学毕业证成绩单原版一比一
定制(USF学位证)旧金山大学毕业证成绩单原版一比一定制(USF学位证)旧金山大学毕业证成绩单原版一比一
定制(USF学位证)旧金山大学毕业证成绩单原版一比一
 
《1:1仿制麦克马斯特大学毕业证|订制麦克马斯特大学文凭》
《1:1仿制麦克马斯特大学毕业证|订制麦克马斯特大学文凭》《1:1仿制麦克马斯特大学毕业证|订制麦克马斯特大学文凭》
《1:1仿制麦克马斯特大学毕业证|订制麦克马斯特大学文凭》
 
Call Girls Delhi {Rs-10000 Laxmi Nagar] 9711199012 Whats Up Number
Call Girls Delhi {Rs-10000 Laxmi Nagar] 9711199012 Whats Up NumberCall Girls Delhi {Rs-10000 Laxmi Nagar] 9711199012 Whats Up Number
Call Girls Delhi {Rs-10000 Laxmi Nagar] 9711199012 Whats Up Number
 
Gaya Call Girls #9907093804 Contact Number Escorts Service Gaya
Gaya Call Girls #9907093804 Contact Number Escorts Service GayaGaya Call Girls #9907093804 Contact Number Escorts Service Gaya
Gaya Call Girls #9907093804 Contact Number Escorts Service Gaya
 
VIP Call Girls Kavuri Hills ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With ...
VIP Call Girls Kavuri Hills ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With ...VIP Call Girls Kavuri Hills ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With ...
VIP Call Girls Kavuri Hills ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With ...
 
High Profile Call Girls In Andheri 7738631006 Call girls in mumbai Mumbai ...
High Profile Call Girls In Andheri 7738631006 Call girls in mumbai  Mumbai ...High Profile Call Girls In Andheri 7738631006 Call girls in mumbai  Mumbai ...
High Profile Call Girls In Andheri 7738631006 Call girls in mumbai Mumbai ...
 
Kalyan callg Girls, { 07738631006 } || Call Girl In Kalyan Women Seeking Men ...
Kalyan callg Girls, { 07738631006 } || Call Girl In Kalyan Women Seeking Men ...Kalyan callg Girls, { 07738631006 } || Call Girl In Kalyan Women Seeking Men ...
Kalyan callg Girls, { 07738631006 } || Call Girl In Kalyan Women Seeking Men ...
 
Call Girls Service Kolkata Aishwarya 🤌 8250192130 🚀 Vip Call Girls Kolkata
Call Girls Service Kolkata Aishwarya 🤌  8250192130 🚀 Vip Call Girls KolkataCall Girls Service Kolkata Aishwarya 🤌  8250192130 🚀 Vip Call Girls Kolkata
Call Girls Service Kolkata Aishwarya 🤌 8250192130 🚀 Vip Call Girls Kolkata
 

Digital Design for B.Tech. / B.Sc.

  • 1. 04/15/17 Kishore Prabhala, Digital Design 1 Digital Design and EDA Tools Kishore Prabhala Director, VLSI Design Centre, PSK Research Foundation Opposite Acharya Nagarjuna University Mens Hostel Nagarjuna Nagar – 522 510 prabhalakishore@gmail.com
  • 2. 04/15/17 Kishore Prabhala, Digital Design 2 Digital Systems  Integrated Circuits (ICs): Combinational logic circuits, memory elements, analog interfaces  Printed Circuits (PC) boards: substrate for ICs and interconnection, distribution of CLK, Vdd, and GND signals, heat dissipation  Power Supplies: Converts line AC voltage to regulated DC low voltage levels  Chassis (rack, card case, ...)  1-25 conductive layers: holds boards, power supply, fans, provides physical interface to user or other systems  Connectors and Cables
  • 3. 04/15/17 Kishore Prabhala, Digital Design 3 Integrated Circuits  Primarily Crystalline Silicon  1mm - 25mm on a side  200 - 400M effective transistors  (50 - 75M “logic gates")  3 - 10 conductive layers  2007 feature size ~ 65nm = 0.065 x 10- 6 m 45nm coming on line  “CMOS” most common - complementary metal oxide semiconductor  Package provides:  Spreading of chip-level signal paths to board-level  Heat dissipation.  Ceramic or plastic with gold wires Chip in Package
  • 4. 04/15/17 Kishore Prabhala, Digital Design 4 Printed Circuit Boards  Fiberglass or ceramic  1-20in on a side  IC packages are soldered down
  • 5. 04/15/17 Kishore Prabhala, Digital Design 5 Integrated Circuits Moore’s Law has fueled innovation for the last 3 decades, “Number of transistors on a die doubles every 18 months”
  • 6. 04/15/17 Kishore Prabhala, Digital Design 6 Integrated Circuits Uses for Digital IC technology today:  Standard Microprocessors  Used in desktop PCs, and embedded applications (ex: automotive)  Simple system design (mostly software development)  Memory chips (DRAM, SRAM)  Application specific ICs (ASICs)  custom designed to match particular application  can be optimized for low-power, low-cost, high-performance  high-design cost / relatively low manufacturing cost  Field programmable logic devices (FPGAs, CPLDs)  customized to particular application after fabrication  short time to market, relatively high part cost  Standardized low-density components  still manufactured for compatibility with older system designs
  • 7. 04/15/17 Kishore Prabhala, Digital Design 7 Digital vs. Analog Waveforms Analog: values vary over a broad range continuously Digital: only assumes discrete values +5 V –5 Time +5 V –5 1 0 1 Time
  • 8. 04/15/17 Kishore Prabhala, Digital Design 8 Logic Circuits Truth Table Logic Expression Gate Symbol Logic Function Inverter AND OR EX-OR A X X X X A A A BBB X = A X = AB X = A + B X = A + B A X 0 1 01 A X 0 0 1 1 0 0 01 1 1 0 0 B A X 0 1 1 1 0 0 01 1 1 0 1 B A X 0 1 0 1 0 0 01 1 1 0 1 B
  • 9. 04/15/17 Kishore Prabhala, Digital Design 9 MOS Transistor-level Logic Circuits  MOSFET (Metal Oxide Semiconductor Field Effect Transistor), nMOS, pMOS and CMOS The gate acts like a capacitor. A high voltage on the gate attracts charge into the channel. If a voltage exists between the source and drain a current will flow. In its simplest approximation, the device acts like a switch. pMOS nMOS
  • 10. 04/15/17 Kishore Prabhala, Digital Design 10 CMOS Logic Gates Inverter (NOT gate) NAND BAY •= NOR AY = BAY +=
  • 11. 04/15/17 Kishore Prabhala, Digital Design 11 Logic and Layout: Inverter with VLSI Stick Diagram OutIn VDD M2 M1
  • 12. 04/15/17 Kishore Prabhala, Digital Design 12 Logic and Layout: NAND Gate with VLSI Stick Diagram B VDD A
  • 13. 04/15/17 Kishore Prabhala, Digital Design 13 Properties of Complementary CMOS Gates  High noise margins: Vih, Voh, Vdd, Gnd  No static power consumption from Vdd to Ground in a steady state  Delay a function of load capacitance and transistor resistance  Dynamic CMOS - relies on temporary storage of signal values on the capacitance of
  • 14. 04/15/17 Kishore Prabhala, Digital Design 14 CMOS Delay Model CL B Rn A Rp B Rp A Rn Cint B Rp A Rp A Rn B Rn CL Cint NAND2 A ReqA A Rp A Rp A Rn CL INV NOR2
  • 15. 04/15/17 Kishore Prabhala, Digital Design 15 Input Pattern Effects on Delay  Delay is dependent on the pattern of inputs  Low to high transition  both inputs go low  delay is 0.69 Rp/2 CL  one input goes low  delay is 0.69 Rp CL  High to low transition  both inputs go high  delay is 0.69 2Rn CL CL B Rn A Rp B Rp A Rn Cint Rise and Fall times of output is a key based on load
  • 16. 04/15/17 Kishore Prabhala, Digital Design 16 Delay Dependence on Input Patterns -0.5 0 0.5 1 1.5 2 2.5 3 0 100 200 300 400 A=B=1→0 A=1, B=1→0 A=1 →0, B=1 time [ps] Voltage[V] Input Data Pattern Delay (psec) A=B=0→1 67 A=1, B=0→1 64 A= 0→1, B=1 61 A=B=1→0 45 A=1, B=1→0 80 A= 1→0, B=1 81NMOS = 0.5µm/0.25 µm PMOS = 0.75µm/0.25 µm CL = 100 fF Rise and Fall times of output is a key based on load
  • 17. 04/15/17 Kishore Prabhala, Digital Design 17 Fan-In Considerations in CMOS DCBA D C B A C3 C2 C1 Distributed RC model (Elmore delay) tpHL = 0.69 Reqn(C1+2C2+3C3+4CL) Propagation delay deteriorates rapidly as a function of fan-in – quadratically in the worst case.
  • 18. 04/15/17 Kishore Prabhala, Digital Design 18 Complex CMOS Gate OUT = D + A • (B + C) D A B C D A B C
  • 19. 04/15/17 Kishore Prabhala, Digital Design 19 Decoders  A decoder is a combinational digital circuit with a number of inputs ‘n’ and a number of outputs ‘m’, where m= 2n  Only one of the outputs is enabled at a time. The output enabled is the one specified by the binary number formed at the inputs of the decoder.  On the circuit below, the inputs of the decoder are connected on three switches, forming the number 5 [(101)2], thus only LED #5 will be ON
  • 20. 04/15/17 Kishore Prabhala, Digital Design 20 Decoders digram 0 1 0 1 0 1 0 1 2 3 4 5 6 7 0 1 0 10 1 A 2 Y 2 A 0 Y 0 Y 1 Y 3 3/8DEC. Y 6 Y 4 Y 5 Y 7 A 1
  • 21. 04/15/17 Kishore Prabhala, Digital Design 21 1-to-2 Decoder1-to-2 Decoder  Truth table shown at right  This one can be implemented by just a simple fan-out and an inverter: x y0 y1 0 1 0 1 0 1 x y1 y0 Circuit schematic Icon x y1 y0
  • 22. 04/15/17 Kishore Prabhala, Digital Design 22 2 to 4 Decoder – Truth Table  2 to 4 decoder X1 X0 Y0 Y1 Y2 Y3 0 0 1 0 0 0 0 1 0 1 0 0 1 0 0 0 1 0 1 1 0 0 0 1
  • 23. 04/15/17 Kishore Prabhala, Digital Design 23 2 to 4 Decoder Equations with Logic 0 1 0 1 1 0 2 1 0 3 1 0 Y X X Y X X Y X X Y X X = = = =
  • 24. 04/15/17 Kishore Prabhala, Digital Design 24 3 to 8 Decoder – Truth Table x2 x1 x0 y0 y1 y2 y3 y4 y5 y6 y7 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 1 1 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 1 0 1 0 0 0 0 0 1 0 0 1 1 0 0 0 0 0 0 0 1 0 1 1 1 0 0 0 0 0 0 0 1
  • 25. 04/15/17 Kishore Prabhala, Digital Design 25 3 to 8 Decoder Equations & Logic 0 2 1 0 1 2 1 0 2 2 1 0 3 2 1 0 Y X X X Y X X X Y X X X Y X X X = = = = 4 2 1 0 5 2 1 0 6 2 1 0 7 2 1 0 Y X X X Y X X X Y X X X Y X X X = = = =
  • 26. 04/15/17 Kishore Prabhala, Digital Design 26 Encoders  Opposite of a decoder  2n to n encoder  2n inputs  n outputs  For each input, the circuit will produce an “encoded” output
  • 27. 04/15/17 Kishore Prabhala, Digital Design 27 Example: 4 to 2 Binary Encoder Truth Table X3 X2 X1 X0 Y1 Y0 0 0 0 1 0 0 0 0 1 0 0 1 0 1 0 0 1 0 1 0 0 0 1 1 Assume only one input high at a time!! 0 1 3 1 2 3 Y X X Y X X = + = +
  • 28. 04/15/17 Kishore Prabhala, Digital Design 28 Multiplexer(MUX)/Data Selector  N to 1 multiplexer (or multiplexor)  N=2k data input lines, D0..(N−1)  k=log2(N) control inputs, S(k−1)..0  Binary encoding of index of selected data  One output:  This circuit will “connect” just the selected input to the output.  The selected input is specified by decoding the control inputs. ( 1)..0kSF D − =
  • 29. 04/15/17 Kishore Prabhala, Digital Design 29 The Simplest MultiplexerThe Simplest Multiplexer  2-to-1 multiplexer truth table  Output is a copy of  D0 if S0=0  D1 if S0=1 D0 D1 S0 F D0 d 0 D0 d D1 1 D1 VCC D[0..1] INPUT 2 2 2 and2_2b inst1 2 or2_bus inst2 FOUTPUT VCC S[0] INPUT x y[0..1] decoder_1-to-2 inst D[0..1] S[0] F mux_2-to-1 inst example 2-to-1 MUX Icon Schematic, using 1-to-2 Decoder module
  • 30. 04/15/17 Kishore Prabhala, Digital Design 30 Example: 4 to 1 MUX Truth Table D0 D1 D2 D3 S1 S0 F D0 d d d 0 0 D0 d D1 d d 0 1 D1 d d D2 d 1 0 D2 d d d D3 1 1 D3 d = don’t care / Di = data on input i Data Inputs Control Inputs Output
  • 31. 04/15/17 Kishore Prabhala, Digital Design 31 4 to 1 MUX Equation 0 1 2 3F D AB D AB D AB D AB= + + + 2x4 Decoder Only a single AND gate will be “ON” at a time. Output Control Inputs Data Inputs
  • 32. 04/15/17 Kishore Prabhala, Digital Design 32 4-to-1 MUX from three4-to-1 MUX from three 2-to-1 MUXes2-to-1 MUXes  Try building some larger sizes for yourself… D[0..1] S[0] F mux_2-to-1 inst D[0..1] S[0] F mux_2-to-1 inst1 D[0..1] S[0] F mux_2-to-1 inst2 VCC D[0..3] INPUT VCC S[1..0] INPUT S[0] FOUTPUT F[0] F[1] S[1] F[0..1] D[2..3] D[0..1] D[0..3]
  • 33. 04/15/17 Kishore Prabhala, Digital Design 33 Logic with multiplexers  You can implement any n-input logic function with a single 2n -to-1 multiplexer, by feeding appropriate constants into the MUX’s data inputs.  Namely, the list of the function’s output values from its truth table  The multiplexer implements a “lookup table”  it simply looks up the function result from the indicated row of the truth table  Of course, this is generally not the most hardware-efficient way to implement a given function.
  • 34. 04/15/17 Kishore Prabhala, Digital Design 34 MUX Application Example  Using a 4x1 MUX, design a logic circuit which implements: Y a b= ⊕ We have, Y 0 1 2 3Y D AB D AB D AB D AB= + + +
  • 35. 04/15/17 Kishore Prabhala, Digital Design 35 Example  Using a 4x1 MUX, design a logic circuit which implements: Y a b= ⊕ a b Y Dn 0 0 0 D0 0 1 1 D1 1 0 1 D2 1 1 0 D3 0 1 1 0Y AB AB AB AB AB AB= + + + = +
  • 36. 04/15/17 Kishore Prabhala, Digital Design 36 Solution
  • 37. 04/15/17 Kishore Prabhala, Digital Design 37 Multi-bit Multiplexers  J-bit nx1 mux sel d0 d1 … dn-1 d2 F J bits deep log2n J bits deep [ ] [ ] 0 j i i i F j D j m = = ∑ j=0 to 3 This is just J separate nx1 multiplexers
  • 38. 04/15/17 Kishore Prabhala, Digital Design 38 Example: 1 to 4 DeMUX Truth Table D A B F0 F1 F2 F3 D 0 0 D 0 0 0 D 0 1 0 D 0 0 D 1 0 0 0 D 0 D 1 1 0 0 0 D d = don’t care / Di = data on input i
  • 39. 04/15/17 Kishore Prabhala, Digital Design 39 CMOS Transmission Gate  Transmission gates are the way to build “switches” in CMOS  In general, both transistor types are needed:  nFET to pass zeros  pFET to pass ones  The transmission gate is bi- directional (unlike logic gates) A B C C A B C C
  • 40. 04/15/17 Kishore Prabhala, Digital Design 40 Transmission Gate XOR A B F B A B B M1 M2 M3/M4
  • 41. 04/15/17 Kishore Prabhala, Digital Design 41 Pass-Transistor Based Multiplexer A M2 M1 B S S S F VDD
  • 42. 04/15/17 Kishore Prabhala, Digital Design 42 4-to-1 Multiplexer  This version has less delay from in to out  Care must be taken to avoid turning on multiple paths simultaneously (shorting together the inputs) 36 Transistors
  • 43. 04/15/17 Kishore Prabhala, Digital Design 43 4-to-1 Multiplexer  The series connection of pass- transistors in each branch effectively forms the AND of s1 and s0 (or their complement)  20 transistors
  • 44. 04/15/17 Kishore Prabhala, Digital Design 44 CMOS Sequential Latch & Flip Flop  Positive Level-sensitive latch:  Latch Transistor Level: clk’ clk clk clk’ Positive Edge-triggered flip-flop built from two level-sensitive latches:
  • 45. 04/15/17 Kishore Prabhala, Digital Design 45 Two Phase Non-Overlapping Clocking Combinational Logic R E G R E G In Out State P1 P2 CLK P1 P2 1/2 Register 1/2 Register
  • 46. 04/15/17 Kishore Prabhala, Digital Design 46 Verilog Structural description exampleVerilog Structural description example
  • 47. 04/15/17 Kishore Prabhala, Digital Design 47 module gates (o,i0,i1,i2,i3); output o; input i0,i1,i2,i3; wire s1, s2; and (s1, i0, i1); and (s2, i2, i3); and (o, s1, s2); endmodule i0 i1 i2 i3 Output S1 S2 Verilog Structural description exampleVerilog Structural description example
  • 48. 04/15/17 Kishore Prabhala, Digital Design 48 Combinational circuit descriptionCombinational circuit description modulemodule gates (d, a, c);gates (d, a, c); outputoutput d;d; inputinput a, c;a, c; ////wirewire b;b; assignassign d = c ^ (~a);d = c ^ (~a); //// assignassign b = ~a;b = ~a; //// assignassign d = c ^ b;d = c ^ b; endmoduleendmodule a b c d
  • 49. 04/15/17 Kishore Prabhala, Digital Design 49 Case Study of a Simple Logic Design: Seven Segment Display L1 L 6 L2 L3 L 7 L 4 L 5
  • 50. 04/15/17 Kishore Prabhala, Digital Design 50 Case Study B3 B2 B1 B0 Val L1 L2 L3 L4 L5 L6 L7 0 0 0 0 0 1 0 1 1 1 1 1 0 0 0 1 1 0 0 0 0 0 1 1 0 0 1 0 2 1 1 1 0 1 1 0 0 0 1 1 3 1 1 1 0 0 1 1 0 1 0 0 4 0 1 0 1 0 1 1 0 1 0 1 5 1 1 1 1 0 0 1 0 1 1 0 6 1 1 1 1 1 0 1 0 1 1 1 7 1 0 0 0 0 1 1 1 0 0 0 8 1 1 1 1 1 1 1 1 0 0 1 9 1 1 1 1 0 1 1 L1 L 6 L2 L3 L 7 L 4 L 5
  • 51. 04/15/17 Kishore Prabhala, Digital Design 51 Case Study (cont.) Some gate level implementation of the Boolean function for L4
  • 52. 04/15/17 Kishore Prabhala, Digital Design 52 Basic Arithmetic Elements Half Adder
  • 53. 04/15/17 Kishore Prabhala, Digital Design 53 Half Adder-Truth Table  S=A+B (arithmetic sum) A B S1 S0 0 0 0 0 0 1 0 1 1 0 0 1 1 1 1 0 0S a b= ⊕ 1S ab=
  • 54. 04/15/17 Kishore Prabhala, Digital Design 54 Half Adder Circuit
  • 55. 04/15/17 Kishore Prabhala, Digital Design 55 Full Adder-Truth Table  S=A+B+C (arithmetic sum) A B C S1 S0 0 0 0 0 0 0 0 1 0 1 0 1 0 0 1 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 0S a b c= ⊕ ⊕ 1S ab ac bc= + +
  • 56. 04/15/17 Kishore Prabhala, Digital Design 56 Full Adder equations and Logic 0S a b c= ⊕ ⊕ Cout = ab + ac + bc or ab + (a⊕b
  • 57. 04/15/17 Kishore Prabhala, Digital Design 57 17 AND2 18 OR2 19 coutOUTPUT 16 AND2 VCC14 Cin INPUT VCC13 B INPUT 10 XOR 11 XOR 15 sumOUTPUT VCC12 A INPUT Synthesis Full Adder Circuit S(0) S(1) C A B S(0) S(1) Simulation
  • 58. 04/15/17 Kishore Prabhala, Digital Design 58 Full Adder from Two Half AddersFull Adder from Two Half Adders  Given bits a,b,c, computes (s1s0)2 = a + b + c.  Can build it using two half adders to compute the low-order bit of the sum as s0 = (a⊕b)⊕c.  Plus an extra OR gate needed to combine the carries.
  • 59. 04/15/17 Kishore Prabhala, Digital Design 59 Full Adder DesignFull Adder Design VDD VDD VDD VDD A B Ci S Co X B A Ci A BBA Ci A B Ci Ci B A Ci A B BA Co = AB + Ci(A+B) 28 transistors
  • 60. 04/15/17 Kishore Prabhala, Digital Design 60 Full Adder Design with less transistorsFull Adder Design with less transistors VDD Ci A BBA B A A B Kill Generate "1"-Propagate "0"-Propagate VDD Ci A B Ci Ci B A Ci A BBA VDD S Co 24 transistors
  • 61. 04/15/17 Kishore Prabhala, Digital Design 61 Conceptualization  4-bit adder (worst case) 1111 1111 11110 111 For the “worst case” we need to add three bits to generate a single output bit with a possible carry out. Can we use our single bit adder for this?
  • 62. 04/15/17 Kishore Prabhala, Digital Design 62 Ripple Carry Adder  We can cascade several full adders to create a ripple carry adder  The circuit gets its name because the carry bit “ripples” from one bit position to the next
  • 63. 04/15/17 Kishore Prabhala, Digital Design 63 Four Bit “Ripple” Adder 1-BitF.A. C out S um A B C in 1-BitF.A. C out S um A B C in 1-BitF.A. C out S um A B C in 1-BitF.A. C out S um A B C in A 3 B 3 A 0 B 0A 2 B 2 A 1 B 1 0 S 3 S 2 S 1 S 0 C out
  • 64. 04/15/17 Kishore Prabhala, Digital Design 64 8-bit Ripple Carry Adder  Use two 4-bit adders
  • 65. 04/15/17 Kishore Prabhala, Digital Design 65 16-bit Ripple Carry Adder  Use two 8-bit adders
  • 66. 04/15/17 Kishore Prabhala, Digital Design 66 Subtraction Circuit  Calculate 2’s complement of B  Add –B to A ( ) 1S A B A B A B= − = + − = + + B 1+ 1S A B= + +
  • 67. 04/15/17 Kishore Prabhala, Digital Design 67 Add/Sub Circuit Module
  • 68. 04/15/17 Kishore Prabhala, Digital Design 68 Function Table for Add/Sub Module Add Functional Result 0 S=A+B 1 S=A-B Add is a control input. It is active low. This means that the module will compute A+B when Add=0. It will compute A-B when Add=1.
  • 69. 04/15/17 Kishore Prabhala, Digital Design 69 Add/Sub Circuit Design using Modules
  • 70. 04/15/17 Kishore Prabhala, Digital Design 70 Add/Sub Circuit
  • 71. 04/15/17 Kishore Prabhala, Digital Design 71 Add/Sub Circuit Add operation. Add=0 0 0 S A B= +
  • 72. 04/15/17 Kishore Prabhala, Digital Design 72 Add/Sub Circuit Sub operation. Add=1 1 1 1S A B= + + B
  • 73. 04/15/17 Kishore Prabhala, Digital Design 73 Equal Comparator  Design a logic circuit which will compute F0 = (A = B)
  • 74. 04/15/17 Kishore Prabhala, Digital Design 74 2-bit Equal Comparator Truth Table b1 b0 a1 a0 F0 0 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 0 1 1 0 0 1 0 0 0 0 1 0 1 1 0 1 1 0 0 0 1 1 1 0
  • 75. 04/15/17 Kishore Prabhala, Digital Design 75 2-bit Equal Comparator Truth Table b1 b0 a1 a0 F0 1 0 0 0 0 1 0 0 1 0 1 0 1 0 1 1 0 1 1 0 1 1 0 0 0 1 1 0 1 0 1 1 1 0 0 1 1 1 1 1
  • 76. 04/15/17 Kishore Prabhala, Digital Design 76 Solution ( )( )0 1 1 0 0F a b a b= ⊕ ⊕ You can show,
  • 77. 04/15/17 Kishore Prabhala, Digital Design 77 N-bit Equal Comparator ( ) ( )( )0 1 1 1 1 0 0n nF a b a b a b− −= ⊕ ⊕ ⊕K
  • 78. 04/15/17 Kishore Prabhala, Digital Design 78 Not Equal Comparator  Design a logic circuit which will compute F = (A <> B) F = (A = B) i.e. Just invert our Equal Comparator circuit
  • 79. 04/15/17 Kishore Prabhala, Digital Design 79 Magnitude Comparator  Design a logic circuit which will compute F2 = (A>B) F1 = (A<B) Let’s develop a truth table for 2-bits
  • 80. 04/15/17 Kishore Prabhala, Digital Design 80 2-bit Magnitude (unsigned) Comparator Truth Table b1 b0 a1 a0 F2 F1 0 0 0 0 0 0 0 0 0 1 1 0 0 0 1 0 1 0 0 0 1 1 1 0 0 1 0 0 0 1 0 1 0 1 0 0 0 1 1 0 1 0 0 1 1 1 1 0
  • 81. 04/15/17 Kishore Prabhala, Digital Design 81 Arithmetic Logic Units (ALUs) The most commonly used circuits in any microprocessor
  • 82. 04/15/17 Kishore Prabhala, Digital Design 82 Arithmetic Logic Unit (ALU) A,B are data inputs of n bits each in depth S is a control input. We have 2m operations F is the output
  • 83. 04/15/17 Kishore Prabhala, Digital Design 83 Example  Let n=4,m=3  We have A[3..0] and B[3..0]  With m=3, we have 23 = 8 operations  Let’s look at a possible function table
  • 84. 04/15/17 Kishore Prabhala, Digital Design 84 Function Table s2 s1 s0 Function 0 0 0 F=AB 0 0 1 F=A+B (logical OR) 0 1 0 F=NOT A 0 1 1 F=A XOR B 1 0 0 F=A+B (Arithmetic) 1 0 1 F=A-B 1 1 0 F=A + 1 1 1 1 F=A - 1
  • 85. 04/15/17 Kishore Prabhala, Digital Design 85 Design using a Truth Table  How large is the truth table?  2n from data inputs A and B  Example: n=8, we have 16 data inputs  A[7..0] and B[7..0]  3 control inputs  Total of 2n+3 inputs  N=8, we have 19 inputs  Our truth table will have  192 (361) rows and 8 outputs  Too complex. Let’s explore another alternative using a “system” or modular approach
  • 86. 04/15/17 Kishore Prabhala, Digital Design 86 Design using Modules  Note:  For S2=0, we have logic operations  For S2=1, we have arithmetic operations  So, let’s use S2 to control a 2x1 MUX  to select between logic and arithmetic operations, so our top level design would look like:
  • 87. 04/15/17 Kishore Prabhala, Digital Design 87 ALU Design
  • 88. 04/15/17 Kishore Prabhala, Digital Design 88 ALU Design S2=0 With S2=0, F is the output from the logic module
  • 89. 04/15/17 Kishore Prabhala, Digital Design 89 ALU Design S2=1 With S2=1, F is the output from the arithmetic module
  • 90. 04/15/17 Kishore Prabhala, Digital Design 90 Logic Module Design
  • 91. 04/15/17 Kishore Prabhala, Digital Design 91 Function Table for Logic Module  S2=0 s2 s1 s0 Function 0 0 0 F=AB 0 0 1 F=A+B (logical OR) 0 1 0 F=NOT A 0 1 1 F=A XOR B We can use a 4x1 mux to implement this module
  • 92. 04/15/17 Kishore Prabhala, Digital Design 92 Logic Module Design
  • 93. 04/15/17 Kishore Prabhala, Digital Design 93 Logic Module Design AND Operation S[1..0]=00 0 0 F=AB
  • 94. 04/15/17 Kishore Prabhala, Digital Design 94 Logic Module Design OR Operation S[1..0]=01 0 1 F=A+B
  • 95. 04/15/17 Kishore Prabhala, Digital Design 95 Logic Module Design NOT Operation S[1..0]=10 1 0 F=A
  • 96. 04/15/17 Kishore Prabhala, Digital Design 96 Logic Module Design XOR Operation S[1..0]=11 1 1 F=A XOR B
  • 97. 04/15/17 Kishore Prabhala, Digital Design 97 What do these logic modules look like?
  • 98. 04/15/17 Kishore Prabhala, Digital Design 98 AND Module
  • 99. 04/15/17 Kishore Prabhala, Digital Design 99 OR Module
  • 100. 04/15/17 Kishore Prabhala, Digital Design 100 NOT Module A F
  • 101. 04/15/17 Kishore Prabhala, Digital Design 101 XOR Module
  • 102. 04/15/17 Kishore Prabhala, Digital Design 102 Arithmetic Module Let’s use our ADD/SUB Module
  • 103. 04/15/17 Kishore Prabhala, Digital Design 103 Add/Sub Circuit Module
  • 104. 04/15/17 Kishore Prabhala, Digital Design 104 Function Table for Arithmetic Ops s2 s1 s0 Function 1 0 0 F=A+B (Arithmetic) 1 0 1 F=A-B 1 1 0 F=A + 1 1 1 1 F=A - 1 Note: S0 can be use to indicate Addition or Subtraction. S1 can be use to indicate the B data input
  • 105. 04/15/17 Kishore Prabhala, Digital Design 105 Arithmetic Module Design B A S
  • 106. 04/15/17 Kishore Prabhala, Digital Design 106 Arithmetic Module Design B A S 0 0 F=A+B S[1..0]=00
  • 107. 04/15/17 Kishore Prabhala, Digital Design 107 Arithmetic Module Design B A S 1 0 F=A-B S[1..0]=01
  • 108. 04/15/17 Kishore Prabhala, Digital Design 108 Arithmetic Module Design B A S 0 1 F=A+1 S[1..0]=10
  • 109. 04/15/17 Kishore Prabhala, Digital Design 109 Arithmetic Module Design B A S 1 1 F=A-1 S[1..0]=11
  • 110. 04/15/17 Kishore Prabhala, Digital Design 110 Overall Design We have
  • 111. 04/15/17 Kishore Prabhala, Digital Design 111 ALU Design
  • 112. 04/15/17 Kishore Prabhala, Digital Design 112 Logic Module Design
  • 113. 04/15/17 Kishore Prabhala, Digital Design 113 Arithmetic Module Design B A S
  • 114. 04/15/17 Kishore Prabhala, Digital Design 114 Total Design Logic Module Arithmetic Module
  • 115. 04/15/17 Kishore Prabhala, Digital Design 115 VLSI Design Centre  Learn to design Digital Design with Electronic Design Automation tools  www.pskrf.com  Thank YOU