Professional Documents
Culture Documents
KU College of Engineering
Lecture 9 Elec 204: Digital Systems Design
1
ROM, PAL and PLA Configurations
Fixed Programmable
Inputs Programmable Outputs
AND array
Connections OR array
(decoder)
KU College of Engineering
Lecture 9 Elec 204: Digital Systems Design
4
Programmable Array Logic (PAL)
• The PAL is the opposite of the ROM, having a programmable set
of ANDs combined with fixed ORs.
• Disadvantage
– ROM guaranteed to implement any M functions of N
inputs. PAL may have too few inputs to the OR gates.
• Advantages
– For given internal complexity, a PAL can have larger N and M
– Some PALs have outputs that can be complemented, adding POS
functions
– No multilevel circuit implementations in ROM (without external
connections from output to input). PAL has
outputs from OR terms as internal inputs to all AND
terms, making implementation of multi-level circuits easier.
KU College of Engineering
Lecture 9 Elec 204: Digital Systems Design
5
AND gates inputs
Programmable Array Logic 0 1 2 3 4 5 6 7 8 9
X
Product 1
Example term
2
X X
F1
3
• 4-input, 3-output PAL with
I 1= A
fixed, 3-input OR terms X X X
4
• What are the equations for F1 X X
5 F2
through F4?
X X
F1 = C’ + A’B’ 6
I2 = B
F2 = A’BC’ + AC + AB’ X X
7
F3 = AD + BD + F1
X X
F4 = AB + CD + F1’ 8 F3
X
9
I3 = C
X X
10
X X
11 F4
X
12
I4 = D
0 1 2 3 4 5 6 7 8 9
KU College of Engineering
Lecture 9 Elec 204: Digital Systems Design
6
Programmable Logic Array (PLA)
• Compared to a ROM and a PAL, a PLA is the most flexible having a
programmable set of ANDs combined with a programmable set of
ORs.
• Advantages
– A PLA can have large N and M permitting implementation of equations
that are impractical for a ROM (because of the number of inputs, N,
required
– A PLA has all of its product terms connectable to all outputs, overcoming
the problem of the limited inputs to the PAL ORs
– Some PLAs have outputs that can be complemented, adding POS
functions
• Disadvantage
– Often, the product term count limits the application of a PLA. Two-level
multiple-output optimization reduces the number of product terms in an
implementation, helping to fit it into a PLA.
KU College of Engineering
Lecture 9 Elec 204: Digital Systems Design
7
Programmable Logic Array Example
A
What are the equations for F1 and F2?
B Could the PLA implement the
functions without the XOR gates?
C
X X 1 X X AB
X X 2 X BC X Fuse intact
Fuse blown
X X 3 X AC
X X 4 X AB
X 0
C C B B AA
X 1
F1
• 3-input, 3-output PLA with 4
product terms F2
KU College of Engineering
Lecture 9 Elec 204: Digital Systems Design
8
Combinational Functions and
Circuits
• Rudimentary logic functions
• Decoding
• Encoding
• Selecting
KU College of Engineering
Lecture 9 Elec 204: Digital Systems Design
9
Rudimentary Logic Functions
TABLE 4-1
• Functions of a single Functions ofOne Variable
variable X
X F=0 F=XF= X F=1
• Can be used on the
inputs to functional 0 0 0 1 1
blocks to implement 1 0 1 0 1
other than the block’s
V CC or V DD
intended function
1 F= 1 F= 1 X F= X
(c)
0 F= 0 F= 0
X F= X
KU College of Engineering
Lecture 9 Elec 204: Digital Systems Design
10
Multiple-bit Rudimentary Functions
• Multi-bit Examples:
A F3 A
3 2
1 F2 1 2 4 4 2:1 F(2:1)
F F
0 F1 0 1
0 (c)
A F0 A
(a) (b) 3
4 3,1:0 F(3), F(1:0)
F
(d)
• A wide line is used to represent a bus which is a vector signal
• In (b) of the example, F = (F3, F2, F1, F0) is a bus.
• The bus can be split into individual bits as shown in (b)
• Sets of bits can be split from the bus as shown in (c) for bits 2 and 1 of F.
• The sets of bits need not be continuous as shown in (d) for bits 3, 1, and 0
of F.
KU College of Engineering
Lecture 9 Elec 204: Digital Systems Design
11
Enabling Function
• Enabling permits an input signal to pass through to an
output
• Disabling blocks an input signal from passing through to
an output, replacing it with a fixed value
• The value on the output when it is disable can be Hi-Z (as
for three-state buffers and transmission gates), 0 , or 1
X
• When disabled, 0 output F
EN
• When disabled, 1 output
(a)
X
F
EN
(b)
KU College of Engineering
Lecture 9 Elec 204: Digital Systems Design
12
Decoders
• Multiple-input multiple-output logic circuit which
maps coded inputs to coded outputs
• n input bits can code upto 2n different output bits
• n-to-m decoder: maps n-bit input to m-bit output
where m < 2n
KU College of Engineering
Lecture 9 Elec 204: Digital Systems Design
13
Decoders
• General decoder structure
KU College of Engineering
Lecture 9 Elec 204: Digital Systems Design
14
Binary 2-to-4 decoder
KU College of Engineering
Lecture 9 Elec 204: Digital Systems Design
15
2-to-4-decoder logic diagram
m0=I1’I0’
m1=I1’I0
m2=I1I0’
m3=I1I0
KU College of Engineering
Lecture 9 Elec 204: Digital Systems Design
16
Decoder Expansion
3-to-8 decoder out of 2 2-to-4 decoders with enable
KU College of Engineering
Lecture 9 Elec 204: Digital Systems Design
17
Decoder and OR Gate Implementation of
a Binary Adder
• Arithmetic sum of three bits X,Y,Z
• Output pair (C,S)
S(X,Y,Z) = m(1,2,4,7)
C(X,Y,Z) = m(3,5,6,7)
KU College of Engineering
Lecture 9 Elec 204: Digital Systems Design
18
S(X,Y,Z) = m(1,2,4,7)
C(X,Y,Z) = m(3,5,6,7)
KU College of Engineering
Lecture 9 Elec 204: Digital Systems Design
19
Decoder Applications
• Microprocessor memory systems
– Selecting different banks of memory
• Microprocessor input/output systems
– Selecting different devices
• Microprocessor instruction decoding
– Enabling different functional units
• Memory chips
– Enabling different rows of memory depending on address
• Lots of other applications
– Seven segment decoder, 4-to-7 decoder
KU College of Engineering
Lecture 9 Elec 204: Digital Systems Design
20
Encoders vs. Decoders
Decoder Encoder
KU College of Engineering
Lecture 9 Elec 204: Digital Systems Design
21
Binary encoders
KU College of Engineering
Lecture 9 Elec 204: Digital Systems Design
22
Need priority in most applications
KU College of Engineering
Lecture 9 Elec 204: Digital Systems Design
23
Priority Encoder
KU College of Engineering
Lecture 9 Elec 204: Digital Systems Design
24
A0 = D3 + D1D2’
A1 = D2 + D3
V = D0 + D1 + D2 + D3
KU College of Engineering
Lecture 9 Elec 204: Digital Systems Design
25
Another approach to the design of
8-input priority encoder
KU College of Engineering
Lecture 9 Elec 204: Digital Systems Design
26
Priority-encoder logic equations
KU College of Engineering
Lecture 9 Elec 204: Digital Systems Design
27
Selecting
• Selecting of data or information is a critical
function in digital systems and computers
• Circuits that perform selecting have:
– A set of information inputs from which the selection is
made
– A single output
– A set of control lines for making the selection
• Logic circuits that perform selecting are called
multiplexers
• Selecting can also be done by three-state logic or
transmission gates
KU College of Engineering
Lecture 9 Elec 204: Digital Systems Design
28
Multiplexers
• MUX:
– Selects binary information from one of many input
lines and directs the information to a single output line.
– Selection of a particular input is controlled by a set of
input variables.
– # of selection control bits: n
2 n-to-1 MUX
– # of possible input lines: 2n
– # of output: 1
KU College of Engineering
Lecture 9 Elec 204: Digital Systems Design
29
Multiplexers
KU College of Engineering
Lecture 9 Elec 204: Digital Systems Design
30
4-to-1-Line MUX
KU College of Engineering
Lecture 9 Elec 204: Digital Systems Design
31
Quadruple 2-to-1-Line MUX
KU College of Engineering
Lecture 9 Elec 204: Digital Systems Design
32
Combinational Circuit Implementation
Using MUX
F(X,Y,Z)=m(1,2,6,7) using a 4-to-1 MUX
KU College of Engineering
Lecture 9 Elec 204: Digital Systems Design
33
F(A,B,C,D)=m(1,3,4,11,12,13,14,15)
KU College of Engineering
Lecture 9 Elec 204: Digital Systems Design
34
Demultiplexer
KU College of Engineering
Lecture 9 Elec 204: Digital Systems Design
35
Binary Adders
• Arithmetic circuits:
– combinational circuits with add, subt, mult & div.
• Present a hierarchical design
– Simple addition of two bits
• 0+0 = 02, 0+1 = 12, 1+0 = 12 and 1+1 = 102
– Half Adder:
• Combinational circuit that adds two bits
– Full Adder:
• Combinational circuit that adds three bits (two input, one
carry)
KU College of Engineering
Lecture 9 Elec 204: Digital Systems Design
36
Half Adder
S=X’Y+XY’
C=XY
KU College of Engineering
Lecture 9 Elec 204: Digital Systems Design
37
Full Adder
KU College of Engineering
Lecture 9 Elec 204: Digital Systems Design
38
Logic Diagram for Full Adder
XY Z
XY Z(XY)
XY + Z(XY)
KU College of Engineering
Lecture 9 Elec 204: Digital Systems Design
39
Binary Ripple Carry Adder
KU College of Engineering
Lecture 9 Elec 204: Digital Systems Design
40
Carry Lookahead Adder
KU College of Engineering
Lecture 9 Elec 204: Digital Systems Design
41
Binary Adder/Subtractor
KU College of Engineering
Lecture 9 Elec 204: Digital Systems Design
42
Overflow
KU College of Engineering
Lecture 9 Elec 204: Digital Systems Design
43
Binary Multipliers
KU College of Engineering
Lecture 9 Elec 204: Digital Systems Design
44
4-bit by 3-bit multiplier
KU College of Engineering
Lecture 9 Elec 204: Digital Systems Design
45