Reference  ·  Step 1: PCM basics  ·  Step 2: writing a weight  ·  Step 3: crossbar simulator  ·  PCM home  ·  Compare: ReRAM reference

PCM reference

The equations, terms, symbols and settings used across the three PCM steps, in one place. Keep it open next to the simulator, or use it to look something up when a word is new. Everything about the array itself (Ohm’s law, Kirchhoff, converters, IR drop) is the same as for ReRAM. What changes is the cell: how a pulse moves it, how a weight is written, and what happens afterwards.

Learning path

Three short lessons, each building on the one before. If you are new to this, go in order.

The signal chain in one line

Everything in the simulator sits somewhere on this path. The middle is analog. The two ends are converters to and from the digital world.

  1. digital

    Input x

    0 to 1

    A number from the model or the previous layer.

  2. converter

    DAC

    V = x × V_read

    Rounds the input and makes a voltage.

  3. analog

    Word lines

    V_1 … V_M

    One voltage per row, all applied at once.

  4. analog

    Cells

    I = V × G

    Each cell stores a weight as G and multiplies.

  5. analog

    Bit lines

    I = Σ V × G

    The currents of a column add on the wire.

  6. analog

    Subtract

    I⁺ − I⁻

    The pair gives a signed result.

  7. converter

    ADC

    code → y

    Turns the current into an integer, then a number.

Key equations

Each one has a worked example with the simulator's default numbers (Gmin = 0.5 µS, Gmax = 50 µS) and a pointer to where you can see it. Equations 8, 9, 10, 12 and 13 describe this teaching model, not a measured device.

1. Ohm's law, one cell

I = V × G      (G = 1 / R)

The current through a cell is the voltage across it times its conductance. This is the multiplication.

Example. 0.2 V × 50 µS = 10 µA (the same cell is 20 kΩ).

Used in: Step 1 (read a cell). Step 3, every cell of the array.

2. Kirchhoff's current law, one bit line

I_j = Σ_i  V_i × G_ij

All cells on a bit line feed one wire, and the currents simply add. This is the accumulation.

Example. 0.10 V × 60 µS + 0.20 V × 30 µS = 6 + 6 = 12 µA.

Used in: Step 3, crossbar step 4 (Sum columns).

3. Input to voltage (DAC)

V_i = x_i × V_read

An input between 0 and 1 is rounded to one of 2^b − 1 steps and turned into a word-line voltage no larger than the read voltage.

Example. x = 0.5 and V_read = 0.2 V give 0.10 V. With a 4-bit DAC the steps are 1/15 apart.

Used in: Step 3, Input DAC slider.

4. Weight to conductance

level = round(|w| × (L − 1))
G = Gmin + level / (L − 1) × (Gmax − Gmin)
L = 2^bits

The weight magnitude is rounded to one of L levels and mapped linearly onto the window between Gmin and Gmax. The sign picks the G⁺ or G⁻ cell.

Example. |w| = 0.62 with 3 bits: level = round(4.34) = 4, so G = 0.5 + 4/7 × 49.5 = 28.8 µS.

Used in: Step 2, step 3 (Round to a level). Step 3, Weight levels slider.

5. Differential read-out

y = (I⁺ − I⁻) / (V_read × (Gmax − Gmin))

Subtract the two bit-line currents of a pair and divide by the scale factor to turn current back into a number. Gmin is in both cells and cancels.

Example. x = 0.5, G⁺ = 28.8 µS, G⁻ = 0.5 µS: I⁺ = 2.88 µA, I⁻ = 0.05 µA, so y = 2.83 / 9.9 = 0.286 (the ideal for the rounded weight is 0.5 × 0.571 = 0.286).

Used in: Step 2, step 6 table. Step 3, results table.

5b. Two other ways to store the sign

G⁺ only + reference column:
  level = round((w + 1)/2 × L),   G = Gmin + level/L × (Gmax − Gmin)
  G_ref = Gmin + (Gmax − Gmin)/2   (every row of the reference column)
  y = 2 × (I − I_ref) / (V_read × (Gmax − Gmin))

Unsigned, negatives clipped:
  level = round(max(w, 0) × L),   G = Gmin + level/L × (Gmax − Gmin)
  y = I / (V_read × (Gmax − Gmin))

