Phase compensation method, device, equipment, storage medium and computer program product

By establishing a basic circuit unit library and signal flow diagram in the operational amplifier circuit, marking and adding compensation nodes, the problems of low efficiency and small application scope in the prior art are solved, and the phase compensation of efficient and reliable multi-stage operational amplifier circuits are achieved.

CN118740069BActive Publication Date: 2025-04-25TESSERSOFT CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411187832.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-28
Publication Date
2025-04-25
Estimated Expiration
2044-08-28

AI Technical Summary

Technical Problem

The existing automated operational amplifier circuit phase compensation method has design defects and cannot provide an efficient and reliable phase compensation solution with a wide range of applications, especially in multi-stage operational amplifier circuits.

Method used

By establishing a basic circuit unit library, modularly segmenting the op-amp circuit to be compensated, encoded into a signal flow diagram, marking the node to be compensated, and adding compensation nodes according to the signal path attributes and transmission relationships, all possible phase compensation schemes are generated.

Benefits of technology

It realizes efficient and reliable obtaining phase compensation scheme for multi-stage op-amp circuits, reducing the search space and improving the efficiency and accuracy of the design.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118740069B_ABST
    Figure CN118740069B_ABST
Patent Text Reader

Abstract

The present invention provides a phase compensation method, device, equipment, storage medium and computer program product. The method comprises modularly dividing the operational amplifier circuit to be compensated based on a basic circuit unit library to obtain N circuit modules; encoding the divided operational amplifier circuit to be compensated into a signal flow graph; in the signal flow graph, when the circuit module corresponding to the signal node is g m When a basic circuit unit of the same type is found, the corresponding signal node is marked as a node to be compensated by a first marking method, and the node to be compensated in the same signal path is marked again by a second marking method; according to the signal path attribute of each node to be compensated, the second marking method of each node to be compensated, and the transmission relationship between any two nodes to be compensated, a compensation node is added to the signal flow graph, and all compensation schemes of the signal flow graph are obtained and decoded into a circuit schematic diagram. The present invention provides an efficient and reliable automated phase compensation method.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of circuit design automation technology in analog integrated circuit design, and in particular to a phase compensation method, device, equipment, storage medium and computer program product. Background Art

[0002] Operational amplifiers are prone to phase lag problems at high frequencies, which can cause system instability or even oscillation. In order to ensure the stability of the operational amplifier under various working conditions, phase compensation must be performed.

[0003] At present, the phase compensation of operational amplifier circuits is usually designed manually by experienced engineers. The existing automated methods have many problems such as large search space, low efficiency, and poor reproducibility. Taking an automated phase compensation method for operational amplifier circuits as an example, the main steps are: first, the behavioral level description of the operational amplifier is mapped into an acyclic graph, the nodes in the circuit correspond to the vertices in the graph, and the connections between different circuit nodes are mapped to the edges in the graph. Then, a standard voltage-controlled current source is used, and a pair of capacitors C and resistors R are connected in parallel to the ground to simulate the gain unit of a single-stage amplifier, where the voltage-controlled current source includes four types. Secondly, for a three-stage operational amplifier, there will be 5 vertices in the acyclic graph, and there are 25 types of connections between the 5 vertices in the graph. If all vertices in the graph are allowed to connect freely, there will be 10 edges in the graph, so there will be 25 10 possible compensation schemes. This is a very large search space, which will generate many invalid circuits. Even if Bayesian optimization is used to determine the connection types between vertices in the acyclic graph and filter out these invalid structures, the search space of the acyclic graph is limited to only 10 5 level.

[0004] In summary, this automated phase compensation method for operational amplifier circuits is designed for a certain number of operational amplifier circuits, and the search space is large. In addition, the Bayesian optimization is random, and multiple runs of the algorithm will produce different optimization solutions, resulting in the final phase compensation solution being random and inefficient. In addition, for multi-stage operational amplifiers, the automated operational amplifier phase compensation method designed for a certain stage of operational amplifiers is difficult to use directly. Summary of the invention

[0005] In view of the deficiencies in the prior art, the present invention provides a phase compensation method, device, equipment, storage medium and computer program product, which solve the problem that the automated operational amplifier phase compensation method in the prior art has design defects and cannot provide an efficient, reliable and widely applicable phase compensation solution.

[0006] According to an embodiment of the present invention, a first aspect provides a phase compensation method, comprising:

[0007] Establish a basic circuit unit library; in the basic circuit unit library, create an index number for each basic circuit unit and g m Mark the basic circuit units of the type;

[0008] Based on the basic circuit unit library, modularly divide the operational amplifier circuit to be compensated to obtain N circuit modules; any circuit module corresponds to a basic circuit unit in the basic circuit unit library;

[0009] The segmented operational amplifier circuit to be compensated is encoded into a signal flow graph; wherein the signal nodes in the signal flow graph represent the circuit modules, and the edges in the signal flow graph represent the connection relationship between the circuit modules; the signal nodes contain the index number information of the basic circuit units corresponding to the circuit modules, and the edges contain the attribute information of the source node output port and the target node input port;

[0010] In the signal flow graph, when the circuit module corresponding to the signal node is g m When a basic circuit unit of the same type is used, the corresponding signal node is marked as a node to be compensated by a first marking method, and the node to be compensated in the same signal path is marked again by a second marking method;

[0011] Acquire the signal path attribute of each node to be compensated and the transmission relationship between any two nodes to be compensated in the signal flow graph;

[0012] According to the signal path attribute of each node to be compensated, the second marking mode of each node to be compensated, and the transmission relationship between any two nodes to be compensated, a compensation node is added to the signal flow graph to obtain all compensation schemes of the signal flow graph;

[0013] All compensation schemes of the signal flow graph are decoded into circuit schematics, and each compensation scheme corresponds to a phase compensation circuit schematic of a to-be-compensated operational amplifier.

[0014] Optionally, the attribute information is represented as (Ai, Aj), (Bi, Bj), where Ai represents the source node of the edge, Aj represents the target node of the edge, Bi represents the output port of the source node, Bj represents the input port of the target node, Bi and Bj are one of F, S, T or O; F represents the first port, S represents the second port, T represents two ports, and O represents a single port.

[0015] Optionally, obtaining the signal path attribute of each node to be compensated in the signal flow graph includes:

[0016] According to the signal path attributes of each basic circuit unit recorded in the basic circuit unit library, the signal path attribute of each node to be compensated in the signal flow graph is obtained;

[0017] The signal path attribute of each node to be compensated is the same as the signal path attribute of its corresponding circuit module in the basic circuit unit library.

[0018] Optionally, marking the order in which each to-be-compensated node is discovered by a second marking method includes:

[0019] The signal flow graph is searched by a depth-first search algorithm, and the nodes to be compensated are alternately marked by two different second marking methods in the order in which each node to be compensated is found.

[0020] Optionally, obtaining a transmission relationship between any two nodes to be compensated includes:

[0021] Determine in the signal flow graph whether signal transmission is achieved between any two nodes to be compensated;

[0022] If a signal flows from node A to be compensated to node B to be compensated, the transmission relationship between the two nodes to be compensated is that node A to be compensated flows to node B to be compensated; if a signal flows from node B to be compensated to node A to be compensated, the transmission relationship between the two nodes to be compensated is that node B to be compensated flows to node A to be compensated; otherwise, the transmission relationship between the two nodes to be compensated is non-transmittable.

[0023] Optionally, before obtaining all compensation schemes of the signal flow graph according to the signal path attribute of each node to be compensated, the second marking mode of each node to be compensated, and the transmission relationship between any two nodes to be compensated, the method includes:

