ElecEng Handbook Electronic Engineer Reference
Home โ€บ Memory

Memory & Storage Interfaces

Capacity, bandwidth, flash write time, endurance and EEPROM address calculators, plus storage-technology tables and memory-interface diagrams.

Opens the browser print dialog โ€” choose "Save as PDF".
Capacity, write time, endurance and address figures depend on the exact part, its datasheet and the interface used. Treat results as estimates and confirm page/block sizes, waiting times and device addressing from the memory datasheet.

Capacity โ‡„ Address Lines

Capacity = 2^addr ร— width/8 bytes; address lines = ceil(log2(bytes ร— 8 / width)). Feed the memory bus and it tells you how much you can address (and vice versa).
bits
bits
B
Addressable capacity
โ€”
Address lines needed
โ€”
Feed enough address bits so the memory word space is fully covered; leaving headroom for future density upgrades is common. 1 GB with a 32-bit address bus has 4 GB of theoretical space.

Memory Bandwidth

BW = width รท 8 ร— f ร— transfers/clock. DDR issues two transfers per clock, QDR four; parallel and SPI buses usually one data beat per clock.
bits
Hz
/clk
Bandwidth
โ€”
Bandwidth (GiB/s)
โ€”
This is the theoretical peak; real throughput is lower after refresh, addressing, command and turnaround overhead. For DDR, the clock frequency shown is the I/O rate divided by two if you enter the memory clock.

Flash / EEPROM Write Time

pages = ceil(bytes / page); total = pages ร— t_page. Non-volatile memories program a page or a byte at a time, then hold the bus while the write completes.
B
B
ms
Pages / operations
โ€”
Total write time
โ€”
Real overhead also includes command, address, data and chip-select setup plus read-after-write verify. Flash often needs an erase cycle before overwriting; factor block erase time into bulk rewrites.

Flash Endurance / Life

years = rated_cycles รท (writes_per_day ร— 365). The program/erase-endurance rating is per sector; once used up, wear-leveling can no longer hide failing cells.
P/E
/day
Service life
โ€”
Cycles used / year
Endurance applies to each sector; uniform writes wear the device evenly only with wear leveling. Add margin โ€” rated cycles often assume ideal conditions, and ECC (for NAND) extends usable life.

I2C EEPROM Address

Device address = 0x50 + (A2ยท4 + A1ยท2 + A0). Classic 24xx parts use a 4-bit type code (1010) plus the three strap pins; the read address sets bit 0 (write = even, read = odd).
0/1
0/1
0/1
7-bit address
โ€”
Write byte (0)
โ€”
Read byte (1)
โ€”
Only address bits that are actually bonded on the device matter โ€” reading a 7-bit address as a byte requires left-shifting by one. Multiple identical parts can share one bus by strapping A2/A1/A0 differently.

๐Ÿ“Š Memory & Interface Diagrams

The storage hierarchy, common non-volatile memory buses (SPI/QSPI and I2C), a six-transistor SRAM cell, a one-transistor DRAM cell and a parallel memory bus.

MEMORY HIERARCHY CPU registers L1/L2 cache (SRAM) Main DRAM Flash / SSD HDD / tape fast ยท small ยท costly โ†‘ cache โ†‘ prices slow ยท large ยท cheap

Memory hierarchy โ€” Fast, small, expensive memory sits close to the CPU; large cheap storage sits far away. Caches copy frequently used data upward so most accesses hit the fastest level.

SPI / QSPI NOR FLASH MCU / HOST (SPI/UART boot) CLK IO0 (MOSIโ†’) CS IO0 NOR FLASH (QSPI: IO0โ€“IO3) GND CS held low, 0x03 read cmd 24-bit address + data out on IO0

SPI / QSPI NOR โ€” A small pin count boots code from NOR flash: CLK and chip-select plus bidirectional IO lines. QSPI uses four IO lines to fetch data up to four bits per clock for fast xip (execute-in-place).

I2C EEPROM (24xx) ON THE BUS SDA (pull-up to VDD) SCL (pull-up to VDD) Rp EEPROM #0 A2A1A0 = 000 โ†’ 0x50 EEPROM #7 A2A1A0 = 111 โ†’ 0x57 WP pin tied to GND to allow writes

I2C EEPROM โ€” SDA and SCL are open-drain with pull-ups to VDD; the controller addresses each EEPROM by its strap pins. A3=1 on larger parts extends the page address beyond the three pins shown.

