Level 3 — ProductionMemory Technologies

Memory Technologies

45 minutes60 marksprintable — key stays hidden on paper

Chapter: 4.1 Memory Technologies Level: 3 — Production (from-scratch derivations, code-from-memory, explain-out-loud) Time limit: 45 minutes Total marks: 60


Question 1 — SRAM 6T cell (from memory) [10 marks]

(a) From memory, draw/describe the 6T SRAM cell: name all six transistors, the two storage nodes, the bitlines, and the wordline. (4)

(b) Explain out loud the read operation and why the access transistors must be sized weaker than the pull-down transistors (read stability / read-upset condition). (4)

(c) Explain why the write operation instead requires the access transistors to be strong enough relative to the pull-up PMOS (writeability). (2)


Question 2 — DRAM refresh derivation [12 marks]

A DRAM has 2132^{13} rows per bank. The storage capacitor is C=25 fFC = 25\text{ fF}, initially charged to VDD=1.2 VV_{DD}=1.2\text{ V}. Leakage current per cell is Ileak=1 fAI_{leak}=1\text{ fA}. The sense amplifier can reliably resolve the stored '1' only while the cell voltage stays above 0.6 V0.6\text{ V}.

(a) Derive the maximum retention time trett_{ret} before a cell must be refreshed, assuming constant leakage current. (4)

(b) If all rows must be refreshed within trett_{ret}, and each row refresh takes 50 ns50\text{ ns}, compute the total refresh time per cycle and the refresh overhead (fraction of time spent refreshing). (5)

(c) Explain out loud why smaller capacitors and higher densities make refresh harder, and one architectural technique to mitigate it. (3)


Question 3 — DDR bandwidth metric [10 marks]

(a) Derive the peak theoretical bandwidth of a single DDR channel from first principles given: bus width =64= 64 bits, memory clock (I/O) =1600 MHz= 1600\text{ MHz}, double data rate. State the formula. (4)

(b) A DDR5 module is rated "DDR5-6400". Compute its per-pin data rate and the module bandwidth for a 64-bit channel. Show units. (4)

(c) Explain the difference between bandwidth and latency, and why increasing DDR data rate has not proportionally reduced latency. (2)


Question 4 — Floating-gate & MLC (explain + derive) [12 marks]

(a) Explain out loud how a floating-gate transistor stores a bit: describe program (electron injection) and erase mechanisms, and how the threshold voltage VthV_{th} encodes the state. (4)

(b) For MLC/TLC/QLC, state how many bits and how many distinct VthV_{th} levels each stores. Give the general relation between bits-per-cell nn and number of levels LL. (3)

(c) A TLC block holds 2202^{20} cells. How many bits and bytes does it store? If QLC were used with the same cell count, how many extra bytes? (3)

(d) Explain why higher bits-per-cell reduces endurance and increases read latency. (2)


Question 5 — ECC Hamming code (from scratch) [10 marks]

(a) Derive the minimum number of parity bits pp needed to SEC-protect d=64d=64 data bits (single-error-correct). State the inequality used. (3)

(b) For a (7,4)(7,4) Hamming code, encode the 4-bit data word 10111011 (bits d1d2d3d4d_1 d_2 d_3 d_4). Use parity positions 1,2,4 with even parity. Give the 7-bit codeword. (5)

(c) State what SEC-DED means and how many extra bits it costs over plain SEC. (2)


Question 6 — CAM & wear leveling (explain out loud) [6 marks]

(a) Explain what a Content-Addressable Memory does differently from RAM, and give one real application. (3)

(b) Explain why flash needs wear leveling, and distinguish dynamic vs static wear leveling in one line each. (3)

Answer keyMark scheme & solutions

Question 1 [10]

(a) [4] The 6T cell: two cross-coupled CMOS inverters storing complementary values at nodes QQ and Q\overline{Q}.

  • 2× pull-up PMOS (M1, M2) — 1 mark
  • 2× pull-down NMOS (M3, M4) forming the two inverters — 1 mark
  • 2× NMOS access/pass transistors (M5, M6) connecting Q,QQ,\overline{Q} to bitlines BL,BLBL, \overline{BL} — 1 mark
  • Wordline (WL) gates M5/M6; storage is bistable/latching — 1 mark