The differential pair spends two cells per weight. These two spend one. With a reference column the weight is shifted into 0 to 1 and the middle conductance stands for zero, so negatives work and the Gmin leakage cancels, but one set of levels covers both signs, so each step in w is twice as coarse. With no subtraction at all, negative weights are lost and the leakage of every cell stays in the sum.

Example. x = 0.5 (V = 0.1 V), w = 0.6, L = 15, Gmin = 0.5 µS, Gmax = 50 µS. Reference column: level 12, G = 40.1 µS, I = 4.01 µA, I_ref = 0.1 × 25.25 = 2.525 µA, so y = 2 × 1.485 / 9.9 = 0.300, exactly x × w. Unsigned: level 9, G = 30.2 µS, I = 3.02 µA, so y = 3.02 / 9.9 = 0.305. The extra 0.005 is the leakage x × Gmin/(Gmax − Gmin).

Used in: Step 3, Weight sign setting.

6. Output ADC

step = R / (2^(b−1) − 1)
R = rows × ADC range

The converter has 2^(b−1) − 1 steps on each side of zero between −R and +R. Smaller R gives finer steps, but any output larger than R is clipped. (Default analog layout.)

Example. 4 rows, 100% range, 8 bits: R = 4, step = 4 / 127 = 0.031.

Used in: Step 3, Output ADC and ADC range sliders.

7. The write loop

a_target = ln(G_target / Gmax) / ln(Gmin / Gmax)
pick V_n: the strongest SET whose nominal shrink factor f(V) is still ≥ a_target / a_n
if |G − G_target| ≤ tol × (Gmax − Gmin): stop
if G > G_target + tol: RESET (a = 1) and climb again

A SET only shrinks the amorphous dome, so the controller aims at the dome size a_target that gives the wanted conductance and chooses each pulse so that it should not shrink the dome past it. A strong pulse is used far away and a gentle one close by. After every pulse the cell is read. If a pulse overshoots, nothing can undo it: the cell is RESET and the climb starts again.

Example. G_target = 28.8 µS gives a_target = 0.12. From the erased cell (a = 1) a pulse of about 1.75 V takes a to about 0.29 (G from 0.5 to 13 µS), then about 1.55 V takes it to 0.13 (G about 28 µS). That is inside a ±2% tolerance of ± 1 µS, after two pulses.

Used in: Step 2, step 5. Step 3, Programming panel.

8. How a pulse moves the cell (teaching model)

G(a) = Gmax × (Gmin / Gmax)^a             a = amorphous fraction, 0 to 1
T_peak = 300 + 162 × V² × (1 − e^(−t_p / 30 ns))   K
rate r = exp(−((T_peak − 700) / 130)²)   for 430 K < T_peak < 900 K, else 0
SET:   a ← a × exp(−r × t_p × f / 40 ns)
RESET: T_peak > 900 K melts the cell and the fast edge freezes it: a ← 1

The pulse heats the cell. Between 430 K and 900 K it crystallizes, fastest near 700 K, so SET shrinks the amorphous dome a bit more each pulse. Above 900 K it melts, and a fast, short pulse quenches it into glass: a full dome and G = Gmin. G falls exponentially with dome size, so equal steps of G need unequal steps of a. f is a random factor near 1, set by σ, partly fixed per cell and partly new each pulse. This is an illustrative rule, not a measured device equation.

Example. V = 1.3 V and t_p = 50 ns: T_peak = 300 + 162 × 1.69 × 0.811 = 522 K, r = 0.153, so a shrinks by exp(−0.153 × 50 / 40) = 0.826 per pulse. From a = 1 the cell moves from 0.5 µS to 1.1 µS. A 3.1 V, 20 ns pulse reaches about 1060 K and RESETs it.

Used in: Step 1, Step 2, Step 3 Programming panel.

9. Time and energy of a write (teaching model)

SET pulse:    E = V² × t_p / R_h
RESET pulse:  E = (3.1 V)² × 20 ns / R_h
Verify read:  E = V_read² × G × t_read + E_ADC
(R_h = 5 kΩ heater)

