[Paper Review] SPICEPilot: Navigating SPICE Code Generation and Simulation with AI Guidance
SPICEPilot introduces a Python-based framework and open-source dataset that leverage LLMs to automate SPICE code generation and simulation for analog circuits. By using PySpice to generate standardized, verifiable SPICE netlists and introducing benchmarking metrics, the framework enables reliable evaluation of LLM performance, achieving up to 85.5% pass rate on complex circuit tasks with GPT-4o and Claude models.
Large Language Models (LLMs) have shown great potential in automating code generation; however, their ability to generate accurate circuit-level SPICE code remains limited due to a lack of hardware-specific knowledge. In this paper, we analyze and identify the typical limitations of existing LLMs in SPICE code generation. To address these limitations, we present SPICEPilot a novel Python-based dataset generated using PySpice, along with its accompanying framework. This marks a significant step forward in automating SPICE code generation across various circuit configurations. Our framework automates the creation of SPICE simulation scripts, introduces standardized benchmarking metrics to evaluate LLM's ability for circuit generation, and outlines a roadmap for integrating LLMs into the hardware design process. SPICEPilot is open-sourced under the permissive MIT license at https://github.com/ACADLab/SPICEPilot.git.
Motivation & Objective
- Address the limited ability of LLMs to generate accurate SPICE code due to insufficient hardware-specific knowledge.
- Overcome data scarcity in analog circuit design by automatically generating open-source, standardized SPICE code datasets using LLMs.
- Establish a reproducible benchmarking framework with quantitative metrics to evaluate LLM performance in circuit generation and simulation.
- Integrate LLMs into hardware design workflows by enabling automated SPICE simulation script generation and waveform validation.
- Provide a roadmap for enhancing LLMs with domain-specific reasoning and circuit intelligence for future analog design automation.
Proposed method
- Generate a comprehensive Python-based SPICE code dataset using PySpice to simulate various transistor models and circuit configurations.
- Develop a framework that automates SPICE simulation script generation, netlist creation, and waveform output using PySpice.
- Implement standardized benchmarking metrics (e.g., Pass@1, Pass@5) to evaluate LLMs on circuit generation tasks across varying complexity levels.
- Integrate prompt engineering and chain-of-thought techniques to improve LLM reliability, especially for complex circuits.
- Enable automated verification of generated netlists and simulation results to ensure functional correctness and parameter compliance.
- Support extensibility via class-based circuit construction and potential integration with multi-modal LLMs using circuit images as input.

Experimental results
Research questions
- RQ1How reliable are LLMs in generating accurate SPICE code for analog circuits, and what are their core limitations in this domain?
- RQ2What steps are required to develop a specialized LLM fine-tuned for analog circuit design with domain-specific knowledge?
- RQ3How can data scarcity in analog circuit design be mitigated through automated, LLM-powered dataset generation?
- RQ4Can LLMs autonomously generate or enhance datasets for analog circuit design using self-verification and iterative prompting?
- RQ5How can LLMs be equipped with logical reasoning capabilities tailored to circuit behavior, parameter tuning, and functional verification?
Key findings
- SPICEPilot achieved a 63.5% Pass@1 rate and 68.6% Pass@5 rate on the enhanced benchmark using GPT-3.5, with GPT-4o reaching 80.0% Pass@1 and 88.0% Pass@3 on medium and hard circuits.
- Claude models achieved 79.8% Pass@1 and 85.5% Pass@5 on the full benchmark, outperforming CodeLlama-70B and WizardCoder-33B in complex circuit generation.
- For hard circuits (14–24 components), GPT-4o achieved a 20.0% Pass@1 rate, indicating challenges in module definition and parameter tuning, which can be mitigated via chain-of-thought prompting.
- The framework successfully automated SPICE netlist generation and waveform visualization, enabling rapid validation and iteration of circuit designs.
- Human-in-the-loop evaluation confirmed that LLM-generated circuits required fine-tuning of resistors and coupling capacitors to meet functional specifications such as gain.
- The open-source dataset and benchmarking framework are publicly available at https://github.com/ACADLab/SPICEPilot.git, enabling reproducible evaluation and future model development.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.