AI-enabled cadence skill automation development method and system
Patent Information
- Application Number
- CN202611032004.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-13
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2046-07-13
AI Technical Summary
[0003]相关技术中,PCB设计软件的Skill语言开发方式依赖基础文本编辑器进行编码,缺乏代码补全和语法高亮等现代开发工具支持,调试过程需要手动在软件环境中重复加载测试,错误定位依赖开发者经验,单次测试迭代耗时较长
[0015]本公开实施例通过构建自动化代码生成、测试验证和纠错修复的闭环流程,实现从手工编码、手动加载、人工查错、手动修复的处理流程到自动编码、自动生成启动脚本、自动加载验证、智能日志分析、自动纠错修复的处理流程的转变,显著提升开发效率和代码质量。
Smart Images

Figure CN122653607B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of electronic design automation technology, and more specifically, to an AI-enabled CadenceSKILL automated development method and an AI-enabled CadenceSKILL automated development system. Background Technology
[0002] Secondary development technology for printed circuit board (PCB) design software is widely used in the field of electronic design automation to realize customized functional expansion and automated processing of PCB design flow.
[0003] In related technologies, the Skill language development method of PCB design software relies on basic text editors for coding, lacks support from modern development tools such as code completion and syntax highlighting, requires manual repeated loading and testing in the software environment during the debugging process, and error localization depends on the developer's experience, with each test iteration taking a long time. Summary of the Invention
[0004] One objective of this invention is to provide a new technical solution for an AI-enabled Cadence SKILL automated development method and system.
[0005] According to a first aspect of the present invention, an AI-enabled Cadence SKILL automated development method is provided, comprising: In response to a user's code development request entered through the command-line interface, a first code script file including the first target code is generated based on the code generator. Generate a startup script file based on the first code script file; Close all currently running circuit board design software processes and invoke the circuit board design software, controlling the circuit board design software to load and run the first target code based on the startup script file; Obtain the log file generated by the circuit board design software and the loading and execution result information of the first target code; Based on the log file and the loading and execution result information of the first target code, a first identification result is determined to determine whether the first target code has an error; If the first identification result indicates that the first target code has an error, the first target code is repaired based on the code generator to generate a second code script file including the second target code.
[0006] Optionally, generating a first code script file including the first target code based on the code generator includes: Based on the circuit board design software knowledge base, the system retrieves prompt words related to the generation of the target code. These prompt words include the circuit board design software version information, the circuit board design software unit system, and the API function signature information. Based on the sample code library, retrieve tested and verified code related to the code development request; Based on the prompt information and the tested and verified code related to the code development request, a first target code is generated, and a first code script file is generated based on the first target code.
[0007] Optionally, generating the startup script file based on the first code script file includes: Extract the loading command for loading the first target code and the startup command for starting the first target code from the first code script file; Based on the script example library, obtain a standard template for the startup script file; The startup script file is generated based on the standard template of the loading command, the startup command, and the startup script file.
[0008] Optionally, if the first identification result indicates that the first target code has an error, the identification result includes the error type and the error line number.
[0009] Optionally, the step of repairing the first target code based on the code generator to generate a second code script file including the second target code includes: Based on the code repair database, the repair strategy corresponding to the target error is obtained by querying. The target error matches the error that occurred in the first target code with a degree greater than a set threshold. The code repair database includes an error mode record library and a repair plan library. The error mode record library is used to store the correspondence between error types, error root causes and repair strategies that occurred during the historical code development process. The repair plan library is used to record the code repair step sequence and repair verification results in each repair strategy. Based on the circuit board design software knowledge base, the system retrieves prompt words related to the generation of the target code. These prompt words include the circuit board design software version information, the circuit board design software unit system, and the API function signature information. Based on the repair strategy corresponding to the target error and the prompt word information, the first target code is repaired to generate a second code script file including the second target code.
[0010] Optionally, the method further includes: A second identification result is determined based on the second code script file to determine whether the second target code contains an error; If the second identification result indicates that the second target code has no errors, the second target code corresponding to the code development request is written into the example code library, and the error type, root cause, and corresponding repair strategy of the first target code are determined. The correspondence between the error type, root cause, and repair strategy of the first target code is written into the error pattern record library, and the code repair step sequence and repair verification results in the repair strategy of the first target code are written into the repair plan library. The error pattern record library and the repair plan library constitute the code repair database.
[0011] Optionally, the method further includes: providing a code editor interface and a circuit board design software display interface, wherein the code editor interface is used to display code entered by the user or code generated based on the code generator, and the circuit board design software display interface is used to display the loading and running result information of the first target code.
[0012] According to a second aspect of the present invention, an AI-enabled Cadence SKILL automated development system is provided, comprising a user interaction layer, a code generation layer, and an execution layer, wherein, The user interaction layer provides a command-line interface, which is used to receive code development requests input by the user and send the code development requests to the code generation layer. The code generation layer includes a code generator, which is used to generate a first code script file including a first target code based on the code development request; The execution layer is used to generate a startup script file based on the first code script file, close all currently running circuit board design software processes based on the startup script file, call the circuit board design software, control the circuit board design software to load and run the first target code, obtain the log file generated by the circuit board design software and the loading and running result information of the first target code, and determine whether the first target code has an error based on the log file and the loading and running result information of the first target code, and send the first identification result to the code generation layer; The code generation layer is used to repair the first target code based on the code generator when the first identification result indicates that the first target code has an error, and generate a second code script file including the second target code.
[0013] Optionally, the system further includes a knowledge base layer, wherein the knowledge base layer includes a circuit board design software knowledge base and a sample code library. The code generator is used to query the circuit board design software knowledge base to obtain prompt words information about the target code generation. The prompt words information includes circuit board design software version information, circuit board design software unit system and API function signature information. Based on the sample code library, retrieve tested and verified code related to the code development request; Based on the prompt information and the tested and verified code related to the code development request, a first target code is generated, and a first code script file is generated based on the first target code.
[0014] Optionally, the system further includes a knowledge base layer, wherein the knowledge base layer includes a code repair database and a sample code database, and the code repair database includes an error mode record database and a repair plan database. The code generation layer is used to determine a second identification result based on the second code script file to determine whether the second target code has an error; if the second identification result is that the second target code has no error, the second target code corresponding to the code development request is written into the example code library, and the error type, error root cause and corresponding repair strategy of the first target code are determined, and the correspondence between the error type, error root cause and repair strategy of the first target code is written into the error mode record library, and the code repair step sequence and repair verification result in the repair strategy of the first target code are written into the repair plan library.
[0015] This disclosure embodiment achieves a transformation from a manual coding, manual loading, manual error checking, and manual repair process to an automated coding, automated startup script generation, automated loading and verification, intelligent log analysis, and automated error correction and repair process by constructing a closed-loop process of automated code generation, testing and verification, and error correction and repair, which significantly improves development efficiency and code quality.
[0016] The features and advantages of the embodiments of this specification will become clear from the following detailed description of exemplary embodiments with reference to the accompanying drawings. Attached Figure Description
[0017] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments of this specification and, together with their description, serve to explain the principles of these embodiments.
[0018] Figure 1 This is a schematic diagram of the structure of an electronic device according to some embodiments.
[0019] Figure 2 This is a flowchart of the AI-enabled Cadence SKILL automated development method based on some embodiments.
[0020] Figure 3 This is a schematic diagram of the structure of the AI-enabled Cadence SKILL automated development system according to some embodiments.
[0021] Figure 4 This is a schematic diagram of the structure of the AI-enabled Cadence SKILL automated development system according to some other embodiments.
[0022] Figure 5 This is a schematic diagram of the structure of an electronic device according to some embodiments. Detailed Implementation
[0023] Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that, unless otherwise specifically stated, the relative arrangement, numerical expressions, and values of the components and steps set forth in these embodiments do not limit the scope of the present disclosure.
[0024] The following description of at least one exemplary embodiment is merely illustrative and is not intended to limit the scope of this disclosure or its application or use.
[0025] Techniques, methods, and equipment known to those skilled in the art may not be discussed in detail, but where appropriate, such techniques, methods, and equipment should be considered part of the specification.
[0026] In all the examples shown and discussed herein, any specific values should be interpreted as merely exemplary and not as limitations. Therefore, other examples of exemplary embodiments may have different values.
[0027] It should be noted that similar labels and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be discussed further in subsequent figures.
[0028] This disclosure relates to an IDE-integrated CLI-enabled AI-enabled Cadence SKILL automated development methodology. IDE stands for Integrated Development Environment. It packages all the core tools needed in the software development (or hardware design) process into a single graphical interface software. Cadence SKILL is a programming language specifically developed for Electronic Design Automation (EDA) software suites. The code described in this disclosure is program code written in this language.
[0029] Figure 1This is a schematic diagram of an electronic device capable of applying the AI-enabled Cadence SKILL automated development method according to embodiments of this disclosure. The electronic device 1000 is a device capable of running computer programs, which may be local applications installed on a head-mounted device, or web applications, lightweight applications, or mini-programs, etc., without limitation herein. The electronic device 1000 may be a mobile phone, tablet computer, laptop computer, server, etc., without limitation herein.
[0030] like Figure 1 As shown, the electronic device 1000 may include a processor 1100, a memory 1200, an interface device 1300, a communication device 1400, an input device 1500, a display device 1600, etc. Figure 1 The hardware configuration shown is illustrative only and is not intended to limit this disclosure, its application, or its use.
[0031] The processor 1100 executes computer programs, which can be written using instruction sets of architectures such as x86, Arm, RISC, MIPS, and SSE. The memory 1200 includes, for example, ROM (Read-Only Memory), RAM (Random Access Memory), and non-volatile memory such as a hard disk. The interface device 1300 includes, for example, a USB interface, a network cable interface, and a headphone jack. The communication device 1400 is capable of wired or wireless communication. The communication device 1400 may include at least one short-range communication module, such as any module for short-range wireless communication based on protocols such as Hilink, WiFi (IEEE 802.11), Mesh, Bluetooth, ZigBee, Thread, Z-Wave, NFC, UWB, and LiFi. The communication device 1400 may also include a long-range communication module, such as any module for WLAN, GPRS, or 2G / 3G / 4G / 5G long-range communication. The input device 1500 may include, for example, a touchscreen, a keyboard, a microphone, and various sensors. The output device 1600 may include, for example, an LCD screen or a touchscreen display.
[0032] The development of circuit board design software scripts for related technologies suffers from outdated development environments and low debugging efficiency. Developers rely on basic text editors for coding, lacking code completion and syntax highlighting support. Each test requires manual reloading within the circuit board design software environment, error messages are not intuitive, debugging heavily depends on developer experience, and each test iteration is time-consuming.
[0033] Therefore, the embodiments of this disclosure achieve a transformation from a process of manual coding, manual loading, manual error checking, and manual repair to a process of automatic coding, automatic startup script generation, automatic loading verification, intelligent log analysis, and automatic error correction and repair by constructing a closed-loop process of automated code generation, testing and verification, and error correction and repair, which significantly improves development efficiency and code quality.
[0034] The following combination Figure 1 The illustrated electronic device demonstrates the AI-enabled Cadence SKILL automated development method provided in this disclosure.
[0035] <First Embodiment> Figure 2 This is a flowchart illustrating an AI-enabled Cadence SKILL automated development method based on some embodiments. For example... Figure 2 As shown, the method may include steps S210 to S260.
[0036] Step S210: In response to the code development request entered by the user through the command line interface, a first code script file including the first target code is generated based on the code generator.
[0037] Users can input code development requests through the command-line interface (CLI). After receiving the request, the code generator queries the circuit board design software knowledge base and sample code library to obtain prompts and code examples, and generates a first code script file containing the first target code.
[0038] A code development request can be either a code generation request or a code modification request. When a code development request is a code modification request, the code to be modified can be user-inputted code or code generated by a code generator.
[0039] In some examples, step S210 may include steps S2111 to S2113.
[0040] Step S2111: Based on the circuit board design software knowledge base, query the prompt word information about the target code generation. The prompt word information may include the circuit board design software version information, the circuit board design software unit system, and the API function signature information.
[0041] The code generator can query hints related to code development requests from the PCB design software knowledge base. These hints can be injected as context into the code generator's hints to ensure that the generated code conforms to the PCB design software specifications.
[0042] Step S2112: Based on the sample code library, retrieve the tested and verified code related to the code development request.
[0043] The tested and verified code associated with the code development request is code that has successfully run during the historical development process and can be provided to the code generator as a reference example.
[0044] Step S2113: Generate first target code based on the prompt word information and the tested and verified code related to the code development request, and generate a first code script file based on the first target code.
[0045] The first target code includes all the functional logic required to implement the code development request.
[0046] By following the steps above, we can ensure that the code generated by the code generator has high accuracy and usability, and improve the first-run success rate of the code.
[0047] Step S220: Generate a startup script file based on the first code script file.
[0048] In some examples, step S220 may include steps S2211 to S2213.
[0049] Step S2211: Extract the loading command for loading the first target code and the startup command for starting the first target code from the first code script file.
[0050] The load command is the instruction that loads the first code script file into the circuit board design software. The start command is the instruction used to execute the first target code.
[0051] For example, extract the loading command in the form of "skill_load("script_name.il")" from the first line of the first code script file, and extract the startup command name in the form of "printf(">>SKILL Loaded. Command: xxx")" from the last line.
[0052] Step S2212: Obtain a standard template for the startup script file based on the script case library.
[0053] Obtain a standard template for a startup script file from the script example library. The standard template defines the basic structure and necessary instructions for the startup script file.
[0054] Step S2213: Generate a startup script file based on the standard templates for the loading command, startup command, and startup script file.
[0055] Fill the extracted loading and startup commands into the corresponding placeholders in the standard template to generate a complete startup script file.
[0056] By following the steps above, the startup script file can be generated automatically, eliminating the tedious process of manually writing configuration files.
[0057] Step S230: Close all currently running circuit board design software processes and call up the circuit board design software, controlling the circuit board design software to load and run the first target code based on the startup script file.
[0058] The startup script file also includes instructions to close all currently running circuit board design software processes. Before invoking the circuit board design software and controlling it to load and run the first target code based on the startup script file, closing all currently running circuit board design software processes ensures that the subsequent loading and running of the first target code occurs in a clean environment, avoiding file locking or port conflicts caused by residual processes.
[0059] Step S240: Obtain the log file generated by the circuit board design software and the loading and running result information of the first target code.
[0060] Log files are used to record the running status of circuit board design software, script loading process, and error messages.
[0061] Step S250: Based on the log file and the loading and running result information of the first target code, determine whether the first target code has an error first identification result.
[0062] By analyzing log files and loading execution results using a pattern matching algorithm, errors can be identified in the primary target code. This algorithm can identify error patterns specific to the scripting languages used in circuit board design software, including syntax errors, runtime errors, system-level errors, registration failures, and misspelled command names. For example, the first type of error pattern might be a log line starting with "*Error*", corresponding to script syntax or runtime errors, such as parameter type mismatches or function call exceptions. The second type of error pattern might be a log line starting with the prefix "E-", corresponding to system-level errors in the circuit board design software, such as database operation failures or layer name non-existence. The third type of error pattern might be a log line containing the string "Command not found", corresponding to command registration failures or misspelled command names.
[0063] The initial identification results include the error type and the error line number. The error type indicates the pattern to which the error belongs. The error line number indicates the specific line number in the first code script file where the error occurred. This initial identification result, containing both the error type and the error line number, provides precise location information for subsequent error fixing.
[0064] In some examples, when the initial identification result indicates an error in the first target code, the complete error line and several preceding and following lines of context are extracted and encapsulated into a structured error object. The structured error object includes the error type, the original error text, the timestamp of occurrence, and the path to the current code script file. The original error text is a complete description of the error. The timestamp indicates the specific time the error occurred. The current code script file path indicates the location of the script file where the error occurred. By encapsulating this into a structured error object, complete contextual information can be provided for subsequent automatic repair.
[0065] Step S260: If the first identification result indicates that the first target code has an error, the first target code is repaired based on the code generator to generate a second code script file that includes the second target code.
[0066] If the initial identification result indicates an error in the first target code, a structured error object is passed to the code generation layer. The code generation layer analyzes the root cause of the error and generates corrected code, which is then automatically written into a second code script file to overwrite or replace the erroneous code segment.
[0067] In some examples, step S260 may include steps S2611 to S2613.
[0068] Step S2611: Based on the code repair database, query the repair strategy corresponding to the target error, wherein the matching degree between the target error and the error that occurred in the first target code is greater than a set threshold.
[0069] The code repair database stores errors that occurred during historical development and their corresponding repair strategies. It includes an error pattern record library and a repair plan library. The error pattern record library stores the correspondence between error types, root causes, and repair strategies that occurred during historical code development. The repair plan library records the sequence of code repair steps and the verification results for each repair strategy.
[0070] The degree of matching between any error and the error that occurred in the first target code can be determined based on the consistency of the error types of the two errors and the consistency of the root causes of the errors.
[0071] First, based on the target error, the corresponding repair strategy is retrieved from the error mode record library. Then, based on the corresponding repair strategy, the corresponding code repair step sequence and repair verification results are retrieved from the repair plan library.
[0072] Step S2612: Based on the circuit board design software knowledge base, query the prompt word information about the target code generation. The prompt word information may include the circuit board design software version information, the circuit board design software unit system, and API function signature information.
[0073] These prompts can be injected as context into the code generator's prompts to ensure that the code generated by the code generator conforms to the specifications of the circuit board design software.
[0074] Step S2613: Based on the repair strategy and prompt information corresponding to the target error, repair the first target code and generate a second code script file including the second target code.
[0075] Based on the repair strategy and prompt information, the first target code is repaired. Repair may include replacing erroneous function calls, adjusting parameter formats, correcting syntax errors, or adding missing error handling logic. The repaired code can then be used as the second target code and written into a second code script file.
[0076] By following the steps above, a repair strategy that references historical error patterns can be implemented, thereby improving repair efficiency and accuracy.
[0077] In some examples, the method may also include steps S271 and S272.
[0078] Step S271: Determine whether the second target code has an error based on the second code script file.
[0079] In this example, a second identification result is determined by repeating steps S220 to S250 to determine whether the second target code has an error.
[0080] Step S272: If the second identification result indicates that the second target code has no errors, the second target code corresponding to the code development request is written into the example code library. The error type, root cause, and corresponding repair strategy of the first target code are determined. The correspondence between the error type, root cause, and repair strategy of the first target code is written into the error pattern record library. The code repair step sequence and repair verification results in the repair strategy of the first target code are written into the repair plan library. The error pattern record library and the repair plan library constitute the code repair database.
[0081] In this example, if the second identification result indicates that the second target code has no errors, the second target code corresponding to the code development request is written into the sample code library as a verified reusable code snippet. Simultaneously, the correspondence between the error type, root cause, and remediation strategy of the first target code is written into the error mode record library, and the code remediation step sequence and remediation verification results in the remediation strategy of the first target code are written into the remediation plan library. This enables the automated accumulation and updating of the sample code library, error mode record library, and remediation plan library for subsequent development reference.
[0082] In some examples, when the second identification result still indicates an error in the second target code, step S260 can be repeated to repair the second target code and generate a third code script file including the third target code. This repair process can be iterated until the generated target code is successfully loaded and run without errors, or until the number of iterations for error correction and repair reaches a preset limit.
[0083] In some examples, two conditions can be monitored simultaneously. The loop of debugging and fixing the target code can be stopped immediately when both conditions are met. Condition one is the appearance of a string in the log file indicating that the target code has been successfully loaded into the circuit board design software. For example, the log file might contain a success message in the format "">>SKILL Loaded. Command: xxx". Condition two is that the corresponding target code can be called normally without error output.
[0084] In some examples, the method may also include providing a code editor interface and a circuit board design software display interface. The code editor interface can be used to display user-inputted code or code generated by a code generator. The circuit board design software display interface can be used to display the loading and running results of the first target code. By providing these interfaces, users can complete the entire process of code writing, testing, and result viewing within a single integrated development environment without frequently switching between multiple tool windows.
[0085] The above method enables a fully automated closed-loop process from code generation and testing to bug fixing. This method can significantly improve the efficiency and code quality of circuit board design software script development.
[0086] <Second Embodiment> This disclosure also provides an AI-enabled Cadence SKILL automated development system. For example... Figure 3 As shown, the system may include a user interaction layer 310, a code generation layer 320, and an execution layer 330.
[0087] User interaction layer 310 can provide a command-line interface. The command-line interface 3101 can be used to receive code development requests input by the user and send the code development requests to code generation layer 320.
[0088] The code generation layer 320 may include a code generator 3201, which can be used to generate a first code script file including a first target code based on a code development request.
[0089] Code Generator 3201 is an intelligent generator that integrates an artificial intelligence (AI) model.
[0090] The execution layer 330 can be used to generate a startup script file based on the first code script file, close all currently running circuit board design software processes based on the startup script file, call the circuit board design software, control the circuit board design software to load and run the first target code, obtain the log file generated by the circuit board design software and the loading and running result information of the first target code, and determine whether the first target code has an error based on the log file and the loading and running result information of the first target code, and send the first identification result to the code generation layer 320.
[0091] The code generation layer 320 can be used to repair the first target code based on the code generator 3201 when the first identification result indicates that the first target code has an error, and generate a second code script file including the second target code.
[0092] In some examples, such as Figure 4 As shown, the system may also include a knowledge base layer 340. The knowledge base layer 340 may include a circuit board design software knowledge base 3401 and a sample code library 3402.
[0093] Code generator 3201 can be used to query the circuit board design software knowledge base 3401 to obtain prompt information about target code generation. The prompt information may include circuit board design software version information, circuit board design software unit system, and API function signature information. Code generator 3201 can also be used to query the example code library 3402 to obtain tested and verified code related to the code development request. Code generator 3201 can generate first target code based on the prompt information and the tested and verified code related to the code development request, and generate a first code script file based on the first target code.
[0094] like Figure 4 As shown, the code generator 3201 includes a context understanding module 3201a, a knowledge base retrieval module 3201b, and a code generation module 3201c.
[0095] The context understanding module 3201a retrieves prompt words about target code generation from the circuit board design software knowledge base 3401. The knowledge base retrieval module 3201b retrieves tested and verified code related to the code development request from the example code library 3402. The code generation module 3201c generates the first target code based on the prompt words and the tested and verified code related to the code development request.
[0096] like Figure 4As shown, the execution layer 330 includes a script loading module 3301. The script loading module 3301 is used to generate a startup script file based on the first code script file, call the circuit board design software based on the startup script file, and control the circuit board design software to load and run the first target code.
[0097] like Figure 4 As shown, the knowledge base layer 340 may include a script case library 3403. The script loading module 3301 is used to extract a loading command for loading the first target code and a startup command for starting the first target code from the first code script file; obtain a standard template for the startup script file from the script case library 3403; and generate a startup script file based on the loading command, the startup command, and the standard template for the startup script file.
[0098] The execution layer 330 is also coupled to the circuit board design software through a configuration interface. By replacing the configuration interface adapter in the execution layer, the same code generation layer and knowledge base layer can be reused in multiple circuit board design software programs.
[0099] like Figure 4 As shown, the execution layer 330 also includes a log monitoring module 3302 and an error correction module 3303. The log monitoring module 3302 is used to obtain the log file generated by the circuit board design software and the loading and running result information of the first target code through this setting interface. The error correction module 3303 is used to determine whether the first target code has an error based on the log file and the loading and running result information of the first target code, and sends the first identification result to the code generation layer 320.
[0100] In some examples, such as Figure 4 As shown, the knowledge base layer 340 may also include a code repair database 3404. The code generator 3201 is used to query the code repair database 3404 to obtain the repair strategy corresponding to the target error, wherein the matching degree between the target error and the error occurring in the first target code is greater than a set threshold. The code repair database 3404 includes an error pattern record library 3404a and a repair plan library 3404b. The error pattern record library 3404a is used to store the correspondence between error types, root causes, and repair strategies that occurred during historical code development. The repair plan library 3404b is used to record the sequence of code repair steps and the repair verification results in each repair strategy. The generator 3201 queries the circuit board design software knowledge base 3401 to obtain prompt word information about target code generation, wherein the prompt word information includes circuit board design software version information, circuit board design software unit system, and API function signature information. Based on the repair strategy corresponding to the target error and the prompt word information, the generator repairs the first target code, generating a second code script file including the second target code.
[0101] In some examples, the execution layer 330 can be used to determine a second identification result based on the second code script file to determine whether the second target code has an error. If the second identification result indicates that the second target code has no error, the code generation layer 320 can write the second target code corresponding to the code development request into the example code library 3402, determine the error type, root cause, and corresponding repair strategy of the first target code, write the correspondence between the error type, root cause, and repair strategy of the first target code into the error mode record library 3404a, and write the code repair step sequence and repair verification results in the repair strategy of the first target code into the repair plan library 3404b.
[0102] In some examples, such as Figure 4 As shown, the user interaction layer 310 also provides a code editor interface 3102 and a circuit board design software display interface 3103. The code editor interface 3102 can be used to display user-inputted code or code generated by a code generator. The circuit board design software display interface 3103 can be used to display the loading and running results of the first target code. By providing these interfaces, users can complete the entire process of code writing, testing, and result viewing in a single integrated development environment without frequently switching between multiple tool windows.
[0103] The above system architecture enables collaborative work among the user interaction layer, code generation layer, knowledge base layer, and execution layer, building a fully automated closed-loop process from code generation to testing and verification to error correction.
[0104] <Third Embodiment> This embodiment provides an electronic device, which includes a memory and a processor. The memory stores a computer program for controlling the processor to operate in order to execute any method embodiment of this disclosure. Alternatively, the electronic device may be deployed with an AI-enabled Cadence SKILL automated development system, which is used to execute any method of this disclosure.
[0105] Figure 5 A schematic diagram of the hardware structure of the electronic device is shown. The electronic device 1000 includes a processor 1100 and a memory 1200. The memory can be used to store computer programs, and the processor can be used to retrieve the computer programs from the memory to execute any method embodiment of this disclosure. The processor can be one or more, and these processors can execute instructions individually or jointly. Similarly, the memory can be one or more, and these memories can store the aforementioned computer programs individually or jointly.
[0106] The processor 1100 is used to execute computer instructions, which can be written using instruction sets of architectures such as x86, Arm, RISC, MIPS, and SSE. The memory 1200 includes, for example, ROM (Read-Only Memory), RAM (Random Access Memory), and non-volatile memory such as hard disks, etc., and is not limited here.
[0107] This disclosure also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the audio storage method in any embodiment of this disclosure. Optionally, the computer-readable storage medium may be a non-transitory storage medium, but is not limited thereto; it may also be a temporary storage medium.
[0108] This invention can be a system, method, and / or computer program product. A computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for causing a processor to implement various aspects of the invention.
[0109] Computer-readable storage media can be tangible devices capable of holding and storing instructions for use by an instruction execution device. Computer-readable storage media can be, for example, but not limited to, electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital multifunction disc (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards or recessed protrusions storing instructions thereon, and any suitable combination thereof. The computer-readable storage media used herein are not to be construed as transient signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses through fiber optic cables), or electrical signals transmitted through wires.
[0110] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage media in the respective computing / processing device.
[0111] The computer program instructions used to perform the operations of this invention may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as the "C" language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuits, such as programmable logic circuits, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), are personalized by utilizing state information from computer-readable program instructions. These electronic circuits can execute computer-readable program instructions to implement various aspects of the present invention.
[0112] Various aspects of the present invention are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.
[0113] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processor of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner; thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.
[0114] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.
[0115] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction, which contains one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions. It will be known to those skilled in the art that implementation in hardware, implementation in software, and implementation using a combination of software and hardware are equivalent.
[0116] The various embodiments of the present invention have been described above. These descriptions are exemplary and not exhaustive, and are not limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical application, or technical improvements to the embodiments in the market, or to enable others skilled in the art to understand the embodiments disclosed herein. The scope of the invention is defined by the appended claims.
Claims
1. An AI-enabled Cadence SKILL automated development method, characterized in that, include: In response to a code development request input by a user through a command-line interface, a first code script file including a first target code is generated based on a code generator. The code generator is an intelligent generator integrating an artificial intelligence model, comprising: querying a circuit board design software knowledge base to obtain prompt word information about target code generation, wherein the prompt word information includes circuit board design software version information, circuit board design software unit system, and API function signature information; querying a sample code library to obtain tested and verified code related to the code development request; generating the first target code based on the prompt word information and the tested and verified code related to the code development request, and generating the first code script file based on the first target code; Generate a startup script file based on the first code script file; Close all currently running circuit board design software processes and invoke the circuit board design software, controlling the circuit board design software to load and run the first target code based on the startup script file; Obtain the log file generated by the circuit board design software and the loading and execution result information of the first target code; Based on the log file and the loading and execution result information of the first target code, a first identification result is determined to determine whether the first target code has an error; If the first identification result indicates that the first target code has an error, the first target code is repaired based on the code generator to generate a second code script file including the second target code.
2. The method according to claim 1, characterized in that, The step of generating a startup script file based on the first code script file includes: Extract the loading command for loading the first target code and the startup command for starting the first target code from the first code script file; Based on the script example library, obtain a standard template for the startup script file; The startup script file is generated based on the standard template of the loading command, the startup command, and the startup script file.
3. The method according to claim 1, characterized in that, If the first identification result indicates that the first target code has an error, the first identification result includes the error type and the error line number.
4. The method according to claim 1, characterized in that, The step of repairing the first target code based on the code generator to generate a second code script file including the second target code includes: Based on the code repair database, the repair strategy corresponding to the target error is obtained by querying. The target error matches the error that occurred in the first target code with a degree greater than a set threshold. The code repair database includes an error mode record library and a repair plan library. The error mode record library is used to store the correspondence between error types, error root causes and repair strategies that occurred during the historical code development process. The repair plan library is used to record the code repair step sequence and repair verification results in each repair strategy. Based on the circuit board design software knowledge base, the system retrieves prompt words related to the generation of the target code. These prompt words include the circuit board design software version information, the circuit board design software unit system, and the API function signature information. Based on the repair strategy corresponding to the target error and the prompt word information, the first target code is repaired to generate a second code script file including the second target code.
5. The method according to claim 1, characterized in that, The method further includes: A second identification result is determined based on the second code script file to determine whether the second target code contains an error; If the second identification result indicates that the second target code has no errors, the second target code corresponding to the code development request is written into the example code library, and the error type, root cause, and corresponding repair strategy of the first target code are determined. The correspondence between the error type, root cause, and repair strategy of the first target code is written into the error pattern record library, and the code repair step sequence and repair verification results in the repair strategy of the first target code are written into the repair plan library. The error pattern record library and the repair plan library constitute the code repair database.
6. The method according to claim 1, characterized in that, The method also includes: It provides a code editor interface and a circuit board design software demonstration interface, among which, The code editor interface is used to display code entered by the user or code generated by the code generator. The circuit board design software display interface is used to display the loading and running results of the first target code.
7. An AI-powered Cadence SKILL automated development system, characterized in that, It includes a user interaction layer, a code generation layer, and an execution layer, among which, The user interaction layer provides a command-line interface, which is used to receive code development requests input by the user and send the code development requests to the code generation layer. The code generation layer includes a code generator, which generates a first code script file containing a first target code based on the code development request. The code generator is an intelligent generator integrated with an artificial intelligence model, including a context understanding module, a knowledge base retrieval module, and a code generation module. The context understanding module retrieves prompt words about target code generation from a circuit board design software knowledge base. The knowledge base retrieval module retrieves tested and verified code related to the code development request from an example code library. The code generation module generates the first target code based on the prompt words and the tested and verified code related to the code development request, and generates the first code script file based on the first target code. The execution layer is used to generate a startup script file based on the first code script file, close all currently running circuit board design software processes based on the startup script file, call the circuit board design software, control the circuit board design software to load and run the first target code, obtain the log file generated by the circuit board design software and the loading and running result information of the first target code, and determine whether the first target code has an error based on the log file and the loading and running result information of the first target code, and send the first identification result to the code generation layer; The code generation layer is used to repair the first target code based on the code generator when the first identification result indicates that the first target code has an error, and generate a second code script file including the second target code.
8. The system according to claim 7, characterized in that, The system also includes a knowledge base layer, which comprises a circuit board design software knowledge base and a sample code library. The code generator is used to query the circuit board design software knowledge base to obtain prompt words information about the target code generation. The prompt words information includes circuit board design software version information, circuit board design software unit system and API function signature information. Based on the sample code library, retrieve tested and verified code related to the code development request; Based on the prompt information and the tested and verified code related to the code development request, a first target code is generated, and a first code script file is generated based on the first target code.
9. The system according to claim 7, characterized in that, The system further includes a knowledge base layer, which comprises a code repair database and a sample code library. The code repair database includes an error mode record library and a repair plan library. The code generation layer is used to determine a second identification result based on the second code script file to determine whether the second target code has an error; if the second identification result is that the second target code has no error, the second target code corresponding to the code development request is written into the example code library, and the error type, error root cause and corresponding repair strategy of the first target code are determined, and the correspondence between the error type, error root cause and repair strategy of the first target code is written into the error mode record library, and the code repair step sequence and repair verification result in the repair strategy of the first target code are written into the repair plan library.
Citation Information
Patent Citations
Automatic control code generation and verification method and device, equipment and storage medium
CN120406914A
NX secondary development code generation method and system based on AI Agent
CN122111401A