Script processing method of EDA software and electronic equipment

By using a large language model agent to generate target execution flow information, the problem of engineers needing to learn multiple EDA software scripting languages ​​is solved, and seamless switching and automated execution between different EDA software are achieved, reducing language learning costs and improving processing efficiency.

CN120704661APending Publication Date: 2025-09-26SHANGHAI HUATAI SOFTWARE ENGINEERING CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510851238.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-24
Publication Date
2025-09-26

AI Technical Summary

Technical Problem

In the prior art, engineers need to learn different scripting languages ​​for a variety of EDA software, resulting in high language learning costs and high requirements for script writing.

Method used

A large language model agent is used to generate target execution flow information based on the script interface information of the EDA software and the user's design requirements. The scripts are called in sequence in the EDA software through the target execution flow information to achieve the user's design requirements.

Benefits of technology

It reduces the cost for users to learn different EDA software scripting languages, improves processing efficiency, and realizes seamless switching and automated execution between different EDA software, with wide applicability and high accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120704661A_ABST
    Figure CN120704661A_ABST
Patent Text Reader

Abstract

The invention provides an EDA software script processing method and electronic equipment, and the method comprises the steps: obtaining the design demand information of a user, generating target execution flow information according to the script interface information and the design demand information of EDA software, inputting the target execution flow information to the EDA software, and executing the EDA software according to the target execution flow information. The EDA software calls scripts in sequence according to the sequence of all script interface calling statements in the target execution flow information so as to execute the design requirement of the user, and an execution result is output to a user work interface. According to the embodiment of the invention, the target execution stream information generated according to the design demand information of the user is agented through the large language model, so that the demand of a natural language is converted into various EDA script languages, seamless switching is carried out between different EDA software, the applicability is wide, and the accuracy is high. And the user only needs to carry out demand description, so that the users with different language levels can benefit from efficiency improvement brought by script batch processing, and the language learning cost of the user is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of script processing, and in particular to a script processing method and electronic device for EDA software. Background Art

[0002] Electronic Design Automation (EDA) software is a software tool used to design electronic systems, such as printed circuit boards (PCBs) and integrated circuits (ICs). Engineers use EDA software to complete the entire electronic design process, such as schematic design and PCB layout design.

[0003] At present, the process of using EDA software to implement electronic design in the existing technology is usually: engineers use scripting languages ​​to write script programs, and upload or specify script paths in the EDA software to execute the scripts in the script running environment provided by the EDA software, thereby implementing electronic design.

[0004] However, the existing technology requires high script writing ability from engineers, and because different EDA software may provide different script languages, engineers need to use different script languages ​​corresponding to each EDA software to write scripts, which increases the cost of language learning. Summary of the Invention

[0005] The purpose of this application is to provide a script processing method and electronic device for EDA software to address the deficiencies in the above-mentioned prior art, so as to solve the problem of high language information cost in the prior art.

[0006] To achieve the above objectives, the technical solutions adopted in this application are as follows: In a first aspect, the present application provides a script processing method for EDA software, the method being applied to a large language model agent, the large language model agent including: a target model, the method including: Obtain user design requirement information; generating target execution flow information based on script interface information of the EDA software, the design requirement information, and a target model, wherein the script interface information includes: multiple script interfaces supported by the EDA software and annotation information of each script interface, wherein the annotation information includes: function information, parameter information, and return information of the script interface; and the target execution flow information is an execution sequence consisting of at least one script interface call statement. The target execution flow information is input into the EDA software, and the EDA software calls the scripts in sequence according to the order of the script interface call statements in the target execution flow information to execute the user's design requirements, and outputs the execution results to the user work interface for display.

[0007] Optionally, generating target execution flow information according to the script interface information of the EDA software, the design requirement information, and the target model includes: Determining a target task sequence according to the design requirement information and the script interface information; The target execution flow information is generated according to the script interface information and the target task sequence and based on the target model.

[0008] Optionally, determining a target task sequence according to the design requirement information and the script interface information includes: Perform task decomposition planning based on the design requirement information to obtain an initial task sequence; Determining whether the design requirements are complete based on the initial task sequence and the script interface information; If yes, then taking the initial task sequence as the target task sequence; If not, the supplementary requirement prompt information is output according to the script interface information, the supplementary requirement information input by the user according to the supplementary requirement prompt information is obtained, and the task decomposition planning is re-performed according to the design requirement information and the supplementary requirement information to obtain a new task sequence, which is iteratively executed until the design requirements are complete, and the new task sequence is used as the target task sequence.

[0009] Optionally, determining whether the design requirements are complete according to the initial task sequence and the script interface information includes: Traversing each task in the initial task sequence, and for the traversed current task, determining a target script interface corresponding to the current task according to the semantic information of the current task and the functional information of each script interface; Comparing the parameter information and return information of the target script interface with the current task to determine whether the current task is complete; if not, recording the information to be supplemented in the current task; After the initial task sequence traversal is completed, it is determined whether there are incomplete tasks, and if so, it is determined that the design requirements are incomplete.

[0010] Optionally, outputting the supplementary requirement prompt information according to the script interface information includes: Acquire each task to be supplemented and the to-be-supplemented information of each task to be supplemented, wherein the task to be supplemented is an incomplete task in the initial task sequence; Generate question keywords based on the information to be supplemented of the task to be supplemented; The question keywords serve as the supplementary demand prompt information.

[0011] Optionally, generating the target execution flow information according to the script interface information and the target task sequence based on the target model includes: Determine the script interface corresponding to each task in the target task sequence; According to the parameters of each task, the script interface calling statements of each task are generated through the target model, and according to the order of each task in the target task sequence, the script interface calling statements corresponding to each task are combined into initial execution flow information, and the initial execution flow information is subjected to a constraint check. If the result of the constraint check is that the constraint conditions are met, the initial execution flow information is used as the target execution flow information. Otherwise, the initial execution flow information is iteratively corrected according to the result of the constraint check until the corrected execution flow meets the constraint conditions.

[0012] Optionally, performing constraint checking on the initial execution flow information includes: Determining whether the parameters of each statement in the initial execution flow information meet the parameter type of the corresponding script interface; Determining whether the execution order of each statement in the initial execution flow information is feasible; Determine whether there are any conflicts in the dependencies between statements.

[0013] Optionally, inputting the target execution flow information into the EDA software includes: Output confirmation prompt information; If a confirmation instruction input by the user is received, the target execution flow information is input into the EDA software; otherwise, the user's design requirement information is re-acquired and the target execution flow information is re-generated.

[0014] Optionally, the target model training process includes: Acquire pre-configured learning corpus, the learning corpus comprising at least: text information in the scripting language of the EDA software; Processing the learning corpus into blocks to obtain multiple text blocks; Based on the large language model in the initial model, generating multiple question-answer pairs according to a pre-configured number of question-answer pairs and the multiple text blocks, the question-answer pairs including: system prompt words, context information, questions, and answers corresponding to the questions; Based on the group relative strategy optimization algorithm, the low-rank adaptation parameters in the initial model are iteratively modified according to the multiple question answers to obtain the target model. In a second aspect, the present application provides a script processing device for EDA software, the device comprising: Acquisition module, used to obtain user's design requirement information; a generation module, configured to generate target execution flow information based on script interface information of the EDA software, the design requirement information, and a target model, wherein the script interface information includes: multiple script interfaces supported by the EDA software and annotation information of each script interface, the annotation information includes: function information, parameter information, and return information of the script interface, and the target execution flow information is an execution sequence consisting of at least one script interface call statement; An execution module is used to input the target execution flow information into the EDA software, and the EDA software calls the scripts in sequence according to the order of the script interface call statements in the target execution flow information to execute the user's design requirements, and outputs the execution results to the user work interface for display.

