Introduction To Programmable Logic Devices
Introduction To Programmable Logic Devices
Devices
Design approaches for digital circuits
Introduction
• So far we have discussed various digital ICs for performing basic digital
operations and other functions, such as adders, comparators, arithmetic logic
unit, multiplexers, demultiplexers, code converters, shift registers, counters etc.
These ICs, due to their fix function are known as fixed function ICs. These ICs
are designed by their manufacturers and produced in large quantities to satisfy
the needs of a wide variety of applications.
• We have seen the design of digital circuits using fixed function ICs. There are
two more approaches for the design of digital circuits.
• In the fixed function IC approach, we have to use various fixed function ICs to
implement different functional blocks in the digital circuit. On the other hand, in
ASIC, a single IC is designed and manufactured to implement the entire circuit.
In the third approach programmable logic devices are used to implement logic
functions. The main advantage of PLD approach is that PLDs can be easily
configurable by the individual user for specific applications. The Table 9.1.1
shows the comparison between these three design approaches.
• PLDs can be reprogrammed in few seconds and hence gives more flexibility to
experiment with designs. Reprogramming feature of PLDs also make it possible
accept changes/modifications in the previously design circuits. These two main
advantages and others discussed in Table 9.1.1 make PLDs very popular in
digital design.
• The Fig. 9.2.2 shows the internal logic construction of a 64 × 4 PROM. The
six input variables are decoded in 64 lines by means of 64 AND gates and 6
inverters. Each output of the decoder represents one of the minterms of a
function of six variables. The 64 outputs of the decoder are connected through
fuses to each OR gate. Only four of these fuses are shown in the diagram, but
actually each OR gate has 64 inputs and each input goes through a fuse that can
be blown as desired.
• The PROM is a two level implementation in sum of minterms form. Let us see
AND-OR and AND-OR-INVERTER implementation of PROM. Fig. 9.2.3
shows the 4 × 2 PROM with AND-OR and AND-OR-INVERTER
implementations.
1. AND Matrix
• The Fig. 9.2.4 shows the AND matrix. It is used to form product terms. It has
m AND gates with 2n-inputs and m-outputs, one for each AND gate. The Fig.
9.2.4 shows the AND gates formed by diodes and resistors structure. Each AND
gate has all the input variables in complemented and uncomplemented form.
There is a nichrome fuse link in series with each diode which can be bum out to
disconnect particular input for that AND gate. Before programming, all fuse
links are intact and the product term for each AND gate is given by
• The Fig. 9.2.5 shows the simplified and equivalent representation of input
connections for one AND gate. The array logic symbol shown in Fig. 9.2.5 (b)
uses a single horizontal line connected to the gate input and multiple vertical
lines to indicate the individual inputs. Each intersection between horizontal line
and vertical line indicates the fuse connection.
• The Fig. 9.2.6 shows the simplified representation of AND matrix with input
buffer.
2. OR Matrix
• The OR matrix is provided to produce the logical sum of the product term
outputs of the AND matrix. The Fig. 9.2.7 shows the OR gates formed by
diodes and resistors structure. Each OR gate has all the product terms as input
variables. There is a nichrome fuse link in series with each diode which can be
bum out to disconnect particular product term for that OR gate. Before
programming, all fuse link in OR matrix are also intact and the sum term for
each OR gate is given by,
• The Fig. 9.2.8 shows the simplified and equivalent representation of input
connections for one OR gate.
• The Fig. 9.2.9 shows the simplified representation of OR matrix.
is as shown in Fig. 9.2.10. In both the cases if fuse is intact the output is in its
uncomplemented form; otherwise output is in the complemented form.
4. Combinational Logic Implementation using PROM
• Looking at the logic diagram of the PROM, we can realize that each output
provides the sum of all the minterms of n-input variables. We know that any
Boolean function can be expressed in sum of minterms form. By breaking the
links of those minterms not included in the function, each PROM output can be
made to represent the Boolean function of one of the output variables in the
combinational circuit. For an n-input, m-output combinational circuit, we need a
2n × m PROM.
F1 (a, b, c) = ∑ m (0, 1, 3, 5, 7)
F2 (a, b, c) = ∑ m (1, 2, 5, 6)
Sol. : The given functions have three inputs. They generate 2 3 = 8 minterms and
since there are two functions, there are two outputs. The functions can be
realized as shown in Fig. 9.2.11.
The Fig. 9.2.12 shows the block diagram and truth table of PROM.
Ex. 9.2.2 Design a combinational using a PROM. The circuit accepts 3-bit
binary number and generates its equivalent Excess-3 code.
Sol. : Let us derive the truth table for the given combination circuit. Table 9.2.1
shows the truth table.
• In practice when we are designing combinational circuits with PROM, it is not
necessary to show the internal gate connections of fuses inside the unit, as
shown in the Fig. 9.2.13.
This was shown for demonstration purpose only. The designer has to only
specify the PROM (inputs and outputs) and its truth table, as shown in the Fig.
9.2.14.
Examples with Solutions
Ex. 9.2.3 Design a combinational circuit using ROM. The circuit accepts 3-
bit number and generates an output binary number equal to square of input
number.
AU : May-10, Marks 16
Sol.
Ex. 9.2.4 Design ROM for the following functions
F1 = ∑ (1,2,3); F2 = ∑ (0,2)
Sol. : The given functions have 4 minterms. To generate four minterms and two
outputs we need 4 x 2 ROM. For 4x2 ROM, there are two address inputs and
two data outputs.
Examples for Practice
Ex. 9.2.5 Design a switching circuit that converts a 4 bit binary code into a 4
bit Gray code using ROM array.
Ex. 9.2.6 Design a 3-bit gray to binary code converter using suitable ROM.
• The combinational circuit do not use all the minterms every time.
Occasionally, they have don't care conditions. Don't care condition when
implemented with a PROM becomes an address input that will never occur.
The result is that not all the bit patterns available in the PROM are used, which
may be considered a waste of available equipment.
• For cases where the number of don't care conditions is excessive, it is more
economical to use a second type of LSI component called a Programmable
Logic Array (PLA). A PLA is similar to a PROM in concept; however it does not
provide full decoding of the variables and does not generates all the minterms
as in the PROM. The PLA replaces decoder by group of AND gates, each of
which can be programmed to generate a product term of the input variables.
In PLA, both AND and OR gates have fuses at the inputs, therefore in PLA both
AND and OR gates are programmable. Fig. 6.6.17 shows the block diagram of
PLA. It consists of n-inputs, output buffer with m outputs, m product terms, m
sum terms, input and output buffers. The product terms constitute a group of
m AND gates and the sum terms constitute a group of m OR gates, called OR
matrix. Fuses are inserted between all n-inputs and their complement values
to each of the AND gates. Fuses are also provided between the outputs of the
AND gates and the inputs of the OR gates. The third set of fuses in the output
inverters allows the output function to be generated either in the AND-OR
form or in the AND-OR-INVERT form. When inverter is bypassed by link we get
AND-OR implementation. To get AND-OR-INVERTER implementation inverter
link has to be disconnected.
1. Input Buffer
• Input buffers are provided in the PLA to limit loading of the sources that drive
the inputs. They also provide inverted and non-inverted form of inputs at its
output. The Fig. 9.3.2 shows two ways of representing input buffer for single
input.
2. Output Buffer
The driving capacity of PLA is increased by providing buffers at the output.
They are usually 1 IL compatible. The Fig. 9.3.3 shows the tri-state, 1 IL
compatible output buffer. The output buffer may provide totem-pole, open
collector or tri-state output.
F1 = ∑ m (3,5,7), F2 = ∑ m (4,5,7)
Implement the circuit with a PLA having 3 inputs, 3 product terms and two
outputs.
Solution :
The Boolean functions are simplified, as shown in the Fig. 9.3.5. The simplified
functions in sum of products are obtained from the maps are :
Step 3 : Implementation
Step 2 : Implementation
Ex. 9.3.3 Implement the following multiboolean function using 3 × 4 × 2 PLA
PLD.
Sol. :
Step 2 : Implementation
PLA
As shown in the Fig. 9.3.10 exclusive-OR gate is programmed to invert the
function to get the desired function outputs.
Ex. 9.3.4 Design a BCD to Excess-3 code converter and implement using
suitable PLA.
Sol. :
Ex. 9.3.5 Design and implement 3-bit binary to gray code converter using
PLA.
Sol. :
Step 1 : Derive the truth table for 3-bit binary to gray code converter
Step 2 : Simplify the Boolean functions for gray code
Step 3 : Implementation
Ex. 9.3.6 Design a combinational circuit using PLA. The circuit accepts 3-bit
number and generates an output binary number equal to square of input
number.
Sol . :
F1 (A, B, C) = ∑ (0, 1, 2, 4)
F2 (A, B, C) = ∑ (0, 5, 6, 7)
Sol . :
F1 (A, B, C) = ∑ (3, 5, 6, 7)
Implement the circuit with a PLA having three inputs, four product terms and
two outputs.
AU : Dec.-05, Marks 6
Sol . :
Step 2 : Implementation
Ex. 9.3.9 Design a PLA structure using AND and OR logic for the following
functions.
Sol. :
AU : Dec.-16, Marks 10
Step : 2 Implementation
Examples for Practice
F1 (A, B, C) = ∑ (0, 1, 2, 4)
F2 (A, B, C) = ∑ (0, 5, 6, 7)
F3 (A, B, C) = ∑ (0, 3, 5, 7).
Implement the digital circuit with a PLA having 3 inputs, 3 product terms, and 2
outputs.
Ex. 9.3.13 Design and implement a 4-bit binary to Gray code converter
using a PLA.
f(x, y, z) = ∑m (0, 2, 4, 6)
• We have seen that PLA is a device with a programmable AND array and
programmable OR array. However, PAL programmable array logic is a
programmable logic device with a fixed OR array and a programmable AND
array. Because only AND gates are programmable, the PAL is easier to
program, but is not as flexible as the PLA. Fig. 9.4.1 shows the array logic of a
typical PAL. It has four inputs and four outputs. Each input has buffer and an
inverter gate. It is important to note that two gates are shown with one
composite graphic symbol with normal and complement outputs. There are
four sections. Each section has three programmable AND gates and one fixed
OR gate. The output of section 1 is connected to a buffer-inverter gate and
then fed back into the inputs of the AND gates, through fuses. This allows the
logic designer to feed an output function back as an input variable to create a
new function. Such PALs are referred to as Programmable I/O PALs.
• The commercial PAL devices has more gates than the one shown in Fig. 9.4.1.
A typical PAL integrated circuit may have eight inputs, eight outputs, and eight
sections, each consisting of an eight wide AND-OR array.
1. Implementation of combinational Logic Circuit using
PAL
• Let us see the implementation of a combinational circuit using PAL with the
help of examples.
Sol. :
Note that function x has four product terms. Three of them are equal to w.
Therefore we can write
Step 2 : Implementation
In the last section we have seen the PLA program table. The program table for
PAL is similar to PLA program table. Table 9.4.1 shows PAL program table with
product terms, AND inputs and outputs.
Ex. 9.4.2 Design BCD to Excess-3 converter using PAL.
Step 3 : Implementation
Ex. 9.4.3 Generate the following Boolean functions with a PAL with 4 inputs
and 4 outputs.
Sol. :
Step 2 : Implementation
Ex. 9.4.4 Show how to program the fusible links to get a 4 bit gray code from
the binary inputs using PLA and PAL and compare the design requirements
with PROM.
For PLA both AND-array and OR-Array have fusible links. From simplified
Boolean expression we have seven product terms and these can be
implemented using seven eight-input AND gates. We need four OR-gates for
four-bit gray code output. Thus we need 4 × 7 × 4 PLA in place of 16 × 4 PROM.
There are (8 + 4) × 7 = 84 fusible links compared to 64 fusible links in PROM.
Fig. 9.4.7 shows implementation of 4-bit binary to gray code converter using 4
× 7 × 4 PLA.
Implementation using PAL
For PAL, AND array is programmable and has fusible links. From simplified
Boolean expression we have seven product terms and these can be
implemented using seven eight input AND gates. We need four OR-gates for
four-bit gray code output. Thus we need 7x4 PAL in place of 16x4 PROM. There
are 7 x 8 = 56 fusible links compared to 64 fusible links in PROM. Fig. 9.4.8
shows implementation of 4-bit binary to gray code converter using PAL.
Example for Practice
Implement the circuit with a PAL having three inputs, three product terms
and two
• SPLDs have limitations of number of input product terms and outputs. For
applications which requires more number of inputs or product terms or output
we have to expand the capacity of PLDs by cascading them.
1. Block Diagram
• The Fig. 9.6.2 shows the block diagram of a Complex Programmable Logic
Device (CPLD).
• It consists of collection of PAL like blocks, I/O blocks and a set of
interconnection wires, called programmable interconnection structure.
• A PAL like block in the CPLD usually consists of about 16 macrocells. Like
other macrocells, the macrocell in CPLD consists of AND-OR configuration, an
EX-OR gate, a flip-flop, a multiplexer, and a tri-state buffer.
• The Fig. 9.6.3 shows the typical macrocell for CPLD. Each AND-OR
configuration usually consists of 5-20 AND gates and an OR gate with 5-20
inputs.
• The EX-OR gate provides the output of OR-gate in inverted or non-inverted
form as per the fuse link status.
• A multiplexer selects either the output of the D flip-flop or the output of the
EX-OR gate depending upon its select input (either 1 or 0).
• The tri-state buffer acts as a switch which enables or disables the output.
• As compared to standard gate arrays, the field programmable gate arrays are
larger devices. The basic cell structure for FPGA is some what complicated than
the basic cell structure of standard gate array. The programmable logic blocks
of FPGAs are called logic blocks or Configurable Logic Blocks(CLBs).
Sol. : Two input LUT has 22 × 1-bit memory, i.e. 4 × 1-bit memory. We can
implement the given function with 2-input LUT as shown in the Fig. 9.7.5.
The bit corresponding of the two-inputs of one bit wide memory array are
available at the output of LUT. For example, if inputs AB are 00, the bit from
first location is available at the output. Storing logic 1 at bit 0 and bit 3
positions, and storing logic 0 at bit 1 and bit 2 positions we can implement the
given function.
Ex. 9.7.2 Explain the three input LUT with implementation of a full adder.
Sol. : Fig. 9.7.6 shows an 8 × 2 LUT is programmed as a full adder. The sum
and carry out expressions for a full-adder are as follows :
Interconnection Technology
Ans. : Programmable Logic Devices consist of a large array of AND gates and
OR gates that can be programmed to achieve specific logic functions.
Ans. : PLA stands for Programmable Logic Array, which is a LSI component.
In PLA, both AND and OR gates have fuses at the inputs, therefore in PLA both
AND and OR gates are programmable. The outputs from OR gates go through
fuses as inputs to output inverters so that final output can be programmed as
either AND-OR or AND-OR-INVERT.
Ans. : The input variables to a PAL are buffered to prevent loading by the large
number of AND gate inputs to which available or its complement can be
connected.
Ans. : PROM stands for programmable read only memory. It has fixed AND
array and programmable OR array. It can be used to implement boolean
functions in standard SOP form.
(Regulation 2013)
Dec.-16
May-17
f1(x,y,z) = ∑m(1,3,5,7)
f2 (x,y,z) = ∑ m(2,4,6)
Dec.-17