Professional Documents
Culture Documents
Lecture2 PLDs
Lecture2 PLDs
Introduction
Multiplexers
Three-State Buffers
Decoders and Encoders
Read-Only Memories
Programmable Logic Devices
– Programmable Logic Arrays
– Programmable Array Logic
Complex Programmable Logic Devices
Field Programmable Gate Arrays
– Decomposition of Switching Functions
VHDL Description of Combinational Circuits
VHDL Models for Multiplexers
VHDL Modules
Signals and Constants
Arrays
VHDL Operators
Packages and Libraries
IEEE Standard Logic
Compilation and Simulation of VHDL Code
2 21/04/1438 PLDs: Lecture2
Introduction
Z = A’I0 + AI1 2n - 1
D = B’A + BC
Inputs
Outputs
PLA with 3-inputs, 5 product terms, and 4 outputs (Equivalent AND-OR circuit)
Equations
F0 = A + B C
Example: F1 = A C + A B
F2 = B C + A B
F3 = B C + A
Personality Matrix
Input Side:
Product Inputs Outputs
term
1 = asserted in term
A B C F0 F 1 F 2 F 3 0 = negated in term
AB 1 1 - 0 1 1 0 - = does not participate
BC - 0 1 0 0 0 1 Reuse
0 1 0 0 of Output Side:
AC 1 - 0
tterms
BC - 0 0 1 0 1 0 1 = term connected to output
A 1 - - 1 0 0 1 0 = no connection to output
PLA Logic Implementation
Example Continued - Unprogrammed device
A B C
All possible connections are available
before programming
F0 F1 F2 F3
PLA Logic Implementation
Example Continued - A B C
Programmed part Unwanted connections are "blown"
AB
BC
AC
BC
A Programmable
OR Plane
B
Programmable
AND Plane
C C B B A A
F1 F2
Example using PLA
F1(A, B, C) m(0,1,2,4)
F2(A, B, C) m(0,5,6,7)
F1 A B AC BC
F1 AB AC BC
F2 AB AC A BC
Example using PLA
A F1 AB AC BC
B F2 AB AC A BC
C
AB
AC
BC
ABC
C C B B A A
F1
F2
PLA Logic Implementation
Alternative representation Unprogrammed device
Short-hand notation
so we don't have to
draw all the wires!
X at junction indicates A B C D
a connection
AB
AB
CD
Notation for implementing
CD
F0 = A B + A B
Programmed device
F1 = C D + C D
AB+AB CD+CD
PLA Logic Implementation
A B C
Design Example
ABC
Multiple functions of A, B, C A
B
F1 = A B C C
A
F2 = A + B + C
B
F3 = A B C C
ABC
F4 = A + B + C
ABC
F5 = A B C ABC
ABC
F6 = A B C ABC
ABC
ABC
F1 F2 F3 F4 F5 F6
PALs and PLAs
What is difference between Programmable Array Logic (PAL) and
Programmable Logic Array (PLA)?
3 Inputs
SUM of PRODUCTS
Black Box Truth Table
(Look Up Table LUT)
3 Inputs
SUM of PRODUCTS
Black Box Truth Table
(Look Up Table LUT)
3 Inputs
SUM of PRODUCTS
Black Box Truth Table
(Look Up Table LUT)
Sums
Programmed PLD
Product Terms
Programmed PLD
Sums
Product Terms
x x x
Programmed PLD
x x
Sums
Product Terms
GLUE LOGIC
x x x x
Programmed PLD
x x x
Sums
Product Terms
A B C D W X Y Z CD 00 01 11 10 CD 00 01 11 10
0 0 0 0 0 0 0 0 00 0 0 X 1 00 0 1 X 0
0 0 0 1 0 0 0 1
0 0 1 0 0 0 1 1 01 0 1 X 1 01 0 1 X 0
0 0 1 1 0 0 1 0 D D
0 1 0 0 0 1 1 0 11 0 1 X X 11 0 0 X X
0 1 0 1 1 1 1 0 C C
0 1 1 0 1 0 1 0 10 0 1 X X 10 0 0 X X
0 1 1 1 1 0 1 1
1 0 0 0 1 0 0 1 B B
1 0 0 1 1 0 0 0 K-map for W K-map for X
1 0 1 0 X X X X
1 0 1 1 X X X X
A A
1 1 0 0 X X X X AB AB
1 1 0 1 X X X X CD 00 01 11 10 CD 00 01 11 10
1 1 1 0 X X X X 00 0 1 X 0 00 0 0 X 1
1 1 1 1 X X X X
01 0 1 X 0 01 1 0 X 0
Minimized Functions: D D
11 1 1 X X 11 0 1 X X
C C
W=A+BD+BC 10 1 1 X X 10 1 0 X X
X=BC
Y=B+C B B
Z=ABCD+BCD+AD+BCD K-map for Y K-map for Z
PAL Device Design Example
A A B B C C D D IO1 IO1
IO1
Not programmed
A
IO2
B
IO1 ABC A BC D
Example term
2
X X
F1
I 1= A
• 4-input, 3-output PAL with 4
X X X
F1 through F4? I2 = B
F1 = C’ + A’B’ 7
X X
F2 = A’BC’ + AC + AB’ X X F3
8
F3 = AD + BD + F1 X
9
F4 = AB + CD + F1’ I3 = C
X X
10
X X
11 F4
X
12
I4 = D
0 1 2 3 4 5 6 7 8 9
PAL - Programmable Array Logic
50
Flip-flops store the value produced by the OR gate output at a particular
point and can hold it indefinitely.
2-to-1 multiplexer selects an output from the OR gate output or the flip-flop
output. Tri-state buffers are placed between multiplexer and the PAL output.
Multiplexer’s output is fed back to the AND plane in PAL, which allows the
multiplexer signal to be used internally in the PAL. This facilitates the
implementation of circuits that have multiple stages (levels or logic gates).
51
Select Enable
f1
Flip-flop
D Q
Clock
To AND plane
For additional flexibility, extra circuitry is added at the output of each OR gate.
This is also referred to macrocell.
52
Example: FSM Implementation
S2 = P’ Q y1, R2 = y2,
S1 = P’ Q’ , R1 = Q + P
Z= y2 y1’ P Q’ ,
53
Internal Structures of PLD
A B
2-to-4 decoder
AND array
A A B B AB
AB
AB AB
Product
AB lines
AB
AB AB
If blown, OR
Fuse input is logic 0.
Input lines OR
array
O1 O2 O3 O4
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
AND array O1 O2 O3 O4
(programmable)
PAL
• Programmable Array Logic (PAL)
– The input lines to the AND array are programmable
and the output lines to the OR array are hard-wired
– Simplify the logic function (e.g. using K-map) before
putting design into PLA.
K-maps
PLA Logic Implementation
Another Example: Magnitude Comparator A B C D
A A ABCD
AB AB
CD 00 01 11 10 CD 00 01 11 10
ABCD
00 1 0 0 0 00 0 1 1 1
ABCD
01 0 1 0 0 01 1 0 1 1
D D ABCD
11 0 0 1 0 11 1 1 0 1
C C AC
10 0 0 0 1 10 1 1 1 0
AC
B B
BD
K-map for EQ K-map for NE
BD
A A
AB AB
00 01 11 10 00 01 11 10
ABD
CD CD
00 0 0 0 0 00 0 1 1 1 BCD
01 1 0 0 0 01 0 0 1 1 ABC
D D
BCD
11 1 1 0 1 11 0 0 0 0
C C
10 1 1 0 0 10 0 0 1 0
B B
EQ NE LT GT
K-map for LT K-map for GT
PAL
D C B A
OR array
(hard-wired)
0 AB
1 CD
2 0
3 ABC
4 0
5 0
6 0
7 ABCD
8 ABCD
9 0
10 0
11 A
12 BD
13 CD
14 0
15 0
AND array
(programmable) O1 O2 O3 O4
PAL Logic Implementation
Programmed PAL: A B C D
A
BD
BC
Minimized Functions:
0
W=A+BD+BC BC
X=BC 0
Y=B+C 0
Z=ABCD+BCD+AD+BCD 0
B
C
0
0
ABCD
BCD
AD
BCD