Chapter 4

Semiconductor memory and interfacing

Separate the number of locations from the width of each location. Then separate address decoding, data-bus width and access timing. SRAM, DRAM and ROM implement storage differently, but the same address-counting principles apply.

4.1 ROM, SRAM and DRAM

MemoryStorage and retentionRead/write behaviourRevision use
Mask ROMFixed manufactured pattern; nonvolatileRead during normal operationFixed tables or firmware
PROMOne-time programmable links; nonvolatileProgram once, then readPermanent programmed table
EPROMStored charge; nonvolatileUltraviolet erase, then reprogramErasable read-mostly storage
EEPROMStored charge; nonvolatileElectrically erasable/programmed, finer granularity than conventional flashConfiguration
FlashNonvolatile charge storageErase in blocks; programmed in supported unitsRead-mostly solid-state storage
SRAMBistable cell; volatileNo periodic refresh; read normally preserves dataSmall fast working storage, caches
DRAMCharge on capacitor; volatileRefresh required; read is sensed and restoredDense main memory

The conventional CMOS SRAM cell uses six transistors; a conventional DRAM cell uses one access transistor and one storage capacitor. These are standard cells, not universal transistor counts for every memory technology. SRAM retains data only while powered. DRAM refresh is needed even without processor reads or writes. Access time is the delay to valid data; cycle time is the minimum interval before the same memory resource can start another access.

A ROM with aa input address bits and dd output bits stores a truth table of 2a2^a words, each dd bits. It can implement dd arbitrary Boolean functions of the same aa inputs. ROM decoding and general combinational logic: see the Digital Logic and Electronics handbook.

4.2 Memory organisation and address span

Past papers · CS 2014–2026 (23 papers): 1 question, 1 mark · EC 2020–2026 (7 papers): 2 questions, 3 marks

A chip marked N×dN\times d has NN addressable words of dd bits; the label is not NN bytes unless d=8d=8. Parallel chips increase width. Additional banks increase depth.

For a byte capacity and a word-addressed processor, divide the byte capacity by bytes per word before taking the address logarithm. In a byte-addressable wide memory, low address bits can select byte lanes; they need not all be pins on each chip.

4.3 DRAM addressing and refresh

Past papers · CS 2014–2026 (23 papers): 1 question, 1 mark

DRAM splits a logical address into row and column portions. With multiplexed pins, row and column addresses are supplied at different times; the address-pin count is the larger portion, not their sum. Control, data and bank pins are additional. In a conventional asynchronous DRAM interface, RAS latches the row address and CAS latches the column address; active levels and edge timing follow the specified interface. A row read activates sensing and restoration, so a read is not just a nondestructive observation of the original capacitor charge.

4.4 Chip selection and address decodingCS

Past papers · CS 2014–2026 (23 papers): 2 questions, 3 marks

For depth expansion, connect the within-chip address lines to every bank and decode the bank-selection bits into chip enables. Chips providing different data-bit slices in a bank share its select. For width expansion, their data outputs occupy different bus lanes. Output-enable and write-enable control signal direction; inactive outputs must not contend with another selected device.

A contiguous aligned block of 2a2^a locations normally uses the lowest aa bits internally and upper bits for selection. If the diagram instead decodes middle bits, set all actual within-chip address bits to zero to find each chip's first location. Do not replace the given wiring with the usual upper-bit decoder.

A slow memory may require wait states. Sample ready only when valid for the processor interface; address, chip select and write data must satisfy the memory's setup/hold requirements. There is no universal wait-state count without the bus timing diagram.

4.5 Interleaved banks and burst transfersCS

Past papers · CS 2014–2026 (23 papers): 2 questions, 4 marks

Low-order interleaving assigns consecutive words to different banks. High-order interleaving keeps a contiguous address range in each bank. Banking improves throughput only when accesses spread across banks and the shared bus can keep up.

Last-minute recall

  • A memory organisation is locations × bits per location.
  • Chips in parallel widen a word; banks increase the number of words.
  • Last address is first address plus number of locations minus one.
  • DRAM address multiplexing reduces pins, not the number of logical address bits.
  • Count refresh commands that block the system; parallel chips need not multiply that time.
  • For arbitrary decoding, follow the wires and active levels.
  • Banking cannot exceed the shared-bus rate, and stride can cause bank conflicts.

Revise offline: the whole Computer Organization and Architecture handbook as one PDF

36 pages · 2.5 MBFree to read online. Sign in to download the PDF.We save the handbook, version and request time in My downloads. Privacy policy

All chapters · Corrections