Units work out as volts² / kΩ × ns = picojoules. Time is t_p per SET, 20 ns per RESET and (t_read + t_ADC) per verify read. Cells in one row are written in parallel, so a row takes as long as its slowest cell.

Example. One 1.3 V SET pulse of 50 ns: 1.69 × 50 / 5 = 16.9 pJ. One RESET: 9.61 × 20 / 5 = 38.4 pJ, more than two SET pulses.

Used in: Step 2, step 6 tiles. Step 3, Programming panel tiles.

10. Compute energy and break-even reuse (teaching model)

E_crossbar = Σ V × I × t_read
           + inputs × E_DAC + columns × E_ADC
E_digital  = (M × N) × (E_MAC + E_fetch)
break-even = E_write / (E_digital − E_crossbar)

The crossbar pays once to write its weights and then a small amount per product. The digital processor pays to fetch every weight on every product. The crossbar only wins on energy after enough products reuse the same weights. The constants in the efficiency panel are ballpark values you can edit.

Example. If writing the weights costs 1,400 pJ and each product saves 15 pJ, the break-even is about 93 products.

Used in: Step 3, efficiency panel.

11. IR drop

solved numerically (Gauss-Seidel)

There is no short formula. Every wire segment has a resistance R_w, and the simulator solves the whole network of cells and wires. Cells far from the drivers see less than the intended voltage, so their currents come out lower than the ideal. Larger conductances draw more current, so they make the drop worse.

Example. With 200 Ω segments and default settings the RMS output error grows from 0.032 (Gmax = 20 µS) to 0.056 (50 µS) and 0.090 (100 µS).

Used in: Step 3, Wire R slider.

12. Drift after the write

G(t) = G(1 s) × t^(−ν)
ν = 0.005 + 0.095 × a

After the write the glass relaxes and the conductance falls as a power law of the time t since the write (in seconds, with G(1 s) the value right after the write). The exponent ν grows with the size of the amorphous dome: nearly crystalline cells barely move, mostly amorphous ones drift much more. The verify read happens within the first second, so it cannot see any of this.

Example. G = 28.8 µS has a = 0.12, so ν = 0.016. After a year (3.15 × 10⁷ s) it reads 0.016 → 28.8 × 0.75 = 21.7 µS. The erased partner cell (a = 1, ν = 0.1) falls from 0.50 to 0.09 µS.

Used in: Step 1, drift slider. Step 2, step 6. Step 3, Time since write slider.

13. A single global gain against drift

y_corrected = y × t^ν_ref        (ν_ref = 0.03 in the simulator)

A chip can multiply all outputs by one factor that grows with time. It is exact only for cells whose ν equals ν_ref. Cells with a smaller ν are over-corrected and cells with a larger ν are under-corrected, and every cell in an array has its own ν.

Example. After a year the gain is 3.15 × 10⁷ ^ 0.03 = 1.68. The 28.8 µS cell (ν = 0.016) keeps only 0.75 of its value, so the gain overshoots to 0.75 × 1.68 = 1.27, 27% too high.

Used in: Step 3, Global drift gain setting.

Glossary

Type to filter the 48 terms by name or by anything in the definition.