[0024] If the nodes to be compensated include the starting node, the node to be compensated that is the starting node will be deleted.

[0025] Optionally, add compensation nodes to the signal flow graph to obtain all compensation schemes of the signal flow graph, including:

[0026] For a node to be compensated whose single signal path attribute is a single signal path, adding a compensation node in a first compensation mode;

[0027] For a node to be compensated whose single signal path attribute is a dual signal path, adding a compensation node in a second compensation mode;

[0028] For the nodes to be compensated whose signal path attributes are single signal paths, compensation nodes are added in the third compensation mode.

[0029] Optionally, for a node to be compensated whose single signal path attribute is a single signal path, adding a compensation node in a first compensation manner includes:

[0030] S11, traversing the nodes to be compensated in the signal flow graph;

[0031] S12, if a node to be compensated whose signal path attribute is a single signal path is found, a compensation node is set to be connected to the node to form a transmission path for the signal to pass through the compensation node from the node to be compensated and return to the node to be compensated;

[0032] S13, the signal flow graph after adding the compensation node is a compensation scheme, after compensation, the node to be compensated is marked as a compensated node and the signal flow graph is restored to the state to be compensated;

[0033] S14, repeatedly executing S11 to S13, obtaining a new compensation scheme each time, until no nodes to be compensated that meet the requirements can be found.

[0034] Optionally, for a node to be compensated whose single signal path attribute is a dual signal path, adding a compensation node in a second compensation manner includes:

[0035] S21, traversing the nodes to be compensated in the signal flow graph;

[0036] S22, if the signal path attribute of a node to be compensated is a dual signal path, a pair of symmetrical compensation nodes are set to be connected to the node to form two transmission paths in which two signals respectively pass through different compensation nodes from the node to be compensated and return to the node to be compensated;

[0037] S23, the signal flow graph after adding the compensation node is a compensation scheme; after compensation, the node to be compensated is marked as a compensated node and the signal flow graph is restored to the state to be compensated;

[0038] S24, repeatedly executing S21 to S23, obtaining a new compensation scheme each time, until no node to be compensated that meets the requirements can be found.

[0039] Optionally, for the nodes to be compensated whose signal path attributes are single signal paths, adding compensation nodes in a third compensation manner includes:

[0040] S31, traversing the nodes to be compensated in the signal flow graph;

[0041] S32, if it is found that both the node A to be compensated and the node B to be compensated have a single signal path attribute, and the transmission relationship is that the node A to be compensated flows to the node B to be compensated, and the second marking methods of the node A to be compensated and the node B to be compensated are the same, then a compensation node is set between the node A to be compensated and the node B to be compensated to form a transmission path for the signal from the node B to be compensated to the node A to be compensated through the compensation node;

[0042] S33, if it is found that both the node A to be compensated and the node B to be compensated have a single signal path attribute, and the transmission relationship is that the node B to be compensated flows to the node A to be compensated, and the second marking methods of the node A to be compensated and the node B to be compensated are the same, then a compensation node is set between the node A to be compensated and the node B to be compensated to form a transmission path for the signal from the node A to be compensated to the node B to be compensated through the compensation node;

[0043] S34, the signal flow graph after adding the compensation node is a compensation scheme, and after compensation, the node to be compensated is marked as a compensated node and the signal flow graph is restored to the state to be compensated;

[0044] S35, repeatedly executing S31 to S34, obtaining a new compensation scheme each time, until no node to be compensated that meets the requirements can be found.

[0045] A second aspect provides a phase compensation device, comprising:

[0046] A basic circuit unit library establishment module is used to establish a basic circuit unit library; in the basic circuit unit library, an index number is created for each basic circuit unit, and the basic circuit units of the gm type are marked;

[0047] A circuit segmentation module, used for modularly segmenting the operational amplifier circuit to be compensated based on the basic circuit unit library to obtain N circuit modules; any circuit module corresponds to a basic circuit unit in the basic circuit unit library;

[0048] A signal flow graph encoding module is used to encode the segmented operational amplifier circuit to be compensated into a signal flow graph; wherein the signal nodes in the signal flow graph represent the circuit modules, and the edges in the signal flow graph represent the connection relationship between the circuit modules; the signal nodes contain the index number information of the basic circuit units corresponding to the circuit modules, and the edges contain the attribute information of the source node output port and the target node input port;

[0049] A signal node marking module, used for marking the corresponding signal node as a node to be compensated by a first marking method when the circuit module corresponding to the signal node is a basic circuit unit of the gm type in the signal flow graph, and marking the node to be compensated in the same signal path again by a second marking method;

[0050] A node information acquisition module, used to acquire the signal path attribute of each node to be compensated in the signal flow graph and the transmission relationship between any two nodes to be compensated;

[0051] A compensation scheme generating module, configured to add compensation nodes to the signal flow graph according to the signal path attribute of each node to be compensated, the second marking mode of each node to be compensated, and the transmission relationship between any two nodes to be compensated, so as to obtain all compensation schemes of the signal flow graph;

[0052] The signal flow graph decoding module is used to decode all compensation schemes of the signal flow graph into circuit schematics, and each compensation scheme corresponds to a phase compensation circuit schematic of a to-be-compensated operational amplifier.

[0053] A third aspect provides a computer device, comprising a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the various steps of the phase compensation method introduced above.

[0054] A fourth aspect provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the various steps of the phase compensation method introduced above.

[0055] A fifth aspect provides a computer program product, comprising a computer program, which implements the various steps of the phase compensation method introduced above when executed by a processor.

[0056] The phase compensation method provided by the embodiment of the present invention encodes the multi-stage operational amplifier circuit into a signal flow graph representation, converts the circuit structure characteristics of the multi-stage operational amplifier circuit into the characteristics of the signal flow graph and participates in the graphic algorithm, thereby solving the position of the compensation node in the original circuit and accurately and efficiently obtaining the phase compensation circuit. Among them, the provided graphic algorithm, on the one hand, uses the basic circuit unit library to quickly analyze and judge each signal node, fully considering the circuit structure characteristics represented by each circuit module in the multi-stage operational amplifier circuit, thereby obtaining the signal path attributes of each node to be compensated, the second marking method of each node to be compensated, and the transmission relationship between any two nodes to be compensated. On the other hand, according to these factors, a phase compensation scheme is automatically generated, that is, the position of the compensation node in the signal flow graph, and finally a determined phase compensation circuit is obtained. The phase compensation method provided by the embodiment of the present invention is efficient, reliable, and suitable for multi-stage operational amplifier circuits. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] Figure 1 A schematic diagram of the implementation flow of the phase compensation method according to an embodiment of the present invention;

[0058] Figure 2 is a schematic diagram of a basic circuit unit library according to an embodiment of the present invention;

[0059] Figure 3 is a schematic diagram of the circuit structure of a target multi-stage operational amplifier circuit according to an embodiment of the present invention;

[0060] Figure 4 for Figure 3 Schematic diagram of modular segmentation results after being processed by the automatic recognition algorithm;

[0061] Figure 5 Based on Figure 3 Generated signal flow graph;

[0062] Figure 6 Based on Figure 5 Marking a signal flow graph of a node to be compensated by a first marking method;

[0063] Figure 7 Based on Figure 6 Marking the signal flow graph of the node to be compensated by a second marking method;

[0064] Figure 8 Based on Figure 7 Schematic diagram of all phase compensation schemes;

[0065] Fig. 9 For the general Figure 8 Schematic diagram of all phase compensation circuits after decoding;

[0066] Fig.10 Another signal flow diagram provided by an embodiment of the present invention;