[0015] Optionally, the generating module is specifically configured to: Determining a target task sequence according to the design requirement information and the script interface information; The target execution flow information is generated according to the script interface information and the target task sequence and based on the target model.

[0016] Optionally, the generating module is specifically configured to: Perform task decomposition planning based on the design requirement information to obtain an initial task sequence; Determining whether the design requirements are complete based on the initial task sequence and the script interface information; If yes, then taking the initial task sequence as the target task sequence; If not, the supplementary requirement prompt information is output according to the script interface information, the supplementary requirement information input by the user according to the supplementary requirement prompt information is obtained, and the task decomposition planning is re-performed according to the design requirement information and the supplementary requirement information to obtain a new task sequence, which is iteratively executed until the design requirements are complete, and the new task sequence is used as the target task sequence.

[0017] Optionally, the generating module is specifically configured to: Traversing each task in the initial task sequence, and for the traversed current task, determining a target script interface corresponding to the current task according to the semantic information of the current task and the functional information of each script interface; Comparing the parameter information and return information of the target script interface with the current task to determine whether the current task is complete; if not, recording the information to be supplemented in the current task; After the initial task sequence traversal is completed, it is determined whether there are incomplete tasks, and if so, it is determined that the design requirements are incomplete.

[0018] Optionally, the generating module is specifically configured to: Acquire each task to be supplemented and the to-be-supplemented information of each task to be supplemented, wherein the task to be supplemented is an incomplete task in the initial task sequence; Generate question keywords based on the information to be supplemented of the task to be supplemented; The question keywords serve as the supplementary demand prompt information.

[0019] Optionally, the generating module is specifically configured to: Determine the script interface corresponding to each task in the target task sequence; According to the parameters of each task, the script interface calling statements of each task are generated through the target model, and according to the order of each task in the target task sequence, the script interface calling statements corresponding to each task are combined into initial execution flow information, and the initial execution flow information is subjected to a constraint check. If the result of the constraint check is that the constraint conditions are met, the initial execution flow information is used as the target execution flow information. Otherwise, the initial execution flow information is iteratively corrected according to the result of the constraint check until the corrected execution flow meets the constraint conditions.

[0020] Optionally, the generating module is specifically configured to: Determining whether the parameters of each statement in the initial execution flow information meet the parameter type of the corresponding script interface; Determining whether the execution order of each statement in the initial execution flow information is feasible; Determine whether there are any conflicts in the dependencies between statements.

[0021] Optionally, the execution module is specifically configured to: Output confirmation prompt information; If a confirmation instruction input by the user is received, the target execution flow information is input into the EDA software; otherwise, the user's design requirement information is re-acquired and the target execution flow information is re-generated.

[0022] Optionally, the target model training process includes: Acquire pre-configured learning corpus, the learning corpus comprising at least: text information in the scripting language of the EDA software; Processing the learning corpus into blocks to obtain multiple text blocks; Based on the large language model in the initial model, generating multiple question-answer pairs according to a pre-configured number of question-answer pairs and the multiple text blocks, the question-answer pairs including: system prompt words, context information, questions, and answers corresponding to the questions; Based on the group relative strategy optimization algorithm, the low-rank adaptation parameters in the initial model are iteratively corrected according to the multiple question answers to obtain a target model.

[0023] In a third aspect, the present application provides an electronic device comprising: a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the storage medium through the bus, and the processor executes the machine-readable instructions to perform the steps of the script processing method of the above-mentioned EDA software.

[0024] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the script processing method of the above-mentioned EDA software are executed.

[0025] The beneficial effects of the present application are as follows: the large language model agent generates target execution flow information based on the target model, according to the script interface information of the EDA software and the design requirement information sent by the user, and sends the target execution flow information to the EDA software, and the EDA software calls the script in sequence according to the order of each script interface call statement in the target execution flow information, realizing repeated and time-consuming interface operations, fully automated execution, high work efficiency, and realizing the user's design requirements. This embodiment converts the natural language requirements into the script language of various EDAs by using the target execution flow information generated by the large language model agent according to the user's design requirement information. This method can be seamlessly switched between different EDA software, has wide applicability, and high accuracy. And the user only needs to describe the requirements, so that users of different language levels can benefit from the efficiency improvement brought by script batch processing, reducing the cost of user language learning. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without creative work.

[0027] Figure 1 is a schematic diagram of a YODO system provided in an embodiment of the present application; Figure 2This is a flowchart of a script processing method for EDA software provided in an embodiment of the present application; Figure 3 This is a flow chart of determining a target task sequence provided by an embodiment of the present application; Figure 4 This is a flowchart of determining whether a design requirement is complete, provided by an embodiment of the present application; Figure 5 This is a flow chart of outputting supplementary demand prompt information provided by an embodiment of the present application; Figure 6 This is a schematic diagram of a process for generating target execution flow information provided by an embodiment of the present application; Figure 7 This is a flowchart of a constraint check provided by an embodiment of the present application; Figure 8 This is a flowchart of another EDA software script processing method provided in an embodiment of the present application; Figure 9 This is a schematic diagram of the training process of a target model provided in an embodiment of the present application. Figure 10 This is a schematic diagram of the training process of another target model provided in an embodiment of the present application; Figure 11 This is a schematic diagram of the structure of a script processing device for EDA software provided in an embodiment of the present application; Figure 12 This is a structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0028] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of illustration and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn to scale. The flowcharts used in this application illustrate the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowcharts can be implemented out of sequence, and steps without logical context can be reversed or implemented simultaneously. In addition, those skilled in the art, under the guidance of the contents of this application, can add one or more other operations to the flowchart, or remove one or more operations from the flowchart.

[0029] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application generally described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the claimed application, but merely represents selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present application.

[0030] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the existence of the features declared thereafter, but does not exclude the addition of other features.

[0031] In the prior art, engineers write scripts in a scripting language and upload or specify the script path in the EDA software, thereby executing the script in the script runtime environment provided by the EDA software. This method requires high scripting skills from engineers, and different EDA software may provide different scripting languages. For example, among EDA software, the scripting language used by KiCad is Python, the scripting language used by Altium Designer is JavaScript or C#, the scripting language used by Cadence Allegro is Skill (specifically, Lisp), the scripting language used by Mentor ModelSim, Questa Synopsys, Vivado, Quartus, OrCAD, and PADS is Tcl, and the scripting language used by EasyEDA and Jiali Chuang EDA is JavaScript. It can be seen that if engineers use multiple EDA software, they need to use different scripting languages ​​corresponding to each EDA software to write scripts, which has a high language learning cost.

[0032] Based on this, the present application proposes a script processing method for EDA software, in which a large language model agent generates target execution flow information based on the EDA software's script interface information and the user's design requirement information. The EDA software calls the script in sequence according to the order of the script interface call statements in the target execution flow information, thereby executing the user's design requirements. This method of directly generating target execution flow information through a large language model agent and sending it to the EDA software, so that it calls the script to execute the user's design requirements, does not require engineers to learn the script language of each EDA software, thereby reducing learning costs and improving processing efficiency.