Adaptive pulse
A write scheme where the controller picks each SET amplitude from how far the cell still has to go: strong pulses far away, gentle ones close by. The default write method in the simulator.
ADC (analog-to-digital converter)
Turns a bit-line current into an integer code. More bits give finer output steps. In the efficiency model each extra bit doubles the ADC's energy.
Amorphous and crystalline
Glass-like and ordered. The amorphous state resists current (low G) and the crystalline state conducts well (high G). The cell holds a mix of the two.
Amorphous dome, fraction a
The glassy cap over the heater in a mushroom cell. In this model its size is a, from 0 (no glass) to 1 (full dome), and G = Gmax × (Gmin / Gmax)^a.
Bit line (BL)
The wire that runs down a column and collects the currents of every cell in it. Its total current is the sum of V × G over the column.
Bit slicing (binary weighted encoding)
Storing each bit of a weight in its own pair of two-state cells and combining the bit planes with shifts and adds in digital logic. It uses more cells and more ADC conversions, but each cell only needs two well-separated states. The Cell encoding menu in Step 3 offers it.
Block erase
A RESET applied to a block of cells so that all of them start from the full-dome state, Gmin, before the SET climb begins.
Chalcogenide (GST)
The family of alloys used for PCM, for example germanium-antimony-tellurium (Ge₂Sb₂Te₅). They switch between glass and crystal in nanoseconds, which is why they are also used in rewritable optical discs.
Compute-in-memory (in-memory computing)
Doing arithmetic inside the memory array where the data is stored, instead of moving the data to a separate processor.
Conductance (G)
How easily a cell passes current. G = 1 / R, measured in siemens (S). The cells here sit between 0.5 and 50 µS, which is 2 MΩ down to 20 kΩ. Conductances on a shared wire simply add, which is why weights are stored as conductance and not as resistance.
Crossbar
A grid of word lines crossing bit lines, with one memory cell at every crossing.
Crystallization
SET: a longer, gentler pulse keeps the cell hot but below melting (best near 700 K here), so the glass slowly turns back into crystal and the dome shrinks. Each pulse shrinks it a bit more.
Cycle-to-cycle variation
The same cell responds a little differently to the same pulse each time it is written.
DAC (digital-to-analog converter)
Turns an input number into a voltage on a word line. The simulator rounds inputs to 2^b − 1 steps.
Device-to-device variation
Different cells respond differently to the same pulse, because no two domes form identically. The σ slider sets how large the spread is.
Differential pair (G⁺ / G⁻)
Two cells that together store one signed weight. The positive part goes in G⁺, the negative part in G⁻, and the read-out subtracts the two currents.
Drift compensation
Correcting for drift in the readout, for example with a single gain that grows with time. It works only as well as the cells share one ν.
Drift exponent (ν)
The power in the drift law. In this model ν = 0.005 + 0.095 × a, so nearly crystalline cells (small dome) drift little and mostly amorphous cells drift a lot.
Endurance
How many SET and RESET cycles a cell survives before its window shrinks or it stops switching. Step 1 has a write-cycles slider that shows it.
High-resistance state (HRS) and low-resistance state (LRS)
The two extremes of a cell. HRS is the lowest conductance (Gmin, full amorphous dome) and LRS is the highest (Gmax, no dome). Between them the cell can hold intermediate analog levels.
IR drop
Voltage lost along the resistance of the wires. Cells far from the drivers see less voltage, so their currents are lower than the ideal. The Wire R slider controls it and the simulator solves for it.
Joule heating
Heat from the current passing through the cell. PCM is programmed by it, so SET and RESET pulses are heat pulses as much as voltage pulses.
Kirchhoff's current law
The currents flowing into a point add up to the currents flowing out. It is why all the cell currents on one bit line sum into a single current.
Level (conductance level)
One of the 2^b discrete conductance values a cell is aimed at. Level k of L − 1 steps sits at Gmin + k / (L − 1) × (Gmax − Gmin).
Matrix-vector multiplication (MVM)
y = xᵀW: every output is the dot product of the input vector with one column of weights. It is the main operation inside neural-network layers.
Melt-quench
RESET: a short, strong pulse heats the cell past the melting point (900 K in this model) and the pulse edge is so fast that the melt freezes into glass instead of crystallizing.
Multiply-accumulate (MAC)
One multiplication added to a running total. A matrix-vector product is many MACs.
Mushroom cell
A common PCM layout: a narrow heater electrode under a layer of phase-change material, so the hottest spot, and the glassy dome, forms over the heater.
Neural network (NN)
A model built from layers. Each layer computes weighted sums of its inputs and then applies a simple nonlinear function. The weights are numbers learned during training. These lessons only need the weighted sum, which a crossbar computes in one read.
Non-volatile
Keeps its stored state with the power off.
Ohm's law
V = I × R, or equivalently I = V × G. It is the multiplication step in the crossbar.
On/off ratio (window)
Gmax / Gmin. With the defaults, 50 / 0.5 = 100. A wider window leaves more room between levels.
Open-loop write
Applying a fixed train of pulses without reading the cell back. It is cheap, but device variation lands directly in the stored weight.
Overshoot
A SET pulse that leaves the conductance above the target band. PCM has no gentle step down, so the cell must be RESET and written again.
Phase-change memory (PCM)
A memory cell made of a chalcogenide alloy that can be glass (amorphous, high resistance) or crystal (low resistance). Heat pulses switch it, and it keeps its state with the power off. It can hold a bit or, with intermediate dome sizes, a neural-network weight.
Program-and-verify (write-verify)
Writing in a loop: pulse, read back, compare with the target, and repeat until the cell is within tolerance or the pulses run out. In PCM an overshoot cannot be undone by another SET, so it costs a RESET and a new climb.
Quantization
Rounding to one of a limited set of values: inputs by the DAC, weights to conductance levels, outputs by the ADC.
Read disturb
A read at too high a voltage can heat the cell enough to change its state, so the read voltage is kept low.
Reference column
One extra column of cells, all at the middle conductance Gmid, shared by every output. Its current is subtracted from each output, so a single cell per weight can still stand for a negative weight.
RESET
A pulse that melts the cell and quenches it into glass. In this model it always returns the cell to the full dome and Gmin, so it is both the erase and the only way down.
Resistance drift (drift)
After the write the amorphous glass slowly relaxes and the conductance falls as a power law of time, G(t) = G(1 s) × t^(−ν). Steps 1, 2 and 3 each have a time slider that shows it.
SET
A pulse that crystallizes part of the dome and so raises the conductance. In PCM it comes in small steps and can only go up.
Sneak path
In a passive crossbar, current that finds a route through other cells instead of the selected one, which corrupts reads and writes. Transistors (1T1R) or selector devices suppress it. This simulator does not model sneak paths.
Tolerance
How close to the target counts as done in a verify loop, set as a percent of the Gmax − Gmin window.
Unsigned encoding (negatives clipped)
One cell per weight and no subtraction. A cell cannot be negative, so negative weights are stored as 0, and the Gmin leakage of every cell adds a small offset to each output.
Von Neumann bottleneck
The time and energy spent moving data between a separate memory and processor. Computing in the array avoids moving the weights.
Weight
A number the model learned. Here it runs from −1 to +1 and is stored as conductance in one or two cells.
Word line (WL)
The wire that runs along a row and carries one input voltage to every cell in that row.

