Intelligent circuit generation method based on natural language
By combining NLP and GNN, circuit design code is automatically generated, which solves the problems of high professional threshold and low design efficiency in circuit design, and realizes the automatic conversion of natural language to DSL code and the automation of circuit design.
Patent Information
- Application Number
- CN202510733938.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-04
- Publication Date
- 2025-09-12
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In existing technologies, circuit design has a high professional threshold, low design efficiency, and natural language descriptions cannot be directly converted into circuit design codes. Existing EDA tools have a long design cycle.
Using a natural language processing-based method, the circuit components and connection relationships are analyzed through the NLP model. Combined with DSL conversion and GNN optimization, DSL code that meets the design specifications is automatically generated to achieve circuit logic modeling and automatic wiring simulation.
It realizes the automatic conversion from natural language description to DSL code, improves the automation level and design rationality of circuit design, and generates circuits that comply with design rules.
Smart Images

Figure BDA0005432727470000031 
Figure BDA0005432727470000041
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of artificial intelligence, natural language processing and electronic design automation, and specifically to a method for intelligent circuit generation based on natural language. Background Art
[0002] Current solutions for natural language circuit generation methods mainly include: rule-matching-based methods: matching natural language descriptions through predefined templates, but with poor scalability and difficulty in handling complex circuits; deep learning-based methods: using neural networks to convert natural language into circuit topology, but lacking interpretability, and the generated results are not easy to control; hardware description language-based methods: such as Verilog and VHDL, but these languages require high-threshold expertise and are not suitable for non-professional users.
[0003] Currently, circuit design mainly relies on manual drawing or modeling based on professional hardware description languages (such as Verilog and VHDL), but there are the following problems: high professional threshold: circuit design usually requires engineers to have high professional knowledge to accurately write hardware description code; low design efficiency: existing EDA tools still rely on users to manually adjust circuit layout and parameters, resulting in a long design cycle; natural language descriptions cannot be directly converted into circuits: current EDA systems cannot directly generate executable circuit design code from natural language. Summary of the Invention
[0004] (1) Technical problems solved
[0005] To address the shortcomings of the existing technology, the present invention provides a natural language-based intelligent circuit generation method, which has the advantages of providing natural language parsing capabilities, converting user requirements into DSL code, automatically generating DSL code that meets design specifications, realizing circuit logic modeling, and combining optimization algorithms to improve the accuracy and rationality of circuit generation, thereby solving the above-mentioned problems.
[0006] (2) Technical solution
[0007] To achieve the above object, the present invention provides the following technical solutions:
[0008] The method for intelligent circuit generation based on natural language includes the following steps:
[0009] Step 1: Natural language parsing and DSL conversion;
[0010] Step 2: DSL characterization of complex circuits;
[0011] Step 3: DSL generation example;
[0012] Step 4: Post-generation optimization and verification.
[0013] Preferably, the step 1 includes natural language parsing based on NLP and semantic to DSL conversion.
[0014] Preferably, the step 2 includes submodules and hierarchical structures and series and parallel current representations.
[0015] Preferably, the step three includes natural language input examples and automatically generated DSL codes.
[0016] Preferably, the step four includes GNN-based circuit layout optimization and automatic circuit verification.
[0017] (3) Beneficial effects
[0018] Compared with the prior art, the present invention provides a method for intelligent circuit generation based on natural language, which has the following beneficial effects:
[0019] The present invention inputs a natural language description, uses an NLP model to extract circuit components, parameters, and connection relationships, and employs a hierarchical parsing method to decompose complex circuits into multiple submodules. The submodules are mapped to a DSL syntax structure, generating executable DSL code. The DSL code is optimized to ensure structural integrity. Based on GNN, circuit layout is optimized to improve design rationality. Automatic wiring and circuit simulation are performed to ensure that the DSL code can be correctly converted into a circuit design. This enables automatic conversion from natural language descriptions to DSL code, improves the automation level of circuit design, and generates circuits that comply with design rules. DETAILED DESCRIPTION
[0020] The following will be combined with the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0021] The present invention relates to a method for intelligently generating circuits based on natural language, comprising the following steps:
[0022] Step 1: Natural language parsing and DSL conversion, including NLP-based natural language parsing and semantic-to-DSL conversion;
[0023] Natural language parsing based on NLP: Using BERT, GPT, or Transformer for semantic parsing, it identifies circuit components, connection relationships, and parameter information. It uses neural network entity recognition (NER) to extract component types, such as resistors, capacitors, and transistors. It uses dependency parsing to identify the connections between components. Combined with semantic role labeling (SRL), it analyzes circuit functional requirements, such as signal amplification and voltage regulation.
[0024] Semantic to DSL Conversion: After parsing the natural language, DSL code is generated based on rule mapping and machine learning. The circuit topology is determined through graph structure matching to ensure that the DSL code accurately reflects the circuit logic. Hierarchical parsing is used to handle complex circuits and support modular design.
[0025] Step 2: DSL representation of complex circuits, including submodules and hierarchical structures and series and parallel current representation;
[0026] Submodules and hierarchical structures: Supports modular circuit design through nested expressions, facilitating analysis and optimization. For example, an amplifier can be split into input, gain, and output stages, with each stage being independently described.
[0027] Series and parallel current representation: Use Flow Series and Flow Parallel to clearly define current paths, suitable for describing complex circuit topologies such as filters and bridge rectifiers;
[0028] Step 3: DSL generation examples, including natural language input examples and automatically generated DSL code;
[0029] Natural language input example: I need an amplifier circuit with a 100Ω resistor, a 1kΩ resistor at the input, a 10μF capacitor at the output, and an NPN transistor;
[0030] Automatically generated DSL code:
[0031]
[0032]
[0033] The submodule structure (InputStage, GainStage, OutputStage) clearly represents the hierarchical structure of the complex circuit;
[0034] Flow Series / Parallel syntax is used to describe series or parallel connection methods;
[0035] Automatically parsed connection relationships ensure that the DSL code correctly maps to the circuit design;
[0036] Step 4: Post-generation optimization and verification, including GNN-based circuit layout optimization and automatic circuit verification;
[0037] GNN-based circuit layout optimization: GNN is trained to learn the best component placement method, and EDA rules are combined to optimize the layout and improve readability;
[0038] Automatic circuit verification: Use circuit simulation tools to verify the correctness of the circuit generated by the DSL code. If there are errors, the parameters are automatically corrected and the DSL code is regenerated.
[0039] Natural language parsing: input natural language description;
[0040] Use NLP models to extract circuit components, parameters, and connection relationships;
[0041] A hierarchical analysis method is used to decompose complex circuits into multiple sub-modules;
[0042] Map to DSL syntax structure and generate executable DSL code.
[0043] DSL code optimization and circuit generation: optimize DSL code to ensure structural integrity;
[0044] Optimize circuit layout based on GNN to improve design rationality;
[0045] Automatic routing and circuit simulation ensure that DSL code can be correctly converted into circuit design.
[0046] The beneficial effects of the present invention are as follows: by inputting a natural language description, using an NLP model to extract circuit components, parameters, and connection relationships, using a hierarchical parsing method to decompose complex circuits into multiple sub-modules, mapping them to a DSL syntax structure, generating executable DSL code, optimizing the DSL code to ensure structural integrity, optimizing circuit layout based on GNN to improve design rationality, automatically routing and circuit simulation, ensuring that the DSL code can be correctly converted into a circuit design, thereby achieving automatic conversion from natural language description to DSL code, improving the degree of automation of circuit design, and generating circuits that comply with design rules.
[0047] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions, and variations may be made to these embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the appended claims and their equivalents.
Claims
1. A circuit intelligent generation method based on natural language, characterized in that: The following steps are involved: Step 1: Natural language parsing and DSL conversion; Step 2: DSL characterization of complex circuits; Step 3: DSL generation example; Step 4: Post-generation optimization and verification.
2. The method for intelligent circuit generation based on natural language according to claim 1, characterized in that: The first step includes natural language parsing based on NLP and semantic to DSL conversion.
3. The method for intelligent circuit generation based on natural language according to claim 1, characterized in that: The second step includes submodules and hierarchical structures and series and parallel current representation.
4. The method for intelligent circuit generation based on natural language according to claim 1, characterized in that: The step three includes natural language input examples and automatically generated DSL codes.
5. The method for intelligent circuit generation based on natural language according to claim 1, characterized in that: The fourth step includes GNN-based circuit layout optimization and automatic circuit verification.