배울 내용

  • Recognize ROM as fixed-content addressable memory.
  • Distinguish read-only from read-write memory by use case.
  • Identify ROM types: mask, PROM, EPROM, EEPROM, Flash.
  • Apply ROM for boot code, firmware, and lookup tables.
  • Understand the decoder + transistor-matrix architecture of mask ROM.

작동 원리

ROM (Read-Only Memory) stores data permanently — you can read it but not change it. Unlike RAM, ROM contents are fixed at manufacturing or programming time and persist without power.

This ROM demo has an address input and a data output. Each address corresponds to a fixed data value, hardcoded in the circuit: - Address 0 → data 0xAB (or whatever pattern) - Address 1 → data 0x55 - Address 2 → data 0xFF - ...

The internal structure: a decoder + an OR-array (or a transistor matrix). The address decodes into one-hot row select; each row's transistors are connected to specific output bit lines according to the stored value. Reading address i activates row i, which drives its hardcoded pattern onto the output.

ROM types: - Mask ROM: Programmed at chip fabrication — cheapest in volume. - PROM: Programmed once by the user via fuse blowing. - EPROM: Erasable via UV light, then re-programmable. - EEPROM: Erasable electrically — flexible but slower to write. - Flash: Block-erasable EEPROM — modern, ubiquitous.

ROM is used wherever fixed data must survive power-off: boot code, firmware, lookup tables for calculators and oscillators, character generators in video chips. The 6502 NES game cartridges are essentially PROMs with the game code burned in.

단계별로 시도해 보세요

위 임베드에서 입력을 설정한 후, 예상 결과를 읽고 직접 확인하세요.

  1. 1
    Address = 00
    예상: Data = ROM[0]
    관찰 포인트: Set address to 0 — ROM outputs whatever is stored at index 0. Try cycling addresses to see different values.
  2. 2
    Address = 01
    예상: Data = ROM[1]
    관찰 포인트: Address 1 — different stored value emerges. Each address has its own hardcoded data pattern.
  3. 3
    Address = 10
    예상: Data = ROM[2]
    관찰 포인트: Address 2 — yet another value. The ROM is essentially a fixed lookup table.
  4. 4
    Address = 11
    예상: Data = ROM[3]
    관찰 포인트: Last address. Cycling through 0..3 reveals all stored values; no clock needed because ROM is purely combinational on read.

사용된 구성 요소

실제 응용 사례

Boot ROM. Every computer's BIOS or firmware boots from ROM — the first instructions executed after power-on are stored in non-volatile memory.

Microcontroller program memory. Firmware in a microcontroller is stored in on-chip Flash ROM, allowing code to persist across power cycles.

Character generators in displays. Bitmap fonts for console displays were classically stored in mask ROMs that mapped (character, row) addresses to row pixel patterns.

Game cartridges. Console game cartridges from the 1980s and 1990s contained ROM chips with game code, music data, and graphics tiles.

Lookup tables for trig functions. DSP and calculator ICs include ROM tables of sin, cos, log, etc., for fast evaluation without runtime computation.

자주 묻는 질문

Why use ROM instead of RAM if both are addressable?
Persistence and density. ROM keeps its data without power; RAM doesn't. Mask ROM is also denser per bit than SRAM (one transistor per bit vs. six), so cheaper for fixed data at scale.
How does mask ROM physically store bits?
Each storage cell is either present (storing 1) or absent (storing 0) at the chip's transistor matrix. The pattern is encoded in the photolithography masks during chip fabrication. Once made, the ROM contents can never change.
What's Flash and how is it different from ROM?
Flash is electrically erasable and reprogrammable in blocks (typical block size 4 KB to 256 KB). It's the most common form of non-volatile memory today — used for firmware, SSDs, USB drives, and microcontroller program memory. Slower to write than RAM but persistent.
Are ROMs purely combinational or sequential?
Read is combinational — present an address, get the data after some access time. Most simple ROMs don't need a clock for reads. Some larger ROMs have synchronous read-pipeline registers to improve clock-rate compatibility, but the underlying storage is combinational.
Can I use a ROM as a function evaluator?
Yes — store the truth table of a function in ROM. Apply the function's inputs as the address; the data output is the function's value. This is conceptually a giant lookup table (LUT) — the same principle FPGAs use for combinational logic, scaled up.

학습 계속하기