6-T SRAM CELL WL word line sense / I/O cross-coupled inverters Q / nQ latch BL & nBL bit lines retains data while powered (no refresh)

6-T SRAM cell โ€” Two cross-coupled inverters hold a bit; two pass transistors gate it onto the bit lines when the word line is high. Static โ€” no refresh, but needs a constant supply and six transistors per bit.

1-T DRAM CELL WL M1 Cs (charge) sense amp BL 1 transistor + 1 capacitor leaky: must be refreshed ~every 64 ms

1-T DRAM cell โ€” A single access transistor and a small capacitor store the bit; the charge leaks away, so every row must be refreshed. Far denser and cheaper per bit than SRAM, which is why RAM is DRAM.

PARALLEL MEMORY BUS HOST / MCU (external bus) A[n:0] D[m:0] /CS /WE /OE SRAM / FLASH memory array address decodes to 1 of 2^n /CS picks the chip, /WE /OE set direction

Parallel memory bus โ€” Wide address and data buses plus chip-select, write and read strobes talk to the array directly. Fast and simple, but each bit costs a pin โ€” why high-density parts moved to SPI/QSPI/OSPI.

SD / SDIO CARD INTERFACE SD HOST (MCU SDIO/SPI) SD CARD (eMMC similar) CLK CMD (bi) DAT0-DAT3 (bi) SD: point-to-point, 1-bit or 4-bit SPI mode: MOSI/MISO/SCK + /CS CMD carries index + CRC

SD / SDIO card interface โ€” A clock plus a bidirectional command line and 4 data lines talk to one card. Closing the RD/WR CRC in firmware and handling busy (DAT0 low) correctly matters more than raw speed.

DDR SDRAM / CONTROLLER CONTROLLER (MCU / FPGA) DDR SDRAM bank array A[n:0] BA DQ (bi) DQS (bi strobe) source-synchronous DQS edges latch DQ read DQS is aligned; write DQS is center termination + impedance control on the bus

DDR SDRAM interface โ€” Address and bank pins plus bidirectional data and a strobe pin per byte lane. The data strobe is source-synchronous, so timing is captured against DQS rather than the CPU clock; short matched traces and a controlled impedance matter.

NAND FLASH: BLOCK โ†’ PAGE โ†’ OOB BLOCK page 0 page 1 โ€ฆ page 63 row = block ยท pages/block read/write PAGE = 2 KiB data + 64 B spare / OOB ECC erased in blocks, written in pages

NAND block & page layout โ€” A block holds many pages; a page is typically a few KiB of data plus a spare (OOB) area. Erase happens per-block, program per-page, and bad blocks are marked in the OOB โ€” wear leveling and ECC live in the controller.

ADDRESS DECODE โ†’ CHIP SELECTS DECODER 2-to-4 A[n:1] /CS0 /CS1 SRAM 0 SRAM 1 /CS2 โ†’ FLASH /CS3 โ†’ NAND each select maps one memory window shared A/D bus on all chips only the /CS'd chip drives DQ

Address decode & chip select โ€” Upper address lines go to a decoder that raises exactly one chip-select per window while the lower lines and data bus are shared. Only the selected chip responds, so each region maps to a unique address range.

๐Ÿ“š Storage Reference Tables

Memory technologies, SPI-flash addressing and write-endurance figures. Values are representative โ€” check the component datasheet.

Memory Technologies

TechnologySpeedVolatileEndurance
SRAMfastestyes (no refresh)nearly unlimited
DRAMfastyes (refresh ~64 ms)very high
NOR Flashread fastno10kโ€“100k
NAND Flashfast sequentialno1kโ€“100k + ECC
EEPROMslow writeno~1M byte writes
FRAMfast, no eraseno10ยนยนโ€“10ยนยฒ

SPI Flash Density & Addressing

DensityAddress widthTypical read cmd
1โ€“16 Mbit24-bit0x03 (read)
32โ€“256 Mbit24-bit0x03 / 0x0B (fast)
> 512 Mbit32-bit (0x3C)fast / QPI

Write Endurance Reference

ItemTypical rated cycles
EEPROM byte / page~1 000 000
NOR flash sector~100 000
NAND / eMMC block~3 000โ€“100 000
FRAM / MRAM> 10ยนยน