SchGen: PCB Schematic Generation with Semantic-Grounded Code Representations

Qinpei Luo, Ruichun Ma, Xinyu Zhang, Lili Qiu · 2026

Read SchGen: PCB Schematic Generation with Semantic-Grounded Code Representations by Qinpei Luo, Ruichun Ma, Xinyu Zhang, Lili Qiu (2026) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2605-30345.txt.

Introduction

Qinpei Luo, Ruichun Ma, Xinyu Zhang and Lili Qiu present SchGen, a language model making editable PCB schematics from natural-language requests. PCB schematic design defines all electronic hardware, but remains manual and intensive. The key challenge is the lack of an LLM representation, since current formats are verbose and heavy. They present a semantic code representation encoding primitives with relative placement and pin wiring, turning a geometry problem into a semantics matching task for LLMs. Tests show SchGen outperforms alternatives and larger LLMs on wire connectivity accuracy and correctness.

Catalog record

CREATORQinpei Luo, Ruichun Ma, Xinyu Zhang, Lili Qiu
YEAR2026
COLLECTIONPAPERS
FORMATTXT
FILE SIZE54206
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2605.30345

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

SchGen: PCB Schematic Generation with Semantic-Grounded Code Representations Qinpei Luo, Ruichun Ma, Xinyu Zhang, Lili Qiu Abstract 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. The source code is available at https://github.com/microsoft/SchGen. 1 Introduction Printed circuit boards (PCBs) are foundational to nearly all electronic hardware, from consumer electronics to Internet-of-Things devices and embodied AI hardware. As new applications proliferate, the demand for customized PCB designs is accelerating, while the design workflow remains largely manual, requiring substantial domain expertise to operate electronic design automation (EDA) tools. Given a user’s design request, engineers create the PCB schematic by selecting circuit components (symbols) and specifying their interconnections (wires), then export a netlist that guides subsequent PCB layout and fabrication. Among these stages, schematic design is the first and most critical. It defines the system architecture, but remains the least automated due to its vast design space and heavy reliance on domain knowledge. In this work, we aim to automate the PCB schematic design process by generating schematics from user prompts using large language models ( Figure 1 ). Recently, generative models have shown promising capabilities for hardware design. However, generating PCB schematic designs based on user requests is largely unexplored. For digital integrated circuits, large language models (LLMs) have been studied to generate Boolean logic specified in high-level hardware description languages such as Verilog, VHDL 34 ; 30 ; 10 . On the other hand, analog ICs depend on circuit topology to achieve desired performance, leading to graph-structured representations and generation 8 ; 17 ; 6 . Despite their success, prior works do not readily extend to our task. A PCB schematic connects diverse components, including various kinds of digital and analog IC components, passive elements (e.g., resistors and capacitors), and connectors. The vast range of components and complex wiring connections among heterogeneous components are not captured by prior work. Moreover, unlike specific digital logic or analog circuit performance targets, PCB schematics are driven by high-level functional requirements in natural language. Figure 1 : Overview of automated PCB design workflow. Based on the user request, SchGen generates a PCB schematic design using custom code representations, which is then converted to a netlist for PCB layout and fabrication. We present a new learning task of PCB schematic generation from natural language. Given a user’s textual functional request, the model produces an editable schematic with both correct connectivity and a readable spatial layout. To tackle this task, we present SchGen, a large language model for generating PCB schematics based on natural-language prompts as shown in Figure 1 . We address two critical challenges: (i) efficient representation . Unlike digital and analog ICs that have mature design representation, PCB schematic design is traditionally a GUI-centric visual workflow involving selecting, placing, and connecting components. As shown in Figure 2 , existing representations are poorly suited. Raw schematic files, while textual, are dominated by verbose, tool-specific, and version-specific metadata, making LLM generation prone to formatting errors and unusable, while image-based representations are not directly editable or machine-readable. Moreover, schematic design requires coherent component placement and readable wiring, while existing language models struggle to satisfy these requirements. (ii) data scarcity . Although many open-source hardware designs are publicly available, they appear in heterogeneous formats and are often released as images for human viewing, which makes it difficult to reuse or parse for training. To bridge the gaps, we introduce a semantic-grounded code representation that transforms the schematic generation task from absolute-geometry prediction to semantics-driven matching. We define a compact set of editing primitives mirroring how experts draw schematics, including adding symbols, connecting pins, and querying pin locations, which strips redundant metadata and enables efficient learning. For spatial reasoning, our APIs use local coordinate systems with relative offsets from anchor components and connect wires by semantic pin names (e.g., VCC, TXD) rather than absolute coordinates, reducing the spatial reasoning burden on LLMs. To tackle data scarcity, we develop an agentic pipeline that replicates open-source PCB designs as editable KiCad schematics, synthesizes user requests, and converts each design into executable Python code. Built on our representation and dataset, we finetune GPT-oss-20b to obtain SchGen. We evaluate SchGen performance on a comprehensive set of metrics spanning design validity, spatial layout quality, netlist accuracy, and expert verification. Results confirm that our proposed Code-L1 representation achieves 82% valid circuit rate and 60.5% expert-verified functional correctness, compared to only 32% valid circuits from the raw KiCad file baseline. In comparison with frontier LLMs prompted with the same APIs, including GPT-5.2, SchGen achieves the highest performance despite having only 20B parameters. We further validate generalization on an unseen out-of-distribution test set from GitHub projects, where SchGen matches the netlist accuracy of GPT-5.2. To summarize, we make the following contributions: (1) We present the new task of PCB schematic generation from natural language and develop SchGen, the first LLM that generates editable PCB schematics from user prompts. (2) We propose a semantic-grounded code representation that abstracts schematic design into structured editing operations with relative placement and pin-level connectivity to facilitate semantics-driven matching. (3) We construct a large-scale dataset of PCB schematics paired with user prompts via a human–agent collaborative pipeline that converts open-source designs into executable code representations. (4) Experiments show that SchGen achieves high functional correctness rates and outperforms frontier LLMs with much larger parameter sizes. 2 Preliminaries and Related Works Figure 2 : Comparison of schematic representations for LLM-based generation. Raw schematic files contain verbose metadata prone to formatting errors, while generated images are not machine-readable. Our code representation encodes editing primitives and pin-level semantics, transforming geometry prediction to a semantics-driven task amenable to LLM training. 2.1 PCB Schematic Design Process PCB schematic design process conventionally depends on electronic design automation (EDA) software, including proprietary tools like 3 , 5 , 9 , and open-source alternatives like 15 . While these tools support similar schematic content and editing operations, they rely on different file formats. Throughout this paper, we use the KiCad schematic format because it is open source. A schematic contains three main item types: (1) component symbols representing physical circuit components such as chips, resistors, capacitors, (2) power symbols representing rails such as VCC for power source, GND for ground,

Read the complete text