Home Knowledge Base Compute-in-memory (CIM) and processing-in-memory (PIM)

Compute-in-memory (CIM) and processing-in-memory (PIM) are semiconductor architecture paradigms that perform arithmetic operations inside or directly beside the memory array, eliminating the dominant energy and latency cost of moving data between memory and a separate processor. In conventional Von Neumann architectures, 60-70% of inference energy is consumed reading neural network weights from DRAM — CIM/PIM attacks this directly.

<svg viewBox="0 0 760 470" xmlns="http://www.w3.org/2000/svg" font-family="-apple-system,Segoe UI,Roboto,sans-serif">
  <rect width="760" height="470" fill="#0d1117"/>

  <text x="380" y="22" fill="#e6edf3" font-size="13" font-weight="700" text-anchor="middle">Compute-In-Memory / Processing-In-Memory (CIM/PIM)</text>
  <text x="380" y="36" fill="#8b98a5" font-size="10" text-anchor="middle">eliminate the memory wall by performing MAC operations inside or beside the memory array — data movement is the dominant energy cost</text>

  <!-- ── PANEL 1: Conventional vs CIM read path ── -->
  <rect x="8" y="44" width="236" height="210" rx="6" fill="#0e1320" stroke="#334155" stroke-width="1"/>
  <text x="126" y="58" fill="#f87171" font-size="10" font-weight="700" text-anchor="middle">Memory Wall Problem</text>

  <!-- Conventional path -->
  <text x="18" y="74" fill="#94a3b8" font-size="9" font-weight="600">Conventional (Von Neumann):</text>

  <!-- SRAM array -->
  <rect x="18" y="78" width="60" height="50" rx="3" fill="#132030" stroke="#2563eb" stroke-width="1"/>
  <text x="48" y="98" fill="#93c5fd" font-size="8" text-anchor="middle">SRAM</text>
  <text x="48" y="109" fill="#93c5fd" font-size="8" text-anchor="middle">weights</text>
  <text x="48" y="120" fill="#6b7280" font-size="7.5" text-anchor="middle">bitcells</text>

  <!-- data movement arrow -->
  <line x1="78" y1="103" x2="118" y2="103" stroke="#f87171" stroke-width="2.5"/>
  <polygon points="116,99 124,103 116,107" fill="#f87171"/>
  <text x="98" y="97" fill="#f87171" font-size="7.5" text-anchor="middle">data bus</text>
  <text x="98" y="115" fill="#f87171" font-size="7.5" text-anchor="middle">70% energy</text>

  <!-- ALU/MAC unit -->
  <rect x="124" y="78" width="60" height="50" rx="3" fill="#1c1107" stroke="#d97706" stroke-width="1"/>
  <text x="154" y="98" fill="#fcd34d" font-size="8" text-anchor="middle">ALU /</text>
  <text x="154" y="109" fill="#fcd34d" font-size="8" text-anchor="middle">MAC</text>
  <text x="154" y="120" fill="#6b7280" font-size="7.5" text-anchor="middle">compute</text>

  <text x="18" y="142" fill="#f87171" font-size="8">Bottleneck: weights travel memory->bus->ALU</text>
  <text x="18" y="152" fill="#f87171" font-size="8">every inference step — bandwidth wall</text>

  <!-- CIM path -->
  <text x="18" y="168" fill="#94a3b8" font-size="9" font-weight="600">CIM (compute-in-memory):</text>

  <!-- CIM array -->
  <rect x="18" y="174" width="95" height="60" rx="3" fill="#0a1f10" stroke="#16a34a" stroke-width="1.2"/>
  <text x="65" y="192" fill="#6ee7b7" font-size="8.5" text-anchor="middle">SRAM CIM array</text>
  <!-- bitcell rows with multiply symbol -->
  <rect x="24" y="198" width="12" height="10" rx="1" fill="#166534" stroke="#4ade80" stroke-width="0.6"/>
  <rect x="40" y="198" width="12" height="10" rx="1" fill="#166534" stroke="#4ade80" stroke-width="0.6"/>
  <rect x="56" y="198" width="12" height="10" rx="1" fill="#166534" stroke="#4ade80" stroke-width="0.6"/>
  <rect x="72" y="198" width="12" height="10" rx="1" fill="#166534" stroke="#4ade80" stroke-width="0.6"/>
  <rect x="88" y="198" width="12" height="10" rx="1" fill="#166534" stroke="#4ade80" stroke-width="0.6"/>
  <text x="65" y="221" fill="#4ade80" font-size="7.5" text-anchor="middle">MAC inside array</text>
  <text x="65" y="230" fill="#6b7280" font-size="7" text-anchor="middle">BL current = W x A</text>

  <!-- small output arrow -->
  <line x1="113" y1="204" x2="133" y2="204" stroke="#4ade80" stroke-width="1.5"/>
  <polygon points="131,200 139,204 131,208" fill="#4ade80"/>
  <!-- result box -->
  <rect x="139" y="196" width="52" height="22" rx="3" fill="#0a1f10" stroke="#22c55e" stroke-width="0.8"/>
  <text x="165" y="211" fill="#4ade80" font-size="8" text-anchor="middle">result only</text>

  <text x="18" y="244" fill="#4ade80" font-size="8">No weight data movement — partial sums</text>
  <text x="18" y="254" fill="#4ade80" font-size="8">accumulate on bitlines — 10-100x lower energy</text>

  <!-- ── PANEL 2: CIM/PIM taxonomy ── -->
  <rect x="252" y="44" width="252" height="210" rx="6" fill="#0e1320" stroke="#334155" stroke-width="1"/>
  <text x="378" y="58" fill="#fcd34d" font-size="10" font-weight="700" text-anchor="middle">CIM / PIM Taxonomy</text>

  <!-- Near-memory PIM -->
  <rect x="262" y="64" width="232" height="48" rx="4" fill="#1c1633" stroke="#7c3aed" stroke-width="1"/>
  <text x="378" y="78" fill="#c4b5fd" font-size="9" font-weight="700" text-anchor="middle">Near-Memory PIM</text>
  <text x="272" y="91" fill="#94a3b8" font-size="8">Logic die stacked on/beside DRAM (HBM-PIM, UPMEM)</text>
  <text x="272" y="102" fill="#94a3b8" font-size="8">~1000x bandwidth vs off-chip; digital compute; ISA-controlled</text>

  <!-- SRAM CIM analog -->
  <rect x="262" y="118" width="232" height="48" rx="4" fill="#14253d" stroke="#2563eb" stroke-width="1"/>
  <text x="378" y="132" fill="#93c5fd" font-size="9" font-weight="700" text-anchor="middle">SRAM CIM — Analog</text>
  <text x="272" y="145" fill="#94a3b8" font-size="8">Bitline current = sum(W x A); ADC reads result</text>
  <text x="272" y="156" fill="#94a3b8" font-size="8">High TOPS/W for inference; limited precision (4-8 bit)</text>

  <!-- SRAM CIM digital -->
  <rect x="262" y="172" width="232" height="48" rx="4" fill="#0a1f10" stroke="#16a34a" stroke-width="1"/>
  <text x="378" y="186" fill="#6ee7b7" font-size="9" font-weight="700" text-anchor="middle">SRAM CIM — Digital</text>
  <text x="272" y="199" fill="#94a3b8" font-size="8">Digital accumulator in bitcell peripheral — deterministic</text>
  <text x="272" y="210" fill="#94a3b8" font-size="8">Lower TOPS/W than analog but no ADC noise; easier STA</text>

  <!-- NVM CIM note -->
  <rect x="262" y="226" width="232" height="22" rx="4" fill="#1a1206" stroke="#d97706" stroke-width="0.8"/>
  <text x="378" y="236" fill="#fcd34d" font-size="8.5" text-anchor="middle">NVM CIM (RRAM/PCM/Flash): weights stored non-volatile</text>
  <text x="378" y="246" fill="#94a3b8" font-size="8" text-anchor="middle">— emerging; IBM, Mythic use Flash-based analog MAC</text>

  <!-- ── PANEL 3: AI inference benefit ── -->
  <rect x="512" y="44" width="240" height="210" rx="6" fill="#0e1320" stroke="#334155" stroke-width="1"/>
  <text x="632" y="58" fill="#6ee7b7" font-size="10" font-weight="700" text-anchor="middle">AI Inference Energy Breakdown</text>

  <!-- Energy breakdown bar chart -->
  <!-- DRAM access -->
  <text x="522" y="74" fill="#94a3b8" font-size="9">Conventional NN inference energy sources:</text>
  <rect x="522" y="80" width="175" height="14" rx="2" fill="#7f1d1d" stroke="#f87171" stroke-width="0.8"/>
  <text x="522" y="91" fill="#fca5a5" font-size="8">  DRAM access (weight reads) ~60-70%</text>

  <rect x="522" y="97" width="70" height="14" rx="2" fill="#7c2d12" stroke="#fb923c" stroke-width="0.8"/>
  <text x="522" y="108" fill="#fdba74" font-size="8">  On-chip SRAM ~15%</text>

  <rect x="522" y="114" width="55" height="14" rx="2" fill="#1a2e05" stroke="#4ade80" stroke-width="0.8"/>
  <text x="522" y="125" fill="#86efac" font-size="8">  MAC compute ~10%</text>

  <rect x="522" y="131" width="30" height="14" rx="2" fill="#132030" stroke="#60a5fa" stroke-width="0.8"/>
  <text x="522" y="142" fill="#93c5fd" font-size="8">  Other ~5%</text>

  <text x="522" y="158" fill="#4ade80" font-size="9" font-weight="600">CIM/PIM eliminates the 60-70% DRAM term:</text>

  <!-- TOPS/W comparison -->
  <rect x="522" y="164" width="220" height="48" rx="4" fill="#0a1f10" stroke="#16a34a" stroke-width="0.8"/>
  <text x="632" y="178" fill="#6ee7b7" font-size="9" font-weight="700" text-anchor="middle">TOPS/W Comparison (INT4 inference)</text>

  <text x="532" y="192" fill="#f87171" font-size="8.5">GPU (H100):     ~1-3 TOPS/W (memory-bound)</text>
  <text x="532" y="203" fill="#fcd34d" font-size="8.5">SRAM CIM chip: ~10-100 TOPS/W (data stays in array)</text>

  <!-- precision ladder -->
  <text x="522" y="222" fill="#94a3b8" font-size="9" font-weight="600">Precision vs energy trade-off:</text>
  <rect x="522" y="228" width="45" height="14" rx="2" fill="#172554" stroke="#60a5fa" stroke-width="0.8"/>
  <text x="544" y="239" fill="#93c5fd" font-size="8" text-anchor="middle">INT8</text>
  <text x="572" y="239" fill="#6b7280" font-size="9">→</text>
  <rect x="582" y="228" width="40" height="14" rx="2" fill="#1a2e05" stroke="#4ade80" stroke-width="0.8"/>
  <text x="602" y="239" fill="#86efac" font-size="8" text-anchor="middle">INT4</text>
  <text x="627" y="239" fill="#6b7280" font-size="9">→</text>
  <rect x="637" y="228" width="40" height="14" rx="2" fill="#3b1d09" stroke="#fb923c" stroke-width="0.8"/>
  <text x="657" y="239" fill="#fdba74" font-size="8" text-anchor="middle">binary</text>
  <text x="522" y="252" fill="#6b7280" font-size="8">lower precision → less ADC resolution needed → less area + power</text>

  <!-- ── 3 Cards ── -->
  <rect x="8" y="262" width="236" height="100" rx="6" fill="#0e1320" stroke="#334155" stroke-width="1"/>
  <text x="126" y="276" fill="#f87171" font-size="9.5" font-weight="700" text-anchor="middle">Key Challenges</text>
  <text x="18" y="289" fill="#e5e7eb" font-size="8.5">ADC cost: each bitline needs an ADC — area-intensive</text>
  <text x="18" y="301" fill="#e5e7eb" font-size="8.5">Analog noise: kT/C, mismatch, supply variation limit precision</text>
  <text x="18" y="313" fill="#e5e7eb" font-size="8.5">Write endurance: NVM CIM limits retraining (Flash ~1e5 cycles)</text>
  <text x="18" y="325" fill="#e5e7eb" font-size="8.5">Programming: non-standard ISA, no GPU-style ecosystem yet</text>
  <text x="18" y="337" fill="#e5e7eb" font-size="8.5">Weight update: analog CIM not suited for on-chip training</text>
  <text x="18" y="349" fill="#6b7280" font-size="8">Thermal: MAC inside array raises local bitcell temperature</text>

  <rect x="252" y="262" width="252" height="100" rx="6" fill="#0e1320" stroke="#334155" stroke-width="1"/>
  <text x="378" y="276" fill="#93c5fd" font-size="9.5" font-weight="700" text-anchor="middle">Industry Products</text>
  <text x="262" y="289" fill="#fcd34d" font-size="8.5" font-weight="600">Samsung HBM-PIM (Aquabolt-PIM):</text>
  <text x="262" y="300" fill="#e5e7eb" font-size="8">DRAM bank + programmable core on logic die — 2x BW, AI workloads</text>
  <text x="262" y="313" fill="#fcd34d" font-size="8.5" font-weight="600">Mythic M1108 AMP:</text>
  <text x="262" y="324" fill="#e5e7eb" font-size="8">Flash-based analog CIM — 25 TOPS, 3W — fixed-weight inference only</text>
  <text x="262" y="337" fill="#fcd34d" font-size="8.5" font-weight="600">UPMEM / Micron HMC-PIM:</text>
  <text x="262" y="348" fill="#e5e7eb" font-size="8">DRAM rows + RISC cores — genomics, DB, sparse ML graphs</text>

  <rect x="512" y="262" width="240" height="100" rx="6" fill="#0e1320" stroke="#334155" stroke-width="1"/>
  <text x="632" y="276" fill="#6ee7b7" font-size="9.5" font-weight="700" text-anchor="middle">SRAM CIM Design Pattern</text>
  <text x="522" y="289" fill="#e5e7eb" font-size="8.5">Activate word-line → all bitcells in row drive bitline simultaneously</text>
  <text x="522" y="301" fill="#e5e7eb" font-size="8.5">Bitline charge = weighted sum (charge-domain MAC)</text>
  <text x="522" y="313" fill="#e5e7eb" font-size="8.5">Multi-row partial sums → analog adder → single ADC per column</text>
  <text x="522" y="325" fill="#e5e7eb" font-size="8.5">Input activation broadcasts over word-lines; weights fixed in cells</text>
  <text x="522" y="337" fill="#fcd34d" font-size="8.5">Result: 128-256 MACs per column in parallel — no data bus needed</text>
  <text x="522" y="349" fill="#6b7280" font-size="8">MIT, Stanford, TSMC, and ARM all publish SRAM CIM silicon results</text>

  <!-- ── Bottom stat bar ── -->
  <rect x="8" y="368" width="744" height="28" rx="5" fill="#0f1922" stroke="#1e3a5f" stroke-width="0.8"/>
  <text x="28" y="384" fill="#f87171" font-size="9" font-weight="600">60-70% energy</text>
  <text x="28" y="394" fill="#6b7280" font-size="8">in DRAM weight reads (baseline)</text>
  <line x1="145" y1="370" x2="145" y2="394" stroke="#1e3a5f" stroke-width="0.7"/>
  <text x="160" y="384" fill="#4ade80" font-size="9" font-weight="600">10-100x TOPS/W</text>
  <text x="160" y="394" fill="#6b7280" font-size="8">CIM vs GPU (INT4 inference)</text>
  <line x1="295" y1="370" x2="295" y2="394" stroke="#1e3a5f" stroke-width="0.7"/>
  <text x="310" y="384" fill="#c4b5fd" font-size="9" font-weight="600">Samsung HBM-PIM</text>
  <text x="310" y="394" fill="#6b7280" font-size="8">2x effective bandwidth for AI</text>
  <line x1="445" y1="370" x2="445" y2="394" stroke="#1e3a5f" stroke-width="0.7"/>
  <text x="460" y="384" fill="#fcd34d" font-size="9" font-weight="600">ADC = area bottleneck</text>
  <text x="460" y="394" fill="#6b7280" font-size="8">1 ADC per bitline column</text>
  <line x1="590" y1="370" x2="590" y2="394" stroke="#1e3a5f" stroke-width="0.7"/>
  <text x="605" y="384" fill="#93c5fd" font-size="9" font-weight="600">4-8 bit precision</text>
  <text x="605" y="394" fill="#6b7280" font-size="8">typical analog CIM resolution</text>

  <text x="380" y="420" fill="#4b5563" font-size="8" text-anchor="middle">CIM/PIM flips the Von Neumann bottleneck: instead of moving data to the processor, move the computation to the data — memory becomes the accelerator</text>
  <text x="380" y="432" fill="#4b5563" font-size="8" text-anchor="middle">Critical for edge AI inference (Syntiant, Mythic) and HPC memory scaling (Samsung, SK Hynix PIM roadmaps)</text>