(b) [4] Read: precharge BL,BLBL,\overline{BL} high, assert WL. The node holding '0' pulls its bitline down slightly through access + pull-down; sense amp detects the differential (2). If the access transistor is too strong relative to the pull-down NMOS, the '0' node gets pulled up above the switching threshold and can flip the cell — read upset. So we enforce a cell ratio (pull-down width > access width) to keep the read-disturb node voltage below the inverter trip point (2).

(c) [2] Write: driver forces one bitline low; the access transistor must overpower the pull-up PMOS to drag the '1' node below the trip point and flip the latch. This is the pull-up ratio condition; access must be strong enough vs PMOS (opposite requirement to read → careful sizing trade-off).

Question 2 [12]

(a) [4] Constant-current discharge: ΔV=VDDVmin=1.20.6=0.6 V\Delta V = V_{DD}-V_{min} = 1.2-0.6 = 0.6\text{ V}. Q=CVΔQ=CΔVQ=CV \Rightarrow \Delta Q = C\,\Delta V; tret=ΔQ/I=CΔV/Ileakt_{ret}=\Delta Q/I = C\,\Delta V/I_{leak}. tret=25×1015×0.61×1015=15 st_{ret} = \dfrac{25\times10^{-15}\times0.6}{1\times10^{-15}} = 15\text{ s}. (4)

(b) [5]

  • Rows =213=8192=2^{13}=8192 (1)
  • Total refresh time =8192×50 ns=409600 ns=409.6 μs= 8192 \times 50\text{ ns} = 409600\text{ ns} = 409.6\ \mu s (2)
  • Overhead =409.6 μs15 s=2.73×1050.0027%= \dfrac{409.6\ \mu s}{15\text{ s}} = 2.73\times10^{-5} \approx 0.0027\% (2)

(c) [3] Smaller CC stores less charge → same leakage empties it faster → shorter trett_{ret} → more frequent refresh, wasting bandwidth/power (2). Mitigation: temperature-compensated / per-row (retention-aware) refresh, partial-array self-refresh, or finer-grained refresh scheduling (1).

Question 3 [10]

(a) [4] Bandwidth =bus width (bytes)×transfers/s= \text{bus width (bytes)} \times \text{transfers/s}. DDR → 2 transfers per clock. Transfers =2×1600 MHz=3200 MT/s= 2\times1600\text{ MHz} = 3200\text{ MT/s}. BW=8 bytes×3200×106=25.6×109 B/s=25.6 GB/sBW = 8\text{ bytes} \times 3200\times10^{6} = 25.6\times10^{9}\text{ B/s} = 25.6\text{ GB/s}. (4)

(b) [4] "DDR5-6400" → 6400 MT/s per pin (data rate). Base internal/IO clock discussion aside, per-pin = 6.4 Gbit/s (2). Module BW =8 bytes×6400×106=51.2 GB/s= 8\text{ bytes} \times 6400\times10^{6} = 51.2\text{ GB/s}. (2)

(c) [2] Bandwidth = throughput (data/sec); latency = time to first data return of a random access. Latency is dominated by fixed array access/row-activation delays (tRCD, tCAS in ns) that scale poorly, while data rate grows via wider prefetch and faster I/O — so latency in ns stays roughly flat.

Question 4 [12]

(a) [4] A floating gate sits between control gate and channel, fully insulated. Program: high gate voltage → electrons tunnel (Fowler-Nordheim) / hot-electron inject onto the floating gate, raising VthV_{th} (2). Erase: reverse field removes electrons (tunneling to substrate/source), lowering VthV_{th} (1). Reading at a fixed gate voltage: high VthV_{th} = won't conduct (one state), low VthV_{th} = conducts (other state) (1).

(b) [3] MLC = 2 bits (4 levels), TLC = 3 bits (8 levels), QLC = 4 bits (16 levels) (2). General: L=2nL = 2^{n} (1).

(c) [3] TLC = 3 bits/cell × 2202^{20} cells =3×220= 3\times2^{20} bits =3145728= 3145728 bits =393216= 393216 bytes (384 KiB) (2). QLC = 4 bits/cell = 4×220=5242884\times2^{20}=524288 bytes; extra =524288393216=131072= 524288-393216 = 131072 bytes (128 KiB) (1).