[0033] Optionally, this method can be applied to a large language model agent under a You Only Define Once (YODO) system to implement linked script processing and practical application based on a target model included in the large language model agent, wherein the target model is a trained script generation model composed of a large language model and trained low-rank adaptation parameters. Figure 1 Schematic diagram of a YODO system provided in an embodiment of the present application. Figure 1 As shown, the YODO system can include three parts: users, large language model agents, and EDA software, and these three parts can interact with each other in a two-way manner. Specifically, users can send design requirements information to the large language model agent and receive confirmation information sent by the large language model agent. The large language module agent can send target execution flow information to the EDA software and receive execution results sent by the EDA software. The EDA software can receive control instructions sent directly by the user and can also send execution results to the user.

[0034] Optionally, the YODO system can be deployed in a distributed manner. For example, EDA software can be deployed on a remote cloud desktop, and the large language model agent can directly use the large language model's application programming interface (API) and implement cloud interaction through network communication, such as inter-process communication (IPC) protocol communication. The IPC protocol enables processes running on different computers to communicate and collaborate with each other, thereby building complex distributed applications.

[0035] Next, refer to Figure 2 This paper introduces the script processing method of EDA software in detail. Figure 2 This is a flowchart of a script processing method for EDA software provided in an embodiment of the present application.

[0036] S201. Obtain user design requirement information.

[0037] Optionally, user design requirements may include information related to design content, including schematic design, PCB layout design, simulation analysis, library management, and manufacturing output. Schematic design encompasses circuit design, schematic drawing, component selection, net labeling, and electrical rule checking. Circuit design can involve designing a circuit scheme based on product requirements, schematic drawing can involve using EDA software to create a circuit schematic, component selection can involve selecting appropriate electronic components for the project based on their functionality, cost, and reliability, net labeling can involve defining net names and signal connections, and electrical rule checking can involve checking the schematic for logical and connectivity issues. PCB layout design can include PCB framework planning, component placement, critical signal routing, and DRC checking. Specifically, PCB framework planning involves determining PCB size, shape, and stackup structure, component placement involves placing components based on circuit functionality and heat dissipation requirements, critical signal routing can prioritize routing critical lines such as clocks and high-speed signals, and DRC checking involves performing design rule checks to ensure the design meets manufacturing requirements.

[0038] Optionally, the user's design requirement information may be a batch processing requirement described in natural language. For example, the user's design requirement information may be: in a schematic editor, all pin networks whose pin names end with "ground" are set to GND.

[0039] S202. Generate target execution flow information based on the EDA software's script interface information, design requirement information, and target model. The script interface information includes: multiple script interfaces supported by the EDA software and annotation information of each script interface. The annotation information includes: function information, parameter information, and return information of the script interface. The target execution flow information is an execution sequence consisting of at least one script interface call statement.

[0040] Optionally, each EDA software developer can provide multiple script interfaces and annotations for these script interfaces. Specifically, a script interface can implement a single function, such as changing a name or replacing a network. For example, a script interface might be Change_Pin_Name(pin_id), which changes the name of a specified pin. Another example might be Change_Symbol_Net_Name(symbol_id), which changes the net name of a symbol. Each EDA software's script interface and its annotations only need to be defined once.

[0041] Optionally, the annotation information of the script interface is used to prompt the large language model agent with the functions, parameters and return values ​​of each script interface, so that the large language model agent can select an appropriate script interface based on the target model and the annotation information of each script interface.

[0042] The annotation information of a script interface includes: the script interface's function information, parameter information, and return information. The script interface's function information describes the script interface's function, the script interface's parameter information can be the parameters of the object to which the script interface applies, and the script interface's return information can be the script interface's output information. The script interface's annotation information can also include the script interface's name.

[0043] For example, three script interfaces and annotation information of the script interfaces are introduced below.

[0044] The first script interface and its annotation information can be expressed as follows: / ** * Get the ID of the currently opened schematic page * @description Gets the unique identifier of the schematic page the user is currently editing * @param no parameters * @return {string} Returns the ID of the current page, or an empty string if no page is open * / Get_Current_Page_ID() The second script interface and its annotation information can be expressed as follows: / ** * Get all pin IDs in the specified page * @description Get a list of unique identifiers for all pin components in a specified schematic page * @param {string} page_id - the schematic page ID to query * @return {string[]} Returns an array of pin IDs. If the page does not exist or there are no pins, an empty array is returned. * / Get_All_Pin_ID_In_SCH(page_id) The third script interface and its annotation information can be expressed as follows: / ** * Set the pin's net name based on the pin name * @description Sets the net name of each pin in the specified pin list to be the same as its pin name * @param {string[]} pin_ids - array of pin IDs to set * @return {boolean} Returns whether the operation is successful. If all operations are successful, true is returned. If any operation fails, false is returned. * / Set_Pin_Net_By_PinName(pin_ids) Alternatively, multiple target script interfaces can be determined based on the target model, the EDA software's script interface information, and the design requirements. Script interface call statements can then be used to combine the target script interfaces into target execution flow information. Specifically, the EDA software's script interface information and the design requirements information are input into the target model, which can then output the target execution flow information.

[0045] For example, the user's design requirement information is, for example, to set the net name field of all pins on the current sheet page in the current schematic editor to the field in the pin name. The target script interfaces determined according to the script interface information of the EDA software and the design requirement information are Get_Current_Page_ID(), Get_All_Pin_ID_In_SCH(page_id), and Set_Pin_Net_By_PinName(pin_ids), respectively. The target execution flow information composed of the above target script interfaces can be as follows: page_id = Get_Current_Page_ID() pin_ids = Get_All_Pin_ID_In_SCH(page_id) Set_Pin_Net_By_PinName(pin_ids) That is, first get the ID of the current schematic page, then get the IDs of all pins on the specified page, and finally automatically assign the network based on the pin names.

[0046] S203. Input the target execution flow information into the EDA software. The EDA software calls the scripts in sequence according to the order of the script interface call statements in the target execution flow information to execute the user's design requirements, and outputs the execution results to the user work interface for display.

[0047] Optionally, the EDA software can execute the target execution flow information in its own script environment. Specifically, the scripts are called in sequence based on the order of the script interface call statements in the target execution flow information to meet the user's needs.

[0048] Optionally, after the EDA software calls the script to execute the user's design requirements, it outputs the execution results to the user work interface for display. The user sends new design requirement information to the large language model agent based on the display interface and requirements.

[0049] As an optional implementation, in addition to outputting the execution results to the user work interface for display, the EDA software can also return the execution results to the large language model agent so that the large language model agent can perform further operations.

[0050] In the present embodiment, the large language model agent generates target execution flow information based on the script interface information of the EDA software and the design requirement information sent by the user, and sends the target execution flow information to the EDA software. The EDA software calls the script in sequence according to the order of each script interface call statement in the target execution flow information, realizes repeated and time-consuming interface operations, and fully automated execution, high work efficiency, and realizes the design requirements of the user. The present embodiment uses the target execution flow information generated by the large language model agent according to the design requirement information of the user, thereby converting the requirements of natural language into the script language of various EDAs. This method can be seamlessly switched between different EDA software, with wide applicability and high accuracy. And the user only needs to describe the requirements, so that users of different language levels can benefit from the efficiency improvement brought by script batch processing, reducing the cost of user language learning.