</svg>

The memory wall is the fundamental problem. In autoregressive LLM inference and most edge AI workloads, the compute units are starved waiting for weight data. DRAM bandwidth is limited by off-chip signaling and pin count; on-chip SRAM bandwidth is limited by array size. The Von Neumann model requires every weight to traverse the memory bus to the ALU on every inference step, regardless of how fast the arithmetic can run. CIM eliminates this bus entirely by making the memory array itself perform the multiply-accumulate (MAC) operation.

SRAM CIM works by performing analog computation on the bitlines. In a conventional SRAM read, activating a word-line drives all bitcells in a row onto shared bitlines, and a sense amplifier detects the bit value. In analog CIM, multiple rows are activated simultaneously with partial word-line voltages corresponding to input activation values. Each bitcell contributes a current proportional to its stored weight times the applied voltage. The bitline current sums these contributions — performing a dot product in the physics of the wire, not in a separate multiplier. An ADC at the bottom of each bitline column converts the analog sum to a digital partial result.

Digital CIM variants place a small digital accumulator in the periphery of each bitcell column rather than using analog current summation. This avoids ADC noise and the analog precision limitations but sacrifices some energy efficiency. MIT, Stanford, TSMC, and ARM have all published silicon results for both approaches, with digital CIM achieving 10-100 TOPS/W at INT4 precision versus 1-3 TOPS/W for a GPU doing the same inference task.