[0067] Fig.11 Based on Fig.10 Schematic diagram of all phase compensation schemes;

[0068] Fig.12 For the general Fig.11 Schematic diagram of all phase compensation circuits after decoding;

[0069] Fig.13 Another signal flow diagram provided for an embodiment of the present invention;

[0070] Fig.14 Based on Fig.13 Schematic diagram of all phase compensation schemes;

[0071] Fig.15 for Fig.14 (a) Schematic diagram of the phase compensation circuit after decoding;

[0072] Fig.16 Schematic diagram of the structure of a phase compensation device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0073] The technical solution of the present invention is further described below in conjunction with the accompanying drawings and embodiments.

[0074] like Figure 1As shown, an embodiment of the present invention proposes a phase compensation method, which can be applied to the phase compensation design in a multi-stage operational amplifier circuit, including but not limited to the following steps:

[0075] S1. Establish a basic circuit unit library; in the basic circuit unit library, create an index number for each basic circuit unit and g m The basic circuit units of the type are marked.

[0076] like Figure 2 As shown, it is an example of a basic circuit unit library, wherein the basic circuit units with index numbers 1 to 4 are circuits of current mirror structures, the basic circuit units with index numbers 5 and 6 are current source circuits, the basic circuit units with index numbers 7 and 8 are cascade-level (downward) circuits, the basic circuit units with index numbers 9 and 10 are cascade-level (upward) circuits, the basic circuit units with index numbers 11 and 12 are common source circuits, the basic circuit units with index numbers 13 to 16 are dual current mirror circuits, the basic circuit units with index numbers 17 and 18 are dual source drive shunt circuits, and the basic circuit units with index number 19 are dual source drive shunt circuits. The basic circuit units with index numbers 21 and 22 are differential pair circuits, the basic circuit units with index numbers 23 and 24 are dual cascade stage (downward) circuits, the basic circuit units with index numbers 25 and 26 are dual common source circuits, the basic circuit units with index numbers 27 and 28 are dual current source circuits, the basic circuit units with index numbers 29 to 32 are circuits for realizing current flow, the basic circuit unit with index number 33 is a circuit for realizing current merging, and the basic circuit unit with index number 34 is a circuit for realizing voltage separation. g m The basic circuit units of the type are basic circuit units with index numbers 1 to 4, 11 to 16, 19, 20, 25, and 26, which are exemplarily marked with the symbol ∆.

[0077] It should be noted that the basic circuit unit library established in the embodiment of the present invention is not limited to Figure 2 The circuit types in the basic circuit unit library shown in , such as the circuit of the current mirror is not limited to the circuit structure shown in index numbers 1 to 4, and the circuit of the current source is not limited to the circuit structure shown in index numbers 5 and 6, are g m The basic circuit units of the same type are not limited to the circuit structures shown in index numbers 11 to 16, 19, 20, 25, and 26.

[0078] S2. Based on the basic circuit unit library, modularly divide the operational amplifier circuit to be compensated to obtain N circuit modules; any circuit module corresponds to a basic circuit unit in the basic circuit unit library.

[0079] In one embodiment, modular segmentation of the operational amplifier circuit to be compensated is achieved through an automatic module identification algorithm.

[0080] like Figure 3 As shown in FIG. 1 , the circuit structure of the operational amplifier circuit to be compensated is shown in FIG. Figure 4 As shown, Figure 3 The modular segmentation results after the module automatic recognition algorithm is processed. The 9 circuit modules after segmentation have the same basic circuit units in the basic circuit unit library, such as Figure 3 The circuit module shown in the upper right box in the figure belongs to the basic circuit unit with index number 31 in the basic circuit unit library. Therefore, the above step S2 indicates that according to the basic circuit unit shown in the basic circuit unit library and the index number of the basic circuit unit, Figure 3 The operational amplifier circuit to be compensated is divided into 9 circuit modules.

[0081] S3. Encode the segmented operational amplifier circuit to be compensated into a signal flow graph; wherein the signal nodes in the signal flow graph represent the circuit modules, and the edges in the signal flow graph represent the connection relationship between the circuit modules; the signal nodes contain the index number information of the basic circuit units corresponding to the circuit modules, and the edges contain the attribute information of the source node output port and the target node input port.

[0082] like Figure 5 FIG. 1 is a signal flow chart of the operational amplifier circuit to be compensated obtained by encoding in step S3 above. Figure 5 The signal flow graph shown includes 9 signal nodes, wherein each circle represents a signal node and also represents a circuit module of the operational amplifier circuit to be compensated. For example, the first signal node A1 is circle +19, indicating that the circuit module included in the first signal node A1 corresponds to the index number information of the basic circuit unit, which is the basic circuit unit with index number 19 in the basic circuit unit library; the second signal node A2 is circle +31, indicating that the circuit module included in the second signal node A2 corresponds to the index number information of the basic circuit unit, which is the basic circuit unit with index number 31 in the basic circuit unit library. , the third signal node A3 is circle + 34, indicating that the circuit module included in the third signal node A3 corresponds to the index number information of the basic circuit unit, which is the basic circuit unit with index number 34 in the basic circuit unit library, the fourth signal node A4 is circle + 12, and the eighth signal node A8 is also circle + 12, indicating that the circuit module of the fourth signal node A4 is the same as the circuit module of the eighth signal node A8, and the included circuit modules correspond to the index number information of the basic circuit unit, both of which are the basic circuit units with index number 12 in the basic circuit unit library. The representation of other signal nodes is not repeated here.

[0083] It should be noted that a signal flow graph is a graphical representation method that can describe and analyze linear dynamic systems, and is composed of signal nodes, edges, and interconnections between signal nodes. Before solving the phase compensation scheme using a graphical algorithm, the embodiment of the present invention converts the operational amplifier circuit to be compensated into a signal flow graph representation. Therefore, the various signal nodes in the signal flow graph are not freely connected, which greatly reduces the search space for solving the phase compensation scheme using the graphical algorithm.

[0084] In one embodiment, a representation method is provided for the attribute information contained in the edge. Exemplarily, the attribute information is represented as (Ai, Aj), (Bi, Bj), wherein Ai represents the source node of the edge, Aj represents the target node of the edge, Bi represents the output port of the source node, Bj represents the input port of the target node, Bi and Bj are one of F, S, T or O; F represents the first port, S represents the second port, T represents two ports, and O represents a single port.

