A circuit diagram modeling simulation analysis method, device, storage medium and equipment
By using a graphical interface to display the model library and construct the target circuit diagram in circuit simulation analysis, the increase in simulation analysis cost caused by incompatibility of data formats in the prior art is solved, and cross-platform compatibility of circuit diagram data and the efficiency of simulation analysis is improved.
Patent Information
- Application Number
- CN202510296468.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-13
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2045-03-13
AI Technical Summary
In the prior art, when circuit design data is migrated to a new simulation environment or integrated with other software, users often need to remodel due to incompatibility in the data format, which increases the cost of simulation analysis.
The model library is displayed through a preset graphical interface, and the user's layout operation instructions are obtained, the target circuit diagram is built and the basic data of the diagram is obtained. Then, according to the basic data and port number representation of the graph, the data is converted into netlist data required when interacting with the simulation analysis program to support data exchange of different simulation software.
It realizes cross-platform compatibility of circuit diagram data, reduces the cost of remodeling during migration or integration, and improves the efficiency and flexibility of simulation analysis.
Smart Images

Figure CN119783624A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of circuit simulation technology, and in particular to a method, device, storage medium and equipment for modeling, simulating and analyzing a circuit diagram. Background Art
[0002] Modeling and simulation software is a tool used to simulate and analyze system performance. Through modeling and simulation software, designs can be tested and evaluated without actually building or manufacturing physical prototypes, reducing expensive physical testing and unnecessary iterations, thereby effectively improving verification efficiency while reducing verification costs and risks, making modeling and simulation software an irreplaceable engineering simulation software and teaching software. In actual use, users can observe the circuit status at any time through the rich electronic components provided by modeling and simulation software, such as power supplies, resistors, inductors, pulleys, etc., by simply setting component parameters and simulation time. Among them, the more famous modeling and simulation software include Modelica, Matlab, Simulink, etc.
[0003] However, different modeling and simulation software usually use their own unique data formats to represent circuit diagram data. These data formats are often tailored for specific software or simulation environments, focusing on meeting the internal needs of the software and optimizing performance. Although this proprietary data format design has improved the operating efficiency of the software to a certain extent, it also brings obvious limitations. When users need to migrate circuit design data to a new simulation environment or integrate with other software, the existing data format is often difficult to directly expand or adapt, resulting in users needing to re-model, which greatly increases the cost of simulation analysis.
[0004] Therefore, how to reduce the cost of simulation analysis is an urgent problem to be solved. Summary of the invention
[0005] This specification provides a circuit diagram modeling simulation analysis method, device, storage medium and equipment to partially solve the above-mentioned problems existing in the prior art.
[0006] This manual adopts the following technical solutions: This specification provides a modeling simulation analysis method for a circuit diagram, the method comprising: Displaying a preset model library in a preset graphical interface, and obtaining layout operation instructions executed by a user for different models contained in the model library, the models being used to represent electronic components required to construct a circuit diagram, and wiring tools for connecting the electronic components; According to the layout operation instruction, a target circuit diagram is constructed, and the target circuit diagram is parsed to obtain graph basic data corresponding to the target circuit diagram; each node in the graph basic data is used to represent each graph element included in the target circuit diagram, and the graph elements include: electronic components and connections between electronic components; each edge in the graph data is used to represent a connection relationship between two graph elements; Upon receiving a simulation analysis instruction for the target circuit diagram, determining, according to the edges contained in the basic graph data, port number representations corresponding to the electronic components contained in the basic graph data, wherein the port number representations are used to characterize connection relationships between the electronic components; According to the diagram basic data and the port number representation, the diagram basic data is converted into the netlist data required for interacting with the simulation analysis program, so that the simulation analysis software performs simulation analysis on the target circuit diagram based on the netlist data.
[0007] Optionally, constructing a target circuit diagram according to the layout operation instruction specifically includes: According to the layout operation instruction, at least one model selected by the user is determined, and definition data of the model is determined, where the definition data is used to characterize basic attribute data of the model and a connection mode of the model; According to the definition data of the model, a target circuit diagram is constructed in a preset circuit diagram drawing canvas.
[0008] Optionally, parsing the target circuit diagram to obtain basic diagram data corresponding to the target circuit diagram specifically includes: Parsing the target circuit diagram to obtain circuit structure data for characterizing the target circuit diagram, wherein the circuit structure data includes: component entity representation data, line representation data, and connection point representation data; According to the circuit structure data, each node contained in the target circuit diagram and the node characteristics of each node are converted to obtain the graph basic data corresponding to the target circuit diagram.
[0009] Optionally, when receiving a simulation analysis instruction for the target circuit diagram, determining the port number representation corresponding to each electronic component contained in the diagram basic data according to the edges contained in the diagram basic data specifically includes: In case of receiving a simulation analysis instruction for the target circuit diagram, generating a task request; The task request is sent to each processor in sequence along the sequence of processors included in a preset processing flow chain until the task request is sent to a target processor that matches the task request, so that the target processor determines the port number representation corresponding to each electronic component included in the graph basic data according to the edges included in the graph basic data; wherein different processors in the processing flow chain are used to respond to different task requests and perform different simulation analysis tasks.
[0010] Optionally, determining, according to the edges included in the graph basic data, the port number representation corresponding to each electronic component included in the graph basic data specifically includes: Selecting a first target node from each node of the graph basic data, wherein the first target node is used to represent an electronic component; According to the node characteristics of the first target node, an instance object is constructed, and the connection points included in the instance object are determined; According to the sequence between the connection points, a port number is assigned to each connection point; According to the port number of each joint point, the port number representation corresponding to each electronic component contained in the basic data of the graph is determined.
[0011] Optionally, according to the port number of the joint point included in each instance object, determining the port number representation corresponding to each electronic component included in the graph basic data specifically includes: Linearly recursively traverse each second target node in the graph basic data to determine, for each instance object, other instance objects connected to the instance object through the line represented by the second target node, and determine, from each connection point of the instance object, a connection point used when connecting with the other instance objects; Reset the port number of the connection point of the instance object and the port number of the connection point of the other instance object to the same port number; wherein the reset port number is used to indicate that the instance object and the other instance object are connected to each other through the connection point corresponding to the reset port number; According to the reset port number, the port number representation corresponding to each electronic component included in the graph basic data is determined.
[0012] Optionally, determining the port number representation corresponding to each electronic component included in the graph basic data according to the reset port number specifically includes: When it is determined that there is an instance object of a specified type among the instance objects, adjusting the port number of the instance object of the specified type to a specified value; According to the adjusted port number, the port number representation corresponding to each electronic component included in the graph basic data is determined.
[0013] This specification provides a circuit diagram modeling simulation analysis device, including: An acquisition module, used to display a preset model library in a preset graphical interface, and to acquire layout operation instructions executed by a user for different models contained in the model library, the models being used to represent electronic components required for constructing a circuit diagram, and wiring tools for connecting the electronic components; A conversion module is used to construct a target circuit diagram according to the layout operation instruction, and parse the target circuit diagram to obtain graph basic data corresponding to the target circuit diagram; each node in the graph basic data is used to represent each graph element included in the target circuit diagram, and the graph elements include: electronic components and connections between electronic components; each edge in the graph data is used to represent a connection relationship between two graph elements; A determination module, configured to determine, upon receiving a simulation analysis instruction for the target circuit diagram, a port number representation corresponding to each electronic component contained in the graph basic data according to the edges contained in the graph basic data, wherein the port number representation is used to characterize a connection relationship between the electronic components; The simulation analysis module is used to convert the basic diagram data into the netlist data required for interacting with the simulation analysis program according to the basic diagram data and the port number representation, so that the simulation analysis software can perform simulation analysis on the target circuit diagram based on the netlist data.
[0014] This specification provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the modeling, simulation and analysis method of the above-mentioned circuit diagram is implemented.
[0015] This specification provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the modeling, simulation and analysis method of the above-mentioned circuit diagram when executing the program.
[0016] At least one of the above technical solutions adopted in this specification can achieve the following beneficial effects: In the modeling, simulation and analysis method of the circuit diagram provided in the present specification, a preset model library is first displayed in a preset graphical interface, and layout operation instructions executed by the user for different models contained in the model library are obtained, wherein the model is used to represent the electronic components required for constructing the circuit diagram, and the wiring tool for connecting the electronic components, and then according to the layout operation instructions, the target circuit diagram is constructed, and the target circuit diagram is parsed to obtain the basic graph data corresponding to the target circuit diagram, each node in the basic graph data is used to represent each graph element contained in the target circuit diagram, and the graph elements include: electronic components, and the wiring between the electronic components, and each edge in the graph data is used to represent the connection relationship between two graph elements, and when the simulation analysis instruction for the target circuit diagram is received, the port number representation corresponding to each electronic component contained in the basic graph data is determined according to the edge contained in the basic graph data, and the port number representation is used to represent the connection relationship between the electronic components, and according to the basic graph data and the port number representation, the basic graph data is converted into the netlist data required for interacting with the simulation analysis program, so that the simulation analysis software performs simulation analysis on the target circuit diagram based on the netlist data.
[0017] It can be seen from the above method that the server can convert the target circuit diagram drawn by the user in the graphical interface into a form of graphic data that is independent of the specific simulation analysis program and store it as an intermediate representation. This can support the user's editing operations in the graphical interface and intuitively represent the topological structure between the electronic components in the target circuit diagram and the basic properties of the electronic components. At the same time, when simulation analysis is required, it can be converted into netlist data in different formats supported by different simulation analysis software, so as to facilitate flexible data exchange among different simulation analysis software and different functional modules, thereby effectively reducing the cost of simulation analysis. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The drawings described herein are used to provide a further understanding of this specification and constitute a part of this specification. The illustrative embodiments and descriptions of this specification are used to explain this specification and do not constitute an improper limitation on this specification. In the drawings: Figure 1 A schematic diagram of a flow chart of a modeling and simulation analysis method for a circuit diagram provided in this specification; Figure 2 A schematic diagram of the circuit structure data provided in this specification; Figure 3A A schematic diagram of the port numbers of the connection points provided in this manual; Figure 3B A schematic diagram of a port number of a connection point after reset provided in this specification; Figure 4A schematic diagram of the process of circuit diagram simulation analysis provided in this specification; Figure 5 A schematic diagram of a circuit diagram modeling simulation analysis device provided in this specification; Figure 6 A method corresponding to the Figure 1 Schematic diagram of electronic equipment. DETAILED DESCRIPTION
[0019] In order to make the purpose, technical solutions and advantages of this specification more clear, the technical solutions of this specification will be clearly and completely described below in combination with the specific embodiments of this specification and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of this specification, not all of them. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this specification.
[0020] The technical solutions provided by the embodiments of this specification are described in detail below in conjunction with the accompanying drawings.
[0021] Figure 1 A schematic diagram of a modeling and simulation analysis method for a circuit diagram provided in this specification includes the following steps: S101: displaying a preset model library in a preset graphical interface, and obtaining layout operation instructions executed by the user for different models included in the model library, wherein the models are used to represent electronic components required to construct a circuit diagram.
[0022] In this specification, the business platform can provide a preset model library to the user through a preset graphical interface, so that the user can execute layout operation instructions such as dragging, text editing, and clicking for different models contained in the model library in the graphical interface, and then the model selected by the user can be determined according to the layout operation instructions sent by the user, and the definition data configured by the user for the selected model can be determined, and then the target circuit diagram can be constructed in the circuit diagram drawing canvas according to the model selected by the user and the definition data of the model, and simulation analysis can be performed based on the constructed target circuit diagram.
[0023] Among them, the above-mentioned model may refer to the symbols pre-provided by the business platform to users for representing the electronic components required to construct circuit diagrams, as well as the wiring tools used to connect these electronic components. The electronic components here may be, for example: power supplies, resistors, capacitors, transistors, etc.
[0024] The definition data of the above-mentioned model may refer to data used to describe the basic properties of the electronic components corresponding to the model in circuit design and simulation, as well as necessary information such as the connection method of the model, such as: component name, manufacturer name, model, electrical characteristic parameters (such as resistance, rated power, capacitance, withstand voltage, etc.), size, pin layout (a model can have multiple pins for connecting with other models, and the pins here can refer to the metal joint points on the model), connection method, etc.
[0025] It should be noted that among the models included in the model library, the definition data of some models may be fixed, and of course, the definition data of some models may be customized by users. In this case, the business platform can set basic definition data for each model in the model library, so that when the user needs to customize the definition data of at least some of the selected models, the user can execute the layout operation instructions for the model requiring customized definition data in the graphical interface based on the basic definition data of the model requiring customized definition data, so as to obtain the modified definition data of the model requiring customized definition data, so that the business platform can construct the target circuit diagram according to the modified definition data of the model.
[0026] In this specification, the execution entity used to implement the modeling, simulation and analysis method of the circuit diagram may refer to a designated device such as a server set up on a business platform, or may refer to a terminal device such as a desktop computer or a laptop computer. For the sake of ease of description, the modeling, simulation and analysis method of the circuit diagram provided in this specification is described below using the server as the execution entity as an example.
[0027] S102: Construct a target circuit diagram according to the layout operation instruction, and parse the target circuit diagram to obtain graph basic data corresponding to the target circuit diagram; each node in the graph basic data is used to represent each graph element included in the target circuit diagram, and the graph elements include: electronic components and connections between electronic components; each edge in the graph data is used to represent the connection relationship between two graph elements.
[0028] It should be noted that in this specification, component entities, lines, and connection points included in different circuit diagrams may be represented by component entities representing data, lines representing data, and connection points representing data.
[0029] Among them, the component entity can refer to an electronic component extended from the model for drawing actual circuit diagrams. The component entity has multiple pins for connecting between component entities. The pins here can be metal connectors on the entity for connecting different component entities.
[0030] In the above content, lines can refer to the connections between various electronic components in the circuit diagram. These lines can be straight lines, curves, broken lines or other forms. Their role in the circuit diagram is to show the flow direction and connection relationship of current, signal or power supply.
[0031] In the above content, a joint point can refer to the connection point of two or more wires or conductors in a circuit. A joint point can be a physical connection between different parts or components in a circuit, which allows current or signals to pass from one part to another.
[0032] From the above content, it can be seen that through the above circuit structure data, a data representation of a complex circuit diagram can be completely defined. For ease of understanding, the following is combined Figure 2 The above-mentioned circuit configuration data will be described in detail.
[0033] Figure 2 This is a schematic diagram of the circuit structure data provided in this manual.
[0034] Combination Figure 2 It can be seen that for each component entity data Entity, it can include attributes such as model definition data Model and pins Pins, and for each line representation data Edge, it can include attributes such as the start connection point Start Joint and the end connection point End Joint.
[0035] From the above content, it can be seen that the server can represent the target circuit diagram through component entity representation data Entity, line representation data Edge, and connection point representation data Joints.
[0036] Based on this, the server can construct a target circuit diagram according to the layout operation instructions executed by the user in the graphical interface, and then analyze the target circuit diagram to obtain circuit structure data corresponding to the target circuit diagram.
[0037] Furthermore, after obtaining the circuit structure data corresponding to the target circuit diagram, the server can convert each node contained in the target circuit diagram and the node characteristics of each node according to the circuit structure data to obtain the graph basic data corresponding to the target circuit diagram, and then store the graph structure of the target circuit diagram through the graph data.
[0038] Specifically, the server can create a node corresponding to each diagram element contained in the target circuit diagram according to the component entity representation data or line representation data of the diagram element, and then determine the node characteristics of the node corresponding to the diagram element according to the attributes of the component entity representation data or line representation data of the diagram element and the connection point representation data contained in the diagram element.
[0039] Among them, for each graphic element corresponding to an electronic component included in the target circuit diagram, if the connection point representation data contained in the graphic element is consistent with the connection point representation data contained in the graphic element corresponding to the connection between the electronic components, it can be considered that the graphic element and the graphic element corresponding to the connection between the above-mentioned electronic components are connected through the connection point corresponding to the connection point representation data contained in the graphic element. At this time, it can be determined that the node used to represent the graphic element in the above-mentioned basic graph data and the node used to represent the graphic element corresponding to the connection between the above-mentioned electronic components are connected through an edge. By analogy, the server can convert and store the basic graph data corresponding to the target circuit diagram based on the circuit structure data.
[0040] In actual application scenarios, the formats of netlist data used by different simulation and analysis programs are often different, such as SPICE netlist, Verilog netlist, EDIF netlist, etc. At this time, the server can also pre-set a conversion program for converting the basic diagram data into the netlist data in that format for each format of netlist data, so that when receiving the simulation and analysis instructions for the target circuit diagram, the format of the netlist data to be converted can be determined according to the simulation and analysis instructions as the target format, and then the conversion program matching the target format can be determined from the preset conversion programs, and the basic diagram data can be converted into the netlist data required for interaction with the simulation and analysis program through the conversion program matching the target format.
[0041] It should be noted that the simulation analysis tasks performed by users when performing simulation analysis on different circuit diagrams may be different (for example, in the circuit performance simulation analysis task, it is necessary to simulate and analyze the basic parameters of the circuit, such as voltage, current, and power. In the signal integrity simulation analysis task, it is necessary to analyze the transmission quality of the signal in the circuit, including reflection, crosstalk, attenuation, etc.), and the execution logic of different simulation analysis tasks is often different. Therefore, it is often necessary to deploy code programs for executing different task logics in the server, which makes it often difficult to manage and maintain these code programs.
[0042] Therefore, in this specification, the code programs of the above-mentioned different task logics and the conversion programs in the above-mentioned content can be deployed in different processors, and these processors can be stored through a chain structure, so that the server can generate a task request according to the received simulation analysis instructions for the target circuit diagram when receiving the simulation analysis instructions for the target circuit diagram, and send the task request to each processor in sequence along the sequence between the processors included in the preset processing flow chain until the task request is sent to the target processor that matches the task request, so that the target processor determines the port number representation corresponding to each electronic component contained in the graph basic data according to the edges contained in the graph basic data.
[0043] S103: upon receiving a simulation analysis instruction for the target circuit diagram, determining the port number representation corresponding to each electronic component contained in the basic data of the diagram according to the edges contained in the basic data of the diagram, wherein the port number representation is used to characterize the connection relationship between the electronic components.
[0044] S104: According to the diagram basic data and the port number representation, convert the diagram basic data into the netlist data required for interacting with the simulation analysis program, so that the simulation analysis software performs simulation analysis on the target circuit diagram based on the netlist data.
[0045] In this specification, when the server determines that simulation analysis needs to be performed on a target circuit diagram, it can obtain the graph basic data corresponding to the target circuit diagram, and then determine the port number representation corresponding to each electronic component included in the target circuit diagram based on the edges contained in the graph basic data, and then, based on the graph basic data and the port number representation corresponding to each electronic component included in the target circuit diagram, the graph basic data can be converted into the netlist data required for interacting with the simulation analysis program, so as to perform simulation analysis on the target circuit diagram based on the netlist data.
[0046] There may be multiple conditions under which the server determines that simulation analysis needs to be performed on the target circuit diagram. For example, when a simulation analysis instruction for the target circuit diagram is received, a task request can be generated based on the simulation configuration parameters set by the user (such as simulation time, simulation step, analysis type, etc.), and then the server can determine that simulation analysis needs to be performed on the target circuit diagram based on the task request.
[0047] For another example, when a user inputs or adjusts simulation configuration parameters in a graphical interface, the server can automatically determine that simulation analysis needs to be performed on the target circuit diagram when detecting changes in these parameters.
[0048] In the above content, the method for determining the port number representation corresponding to each electronic component included in the target circuit diagram according to the edges included in the graph basic data can be that the server selects the first target node (i.e., the node used to characterize the electronic component) from each node of the graph basic data, and then constructs an instance object (each instance object is used to characterize each electronic component in the target circuit) according to the node characteristics of the first target node, and determines the connection points contained in the instance object, and then assigns port numbers to the connection points contained in each instance object according to the order of the connection points contained in each instance object.
[0049] Furthermore, the server can determine the port number representation corresponding to each electronic component contained in the graph basic data according to the port number of the connection point contained in each instance object, as shown in the following example: Figure 3A shown.
[0050] Figure 3A A schematic diagram of the port numbers of the connection points provided in this manual.
[0051] exist Figure 3A The target circuit diagram shown includes four electronic components, namely, a single-phase sinusoidal AC voltage source, a resistor, an ammeter, a voltage probe, and a special component grounding. Among them, the single-phase sinusoidal AC voltage source includes 2 connection points, the voltage probe includes 1 connection point, the resistor includes 2 connection points, the ammeter includes 2 connection points, and the grounding includes 1 connection point.
[0052] At this time, the server can select the first target nodes corresponding to the single-phase sinusoidal AC voltage source, resistor, ammeter, and voltage probe from each node of the graph basic data, and construct the instance object of the single-phase sinusoidal AC voltage source, the instance object of the resistor, the instance object of the ammeter, and the instance object of the voltage probe according to the node characteristics of the first target node, and determine the connection points contained in each instance object. Then, port numbers can be assigned to the connection points contained in each instance object according to the sequence between the connection points. Figure 3A The single-phase sinusoidal AC voltage source shown in the figure includes a connection point with port number 1 and a connection point with port number 2, the voltage probe includes a connection point with port number 3, the resistor includes a connection point with port number 4 and a connection point with port number 5, and the ammeter includes a connection point with port number 6 and a connection point with port number 7.
[0053] The sequence between the joint points may refer to the sequence of traversing each joint point of different instance objects.
[0054] In the above content, according to the sequence between the connection points, the method of allocating port numbers to the connection points contained in each instance object can be to allocate port numbers to the connection points contained in each instance object in sequence in an ascending manner according to the sequence between the connection points.
[0055] Furthermore, after the server assigns port numbers to the connection points contained in each instance object in turn, it is also necessary to linearly recursively traverse each second target node in the graph basic data to determine, for each instance object, other instance objects connected to the instance object through the line represented by the second target node, and determine from the connection points of the instance object the connection point used to connect with other instance objects, and reset the port number of the connection point of the instance object and the port number of the connection points of other instance objects to the same port number.
[0056] The reset port number is used to indicate that the instance object and other instance objects are connected to each other via the connection point corresponding to the reset port number.
[0057] Furthermore, the server can determine the port number representation corresponding to each electronic component contained in the graph basic data according to the port number of the connection point contained in each reset instance object. Figure 3B shown.
[0058] Figure 3B A schematic diagram of the port number of a connection point after reset provided in this specification.
[0059] Combination Figure 3B It can be seen that for the instance object corresponding to the single-phase sinusoidal AC voltage source, the connection point with port number 1 of the instance object is connected to the connection point with port number 3 of the instance object corresponding to the voltage probe and the connection point with port number 4 of the instance object corresponding to the resistor through a connecting line. At this time, the above-mentioned connection point with port number 1, the connection point with port number 3, and the connection point with port number 4 can be used as connection points, and then the port numbers corresponding to the above-mentioned three connection points can be reset to the same port number to represent that the instance object corresponding to the above-mentioned single-phase sinusoidal AC voltage source, the instance object corresponding to the voltage probe, and the instance object corresponding to the resistor are connected through connecting lines and the connection points corresponding to the above-mentioned reset port numbers.
[0060] Specifically, the server can determine the port number of the connection point of the instance object corresponding to the single-phase sinusoidal AC voltage source as the reset port number of the above-mentioned three connection points according to the order between the instance objects, that is, the port numbers of the connection points with port number 3 and the connection points with port number 4 are set to 1.
[0061] It should be noted that, for each electronic component, when a certain connection point in the electronic component is connected to other connection points of the electronic component through a connection line, the connection point used to connect to the connection line is the connection point.
[0062] In addition, in actual application scenarios, the circuit diagrams drawn by users often contain special components, such as grounding, input and output ports, etc.
[0063] At this time, the server can also reset the port number of the instance object of the specified type to a specified value (the above-mentioned specified value can be set according to actual needs, for example: 0) when it is determined that there is an instance object of the specified type in each instance object. Then, based on the reset port number, the server can determine the port number representation corresponding to the electronic component matching the instance object of the specified type contained in the graph basic data, and determine the port number representation corresponding to each electronic component contained in the graph basic data based on the port number of the connection point contained in each re-determined instance object.
[0064] It is worth noting that, for each electronic component, the port number of the electronic component is used to characterize the connection relationship between the electronic component and other electronic components.
[0065] For example: Figure 3B In the figure, the single-phase sinusoidal AC voltage source is connected to other electronic components through the connection point with port number 1 and the connection point with port number 2. At this time, the port number representation of the single-phase sinusoidal AC voltage source is (1,2). By analogy, it can be known that the port number representation of the resistor is (1,5). Furthermore, according to the port number representation of the single-phase sinusoidal AC voltage source and the port number representation of the resistor, it can be known that the single-phase sinusoidal AC voltage source is connected to the connection point with port number 1 in the resistor through the connection point with port number 1 and the connecting line.
[0066] Furthermore, the server may convert the graph basic data into netlist data required for interaction with the simulation analysis program according to the graph basic data and the port number representation.
[0067] For example, part of the netlist data used to characterize the above-mentioned single-phase sinusoidal AC voltage source may be {"label":"AC","name":"AC1","index":1","type":"ELECTRIC","ports":[1,2]}, and so on, to obtain the netlist data used to characterize the target circuit diagram.
[0068] It should be noted that the above-mentioned netlist data may include: nodes (Elements), ports (Ports), attributes (Attributes) and other feature components.
[0069] Among them, nodes are used to represent various logic gates, devices, input and output ports in the circuit. Each node has a unique identifier and name, which is used to correspond to the basic elements in the target circuit diagram.
[0070] Ports are used to represent the connections between nodes in a circuit. The number of ports indicates the number of connection points. When the port numbers are the same, it means that they are connected in the circuit.
[0071] In addition, the attributes of each node or connection in the netlist data are used to describe additional information such as the characteristics, functions, physical location, etc. of the node or connection.
[0072] For example, nodes can have different logical functions (such as AND, OR, NOT, etc.), or can have different basic properties (switch closure state, resistance, capacitance, etc.).
[0073] For ease of understanding, the following describes in detail the calling relationship in the simulation analysis process using the above-mentioned circuit diagram modeling simulation analysis method. Figure 4 shown.
[0074] Figure 4 This is a schematic diagram of the process of circuit diagram simulation analysis provided in this specification.
[0075] Combination Figure 4 It can be seen that the user can execute layout operation instructions for different models contained in the model library in the graphical interface, select different electronic components and connect the electronic components after configuring the definition data of each electronic component, so as to construct the target circuit diagram in the circuit diagram drawing canvas provided in the graphical interface.
[0076] The server can parse the target circuit diagram drawn by the user by calling the server process, obtain the basic diagram data corresponding to the target circuit diagram and store it.
[0077] Furthermore, when the server determines that it needs to perform simulation analysis on the target circuit diagram, it can call the server-side process to convert the basic diagram data corresponding to the target circuit diagram into the netlist data required for interacting with the simulation analysis program. Then, the computing-side process can be called to perform simulation analysis based on the netlist data corresponding to the target circuit diagram and obtain the simulation analysis results.
[0078] It should be noted that the above simulation analysis results may be time series representation data, that is, calculation results used to characterize the change of target parameters (such as current, voltage) over time within a specified time period.
[0079] It can be seen from the above method that the server can convert the target circuit diagram drawn by the user in the graphical interface into a form of graphic data that is independent of the specific simulation analysis program and store it as an intermediate representation. This can support the user's editing operations in the graphical interface and intuitively represent the topological structure between the electronic components in the target circuit diagram and the basic properties of the electronic components. At the same time, when simulation analysis is required, it can be converted into netlist data in different formats supported by different simulation analysis software, so as to facilitate flexible data exchange among different simulation analysis software and different functional modules, thereby effectively reducing the cost of simulation analysis.
[0080] The above is one or more circuit diagram modeling and simulation analysis methods implemented in this specification. Based on the same idea, this specification also provides a corresponding circuit diagram modeling and simulation analysis device, such as Figure 5 shown.
[0081] Figure 5 A schematic diagram of a circuit diagram modeling simulation analysis device provided in this specification includes: An acquisition module 501 is used to display a preset model library in a preset graphical interface and acquire layout operation instructions executed by a user for different models included in the model library, the models being used to represent electronic components required for constructing a circuit diagram, and wiring tools for connecting the electronic components; The conversion module 502 is used to construct a target circuit diagram according to the layout operation instruction, and parse the target circuit diagram to obtain graph basic data corresponding to the target circuit diagram; each node in the graph basic data is used to represent each graph element included in the target circuit diagram, and the graph elements include: electronic components and lines between electronic components; each edge in the graph data is used to represent the connection relationship between two graph elements; A determination module 503 is used to determine, upon receiving a simulation analysis instruction for the target circuit diagram, a port number representation corresponding to each electronic component contained in the graph basic data according to the edges contained in the graph basic data, wherein the port number representation is used to characterize a connection relationship between the electronic components; The simulation analysis module 504 is used to convert the basic diagram data into the netlist data required for interacting with the simulation analysis program according to the basic diagram data and the port number representation, so that the simulation analysis software can perform simulation analysis on the target circuit diagram based on the netlist data.
[0082] Optionally, the conversion module 502 is specifically used to determine at least one model selected by the user according to the layout operation instruction, and determine definition data of the model, wherein the definition data is used to characterize basic attribute data of the model and a connection method of the model; and construct a target circuit diagram in a preset circuit diagram drawing canvas according to the definition data of the model.
[0083] Optionally, the conversion module 502 is specifically used to parse the target circuit diagram to obtain circuit structure data for characterizing the target circuit diagram, the circuit structure data including: component entity representation data, line representation data, connection point representation data; based on the circuit structure data, each node contained in the target circuit diagram and the node characteristics of each node are converted to obtain the graph basic data corresponding to the target circuit diagram.
[0084] Optionally, the determination module 503 is specifically used to generate a task request when receiving a simulation analysis instruction for the target circuit diagram; when it is determined according to the task request that simulation analysis needs to be performed on the target circuit diagram, the task request is sent to each processor in sequence along the sequence between the processors included in the preset processing flow chain, until the task request is sent to the target processor that matches the task request, so that the target processor determines the port number representation corresponding to each electronic component included in the graph basic data according to the edges included in the graph basic data; wherein different processors in the processing flow chain are used to respond to different task requests and perform different simulation analysis tasks.
[0085] Optionally, the determination module 503 is specifically used to select a first target node from each node of the graph basic data, wherein the first target node is used to characterize an electronic component; construct an instance object based on the node characteristics of the first target node, and determine the connection points contained in the instance object; assign a port number to each connection point based on the sequence between the connection points; and determine the port number representation corresponding to each electronic component contained in the graph basic data based on the port number of each connection point.
[0086] Optionally, the determination module 503 is specifically used to linearly recursively traverse each second target node in the graph basic data to determine, for each instance object, other instance objects connected to the instance object through the line represented by the second target node, and determine the connection point used to connect with the other instance objects from each connection point of the instance object; reset the port number of the connection point of the instance object and the port number of the connection point of the other instance object to the same port number; wherein the reset port number is used to represent that the instance object and the other instance objects are connected to each other through the connection point corresponding to the reset port number; and determine the port number representation corresponding to each electronic component contained in the graph basic data according to the reset port number.
[0087] Optionally, the determination module 503 is specifically used to, when it is determined that an instance object of a specified type exists among the instance objects, adjust the port number of the instance object of the specified type to a specified value; and determine the port number representation corresponding to each electronic component contained in the graph basic data based on the adjusted port number.
[0088] This specification also provides a computer-readable storage medium, which stores a computer program, which can be used to execute the above Figure 1 A modeling, simulation and analysis method for circuit diagrams is provided.
[0089] This manual also provides Figure 6 The one shown corresponds to Figure 1 A schematic diagram of the electronic device. Figure 6 As mentioned above, at the hardware level, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, and may also include other hardware required for the business. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to achieve the above Figure 1 Of course, in addition to the software implementation, this specification does not exclude other implementations, such as logic devices or a combination of software and hardware, etc., that is, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0090] For the improvement of a technology, it can be clearly distinguished whether it is a hardware improvement (for example, improvement of the circuit structure of diodes, transistors, switches, etc.) or a software improvement (improvement of the method flow). However, with the development of technology, many improvements of the method flow today can be regarded as direct improvements of the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that the improvement of a method flow cannot be implemented with a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming themselves, without having to ask chip manufacturers to design and make dedicated integrated circuit chips. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one kind of HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.
[0091] The controller may be implemented in any suitable manner, for example, the controller may take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (e.g., software or firmware) executable by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller, examples of which include but are not limited to the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320, and the memory controller may also be implemented as part of the control logic of the memory. It is also known to those skilled in the art that, in addition to implementing the controller in a purely computer-readable program code manner, the controller may be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, such a controller may be considered as a hardware component, and the devices for implementing various functions included therein may also be considered as structures within the hardware component. Or even, the devices for implementing various functions may be considered as both software modules for implementing the method and structures within the hardware component.
[0092] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0093] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0094] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems, or computer program products. Therefore, this specification may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0095] This specification is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of this specification. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0096] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0097] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0098] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0099] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0100] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0101] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0102] It should be understood by those skilled in the art that the embodiments of this specification may be provided as methods, systems or computer program products. Therefore, this specification may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0103] This specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. This specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0104] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0105] The above description is only an embodiment of the present specification and is not intended to limit the present specification. For those skilled in the art, the present specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present specification shall be included in the scope of the claims of the present specification.
Claims
1. A modeling and simulation analysis method for a circuit diagram, characterized in that: The method comprises: Displaying a preset model library in a preset graphical interface, and obtaining layout operation instructions executed by a user for different models contained in the model library, the models being used to represent electronic components required to construct a circuit diagram, and wiring tools for connecting the electronic components; According to the layout operation instruction, a target circuit diagram is constructed, and the target circuit diagram is parsed to obtain graph basic data corresponding to the target circuit diagram; each node in the graph basic data is used to represent each graph element included in the target circuit diagram, and the graph elements include: electronic components and connections between electronic components; each edge in the graph data is used to represent a connection relationship between two graph elements; Upon receiving a simulation analysis instruction for the target circuit diagram, determining, according to the edges contained in the basic graph data, port number representations corresponding to the electronic components contained in the basic graph data, wherein the port number representations are used to characterize connection relationships between the electronic components; According to the diagram basic data and the port number representation, the diagram basic data is converted into the netlist data required for interacting with the simulation analysis program, so that the simulation analysis software performs simulation analysis on the target circuit diagram based on the netlist data.
2. The method according to claim 1, characterized in that According to the layout operation instruction, constructing a target circuit diagram specifically includes: According to the layout operation instruction, at least one model selected by the user is determined, and definition data of the model is determined, where the definition data is used to characterize basic attribute data of the model and a connection mode of the model; According to the definition data of the model, a target circuit diagram is constructed in a preset circuit diagram drawing canvas.
3. The method according to claim 1, characterized in that The target circuit diagram is parsed to obtain basic diagram data corresponding to the target circuit diagram, specifically including: Parsing the target circuit diagram to obtain circuit structure data for characterizing the target circuit diagram, wherein the circuit structure data includes: component entity representation data, line representation data, and connection point representation data; According to the circuit structure data, each node contained in the target circuit diagram and the node characteristics of each node are converted to obtain the graph basic data corresponding to the target circuit diagram.
4. The method according to claim 1, characterized in that In the case of receiving a simulation analysis instruction for the target circuit diagram, determining, according to the edges contained in the basic data of the diagram, the port number representation corresponding to each electronic component contained in the basic data of the diagram, specifically includes: In case of receiving a simulation analysis instruction for the target circuit diagram, generating a task request; The task request is sent to each processor in sequence along the sequence of processors included in a preset processing flow chain until the task request is sent to a target processor that matches the task request, so that the target processor determines the port number representation corresponding to each electronic component included in the graph basic data according to the edges included in the graph basic data; wherein different processors in the processing flow chain are used to respond to different task requests and perform different simulation analysis tasks.
5. The method according to claim 1, characterized in that Determining, according to the edges included in the graph basic data, the port number representation corresponding to each electronic component included in the graph basic data, specifically includes: Selecting a first target node from each node of the graph basic data, wherein the first target node is used to represent an electronic component; According to the node characteristics of the first target node, an instance object is constructed, and the connection points included in the instance object are determined; According to the sequence between the connection points, a port number is assigned to each connection point; According to the port number of each joint point, the port number representation corresponding to each electronic component contained in the basic data of the graph is determined.
6. The method according to claim 5, characterized in that According to the port number of the joint point contained in each instance object, the port number representation corresponding to each electronic component contained in the graph basic data is determined, specifically including: Linearly recursively traverse each second target node in the graph basic data to determine, for each instance object, other instance objects connected to the instance object through the line represented by the second target node, and determine, from each connection point of the instance object, a connection point used when connecting with the other instance objects; Reset the port number of the connection point of the instance object and the port number of the connection point of the other instance object to the same port number; wherein the reset port number is used to indicate that the instance object and the other instance object are connected to each other through the connection point corresponding to the reset port number; According to the reset port number, the port number representation corresponding to each electronic component included in the graph basic data is determined.
7. The method according to claim 6, characterized in that Determining the port number representation corresponding to each electronic component included in the graph basic data according to the reset port number specifically includes: When it is determined that there is an instance object of a specified type among the instance objects, adjusting the port number of the instance object of the specified type to a specified value; According to the adjusted port number, the port number representation corresponding to each electronic component included in the graph basic data is determined.
8. A circuit diagram modeling simulation analysis device, characterized in that: include: An acquisition module, used to display a preset model library in a preset graphical interface, and to acquire layout operation instructions executed by a user for different models contained in the model library, the models being used to represent electronic components required for constructing a circuit diagram, and wiring tools for connecting the electronic components; A conversion module, used to construct a target circuit diagram according to the layout operation instruction, and parse the target circuit diagram to obtain basic diagram data corresponding to the target circuit diagram; Each node in the graph basic data is used to represent each graph element included in the target circuit diagram, and the graph elements include: electronic components and connections between electronic components; each edge in the graph data is used to represent a connection relationship between two graph elements; A determination module, configured to determine, upon receiving a simulation analysis instruction for the target circuit diagram, a port number representation corresponding to each electronic component contained in the graph basic data according to the edges contained in the graph basic data, wherein the port number representation is used to characterize a connection relationship between the electronic components; The simulation analysis module is used to convert the basic diagram data into the netlist data required for interacting with the simulation analysis program according to the basic diagram data and the port number representation, so that the simulation analysis software can perform simulation analysis on the target circuit diagram based on the netlist data.
9. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method described in any one of claims 1 to 7 is implemented.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method described in any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Information pushing method and device, storage medium and electronic equipment
CN118365177A
Software testing method and device based on graph matching, storage medium and equipment
CN118642974A
Integrated circuit test method and system
CN118884191A
Method for intelligently identifying power failure range of distribution network maintenance single line diagram based on OCS system
CN119360084A
AMS circuit automatic design method using large language model
CN119476168A
Cited By
Integrated circuit model verification method and system, computer equipment and storage medium
CN120257919A