Digital System Design
PLA & PAL
Any Boolean function can be written as a sum of products, which is an OR of AND terms. Programmable logic devices exploit this directly: they contain a grid of AND gates and a grid of OR gates, with connections you can program. Instead of wiring a new circuit for every design, you program one standard chip. The PLA (programmable logic array) and the PAL (programmable array logic) are the two classic devices of this type, and they are the ancestors of today's CPLDs.
Learning objectives
By the end of this lesson you will be able to:
- Describe the AND array and OR array structure of a PLA.
- Explain how a PAL differs from a PLA and from a PROM.
- Program a PLA from a set of sum-of-products equations.
- Count product terms and programmable crosspoints.
- Decide when a PAL is enough and when a PLA is needed.
The AND-OR structure
Both devices have the same overall shape:
- Inputs and their complements. Each input is available in true and complemented form, so a product term can use A or A'.
- AND array. Each horizontal line is a product term. A programmable connection (a crosspoint) decides which input literals feed that AND gate.
- OR array. The product terms are combined by OR gates to form each output.
- Outputs. Some devices add a flip-flop or an output inverter after the OR gate.
Because a sum of products is a two-level AND-OR expression, any function from a truth table can be programmed, as long as the device has enough product terms. You can get a minimal expression first with the K-map solver, which reduces the number of terms needed.
PROM, PAL and PLA compared
The three devices differ in which array is programmable.
| Device | AND array | OR array | Flexibility |
|---|---|---|---|
| PROM | Fixed (decodes all input combinations) | Programmable | A full look-up table, so cost doubles per input |
| PAL | Programmable | Fixed | Each output has a set number of product terms |
| PLA | Programmable | Programmable | Product terms can be shared between outputs |
- A PROM is a ROM viewed as logic. Its fixed AND array generates every minterm, so a function of n inputs always uses 2^n terms. It is wasteful for functions with few terms.
- A PAL has a programmable AND array but a fixed OR array. Each output is connected to a fixed group of product terms, such as 2, 4 or 8. It is cheaper and faster than a PLA, which is why PALs were so widely used.
- A PLA has both arrays programmable, so a product term can feed several outputs and the number of terms per output is not fixed.
Counting crosspoints
For a PLA with n inputs, p product terms and m outputs:
- AND array crosspoints = 2 x n x p, because each product line can connect to n true inputs and n complemented inputs.
- OR array crosspoints = p x m.
- Total programmable crosspoints = 2np + pm.
This count measures the size of the device and the work needed to program it.
Worked example 1: Programming a PLA with shared terms
Implement these two functions of three inputs A, B, C:
- F1 = AB + A'C
- F2 = AB + BC'
The product terms are P1 = AB, P2 = A'C and P3 = BC'. Notice that P1 appears in both functions, so a PLA needs only 3 product lines.
The AND array programming (1 means the true input is connected, 0 the complemented input, a dash means not connected):
| Term | A | B | C |
|---|---|---|---|
| P1 = AB | 1 | 1 | - |
| P2 = A'C | 0 | - | 1 |
| P3 = BC' | - | 1 | 0 |
The OR array programming:
| Term | F1 | F2 |
|---|---|---|
| P1 | 1 | 1 |
| P2 | 1 | 0 |
| P3 | 0 | 1 |
The resulting truth table, which you can confirm with the truth table generator:
| A | B | C | F1 | F2 |
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 1 | 0 |
| 0 | 1 | 0 | 0 | 1 |
| 0 | 1 | 1 | 1 | 0 |
| 1 | 0 | 0 | 0 | 0 |
| 1 | 0 | 1 | 0 | 0 |
| 1 | 1 | 0 | 1 | 1 |
| 1 | 1 | 1 | 1 | 1 |
Crosspoints for this PLA, with n = 3, p = 3 and m = 2: 2 x 3 x 3 = 18 in the AND array, plus 3 x 2 = 6 in the OR array, for a total of 24.
Worked example 2: The same functions in a PAL
Suppose a PAL gives each output 2 product terms. F1 has two terms and F2 has two terms, so both fit.
- F1 uses AND gates for AB and A'C.
- F2 uses its own AND gates for AB and BC'.
Because the OR array is fixed, the term AB cannot be shared. The PAL builds it twice, so it uses 4 AND gates where the PLA used 3. That is the price of the fixed OR array. If F2 had needed three terms, a PAL with only two terms per output could not implement it directly. You would have to simplify the function, or split it across two outputs using feedback.
Worked example 3: A full adder in a PLA
A full adder with inputs A, B, C (C is the carry-in) has these outputs:
- Sum = A'B'C + A'BC' + AB'C' + ABC (4 product terms)
- Carry = AB + AC + BC (3 product terms)
None of these seven terms is the same as another, so a PLA needs 7 product lines. With n = 3, p = 7 and m = 2:
- AND array crosspoints = 2 x 3 x 7 = 42.
- OR array crosspoints = 7 x 2 = 14.
- Total = 56.
Compare this with the PROM implementation from the RAM and ROM lesson: an 8 x 2 ROM stores 8 x 2 = 16 bits. For a function this small, the ROM is simpler. The PLA wins when there are many inputs but few product terms, such as a 16-input control decoder that needs only a handful of terms. A PROM for 16 inputs would need 65,536 words.
From PAL to CPLD
A PAL gave each output its own small group of product terms. A modern CPLD, which you will study in the CPLD vs FPGA lesson, packs many PAL-style blocks on one chip, joins them with a switching matrix, and adds a flip-flop to each output. The idea is the same: programmable AND, fixed OR, and a sum of products per output.
Common mistakes
- Forgetting complemented inputs. The AND array needs access to both A and A'. Each input counts twice in the 2np formula.
- Assuming a PAL can share terms. The fixed OR array cannot, so duplicated terms use extra AND gates.
- Exceeding the terms per output. A PAL output with 2 terms cannot hold a function with 3 terms.
- Programming the OR array of a PAL. The OR array is fixed. Only the AND array is programmed.
- Skipping minimization. Fewer product terms means a smaller device and fewer programmed crosspoints.
Practice problems
Problem 1. How many programmable crosspoints does a PLA with 4 inputs, 6 product terms and 3 outputs have?
Answer: AND array 2 x 4 x 6 = 48, OR array 6 x 3 = 18, total 66.
Problem 2. A PAL has 2 product terms per output. Can it implement F = AB + CD + EF directly?
Answer: No. The function needs 3 product terms, which is more than the 2 available. It must be simplified or split using feedback through another output.
Problem 3. In a PLA, how would you program the product term A'C for inputs A, B, C?
Answer: Connect the complement of A and the true input C to that AND line, and leave B unconnected. In the table form this is 0, dash, 1.
Problem 4. A full adder uses Sum as four minterms and Carry as AB + AC + BC. How many product lines and crosspoints does a PLA need?
Answer: 7 distinct product lines, so 2 x 3 x 7 + 7 x 2 = 56 crosspoints.
Frequently asked questions
What is the main difference between a PLA and a PAL? In a PLA both the AND array and the OR array are programmable. In a PAL only the AND array is programmable and the OR array is fixed, which makes it cheaper and faster but less flexible.
Are PLAs and PALs still used? Rarely as separate chips. Their ideas live on inside CPLDs, and PLA-style structures are used in the control logic of many integrated circuits.
Why do programmable devices use sum of products? Every Boolean function can be written as a sum of products, so a single AND-OR structure can implement any function, and the structure is regular and easy to build.
Next lesson: continue with CPLDs vs FPGAs to see how these ideas scale up in modern programmable devices.