[0085] like Figure 5 As shown in FIG. 1 , the embodiment of the present invention marks the attribute information contained in the edge: first, the first signal node A1 is the basic circuit unit with index number 19 in the basic circuit unit library, that is, a differential pair, and the basic circuit unit of the differential pair includes two output ports. Since it is a differential pair, it can be known that the two output ports should be connected to the same input. Therefore, the two input and output ports of the first signal node A1 are represented by T; the second signal node A2 is the basic circuit unit with index number 31 in the basic circuit unit library, that is, a current conversion unit, and the basic circuit unit of the current conversion unit includes two input ports and one output port. Output port, since it is a current conversion unit, it can be known that two signals from the same output are converted and one signal is output, therefore, the two input ports of the second signal node A2 are denoted as T, and one output port is denoted as O; the third signal node A3 is a basic circuit unit with index number 34 in the basic circuit unit library, that is, a voltage separation unit, including three ports, one input port and two output ports. Since it is a voltage separation unit, it can be known that the two output ports are connected to different inputs, therefore, one output port of the third signal node A3 is denoted as F, one output port is denoted as S, and the input port is denoted as O. The input and output ports of the remaining signal nodes, such as the fifth signal node A5, the sixth signal node A6, the seventh signal node A7, and the ninth signal node A9 are not described in detail. Then, according to Figure 3 and Figure 4In the circuit structure of the operational amplifier to be compensated shown in FIG. 1 , the circuit module corresponding to the first signal node A1 points to the circuit module corresponding to the second signal node A2, so that it can be determined that in the signal flow graph, there is an edge N1 between the first signal node A1 and the second signal node A2, and the attribute information contained in N1 is (A1, A2) and (T, T), that is, the first signal node A1 is the source node, the second signal node A2 is the target node, and the port T of the first signal node A1 is connected to the port T of the second signal node A2. Similarly, according to Figure 3 and Figure 4 In the circuit structure of the operational amplifier to be compensated shown in FIG. 1 , the circuit module corresponding to the third signal node A3 points to two identical circuit modules, namely, the circuit module corresponding to the fourth signal node A4, and the circuit module corresponding to the eighth signal node A8. Thus, it can be determined that in the signal flow graph, there is an edge N3 between the third signal node A3 and the fourth signal node A4, and the attribute information contained in N3 is (A3, A4) and (F, O), that is, the third signal node A3 is the source node, the fourth signal node A4 is the target node, and the port F of the third signal node A3 is connected to the port O of the fourth signal node A4. There is an edge N4 between the third signal node A3 and the eighth signal node A8, and the attribute information contained in N4 is (A3, A8) and (S, O), that is, the third signal node A3 is the source starting point, the eighth signal node A8 is the target node, and the port S of the third signal node is connected to the port O of the eighth signal node A8. The attribute information contained in other edges such as N5, N6, and N7 will not be repeated here.

[0086] S4. In the signal flow graph, when the circuit module corresponding to the signal node is g m When a basic circuit unit of the same type is used, the corresponding signal node is marked as a node to be compensated by a first marking method, and the node to be compensated in the same signal path is marked again by a second marking method.

[0087] in, g m The basic circuit unit of the type (transconductance constant gm circuit) is a circuit structure that can keep the transconductance constant. Using it as a node to be compensated can improve the phase margin of the multi-stage operational amplifier and overcome the phase lag problem.

[0088] Identify whether the circuit module of the nth signal node is g m The basic circuit unit of the type is judged by the basic circuit unit library including K basic circuit units, and the exemplary implementation steps include:

[0089] Searching the signal flow graph by a breadth-first search algorithm;

[0090] When the nth signal node is searched, if the circuit module of the nth signal node belongs to the basic circuit unit library, the g m The type of basic circuit unit marks the nth signal node as a node to be compensated.

[0091] When the breadth-first search algorithm searches the signal flow graph, it traverses all signal nodes of the signal flow graph.

[0092] like Figure 6 As shown, the embodiment of the present invention is Figure 5 Among the 9 signal nodes in the signal flow graph shown, 5 nodes to be compensated are marked, and each circle represents a signal node of the signal flow graph, namely the first signal node A1 to the ninth signal node A9, and also represents a circuit module of the operational amplifier circuit to be compensated. Exemplarily, a graphic of a circle and a rectangle superimposed is used as a first marking method to indicate that this signal node is a node to be compensated. Figure 6 The first signal node A1, the fourth signal node A4, the sixth signal node A6, the eighth signal node A8 and the ninth signal node A9 are nodes to be compensated, and also represent a circuit module of the operational amplifier circuit to be compensated, and this circuit module is g m Type of basic circuit unit.

[0093] In the embodiment of the present invention, the order in which each node to be compensated is discovered needs to be deeply searched on the basis of the signal flow graph in which the nodes to be compensated are marked. Therefore, the nodes to be compensated in the same signal path are marked again by a second marking method, including:

[0094] The signal flow graph is searched by a depth-first search algorithm, and the nodes to be compensated are alternately marked by two different second marking methods in the order in which each node to be compensated is found.

[0095] like Figure 7 As shown, in Figure 6 On the basis of having marked 5 nodes to be compensated, the signal flow graph is searched by a depth-first search algorithm. When the first compensation node, i.e., the first signal node A1, is searched, it is marked by a rectangle filled with right shadows. Then, when the second compensation node in the same signal path, i.e., the fourth signal node A4 and the eighth signal node A8, is searched, it is marked by a rectangle filled with dot shadows. At the same time, when the third compensation node in the same signal path, i.e., the sixth signal node A6 and the ninth signal node A9, is searched, it is marked again by a rectangle filled with right shadows. In this way, the second marking method is implemented to alternately mark the order in which each node to be compensated is found.

[0096] S5. Obtain the signal path attribute of each node to be compensated in the signal flow graph and the transmission relationship between any two nodes to be compensated.

[0097] In the embodiment of the present invention, obtaining the signal path attribute of each node to be compensated in the signal flow graph includes:

[0098] According to the signal path attributes of each basic circuit unit recorded in the basic circuit unit library, the signal path attribute of each node to be compensated in the signal flow graph is obtained;

[0099] The signal path attribute of each node to be compensated is the same as the signal path attribute of its corresponding circuit module in the basic circuit unit library.

[0100] It should be noted that, in the embodiment of the present invention, when the basic circuit unit library records each basic circuit unit, the circuit type of the basic circuit unit has been recorded, such as a basic circuit unit for a current mirror, a basic circuit unit for a current source, a basic circuit unit for a common source, a basic circuit unit for a dual current mirror, etc. These circuit types determine their signal path properties. For example, each basic circuit unit for a current mirror includes one input and one output, so its signal path property is a single signal path; each basic circuit unit for a dual current mirror includes two inputs and two outputs, so its signal path property is a dual signal path. Figure 2 In the basic circuit unit database shown, the signal path attributes of each basic circuit unit are also classified and classified into at least single signal paths and dual signal paths. Exemplarily, current transfer units, current merging units, etc. are also included.

[0101] In the embodiment of the present invention, obtaining the transmission relationship between any two nodes to be compensated includes:

[0102] Determine in the signal flow graph whether signal transmission is achieved between any two nodes to be compensated;

[0103] If a signal flows from node A to be compensated to node B to be compensated, the transmission relationship between the two nodes to be compensated is that node A to be compensated flows to node B to be compensated; if a signal flows from node B to be compensated to node A to be compensated, the transmission relationship between the two nodes to be compensated is that node B to be compensated flows to node A to be compensated; otherwise, the transmission relationship between the two nodes to be compensated is non-transmittable.

[0104] S6. Add compensation nodes to the signal flow graph according to the signal path attribute of each node to be compensated, the second marking method of each node to be compensated, and the transmission relationship between any two nodes to be compensated, to obtain all compensation schemes of the signal flow graph.

[0105] It should be noted that the above-mentioned adding compensation nodes to the signal flow graph is to add compensation nodes to the nodes to be compensated in the signal flow graph, and in an embodiment of the present invention, at most two compensation nodes are added in one compensation scheme, and the compensation nodes are connected to the nodes to be compensated to form a new signal transmission path.

[0106] S7. Decode all compensation schemes of the signal flow graph into circuit schematics, where each compensation scheme corresponds to a phase compensation circuit schematic of an operational amplifier to be compensated.

[0107] The above steps S1 to S3 are steps for converting a circuit diagram into a graphical representation. The above steps S4 and S5 process the signal flow graph, such as marking the nodes to be compensated by a first marking method, and marking the order in which each node to be compensated is found by a second marking method, so as to exclude invalid circuits and narrow the search space. Then in step S6, according to the signal path attributes of each node to be compensated, the second marking method of each node to be compensated, and the transmission relationship between any two nodes to be compensated, compensation nodes are added to the signal flow graph to obtain a unique solution that is definite and reliable, which has better efficiency and accuracy than obtaining multiple random solutions through Bayesian optimization.

