Sub topic 10
ROM, PLA and PAL as Logic Implementations
Assume you know Boolean expressions, truth tables, minterms, and basic combinational circuits. This chapter treats a logic circuit as a function that maps input bits to output bits.
ROM, PLA, and PAL are programmable logic structures. They implement Boolean functions by connecting input combinations to output values. Their main difference is which internal connection arrays are programmable.
ROM implementation
A read-only memory (ROM) contains a fixed number of words. Each input combination selects one word, and the stored bits become the outputs.
For \(n\) input variables and \(m\) output variables, a ROM needs:
- \(2^n\) words, because there are \(2^n\) input combinations.
- \(m\) bits per word.
- A decoder that activates one word line for each input minterm.
- Programmable connections from word lines to output lines.
For example, a ROM with four input lines and three output lines stores \(2^4 = 16\) words of three bits each. It can implement any three-output function of four variables.
module logic_rom(
input [1:0] address,
output reg [1:0] data
);
always @(*) begin
case (address)
2'b00: data = 2'b01;
2'b01: data = 2'b11;
2'b10: data = 2'b00;
2'b11: data = 2'b10;
endcase
end
endmoduleThe address input selects a stored word. The ROM does not need a separate Boolean expression for each output.
PLA and PAL structures
A programmable logic array (PLA) has two programmable planes:
- A programmable AND plane creates selected product terms.
- A programmable OR plane combines those product terms into outputs.
A product term is an AND of literals, such as \(A\overline{B}C\). The same product term can feed multiple outputs, which makes a PLA efficient when functions share terms.
A programmable array logic (PAL) has a programmable AND plane but a fixed OR plane. The available number of product terms per output is therefore limited. PALs are usually simpler and faster than PLAs, but they offer less flexibility.
| Device | AND plane | OR plane | Main strength |
|---|---|---|---|
| ROM | Fixed decoder | Programmable connections | Implements complete truth tables |
| PLA | Programmable | Programmable | Shares product terms across outputs |
| PAL | Programmable | Fixed | Simpler and often faster |
Worked comparison
Consider:
\[ F_1 = \overline{A}B + AC \]
\[ F_2 = \overline{A}B + BC \]
The product term \(\overline{A}B\) is shared by both functions.
- A ROM stores the values of \(F1\) and \(F2\) for every combination of \(A\), \(B\), and \(C\).
- A PLA creates product terms \(\overline{A}B\), \(AC\), and \(BC\), then connects them to the appropriate outputs.
- A PAL can implement the functions if each output has enough available product-term connections.
A PLA usually uses fewer terms here because it shares \(\overline{A}B\). A ROM may use more hardware for a small, sparse function because its decoder generates every minterm, including unused ones.
Common errors
- Counting a ROM as \(n \times m\) memory instead of \(2^n \times m\).
- Assuming a PAL can share product terms freely between outputs.
- Forgetting that a PLA can share terms because both planes are programmable.
- Treating ROM, PLA, and PAL as sequential devices. Their outputs change as combinational input and propagation delays change.
Exercise
A ROM has 5 address inputs and 4 output bits. How many stored bits does it require?
Show answer
It has \(2^5 = 32\) words, each containing 4 bits, so it requires \(32 \times 4 = 128\) stored bits.