Symbols and units

The defaults are the values the simulator starts with.

SymbolMeaningUnitDefault or rule
x_iInput value for row i0 to 1set with the input sliders
V_iVoltage on word line iVx_i × V_read
V_readRead voltageV0.2
w_ijWeight in row i, output j−1 to +1set in the weight matrix
G_ijConductance of one cellµSGmin to Gmax
Gmin, GmaxConductance of the high- and low-resistance statesµS0.5 and 50
ΔGThe window, Gmax − GminµS49.5
b, LBits per weight and number of levels, L = 2^bbits, count4 bits, 16 levels
M, NRows (inputs) and outputs. There are 2N bit linescount4 and 4
I_jCurrent on bit line jµAΣ V_i × G_ij
y_jOutput j after read-out and ADCnoneideal: Σ x_i × w_ij
σDevice variation%10
R_wWire resistance per segmentΩ0
aAmorphous fraction (dome size), 0 = crystal, 1 = full glassnoneG = Gmax × (Gmin / Gmax)^a
V_setSET pulse amplitude (fixed-pulse method)V1.3
T_peakPeak temperature of a pulseK300 + 162 V² (1 − e^(−t_p/30 ns))
νDrift exponentnone0.005 + 0.095 a
tTime since the writes10^x, x set by the slider (0 = 1 s)
tolVerify tolerance as a share of ΔG%2
t_pWrite pulse widthns50
R_hHeater resistance used for pulse energykΩ5
t_read, t_ADCRead pulse and ADC conversion timens10 and 10

1 µS = 10⁻⁶ siemens, which is a resistance of 1 MΩ. 50 µS is 20 kΩ. A voltage in volts times a conductance in µS gives a current in µA. A voltage times a current in µA times a time in ns gives energy in fJ (1,000 fJ = 1 pJ). Volts² over kΩ times ns gives pJ directly.

What each setting does