[0108] In the above step S7, the compensation node corresponds to a preset phase compensation circuit; the preset phase compensation circuit includes a resistor and a capacitor connected in series, or a capacitor, or a resistor, or a capacitor and a resistor connected in parallel.

[0109] In a preferred implementation, the resistor is equivalent to a triode.

[0110] In a specific application, the node to be compensated may be a starting node. When it is used as a starting node, no phase compensation is performed on it. Therefore, in one embodiment, before the above step S6, it includes:

[0111] If the nodes to be compensated include the starting node, the node to be compensated that is the starting node will be deleted.

[0112] Based on this, the above step S6 adds compensation nodes to the signal flow graph to obtain all compensation schemes of the signal flow graph, including:

[0113] For a node to be compensated whose single signal path attribute is a single signal path, adding a compensation node in a first compensation mode;

[0114] For a node to be compensated whose single signal path attribute is a dual signal path, adding a compensation node in a second compensation mode;

[0115] For the nodes to be compensated whose signal path attributes are single signal paths, compensation nodes are added in the third compensation mode.

[0116] It should be noted that the difference between the first compensation method, the second compensation method and the third compensation method is that under different compensation methods, the number of compensation nodes added and the signal transmission path formed by connecting the compensation nodes and the nodes to be compensated after the compensation nodes are added are different.

[0117] Wherein, for a node to be compensated whose single signal path attribute is a single signal path, adding a compensation node in a first compensation manner includes:

[0118] S11, traversing the nodes to be compensated in the signal flow graph;

[0119] S12, if a node to be compensated whose signal path attribute is a single signal path is found, a compensation node is set to be connected to the node to form a transmission path for the signal to pass through the compensation node from the node to be compensated and return to the node to be compensated;

[0120] S13, the signal flow graph after adding the compensation node is a compensation scheme, after compensation, the node to be compensated is marked as a compensated node and the signal flow graph is restored to the state to be compensated;

[0121] S14, repeatedly executing S11 to S13, obtaining a new compensation scheme each time, until no nodes to be compensated that meet the requirements can be found.

[0122] It should be noted that, in the above steps S11 to S13, when traversing to a node A to be compensated, if the node A to be compensated is a node to be compensated of a single signal path, a compensation scheme is generated according to step S12, and the signal flow graph is restored to the state to be compensated according to step S13, and this traversal ends. When repeating steps S11 to S13, since the node A to be compensated is marked as a compensated node in the previous traversal, when traversing to the node A to be compensated again, step S12 will not be executed on it. Assuming that the node B to be compensated is traversed, a new compensation scheme is still generated according to step S12, and the signal flow graph is restored to the state to be compensated according to step S13, and this traversal ends. In actual applications, a selection will be made between the two compensation schemes based on other conditions, such as the size of the circuit change, that is, a phase compensation scheme based on the node A to be compensated or a phase compensation scheme based on the node B to be compensated is selected. In addition, the traversal principles of the following steps S21 to S24 and steps 31 to S35 are the same and will not be repeated.

[0123] The embodiment of the present invention is also based on the above Figure 7 The signal flow chart shown in the figure describes in detail the first compensation method shown in the above steps S11 to S14. Figure 7 In the example, the first node to be compensated, i.e. the first signal node A1, is also the starting node: based on Figure 2 In the basic circuit unit library shown in FIG. 1 , the second node to be compensated, namely the fourth signal node A4, belongs to a single signal path unit; based on Figure 2 In the basic circuit unit library shown in FIG. 1 , the third node to be compensated, namely the sixth signal node A6, belongs to a single signal path unit; based on Figure 2 In the basic circuit unit library shown in FIG. 1 , the fourth node to be compensated, namely the eighth signal node A8, belongs to a single signal path unit; based on Figure 2 In the basic circuit unit library shown, the fifth node to be compensated, ie, the ninth signal node A9, belongs to a single signal path unit.

[0124] It can be seen that the first signal node A1 is both a node to be compensated and a starting node, so it is not compensated. The signal path attributes of the remaining four nodes to be compensated are all single signal paths. Figure 7 The signal flow chart shown in FIG. 1 repeatedly executes the steps S11 to S13, and a new compensation scheme can be obtained each time the steps are executed. Figure 8 The compensation schemes shown in (a), (b), (c), and (d) assume that Figure 8 (a) is the compensation scheme obtained by executing steps S11 to S13 for the first time, Figure 8 (b) is the compensation scheme obtained by executing steps S11 to S13 for the second time, Figure 8 (c) is the compensation scheme obtained by executing steps S11 to S13 for the third time, Figure 8 (b) is the compensation scheme obtained by executing steps S11 to S13 for the fourth time. Figure 7 Each node to be compensated whose signal path attribute is a single signal path has obtained a compensation scheme. When steps S11 to S13 are executed for the fifth time, no node to be compensated that meets the requirements can be found, that is, the node to be compensated whose signal path attribute is a single signal path is no longer repeated. Steps S11 to S13 are no longer executed.

[0125] like Fig. 9 As shown, based on Figure 8 (a) Figure 8 (b) Figure 8 (c) Figure 8 (d), respectively executing the above step S7 to obtain a phase compensation circuit of the operational amplifier circuit to be compensated, and illustratively, a resistor and a capacitor connected in series are used as the phase compensation circuit.

[0126] Wherein, for a node to be compensated whose single signal path attribute is a dual signal path, adding a compensation node in a second compensation mode includes:

[0127] S21, traversing the nodes to be compensated in the signal flow graph;

[0128] S22, if the signal path attribute of a node to be compensated is a dual signal path, a pair of symmetrical compensation nodes are set to be connected to the node to form two transmission paths in which two signals respectively pass through different compensation nodes from the node to be compensated and return to the node to be compensated;

[0129] S23, the signal flow graph after adding the compensation node is a compensation scheme; after compensation, the node to be compensated is marked as a compensated node and the signal flow graph is restored to the state to be compensated;

[0130] S24, repeatedly executing S21 to S23, obtaining a new compensation scheme each time, until no node to be compensated that meets the requirements can be found.

[0131] like Fig.10 As shown, the embodiment of the present invention also provides another signal flow diagram to explain in detail the second compensation method shown in the above steps S21 to S24. Fig.10 In it, there are three signal nodes B1, B2 and B3, among which signal node B1 and signal node B2 are nodes to be compensated, and the index number of signal node B1 is 20, which indicates that the index number information of the basic circuit unit corresponding to this circuit module is a basic circuit unit of a differential pair in the basic circuit unit database, therefore, the signal path attribute of signal node B1 is a dual signal path; the index number of signal node B2 is 14, which indicates that the index number information of the basic circuit unit corresponding to this circuit module is a basic circuit unit of a dual current mirror in the basic circuit unit database, therefore, the signal path attribute of signal node B2 is a dual signal path.

[0132] First, the signal node B1 is the starting node and is not compensated. Fig.10 The signal flow chart shown in FIG. 1 repeatedly executes the steps S21 to S23, and a new compensation scheme can be obtained each time the steps are executed. Fig.11 The compensation scheme shown in (a) assumes that Fig.11 (a) is the compensation scheme obtained by executing steps S21 to S23 for the first time. Figure 7 Each node to be compensated whose signal path attribute is a dual signal path has obtained a compensation scheme. When steps S21 to S23 are executed for the second time, no node to be compensated that meets the requirements can be found, that is, the node to be compensated whose signal path attribute is a dual signal path, and steps S21 to S23 are no longer repeated.

