Professional Documents
Culture Documents
Chapter # 4: Programmable
and
Steering Logic
Randy H. Katz
University of California, Berkeley
June 1993
• Non-Gate Logic
Switch Logic
Multiplexers/Selecters and Decoders
Tri-State Gates/Open Collector Gates
ROM
Inputs
Outputs
Equations
F0 = A + B' C'
Example: F1 = A C' + A B
F2 = B' C' + A B
F3 = B' C + A
Input Side:
Personality Matrix 1 = asserted in term
0 = negated in term
Product Inputs Outputs - = does not participate
term A B C F0 F1 F2 F3
AB 1 1 - 0 1 1 0 Output Side:
BC - 0 1 0 0 0 1 Reuse 1 = term connected to output
of 0 = no connection to output
AC 1 - 0 0 1 0 0
terms
BC - 0 0 1 0 1 0
A 1 - - 1 0 0 1
Short-hand notation
so we don't have to
draw all the wires!
A
F1 = A B C
B
F2 = A + B + C C
A
F3 = A B C
B
F4 = A + B + C C
ABC
F6 = A xnor B xnor C
ABC
ABC
ABC
ABC
ABC
F1 F2 F3 F4 F5 F6
00 0 1 X 0 00 0 0 X 1
01 0 1 X 0 01 1 0 X 0
Minimized Functions: D D
11 1 1 X X 11 0 1 X X
W=A+BD+BC 10
C
1 1 X X
C
10 1 0 X X
X = B C'
Y=B+C B B
Z = A'B'C'D + B C D + A D' + B' C D' K-map for Y K-map for Z
ABCD
\A \A
A 1
\B
4
\C
B D
2 3 W
D
B
C 3
B 2 D
C 4 4 Z
A
5
B D 1 \D
22 1 X \B
C 1
C 3
\C \D
A A
AB AB
00 01 11 10 00 01 11 10
ABCD
CD CD
00 1 0 0 0 00 0 1 1 1 ABCD
01 0 1 0 0 01 1 0 1 1 ABCD
D D
11 0 0 1 0 11 1 1 0 1 ABCD
C C
10 0 0 0 1 10 1 1 1 0 AC
B B AC
K-map for EQ K-map for NE
BD
A A BD
AB AB
CD 00 01 11 10 CD 00 01 11 10
ABD
00 0 0 0 0 00 0 1 1 1
BCD
01 1 0 0 0 01 0 0 1 1
D D ABC
11 1 1 0 1 11 0 0 0 0
C C BCD
10 1 1 0 0 10 0 0 1 0
B B
K-map for LT K-map for GT
EQ NE LT GT
• multiplexer/selecter functions
• decoders
• read-only memories
Channel
Region
Gate
Oxide
Source Drain
Silicon Bulk
n-type Si
p-type Si
"n-Channel MOS"
Metal Gate, Oxide, Silicon Sandwich
Gate
Logic 1 on gate,
Source Drain Source and Drain connected
nMOS Transistor
Gate
Logic 0 on gate,
Source and Drain connected
Source Drain
pMOS Transistor
A AB
A
A+B
Input is 1 Input is 0
Pull-up does not conduct Pull-up conducts
Pull-down conducts Pull-down does not conduct
Output connected to GND Output connected to VDD
"0" "1"
A = 1, B = 1 A = 0, B = 1
Pull-up network does not conduct Pull-up network has path to VDD
Pull-down network conducts Pull-down network path broken
Output node connected to GND Output node connected to VDD
"1" "0"
A = 0, B = 0 A = 1, B = 0
Pull-up network conducts Pull-up network broken
Pull-down network broken Pull-down network conducts
Output node at VDD Output node at GND
In Out
In Out In Out
Control Control
Control
S
Selector: I
Choose I0 if S = 0 0
Choose I1 if S = 1 S
S Z
I
1
S
Z0
Demultiplexer:
I to Z0 if S = 0 S
I S
I to Z1 if S = 1
Z1
S
Demultiplexers Multiplexers
B Z
A Y
Demultiplexers Multiplexers
B Z
Z0
"0"
I
S S
Z1
"0"
I1
I Zero One
1 Straight Through
I1
0 1 0 "0" One
1 0 1 "0" One
"1" Zero
I1 Zero Diagonal
"0"
Conventional Logic
for 1 Input Tally
Function "0"
"0"
"0" One
"1" Zero
"0"
"1" Zero
"0"
"1"
"0" One
"1"
"0" One
"1" Zero
"1" "0"
Zero
"0"
Two
I2 I2
I1
"0" Two
Zero
"1" Zero
"0" "0"
I1
One
"0" One
"0" "0"
"0"
"0"
"0" "1"
"0" "0" "0" "0"
One One
"0" "0" "0" "1"
Zero Zero
"1" "1" "0"
"1"
"1"
"1"
"0" "1"
"0" "0" "0" "1"
One One
"0" "1" "0" "0"
Zero Zero
"1" "0" "1" "0"
A0 A1 B0 B1
Multiple input sources
Sa MUX MUX Sb
A B
Sum
S0 S1
Z = A' I 0 + A I 1
A Z I1 I0 A Z
0 I0 0 0 0 0
1 I1 0 0 1 0
0 1 0 1
0 1 1 0
1 0 0 0
Functional form 1 0 1 1
Logical form 1 1 0 1
1 1 1 1
I0
2:1
mux Z Z = A' I 0 + A I 1
I1
I0
I1
4:1
I2 mux
Z Z = A' B' I0 + A' B I1 + A B' I2 + A B I3
I3
A B
I0
I1
I2
I3
I4
8:1
Z Z = A' B' C' I0 + A' B' C I1 + A' B C' I2 + A' B C I3 +
mux
I5 A B' C' I4 + A B' C I5 + A B C' I6 + A B C I7
I6
I7 n
In general, Z = 2 -1m I
k=0 k k
A B C in minterm shorthand form for a 2 n :1 Mux
A B
I0 Z
I1
I2
I3
Gate
GateLevel
Level Transmission
TransmissionGate
Gate
Implementation
Implementation Implementation
Implementationof
of
of
of4:1
4:1Mux
Mux 4:1
4:1Mux
Mux
I6 2 I1 1 S
I7 3 S1 S0
C
I2 0
B C A 0
I3 1 S
1
Alternative 8:1 Mux Implementation C 2
Z
I4 0
3 S0 S1
I5 1 S
A B
C
I6 0
I7 1 S
C
© R.H. Katz Transparency No. 4-35
Contemporary Logic Design
Multiplexer/Selector Prog. & Steering Logic
1 0 A B C F
0 1 0 0 0 1 C 0
1 C F
2 F 0 0 1 0 C 1 4:1
0 3 8:1 0
0 1 0 1 2 MUX
0 4 MUX C 1
0 0 1 1 0 3
5 S1 S0
1 6 1 0 0 0
0 A B
1 7 S2 S1 S0 1 0 1 0
1 1 0 1 1
A B C
1 1 1 1
"Lookup Table"
I 1 I 2 … In F
0 0 0 1 1 Four possible
… configurations
n-1 Mux 0 1 0 1
control variables 1 of the truth table rows
single Mux
data variable 0 In In 1 Can be expressed as
a function of In, 0, 1
Example:
G(A,B,C,D) can be implemented by an 8:1 MUX:
1 0
K-map D 1
Choose A,B,C 0 2
as control variables 8:1 G
1 3
D 4 mux
D 5
Multiplexer D 6
Implementation D 7 S2 S1 S0
TTL
TTLpackage
packageefficient
efficient A B C
May be gate inefficient
May be gate inefficient
© R.H. Katz Transparency No. 4-37
Contemporary Logic Design
Decoders/Demultiplexers Prog. & Steering Logic
O1 = G • S0 • S1 • S2
2:4 Decoder:
O0 = G • S0 • S1 O2 = G • S0 • S1 • S2
O1 = G • S0 • S1 O3 = G • S0 • S1 • S2
O2 = G • S0 • S1 O4 = G • S0 • S1 • S2
O3 = G • S0 • S1 O5 = G • S0 • S1 • S2
O6 = G • S0 • S1 • S2
O7 = G • S0 • S1 • S2
G /G
Output0 Select Output0
Select
Output1 Output1
1:2 Decoder, Active High Enable 1:2 Decoder, Active Low Enable
G /G
Output0 Output0
Output1 Output1
Output2 Output2
Output3 Output3
2:4 Decoder, Active High Enable 2:4 Decoder, Active Low Enable
Select G Output
0
G Output Select
0 Select
Select "0"
Select
Select
Output Select
1
Select Output
1
Select
Naive, Incorrect Implementation
Select
All outputs not driven at all times "0"
Select
G Output
0
G Output
2
"0"
"0"
G Output
3
"0"
"0"
0 ABC
1 ABC
2 ABC Decoder Generates Appropriate
Enb
3:8 3 ABC Minterm based on Control Signals
dec 4 ABC
5 ABC
6 ABC
S2 S1 S0 7 ABC
A B C
Example Function:
F1 = A' B C' D + A' B' C D + A B C D
F2 = A B C' D' + A B C
F3 = (A' + B' + C' + D')
A B C D
If active low enable, then use NAND gates!
EN 1 1G 1Y3 7 7 EN 146
I31 7 151 6 5
1391Y2 I31 7 151 154
EN 1 6 A 3 1B 1Y1 5
6 1 3
5 2 1A 1Y0 4 7 EN
I23 7 151 1 Y5 B I5 145 22
41 4 15 2G 2Y3 9 I23 7 I4151 154 31 Y 5
6 3 W 6 2Y2 10 40
EN 1 5 52 2 13 2B 2Y1 11 7 EN 146 I3 1 2
3 W 6
I15 7 151 1 3 1 5 I5 5 I2 2 9C
1 41 4 40Y 6 14 2A 2Y0 12 I15 7 I4151154 I1 3 1 Y 105B
EN 1 6 52 3 3 I0 4 0 W 116A
5 2 W 1 GA 7 EN 146 I3 1
I7 7 151
3
1 3 1 Y 19
5C 153 I5 5 I2 22 C 9 C S2 F(A, B, C, D, E)
41 4 4 0W 1 6AB 3 A3 154 I1 31Y 10
I7 7 I4151 5B
I6 6 5 3 0 4 A2 I6 6 I3 1 3 I0 40WD 116A S1
I5 5 22 9 5 A1 YA 7 F(A, B, C, D, E)
I4 4 3 1 Y 15 C 1 I5 5 I2 2 2 C 9C S2E S0
4 0 1 6B 6 A0 I4 4 I1 3 1 Y 105
I3 13 D 11BS1
I2 2 9
W0 A
13 B3 I3 3 I0 4 0 W 6A
I1 1 1 C B
1 12 B2 I2 2 C 9 S2
I1 1 10C
E S0
I0 0 1A 11 B1 YB 9 D B
S1
C S2 0 10 I0 0 11A
1 B0
D C S2E S0
S1 1 GBS1 SO
E D S1
S0 5 2 14 E S0
A B
G1 Y7 \Y23
\EN \Y31 G2A Y6 \Y22
G2B Y5 \Y21
\Y20
138 Y4 \Y19
5:32 . S2
Y3
Y2 \Y18
Decoder . S1 C
Y1 \Y17
B
Subsystem . S0
A Y0 \Y16
\Y15
\Y0 G1 Y7
\Y14
G2A Y6
\Y13
S4 S3 S2 S1 S0 G2B Y5
\Y12
138 Y4 \Y11
Y3
S2 \Y10
C Y2
S1 B Y1 \Y9
S0 A Y0 \Y8
\Y7
G1 Y7
\Y6
G2A Y6 \Y5
G2B Y5
\Y4
138 Y4 \Y3
Y3
S2 \Y2
C Y2
S1 Y1 \Y1
B
S0 Y0 \Y0
A
A
Non-inverting buffer's
timing waveform OE
F
"Z" "Z"
© R.H. Katz Transparency No. 4-46
Contemporary Logic Design
Tri-state and Open Prog. & Steering Logic
Collector
Using tri-state gates to implement an economical multiplexer:
Input 0 F
OE
When SelectInput is asserted high
Input Input1 is connected to F
1
SelectInput
Input 0
F
Active low tri-state enables
plus inverting tri-state buffers
OE
Input 1
1
OE
SelectInput
F
I
OE
\EN 1 1G 1Y3
7
1Y2 6
3 139 5
S1 1B 1Y1 D3
2 1A 1Y0 4
S0
15 9
2G 2Y3 10
2Y2 D2
13 2B
2Y1 11
14 2A
2Y0 12
D1
D0
gate only has the ability to pull its output low; it cannot actively
drive the wire high
Pull-up resistor
OC NAND gates
Open-collector
NAND gate
Wired AND:
If A and B are "1", output is actively pulled low
F if C and D are "1", output is actively pulled low
0V
if one gate is low, the other high, then low wins
A B if both gates are "1", the output floats, pulled
high by resistor
Hence, the two NAND functions are AND'd
together!
+5V
\EN 1 G Y3 7
139 Y2 6
S1 3 B Y1 5
S0 2 A Y0 4
\I3 OR F
\I2 OR
\I1 OR
\I0 OR
n
2 -1
Bit Lines
0 n-1
Address
Internal Organization
A B C F0 F1 F2 F3
address outputs
n address m output
lines lines
ROM problem: size doubles for each additional input, can't use don't cares
Call sensors A, B, C
Draw a picture!
+10%
+ 5% + 5%
Spec Spec Spec
- 5% - 5%
- 10%
ROD ROD ROD
Too Within Too
Long Spec Short
Assume that A detects the leading edge of the rod on the conveyor
Spectification
- 5%
Too Within Too Specification
Long Spec Short + 5%
A B C Function
0 0 0 X
0 0 1 X Truth table and logic implementation
0 1 0 X now straightforward
0 1 1 X
1 0 0 too short "too long" = A B C
1 0 1 X (all three sensors tripped)
1 1 0 in spec
"in spec" = A B C'
1 1 1 too long (first two sensors tripped)
4 inputs A, B, C, D
7-Segment
7 outputs C0 — C6 display
C0 C0 C1 C2 C3 C4 C5 C6
C5 C1
C6
C4 C2 BCD-to-7-segment
C3 control signal
decoder
C C C C C C C
0 1 2 3 4 5 6
A B C D
Block Diagram
© R.H. Katz Transparency No. 4-61
Contemporary Logic Design
Combinational Logic Word Prog. & Steering Logic
Problems
BCD to 7 Segment Display Controller
vs.
espresso
00 1 0 X 1 00 1 1 X 1 00 1 1 X 1
01 0 1 X 1 01 1 0 X 1 01 1 1 X 1
D D D
11 1 1 X X 11 1 1 X X 11 1 1 X X
C C C
10 1 1 X X 10 1 0 X X 10 0 1 X X
B B B
K-map for C0 K-map for C1 K-map for C2
A A A A
AB AB AB AB
CD 00 01 11 10 CD 00 01 11 10 CD 00 01 11 10 CD 00 01 11 10
00 1 0 X 1 00 1 0 X 1 00 1 1 X 1 00 0 1 X 1
01 0 1 X 0 01 0 0 X 0 01 0 1 X 1 01 0 1 X 1
D D D D
11 1 0 X X 11 0 0 X X 11 0 0 X X 11 1 0 X X
C C C C
10 1 1 X X 10 1 1 X X 10 0 1 X X 10 1 1 X X
B B B B
K-map for C3 K-map for C4 K-map for C5 K-map for C6
0 4 8 12 16 20 24 28
Display ControllerFirst
fuse
numbers
0
32
64
96
128 19
160
192
224
2
256
288
320
352 18
384
416
448
480
3
512
16H8PAL 544
576
608
640 17
the function
4
768
800
832
864 16
896
928
960
992
5
1024
1056
1088
1120 15
1152
1184
1216
1248
6
1280
1312
1344
1376 14
1408
1440
1472
1504
7
1536
1568
1600
1632
1664 13
1696
1728
1760
8
1792
1824
1856
1888 12
1920
1952
1984
2016
9 11
Note: Fuse number = first fuse number + increment
012 3 4 8 10 12 14 16 18 20 24 27
2 23
First 0
fuse 28 22
1
numbers 56
84
14H8PAL 3
112
Cannot Implement
21
140
224 19
252
280 18
308
336 17
364
392 16
420
448
476 15
504
532
10 14
11 13
X = C' + D'
Y = B' C'
C0 = C3 + A' B X' + A D Y
52 literals
C1 = Y + A' C5' + C' D' C6
33 gates
C2 = C5 + A' B' D + A' C D
Ineffective use of don't cares
C3 = C4 + B D C5 + A' B' X'
C5 = C' C4 + A Y + A' B X
+
5
V
DD D D D D D D S C2
01 2 3 4 5 6 7 0
S C1
E
N 1
Q S C0
O 2
F
Specification:
Inputs: D7, D6, …, D0 shift input the specified number
Outputs: O7, O6, …, O0
of positions to the right
Control: S2, S1, S0
D7 O7 D7 O7 D7 O7
D6 O6 D6 O6 D6 O6
D5 . O5 D5 . O5 D5 . O5
D4 . O4 D4 . O4 D4 . O4
D3 . O3 D3 . O3 D3 . O3
D2 O2 D2 O2 D2 O2
D1 O1 D1 O1 D1 O1
D0 O0 D0 O0 D0 O0
S2, S1, S0 = 0 0 0 S2, S1, S0 = 0 0 1
S2, S1, S0 = 0 1 0
Switch logic
O7 O6 O5 O4 O3 O2 O1 O0 O7 O6 O5 O4 O3 O2 O1 O0
S000 S000
D7 D7
S001 S001 S001
S001 D6
D6
S010 S010
D5 D5
S011
S011
D4 D4
S100
S100
D3 D3
S101
S101
D2 D2
S110
S110
D1 D1
S111
S111
D0 D0
Multiplexers/Selecters
Decoders
ROMs