Back to course

Read-Only Memory (ROM) and Look-up Tables

Digital Logic Systems: From Zero to Hero

47. Read-Only Memory (ROM) and Look-up Tables

ROM is not just for firmware; its structure makes it an incredibly versatile combinational logic element, acting as a universal function generator via a look-up table (LUT).

ROM Structure

  1. Address Decoder: An N-to-$2^N$ decoder takes the N address inputs and activates exactly one row (word line) in the memory array.
  2. Memory Array: A grid of fuses or programmable connections storing the data.
  3. Output Buffers: Connect the selected word line data to the output data lines.

ROM as a Universal Combinational Circuit

Any combinational circuit (any truth table) can be implemented using a ROM.

  • Inputs: The variables of the Boolean function are connected to the ROM address lines.
  • Outputs: The outputs of the function are connected to the ROM data lines.
  • Programming: The ROM is 'programmed' by storing the truth table output values at the corresponding memory addresses.

Example: Implementing a Full Adder

  1. Inputs (A, B, $C_{in}$) become 3 address lines (8 addresses total).
  2. Outputs (S, $C_{out}$) become 2 data lines.
  3. The ROM array stores the S and $C_{out}$ values for all 8 input combinations. Simpler design, but often less efficient than minimized gates.