[0133] For a compensation plan, such as Fig.12 As shown, based on Fig.11 (a) executing the above step S7 to obtain a phase compensation circuit of the operational amplifier circuit to be compensated, and illustratively, a resistor and a capacitor connected in series are used as the phase compensation circuit.

[0134] Wherein, for the nodes to be compensated whose signal path attributes are single signal paths, adding compensation nodes in a third compensation manner includes:

[0135] S31, traversing the nodes to be compensated in the signal flow graph;

[0136] S32, if it is found that both the node A to be compensated and the node B to be compensated have a single signal path attribute, and the transmission relationship is that the node A to be compensated flows to the node B to be compensated, and the second marking methods of the node A to be compensated and the node B to be compensated are the same, then a compensation node is set between the node A to be compensated and the node B to be compensated to form a transmission path for the signal from the node B to be compensated to the node A to be compensated through the compensation node;

[0137] S33, if it is found that both the node A to be compensated and the node B to be compensated have a single signal path attribute, and the transmission relationship is that the node B to be compensated flows to the node A to be compensated, and the second marking methods of the node A to be compensated and the node B to be compensated are the same, then a compensation node is set between the node A to be compensated and the node B to be compensated to form a transmission path for the signal from the node A to be compensated to the node B to be compensated through the compensation node;

[0138] S34, the signal flow graph after adding the compensation node is a compensation scheme, and after compensation, the node to be compensated is marked as a compensated node and the signal flow graph is restored to the state to be compensated;

[0139] S35, repeatedly executing S31 to S34, obtaining a new compensation scheme each time, until no node to be compensated that meets the requirements can be found.

[0140] like Fig.13 As shown, the embodiment of the present invention also provides another signal flow diagram to explain in detail the third compensation method shown in the above steps S31 to S35. Fig.13 In , there are 10 signal nodes C1~C10, among which signal node C1 is the starting node, signal nodes C4, C5, C7, C8, and C9 are nodes to be compensated, and the index number of signal node C4 is 12, which indicates the index number information of the basic circuit unit corresponding to this circuit module, which is the basic circuit unit with a common source in the basic circuit unit database. Therefore, the signal path attribute of signal node C4 is a single signal path; similarly, the signal path attribute of signal nodes C5, signal node C7, signal node C8, and signal node C9 is a single signal path. And the transmission relationship between signal node C4 and signal node C7 is that signal node C4 flows to signal node C7, and the second marking method of signal node C4 and signal node C7 is the same; the transmission relationship between signal node C5 and signal node C8 is that signal node C5 flows to signal node C8, and the second marking method of signal node C5 and signal node C8 is the same.

[0141] For example Fig.13 The signal flow chart shown in FIG. 1 repeatedly executes the steps S31 to S34, and a new compensation scheme can be obtained each time the steps are executed. Fig.14 The compensation schemes shown in (a) and (b) assume that Fig.14 (a) is the compensation scheme obtained by executing steps S31 to S34 for the first time, Fig.14 (b) is the compensation scheme obtained by executing steps S21 to S23 for the second time. Fig.13 All nodes to be compensated that meet the requirements in the above are given a compensation plan. When steps S31 to S34 are executed for the third time, no nodes to be compensated that meet the above requirements can be found, and steps S31 to S34 are not repeated.

[0142] For a compensation plan, such as Fig.15 As shown, based on Fig.14 (a) executing the above step S7 to obtain a phase compensation circuit of the operational amplifier circuit to be compensated, and illustratively, a resistor and a capacitor connected in series are used as the phase compensation circuit.

[0143] Through the above steps S1 to S7, the embodiment of the present invention encodes the multi-stage operational amplifier circuit into a signal flow graph representation, converts the circuit structure characteristics of the multi-stage operational amplifier circuit into the characteristics of the signal flow graph and participates in the graphic algorithm, thereby solving the position of the compensation node in the original circuit and accurately and efficiently obtaining the phase compensation circuit. Among them, the provided graphic algorithm, on the one hand, uses the basic circuit unit library to quickly analyze and judge each signal node, fully considering the circuit structure characteristics represented by each circuit module in the multi-stage operational amplifier circuit, thereby obtaining the signal path properties of the node to be compensated and the node to be compensated, and on the other hand, selects the phase compensation scheme according to the signal path properties, that is, the position of the compensation node in the signal flow graph, and finally obtains a determined phase compensation circuit. The phase compensation method provided by the embodiment of the present invention is efficient, reliable, and suitable for multi-stage operational amplifier circuits.

[0144] like Fig.16 As shown, the embodiment of the present invention further provides a phase compensation device 100, comprising:

[0145] The basic circuit unit library establishment module 101 is used to establish a basic circuit unit library; in the basic circuit unit library, an index number is created for each basic circuit unit, and g m Mark the basic circuit units of the type;

[0146] A circuit segmentation module 102 is used to modularly segment the operational amplifier circuit to be compensated based on the basic circuit unit library to obtain N circuit modules; any circuit module corresponds to a basic circuit unit in the basic circuit unit library;

[0147] The signal flow graph encoding module 103 is used to encode the segmented operational amplifier circuit to be compensated into a signal flow graph; wherein the signal nodes in the signal flow graph represent the circuit modules, and the edges in the signal flow graph represent the connection relationship between the circuit modules; the signal nodes contain the index number information of the basic circuit units corresponding to the circuit modules, and the edges contain the attribute information of the source node output port and the target node input port;

[0148] The signal node marking module 104 is used to mark the signal node in the signal flow graph when the circuit module corresponding to the signal node is g m When a basic circuit unit of the same type is used, the corresponding signal node is marked as a node to be compensated by a first marking method, and the node to be compensated in the same signal path is marked again by a second marking method;

[0149] A node information acquisition module 105, used to acquire the signal path attribute of each node to be compensated in the signal flow graph and the transmission relationship between any two nodes to be compensated;

[0150] A compensation scheme generating module 106, configured to add compensation nodes to the signal flow graph according to the signal path attribute of each node to be compensated, the second marking mode of each node to be compensated, and the transmission relationship between any two nodes to be compensated, so as to obtain all compensation schemes of the signal flow graph;

[0151] The signal flow graph decoding module 107 is used to decode all compensation schemes of the signal flow graph into circuit schematics, and each compensation scheme corresponds to a phase compensation circuit schematic of a to-be-compensated operational amplifier.

[0152] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0153] Establish a basic circuit unit library; in the basic circuit unit library, create an index number for each basic circuit unit and g m Mark the basic circuit units of the type;

[0154] Based on the basic circuit unit library, modularly divide the operational amplifier circuit to be compensated to obtain N circuit modules; any circuit module corresponds to a basic circuit unit in the basic circuit unit library;

[0155] The segmented operational amplifier circuit to be compensated is encoded into a signal flow graph; wherein the signal nodes in the signal flow graph represent the circuit modules, and the edges in the signal flow graph represent the connection relationship between the circuit modules; the signal nodes contain the index number information of the basic circuit units corresponding to the circuit modules, and the edges contain the attribute information of the source node output port and the target node input port;

[0156] In the signal flow graph, when the circuit module corresponding to the signal node is g m When a basic circuit unit of the same type is used, the corresponding signal node is marked as a node to be compensated by a first marking method, and the node to be compensated in the same signal path is marked again by a second marking method;

[0157] Acquire the signal path attribute of each node to be compensated and the transmission relationship between any two nodes to be compensated in the signal flow graph;

[0158] According to the signal path attribute of each node to be compensated, the second marking mode of each node to be compensated, and the transmission relationship between any two nodes to be compensated, a compensation node is added to the signal flow graph to obtain all compensation schemes of the signal flow graph;