(d) [2] More levels pack VthV_{th} windows tighter → smaller margins, more sensitive to charge loss/disturb → more program-verify iterations and stronger ECC → higher write/read latency; and tighter windows tolerate less oxide degradation → fewer P/E cycles (lower endurance).

Question 5 [10]

(a) [3] SEC needs 2pd+p+12^{p} \ge d + p + 1 (must uniquely address d+pd+p bit positions plus the no-error syndrome). Try p=7p=7: 27=12864+7+1=722^7=128 \ge 64+7+1=72 ✓; p=6p=6: 647164 \ge 71 ✗. So p=7p=7. (3)

(b) [5] Positions 1–7; parity at 1,2,4; data d1d2d3d4=1,0,1,1d_1d_2d_3d_4=1,0,1,1 at positions 3,5,6,7. Layout: p1p2d1p4d2d3d4=p1p21p4011p_1\,p_2\,d_1\,p_4\,d_2\,d_3\,d_4 = p_1\,p_2\,1\,p_4\,0\,1\,1.

  • p1p_1 covers 1,3,5,7 = p1,1,0,1p_1,1,0,1 \Rightarrow parity of {1,0,1}=0p1=0\{1,0,1\}=0 \Rightarrow p_1=0 (even).
  • p2p_2 covers 2,3,6,7 = p2,1,1,1p_2,1,1,1 \Rightarrow parity of {1,1,1}=1p2=1\{1,1,1\}=1 \Rightarrow p_2=1.
  • p4p_4 covers 4,5,6,7 = p4,0,1,1p_4,0,1,1 \Rightarrow parity of {0,1,1}=0p4=0\{0,1,1\}=0 \Rightarrow p_4=0. Codeword (pos1..7): 01100110\,1\,1\,0\,0\,1\,1. (5)

(c) [2] SEC-DED = Single-Error-Correct, Double-Error-Detect. Costs one extra overall parity bit beyond SEC (here 8 bits for 64 data → the common ECC DIMM 72/64 scheme).

Question 6 [6]

(a) [3] CAM is searched by content, not address: you present a data word and it returns the address(es)/match line where that word is stored in one cycle (parallel compare across all rows) (2). Application: network router TAG/forwarding lookup, TLBs, cache tag matching (1).

(b) [3] Flash cells have limited P/E cycles; concentrating writes on few blocks wears them out early — wear leveling spreads writes evenly (1). Dynamic: only remaps blocks currently being written (free/hot data) (1). Static: also relocates rarely-changing (cold) data so those low-wear blocks join the pool, evening wear across the whole device (1).

[
  {"claim":"DRAM retention time = 15 s","code":"C=25e-15; dV=0.6; I=1e-15; t=C*dV/I; result = abs(t-15)<1e-9"},
  {"claim":"Total refresh time = 409.6 us for 2^13 rows at 50ns","code":"rows=2**13; tot=rows*50e-9; result = abs(tot-409.6e-6)<1e-12"},
  {"claim":"DDR-1600 64-bit BW = 25.6 GB/s","code":"bw=8*2*1600e6; result = abs(bw-25.6e9)<1"},
  {"claim":"DDR5-6400 64-bit BW = 51.2 GB/s","code":"bw=8*6400e6; result = abs(bw-51.2e9)<1"},
  {"claim":"TLC 2^20 cells = 393216 bytes; QLC extra 131072 bytes","code":"tlc=3*(2**20)//8; qlc=4*(2**20)//8; result = (tlc==393216) and (qlc-tlc==131072)"},
  {"claim":"SEC parity bits for 64 data = 7","code":"d=64; p=1;\nwhile 2**p < d+p+1: p+=1\nresult = (p==7)"},
  {"claim":"(7,4) Hamming encode of 1011 = 0110011","code":"d1,d2,d3,d4=1,0,1,1; p1=(d1+d2+d4)%2; p2=(d1+d3+d4)%2; p4=(d2+d3+d4)%2; cw=[p1,p2,d1,p4,d2,d3,d4]; result = cw==[0,1,1,0,0,1,1]"}
]