Salta al contenuto
Note per Studenti Semiconductor Memory Report

Semiconductor Memory

In questa pagina 7
In questa pagina 4

The cell

The basic element that stores one bit: it has two stable states and can be written (at least once) and read. It has a select line, a control line (read/write) and a data line.

RAM

Random Access Memory: random access for reading and writing, volatile (it loses its data without power).

Definition (dynamic and static RAM)

DRAM (dynamic) SRAM (static)
cell a capacitor and an access transistor a flip-flop (typically 6 transistors)
bit charge present/absent state of the flip-flop
refresh needed: the charge leaks, so it must be read and rewritten periodically (every few ms) not needed while powered
density and cost high density, low cost per bit low density, high cost
speed slower faster
use main memory cache

Example. An SRAM cell uses about 66 transistors, a DRAM cell one transistor and one capacitor: for the same area the DRAM holds more bits.

Reading a DRAM is destructive (it discharges the capacitor) and requires the bit to be rewritten.

ROM and non-volatile memories

Type Writing Erasing
ROM at the factory, with the chip mask impossible
PROM once, electrically, by the user impossible
EPROM electrically with ultraviolet light, whole chip
EEPROM electrically, byte by byte electrically, byte by byte (slow)
Flash electrically electrically, by blocks (fast)

Uses: firmware and BIOS, microprograms, function tables, programs of embedded systems; flash is the technology of SSDs and USB sticks.

Organisation of chips

Definition (memory chip N×bN\times b). A chip N×bN \times b contains NN words of bb bits: it has log⁡2N\log_2 N address lines and bb data lines. Internally the cells form a matrix: the address is split into row and column, decoded separately. In DRAMs row and column arrive in two steps on the same lines (signals RAS and CAS), halving the pins.

Example. A 1 MB memory, 1-byte word, built with 256K×1256\text{K} \times 1 bit chips.

  • Each chip gives 1 bit: for an 8-bit word we need 8 chips in parallel, forming a bank of 256K×8256\text{K} \times 8 = 256 KB.
  • For 1 MB we need 1 MB/256 KB=41\,\text{MB} / 256\,\text{KB} = 4 banks, so 32 chips.
  • Address: log⁡2220=20\log_2 2^{20} = 20 bits. The low 18 bits (218=256K2^{18} = 256\text{K}) go to all chips, the high 2 bits enter a 2-to-4 decoder that enables one of the 4 banks.

Synchronous DRAM

SDRAM works with the bus clock: after the initial address it transfers a block of consecutive data (burst) with no further waits, suited to filling a cache line. DDR transfers on both clock edges (DDR2, DDR3, DDR4, DDR5 raise frequency and data per cycle).

Errors

Permanent errors (faults) and soft errors (random, non-destructive, for example due to radiation or particles). Words are protected with check bits computed on writing and verified on reading: the Hamming code corrects a single error, and with one extra parity bit it also detects double errors (SEC-DED).

Typical mistakes

  • Thinking a ROM has sequential access: it is random access like RAM, only not writable.
  • Counting chips by dividing only the capacities in bytes, without considering the word width of the chip.

Versione ripasso

RAM

Volatile, random access. DRAM: capacitor + transistor, needs refresh (every few ms), dense and cheap, slower, reads are destructive; used as main memory. SRAM: flip-flop (about 6 transistors), no refresh, faster, costly, low density; used for cache.

Non-volatile

ROM (mask, never changes); PROM (once, electrically); EPROM (UV erase, whole chip); EEPROM (byte by byte, slow); Flash (erase by blocks, fast; SSDs, USB sticks). Uses: firmware, microprograms, embedded programs.

Chips

N×bN \times b chip: log⁡2N\log_2 N address lines, bb data lines; row and column decoded separately (DRAM: RAS and CAS on shared pins). Example 1 MB from 256K×1256\text{K} \times 1 chips: 8 chips per bank (256 KB), 4 banks, 32 chips; 20 address bits, low 18 to all chips, high 2 into a 2-to-4 decoder.

Synchronous and errors

SDRAM bursts consecutive data (fills a cache line); DDR uses both clock edges. Errors: permanent and soft; Hamming corrects 1 error, plus parity (SEC-DED) detects 2.

Typical mistakes: ROM is random access, not sequential; count chips using the chip word width, not only capacities.

Teoria collegata