Printed circuit board (PCB) schematic design defines nearly all electronic hardware, but it remains manual and expertise-intensive. While generative AI has advanced digital and analog IC design, PCB schematic generation from natural-language intent is largely unexplored. This paper presents SchGen, the first large language model that generates editable PCB schematics from natural-language requests. The key challenge lies in the lack of an LLM-suited representation and a large-scale dataset. Current schematic formats are dominated by verbose, tool-specific syntax and geometry-heavy descriptions, making them difficult to generate reliably. We introduce a semantically grounded code representation that encodes schematic editing primitives with relative placement and pin-name-based wiring, transforming a geometry-driven generation problem into a semantics-driven matching task amenable to LLMs. We further construct a large-scale dataset of PCB schematics paired with user prompts via a human-agent collaborative pipeline that converts open-source hardware designs into our representation. Experiments show that SchGen significantly outperforms alternative representations and even larger general-purpose LLMs on wire connectivity accuracy and functional correctness. Our results highlight the critical role of representation design in enabling generative models for complex hardware design tasks.
翻译:印刷电路板(PCB)原理图设计定义了几乎所有电子硬件,但其仍依赖人工且需要大量专业知识。尽管生成式人工智能已推动数字与模拟集成电路设计的进步,但基于自然语言意图生成PCB原理图的研究仍基本空白。本文提出SchGen,这是首个可从自然语言请求生成可编辑PCB原理图的大语言模型。其核心挑战在于缺乏适合大语言模型的表示形式和大规模数据集。当前原理图格式主要由冗长且工具特定的语法以及几何密集的描述主导,难以实现可靠生成。我们引入一种语义化代码表示,该表示编码原理图编辑基元,包含相对位置和基于引脚名的布线信息,从而将几何驱动生成问题转化为适合大语言模型的语义驱动匹配任务。进一步地,我们通过人机协作流水线将开源硬件设计转换为此表示,构建了大规模PCB原理图与用户提示的配对数据集。实验表明,在导线连接准确性和功能正确性方面,SchGen显著优于替代表示方案乃至更强大的通用大语言模型。我们的研究结果揭示了表示设计在赋能复杂硬件设计任务的生成模型中起到的关键作用。