Each row says what happens when you raise the setting. The numbers are the RMS output error (or the write cost) measured on the simulator’s default 4 × 4 example with 10% variation and adaptive program-and-verify writing, changing one setting at a time. They are a guide to the direction and size of each effect, and will shift if you change other settings or the simulator is updated.

Array and signal chain

ControlWhat it isRaise it, and what happensUsed in
Array sizeRows and outputs.More rows add more products per read, but also longer wires (more IR drop) and more cells to write.Step 3
Cell encodingAnalog multi-level (one cell holds any of 2^bits levels) or binary weighted (one 1-bit cell per weight bit, planes combined by shift and add).Binary weighted uses as many bit planes as the Weight levels setting, so more cells and more ADC conversions, but each cell only needs two well-separated states and tolerates far more variation.Step 3
Weight sign and cells per weightWeight sign: Signed keeps negative weights, Unsigned stores them as 0. Cells per weight: a G⁺/G⁻ pair (two cells) or G⁺ only (one cell, with a shared reference column when signed).The pair uses two cells per weight. The reference column and the unsigned layout use about half as many. The reference column keeps negatives but makes each step in w twice as coarse. Unsigned loses negatives and adds a Gmin offset to every output.Step 3
Input DAC (1 to 8 bits)Resolution of the input voltages.Finer inputs and lower error: RMS output error 0.080, 0.032 and 0.029 at 2, 4 and 8 bits in the default example. DAC energy doubles with each bit.Step 3
Weight levels (1 to 8 bits)How many conductance levels a weight can take.Finer weights and lower error: 0.109, 0.032 and 0.018 at 2, 4 and 8 bits. The levels also sit closer together, so they are harder to hit.Steps 2, 3
Output ADC (3 to 12 bits)Resolution of the converter on each bit-line pair.Lower error: 0.125, 0.032 and 0.030 at 4, 8 and 12 bits. ADC energy doubles with each bit (write energy with verify reads: 2.4, 2.6 and 5.5 nJ).Step 3
ADC range (20 to 100%)Full scale as a share of the number of rows.Too small clips large outputs (error 0.286 at 20%). Too large wastes resolution (0.032 at 100% against 0.034 at 50%). Pick a range just above the largest expected output.Step 3
Read voltage (0.05 to 0.3 V)Voltage that a full-scale input puts on a word line.Scales every current and the array energy. It does not change accuracy in this model. On a real PCM cell a high read voltage can heat it and disturb the state.Steps 1, 3
Gmin and GmaxThe two ends of the conductance window.Gmin barely matters here (error 0.089 at 0.1, 0.5 and 2 µS with ideal writes), because the pair cancels its leakage. Raising Gmax makes IR drop worse (error 0.032, 0.056 and 0.090 at 20, 50 and 100 µS with 200 Ω wires).Steps 1, 3
Variation σ (0 to 25%)Spread in how cells respond.With ideal writes it goes straight into the weights (error 0.019, 0.089 and 0.233 at 0, 10 and 25%). Open loop is similar (0.033, 0.087 and 0.202, with 19 of 32 cells in tolerance at 25%). Program-and-verify cancels most of it (0.032 at 10%), but a high σ costs more pulses and restarts (77 pulses and 3.6 nJ at 25%, against 45 and 2.6 nJ at 10%).Steps 1, 2, 3
Wire R per segment (0 to 300 Ω)Resistance of each wire segment.More IR drop and more error: 0.032, 0.032 and 0.072 at 0, 100 and 300 Ω. PCM’s lower conductances make it less sensitive than ReRAM.Step 3
Time since write (0 to 9, log₁₀ s)How long the array has sat since it was written. 0 is 1 s, 3 is about 17 minutes, 5 about a day, 7 about 4 months, 9 about 32 years.Drift pulls every conductance down by its own factor, so the outputs slide away from ideal: error 0.032, 0.083, 0.127, 0.165 and 0.213 at 0, 3, 5, 7 and 9. It does not depend on the write method: drift already dominates the write error after about 17 minutes.Steps 1, 2, 3
Global drift gain (off or on)Multiplies every output by t^0.03.Worse here, not better: error 0.137, 0.219, 0.309 and 0.406 at 3, 5, 7 and 9 with the gain on. The cells that carry the large weights are nearly crystalline, with ν below 0.03, so they are over-corrected. A single gain only fits cells whose ν equals 0.03.Step 3

