Script generation method, electronic device, and storage medium
By automatically generating information entry scripts and utilizing the circuit simulation tool's script interface and predetermined script syntax rules, the accuracy and efficiency issues of the circuit simulation tool's information entry phase are resolved, enabling the circuit simulation tool to efficiently simulate the simulation circuit, thus meeting the server's high power density and high-performance computing requirements.
Patent Information
- Application Number
- CN202510896962.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-30
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2045-06-30
AI Technical Summary
Existing circuit simulation tools have low accuracy and efficiency in the information entry stage, making it difficult to meet the flow requirements of high power density and high-performance computing in servers.
By automatically generating information entry scripts, utilizing the script interface of the circuit simulation tool, generating circuit network topology information according to the circuit diagram information, and generating information entry scripts according to predetermined script grammar rules, the circuit simulation tool can realize automated simulation of the simulation circuit.
It improves the accuracy and efficiency of information entry, enhances the efficiency and accuracy of voltage drop simulation, and meets the low voltage drop requirements of the server.
Smart Images

Figure CN120449784B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a script generation method, an electronic device, and a storage medium. Background Art
[0002] As servers develop towards high power density and high-performance computing, and liquid cooling technology gradually matures, the requirements for the flow of circuit boards are becoming increasingly stringent. Circuit simulation tools are needed to simulate the circuit to be simulated (for example, the flow voltage drop circuit of the power path) to meet the low voltage drop requirements of the server.
[0003] During the information entry phase of circuit simulation tools, the accuracy and efficiency of information entry are low. Summary of the Invention
[0004] In view of the above problems, embodiments of the present application provide a script generation method, apparatus, electronic device, storage medium, and computer program product for improving the accuracy and efficiency of information entry.
[0005] According to the first aspect of an embodiment of the present application, a script generation method is provided, which may include: obtaining circuit network topology information based on circuit diagram information of the circuit to be simulated, wherein the above-mentioned circuit network topology information includes attribute information and connection information of multiple target devices; processing the above-mentioned circuit network topology information to obtain target circuit network topology information adapted to predetermined script syntax rules, wherein the above-mentioned predetermined script syntax rules are determined according to the script interface syntax of the circuit simulation tool; generating an information entry script for entering the above-mentioned circuit diagram information based on a script template associated with the above-mentioned circuit to be simulated and the above-mentioned target circuit network topology information, wherein the above-mentioned information entry script is used to enable the above-mentioned circuit simulation tool to simulate the above-mentioned circuit to be simulated based on the above-mentioned circuit diagram information when called by the above-mentioned circuit simulation tool.
[0006] According to the second aspect of an embodiment of the present application, a script generation device is provided, which may include: a first acquisition module, used to obtain circuit network topology information based on the circuit diagram information of the circuit to be simulated, wherein the above-mentioned circuit network topology information includes the attribute information and connection information of multiple target devices; a second acquisition module, used to process the above-mentioned circuit network topology information to obtain target circuit network topology information adapted to predetermined script syntax rules, wherein the above-mentioned predetermined script syntax rules are determined according to the script interface syntax of the circuit simulation tool; a generation module, used to generate an information entry script for entering the above-mentioned circuit diagram information based on the script template associated with the above-mentioned circuit to be simulated and the above-mentioned target circuit network topology information, wherein the above-mentioned information entry script is used to enable the above-mentioned circuit simulation tool to simulate the above-mentioned circuit to be simulated based on the above-mentioned circuit diagram information when called by the above-mentioned circuit simulation tool.
[0007] According to a third aspect of an embodiment of the present application, an electronic device is provided, comprising: one or more processors; and a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the above method.
[0008] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is further provided, on which a computer program or instruction is stored. When the computer program or instruction is executed by a processor, the steps of the above method are implemented.
[0009] According to the fifth aspect of the embodiments of the present application, a computer program product is also provided, including a computer program or instructions, which implement the steps of the above method when the above computer program or instructions are executed by a processor. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] The above contents and other objects, features and advantages of the present application will become more apparent through the following description of the embodiments of the present application with reference to the accompanying drawings, in which:
[0011] Figure 1 An application scenario diagram of the script generation method according to an embodiment of the present application is shown;
[0012] Figure 2 A flowchart of a script generation method according to an embodiment of the present application is shown;
[0013] Figure 3 A flowchart of determining at least one other device belonging to the same path as a power supply device from a plurality of devices according to an embodiment of the present application is shown;
[0014] Figure 4 A schematic diagram showing a predetermined discrete device grammar rule according to an embodiment of the present application is shown;
[0015] Figure 5 A schematic diagram showing the principle of a script generation method according to an embodiment of the present application is shown;
[0016] Figure 6 A block diagram of a script generating device according to an embodiment of the present application is shown;
[0017] Figure 7 A block diagram of an electronic device suitable for implementing a script generation method according to an embodiment of the present application is shown. DETAILED DESCRIPTION
[0018] Hereinafter, embodiments of the present application will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present application. In the detailed description below, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present application. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessarily confusing the concepts of the present application.
[0019] The terms used herein are only for describing specific embodiments and are not intended to limit this application. The terms "comprise," "include," etc. used herein indicate the presence of the features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0020] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.
[0021] When expressions such as "at least one of A, B or C, etc." are used, they should generally be interpreted in accordance with the meaning commonly understood by those skilled in the art (for example, "a system having at least one of A, B or C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B and C, etc.).
[0022] In the embodiment of the present application, "indication" may include direct indication, indirect indication, explicit indication or implicit indication. In the case of describing that a certain indication information is used to indicate A, it can be understood that the indication information carries A, directly indicates A or indirectly indicates A.
[0023] In the embodiments of the present application, the various numerical numbers involved are only used for the convenience of description and are not used to limit the scope of protection of this application. The size of the serial numbers involved in the embodiments of the present application does not mean the order of execution. The order of execution of each process should be determined by its function and internal logic. For example, the terms "first", "second", "third", "fourth" and other various terminology labels (if any) in the description, claims and drawings of the embodiments of the present application can be used to distinguish similar objects, and do not have to be used to describe a specific order or sequence. Among them, the terms used in this way are interchangeable where appropriate.
[0024] Unless otherwise specified or there is no logical conflict, the terms and / or descriptions between different embodiments of the present application are consistent and can be referenced by each other. The technical features in different embodiments can be combined to form new embodiments according to their internal logical relationships.
[0025] As servers develop towards high power density and high-performance computing, and liquid cooling technology gradually matures, the current requirements for board materials are becoming increasingly stringent. The current capacity designed by copper plating and stacking led by layout design engineers can no longer meet the application requirements of servers in high-current scenarios. Circuit simulation tools are needed to simulate the circuit to be simulated (for example, the current drop circuit of the power path) to meet the low voltage drop requirements of the server.
[0026] In the high-throughput current distribution scenario of the server processor, the current distribution requirements of different pins of the same power network need to be included in the simulation process.
[0027] As an implementation method, the flow simulation process using a circuit simulation tool can be as follows: obtaining circuit diagram information, and gradually entering the power topology architecture and load branch structure of the circuit diagram information into the circuit simulation tool in an immediate manner. This process is time-consuming and has high requirements on the professional skills of engineers.
[0028] In order to improve the situation in which voltage drop simulation in the server field is time-consuming and requires high professional skills, the embodiment of the present application proposes to automatically generate information entry scripts for the purpose of first establishing an automatic analysis method for circuit diagram information, and by analyzing the circuit diagram information, generating circuit network topology information associated with the circuit diagram information to meet the information preparation requirements of the circuit simulation process to be simulated. Then, with the help of the script interface of the circuit simulation tool, by analyzing the script interface syntax, the implementation of different functions is decomposed into a combination of different topological elements in the circuit network topology information, and by automatically generating various types of topological elements, and then reconstructing the topological elements according to the functions, the purpose of automatically generating the script content is achieved. In this way, the process of automatically generating the information entry script from circuit diagram information to the script is completed, thereby improving the efficiency and accuracy of the voltage drop simulation. In addition, the simulation precision and range can be regulated according to the circuit simulation accuracy requirements to improve the efficiency and pertinence of the simulation operation process.
[0029] Thus, an embodiment of the present application provides a script generation method. For example, based on the circuit diagram information of the power network to be simulated, power network topology information is obtained. The power network topology information is processed to obtain target power network topology information that is adapted to predetermined script syntax rules. The predetermined script syntax rules are determined based on the script interface syntax of the power simulation tool. Based on the script template associated with the power network to be simulated and the target power network topology information, an information entry script for entering circuit diagram information is generated. The information entry script can be called by the power simulation tool, which is used to simulate the power network to be simulated.
[0030] The above describes the inventive concept of the embodiment of the present application. The script generation method provided in the embodiment of the present application will be described in detail below with reference to the accompanying drawings.
[0031] First, combine Figure 1 The application scenarios to which the script generation method is applicable are described. Figure 1 As an example, combining the application scenario shown in Figure 2 、 Figure 3 、 Figure 4 and Figure 5 , the script generation method provided in the embodiment of the present application is specifically described. Figure 2 This section explains how to generate a script. Figure 3 The following describes how to determine at least one other device that belongs to the same path as the power supply device from multiple devices based on connection information of the power supply device and circuit simulation accuracy requirements. Figure 4 Describes the syntax rules for predetermined discrete devices. Figure 5 The overall script generation method is explained.
[0032] It should be noted that the embodiments of the present application can be implemented independently or in combination with each other, and the same or similar concepts or processes will not be described in detail in some embodiments.
[0033] Figure 1 An application scenario diagram of the script generation method according to an embodiment of the present application is shown.
[0034] like Figure 1 As shown, the application scenario 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 is used as a medium for providing a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired or wireless communication links or optical fiber cables.
[0035] A user can use the first terminal device 101, the second terminal device 102, or the third terminal device 103 to interact with the server 105 via the network 104 to receive or send messages, etc. Various applications can be installed on the first terminal device 101, the second terminal device 102, or the third terminal device 103, such as information entry scripts and circuit simulation tools.
[0036] The first terminal device 101, the second terminal device 102 or the third terminal device 103 may be various electronic devices with display screens and supporting web browsing, such as tablet computers, laptop computers, desktop computers or smart phones, etc. The server 105 may be a server that provides various services.
[0037] It should be noted that the script generation method provided in the embodiment of the present application can be executed by the first terminal device 101, the second terminal device 102, or the third terminal device 103. Accordingly, the script generation apparatus provided in the embodiment of the present application can generally be set in the first terminal device 101, the second terminal device 102, or the third terminal device 103.
[0038] Optionally, the script generation method provided in the embodiment of the present application may also be executed by the server 105. Accordingly, the script generation device provided in the embodiment of the present application may also be provided in the server 105.
[0039] It should be understood that Figure 1 The number of the first terminal device, the second terminal device, the third terminal device, the network and the server is only illustrative. According to implementation requirements, there can be any number of the first terminal device, the second terminal device, the third terminal device, the network and the server.
[0040] Figure 2A flowchart of a script generation method according to an embodiment of the present application is shown.
[0041] like Figure 2 As shown, the method includes operations S210 to S230.
[0042] In operation S210 , circuit network topology information is obtained according to circuit diagram information of a circuit to be simulated.
[0043] In operation S220 , the circuit network topology information is processed to obtain target circuit network topology information adapted to a predetermined script grammar rule.
[0044] In operation S230 , an information entry script for entering circuit diagram information is generated according to a script template associated with the circuit to be simulated and target circuit network topology information.
[0045] According to an embodiment of the present application, the circuit to be simulated may include a power supply circuit to be simulated. Circuit diagram information may be associated with a circuit netlist. The circuit diagram information may include device information for each of multiple devices. The device information may include at least one of the following: device identification, device type, device pin information, network information associated with the device pins, or device parameter information. Furthermore, the device type may be determined based on the device identification. For the power supply circuit to be simulated, the device type may include at least one of power supply, load, or discrete. Discrete may indicate a device in the power flow path of the power supply. Power supply may indicate the end from which the power is emitted. Load may indicate the end from which the power is received.
[0046] For target device types, in addition to the aforementioned device information, additional information may be provided. For example, for discrete devices, if the device information does not include impedance information, this information can be obtained from the auxiliary circuit information. For discrete devices, such as electronic fuses, voltage drop simulation requires on-state impedance information at the target temperature. Therefore, the device information for these electronic fuses may also include on-state impedance information at the target temperature, and this information may be presented in a predetermined format. As an implementation, the predetermined format may be resistance value @ temperature. For example, 1mΩ@50°C indicates that the on-state impedance is 1mΩ at 50°C. Furthermore, the input pins must be identified as Vin, and the output pins as Vout. For load devices, such as load chips, the load current can be represented by pins in combination with networks, meaning the load current must be associated with the pins and networks. For example, the load current of a load chip can be represented as "load chip identifier - input network - output network - load current."
[0047] Circuit network topology information may include attribute information and connection information for each of multiple target devices. A target device may be a device among multiple devices that meets predetermined conditions. For example, the predetermined conditions may include meeting at least one of load current accuracy requirements or voltage drop accuracy requirements. Attribute information may include at least one of the following: device identification, device type, device pin information, network information associated with the device pins, or device parameter information. Connection information may be used to indicate the connection relationship between the device and other devices.
[0048] When the circuit network topology information is obtained, the circuit network topology information can be processed according to the predetermined script grammar rules determined by the script interface grammar of the circuit simulation tool, thereby obtaining the target circuit network topology information that is adapted to the predetermined script grammar rules. Afterwards, an information entry script for entering circuit diagram information is generated based on the script template associated with the circuit to be simulated and the target circuit network topology information. The information entry script can be used to enable the power supply simulation tool to simulate the circuit to be simulated based on the circuit diagram information when called by the circuit simulation tool. For example, the circuit simulation tool can call the script interface and use the script interface to run the information entry script, thereby obtaining the circuit diagram information, and the circuit simulation tool can simulate the circuit to be simulated based on the circuit diagram information.
[0049] According to an embodiment of the present application, since the circuit network topology information is obtained based on the circuit diagram information of the circuit to be simulated, the circuit network topology information includes the attribute information and connection information of each of the multiple target devices, and thus, the automatic generation of the circuit network topology information is achieved. On this basis, since the predetermined script grammar rules are determined according to the script interface grammar of the circuit simulation tool, the target circuit network topology information adapted to the predetermined script grammar rules is obtained by processing the circuit network topology information, and thus, the scripting of the circuit network topology information is achieved. Thus, based on the script template associated with the circuit to be simulated and the target circuit network topology information, an information entry script for entering the circuit diagram information is generated, and the automatic generation of the information entry script is achieved, thereby reducing the complexity of information entry and improving the efficiency and accuracy of information entry. Since the information entry script is used to, when called by the circuit simulation tool, enable the circuit simulation tool to simulate the circuit to be simulated based on the circuit diagram information, thereby improving the simulation efficiency and accuracy.
[0050] The above generally explains the process of circuit network topology information generation, target circuit network topology information generation and script generation. The following will further explain how to generate circuit network topology information, how to generate target circuit network topology information, how to generate script templates and how to generate information entry scripts in conjunction with the accompanying drawings.
[0051] As an implementation method, devices can be selected based on device information combined with circuit simulation accuracy requirements. The circuit simulation accuracy requirement can be determined based on the accuracy that the circuit simulation tool needs to meet in simulating the circuit to be simulated. For example, attribute information and connection information of multiple devices can be obtained based on the circuit diagram information of the circuit to be simulated. Then, based on the circuit simulation accuracy requirement and the attribute information and connection information of the multiple devices, multiple target devices that meet the circuit simulation accuracy requirement are determined from the multiple devices. Thus, circuit network topology information is obtained based on the attribute information and connection information of the multiple target devices.
[0052] Since the circuit simulation accuracy requirement is determined based on the accuracy that the circuit simulation tool needs to meet for simulating the simulation circuit, the circuit simulation accuracy requirement can match the circuit simulation accuracy, and the target device is determined from multiple devices based on the circuit simulation accuracy requirement and the attribute information and connection information of the multiple devices. Therefore, the target device is a device that meets the circuit simulation accuracy requirement, thereby reducing the amount of information entry and improving the quality of information entry, thereby improving the accuracy of information entry and subsequent simulation accuracy.
[0053] How to determine multiple target devices from multiple devices can be achieved in the following ways.
[0054] As an implementation, the attribute information may include a device type. The device type may include at least one of the following: power supply, load, or discrete. The multiple target devices may include a power supply device and at least one other device. The at least one other device may include a load device. Alternatively, the at least one other device may include a load device and a discrete device. The circuit network topology information may include path information for at least one path from the power supply device to the load device. The path information may include attribute information and connection information for each of the multiple target devices belonging to the path.
[0055] In other words, the circuit network topology information may include path information for at least one path. The path information for a path may include attribute information and connection information for each of multiple target devices belonging to the path. The multiple target devices belonging to the path may include a power supply device and at least one other device. The at least one other device may include a load device. Optionally, the at least one other device may include a load device and at least one discrete device. The path may start with the power supply device and end with the load device, with at least one discrete device located between the power supply device and the load device.
[0056] As an implementation method, multiple candidate paths can be determined from multiple paths based on the path information and circuit simulation accuracy requirements of each of the multiple paths. For example, the circuit simulation accuracy requirements may include line impedance accuracy requirements and load impedance accuracy requirements. For any path among the multiple paths, if the line impedance included in the path information of the path meets the line impedance accuracy requirements and the load impedance included in the attribute information of the multiple devices belonging to the path meets the load impedance accuracy requirements, the path will be taken as a candidate path. The line impedance accuracy requirement and the load impedance accuracy requirement can be configured according to actual business needs and are not limited here. For example, the line impedance accuracy requirement may be greater than or equal to a first threshold. The load impedance accuracy requirement may be greater than or equal to a second threshold. For example, the first threshold may be 0.5Ω. Optionally, the second threshold may be 5Ω.
[0057] Since the candidate path is determined from multiple paths based on the line impedance accuracy requirement, the load impedance accuracy requirement and the path information of the path, the line impedance accuracy requirement and the load impedance accuracy requirement can be determined based on the accuracy of the simulation of the simulation circuit by the circuit simulation tool. Therefore, the candidate path is a path that meets the circuit simulation accuracy requirement, thereby reducing the amount of information entry and improving the quality of information entry, thereby improving the accuracy of information entry and the accuracy of subsequent simulation.
[0058] Based on the device types included in the attribute information of each of the multiple candidate paths, a device of the power supply type is determined from the multiple devices in the candidate path to obtain at least one power supply device. Based on the connection information of the at least one power supply device and the required circuit simulation accuracy, at least one other device that belongs to the same candidate path as the at least one power supply device is determined from the multiple devices.
[0059] Regarding how to determine at least one other device belonging to the same candidate path as the power supply device from multiple devices based on the connection information of the power supply device and the circuit simulation accuracy requirement, this can be achieved in the following manner.
[0060] As an implementation method, the circuit simulation accuracy requirement may also include an impedance accuracy requirement. At least one downstream device connected to the power supply device is determined based on the connection information of the power supply device. For any of the at least one downstream device, the downstream device is determined to have two or more pins (i.e., three or more pins) based on its attribute information.
[0061] If the downstream device has two pins, and if the connection information of the downstream device indicates that another pin of the downstream device is an output pin, or if the downstream device has multiple pins and the connection information of the downstream device indicates that the pin connected to the power supply device is an input pin, then if the impedance information of the downstream device determines that the downstream device meets the impedance accuracy requirements, the downstream device is considered a discrete device. The downstream device can be identified as input network - discrete device identification - output network - impedance information.
[0062] If a downstream device has multiple pins and the pin connected to the power supply device is determined to be a non-input pin based on the downstream device's connection information, then the downstream device is considered a load device if the downstream device is determined to be within a predetermined load device range based on the downstream device's attribute information, and the load current of the downstream device is obtained based on the device identifier and pin information included in the downstream device's attribute information. The load device can be identified as input network - load device identifier - GND (i.e., ground) - pin identifier - load current - Sink (i.e., load).
[0063] Based on the above, at least one subsequent-stage device connected to any one of the at least one power supply devices can be determined based on the connection information of the power supply device. For any one of the at least one subsequent-stage devices, if the device type of the subsequent-stage device is a load device, the device classification operation for the subsequent-stage device is terminated. If the device type of the subsequent-stage device is a discrete device, the device classification operation is performed to determine whether the subsequent-stage device connected to the discrete device is a discrete device or a load device until the subsequent-stage device connected to the discrete device is determined to be a load device.
[0064] Thus, the circuit network topology information may include multiple levels of network information. The circuit network topology information may be tree topology information. The root node may be a power supply. The branch nodes may be discrete devices. The leaf nodes may be load devices.
[0065] As another implementation, based on the device types included in the attribute information of each of the multiple devices, a device of power supply type can be determined from the multiple devices to obtain at least one power supply device. Then, based on the connection information of the at least one power supply device and the required circuit simulation accuracy, at least one other device belonging to the same path as the at least one power supply device can be determined from the multiple devices. For example, for any one of the at least one power supply devices, based on the connection information of the power supply device and the required circuit simulation accuracy, at least one other device belonging to the same path as the power supply device can be determined from the multiple devices.
[0066] Since the circuit simulation accuracy requirement is determined based on the accuracy that the circuit simulation tool needs to meet in simulating the simulated circuit, the circuit simulation accuracy requirement can match the circuit simulation accuracy, and at least one other device is determined from multiple devices based on the circuit simulation accuracy requirement and the connection information of the circuit device. Therefore, the other device is a device that meets the circuit simulation accuracy requirement, thereby reducing the amount of information entry and improving the quality of information entry, thereby improving the accuracy of information entry and subsequent simulation accuracy.
[0067] How to determine at least one other device that belongs to the same path as the power supply device from multiple devices based on the connection information of the power supply device and the circuit simulation accuracy requirements can be achieved by the following method: Figure 3 Circuit simulation accuracy requirements may include load current accuracy requirements and voltage drop accuracy requirements. Load current accuracy requirements and voltage drop accuracy requirements can be configured based on actual business needs and are not limited here.
[0068] Figure 3 A flowchart of determining at least one other device belonging to the same path as the power supply device from multiple devices according to an embodiment of the present application is shown.
[0069] like Figure 3 As shown, the method includes operations S311 to S318.
[0070] In operation S311 , at least one connection device connected to the previous-stage device is determined from a plurality of devices based on connection information of the previous-stage device.
[0071] According to an embodiment of the present application, the power supply device may be the first preceding device. Thus, at least one succeeding device connected to the preceding device is determined from a plurality of devices based on the connection information of the device.
[0072] In operation S312 , for any one of the at least one subsequent-stage components, whether the attribute information of the subsequent-stage component includes impedance information is determined; if not, operation S313 is performed; if so, operation S314 is performed.
[0073] In operation S313 , the subsequent device is a load device.
[0074] In operation S314 , it is determined whether the subsequent device is grounded based on the connection information of the subsequent device; if so, operation S315 is performed; if not, operation S316 is performed.
[0075] In operation S315 , it is determined whether the subsequent device meets the load current accuracy requirement; if so, operation S313 is performed; if not, operation S317 is performed.
[0076] In operation S316 , it is determined whether the subsequent device meets the voltage drop accuracy requirement; if so, operation S318 is performed; if not, operation S317 is performed.
[0077] In operation S317 , the subsequent stage device is deleted.
[0078] In operation S318 , the subsequent device is a discrete device, and the discrete device is used as the previous device to return to operation S311 until the subsequent device is a load device.
[0079] Because load devices meet load current accuracy requirements, and discrete devices meet voltage drop accuracy requirements, the accuracy of load and discrete device identification is improved. The step-by-step device type determination method reduces the device omission rate, thereby improving the accuracy of information entry.
[0080] As another implementation, multiple candidate paths can be determined from the multiple paths based on their respective path information and circuit simulation accuracy requirements. For example, the circuit simulation accuracy requirements may include line impedance accuracy requirements and load impedance accuracy requirements. For any of the multiple paths, if the line impedance included in the path information of the path meets the line impedance accuracy requirement and the load resistance included in the attribute information of the multiple devices belonging to the path meets the load impedance accuracy requirement, the path is selected as a candidate path.
[0081] Based on the device types included in the attribute information of each of the multiple candidate paths, a device of the power supply type is determined from the multiple devices in the candidate path to obtain at least one power supply device. Based on the connection information of the at least one power supply device and the required circuit simulation accuracy, at least one other device that belongs to the same candidate path as the at least one power supply device is determined from the multiple devices.
[0082] Regarding how to determine at least one other device belonging to the same candidate path as the power supply device from multiple devices based on the connection information of the power supply device and the circuit simulation accuracy requirement, this can be achieved in the following manner.
[0083] At least one subsequent-stage device connected to the preceding-stage device is determined from a plurality of devices based on the connection information of the preceding-stage device. The power supply device may be the first preceding-stage device. For any subsequent-stage device among the at least one subsequent-stage device, if the attribute information of the subsequent-stage device does not include impedance information, the subsequent-stage device is determined to be a load device. If the attribute information of the subsequent-stage device includes impedance information, whether the subsequent-stage device is grounded is determined based on the connection information of the subsequent-stage device. If the subsequent-stage device is grounded and meets the load current accuracy requirements, the subsequent-stage device is determined to be a load device. If the subsequent-stage device is not grounded and meets the voltage drop accuracy requirements, the subsequent-stage device is determined to be a discrete device, and the subsequent-stage device is returned as the preceding-stage device to perform an operation of determining whether the subsequent-stage device connected to the preceding-stage device is a load device or a discrete device.
[0084] Scripts can include comments, syntax, and application information, written in a streamlined format. Application information can refer to circuit network topology information. Comments are descriptive text placed before each paragraph. To obtain information for entry into a script, the syntax and application information must be combined. For example, the syntax information can be broken down and the application information can be modularized to correspond to the information in the circuit network topology information.
[0085] Based on this, the application information can be modularized and organized in the following manner: the circuit network topology information is converted into target circuit network topology information. For example, the predetermined script syntax rules may include predetermined power device syntax rules, predetermined load device syntax rules, predetermined discrete device syntax rules, and predetermined connection relationship syntax rules. The multiple target devices may include at least one power device, at least one load device, and at least one discrete device.
[0086] Thus, based on the attribute information of at least one power supply device, target attribute information of at least one power supply device that is compatible with a predetermined power supply device grammar rule can be obtained. For example, the predetermined power supply device grammar rule may be "newly added action general identifier - new power supply device identifier - network identifier - impedance information - accuracy - output current - output voltage." The newly added action general identifier may indicate a general new action initiation identifier. Thus, the attribute information of the power supply device can be represented as target attribute information compatible with the predetermined power supply device grammar rule.
[0087] Based on the attribute information of at least one load device, target attribute information of at least one load device that is adapted to a predetermined load device grammar rule is obtained. For example, the predetermined load device grammar rule may be "newly added action general identifier - newly added load device identifier - network identifier - simulation mode - accuracy - input current." Thus, the attribute information of the load device can be represented as target attribute information adapted to the predetermined load device grammar rule.
[0088] According to the attribute information of at least one discrete device, the target attribute information of at least one discrete device that is adapted to the predetermined discrete device grammar rule is obtained. Figure 4 Provide explanation.
[0089] Figure 4 A schematic diagram of predetermined discrete device grammar rules according to an embodiment of the present application is shown.
[0090] like Figure 4 As shown, the predetermined discrete device syntax rule can be "Add action general identifier - Add power device identifier - Discrete device identifier - Add power device identifier - Network identifier - Discrete device pin information - Add discrete device end identifier." The Add power device-Network identifier can indicate the VRM (Voltage Regulator Module)-NET to which the discrete device belongs. Discrete device pin information can include at least one of the following: discrete device identifier, pin identifier, or pin number device.
[0091] Based on the connection information of each of the multiple target devices, at least one target connection information that conforms to a predetermined connection relationship grammar rule is obtained. For example, the predetermined connection relationship grammar rule may be "input-device-output." "Input" may indicate a power supply device. "Device" may indicate a discrete device. "Output" may indicate a load device. Thus, the multiple connection information can be represented as at least one target connection relationship that conforms to the predetermined connection relationship grammar rule.
[0092] Thus, target circuit network topology information is obtained based on target attribute information of at least one power device, target attribute information of at least one load device, target attribute information of at least one discrete device and at least one target connection information.
[0093] Since the target attribute information of the power supply device is obtained by processing the attribute information of the power supply device using the predetermined power supply device grammar rules, the target attribute information of the load device is obtained by processing the attribute information of the load device using the predetermined load device grammar rules, the target attribute information of the discrete device is obtained by processing the attribute information of the discrete device using the predetermined discrete device grammar rules, and at least one target connection information is obtained by processing the respective connection relationships of multiple target devices using the predetermined connection relationship grammar rules, the script modularization of the circuit network topology information is realized, providing data support for the subsequent generation of information entry scripts.
[0094] To better identify connection information, the target attribute information of the discrete device can include a pseudo power device identifier and a pseudo load device identifier. The pseudo power device identifier can indicate the end of the path to which the discrete device belongs that is close to the power device. The pseudo load device identifier can indicate the end of the path to which the discrete device belongs that is close to the load device.
[0095] By configuring pseudo power device identifiers and pseudo load device identifiers for discrete devices, the difficulty of identifying connection relationships is simplified, and the accuracy and efficiency of connection relationship identification are improved, thereby improving the accuracy and efficiency of information entry.
[0096] As described above, it is known that the grammatical information can be decomposed and the application information can be modularized to correspond to the information in the circuit network topology information. The following describes how to decompose the grammar.
[0097] Multiple device types can be determined based on the attribute information of each of the multiple devices. Then, a script template is obtained based on the predetermined script grammar rules, the attribute fields of each of the multiple device types, and the connection fields of each of the multiple device types. The predetermined script grammar rules may include predetermined power device grammar rules, predetermined load device grammar rules, predetermined discrete device grammar rules, and predetermined connection relationship grammar rules. The attribute field of the power device can be a field configured by the predetermined power device grammar rule described above. The attribute field of the load device can be a field configured by the predetermined load device grammar rule described above. The attribute field of the discrete device can be a field configured by the predetermined discrete device grammar rule described above. The connection field of the device type can be a field configured by the predetermined connection relationship grammar rule described above.
[0098] Since the script template is generated according to predetermined script grammar rules, attribute fields of multiple device types and connection fields of multiple device types, the script grammar class information is decomposed and matched with the target circuit network topology information.
[0099] As an implementation method, the target circuit network topology information can be added to a script template associated with the circuit to be simulated to generate an information entry script for entering circuit diagram information. For example, the target attribute information included in the target circuit network topology information can be added to an attribute field in the script template that is compatible with the target attribute information, and the target connection information included in the target circuit network topology information can be added to a connection field in the script template that is compatible with the target connection information, thereby obtaining an information entry script.
[0100] As another implementation, the target circuit network topology information can be stored in a database. This information entry script is generated by sequentially entering the target attribute information for the power supply, load, and discrete devices, along with the target connection information, in a grammatical structure. Furthermore, annotations corresponding to the device types can be added to the information entry script.
[0101] In addition, a drawing tool can be called to visualize the circuit network topology information, thereby realizing the visualization of the circuit network topology information.
[0102] The above describes the script generation method provided in the embodiment of the present application.
[0103] Based on the above content, the following Figure 5 An overall description is given of the script generation method provided in the embodiments of the present application.
[0104] Figure 5 A schematic diagram showing the principles of a script generation method according to an embodiment of the present application is shown.
[0105] like Figure 5 As shown, the script generation method may include circuit diagram information topology, script structuring, topology information reconstruction and script automatic generation.
[0106] For circuit diagram information topology, circuit network topology information can be obtained based on the circuit diagram information and circuit simulation accuracy requirements. For script structuring, the predetermined script grammar rules can be decomposed into predetermined power device grammar rules, predetermined load device grammar rules, predetermined discrete device grammar rules, and predetermined connection relationship grammar rules.
[0107] Therefore, in the topology information reconstruction and script automatic generation part, the target circuit network topology information can be obtained according to the circuit network topology information, the predetermined power supply device syntax rules, the predetermined load device syntax rules, the predetermined discrete device syntax rules and the predetermined connection relationship syntax rules, and then the information entry script for entering the circuit diagram information can be generated according to the target circuit network topology information and the script template.
[0108] Based on this, an embodiment of the present application provides a method for automatically generating voltage drop simulation scripts for the server field, converting circuit diagram information into application information required by the script language, and realizing automatic generation of information entry scripts in an automatic generation manner by simulating the writing method of the script language. For example, the circuit network topology information generated based on the circuit diagram information and the script syntax structure are programmable, and the writing of the information entry script language is completed by combining them. The connection information in the circuit image information is analyzed and reorganized to generate similar graphical circuit network topology information. For example, the circuit network topology information can be tree-like topology information. In addition, it is also possible to obtain the information required by the script language from the circuit diagram information, and reconstruct the circuit network topology information according to the requirements of the script language to form modular application information in the script, thereby realizing automatic programming of the simulation script. Through grammatical structure decomposition, the writing process of the simulation script is converted into the reconstruction of language and application information in a programming manner to generate an information entry script including application information.
[0109] This allows the tedious manual visual information entry method to be automatically collected in an information-based format. By analyzing the script syntax rules, the manual entry method written in the script is automatically generated in a streamlined manner, thus achieving the automated generation of information entry scripts. This reduces the complexity of the simulation preparation process, improves its efficiency and accuracy, and reduces the time spent on the information entry process. Furthermore, the precision and range of the simulation accuracy can be adjusted according to the required circuit simulation accuracy.
[0110] Based on the same inventive concept as the aforementioned embodiment of the script generation method, the embodiment of the present application further provides a script generation device to implement the script generation method provided in the embodiment of the present application.
[0111] Figure 6 A block diagram of a script generating device according to an embodiment of the present application is shown.
[0112] like Figure 6 As shown, the script generating apparatus 600 may include a first obtaining module 610 , a second obtaining module 620 and a generating module 630 .
[0113] The first obtaining module 610 is configured to obtain power supply network topology information according to circuit diagram information of the power supply network to be simulated.
[0114] The second obtaining module 620 is configured to process the power supply network topology information to obtain target power supply network topology information adapted to a predetermined script grammar rule.
[0115] The generating module 630 is configured to generate an information entry script for entering circuit diagram information based on a script template associated with the power network to be simulated and target power network topology information.
[0116] According to an embodiment of the present application, the power network topology information includes attribute information and connection information for each of a plurality of target devices. The predetermined script syntax rules are determined based on the script interface syntax of the power simulation tool. The information entry script can be called by the power simulation tool, which is used to simulate the power network to be simulated.
[0117] According to embodiments of the present application, any multiple modules among the first obtaining module 610, the second obtaining module 620, and the generating module 630 may be combined into a single module, or any one of these modules may be split into multiple modules. Alternatively, at least part of the functionality of one or more of these modules may be combined with at least part of the functionality of other modules and implemented in a single module. According to embodiments of the present application, at least one of the first obtaining module 610, the second obtaining module 620, and the generating module 630 may be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application-specific integrated circuit (ASIC), or may be implemented in hardware or firmware through any other reasonable means of circuit integration or packaging, or may be implemented in any one of the three implementation methods of software, hardware, and firmware, or any appropriate combination of these. Alternatively, at least one of the first obtaining module 610, the second obtaining module 620, and the generating module 630 may be at least partially implemented as a computer program module that, when executed, performs the corresponding functionality.
[0118] Figure 7 A block diagram of an electronic device suitable for implementing a script generation method according to an embodiment of the present application is shown.
[0119] like Figure 7 As shown, an electronic device 700 according to an embodiment of the present application includes a processor 701, which can perform various appropriate actions and processes based on programs stored in ROM 702 or programs loaded from storage 708 into RAM 703. ROM can be read-only memory. RAM can be random access memory. Processor 701 can include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or related chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)). Processor 701 can also include onboard memory for caching purposes. Processor 701 can include a single processing unit or multiple processing units for performing different actions in the method flow according to an embodiment of the present application.
[0120] Various programs and data required for the operation of the electronic device 700 are stored in the RAM 703. The processor 701, ROM 702, and RAM 703 are connected to each other via a bus 704. The processor 701 performs various operations of the method flow according to the embodiment of the present application by executing the programs in the ROM 702 and / or RAM 703. It should be noted that the programs may also be stored in one or more memories other than the ROM 702 and the RAM 703. The processor 701 may also perform various operations of the method flow according to the embodiment of the present application by executing the programs stored in the one or more memories.
[0121] According to an embodiment of the present application, the electronic device 700 may further include an I / O interface 705, which is also connected to the bus 704. I / O refers to input / output. The electronic device 700 may further include one or more of the following components connected to the I / O interface 705: an input portion 706 including a keyboard, mouse, etc.; an output portion 707 including devices such as a cathode ray tube (CRT), liquid crystal display (LCD), and speakers; a storage portion 708 including a hard disk; and a communication portion 709 including a network interface card such as a LAN card or modem. The communication portion 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. Removable media 711, such as a magnetic disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed in the drive 710 as needed, so that computer programs read from the removable media can be installed into the storage portion 708 as needed.
[0122] This application also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments, or may exist independently and not be incorporated into the device / apparatus / system. The computer-readable storage medium carries one or more programs, and when the one or more programs are executed, the method according to the embodiments of this application is implemented.
[0123] According to an embodiment of the present application, a computer-readable storage medium may be a non-volatile computer-readable storage medium, and may include, for example, but not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present application, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to an embodiment of the present application, a computer-readable storage medium may include the ROM 702 and / or RAM 703 described above and / or one or more memories other than ROM 702 and RAM 703.
[0124] The embodiments of the present application also include a computer program product, which includes a computer program containing program code for executing the method shown in the flowchart. When the computer program product is executed in a computer system, the program code is used to enable the computer system to implement the script generation method provided in the embodiments of the present application.
[0125] The computer program executes the above functions defined in the system / device of the embodiment of the present application when the computer program is executed by the processor 701. According to the embodiment of the present application, the system, device, module, unit, etc. described above can be implemented by a computer program module.
[0126] In one embodiment, the computer program may be stored on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may be transmitted and distributed in the form of a signal on a network medium, downloaded and installed via the communication portion 709, and / or installed from a removable medium 711. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to wireless, wired, or any suitable combination thereof.
[0127] In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 709, and / or installed from a removable medium 711. When the computer program is executed by the processor 701, the above-described functions defined in the system of the embodiment of the present application are performed. According to the embodiment of the present application, the systems, devices, means, modules, units, etc. described above can be implemented by computer program modules.
[0128] According to an embodiment of the present application, the program code for executing the computer program provided by the embodiment of the present application can be written in any combination of one or more programming languages. Specifically, these computer programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, languages such as Java, C++, Python, "C" or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect via the Internet).
[0129] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the above-mentioned module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of the boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0130] Those skilled in the art will appreciate that the features described in the various embodiments of this application may be combined and / or coupled in various ways, even if such combinations or couplings are not explicitly described in this application. In particular, the features described in the various embodiments of this application may be combined and / or coupled in various ways without departing from the spirit and teachings of this application. All such combinations and / or couplings fall within the scope of this application.
[0131] The embodiments of the present application have been described above. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of the present application. Although each embodiment has been described separately above, this does not mean that the measures in each embodiment cannot be advantageously used in combination. Without departing from the scope of the present application, those skilled in the art may make various substitutions and modifications, and these substitutions and modifications should all fall within the scope of the present application.
Claims
1. A script generation method, characterized in that: include: Obtaining circuit network topology information according to circuit diagram information of the circuit to be simulated, wherein the circuit network topology information includes attribute information and connection information of each of a plurality of target devices; Processing the circuit network topology information to obtain target circuit network topology information adapted to predetermined script grammar rules, wherein the predetermined script grammar rules are determined according to a script interface grammar of a circuit simulation tool; and generating, based on a script template associated with the circuit to be simulated and the target circuit network topology information, an information entry script for entering the circuit diagram information, wherein the information entry script is used to enable the circuit simulation tool to simulate the circuit to be simulated based on the circuit diagram information when called by the circuit simulation tool; The method further comprises: Obtaining attribute information and connection information of each of the plurality of devices according to the circuit diagram information of the circuit to be simulated; and Determining the plurality of target devices from the plurality of devices according to circuit simulation accuracy requirements, attribute information of each of the plurality of devices, and connection information of each of the plurality of devices; The processing of the circuit network topology information to obtain target circuit network topology information adapted to a predetermined script grammar rule includes: Obtaining target attribute information of the power supply device adapted to a predetermined power supply device grammar rule in the predetermined script grammar rule according to the attribute information of the power supply device in the plurality of target devices; Obtaining target attribute information of the load device adapted to a predetermined load device grammar rule in the predetermined script grammar rule according to the attribute information of the load device in the plurality of target devices; Obtaining target attribute information of the discrete devices adapted to predetermined discrete device grammar rules in the predetermined script grammar rules according to the attribute information of the discrete devices in the plurality of target devices; Obtaining at least one target connection information adapted to a predetermined connection relationship grammar rule in the predetermined script grammar rule according to the respective connection information of the plurality of target devices; and The target circuit network topology information is obtained according to the target attribute information of the power device, the target attribute information of the load device, the target attribute information of the discrete device, and the at least one target connection information.
2. The method according to claim 1, characterized in that The circuit network topology information is obtained according to the circuit diagram information of the circuit to be simulated, including: The circuit network topology information is obtained according to the attribute information and connection information of each of the plurality of target devices.
3. The method according to claim 2, characterized in that The multiple target devices include a power supply device and at least one other device, the at least one other device includes a load device, or includes the load device and a discrete device, the circuit network topology information includes path information corresponding to at least one path from the power supply device to the load device, and the path information includes attribute information and connection information of each of the multiple target devices belonging to the path; The determining of the plurality of target devices from the plurality of devices according to the circuit simulation accuracy requirement, the attribute information of each of the plurality of devices, and the connection information of each of the plurality of devices includes: According to the device types included in the attribute information of each of the multiple devices, determining a device whose device type is a power supply from the multiple devices, and obtaining at least one of the power supply devices; and For any one of the at least one power supply devices, at least one other device belonging to the same path as the power supply device is determined from the multiple devices according to the connection information of the power supply device and the circuit simulation accuracy requirement.
4. The method according to claim 3, characterized in that The circuit simulation accuracy requirements include load current accuracy requirements and voltage drop accuracy requirements; The determining, from the plurality of devices, at least one other device belonging to the same path as the power supply device according to the connection information of the power supply device and the circuit simulation accuracy requirement includes: Determining, from the plurality of devices, at least one subsequent-stage device connected to the preceding-stage device according to the connection information of the preceding-stage device, wherein the power supply device is the first preceding-stage device; For any one of the at least one subsequent stage device, When the attribute information of the subsequent device does not include impedance information, determining that the subsequent device is the load device; In a case where the attribute information of the subsequent device includes the impedance information, determining whether the subsequent device is grounded according to the connection information of the subsequent device; In a case where the subsequent device is grounded and meets the load current accuracy requirement, determining that the subsequent device is the load device; and When the subsequent device is not grounded and meets the voltage drop accuracy requirement, the subsequent device is determined to be a discrete device, and the subsequent device is returned as the previous device to perform an operation of determining whether the subsequent device connected to the previous device is the load device or the discrete device.
5. The method according to claim 4, characterized in that The target attribute information of the discrete device includes a pseudo power device identifier and a pseudo load device identifier. The pseudo power device identifier indicates an end close to the power device in the path to which the discrete device belongs, and the pseudo load device identifier indicates an end close to the load device in the path to which the discrete device belongs.
6. The method according to any one of claims 1 to 4, characterized in that Also includes: The script template is obtained according to the predetermined script grammar rule, the attribute fields of each of the multiple device types, and the connection fields of each of the multiple device types, wherein the multiple device types are determined according to the attribute information of each of the multiple target devices.
7. The method according to any one of claims 1 to 4, characterized in that The step of generating an information entry script for entering the circuit diagram information based on a script template associated with the circuit to be simulated and the target circuit network topology information includes: The target circuit network topology information is added to a script template associated with the circuit to be simulated, and an information entry script for entering the circuit diagram information is generated.
8. An electronic device comprising: one or more processors; a memory for storing one or more computer programs, It is characterized in that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 7.
9. A computer-readable storage medium having a computer program or instruction stored thereon, characterized in that: When the computer program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Electronic circuit simulation system and method, and machine readable storage medium
CN113011120A
Electromagnetic interference analysis method and device for switching power supply, equipment and medium
CN115422792A