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
| Memory | Storage and retention | Read/write behaviour | Revision use |
|---|---|---|---|
| Mask ROM | Fixed manufactured pattern; nonvolatile | Read during normal operation | Fixed tables or firmware |
| PROM | One-time programmable links; nonvolatile | Program once, then read | Permanent programmed table |
| EPROM | Stored charge; nonvolatile | Ultraviolet erase, then reprogram | Erasable read-mostly storage |
| EEPROM | Stored charge; nonvolatile | Electrically erasable/programmed, finer granularity than conventional flash | Configuration |
| Flash | Nonvolatile charge storage | Erase in blocks; programmed in supported units | Read-mostly solid-state storage |
| SRAM | Bistable cell; volatile | No periodic refresh; read normally preserves data | Small fast working storage, caches |
| DRAM | Charge on capacitor; volatile | Refresh required; read is sensed and restored | Dense 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 input address bits and output bits stores a truth table of words, each bits. It can implement arbitrary Boolean functions of the same 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 has addressable words of bits; the label is not bytes unless . 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 decoding
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 locations normally uses the lowest 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 transfers
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.