SSCS Chipathon 2026 β gLayout Track (D): AI/LLM for Analog Circuits
An AI-assisted analog-layout framework that converts SPICE subcircuit netlists to DRC-clean GDSII layout using gLayout, gdsfactory, and the DeepSeek API. Supports AC/transient simulation, DRC/LVS/PEX verification, and pre/post-layout comparison.
| Track | D β gLayout | |
| Team Name | D08 Microelectronic Block Generator | |
| Leader | M. Taufiqul Huda | @mthudaa |
| Name | GitHub | Affiliation | Role |
|---|---|---|---|
| M. Taufiqul Huda | @mthudaa | NTUST | Lead Analog / Mixed-Signal Designer |
| Ahmad Jabar Ilmi | @ilmiahmad | LG Indonesia | Physical Verification & Automation |
| Moh. Jabir Mubarok | @jabirmbrok | NTUST | AI/LLM Integration & Software Architect |
We are developing a framework to automate the design of Analog IC blocks using gLayout, gdsfactory, and the DeepSeek API.
Our framework leverages the DeepSeek API as an autonomous Analog Design Engineer. Using a SPICE-in-the-loop Finetuning mechanism, the DeepSeek model receives direct quantitative feedback from ngspice β including gain, bandwidth, phase margin, delay, offset voltage, and PVT corner results β and iteratively refines the SPICE netlist until all specifications are met. Once verified, our custom engine automatically translates the netlist into a fully routed, DRC-clean GDS layout.
- Autonomous Optimization: The DeepSeek agent has successfully generated
and autonomously tuned a StrongARM Latch Comparator achieving
<10mVinput offset across all PVT corners. - Layout-Aware PEX Feedback: The agent receives exact post-layout metrics from Magic PEX to close the gap between schematic simulation and actual silicon performance.
- Test Key Circuits: Comparator, OTA, and Voltage Reference.
π See detailed AI design results:
AI-Generated-Design-Result/β complete SPICE netlists, GDS layouts, DRC/LVS/PEX reports, and simulation plots for all three designs.
| Component | Tool / Library |
|---|---|
| PDK | GF180MCU (gf180mcuD) β 3.3V, 180nm |
| Schematic | Xschem + Ngspice |
| Layout | gLayout + gdsfactory |
| Physical Verification | Magic (DRC), Netgen (LVS), Magic (PEX) |
| AI/LLM | DeepSeek API |
| Container | IIC-OSIC-TOOLS Docker |
| Languages | Python 3, SPICE, Tcl, Bash |
SPICE Netlist β Parse Devices β Multi-Row Placement β Power Routing
β β
Signal Routing β GDSII Export β DRC β LVS β PEX β Tapeout
from core.pipeline import spice_to_gds_with_checks
r = spice_to_gds_with_checks(netlist)
# r["outdir"], r["gds_path"], r["drc"], r["lvs"], r["pex"], r["all_pass"]See designs/notebooks/chipathon2026-D/ for
complete notebooks and the full design flow.
- Docker Desktop (install guide)
- GitHub Desktop (download) or Git CLI
git clone https://github.com/mthudaa/Microelectronic-Block-Generator.git
cd Microelectronic-Block-GeneratorLinux / macOS:
./start_chipathon_vnc.shWindows:
.\start_chipathon_vnc.batThe script pulls the IIC-OSIC-TOOLS image (first time only) and starts the container with GF180MCU PDK pre-loaded.
| Method | Address | Password |
|---|---|---|
| VNC Client (recommended) | localhost:5901 |
abc123 |
| Web Browser (noVNC) | http://localhost |
abc123 |
Inside the container terminal:
unset PYTHONPATH PYTHONHOME LD_LIBRARY_PATH
source /headless/conda-env/miniconda3/etc/profile.d/conda.sh
conda activate GLdev
export PDK_ROOT=/foss/pdks
export PDK=gf180mcuD
export PDKPATH=/foss/pdks/gf180mcuD
export STD_CELL_LIBRARY=gf180mcu_fd_sc_mcu7t5v0cd /foss/designs/notebooks/chipathon2026-D
# Open and run spice_to_gds.ipynb or llm_to_gds.ipynbThe project ships with a suite of OpenCode extensions (.opencode/) that
let you run the entire analog design flow β from SPICE netlist to tapeout-ready
GDS β using natural-language commands and AI agents.
All project-specific extensions use the mbg- prefix.
Skills teach the AI agent how to perform a specific domain task. They are loaded automatically when the task matches the skill's description.
| Skill | Owner | Purpose |
|---|---|---|
mbg-spice-to-gds |
Huda | Convert SPICE netlist β DRC-clean GDSII layout via spice_to_gds_with_checks() |
mbg-ic-verify |
Ahmad | Run DRC (Magic), LVS (Netgen), and PEX (Magic) on a GDS layout |
mbg-ai-experiment-audit |
Jabir | Audit an AI experiment for reproducibility, bounded refinement, and evidence-backed claims |
mbg-extension-authoring |
Jabir | Create/review new OpenCode skills, tools, commands, or agents following project standards |
How to invoke a skill: Just ask the AI agent naturally β the skill loads when the request matches its purpose. For example:
"Convert this SPICE netlist to GDS and run DRC/LVS/PEX." β loads
mbg-spice-to-gds+mbg-ic-verify
"Audit the experiment at outputs/exp-07/experiment.json." β loads
mbg-ai-experiment-audit
Type / in the chat to access these workflow commands. Each command runs a
multi-step pipeline with user checkpoints.
| Command | Agent | Description |
|---|---|---|
/mbg-full-automate |
build |
9-stage fully automatic flow: spec β SPICE β sim β layout β DRC/LVS/PEX β post-layout β report. No manual steps. |
/mbg-partial-automate |
build |
8-stage user-guided flow: same pipeline but the agent pauses at each stage for your review and approval. |
/mbg-review-ai-experiment |
plan |
Validate an experiment.json against the project audit standard. Checks prompt traceability, model ID, refinement bounds, and evidence. |
/mbg-review-extension |
plan |
Review an OpenCode extension (skill/tool/command/agent) for naming, safety, ownership, and correctness. |
/mbg-new-skill |
build |
Scaffold a new mbg-* skill with proper YAML frontmatter and structure. |
/mbg-new-tool |
build |
Scaffold a new mbg-* TypeScript tool with safety guards. |
/mbg-new-command |
build |
Scaffold a new mbg-* slash command with required workflow steps. |
How to use a command: Type /mbg-full-automate in the chat, then describe
your design. The agent guides you through the pipeline:
/mbg-full-automate
Design a StrongARM latch comparator with <10mV input offset, 1GHz clock,
GF180MCU 3.3V PDK.
These are TypeScript tools that agents can call during a workflow. They wrap the Python core modules with schema validation and safety checks.
| Tool | Purpose |
|---|---|
mbg-spice-to-gds |
Execute spice_to_gds_with_checks(netlist) β the primary pipeline tool |
mbg-run-verification |
Run DRC, LVS, or PEX on a GDS file (check_type: drc/lvs/pex) |
mbg-validate-ai-experiment |
Validate experiment.json schema, paths, statuses, and metric completeness |
mbg-validate-extension |
Validate an OpenCode extension file against project authoring rules |
How tools are used: Tools are called automatically by agents when executing a skill or command. You don't invoke them directly β the agent selects the right tool for the task.
.opencode/
βββ skills/
β βββ mbg-spice-to-gds/SKILL.md
β βββ mbg-ic-verify/SKILL.md
β βββ mbg-ai-experiment-audit/SKILL.md
β βββ mbg-extension-authoring/SKILL.md
βββ commands/
β βββ mbg-full-automate.md
β βββ mbg-partial-automate.md
β βββ mbg-review-ai-experiment.md
β βββ mbg-review-extension.md
β βββ mbg-new-skill.md
β βββ mbg-new-tool.md
β βββ mbg-new-command.md
βββ tools/
β βββ mbg-spice-to-gds.ts
β βββ mbg-run-verification.ts
β βββ mbg-validate-ai-experiment.ts
β βββ mbg-validate-extension.ts
βββ tests/
βββ fixtures/
- Open VS Code in this repository with the OpenCode extension enabled.
- Type
/mbg-full-automatein the chat. - Describe your circuit requirements (e.g., "5T OTA with 60dB gain, 10MHz GBW").
- The agent will research topologies, generate SPICE, simulate, create layout, and run DRC/LVS/PEX β all automatically.
- Review the final report and GDS output.
For more control, use /mbg-partial-automate to approve each stage before the
agent proceeds.
βββ designs/
β βββ libs/ # Design & testbench libraries
β β βββ core_analog/ # Core circuit cells (OTA, comparator, etc.)
β β βββ tb_analog/ # Testbench setups
β βββ notebooks/chipathon2026-D/ # Main project notebooks & core modules
β βββ core/ # Pipeline modules
β β βββ pipeline.py # Main SPICEβGDS pipeline
β β βββ placement.py # Multi-row device placement
β β βββ routing.py # Signal routing
β β βββ power.py # Power grid routing
β β βββ simulation.py # Pre/post-layout simulation
β β βββ spice_parser.py # SPICE netlist parser
β β βββ checks.py # DRC/LVS/PEX automation
β β βββ utils.py # Utilities
β βββ scripts/ # Verification scripts (DRC, LVS, PEX)
β βββ spice_to_gds.ipynb # SPICE β GDS notebook
β βββ llm_to_gds.ipynb # LLM β SPICE β GDS notebook
β βββ test_all_designs.py # Regression test suite
βββ scripts/ # Container launch & tool scripts
βββ docs/ # Workflow documentation
βββ README.md
| Circuit | Status | Key Metric |
|---|---|---|
| 5T OTA | β Proven | Gain, GBW, Phase Margin |
| StrongARM Comparator | β Autonomous Tuning | <10mV Offset (all PVT) |
| Voltage Reference | π In Progress | Temperature Coefficient |
π Chip Size & Pin List (per judge request β Issue #20)
| Design | Pins | Count | Chip Size (Β΅m) | Area (Β΅mΒ²) |
|---|---|---|---|---|
| OTA 5T | vdd vss inp inm out vb |
6 | 35 Γ 23 | 805 |
| Comparator | vdd vss inp inm vb out |
6 | 35 Γ 98 | 3,430 |
| VREF 1.2V | vdd vss vref |
3 | 46 Γ 54 | 2,484 |
| TOTAL | β | 15 | β | 6,719 |
β οΈ No shared signal I/O pads across designs. Each pin gets its own dedicatedgf180mcu_fd_io__asignpad. Only VDD and VSS may share pads if all blocks operate on the same supply domain.
| Pin | Dir | OTA 5T | Comparator | VREF 1.2V | Dedicated Pad |
|---|---|---|---|---|---|
vdd |
PWR | β | β | β | gf180mcu_fd_io__vdd Γ1 (shared) |
vss |
PWR | β | β | β | gf180mcu_fd_io__vss Γ1 (shared) |
ota_inp |
IN | β | β | β | gf180mcu_fd_io__asign |
ota_inm |
IN | β | β | β | gf180mcu_fd_io__asign |
ota_out |
OUT | β | β | β | gf180mcu_fd_io__asign |
ota_vb |
IN | β | β | β | gf180mcu_fd_io__asign |
cmp_inp |
IN | β | β | β | gf180mcu_fd_io__asign |
cmp_inm |
IN | β | β | β | gf180mcu_fd_io__asign |
cmp_out |
OUT | β | β | β | gf180mcu_fd_io__asign |
cmp_vb |
IN | β | β | β | gf180mcu_fd_io__asign |
vref_out |
OUT | β | β | β | gf180mcu_fd_io__asign |
| Subtotal | 6 | 6 | 3 | 9Γasign + 1Γvdd + 1Γvss |
| Metric | Value |
|---|---|
| Core area (3 designs) | 6,719 Β΅mΒ² (0.0067 mmΒ²) |
| Pads needed | 11 pads = 9Γ asign + 1Γ vdd + 1Γ vss |
| Est. with I/O pads (~200Γ200 Β΅m each) | ~0.09 mmΒ² (11 pads) |
| Est. with I/O pads + seal ring + scribe | ~0.20 mmΒ² |
Core dimensions are extracted from GDS bounding boxes reported by the pipeline. I/O pad area is an estimate based on typical GF180MCU I/O cell dimensions (~200 Γ 200 Β΅m per pad). Actual tapeout area depends on pad frame arrangement and seal ring.
| Module | Owner | Files |
|---|---|---|
| Analog Design, Placement, Routing, Power, Simulation | Huda | placement.py, routing.py, power.py, simulation.py, spice_parser.py |
| DRC, LVS, PEX, Verification, Environment | Ahmad | checks.py, utils.py, scripts/ |
| AI/LLM Integration, Prompts, Pipeline, Docs | Jabir | pipeline.py, llm_to_gds.ipynb, .opencode/ |
| Constraint | Value | Notes |
|---|---|---|
| Supply | 3.3V single | Use nfet_03v3 / pfet_03v3 only |
| MOSFET W | <10Β΅m |
Per finger width |
| MOSFET L | <10Β΅m |
Per transistor |
| Device prefix | XM1 (not M1) |
Standard for gf180mcuD |
| Fingers vs mult | Prefer nf=N over m=N |
Better matching |
| MOSFET body | pfet_03v3βVDD ONLY, nfet_03v3βVSS ONLY |
No other connections allowed |
β οΈ REMEMBER: Always save simulation plots as.pngfiles in the working directory. Organize by analysis type:
| Analysis | Plot Content | Suggested Filename |
|---|---|---|
| AC | Gain (dB) & Phase (Β°) vs Frequency | <cell>_ac_{pre,post}.png |
| DC | IV curves, operating point sweep | <cell>_dc.png |
| TRAN | Transient waveforms (V/t, I/t) | <cell>_tran_{pre,post}.png |
# Example: save plot from simulation
import matplotlib.pyplot as plt
# ... run simulation, collect data ...
plt.savefig(os.path.join(workdir, "ota_5t_ac_pre.png"), dpi=150)These plots are required artifacts for experiment reports and tapeout reviews.
| Gate | Requirement |
|---|---|
| DRC | Magic DRC zero violations |
| LVS | Netgen LVS: netlist matches layout |
| PEX | Parasitic extraction complete |
| Post-layout | Matches pre-layout within 10% tolerance |
This project is built on top of two outstanding open-source frameworks:
| Project | Role | Link |
|---|---|---|
| gLayout | SPICE-to-GDS layout generation engine β automated device placement, power routing, and PathFinder negotiated-congestion signal routing | github.com/ReaLLMASIC/gLayout |
| gdsfactory | PDK activation, device library (nmos, pmos, mimcap, via_stack), and GDSII I/O | github.com/gdsfactory/gdsfactory |
We are grateful to the maintainers and contributors of both projects for making automated analog layout generation possible.
This project is licensed under the MIT License. See the LICENSE file for details.