AnalogCoder: Analog Circuit Design via Training-Free Code Generation

AnalogCoder: Analog Circuit Design via Training-Free Code Generation

30 May 2024 | Yao Lai¹, Sungyoung Lee², Guojin Chen³, Souradip Poddar², Mengkang Hu¹, David Z. Pan², Ping Luo¹
AnalogCoder is a training-free large language model (LLM) agent that enables the design of analog circuits through Python code generation. It addresses the challenges of analog circuit design, which is more complex and data-scarce than digital circuit design. AnalogCoder incorporates a feedback-enhanced design flow with tailored domain-specific prompts, allowing for automated and self-correcting circuit design with high success rates. It also proposes a circuit tool library to archive successful designs as reusable modular sub-circuits, simplifying the creation of complex circuits. Extensive experiments on a benchmark covering a wide range of analog circuit tasks show that AnalogCoder outperforms other LLM-based methods, successfully designing 20 circuits, five more than standard GPT-4o. AnalogCoder can significantly improve the labor-intensive chip design process, enabling non-experts to design analog circuits efficiently. The codes and benchmark are available at github.com/laiyao1/AnalogCoder. Analog circuits are essential for processing real-world signals such as temperature, pressure, sound, and light, and are indispensable in modern integrated circuits. They facilitate accurate sensing, amplification, and filtering, crucial for linking digital systems with physical environments. Analog circuit design presents significant challenges due to the complexity of components, the need for precise configuration, and the scarcity of data. AnalogCoder addresses these challenges by generating Python code for circuit design, leveraging the LLM's strong Python programming capabilities. It also incorporates domain-specific prompt engineering, feedback-enhanced design flow, and a circuit tool library to enhance the design capabilities of LLMs. The paper introduces three main contributions: (1) AnalogCoder, the first LLM-based agent for analog integrated circuit design, which generates Python code to design analog circuits. (2) A feedback-enhanced design flow and a circuit tool library that significantly improve the LLM's ability to design functional analog circuits. (3) A benchmark specifically designed to evaluate the ability of LLMs in designing analog circuits, comprising 24 unique circuits, three times the number included in the ChipChat benchmark and offering 40% more circuits than the VeriGen benchmark. The benchmark features detailed task descriptions, sample designs, and test-benches, enhancing resources for future research. The paper also discusses the methodology of AnalogCoder, including prompt engineering, feedback-enhanced design flow, and a circuit tool library. It evaluates the performance of AnalogCoder against other LLMs on a benchmark of analog circuit design tasks, showing that AnalogCoder can autonomously solve 20 out of 24 analog circuit challenges. The results indicate that Llama-3 and DeepSeek-V2, the latest open-source models, demonstrate a marginally superior capability in circuit design compared to GPT-3.5. However, other open-source models still exhibit a certain gap compared to GPT-3.5. GPT-4o is still the best LLM for analog circuit design, generallyAnalogCoder is a training-free large language model (LLM) agent that enables the design of analog circuits through Python code generation. It addresses the challenges of analog circuit design, which is more complex and data-scarce than digital circuit design. AnalogCoder incorporates a feedback-enhanced design flow with tailored domain-specific prompts, allowing for automated and self-correcting circuit design with high success rates. It also proposes a circuit tool library to archive successful designs as reusable modular sub-circuits, simplifying the creation of complex circuits. Extensive experiments on a benchmark covering a wide range of analog circuit tasks show that AnalogCoder outperforms other LLM-based methods, successfully designing 20 circuits, five more than standard GPT-4o. AnalogCoder can significantly improve the labor-intensive chip design process, enabling non-experts to design analog circuits efficiently. The codes and benchmark are available at github.com/laiyao1/AnalogCoder. Analog circuits are essential for processing real-world signals such as temperature, pressure, sound, and light, and are indispensable in modern integrated circuits. They facilitate accurate sensing, amplification, and filtering, crucial for linking digital systems with physical environments. Analog circuit design presents significant challenges due to the complexity of components, the need for precise configuration, and the scarcity of data. AnalogCoder addresses these challenges by generating Python code for circuit design, leveraging the LLM's strong Python programming capabilities. It also incorporates domain-specific prompt engineering, feedback-enhanced design flow, and a circuit tool library to enhance the design capabilities of LLMs. The paper introduces three main contributions: (1) AnalogCoder, the first LLM-based agent for analog integrated circuit design, which generates Python code to design analog circuits. (2) A feedback-enhanced design flow and a circuit tool library that significantly improve the LLM's ability to design functional analog circuits. (3) A benchmark specifically designed to evaluate the ability of LLMs in designing analog circuits, comprising 24 unique circuits, three times the number included in the ChipChat benchmark and offering 40% more circuits than the VeriGen benchmark. The benchmark features detailed task descriptions, sample designs, and test-benches, enhancing resources for future research. The paper also discusses the methodology of AnalogCoder, including prompt engineering, feedback-enhanced design flow, and a circuit tool library. It evaluates the performance of AnalogCoder against other LLMs on a benchmark of analog circuit design tasks, showing that AnalogCoder can autonomously solve 20 out of 24 analog circuit challenges. The results indicate that Llama-3 and DeepSeek-V2, the latest open-source models, demonstrate a marginally superior capability in circuit design compared to GPT-3.5. However, other open-source models still exhibit a certain gap compared to GPT-3.5. GPT-4o is still the best LLM for analog circuit design, generally
Reach us at info@study.space