UNIHIVE

Study Hub UNIPORT CSC 284

CSC 284 · Introduction to Logic Design

Memory and programmable logic

RAM and ROM, memory size and addressing, PLAs, PALs, CPLDs and FPGAs.

Our notes

2 min read

Memory as an array

Memory is a grid of cells, each storing a bit, organised into words at addresses. A memory of 2ᵏ words × m bits has k address lines and m data lines.

Worked example

A chip is 64K × 8. Address lines: 64K = 65,536 = 2¹⁶, so 16; data lines 8; capacity 512 Kbit = 64 KB. How many such chips make 256 KB? 256 ÷ 64 = 4, with 2 more address bits decoded to pick the chip.

RAM (random-access memory)

Read and write; loses data when power is off (volatile).

  • SRAM: each bit is a flip-flop (about 6 transistors). Fast, no refresh, costly: used for processor caches.
  • DRAM: each bit is a capacitor and one transistor. Dense and cheap but must be refreshed thousands of times a second: used for main memory (DDR4, DDR5).

ROM (read-only memory)

Keeps data without power (non-volatile).

  • Mask ROM: written at the factory.
  • PROM: written once by the user.
  • EPROM: erased by ultraviolet light.
  • EEPROM and flash: erased electrically; flash is in phones, SSDs and memory cards.

A ROM can be used as a lookup table: it implements any combinational function of its address inputs.

Memory hierarchy

Registers → cache (SRAM) → main memory (DRAM) → SSD or hard disk. Each step down is bigger, cheaper per byte and slower.

Programmable logic devices

Instead of wiring many small chips, designers program one device.

  • PLA (programmable logic array): a programmable AND array feeding a programmable OR array: any sum-of-products functions.
  • PAL: programmable AND array, fixed OR array; cheaper and faster.
  • CPLD: several PAL-like blocks with programmable links.
  • FPGA (field-programmable gate array): thousands to millions of small lookup tables and flip-flops joined by programmable routing, configured from a file at power-on. Used for prototypes, telecoms, image processing and cryptography.

Worked example: a PLA

Implement F1 = AB + A'C and F2 = AB + BC. The AND array needs only three product terms (AB, A'C, BC), with AB shared by both outputs; the OR array then joins them. Sharing terms is the PLA's advantage over separate circuits.

Hardware description languages

FPGAs and chips are designed by writing VHDL or Verilog, simulating, then letting tools minimise and place the logic: the K-map ideas of this course done by software.

Exams usually ask

  • Work out address lines, capacity and chip counts.
  • Compare SRAM and DRAM, and the kinds of ROM; explain PLA, PAL and FPGA.

Common mistake

Calling ROM "memory that cannot be read": it is read-only, not unreadable, and most modern ROM (flash) can be rewritten.

Written by the UniHive team in our own words. Spotted a mistake? Tell us on WhatsApp.

Read

Watch

Practise

We link to free material and never copy it. Every link was opened by our team before it went up; video data is a rough guide at 360p.

All CSC 284 topics

Report

Sign in to report this. It is free.

Is this your work (a lecturer, author or publisher)? Ask us to take it down.