Writing the weights

ControlWhat it isRaise it, and what happensUsed in
Write methodAdaptive pulse, same pulse every time, open loop, or ideal.Adaptive: 45 pulses, 1.3 µs, 2.6 nJ for the 4 × 8 default array, all 32 cells in tolerance. Same pulse: 257 pulses, 8.4 µs, 6.5 nJ and one cell out. Open loop replays a calibrated train (39 pulses, 720 ns, 2.3 nJ) but only 22 of 32 cells end in tolerance. Ideal skips programming and adds only Gaussian variation.Steps 2, 3
Fixed SET pulse (1.0 to 1.9 V)Amplitude used by the same-pulse method only.Too low barely crystallizes (1.0 V: 640 pulses, 16 of 32 in tolerance). The default 1.3 V takes 257 pulses. Too high is coarse and tends to overshoot, forcing RESETs (1.9 V: 470 pulses, 20 nJ, 21 of 32 in tolerance).Steps 2, 3
Verify tolerance (0.5 to 10%)How close counts as done.Looser is cheaper and less accurate: 76, 45 and 29 pulses and error 0.019, 0.032 and 0.050 at 0.5, 2 and 10%.Steps 2, 3
Max pulses per cell (1 to 60)Pulse limit (SET and RESET) before the loop gives up.Too low and cells stop before they arrive (error 0.087 with 24 of 32 in tolerance at 2). From 6 up the default example no longer notices.Steps 2, 3
Pulse width (10 to 500 ns)Duration of each SET pulse.Longer pulses crystallize more per pulse, so the steps get coarse and overshoot more (25 of 32 cells in tolerance at 500 ns, 358 pulses), and they cost time and energy (53 µs and 49 nJ at 500 ns, against 4.5 µs and 6.5 nJ at 10 ns, where the pulses are weak and need 365).Step 3
Write orderA row at a time, or one cell at a time.Changes write time only (1.3 µs against 3.8 µs for the 4 × 8 default array).Step 3
Block erase firstCounts the cost of the RESET of the whole array.Switching it off removes about 1.2 nJ from the default array's write energy (1.3 nJ against 2.6 nJ), but the cells then start from old data in a real device.Steps 2, 3

Efficiency panel

ControlWhat it isRaise it, and what happensUsed in
Digital weight sourceWhere the processor fetches weights from.SRAM costs about 1.3 pJ per weight in the model and DRAM about 160 pJ. DRAM makes the digital side far more expensive, so the crossbar wins sooner.Step 3
MAC lanes and clockHow many multiply-adds the digital side does at once, and how fast.More lanes and a faster clock cut the digital latency. The crossbar's latency does not depend on them.Step 3
PCM read pulse and ADC conversionTime to read the array and to convert the result.Together they set the crossbar's latency for one product. They do not depend on array size.Step 3
Weight reuseHow many products reuse one set of written weights.Spreads the one-time write cost over more products. A PCM write costs more than a ReRAM one (a RESET alone is about 38 pJ per cell), so reuse matters. The table shows the break-even.Step 3

Common questions

Why store a weight as conductance and not resistance?

Because currents on a shared wire add in terms of conductance: I = V × (G₁ + G₂ + ...). Resistances in parallel combine through reciprocals, which does not give a sum. With conductance, the wire does the accumulation for free.

Why does a weight need two cells?

A conductance cannot be negative. One cell holds the positive part and one holds the negative part, and the read-out subtracts them. Step 2 walks through it.

Does reading a cell change the weight?

Not at a small read voltage: the read heats the cell far less than a pulse does. It does not stop the drift, though, which runs on its own clock from the moment of the write.

Is the crossbar analog or digital?

The array itself is analog: voltages go in, currents add, and a current comes out. The DACs and ADCs at the edges are the interface to the digital system around it.

Why can PCM only step up and not down?

SET crystallizes a little at a time, so a series of small pulses climbs gradually. Going the other way means melting the dome, and RESET melts and re-freezes the whole cell in one go. So there is no small step down: an overshoot costs a RESET and a new climb. That is why the write loop uses gentle pulses near the target.