[0159] All compensation schemes of the signal flow graph are decoded into circuit schematics, and each compensation scheme corresponds to a phase compensation circuit schematic of a to-be-compensated operational amplifier.

[0160] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0161] Establish a basic circuit unit library; in the basic circuit unit library, create an index number for each basic circuit unit and g m Mark the basic circuit units of the type;

[0162] Based on the basic circuit unit library, modularly divide the operational amplifier circuit to be compensated to obtain N circuit modules; any circuit module corresponds to a basic circuit unit in the basic circuit unit library;

[0163] The segmented operational amplifier circuit to be compensated is encoded into a signal flow graph; wherein the signal nodes in the signal flow graph represent the circuit modules, and the edges in the signal flow graph represent the connection relationship between the circuit modules; the signal nodes contain the index number information of the basic circuit units corresponding to the circuit modules, and the edges contain the attribute information of the source node output port and the target node input port;

[0164] In the signal flow graph, when the circuit module corresponding to the signal node is g mWhen a basic circuit unit of the same type is used, the corresponding signal node is marked as a node to be compensated by a first marking method, and the node to be compensated in the same signal path is marked again by a second marking method;

[0165] Acquire the signal path attribute of each node to be compensated and the transmission relationship between any two nodes to be compensated in the signal flow graph;

[0166] According to the signal path attribute of each node to be compensated, the second marking mode of each node to be compensated, and the transmission relationship between any two nodes to be compensated, a compensation node is added to the signal flow graph to obtain all compensation schemes of the signal flow graph;

[0167] All compensation schemes of the signal flow graph are decoded into circuit schematics, and each compensation scheme corresponds to a phase compensation circuit schematic of a to-be-compensated operational amplifier.

[0168] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:

[0169] Establish a basic circuit unit library; in the basic circuit unit library, create an index number for each basic circuit unit and g m Mark the basic circuit units of the type;

[0170] Based on the basic circuit unit library, modularly divide the operational amplifier circuit to be compensated to obtain N circuit modules; any circuit module corresponds to a basic circuit unit in the basic circuit unit library;

[0171] The segmented operational amplifier circuit to be compensated is encoded into a signal flow graph; wherein the signal nodes in the signal flow graph represent the circuit modules, and the edges in the signal flow graph represent the connection relationship between the circuit modules; the signal nodes contain the index number information of the basic circuit units corresponding to the circuit modules, and the edges contain the attribute information of the source node output port and the target node input port;

[0172] In the signal flow graph, when the circuit module corresponding to the signal node is g m When a basic circuit unit of the same type is used, the corresponding signal node is marked as a node to be compensated by a first marking method, and the node to be compensated in the same signal path is marked again by a second marking method;

[0173] Acquire the signal path attribute of each node to be compensated and the transmission relationship between any two nodes to be compensated in the signal flow graph;

[0174] According to the signal path attribute of each node to be compensated, the second marking mode of each node to be compensated, and the transmission relationship between any two nodes to be compensated, a compensation node is added to the signal flow graph to obtain all compensation schemes of the signal flow graph;

[0175] All compensation schemes of the signal flow graph are decoded into circuit schematics, and each compensation scheme corresponds to a phase compensation circuit schematic of a to-be-compensated operational amplifier.

[0176] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0177] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0178] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

[0179] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the purpose and scope of the technical solution of the present invention, which should be included in the scope of the claims of the present invention.

Claims

1. A phase compensation method, characterized in that: include: Establish a basic circuit unit library; In the basic circuit unit library, create an index number for each basic circuit unit and g m Mark the basic circuit units of the type; Based on the basic circuit unit library, modularly divide the operational amplifier circuit to be compensated to obtain N circuit modules; any circuit module corresponds to a basic circuit unit in the basic circuit unit library; The segmented operational amplifier circuit to be compensated is encoded into a signal flow graph; wherein the signal nodes in the signal flow graph represent the circuit modules, and the edges in the signal flow graph represent the connection relationship between the circuit modules; the signal nodes contain the index number information of the basic circuit units corresponding to the circuit modules, and the edges contain the attribute information of the source node output port and the target node input port; In the signal flow graph, when the circuit module corresponding to the signal node is g m When a basic circuit unit of the same type is used, the corresponding signal node is marked as a node to be compensated by a first marking method, and the node to be compensated in the same signal path is marked again by a second marking method; Acquire the signal path attribute of each node to be compensated and the transmission relationship between any two nodes to be compensated in the signal flow graph; the signal path attribute includes a single signal path and a dual signal path; According to the signal path attribute of each node to be compensated, the second marking method of each node to be compensated and the transmission relationship between any two nodes to be compensated, compensation nodes are added to the signal flow graph to obtain all compensation schemes of the signal flow graph; wherein, adding compensation nodes to the signal flow graph includes: adding compensation nodes to the nodes to be compensated in the signal flow graph, and in one compensation scheme, at most two compensation nodes are added, and the compensation nodes are connected with the nodes to be compensated to form a new signal transmission path; and, for the nodes to be compensated whose single signal path attribute is a single signal path, the compensation nodes are added in a first compensation method; for the nodes to be compensated whose single signal path attribute is a dual signal path, the compensation nodes are added in a second compensation method; for the nodes to be compensated whose two signal path attributes are a single signal path, the compensation nodes are added in a third compensation method; Decoding all compensation schemes of the signal flow graph into circuit schematics, each compensation scheme corresponds to a phase compensation circuit schematic of a to-be-compensated operational amplifier; The adding a compensation node in a first compensation manner to a node to be compensated whose single signal path attribute is a single signal path includes: S11, traversing the nodes to be compensated in the signal flow graph; S12, if a node to be compensated whose signal path attribute is a single signal path is found, a compensation node is set to be connected to the node to form a transmission path for the signal to pass through the compensation node from the node to be compensated and return to the node to be compensated; S13, the signal flow graph after adding the compensation node is a compensation scheme, after compensation, the node to be compensated is marked as a compensated node and the signal flow graph is restored to the state to be compensated; S14, repeatedly executing S11 to S13, obtaining a new compensation scheme each time, until no node to be compensated that meets the requirements can be found; The adding a compensation node in a second compensation manner to a node to be compensated whose single signal path attribute is a dual signal path includes: S21, traversing the nodes to be compensated in the signal flow graph; S22, if the signal path attribute of a node to be compensated is a dual signal path, a pair of symmetrical compensation nodes are set to be connected to the node to form two transmission paths in which two signals respectively pass through different compensation nodes from the node to be compensated and return to the node to be compensated; S23, the signal flow graph after adding the compensation node is a compensation scheme; after compensation, the node to be compensated is marked as a compensated node and the signal flow graph is restored to the state to be compensated; S24, repeatedly executing S21 to S23, obtaining a new compensation scheme each time, until no node to be compensated that meets the requirements can be found; The adding of compensation nodes in a third compensation manner to the nodes to be compensated whose two signal paths have the attribute of a single signal path includes: S31, traversing the nodes to be compensated in the signal flow graph; S32, if it is found that both the node A to be compensated and the node B to be compensated have a single signal path attribute, and the transmission relationship is that the node A to be compensated flows to the node B to be compensated, and the second marking methods of the node A to be compensated and the node B to be compensated are the same, then a compensation node is set between the node A to be compensated and the node B to be compensated to form a transmission path for the signal from the node B to be compensated to the node A to be compensated through the compensation node; S33, if it is found that both the node A to be compensated and the node B to be compensated have a single signal path attribute, and the transmission relationship is that the node B to be compensated flows to the node A to be compensated, and the second marking methods of the node A to be compensated and the node B to be compensated are the same, then a compensation node is set between the node A to be compensated and the node B to be compensated to form a transmission path for the signal from the node A to be compensated to the node B to be compensated through the compensation node; S34, the signal flow graph after adding the compensation node is a compensation scheme, and after compensation, the node to be compensated is marked as a compensated node and the signal flow graph is restored to the state to be compensated; S35, repeatedly executing S31 to S34, obtaining a new compensation scheme each time, until no node to be compensated that meets the requirements can be found.

