Glue logic is the small amount of custom circuitry needed to make two or more off-the-shelf integrated circuits work together: address decoders, chip selects, read and write strobes, wait-state generators and similar interface logic. It was once built from 74-series TTL chips, then from PALs and CPLDs, and today it usually lives inside an FPGA or as small blocks of RTL between IP cores on an SoC.
Key takeaways
- Glue logic adapts interfaces; it does not add the product's main function.
- The classic example is the address decoder that divides a processor's address space into RAM, ROM and I/O.
- Implementation moved from discrete 74xx logic to programmable logic (PAL, GAL, CPLD, FPGA) and then into the chips themselves, giving "glueless" interfaces.
- In SoC RTL, "glue logic" means the small random logic that connects IP blocks at the top level.
What glue logic is
Glue logic is the circuitry needed to achieve compatible interfaces between two (or more) different off-the-shelf integrated circuits.
An example of glue logic is the address decoder, which with older processors like the 6502 or Z80 had to be added externally to divide up the addressing space of the processor into RAM, ROM and I/O. Newer versions of the same processors (such as the WDC 65816 or Zilog eZ80) instead have internal address decoders, so glueless interfacing to the most common external devices becomes possible.
Editor's note (2026): the Zilog eZ80 family includes programmable chip-select outputs, which removes much of the external decoder. The WDC 65C816 multiplexes its bank address on the data bus, which usually needs an external latch, so check the data sheet of the specific part before assuming a glueless design.
Sometimes, glue logic is used to encrypt the proprietary electronics circuitry by the vendor and to prevent the product from being illegally counterfeited. Programmable devices such as PALs and CPLDs have a security fuse or bit that, once set, blocks reading back the programmed logic, which makes the board harder to copy.
Common kinds of glue logic
| Function | What it does | Typical example |
|---|---|---|
| Address decoding | Turns high address bits into chip-select signals | Selecting RAM, ROM or a UART from a CPU bus |
| Strobe generation | Combines clock, read/write and select into write-enable and output-enable | Qualifying a RAM write with the CPU clock phase |
| Wait-state generation | Stretches a bus cycle for a slow device | Driving a READY or WAIT input for slow EPROM |
| Bus and level adaptation | Matches bus widths, polarities or voltage levels | Inverting an active-high interrupt into an active-low input |
| Interrupt combining | Merges several interrupt sources into one CPU input | Wired-OR of open-drain interrupt lines |
| Reset handling | Synchronizes and stretches reset | Power-on reset with a synchronized release |
The interrupt case has its own story: see why interrupts are active low.
Worked example: a 6502 address decoder
The 6502 has a 16-bit address bus (64 KB) with memory-mapped I/O. Its reset and interrupt vectors sit at the top of memory (FFFA to FFFF), and its zero page and stack sit at the bottom (0000 to 01FF), so ROM must cover the top and RAM the bottom. A simple map using only address lines A15 and A14:
| Range (hex) | Size | Device | A15 | A14 |
|---|---|---|---|---|
| 0000 to 7FFF | 32 KB | RAM | 0 | x |
| 8000 to BFFF | 16 KB | I/O | 1 | 0 |
| C000 to FFFF | 16 KB | ROM | 1 | 1 |
With active-low chip selects, the logic is three equations. The RAM write enable is also qualified by the PHI2 clock, because the 6502 address and R/W lines are only guaranteed stable during the PHI2 high phase. On the 6502, R/W is high for a read and low for a write.
module addr_decode_6502 (
input wire a15,
input wire a14,
input wire phi2,
input wire rw, // 1 = read, 0 = write
output wire ram_cs_n,
output wire io_cs_n,
output wire rom_cs_n,
output wire ram_we_n
);
assign ram_cs_n = a15; // 0000 to 7FFF
assign io_cs_n = ~(a15 & ~a14); // 8000 to BFFF
assign rom_cs_n = ~(a15 & a14); // C000 to FFFF
assign ram_we_n = ~(phi2 & ~rw); // write only in PHI2 high
endmodule
In a 1980s design this would be one or two 74-series chips (for example a 74HC139 dual 2-to-4 decoder) or a single small PAL. The I/O block is very large here; a real design would decode more address lines to give each peripheral a small window, which is exactly where glue logic tends to grow.
How glue logic is implemented over time
- Discrete logic: 74-series gates, decoders and flip-flops on the board.
- Simple programmable logic: PALs and GALs replaced several 74xx chips with one programmable sum-of-products device.
- CPLDs and FPGAs: larger interfaces, bus bridges and state machines in one device, reprogrammable after the board is built. The trade-offs between logic block sizes are explained in coarse and fine grained architectures.
- Integration: microcontrollers and SoCs absorbed chip selects, wait states and bus interfaces, giving glueless connections to common memories and peripherals.
Glue logic inside an SoC
In ASIC and SoC design the term now describes the small, unstructured logic at the top level: muxes for test and functional modes, register bits that drive enables, simple handshakes between IP blocks and reset sequencing. Good practice is to keep this logic in its own clearly named RTL modules rather than scattered through the top level, because it is easy to overlook in verification, timing constraints and clock domain crossing checks.
Mistakes to avoid
- Decoding too few address bits, so a device appears at many aliased addresses and later expansion collides with it.
- Generating write strobes without qualifying them by the right clock phase, which causes spurious writes.
- Letting glue logic gather at the SoC top level with no owner, no tests and no timing constraints.
- Crossing clock domains in glue logic without a synchronizer.
Frequently asked questions
What is glue logic in simple terms?
It is the extra logic that lets chips that were not designed for each other talk to each other.
What does "glueless" mean?
A glueless interface connects two devices directly, with no external logic, because one of them already includes the decoder, strobes or bus adaptation needed.
Is glue logic still used today?
Yes. It lives in small CPLDs and FPGAs on boards and in top-level RTL on SoCs.
Why use a CPLD for glue logic?
CPLDs have predictable pin-to-pin delays, are often ready immediately after power-up because their configuration is non-volatile, and can be reprogrammed to fix an interface without a board respin.
Related reading
- Top 50 CPU architecture interview questions with answers
- CPLD in The Semiconductor Hub glossary
- FPGA (field programmable gate array) in The Semiconductor Hub glossary


great
ReplyDelete