memory compiler
**Memory Compiler** is the **automated EDA tool that generates custom SRAM, ROM, or register file macros for a specific foundry process, automatically producing the full set of design data (GDSII layout, SPICE netlist, Liberty timing model, LEF abstract, and simulation model) for any user-specified combination of word count, bit width, and number of ports** — eliminating the need to manually design memory arrays from scratch for each new design. Memory compilers are foundry-qualified tools that leverage pre-characterized bit cells to generate silicon-proven macros in minutes rather than weeks of hand-layout effort.
**What a Memory Compiler Produces**
| Output | Format | Used By |
|--------|--------|--------|
| Physical layout | GDSII | Mask tape-out |
| Timing model | Liberty (.lib) | STA (timing signoff) |
| Abstract | LEF | Place & Route |
| Functional model | Verilog (.v) | RTL simulation, DFT |
| SPICE netlist | SPICE | Circuit simulation |
| Power model | Liberty (power arcs) | Dynamic/static power analysis |
| Test modes | Verilog + patterns | ATPG, BIST |
**Compiler Input Parameters**
- **Depth (words)**: Number of addressable rows (e.g., 256, 1024, 4096).
- **Width (bits)**: Number of bits per word (e.g., 8, 16, 32, 64).
- **Ports**: Single-port (1R1W), dual-port (2R2W), multi-port.
- **Redundancy**: Spare rows/columns for yield repair.
- **Special features**: ECC, BIST, power gating, output register.
**SRAM Bit Cell and Array Architecture**
- **6T SRAM cell**: Cross-coupled inverters (2 PMOS + 2 NMOS) + 2 access transistors.
- **Array organization**: M×N bit cells → M rows (word lines) × N columns (bit lines).
- **Sense amp**: Differential sense amplifier detects small ΔV on bit line pair → amplifies to full rail.
- **Write driver**: Forces bit line low → overrides feedback in 6T cell to write new data.
- **Peripheral circuits**: Row decoder, column mux, precharge, output latch, address latch.
**Memory Compiler Quality Metrics**
| Metric | Target | Definition |
|--------|--------|----------|
| Vmin | Minimize | Minimum VDD for correct operation |
| Access time | Minimize | Time from clock edge to valid output |
| Area efficiency | Maximize | Bit cells / total macro area |
| Leakage | Minimize | Static power in retention mode |
| Yield | Maximize | % macros with zero bit failures |
**Foundry Memory Compiler Ecosystem**
| Compiler Source | Examples | Notes |
|----------------|---------|-------|
| Foundry native | TSMC SRAM compiler, Samsung Memory Compiler | Most qualified, best warranty |
| ARM (now Synopsys) | POP memory compiler | Portable across foundries |
| Andes, Arm PHY | Partner IP compilers | Foundry-certified partners |
| Internal (large companies) | Apple, Intel, Qualcomm | Custom for specific designs |
**Compiler Output Validation**
- Foundry qualification: Test chips with arrays of generated macros → measure Vmin, access time, yield.
- Silicon correlation: Liberty timing vs. silicon measurement ≤ ±5%.
- Repair analysis: With word-line redundancy, yield modeled at 99.9%+ per macro for production.
**CACTI (Cache And memory Hierarchy Modeling Tool)**
- Academic tool (Stanford, HP Labs) for early-stage memory architecture analysis.
- Estimates area, power, access time for SRAM caches based on process parameters.
- Not a compiler — does not generate silicon-ready layout.
- Used for: Architecture exploration, compare 4-way vs 8-way set-associativity, level 1 vs level 2 cache tradeoffs.
**Register File Compilers**
- Similar to SRAM compiler but generates multi-ported register file arrays.
- Critical for processor out-of-order execute units (physical register files).
- 2R1W, 4R2W configurations typical for integer/FP register files.
- Bit cell: 8T or 10T (larger than 6T SRAM to support multi-port read without contention).
Memory compilers are **the automation that makes memory integration scalable across system designs** — by generating silicon-proven, fully characterized SRAM macros for any combination of size and configuration in minutes, memory compilers enable SoC designers to focus on memory architecture decisions (cache hierarchy, associativity, partitioning) rather than transistor-level memory design, compressing the memory integration phase from months to days in modern chip development flows.