Near-memory PIM takes a different path: rather than computing inside the array, it places a digital processor die on top of or beside the DRAM stack. Samsung's HBM-PIM (Aquabolt-PIM) adds a programmable AI core on the logic die of an HBM stack, giving the processor access to DRAM bandwidth without the off-chip bottleneck. UPMEM places RISC cores inside DRAM rows, targeting genomics and database workloads that are purely memory-bandwidth-limited.

Key challenges limit deployment. Analog CIM precision tops out at 4-8 bits, which is adequate for INT4/INT8 inference but not for FP16 training. Each bitline column requires an ADC, and ADC arrays are area-intensive. NVM-based CIM (Flash, RRAM, PCM) stores weights non-volatitely — eliminating DRAM access entirely — but write endurance limits in-situ retraining and analog device variability reduces effective precision. The programming model is non-standard: existing GPU software stacks cannot directly target CIM hardware.

Commercial CIM products include Mythic's M1108 AMP (Flash-based analog MAC, 25 TOPS at 3W), Syntiant's NDP (SRAM CIM for always-on keyword detection at sub-mW), and IBM's phase-change memory CIM research chips for transformer inference. Samsung and SK Hynix both have PIM roadmaps targeting HBM4 and beyond.

semiconductor cimcomputational memoryprocessing in memorycompute in memoryanalog computing chip

Explore 500+ Semiconductor & AI Topics

From EUV lithography to CUDA optimization — search the full knowledge base or chat with our AI assistant.