Programmable Logic Devices
Programmable Logic Devices
Programmable Logic Devices
Devices
PLD
• A programmable logic device (or PLD) is a general name for a digital
integrated circuit capable of being programmed to provide a variety of
different logic functions.
• Simple combinational PLDs are capable of realizing from 2 to 10
functions of 4 to 16 variables with a single integrated circuit. More
complex PLDs may contain thousands of gates and flip-flops.
• Thus, a single PLD can replace a large number of integrated circuits, and
this leads to lower cost designs.
• When a digital system is designed using a PLD, changes in the design can
easily be made by changing the programming of the PLD without having
to change the wiring in the system.
Programmable Logic Arrays
• A programmable logic array (PLA) performs the same basic function as a ROM.
• A PLA with n inputs and m outputs can realize m functions of n variables. The
internal organization of the PLA is different from that of the ROM. The decoder is
replaced with an AND array which realizes selected product terms of the input
variables. The OR array ORs together the product terms needed to form the output
functions, so a PLA implements a sum-of-products expression, while a ROM directly
implements a truth table.
And-Or Equivalent
• f1 = Σ m(2, 3, 5, 7, 8, 9, 10, 11, 13, 15)
• f2 = Σ m(2, 3, 5, 6, 7, 10, 11, 14, 15)
• f3 = Σ m(6, 7, 8, 9, 13, 14, 15)
• f1 = a′bd + abd + ab′c′ + b′c
• f2 = c + a′bd
• f3 = bc + ab′c′ + abd PLA table
• we can construct a PLA table, Figure with one row for each distinct
product term.
• Figure shows the corresponding PLA structure, which has four inputs,
six product terms, and three outputs. A dot at the intersection of a
word line and an input or output line indicates the presence of a
switching element in the array.
PLA structure
• To determine the value of fi for a given input combination, the values
of fi in the selected rows of the PLA table must be ORed together. The
following examples refer to the PLA table of Previous Figure .
• If abcd = 0001, no rows are selected, and all f ’s are 0. If abcd = 1001,
only the third row is selected, and f1 f2 f3 = 101. If abcd = 0111, the
first, fifth, and sixth rows are selected. Therefore, f1 = 1 + 0 + 0 = 1, f2
= 1 + 1 + 0 = 1, and f3 = 0 + 0 + 1 = 1.
Programmable Array Logic
• The PAL (programmable array logic) is a special case of the programmable logic array in
which the AND array is programmable and the OR array is fixed. The basic structure of
the PAL is the same as the PLA shown in Figure
• Because only the AND array is programmable, the PAL is less expensive than the more
general PLA, and the PAL is easier to program.
• For this reason, logic designers frequently use PALs to replace individual logic gates
when several logic functions must be realized.
• Figure represents a segment of an unprogrammed PAL.
• The symbol represents an input buffer which is logically
equivalent to
• A buffer is used because each PAL input must drive many AND gate
inputs. When the PAL is programmed, some of the interconnection
points are programmed to make the desired connections to the AND
gate inputs. Connections to the AND gate inputs in a PAL are
represented by X’s as shown:
• When designing with PALs, we must simplify our logic equations and
try to fit them into one (or more) of the available PALs. Unlike the
more general PLA, the AND terms cannot be shared among two or
more OR gates; therefore, each function to be realized can be
simplified by itself without regard to common terms. For a given type
of PAL, the number of AND terms that feed each output OR gate is
fixed and limited. If the number of AND terms in a simplified function
is too large, we may be forced to choose a PAL with more gate inputs
and fewer outputs.
• As an example of programming a PAL, we will implement a full adder.
The logic equations for the full adder are
• Sum = X′Y′Cin + X′YC′in + XY′C′in + XYCin
• Cout = XCin + YCin + XY
• Figure 9-33 shows a section of a PAL where each OR gate is driven by
four AND gates. The X’s on the diagram show the connections that are
programmed into the PAL to implement the full adder equations. For
example, the first row of X’s implements
• the product term X′Y′Cin.
Implementation of a Full Adder
Using a PAL
Complex Programmable Logic
Devices
• Instead of a single PAL or PLA on a chip, many PALs or PLAs can be placed on a single
CPLD chip and interconnected. When storage elements such as flip-flops are also
included on the same IC, a small digital system can be implemented with a single CPLD.
• This CPLD has four function blocks, and each block has 16 associated macrocells (MC1,
MC2, . . .). Each function block is a programmable AND-OR array that is configured as a
PLA.
• Each macrocell contains a flip-flop and multiplexers that route signals from the function
block to the input-output (I/O) block or to the interconnect array (IA). The IA selects
signals from the macrocell outputs or I/O blocks and connects them back to function
block inputs.
• Thus, a signal generated in one function block can be used as an input to any other
function block. The I/O blocks provide an interface between the bi-directional I/O pins
on the IC and the interior of the CPLD.
basic architecture of a Xilinx
XCR3064XL CPLD
Basic architecture of a Xilinx
XCR3064XL CPLD
• CPLD has four function blocks, and each block has 16 associated macrocells
(MC1, MC2, . . .). Each function block is a programmable AND-OR array that
is configured as a PLA.
• Each macrocell contains a flip-flop and multiplexers that route signals from
the function block to the input-output (I/O) block or to the interconnect
array (IA).
• The IA selects signals from the macrocell outputs or I/O blocks and
connects them back to function block inputs. Thus, a signal generated in
one function block can be used as an input to any other function block.
• The I/O blocks provide an interface between the bi-directional I/O pins on
the IC and the interior of the CPLD.
how a signal generated in the PLA is
routed to an I/O pin through a macrocell.
• Any of the 36 outputs from the IA (or their complements) can be connected to
any inputs of the 48 AND gates. Each OR gate can accept up to 48 product
term inputs from the AND array.
• The macrocell logic in this diagram is a simplified version of the actual logic.
The first MUX (1) can be programmed to select the OR-gate output or its
complement.
• The MUX (2) at the output of the macrocell can be programmed to select
either the combinational output (G) or the flip-flop output (Q). This output
goes to the interconnect array and to the output cell.
• The output cell includes a three-state buffer (3) to drive the I/O pin. The buffer
enable input can be programmed from several sources. When the I/O pin is
used as an input, the buffer must be disabled.
Field-Programmable Gate Arrays
•
• (1)
K-map for equation (1)
• The left half of the map where a = 0 is in effect a 3-variable map for f0(b, c, d). Looping terms on the left half
gives f0 = c′d′ + b′c + cd, which is the same as the previous result. Similarly the right half where a = 1 is a 3-
variable map for f1(b, c, d), and looping terms on the right half gives f1 = c′ + bd. The expressions for f0 and
f1 obtained from the map are the same as those obtained algebraically in Equation
General form of Shannon’s expansion
theorem
• The general form of Shannon’s expansion theorem for expanding an n-
variable function about the variable xi is
• f(x1, x2, . . . , xi–1, xi, xi+1, . . . , xn) = xi′ f(x1, x2, . . . , xi–1, 0, xi+1, . . . , xn) + xi f(x1, x2, . . . , xi–1, 1, xi+1, . . . , xn)
= xi′ f0 + xi f1 ------------------------- (2)