Why verify after each pulse?

The same pulse shrinks the dome by a different factor in different cells. Reading back lets the controller stop each cell near its target, or RESET it if it overshot. In Step 3, switch to open loop and press Try a different cell to see the spread.

The weights were correct when I wrote them. Why do the outputs get worse later?

Drift. The glass in each cell relaxes and its conductance falls as a power law of time, by a factor that depends on how large the dome is. The verify read happens right after the pulse, so it cannot see this. Raise Time since write in Step 3 to watch it, and try the global gain to see what a single correction can and cannot do.

If PCM is so efficient, why does not every chip use it?

Writing is slow and costly (a RESET alone is tens of picojoules per cell), cells vary and drift, endurance is limited, large arrays suffer IR drop, and the converters take energy and area. It suits cases where the same weights are read many times, such as running a trained network. The efficiency panel in Step 3 lets you see where the advantage appears and where it does not.

Is this simulator a model of a real chip?

No. It is a generic teaching model. The device response, the energies and the timings are illustrative values, and it has not been compared against measured hardware or a circuit simulator such as SPICE.

Further reading

Start with the PCM review by Le Gallo and Sebastian and the 2023 chip paper. The others are the original sources for ideas used in these pages. The device numbers in the simulator are illustrative, not taken from these papers. Check each publisher page for the final details.

  1. Wong, H.-S. P., Raoux, S., Kim, S., Liang, J., Reifenberg, J. P., Rajendran, B., Asheghi, M. & Goodson, K. E. Phase change memory. Proceedings of the IEEE 98, 2201–2227 (2010). IEEE Xplore
    A review of the device physics, the materials, the scaling and the reliability of PCM, with a focus on memory use.
  2. Raoux, S. et al. Phase-change random access memory: a scalable technology. IBM Journal of Research and Development 52 (2008). IEEE Xplore
    Explains the mushroom cell, the SET and RESET operations and why the technology scales to small sizes.
  3. Wuttig, M. & Yamada, N. Phase-change materials for rewriteable data storage. Nature Materials 6, 824–832 (2007). doi:10.1038/nmat2009
    Why some alloys switch between glass and crystal so quickly, and how the same materials are used in optical discs and in memory.
  4. Le Gallo, M. & Sebastian, A. An overview of phase-change memory device physics. Journal of Physics D: Applied Physics (2020). doi:10.1088/1361-6463/ab7794
    A recent overview of threshold switching, crystallization, resistance drift and noise, written with in-memory computing in mind.
  5. Burr, G. W. et al. Experimental demonstration and tolerancing of a large-scale neural network (165,000 synapses) using phase-change memory as the synaptic weight element. IEEE Transactions on Electron Devices (2015). doi:10.1109/TED.2015.2439635
    An early experiment that stored neural-network weights in a pair of PCM cells each, and what it took to tolerate their imperfections.
  6. Le Gallo, M. et al. A 64-core mixed-signal in-memory compute chip based on phase-change memory for deep neural network inference. Nature Electronics 6, 680–693 (2023). doi:10.1038/s41928-023-01010-1
    A chip that does what the crossbar simulator in Step 3 models, built with PCM weights, and the drift and noise problems it had to handle.
  7. Ielmini, D. and Wong, H.-S. P. "In-memory computing with resistive switching devices." Nature Electronics 1, 333–343 (2018). Link
    A broad review of crossbar computing with resistive devices, including matrix-vector multiplication.
  8. Alibart, F., Gao, L., Hoskins, B. D. and Strukov, D. B. "High precision tuning of state for memristive devices by adaptable variation-tolerant algorithm." Nanotechnology 23, 075201 (2012). Link
    The write-and-verify idea of Step 2, applied to real (memristive) devices.
  9. Sebastian, A. et al. "Memory devices and applications for in-memory computing." Nature Nanotechnology 15, 529–544 (2020).
    Survey of memory devices used for computing. Search the title to find the publisher page.
  10. Hu, M. et al. "Dot-product engine for neuromorphic computing: programming 1T1M crossbar to accelerate matrix-vector multiplication." Design Automation Conference (DAC), 2016.
    Matrix-vector multiplication on a memristor crossbar and how it is programmed.