[0051] As an optional implementation, the specific steps of generating the target execution flow information according to the script interface information, design requirement information and target model of the EDA software in the above step S202 are as follows.

[0052] Optionally, a target task sequence is determined based on design requirement information and script interface information.

[0053] The target task sequence can be a series of sequential tasks executed by the EDA software. For example, if the design requirement information sets the net name field of all pins on the current sheet in the current schematic editor to the field in the pin name, the target task sequence can be: obtain the identifier of the currently opened schematic page, obtain the identifiers of all pins on the specified page, and set the net name of the pin based on the pin name.

[0054] As an optional implementation method, task decomposition planning can be performed based on design requirement information to obtain an initial task sequence, and then the target task sequence can be determined based on the initial task sequence and the script interface information of the EDA software.

[0055] Optionally, target execution flow information is generated based on the target model according to the script interface information and the target task sequence.

[0056] Optionally, the script interface corresponding to each task in the target task sequence may be determined first, and then the script interfaces may be combined through call statements based on the target model to generate target execution flow information.

[0057] As an optional implementation manner, the script interface corresponding to each task in the target task sequence is determined based on the annotation information in the script interface information.

[0058] In this embodiment, the target task sequence is determined based on the design requirement information and the script interface information, and then the target execution flow information is generated based on the target model according to the script interface information and the target task sequence, thereby building a demand conversion channel between the user and the EDA software, so that the user can use natural language to implement batch processing in the EDA software, reducing the cost of learning the script language.

[0059] Further, refer to Figure 3 The specific process of determining the target task sequence based on the design requirement information and script interface information in the above steps is introduced. Figure 3 This is a flowchart of determining a target task sequence provided in an embodiment of the present application.

[0060] S301: Perform task decomposition and planning based on design requirement information to obtain an initial task sequence.

[0061] Optionally, the initial task sequence may be a plurality of sequential tasks executable by the EDA software, and each task may correspond to one or more script interfaces, thereby enabling script calls to complete the task.

[0062] Specifically, the design requirement information is globally planned to decompose the user's overall task into multiple tasks, and then the tasks are sorted according to the parameters of each task to obtain an initial task sequence.

[0063] For example, if the design requirement information indicates that all 0402-packaged resistors on the top layer should be moved to a specified area and the resistance value should be increased by 5%, the design requirement information can be planned and decomposed to obtain an initial task sequence: obtain a list of all components on the top layer, filter out resistors with 0402 packages, move the filtered resistors to the target area, modify the resistance value (original value × 1.05), and save the modified design.

[0064] S302: Determine whether the design requirements are complete based on the initial task sequence and script interface information.

[0065] Specifically, the initial task sequence can be analyzed based on the annotation information of each script interface in the script interface information to determine whether the design requirements indicated by the design requirement information are complete. As an optional implementation method, the completeness of the information of each task in the initial task sequence can be determined based on the semantic information of each task and the parameter information and return information of the script interface. If the information of any task in the initial task sequence is incomplete, the design requirements are determined to be incomplete.

[0066] For example, a task in the initial task sequence indicates to rename the resistor. There is a script interface for a script for renaming components, and its parameter information indicates that the original name of the renamed component should be changed to a new name. However, the task does not include the new name of the resistor, so the design requirements are incomplete.

[0067] S303: If yes, take the initial task sequence as the target task sequence.

[0068] Optionally, if the design requirements are complete, it means that the information of each task in the initial task sequence is complete, and the initial task sequence can be used as the target task sequence.

[0069] S304. If not, output the supplementary requirement prompt information according to the script interface information, obtain the supplementary requirement information input by the user according to the supplementary requirement prompt information, and re-decompose and plan the task according to the design requirement information and the supplementary requirement information to obtain a new task sequence, and iterate until the design requirements are complete, and use the new task sequence as the target task sequence.

[0070] Specifically, the large language model agent can determine the information that needs to be supplemented in the tasks with incomplete information in the initial task sequence based on the annotation information in the script interface information, and generate supplementary requirement prompt information based on the information. The supplementary requirement prompt information is used to indicate the information that needs to be supplemented, and the information can be presented to the user in the form of natural language.

[0071] For example, if a task in the initial task sequence instructs to rename a resistor, and after judgment, the task is incomplete, then according to the annotation information in its corresponding script interface information, it is determined that the task lacks the "new name of the resistor", and the generated supplementary requirement prompt information can prompt the user to supplement the requirement content with "What is the new name of the resistor".

[0072] Optionally, after the large language model agent outputs the supplementary requirement prompt information, it sends the supplementary requirement prompt information to the user and receives supplementary requirement information input by the user based on the supplementary requirement prompt information. The supplementary requirement information corresponds to an incomplete task in the initial task sequence. By combining the supplementary requirement information with the incomplete task, a complete task can be obtained. The complete task can be used to match the script interface, so that the EDA software calls the script based on the script interface to execute the user requirement.

[0073] Optionally, after obtaining the supplementary requirements information input by the user, the large language model agent can merge the design requirements information and the supplementary requirements information, and re-perform global planning and task decomposition to obtain a new task sequence. The agent then continues to determine whether the design requirements are complete based on the new task sequence and script interface information, and subsequent steps until the design requirements corresponding to the new task sequence are determined to be complete. This task sequence is then used as the target task sequence.

[0074] It is worth noting that if multiple supplementary requirement information is obtained from the user, it is necessary to re-decompose the task and plan based on the design requirement information and all the supplementary requirement information to obtain a new task sequence.

[0075] In this embodiment, the design requirement information is subjected to task decomposition and planning to obtain an initial task sequence, thereby determining the framework for calling the script interface. The design requirement is then determined to be complete based on the initial task sequence and the script interface information. If incomplete, a supplementary requirement prompt is output and supplementary requirement information sent by the user is obtained. Task decomposition and planning are then re-performed based on the supplementary requirement information and the design requirement information until the design requirement is complete and the target task sequence is obtained. In this embodiment, determining whether the design requirement is complete and obtaining the user's supplementary requirement information ensures that the EDA software can successfully call the script through the script interface, thereby executing the user's required actions.

[0076] Next, refer to Figure 4 The specific steps of determining whether the design requirements are complete according to the initial task sequence and script interface information in step S302 are introduced. Figure 4 This is a flowchart of a method for determining whether a design requirement is complete, as provided in an embodiment of the present application.

[0077] S401 , traversing each task in the initial task sequence, and for the traversed current task, determining a target script interface corresponding to the current task according to the semantic information of the current task and the functional information of each script interface.

[0078] Optionally, the semantic information of the current task can be obtained by following the process of vector representation and task adaptation.

[0079] Optionally, after understanding the semantics of the current task, the current task can be mapped to a pre-stored script interface based on the functional information of each script interface. Specifically, the current task and script interface can be converted into vectors, and the cosine similarity between the vectors can be calculated. The script interface with the highest similarity can be used as the target script interface for the current task.

[0080] For example, getting the top-level components can correspond to the target script interface: getComponents(layer="Top"), filtering the resistors can correspond to the target script interface: filterComponents(components, footprint="0402",type="Resistor"), moving the components can correspond to the target script interface: moveComponents(components, targetRegion), modifying the resistance value, specifically, changing the original value to 1.05 times the original value, can correspond to the target script interface: modifyParameter(components, param="resistance", value="original*1.05"), and saving the design can correspond to the target script interface: saveDesign().

