
A 1 kbit (32 rows x 32 bits) DRAM built from all-NMOS 3T gain cells (write device, storage device, read access device; 2.2 um^2 per bit), generated with Chips4Makers c4m-flexmem / PDKMaster. The data is the charge on the gate of the storage device; a read does not disturb it. The storage device is low Vt, so it reads the reduced '1' that an NMOS write device passes (VDD minus its threshold); the write and access devices are standard Vt to keep the leakage low. The read is inverting: a stored '1' discharges the precharged read bit line. The column periphery (precharge, sense inverter, write driver per column) is built from sky130_fd_sc_hd cells inside the DRAM macro.
The controller precharges the read bit lines, raises the read word line for a programmable window, writes rows back (byte writes are read-modify-write) and refreshes one row every 2^(k+4) clocks. Refresh goes ahead of the test engine and the continuous read, so it keeps its rate under any load except back-to-back user accesses. A test engine writes a pattern to the whole array, waits 2^p clocks (with or without refresh), reads it back and counts the failing bits, recording the first failing row and column.
Set the address on uio[3:0], the data on ui_in, and pulse uio[4] to write. uo_out
always shows the addressed register. uio[6] is busy, uio[7] a one clock trigger.
The strobe goes through a two flop synchroniser, so the controller samples address and
data up to four clocks after the strobe rising edge: hold them that long, and for DATA
hold ui_in until busy is low. busy rises up to four clocks after the strobe, so wait
six clocks before polling it. Do not write ROW, BYTE or TIMING while busy is high: an
access takes them when it starts, which can be after a refresh.
| Addr | Name | Access | Function |
|---|---|---|---|
| 0 | ROW | rw | [4:0] row |
| 1 | BYTE | rw | [1:0] byte (columns 8BYTE+7..8BYTE) |
| 2 | DATA | w | write byte BYTE of ROW, then BYTE+1 |
| r | byte of the last read | ||
| 3 | CMD | w | [1] read, [2] start test, [3] clear test results |
| r | status {busy, test running, test done, fail, 0000} | ||
| 5 | CTRL | rw | [0] refresh enable (reset 1), [1] continuous read of ROW/BYTE, [2] trigger on refresh ticks (else on access / test done), [5:3] refresh interval k |
| 6 | TIMING | rw | [3:0] read window: rwl high for N+2 clocks (reset 4; set it by temperature, see the operating notes); writes pulse wwl for 4 clocks |
| 7 | TCFG | rw | [1:0] pattern (ones, zeros, checkerboard, inverse), [7:3] pause p: 2^p clocks (max 23) |
| 8, 9 | ERR | r | failing bit count [7:0], [10:8] (undefined after reset until a test start or a CMD clear; counts the pause timer during a pause with p >= 11) |
| 10 | FROW | r | {valid, 00, first failing row} |
| 11 | FCOL | r | {000, first failing column} |
| 15 | ID | r | 0xD3 |
uio[7] and watch uo_out (address 2) bits fall to 0
as the cells lose their charge. Expected retention at room temperature is tens of ms
on typical silicon and can be under a millisecond on fast NMOS silicon; it is much
shorter when warm. With CTRL=0x03 (refresh on) the data stays.The read window depends on temperature. Cold silicon reads a weak '1' slowly, so it needs a long window; hot silicon leaks a precharged '0' bit line down, so it needs a short one. At 50 MHz:
| Temperature | TIMING | Read window |
|---|---|---|
| 70 °C and above | 1 (0 for more margin) | 60 ns (40 ns) |
| 0 to 70 °C | 4 (reset) | 120 ns |
| below 0 °C | 10 | 240 ns |
The sign-off simulations ran these windows at 85, 27 and -40 °C; the boundaries between them are not simulated. Change TIMING with refresh off and busy low, then turn refresh back on: an access that is running when TIMING drops below its window count keeps the read word line on for up to 16 more clocks.
An oscilloscope or logic analyser on uo_out and uio[7]; a microcontroller (for
example the Tiny Tapeout demo board RP2040) to drive the register interface.
| # | Input | Output | Bidirectional |
|---|---|---|---|
| 0 | wdata[0] | rdata[0] (addressed register) | addr[0] |
| 1 | wdata[1] | rdata[1] (addressed register) | addr[1] |
| 2 | wdata[2] | rdata[2] (addressed register) | addr[2] |
| 3 | wdata[3] | rdata[3] (addressed register) | addr[3] |
| 4 | wdata[4] | rdata[4] (addressed register) | write strobe |
| 5 | wdata[5] | rdata[5] (addressed register) | N/C |
| 6 | wdata[6] | rdata[6] (addressed register) | busy |
| 7 | wdata[7] | rdata[7] (addressed register) | trigger |