2. The phase compensation method according to claim 1, characterized in that: The attribute information is expressed as (Ai, Aj), (Bi, Bj), where Ai represents the source node of the edge, Aj represents the target node of the edge, Bi represents the output port of the source node, Bj represents the input port of the target node, Bi and Bj are one of F, S, T or O; F represents the first port, S represents the second port, T represents two ports, and O represents a single port.

3. The phase compensation method according to claim 1, characterized in that: Get the signal path properties of each node to be compensated in the signal flow graph, including: According to the signal path attributes of each basic circuit unit recorded in the basic circuit unit library, the signal path attribute of each node to be compensated in the signal flow graph is obtained; The signal path attribute of each node to be compensated is the same as the signal path attribute of its corresponding circuit module in the basic circuit unit library.

4. The phase compensation method according to claim 1, characterized in that: The order in which each node to be compensated is found is marked by the second marking method, including: The signal flow graph is searched by a depth-first search algorithm, and the nodes to be compensated are alternately marked by two different second marking methods in the order in which each node to be compensated is found.

5. The phase compensation method according to claim 1, wherein: Obtain the transmission relationship between any two nodes to be compensated, including: Determine in the signal flow graph whether signal transmission is achieved between any two nodes to be compensated; If a signal flows from node A to be compensated to node B to be compensated, the transmission relationship between the two nodes to be compensated is that node A to be compensated flows to node B to be compensated; if a signal flows from node B to be compensated to node A to be compensated, the transmission relationship between the two nodes to be compensated is that node B to be compensated flows to node A to be compensated; otherwise, the transmission relationship between the two nodes to be compensated is non-transmittable.

6. The phase compensation method according to claim 1, characterized in that: Before obtaining all compensation schemes of the signal flow graph according to the signal path attribute of each node to be compensated, the second marking mode of each node to be compensated, and the transmission relationship between any two nodes to be compensated, the method includes: If the nodes to be compensated include the starting node, the node to be compensated that is the starting node will be deleted.

7. A phase compensation device, characterized in that: include: A basic circuit unit library establishment module is used to establish a basic circuit unit library; In the basic circuit unit library, an index number is created for each basic circuit unit, and the basic circuit units of the gm type are marked; A circuit segmentation module, used for modularly segmenting the operational amplifier circuit to be compensated based on the basic circuit unit library to obtain N circuit modules; any circuit module corresponds to a basic circuit unit in the basic circuit unit library; A signal flow graph encoding module is used to encode the segmented operational amplifier circuit to be compensated into a signal flow graph; wherein the signal nodes in the signal flow graph represent the circuit modules, and the edges in the signal flow graph represent the connection relationship between the circuit modules; the signal nodes contain the index number information of the basic circuit units corresponding to the circuit modules, and the edges contain the attribute information of the source node output port and the target node input port; A signal node marking module, used for marking the corresponding signal node as a node to be compensated by a first marking method when the circuit module corresponding to the signal node is a basic circuit unit of the gm type in the signal flow graph, and marking the node to be compensated in the same signal path again by a second marking method; A node information acquisition module, used to acquire the signal path attribute of each node to be compensated in the signal flow graph and the transmission relationship between any two nodes to be compensated; the signal path attribute includes a single signal path and a dual signal path; A compensation scheme generating module, used for adding compensation nodes to the signal flow graph according to the signal path attribute of each node to be compensated, the second marking method of each node to be compensated and the transmission relationship between any two nodes to be compensated, so as to obtain all compensation schemes of the signal flow graph; wherein, adding compensation nodes to the signal flow graph comprises: adding compensation nodes to the nodes to be compensated in the signal flow graph, and in one compensation scheme, adding at most two compensation nodes, the compensation nodes are connected with the nodes to be compensated to form a new signal transmission path; and, for the nodes to be compensated whose single signal path attribute is a single signal path, adding compensation nodes in a first compensation method; for the nodes to be compensated whose single signal path attribute is a dual signal path, adding compensation nodes in a second compensation method; for the nodes to be compensated whose two signal path attributes are a single signal path, adding compensation nodes in a third compensation method; A signal flow graph decoding module, used for decoding all compensation schemes of the signal flow graph into circuit schematics, each compensation scheme corresponding to a phase compensation circuit schematic of a to-be-compensated operational amplifier; The adding a compensation node in a first compensation manner to a node to be compensated whose single signal path attribute is a single signal path includes: S11, traversing the nodes to be compensated in the signal flow graph; S12, if a node to be compensated whose signal path attribute is a single signal path is found, a compensation node is set to be connected to the node to form a transmission path for the signal to pass through the compensation node from the node to be compensated and return to the node to be compensated; S13, the signal flow graph after adding the compensation node is a compensation scheme, after compensation, the node to be compensated is marked as a compensated node and the signal flow graph is restored to the state to be compensated; S14, repeatedly executing S11 to S13, obtaining a new compensation scheme each time, until no node to be compensated that meets the requirements can be found; The adding a compensation node in a second compensation manner to a node to be compensated whose single signal path attribute is a dual signal path includes: S21, traversing the nodes to be compensated in the signal flow graph; S22, if the signal path attribute of a node to be compensated is a dual signal path, a pair of symmetrical compensation nodes are set to be connected to the node to form two transmission paths in which two signals respectively pass through different compensation nodes from the node to be compensated and return to the node to be compensated; S23, the signal flow graph after adding the compensation node is a compensation scheme; after compensation, the node to be compensated is marked as a compensated node and the signal flow graph is restored to the state to be compensated; S24, repeatedly executing S21 to S23, obtaining a new compensation scheme each time, until no node to be compensated that meets the requirements can be found; The adding of compensation nodes in a third compensation manner to the nodes to be compensated whose two signal paths have the attribute of a single signal path includes: S31, traversing the nodes to be compensated in the signal flow graph; S32, if it is found that both the node A to be compensated and the node B to be compensated have a single signal path attribute, and the transmission relationship is that the node A to be compensated flows to the node B to be compensated, and the second marking methods of the node A to be compensated and the node B to be compensated are the same, then a compensation node is set between the node A to be compensated and the node B to be compensated to form a transmission path for the signal from the node B to be compensated to the node A to be compensated through the compensation node; S33, if it is found that both the node A to be compensated and the node B to be compensated have a single signal path attribute, and the transmission relationship is that the node B to be compensated flows to the node A to be compensated, and the second marking methods of the node A to be compensated and the node B to be compensated are the same, then a compensation node is set between the node A to be compensated and the node B to be compensated to form a transmission path for the signal from the node A to be compensated to the node B to be compensated through the compensation node; S34, the signal flow graph after adding the compensation node is a compensation scheme, and after compensation, the node to be compensated is marked as a compensated node and the signal flow graph is restored to the state to be compensated; S35, repeatedly executing S31 to S34, obtaining a new compensation scheme each time, until no node to be compensated that meets the requirements can be found.

8. A computer device comprising a memory, a processor and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the steps of the phase compensation method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the phase compensation method according to any one of claims 1 to 6 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the phase compensation method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Phase compensation method and device and storage medium

    CN115567358A

  • Circuits and methods for improving slew rate of differential amplifiers

    CN1767379A