[0081] S402: Compare the parameter information and return information of the target script interface with the current task to determine whether the current task is complete. If not, record the information to be supplemented in the current task.

[0082] Specifically, the parameter information and return information of the target script interface may be sequentially compared with the current task. If the current task lacks the information indicated in the parameter information of the script interface, it is determined that the current task is incomplete.

[0083] The information to be supplemented may be parameter information in the target script interface and information that is required as indicated by the return information but does not exist in the current task.

[0084] S403: After the initial task sequence traversal is completed, determine whether there are incomplete tasks. If so, determine that the design requirements are incomplete.

[0085] Optionally, if there is an incomplete task in the initial task sequence, the design requirement is incomplete. If the design requirement is incomplete, supplementary requirement prompt information corresponding to the design requirement information is generated according to the to-be-supplemented information corresponding to each task.

[0086] In this embodiment, the target script interface corresponding to each task is determined based on the meaning information of each task in the initial task sequence and the functional information of each script interface, and whether each corresponding task is complete is judged based on the parameter information and return information of the target script interface, thereby ensuring that the EDA software can directly execute user requirements according to the target task sequence without having to re-ask the user for incomplete information, thereby improving execution efficiency.

[0087] Further, refer to Figure 5 , the specific execution method of outputting the supplementary requirement prompt information according to the script interface information in the above step S304 is introduced. Figure 5 This is a flow chart of outputting supplementary requirement prompt information provided by an embodiment of the present application.

[0088] S501: Acquire each task to be supplemented and its to-be-supplemented information, wherein the task to be supplemented is an incomplete task in the initial task sequence.

[0089] Specifically, in the above step S402, it is determined whether the current task is complete. If the current task is incomplete, the current task is a task to be supplemented, and the information to be supplemented in the current task is used as the information to be supplemented of the task to be supplemented.

[0090] S502: Generate question keywords based on the information to be supplemented of the task to be supplemented.

[0091] Specifically, the question keywords are keywords that generate information required to complete the task to be supplemented. The question keywords can be natural language.

[0092] S503: Question keywords as supplementary demand prompt information.

[0093] Optionally, all question keywords corresponding to the tasks to be supplemented are integrated to obtain supplementary demand prompt information, and the supplementary demand prompt information is sent to the user so that the user can input supplementary demand information according to the supplementary demand prompt information.

[0094] In this embodiment, by generating question keywords as supplementary requirement prompt information based on the information to be supplemented of the task to be supplemented, a target task sequence that can be fully executed is output in the large language module agent processing stage, thereby improving execution efficiency.

[0095] After determining the target task sequence, refer to Figure 6 This section describes how to generate target execution flow information based on script interface information and target task sequence. Figure 6 This is a flow chart of generating target execution flow information provided by an embodiment of the present application.

[0096] S601: Determine the script interface corresponding to each task in the target task sequence.

[0097] Optionally, in the above step S401, before determining whether each task is complete, the target script interface corresponding to each task has been determined based on the semantic information of each task and the functional information of each script interface. After determining the target task sequence, the script interface corresponding to each task in the sequence is still the determined target script interface.

[0098] S602. Generate script interface call statements for each task through the target model according to the parameters of each task, and combine the script interface call statements corresponding to each task into initial execution flow information according to the order of each task in the target task sequence, and perform constraint check on the initial execution flow information. If the result of the constraint check is that the constraint conditions are met, the initial execution flow information is used as the target execution flow information. Otherwise, the initial execution flow information is iteratively corrected according to the result of the constraint check until the corrected execution flow information meets the constraint conditions.

[0099] The parameters of each task may include the semantic information of each task, annotation information of the corresponding script interface, and parameters of other tasks in the task sequence.

[0100] Optionally, the execution flow sent to the EDA software is composed of script interface call statements of each task.

[0101] Specifically, the parameters of each task are input into the target model. The target model can determine the association relationship between each task and other tasks according to the parameters of each task, and determine the target call statement based on the association relationship, the semantic information of each task and the script interface, and generate the script interface call statement of each task.

[0102] Optionally, the script interface call statement for each task consists of the target script interface corresponding to each task and the call statement corresponding to the interface, or it can be composed directly of the script interface. For example, the script interface is Get_Current_Page_ID(), and the script interface call statement can be page_id = Get_Current_Page_ID(), which is used to call Get_Current_Page_ID() to obtain the identifier of the currently active schematic page (page_id). The script interface is Get_All_Pin_ID_In_SCH(page_id), and the script interface call statement can be pin_ids = Get_All_Pin_ID_In_SCH(page_id), which is used to call Get_All_Pin_ID_In_SCH(page_id), pass in the page ID, and obtain the unique identifier list (pin_ids) of all pins on the page. The script interface is Set_Pin_Net_By_PinName(pin_ids) The script interface call statement can be Set_Pin_Net_By_PinName(pin_ids), which is used to call Set_Pin_Net_By_PinName(pin_ids), pass in the pin ID list, and set the network (Net) properties of these pins to the same value as the pin name (PinName).

[0103] Optionally, after the target model outputs the initial execution flow information, a constraint check is performed on the initial execution flow information.

[0104] Optionally, type conditions for parameters in the execution flow can be pre-established, and the type of each parameter in the initial execution flow information can be verified to see whether it satisfies the type conditions. For example, the type condition can be: the resistance value must be a numeric type.

[0105] Furthermore, the constraint relationship between parameters can be pre-modeled, for example, the moving distance must be greater than 0. After the above parameter types meet the conditions, the constraint relationship is checked based on a backtracking algorithm or a local search solution.

[0106] Optionally, the constraint conditions may include, for example, parameter type conditions of the script interface, execution order conditions of each script interface call statement, and dependency relationships of each script interface call statement.

[0107] Optionally, the target execution flow information is a script executable by the EDA software.

[0108] As an optional implementation, if the result of the constraint check does not meet the constraint conditions, the call statements that do not meet the conditions in the initial execution flow information are determined based on the result of the constraint check, and the call statements that do not meet the conditions are corrected according to the pre-set constraint correction strategy. After correction, it is continued to be determined whether the corrected execution flow meets the constraint conditions until the corrected execution flow meets the constraint conditions.

[0109] As another optional implementation, if the result of the constraint check does not meet the constraint conditions, the result of the constraint check and the target execution flow information are sent to the user so that the user can correct the target execution flow information, and the corrected execution flow sent by the user is received and sent to the EDA software for execution.

[0110] In this embodiment, a script interface call statement for each task is generated through the target model according to the parameters of each task, and after the initial execution flow information is generated according to the order of each task in the target task sequence, a constraint check is performed on the initial execution flow information so that the EDA software can smoothly perform script calls according to the received execution flow information to avoid parameter errors and the like.

[0111] Next refer to Figure 7 The specific steps of checking the constraints on the initial execution flow information in step S604 are introduced. Figure 7 This is a flowchart of a constraint check provided in an embodiment of the present application.

[0112] S701: Determine whether the parameters of each statement in the initial execution flow information meet the parameter type of the corresponding script interface.

[0113] The parameter information of the annotation information in the script interface information includes the parameter type. If the type of the statement parameter does not meet the parameter type of the corresponding target script interface, it means that the result of the constraint check does not meet the constraint condition.

[0114] S702: Determine whether the execution order of each statement in the initial execution flow information is feasible.

[0115] Optionally, the execution order of each statement in the initial execution flow information is the order in which the EDA software calls the script interface, and whether the execution order of each statement is feasible can be determined by a preset script calling order logic.

