Reference · Step 1: PCM basics · Step 2: writing a weight · Step 3: crossbar simulator · PCM home · Compare: ReRAM 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.
Three short lessons, each building on the one before. If you are new to this, go in order.
A glass-and-crystal cell, heated by current pulses. You will SET, RESET and read one, and see how it differs from a ReRAM cell, including drift.
Step 2From a number to a conductance: choose the cell, round to a level, RESET, then climb with SET pulses and read back. An overshoot means starting again.
Step 3Put cells in a grid and multiply a vector by a matrix in one read, then age the array and watch the answers drift.
Everything in the simulator sits somewhere on this path. The middle is analog. The two ends are converters to and from the digital world.
A number from the model or the previous layer.
Rounds the input and makes a voltage.
One voltage per row, all applied at once.
Each cell stores a weight as G and multiplies.
The currents of a column add on the wire.
The pair gives a signed result.
Turns the current into an integer, then a number.
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.
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.
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).
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
Type to filter the 48 terms by name or by anything in the definition.
No term matches. Try a shorter word.
The defaults are the values the simulator starts with.
| Symbol | Meaning | Unit | Default or rule |
|---|---|---|---|
| x_i | Input value for row i | 0 to 1 | set with the input sliders |
| V_i | Voltage on word line i | V | x_i × V_read |
| V_read | Read voltage | V | 0.2 |
| w_ij | Weight in row i, output j | −1 to +1 | set in the weight matrix |
| G_ij | Conductance of one cell | µS | Gmin to Gmax |
| Gmin, Gmax | Conductance of the high- and low-resistance states | µS | 0.5 and 50 |
| ΔG | The window, Gmax − Gmin | µS | 49.5 |
| b, L | Bits per weight and number of levels, L = 2^b | bits, count | 4 bits, 16 levels |
| M, N | Rows (inputs) and outputs. There are 2N bit lines | count | 4 and 4 |
| I_j | Current on bit line j | µA | Σ V_i × G_ij |
| y_j | Output j after read-out and ADC | none | ideal: Σ x_i × w_ij |
| σ | Device variation | % | 10 |
| R_w | Wire resistance per segment | Ω | 0 |
| a | Amorphous fraction (dome size), 0 = crystal, 1 = full glass | none | G = Gmax × (Gmin / Gmax)^a |
| V_set | SET pulse amplitude (fixed-pulse method) | V | 1.3 |
| T_peak | Peak temperature of a pulse | K | 300 + 162 V² (1 − e^(−t_p/30 ns)) |
| ν | Drift exponent | none | 0.005 + 0.095 a |
| t | Time since the write | s | 10^x, x set by the slider (0 = 1 s) |
| tol | Verify tolerance as a share of ΔG | % | 2 |
| t_p | Write pulse width | ns | 50 |
| R_h | Heater resistance used for pulse energy | kΩ | 5 |
| t_read, t_ADC | Read pulse and ADC conversion time | ns | 10 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.
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.
| Control | What it is | Raise it, and what happens | Used in |
|---|---|---|---|
| Array size | Rows and outputs. | More rows add more products per read, but also longer wires (more IR drop) and more cells to write. | Step 3 |
| Cell encoding | Analog 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 weight | Weight 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 Gmax | The 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 |
| Control | What it is | Raise it, and what happens | Used in |
|---|---|---|---|
| Write method | Adaptive 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 order | A 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 first | Counts 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 |
| Control | What it is | Raise it, and what happens | Used in |
|---|---|---|---|
| Digital weight source | Where 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 clock | How 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 conversion | Time 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 reuse | How 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 |
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.