[0116] S703: Determine whether there is any contradiction in the dependency relationships between the statements.

[0117] Alternatively, the dependency can be a causal relationship. Specifically, the success of the preceding statement is a prerequisite for the subsequent operation, for example, if saveDesign depends on all previous statements, and the input of the subsequent statement depends on the output of the preceding statement, for example, modifyParameter depends on the result of filterComponents.

[0118] It is worth noting that the above steps S701-S703 may not be executed in any order. That is to say, when the parameters of each statement meet the parameter type of the corresponding script interface, and the execution order of each statement in the initial execution flow information is feasible, and there is no contradiction in the dependency relationship between the statements, then the result of the constraint check meets the constraint conditions.

[0119] In this embodiment, by determining whether the parameters in the initial execution flow information meet the parameter types of the script interface, whether the execution order of each statement is feasible, and whether there are any conflicts in the dependency relationship, it is ensured that the target execution flow information can be executed smoothly.

[0120] As an optional implementation, the target execution flow information may be input into the EDA software in step S203 as follows.

[0121] Optionally, a confirmation prompt message is output.

[0122] Optionally, the confirmation prompt information may include target execution flow information and a confirmation prompt word, which is used to inquire whether the user approves the generated target execution flow information.

[0123] Optionally, if a confirmation instruction input by the user is received, the target execution flow information is input into the EDA software; otherwise, the user's design requirement information is re-acquired and the target execution flow information is re-generated.

[0124] Optionally, if the user approves the target execution flow information, a confirmation instruction is output.

[0125] As an optional implementation, the newly acquired design requirement information may be supplemented with constraint information compared to the initial design requirement information, so that the regenerated target execution flow information can meet user requirements.

[0126] In this embodiment, confirmation prompt information is output to prompt the user for confirmation, thereby ensuring that the execution result obtained by executing the EDA software meets the user's needs.

[0127] Next, refer to Figure 8 This paper introduces the overall process of the script processing method of EDA software. Figure 8 This is a flowchart of another EDA software script processing method provided in an embodiment of the present application.

[0128] S801. Obtain design requirement information; S802, determining an initial task sequence; S803: Determine whether the design requirements are complete. If so, execute S805; if not, execute S804. S804: Output supplementary demand prompt information, obtain supplementary demand information, and re-execute S802; S805, taking the initial task sequence as the target task sequence; S806, determining the script interface corresponding to each task in the target task sequence; S807, determining the script call statement corresponding to each task; S808, determining initial execution flow information; S809: Determine whether the result of the constraint check of the initial execution flow information meets the constraint condition. If so, execute S811; if not, execute S810; S810, iteratively correcting the initial execution flow information according to the result of the constraint check, and re-executing S809; S811, using the initial execution flow information as the target execution flow information; S812: Output confirmation prompt information and determine whether a confirmation instruction input by the user is received. If so, execute S813; if not, execute S814; S813. Input the target execution flow information into the EDA software, which calls the scripts in sequence to execute the user's design requirements and outputs the execution results to the user work interface for display.

[0129] S814: Re-acquire the user's design requirement information and execute S802.

[0130] Next, refer to Figure 9 The training process of the target model mentioned in the above embodiment is introduced. Figure 9 This is a schematic diagram of the training process of a target model provided in an embodiment of the present application.

[0131] It is worth noting that when applied to different EDA software for script processing, the target model can be trained once. By integrating the current EDA software environment characteristics and the autonomous learning process of the specific script language, the accuracy of the output results of the large language model agent can be improved, thereby improving the cross-environment adaptability of the target model.

[0132] S901. Obtain pre-configured learning corpus, where the learning corpus at least includes text information of a scripting language of an EDA software.

[0133] The text information of the EDA software script language may be, for example, a description document of the EDA software script language, existing script information, a teaching document of the script language, etc. The format of the text information may be, for example, a plain text file or a Portable Document Format (PDF) file.

[0134] Optionally, the file path of the learning corpus can be pre-written into a configuration file by the user.

[0135] S902: Divide the learning corpus into blocks to obtain multiple text blocks.

[0136] Optionally, based on the word segmentation mechanism, the learning corpus is processed separately according to a preset number of semantic units. Each text block contains a preset number of semantic units. For example, a text block includes 8192 semantic units.

[0137] Optionally, the above steps S901 and S902 are a text preprocessing stage. After this stage is completed, the model training stage is entered.

[0138] S903. Based on the large language model in the initial model, generate multiple question-answer pairs according to the pre-configured number of question-answer pairs and multiple text blocks. The question-answer pairs include: system prompt words, context information, questions, and answers corresponding to the questions.

[0139] Specifically, the initial model includes a large language model and initial low-rank adaptation parameters. The large language model sequentially reads each text block and generates multiple question-answer pairs based on the number of question-answer pairs and the number of text blocks. A question-answer pair consists of a system prompt, contextual information, a question, and the corresponding answer. The system prompt determines the style, format, and professional boundaries of the answer. The contextual information provides context for the question, influencing the detail and relevance of the answer. The question defines the core content and purpose of the answer. The answer integrates the information from the first three to generate the final result.

[0140] For example, the system prompt word, context information, question, and answer in the question-answer pair may be: System prompt: You are an EDA software scripting expert. Please answer the question about scripting languages ​​accurately based on the context provided. Use only the information in the context.

[0141] Context information: PCB design software provides the following script APIs to operate package elements: delete_allfootprints_in_pcb(): delete all package elements in the PCB; delete footprint by name(name): delete the package with the specified name; get all footprints0: get a list of all packages The delete all footprints in pcb() function does not require any parameters and will automatically traverse and delete all footprint elements in the PCB file.

[0142] Question: How to use a script to delete all footprint elements in a PCB file? Answer: In order to delete all footprint elements in the PCB file, we can use the following script `delete_all footprints_in_pcb().

[0143] S904: Based on the group relative strategy optimization algorithm, iteratively correct the low-rank adaptation parameters in the initial model according to the answers to multiple questions to obtain the target model.

[0144] Optionally, the generated multiple question-answer pairs can be pre-divided according to a preset partitioning ratio to obtain a training set and a validation set. The training set is used for weight training of the low-rank adaptation parameters, and the validation set is used to evaluate the training effect and determine the training termination condition. For example, when the validation set loss value continues to increase in two consecutive training rounds, training is terminated. If the validation set loss value does not continue to increase in two consecutive training rounds, training is continued.

[0145] After obtaining the target model, the target model is deployed to generate the execution flow information corresponding to the current EDA software.

[0146] Next, the specific steps of how to obtain the target model are introduced, specifically, how to iteratively correct the low-rank adaptation parameters included in the target model are introduced.

[0147] Among them, the Group Relative Policy Optimization (GRPO) algorithm is an information reinforcement algorithm. The core of this algorithm is to encourage large language models to make full use of their existing capabilities to acquire new capabilities, thereby having the ability to learn independently.

[0148] Figure 10 This is a schematic diagram of another target model training process provided by the embodiment of the present application. Figure 10 ,The specific training steps of the target model are as follows: first, the system prompt words, ,context information and questions in multiple question-answer pairs are used as the ,input of the initial model. The initial model generates multiple candidate answers ,based on the input, thereby forming an answer set.

[0149] Next, the answers in the answer set are evaluated for quality and feedback is provided.

[0150] Specifically, a large language model is used to evaluate the quality of each answer in the generated answer set. For answers that meet expectations, a positive reward of appropriate strength is applied based on their accuracy, thereby improving the probability distribution of the model generating high-quality answers. For answers that deviate from expectations, a negative penalty is applied based on the degree of error, reducing the probability of the model generating such answers.

[0151] Optionally, the above-mentioned quality evaluation and feedback are implemented in parameters through the GRPO algorithm as follows: During the initial low-rank adaptation (LoRA) parameter update process, the optimization objective function is defined as maximizing the expected value of the following formula (1): (1) in, , Indicates the model parameters that need to be updated, that is, the weight parameters in LoRA, represents the training dataset, represents one of the training data, namely the training data consisting of a set of system prompt words, context information and questions, Represents the number of candidate answers generated for a certain training data, Indicates the Candidate answers, Represents the initial model, which consists of the large language model and the LoRA parameters of the current stage. Indicates the generated Answer No. The reward or punishment of a semantic unit, and Has the same structure, with updated LoRA parameters and large language model, Represents a large language model, and is a constant hyperparameter, Represents KL divergence, which is used to limit the LoRA parameters from deviating too much from the large language model during the optimization process, thereby preventing the knowledge of the original model from being forgotten. , it is possible to let the initial model learn the corpus knowledge in the corpus and obtain the target model.

[0152] Next, the process of using the updated model to evaluate the quality of each answer in the generated answer set is introduced.

[0153] Optionally, when the target model generates multiple candidate answers for a single piece of training data, each candidate answer needs to be evaluated for quality and rewarded or penalized accordingly. Each question-answer pair includes the answer corresponding to each question, which is used as the standard answer. A quantitative evaluation system is established based on the standard answer in the question-answer pair.

[0154] As an optional implementation, the quality assessment mechanism follows the basic principle of positive rewards and negative penalties, where the answer to the question-answer pair serves as an important reference but not the sole basis for judgment. Optionally, the quality assessment mechanism can be implemented using the large language model in the target model. It is worth mentioning that during the training process of the target model, the large language model in the initial model is not modified. Instead, only the LoRA parameters in the initial model are iteratively modified to obtain the target model.

[0155] For example, when the candidate answer is close to the standard answer, 3 points are added; when part of the candidate answer conforms to the standard answer, 2 points are added; when the candidate answer differs greatly from the standard answer, but the generated execution flow is derived from the context information, 0.5 points are added; when the candidate answer is completely different from the standard answer and is not atomic from the context information, 2 points are subtracted.

[0156] By training the initial model, the target model has improved its execution flow generation capabilities, accurately understanding and executing user design requirements. It also improves its ability to extract relevant information from contextual information and internalizes the model's ability to convert scripting knowledge from current EDA software. Compared to the initial model, the target model's corpus-based autonomous learning capabilities have enhanced its ability to solve user problems and improve the accuracy of its output execution flows.

[0157] As an optional embodiment, the present application also provides a method for intensive training of a target model. Specifically, during the script processing process of the EDA software, after obtaining the user's design requirement information, the large language model agent can generate multiple target execution flow information based on the script interface information and design requirement information of the EDA software. The large language model agent can select a target execution flow information from the multiple target execution flow information based on a pre-set selection strategy and send it to the EDA software, and receive execution feedback information generated by the EDA software based on the received target execution flow information. Among them, the execution feedback information is used to indicate whether the EDA software can meet the user's design requirement information by calling the script based on the received target execution flow information. The large language model agent determines whether the received execution feedback result meets the user's design requirement. If so, the target execution flow information is used as the standard answer, and the information in the generated multiple target execution flow information except the standard answer is used as a reference answer, and the user's design requirement information, standard answer and reference answer are stored. If the large language model agent determines that the received execution feedback result does not meet the user's design requirement, it reselects a target execution flow information from the generated multiple target execution flow information and sends it to the EDA software until the execution feedback result sent by the received EDA software meets the user's design requirement.

[0158] The above describes the process of the large language model agent executing a script processing. In actual use, the large language model agent records the process of each script processing. In the process of iteratively updating and training the target model in the large language model agent, the LoRA parameters in the target model are strengthened based on the user's design requirement information, standard answers, and reference answers stored each time. This allows the EDA software to quickly call the script according to the target execution flow information output by the large language model agent to meet the user's design requirements.

[0159] Based on the same inventive concept, the embodiment of the present application also provides a script processing device for EDA software corresponding to the script processing method of EDA software. Since the principle of solving the problem by the device in the embodiment of the present application is similar to the script processing method of the EDA software in the embodiment of the present application, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.

[0160] Reference Figure 11 , which is a structural diagram of a script processing device for EDA software provided in an embodiment of the present application, the device includes: an acquisition module 1101, a generation module 1102, and an execution module 1103; wherein, Acquisition module 1101, used to obtain user's design requirement information; A generating module 1102 is configured to generate target execution flow information based on the script interface information of the EDA software, the design requirement information, and the target model, wherein the script interface information includes: multiple script interfaces supported by the EDA software and annotation information of each script interface, wherein the annotation information includes: function information, parameter information, and return information of the script interface; and the target execution flow information is an execution sequence consisting of at least one script interface call statement. The execution module 1103 is used to input the target execution flow information into the EDA software, and the EDA software calls the scripts in sequence according to the order of the script interface call statements in the target execution flow information to execute the user's design requirements, and outputs the execution results to the user work interface for display.

[0161] Optionally, the generating module 1102 is specifically configured to: Determining a target task sequence according to the design requirement information and the script interface information; The target execution flow information is generated according to the script interface information and the target task sequence and based on the target model.

[0162] Optionally, the generating module 1102 is specifically configured to: Perform task decomposition planning based on the design requirement information to obtain an initial task sequence; Determining whether the design requirements are complete based on the initial task sequence and the script interface information; If yes, then taking the initial task sequence as the target task sequence; If not, the supplementary requirement prompt information is output according to the script interface information, the supplementary requirement information input by the user according to the supplementary requirement prompt information is obtained, and the task decomposition planning is re-performed according to the design requirement information and the supplementary requirement information to obtain a new task sequence, which is iteratively executed until the design requirements are complete, and the new task sequence is used as the target task sequence.

[0163] Optionally, the generating module 1102 is specifically configured to: Traversing each task in the initial task sequence, and for the traversed current task, determining a target script interface corresponding to the current task according to the semantic information of the current task and the functional information of each script interface; Comparing the parameter information and return information of the target script interface with the current task to determine whether the current task is complete; if not, recording the information to be supplemented in the current task; After the initial task sequence traversal is completed, it is determined whether there are incomplete tasks, and if so, it is determined that the design requirements are incomplete.

[0164] Optionally, the generating module 1102 is specifically configured to: Acquire each task to be supplemented and the to-be-supplemented information of each task to be supplemented, wherein the task to be supplemented is an incomplete task in the initial task sequence; Generate question keywords based on the information to be supplemented of the task to be supplemented; The question keywords serve as the supplementary demand prompt information.

[0165] Optionally, the generating module 1102 is specifically configured to: Determine the script interface corresponding to each task in the target task sequence; According to the parameters of each task, the script interface calling statements of each task are generated through the target model, and according to the order of each task in the target task sequence, the script interface calling statements corresponding to each task are combined into initial execution flow information, and the initial execution flow information is subjected to a constraint check. If the result of the constraint check is that the constraint conditions are met, the initial execution flow information is used as the target execution flow information. Otherwise, the initial execution flow information is iteratively corrected according to the result of the constraint check until the corrected execution flow meets the constraint conditions.

[0166] Optionally, the generating module 1102 is specifically configured to: Determining whether the parameters of each statement in the initial execution flow information meet the parameter type of the corresponding script interface; Determining whether the execution order of each statement in the initial execution flow information is feasible; Determine whether there are any conflicts in the dependencies between statements.

[0167] Optionally, the execution module 1103 is specifically configured to: Output confirmation prompt information; If a confirmation instruction input by the user is received, the target execution flow information is input into the EDA software; otherwise, the user's design requirement information is re-acquired and the target execution flow information is re-generated.

[0168] Optionally, the target model training process includes: Acquire pre-configured learning corpus, the learning corpus comprising at least: text information in the scripting language of the EDA software; Processing the learning corpus into blocks to obtain multiple text blocks; Based on the large language model in the initial model, generating multiple question-answer pairs according to a pre-configured number of question-answer pairs and the multiple text blocks, the question-answer pairs including: system prompt words, context information, questions, and answers corresponding to the questions; Based on the group relative strategy optimization algorithm, the low-rank adaptation parameters in the initial model are iteratively corrected according to the multiple question answers to obtain a target model.

[0169] For descriptions of the processing flow of each module in the device and the interaction flow between each module, reference can be made to the relevant descriptions in the above method embodiment, which will not be described in detail here.

[0170] The present application also provides an electronic device, such as Figure 12 FIG. 1 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application, comprising: a processor 1201, a memory 1202 and a bus. The memory 1202 stores machine-readable instructions executable by the processor 1201 (for example, Figure 11 In the device, the acquisition module 1101, the generation module 1102 and the execution module 1103 corresponding to the execution instructions, etc.), when the computer device is running, the processor 1201 communicates with the memory 1202 through a bus, and when the machine-readable instructions are executed by the processor 1201, the script processing method of the above-mentioned EDA software is executed.

[0171] An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the script processing method of the above-mentioned EDA software are executed.

[0172] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system and device described above can refer to the corresponding process in the method embodiment, and will not be repeated in this application. In the several embodiments provided in this application, it should be understood that the disclosed system, device and method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation. For example, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.

[0173] In addition, the functional units in the various embodiments of the present application can be integrated into a single processing unit, each unit can exist physically separately, or two or more units can be integrated into a single unit. If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in the various embodiments of the present invention. The aforementioned storage medium includes various media that can store program code, such as a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0174] The above is only a specific implementation method of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with this technical field can easily think of changes or replacements within the technical scope disclosed in this application, which should be covered by the protection scope of the present application.

Claims

1. A script processing method for EDA software, characterized in that: The method is applied to a large language model agent, the large language model agent including: a target model, and the method includes: Obtain user design requirement information; generating target execution flow information based on script interface information of the EDA software, the design requirement information, and the target model, wherein the script interface information includes: multiple script interfaces supported by the EDA software and annotation information of each script interface, the annotation information includes: function information, parameter information, and return information of the script interface, and the target execution flow information is an execution sequence consisting of at least one script interface call statement; The target execution flow information is input into the EDA software, and the EDA software calls the scripts in sequence according to the order of the script interface call statements in the target execution flow information to execute the user's design requirements, and outputs the execution results to the user work interface for display.

2. The script processing method of EDA software according to claim 1, characterized in that: Generating target execution flow information according to the script interface information of the EDA software, the design requirement information, and the target model includes: Determining a target task sequence according to the design requirement information and the script interface information; The target execution flow information is generated according to the script interface information and the target task sequence and based on the target model.

3. The script processing method of EDA software according to claim 2, characterized in that: Determining a target task sequence according to the design requirement information and the script interface information includes: Perform task decomposition planning based on the design requirement information to obtain an initial task sequence; Determining whether the design requirements are complete based on the initial task sequence and the script interface information; If yes, then taking the initial task sequence as the target task sequence; If not, the supplementary requirement prompt information is output according to the script interface information, the supplementary requirement information input by the user according to the supplementary requirement prompt information is obtained, and the task decomposition planning is re-performed according to the design requirement information and the supplementary requirement information to obtain a new task sequence, which is iteratively executed until the design requirements are complete, and the new task sequence is used as the target task sequence.

4. The script processing method of EDA software according to claim 3, characterized in that: The determining whether the design requirements are complete according to the initial task sequence and the script interface information includes: Traversing each task in the initial task sequence, and for the traversed current task, determining a target script interface corresponding to the current task according to the semantic information of the current task and the functional information of each script interface; Comparing the parameter information and return information of the target script interface with the current task to determine whether the current task is complete; if not, recording the information to be supplemented in the current task; After the initial task sequence traversal is completed, it is determined whether there are incomplete tasks, and if so, it is determined that the design requirements are incomplete.

5. The script processing method of EDA software according to claim 4, characterized in that: Outputting the supplementary requirement prompt information according to the script interface information includes: Acquire each task to be supplemented and the to-be-supplemented information of each task to be supplemented, wherein the task to be supplemented is an incomplete task in the initial task sequence; Generate question keywords based on the information to be supplemented of the task to be supplemented; The question keywords serve as the supplementary demand prompt information.

6. The script processing method of EDA software according to claim 2, characterized in that: The step of generating the target execution flow information based on the target model according to the script interface information and the target task sequence includes: Determine the script interface corresponding to each task in the target task sequence; According to the parameters of each task, the script interface calling statements of each task are generated through the target model, and according to the order of each task in the target task sequence, the script interface calling statements corresponding to each task are combined into initial execution flow information, and the initial execution flow information is subjected to a constraint check. If the result of the constraint check is that the constraint conditions are met, the initial execution flow information is used as the target execution flow information. Otherwise, the initial execution flow information is iteratively corrected according to the result of the constraint check until the corrected execution flow information meets the constraint conditions.

7. The script processing method of EDA software according to claim 6, characterized in that: The performing constraint checking on the initial execution flow information includes: Determining whether the parameters of each statement in the initial execution flow information meet the parameter type of the corresponding script interface; Determining whether the execution order of each statement in the initial execution flow information is feasible; Determine whether there are any conflicts in the dependencies between statements.

8. The script processing method of EDA software according to any one of claims 1 to 7, characterized in that: The inputting the target execution flow information into the EDA software includes: Output confirmation prompt information; If a confirmation instruction input by the user is received, the target execution flow information is input into the EDA software; otherwise, the user's design requirement information is re-acquired and the target execution flow information is re-generated.

9. The script processing method of EDA software according to claim 1, characterized in that: The training process of the target model includes: Acquire pre-configured learning corpus, the learning corpus comprising at least: text information in the scripting language of the EDA software; Processing the learning corpus into blocks to obtain multiple text blocks; Based on the large language model in the initial model, generating multiple question-answer pairs according to a pre-configured number of question-answer pairs and the multiple text blocks, the question-answer pairs including: system prompt words, context information, questions, and answers corresponding to the questions; Based on the group relative strategy optimization algorithm, the low-rank adaptation parameters in the initial model are iteratively corrected according to the multiple question answers to obtain a target model.

10. An electronic device, characterized in that: include: A processor and a memory, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor executes the machine-readable instructions to perform the steps of the script processing method of the EDA software as described in any one of claims 1 to 9.