Detection method and electronic equipment
By constructing a parameter matrix of multivariate linear equations and using the nodal voltage method, the circuit network status of circuit schematics is automatically detected, solving the problems of low efficiency and error susceptibility in circuit schematic detection, and achieving efficient and accurate line status detection and troubleshooting.
Patent Information
- Application Number
- CN202410302308.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-15
- Publication Date
- 2024-11-29
AI Technical Summary
Existing technologies for circuit schematic inspection are inefficient and prone to errors, especially as the scale of circuits increases, making manual inspection methods insufficient to meet the demands.
By generating netlist data from the circuit schematic, a parameter matrix of multivariate linear equations is constructed. The voltage values of each network node in the circuit network are solved using the nodal voltage method, and abnormal state detection is performed, including checking voltage, current, and power conditions.
It achieves automated, accurate, and efficient circuit status detection of circuit schematics, reduces the input of manual resources, improves detection efficiency and accuracy, and can promptly detect abnormal states and errors in circuit design.
Smart Images

Figure CN119047393A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of circuit design and detection technology, and in particular, relates to a detection method and electronic equipment. Background Art
[0002] After the circuit schematic is designed, it is necessary to conduct relevant tests on the circuit schematic to see if it meets the design requirements and to troubleshoot in time, such as checking whether the actual voltage of the capacitor exceeds the rated voltage of the capacitor, whether the actual current of the resistor exceeds the rated current of the resistor, etc. The known technology realizes the detection of the circuit schematic by manual inspection. However, as electronic equipment becomes more and more complex, the scale of the circuit schematic becomes larger and larger, resulting in more and more time and energy required for the detection of the circuit schematic. At the same time, the manual inspection method also has problems such as low efficiency and easy errors. Summary of the invention
[0003] To this end, this application discloses the following technical solutions:
[0004] A detection method comprising:
[0005] Obtaining a schematic diagram of a circuit to be tested;
[0006] Generate netlist data corresponding to the circuit schematic diagram; the netlist data includes the connection relationship between each network node and the corresponding components in the circuit network formed by the circuit schematic diagram;
[0007] According to the netlist data, the voltage values corresponding to each network node in the circuit network are determined by constructing a parameter matrix of a multivariate linear equation; wherein the resistance value of each component in the circuit network is used as a parameter in the parameter matrix, and the unknowns to be solved in the multivariate linear equation include the voltages corresponding to each network node in the circuit network;
[0008] According to the voltage values corresponding to the respective network nodes, abnormal state detection is performed on the circuit network formed by the circuit schematic.
[0009] Optionally, determining the voltage values corresponding to each network node in the circuit network by constructing a parameter matrix of a multivariate linear equation according to the netlist data includes:
[0010] According to the connection relationship between each network node and the corresponding component in the circuit network, the component resistance value between two network nodes respectively included in each network node pair is obtained; the network node pair is a node pair formed by two electrically adjacent network nodes in the circuit network;
[0011] By constructing the parameter matrix of the multivariate linear equation according to the component resistance values between the two network nodes respectively included in each network node pair, the voltage values respectively corresponding to each network node in the circuit network are determined.
[0012] Optionally, obtaining the component resistance value between two network nodes respectively included in each network node pair according to the connection relationship between each network node and the corresponding component in the circuit network includes:
[0013] According to the connection relationship between each network node and the corresponding components in the circuit network, the circuit network is traversed by a recursive method to obtain the component resistance value between two network nodes respectively included in each network node pair in the circuit network.
[0014] Optionally, the step of constructing a parameter matrix of the multivariate linear equation according to component resistance values between two network nodes respectively included in each network node pair to determine voltage values respectively corresponding to each network node in the circuit network includes:
[0015] Constructing a parameter matrix of the multivariate linear equation according to component resistance values between two network nodes respectively included in each network node pair;
[0016] The parameter matrix is used to solve the multivariate linear equation by node voltage method according to Erhof's law, so as to obtain the voltage values corresponding to each network node in the circuit network.
[0017] Optionally, before using the parameter matrix to solve the multivariate linear equation, the method further includes:
[0018] The parameter matrix is simplified; the simplification includes at least one of the following: eliminating 0 ohm parameters in the parameter matrix, and merging resistance values corresponding to parallel resistors in the parameter matrix.
[0019] Optionally, the performing abnormal state detection on the circuit network formed by the circuit schematic diagram according to the voltage values corresponding to the respective network nodes includes at least one of the following:
[0020] Detecting whether the voltage of components and / or component pins in the circuit network meets the voltage condition;
[0021] Detecting whether the current of the components in the circuit network meets the current condition;
[0022] Check whether the power of the components in the circuit network meets the power conditions.
[0023] Optionally, the detection method further includes:
[0024] According to the parameter matrix, it is detected whether the power supply in the circuit network is in a short-circuit state, and / or the series-parallel state of the resistors in the circuit network is detected.
[0025] Optionally, the detection method further includes:
[0026] According to the connection relationship between each network node and the corresponding components in the circuit network, it is detected whether there is a single-point network in the circuit network and / or whether there is an empty pin.
[0027] Optionally, the netlist data further includes at least one of the following: a correspondence between the page number of the circuit schematic and the network nodes and components in the circuit network, and attributes of each component in the circuit network;
[0028] The method further comprises at least one of the following:
[0029] In the case where there are multiple component symbols corresponding to the same component in the circuit schematic, detecting whether the multiple component symbols corresponding to the same component are in consecutive pages of the circuit schematic according to the corresponding relationship between the page number of the circuit schematic and the network nodes and components in the circuit network;
[0030] Detecting whether a first attribute of each component in the circuit network satisfies an attribute condition;
[0031] According to the second attribute of each component in the circuit network, it is detected whether the naming of each component meets the corresponding naming rule.
[0032] An electronic device, comprising:
[0033] A memory for storing at least one set of computer instructions;
[0034] A processor is used to implement the detection method as described in any one of the above items by executing the instruction set stored in the memory.
[0035] It can be seen from the above scheme that the present application discloses a detection method and an electronic device, wherein the detection method includes: obtaining a circuit schematic to be detected; generating netlist data corresponding to the circuit schematic; the netlist data includes the connection relationship between each network node and the corresponding components in the circuit network formed by the circuit schematic; according to the netlist data, determining the voltage values corresponding to each network node in the circuit network by constructing a parameter matrix of a multivariate linear equation; wherein the resistance value of each component in the circuit network is used as a parameter in the parameter matrix, and the unknowns to be solved in the multivariate linear equation include the voltages corresponding to each network node in the circuit network; according to the voltage values corresponding to each network node, the circuit network formed by the circuit schematic is detected for abnormal status. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are merely embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0037] Figure 1 It is a flow chart of the detection method provided by the present application;
[0038] Figure 2 This is an example diagram of the circuit network detection process provided by this application;
[0039] Figure 3 is another flow chart of the detection method provided by the present application;
[0040] Figure 4 It is another flow chart of the detection method provided by the present application;
[0041] Figure 5 is an example of a schematic diagram of a circuit to be detected provided in this application;
[0042] FIG6(a) and FIG6(b) are respectively a single-point network detection report provided by the present application and a schematic diagram of a single-point network detected in a circuit network formed by a circuit schematic diagram;
[0043] FIG. 7( a ) and FIG. 7( b ) are respectively an empty pin detection report provided by the present application and a schematic diagram of an empty pin detected in a circuit network formed by a circuit schematic diagram;
[0044] FIG8(a) and FIG8(b) are respectively a symbol detection report provided by the present application and a schematic diagram of a situation in which symbols of the same component are detected to be distributed on non-continuous pages in a circuit network;
[0045] Fig. 9 It is a structural diagram of the electronic device provided in this application. DETAILED DESCRIPTION
[0046] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0047] The present application embodiment provides a detection method and electronic device, which are used for automatically detecting the circuit status of a designed circuit schematic diagram by analyzing the circuit network formed by the circuit schematic diagram, so as to achieve accurate and efficient circuit troubleshooting. The detection method provided by the present application embodiment can be used in electronic devices under many general or special computing device environments or configurations, such as personal computers, server computers, handheld devices or portable devices, tablet devices, multi-processor devices, etc.
[0048] See also Figure 1 , shows a schematic flow chart of a detection method provided in an embodiment of the present application, the detection method at least comprising:
[0049] Step 101: Obtain a circuit schematic diagram to be tested.
[0050] After the circuit schematic design is completed, the circuit schematic can be specifically imported to implement line status detection of the circuit network formed by the circuit schematic through subsequent processing steps.
[0051] Step 102: Generate netlist data corresponding to the circuit schematic diagram; the netlist data includes the connection relationship between each network node and the corresponding components in the circuit network formed by the circuit schematic diagram.
[0052] Optionally, the netlist data may be implemented in the form of a netlist file, that is, the data content of the netlist data is organized and stored through the netlist file.
[0053] A network node in a circuit network specifically refers to the terminal end point of any branch or the interconnection common point of two or more branches in the network in the network topology of the circuit network. Different network nodes are connected through resistive devices, which include but are not limited to capacitors, resistors, inductors, chips, diodes and other devices. In the embodiments of the present application, the resistive devices between network nodes are referred to as components.
[0054] After obtaining the circuit schematic to be tested, the corresponding netlist data extraction tool can be used to extract netlist data from the circuit network formed by the circuit schematic to obtain netlist data that at least includes the connection relationship between each network node in the circuit network and the corresponding components, and a netlist file containing the extracted netlist data can be generated and output.
[0055] Step 103: According to the netlist data, determine the voltage values corresponding to each network node in the circuit network by constructing a parameter matrix of a multivariate linear equation; wherein the resistance value of each component in the circuit network is used as a parameter in the parameter matrix, and the unknowns to be solved in the multivariate linear equation include the voltages corresponding to each network node in the circuit network.
[0056] Optionally, step 103 may be implemented as the following steps 11)-12):
[0057] 11) According to the connection relationship between each network node and the corresponding components in the circuit network, the component resistance value between two network nodes respectively included in each network node pair is obtained; the network node pair is a node pair formed by two electrically adjacent network nodes in the circuit network.
[0058] The connection relationship between each network node and the corresponding components in the circuit network can be specifically obtained from the netlist data of the circuit schematic.
[0059] Optionally, this step may be based on the connection relationship information between each network node and the corresponding components in the circuit network in the netlist data, and traverse the circuit network by a recursive method to obtain the component resistance value between two network nodes respectively included in each network node pair in the circuit network.
[0060] In the process of traversing the circuit network by a recursive method, the network node corresponding to the opposite end of a component connected to the current network node under the current traversal progress is specifically obtained. If the opposite end network node obtained is a power supply (the power supply includes the ground terminal GND, all power supplies in the circuit network have been marked in advance, and the voltage values of all power supplies are known and are constants), or the opposite end network node has been traversed (each traversed network node can be marked), the component resistance between the two nodes (the current network node and the opposite end network node) is recorded and the identifier of the opposite end network node is recorded; if the opposite end network node obtained is not a power supply and is not marked (that is, it has not been traversed before), the component resistance between the two nodes (the current network node and the opposite end network node) is recorded and the identifier of the opposite end network node is recorded, and the opposite end network node is regarded as the new current network node, and the above process is repeated until all the resistances of each network node in the circuit network and the network nodes of the opposite end are all traversed, and the traversal is terminated when the component resistance value between the two network nodes respectively included in all network node pairs in the circuit network is obtained.
[0061] Through the above process, the component resistance value between every two electrically adjacent network nodes in the circuit network formed by the circuit schematic to be detected can be finally obtained, that is, the component resistance value between the two network nodes respectively included in each of the network node pairs.
[0062] In implementation, the resistance values of components between each pair of electrically adjacent network nodes are not limited to the above recursive traversal method. For example, in other implementations, the identifiers of each pair of electrically adjacent network nodes in the circuit network and the identifiers of components between the electrically adjacent network nodes can also be manually input, and the tool extracts the resistance values of components between each pair of electrically adjacent network nodes in a certain order (such as the input order or the reverse order of the input order, etc.) according to the input information.
[0063] 12) Determine the voltage values corresponding to each network node in the circuit network by constructing a parameter matrix of the multivariate linear equation according to the resistance values of components between two network nodes respectively included in each network node pair.
[0064] After obtaining the component resistance values between two network nodes respectively included in each network node pair in the circuit network formed by the circuit schematic to be detected, this embodiment further constructs a parameter matrix of a multivariate linear equation based on the component resistance values between two network nodes respectively included in each network node pair.
[0065] The parameters in the constructed parameter matrix specifically include the component resistance value between the two network nodes respectively included in each network node pair, that is, the component resistance value between each pair of electrically adjacent network nodes is used as a parameter in the parameter matrix. The unknowns to be solved in the multivariate linear equation include the voltages corresponding to each network node in the circuit network.
[0066] On the basis of constructing the parameter matrix of the multivariate linear equation, the constructed parameter matrix can be further used to solve the multivariate linear equation.
[0067] Specifically, the parameter matrix can be used to solve the multivariate linear equation by the node voltage method according to Erhof's law, and the voltage values corresponding to each network node in the circuit network formed by the circuit schematic diagram to be detected can be obtained by solving the multivariate linear equation.
[0068] Optionally, the multivariate linear equation may be specifically implemented in the form of a system of multivariate linear equations.
[0069] The following text will describe in detail the above recursive traversal process and the process of constructing a parameter matrix of a multivariate linear equation based on the resistance values obtained by the traversal and then solving the multivariate linear equation through specific examples.
[0070] In actual implementation, if the parameter matrix is a singular matrix, it means that the parameters are insufficient. Specifically, in this case, the circuit network corresponding to the circuit schematic diagram to be detected is in an open circuit state, that is, the circuit network is not designed to be connected to the power supply, which will lead to insufficient parameters and thus no solution to the multivariate linear equation. If the parameter matrix is not a singular matrix, the multivariate linear equation can be solved based on the parameter matrix to obtain the voltage values of each network node in the circuit network formed by the circuit schematic diagram to be detected.
[0071] Step 104: Perform abnormal state detection on the circuit network formed by the circuit schematic diagram according to the voltage values corresponding to the respective network nodes.
[0072] After obtaining the voltage values corresponding to each network node in the circuit network formed by the circuit schematic to be detected, the embodiment of the present application performs abnormal state detection on the circuit network formed by the circuit schematic to be detected based on the obtained voltage values of each network node.
[0073] See also Figure 2 The circuit network detection process example diagram shown in the figure detects abnormal state of the circuit network formed by the circuit schematic diagram to be detected, including but not limited to at least one of the following:
[0074] 21) Check whether the voltage of components and / or component pins in the circuit network meets the voltage conditions;
[0075] 22) Check whether the current of components in the circuit network meets the current conditions;
[0076] 23) Check whether the power of components in the circuit network meets the power requirements.
[0077] The above voltage conditions, current conditions and power conditions can be determined according to the actual detection requirements of the circuit schematic to be detected and / or the actual operating condition requirements of the circuit network formed by the circuit schematic to be detected. Exemplarily, according to the actual operating condition requirements of the circuit network formed by the circuit schematic to be detected, the voltage condition is configured so that the voltage of the components or component pins in the circuit network does not exceed the predetermined voltage value, and similarly, the current condition is configured so that the current of the components in the circuit network does not exceed the predetermined current value, and the power condition is configured so that the power of the components in the circuit network does not exceed the predetermined power value.
[0078] Optionally, the above-mentioned predetermined voltage value may be the rated voltage value of the components or component pins in the circuit network, or a value determined based on the rated voltage value, such as 1.2 times the rated voltage value, etc., which may be determined according to actual needs. Similarly, the predetermined current value may be, but not limited to, the rated current value of the components in the circuit network or a value determined based on the rated current value, and the predetermined power value may be, but not limited to, the rated power value of the components in the circuit network or a value determined based on the rated power value.
[0079] When performing abnormal state detection on the circuit network formed by the circuit schematic diagram to be detected based on the obtained voltage values of each network node, if it is necessary to perform voltage detection on the components and / or component pins in the circuit network, specifically, a node voltage difference operation can be performed on the network nodes at both ends of the components and / or component pins in the circuit network to obtain the voltage value on the components and / or component pins, and then determine whether the voltage value meets the voltage condition; if it is necessary to detect the current of the components in the circuit network, the component current can be calculated based on the component voltage obtained by the node voltage difference operation and the component resistance, and then determine whether the component current meets the current condition; if it is necessary to detect the power of the components in the circuit network, the component power can be calculated based on the component voltage obtained by the node voltage difference operation and the component current calculated based on the component voltage, and then determine whether the component power meets the power condition.
[0080] In summary, the detection method provided by the embodiment of the present application includes: obtaining a circuit schematic to be detected, generating netlist data corresponding to the circuit schematic, determining the voltage values corresponding to each network node in the circuit network formed by the circuit schematic to be detected by constructing a parameter matrix of a multivariate linear equation according to the generated netlist data, and then performing abnormal state detection on the circuit network formed by the circuit schematic to be detected based on the voltage values corresponding to each network node in the circuit network. It can be seen that the embodiment of the present application realizes automatic line detection of the circuit network formed by the circuit schematic to be detected by performing correlation analysis on the circuit network formed by the circuit schematic to be detected, reduces the manual resources invested in the circuit schematic detection, and overcomes the problems of low line detection efficiency and easy errors in the manual inspection method, and can support accurate and efficient line state detection and line troubleshooting and error correction.
[0081] In an optional embodiment, in conjunction with Figure 2 The detection method provided in the present application may further include the following processing before using the constructed parameter matrix of the multivariate linear equation to solve the multivariate linear equation:
[0082] The parameter matrix is simplified.
[0083] The simplification process includes but is not limited to at least one of the following: eliminating 0 ohm parameters in the parameter matrix, and merging resistance values corresponding to parallel resistors in the parameter matrix.
[0084] Among them, if the component resistance value between two electrically adjacent network nodes is 0, the two network nodes can be merged, and the component resistance value between the two network nodes (i.e., 0 ohms) can be correspondingly removed from the parameter matrix; if two or more resistors in the circuit network are connected in parallel, the resistance values of each parallel resistor can be merged into one resistance value based on the combined resistance calculation formula of the parallel resistors, and the obtained combined resistance value can be set in the parameter matrix as a parameter of the parameter matrix to simplify the parameter matrix.
[0085] Subsequently, the multivariate linear equation can be solved based on a simplified parameter matrix to obtain voltage values corresponding to each network node in the circuit network formed by the circuit schematic diagram to be detected.
[0086] This embodiment can reduce the complexity of the parameter matrix by performing simplification processing such as removing zeros or merging parallel resistors on the parameter matrix of the multivariate linear equation, and correspondingly improve the data processing efficiency when solving the multivariate linear equation based on the parameter matrix.
[0087] In an optional embodiment, the detection method provided by the present application may further include the following processing:
[0088] According to the constructed parameter matrix of the multivariate linear equation, detect whether the power supply in the circuit network formed by the circuit schematic diagram to be detected is in a short-circuit state, and / or detect the series-parallel state of the resistors in the circuit network.
[0089] Optionally, it is possible to determine whether there is a power supply in the circuit network formed by the circuit schematic diagram to be detected that will be directly short-circuited through a 0Ω (ohm) resistor or inductor, etc., based on the resistance values between different network nodes in the parameter matrix, and if so, which power supply will be directly short-circuited through a 0Ω resistor / inductor, etc. In addition, it is also possible to detect the series-parallel state of the resistors in the circuit network based on the connection relationship between the components and network nodes corresponding to each parameter value in the parameter matrix of the multivariate linear equation.
[0090] The corresponding output is the detection result of the power short-circuit state in the circuit network, and / or the detection result of the series-parallel state of the resistors, so that when the power short-circuit state exists, it is convenient for designers and other relevant personnel to timely debug and correct the circuit schematic according to the output results, eliminate the short-circuit fault, and / or adjust / optimize the resistance setting in the circuit according to the series-parallel state of the resistors, for example, to determine whether parallel resistors can be combined to simplify the circuit, or whether there is a repeated pull-up and pull-down situation, etc.
[0091] In an alternative embodiment, see Figure 3 The detection method provided in the present application may further include the following processing:
[0092] Step 105: Detect whether there is a single-point network in the circuit network and / or whether there is an empty pin based on the connection relationship between each network node and the corresponding components in the circuit network.
[0093] Specifically, based on the connection relationship between each network node and the corresponding components in the circuit network formed by the circuit schematic to be tested in the netlist data, it can be determined whether there is a network connected to only one pin in the circuit network. If so, the network connected to only one pin is identified as a single-point network, and the corresponding single-point network detection result can be output, such as a single-point network report, so that circuit designers and other relevant personnel can know which networks (specifically a part of the circuit network) in the circuit network formed by the circuit schematic to be tested are only connected to one pin and not connected to other pins, so as to find out the single point in the circuit schematic to be tested that does not meet the design intent and discover the single-point design problem of the circuit schematic.
[0094] In addition, based on the connection relationship between each network node and the corresponding components in the circuit network formed by the circuit schematic to be detected in the netlist data, it is also possible to determine whether there are pins (such as chip pins) in the circuit network that are not connected to any network node. If so, the pins that are not connected to any network node are identified as empty pins, and the corresponding empty pin detection results are output, such as outputting an empty pin report, so that circuit designers and other relevant personnel can know which pins have no electrical connection, thereby finding out the empty pins in the circuit schematic that do not meet the design intent.
[0095] To sum up, this embodiment detects whether there is a single-point network and / or whether there is an empty pin in the circuit network according to the connection relationship between each network node and the corresponding components in the circuit network in the netlist data, which can facilitate circuit designers and other relevant personnel to quickly and accurately know circuit design problems such as single-point networks and / or empty pins that do not conform to the design intent in the circuit schematic, and then facilitate timely troubleshooting and correction of these design problems in the circuit schematic, and finally obtain a circuit schematic that conforms to the design intent.
[0096] In an optional embodiment, the netlist data also includes at least one of the following data information: the correspondence between the page number of the circuit schematic and the network nodes and components in the circuit network, and the attributes of each component in the circuit network.
[0097] Based on the data content contained in the netlist data in this embodiment, see Figure 4The detection method flow chart shown in the figure, the detection method provided by the present application may also include at least one of the following steps 106-108 ( Figure 4 Only the case where steps 106-108 are included at the same time is exemplified):
[0098] Step 106: When there are multiple component symbols corresponding to the same component in the circuit schematic, detect whether the multiple component symbols corresponding to the same component are in consecutive pages of the circuit schematic based on the correspondence between the page number of the circuit schematic and the network nodes and components in the circuit network.
[0099] The circuit schematic diagram to be detected may be on one or more pages, that is, the entire network diagram content of the circuit schematic diagram to be detected may be accommodated / covered by one or more pages, depending on the actual size of the circuit schematic diagram to be detected.
[0100] If the same component in the circuit schematic to be tested needs to be connected to a large number of other components, the same component is often represented as multiple component symbols in the circuit schematic to avoid overly complex design of the circuit schematic and improve readability of the circuit schematic.
[0101] The following examples illustrate:
[0102] For example, a component including multiple pins needs to connect to a large number of other components through its different pins. In this case, the pins can be divided into multiple groups according to a certain division logic (such as division by function), and each group of pins corresponds to a component symbol of the component. For example, the central processing unit is represented by three CPU symbols (that is, displayed as three "CPUs" in the circuit schematic), each CPU symbol corresponds to a group of pins of the central processing unit, and these three CPU symbols are regarded as the same central processing unit.
[0103] For the above-mentioned application scenarios, in this embodiment, when there are multiple component symbols corresponding to the same component in the circuit schematic, it is determined whether the multiple component symbols corresponding to the same component are in consecutive pages of the circuit schematic based on the page number of the circuit schematic in the netlist data and the correspondence between the network nodes and components in the circuit network.
[0104] If it is not on a continuous page, a prompt message is output to prompt designers and other relevant personnel to determine whether there are design problems such as cross-use of symbols in the circuit schematic, and to promptly troubleshoot and correct the errors if they exist.
[0105] Step 107: Detect whether the first attribute of each component in the circuit network satisfies the attribute condition.
[0106] The properties of each component in the netlist data include but are not limited to the model, manufacturer, material loading properties, and component type of each component.
[0107] The loading properties of components, also known as loading properties, are used to characterize whether components need to be loaded. Whether components need to be loaded specifically refers to whether components need to be soldered to the PCB (Printed Circuit Board). In actual applications, some components need to be soldered to the PCB, while others do not, depending on actual needs.
[0108] Optionally, the first attribute of the component is a loading attribute of the component.
[0109] This step can specifically obtain the material loading attributes of each component from the netlist data of the circuit schematic to be tested, and determine whether the material loading attributes of each component are compliant attributes. If they are not compliant, the corresponding test results are output, such as a test report that the material loading attributes of a certain component / certain components are not compliant. For example, assuming that the material loading attributes of the components that need to be loaded are expressed as "POP" and the material loading attributes of the components that do not need to be loaded are expressed as "DEPOP", the material loading attributes of each component can be read from the netlist data, and it can be checked whether the material loading attributes of each component are one of the two values. If not, the identification of the component is recorded and a test report that its material loading attributes are not compliant is output to remind designers and other relevant personnel to perform troubleshooting and error correction to avoid serious situations in which material loading errors occur in subsequent board making.
[0110] Step 108: According to the second attribute of each component in the circuit network, detect whether the naming of each component meets the corresponding naming rule.
[0111] Optionally, the second attribute of the component is the type of the component, including but not limited to capacitors, resistors, inductors, chips, diodes and other types.
[0112] In circuit design, each type of component has a corresponding naming rule. For example, the chip starts with U, and the corresponding serial number is added to each chip in sequence (that is, labeled in sequence), such as U1, U2, etc.; the resistor starts with R, and the corresponding serial number is added to each resistor in sequence, such as R1, R2, etc.
[0113] This embodiment specifically detects whether the naming of components meets the corresponding naming rules based on the types of components in the netlist data of the circuit schematic, and outputs corresponding detection results if they do not meet the rules, such as outputting a detection report containing the identification of each component that does not meet the naming rules and the corresponding component type, so that designers and other relevant personnel can promptly learn about the naming errors of components in the circuit schematic and correct them. The overall detection process of the circuit schematic can be combined with reference to Figure 2An exemplary detection process is provided.
[0114] In practice, the execution order of step 106, step 107 and step 108 is not limited, and each step can be executed serially or in parallel.
[0115] This embodiment further improves the comprehensiveness of the detection of whether the circuit schematic meets the design requirements, which can facilitate designers and other relevant personnel to quickly and accurately discover more potential design problems in the circuit schematic, and thus facilitate timely troubleshooting and error correction.
[0116] An application example of the present application method is provided below.
[0117] This example specifically Figure 5 The circuit schematic diagram shown is used for detection. Figure 5 The schematic diagram of the circuit to be detected shown can be regarded as a part of the entire schematic diagram project. All network nodes in the schematic diagram of the circuit to be detected will be processed in the same way based on the method of the present application, so as to obtain the voltage values of all network nodes in the entire schematic diagram of the circuit to be detected. The larger the scale of the schematic diagram of the circuit to be detected, the more obvious the human resource savings of the automatic line detection process based on the method of the present application, and the more obvious the improvement in detection efficiency and accuracy.
[0118] right Figure 5 The detection process of the circuit schematic shown mainly includes:
[0119] 1. Traverse the circuit network and build a parameter matrix
[0120] Specifically, the circuit network formed by the circuit schematic diagram to be detected is traversed in a recursive manner to obtain the resistance value of each component in the circuit network, and then the parameter matrix of the multivariate linear equation is constructed based on the resistance value of the component. The implementation process is as follows:
[0121] 11. When traversing the network, first traverse to "NETA" (denoted as "A"). R14, R10, and R4 are connected to "NETA".
[0122] Among them, NETA is aimed at Figure 5 The circuit schematic diagram shown has a customized network node for starting / starting the traversal. In actual applications, the network node for starting / starting the traversal can be set arbitrarily.
[0123] 12. First, bring R14 into the function fun(R14). Because the other end of R14 is connected to a certain voltage P12V_PSU (denoted as "U1"), the function fun directly returns U1·R14. R14 is a mutual resistance of "NETA".
[0124] The input of the function fun is the identifier of the resistor, and the output is the opposite node corresponding to the resistor and the resistance value of the resistor: such as "U1·R14".
[0125] 13. Then bring R10 into the function fun(R10). The other end of R10 is connected to "NETB" (denoted as "B"). Since "NETB" is a network node that has not been traversed, for the resistors R1 / R6 / R7 / R8, etc. on "NETB", return to step "11" to start the loop to repeat the same process. After that, the current function returns B·R10. R10 is the second mutual resistance of "NETA".
[0126] 14. Then bring R4 into the function fun(R4). The other end of R4 is connected to "NETE" (denoted as "E"). Since "NETE" is a traversed network node (traversed in the process of processing R1 in step "3"), for "NETE", the current function returns E·R4. R4 is the third mutual resistance of "NETA".
[0127] After the three connected resistors of "NETA" are traversed, a set of data can be obtained:
[0128] A: U1·R14, B·R10, E·R4.
[0129] Repeat the above steps for "NETB" in step "13" above:
[0130] 21. Determine the resistors R1, R6, R7, R8, and R10 on "NETB".
[0131] 22. Substitute R1 into the function fun(R1). The other end of R1 is connected to "NETE". Since "NETE" is a network node that has not been traversed, the same process is repeated for the resistors R2 / R4 / R5 / R8 / R13 on "NETE". After that, the current function returns E·R1. R1 is the first mutual resistance of "NETB".
[0132] 23. Bring R8 into the function fun(R8). The other end of R1 is also connected to "NETE". Since "NETE" has been traversed and the other end of R1 is also "NETE", it is considered that R8 and R1 are in parallel, so the first mutual resistance is modified to: E·R1 / / R8.
[0133] 24. Then bring R6 into the function fun(R6). The other end of R6 is connected to "NETD" (denoted as "D"). Since "NETD" is a network node that has not been traversed, the resistors R2 / R3 / R6 on "NETD" are looped from step "11" to repeat the above process. After that, the current function returns D·R6. R6 is the second mutual resistance of "NETB".
[0134] 25. First, bring R5 into the function fun(R5). Because the other end of R5 is connected to a certain voltage "P12V_PSU" (referred to as "U1"), the function fun directly returns U1·R5. R5 is the third mutual resistance of "NETA".
[0135] 26. Substitute R10 into the function fun(R10). The other end of R10 is connected to "NETA". Since "NETA" has been traversed, the fourth mutual resistance is modified to: A·R10.
[0136] After the four connected resistors of "NETB" are traversed, a set of data can be obtained:
[0137] B: E·R1 / / R8, D·R6, U1·R7, A·R10.
[0138] Similarly, repeating the above steps, you can traverse the entire circuit network formed by the circuit schematic to be tested and get the following data list:
[0139]
[0140] By replacing the resistance and voltage in the above data list with their specific values, we can get the following data list, which can be regarded as the parameter matrix of the multivariate linear equation:
[0141]
[0142] The network nodes connected to at least some 0-ohm resistors in the parameter matrix are merged and simplified (i.e., at least some 0-ohm resistors are removed), and the following simplified parameter matrix is obtained:
[0143]
[0144] 2. Solve the multivariate linear equation based on the simplified parameter matrix to obtain the voltage value of each network node
[0145] According to Kirchhoff's law, the node voltage method is used: self-conductance × current node voltage - ∑ (mutual conductance × adjacent node voltage) = the algebraic sum of all power supply currents flowing through the node. This article does not use current sources, only voltage sources, so it is simplified to: current voltage x sum of all self-conductances - ∑ (mutual conductance × adjacent node voltage) = 0, and then we get: current voltage x sum of all self-conductances = ∑ (mutual conductance × adjacent node voltage). For example, for the above formula:
[0146] A: U1·R14, B·R10, E·R4;
[0147] It can be calculated that: Point A self-guiding = 1 / R14+1 / R10+1 / R4;
[0148] Mutual conductance to U1 = 1 / R14; Mutual conductance to point B = 1 / R10; Mutual conductance to point E = 1 / R4;
[0149] The equation is: A*(1 / R14+1 / R10+1 / R4)=U1 / R14+B / R10+E / R4;
[0150] Substituting the numerical values into the equation, we get: 0.025*A–0.005*B–0.01*E=0.12.
[0151] Similarly, repeating the above calculations can obtain the following set of equations (i.e., multivariate linear equations):
[0152]
[0153] Its specific coefficient matrix is:
[0154]
[0155] Finally, the equation is solved to obtain the voltage of each network node in the circuit network formed by the circuit schematic diagram to be tested:
[0156]
[0157] 3. Detect abnormal status of the circuit network according to the voltage value of each network node
[0158] Including but not limited to calculating the voltage, component current, component power and other parameters on each component (or its pins) based on the voltage value of each network node, and then detecting whether the voltage on each component (or its pins) exceeds its tolerance voltage (such as rated voltage), whether the current / power of each component exceeds its tolerance current / tolerance power (such as rated current / rated power), etc.
[0159] 4. Check single point
[0160] Referring to FIG. 6( a ) and FIG. 6( b ), a single-point network detection report and a schematic diagram of a single-point network detected in a circuit network formed by a circuit schematic diagram are shown respectively. Among them, GPIO0_ASM1061 is detected as belonging to a single-point network in the output single-point detection report. According to actual design requirements, GPIO0_ASM1061 needs to be connected to a CPLD (Complex Programmable Logic Device). By comparing the circuit schematic diagram, it is found that the circuit design does not connect to the CPLD, so correction is required.
[0161] 5. Empty pin detection
[0162] 7( a ) and 7 ( b ), which respectively show an empty pin detection report and a schematic diagram of an empty pin detected in a circuit network formed by a circuit schematic diagram.
[0163] Among them, for the U2.46 pin, according to the design requirements, the pin should not be empty. However, by comparing with the circuit schematic, it is found that the pin is not successfully connected to other components, so it needs to be corrected.
[0164] 6. Check symbol (component symbol)
[0165] 8(a) and 8(b) show a symbol detection report and a schematic diagram of a situation where symbols of the same component are detected to be distributed on non-continuous pages in a circuit network, respectively.
[0166] If the symbols of the same component are distributed on non-continuous pages, it is possible that when generating symbols for this component, different symbols that should not be the same component are mistakenly generated as the same symbol.
[0167] For example, in Figure 8(b), the same component U2 has multiple symbols, namely "U2" in PAGE5 and "U2" in PAGE7, and the same component U1 also has multiple symbols, namely "U1" in PAGE5 and "U1" in PAGE7. Through symbol detection, the detection result that the component symbols of U1 and U2 are not in consecutive pages is output to remind the designer to verify. After actual verification, it is found that there are errors in the symbols in these two places, among which "U1" in PAGE5 should be corrected to "U2", and "U2" in PAGE7 should be corrected to "U1".
[0168] The present application also discloses an electronic device, the composition structure of the electronic device, such as Fig. 9 As shown, including at least:
[0169] A memory 10, for storing a computer instruction set;
[0170] A set of computer instructions can be implemented in the form of a computer program.
[0171] The processor 20 is used to implement the detection method disclosed in any of the above method embodiments by executing a computer instruction set.
[0172] The processor 20 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices.
[0173] Optionally, the electronic device may also include a display device and / or a display interface and may be connected to an external display device.
[0174] Optionally, the electronic device may further include a camera assembly, and / or be connected to an external camera assembly.
[0175] In addition, the electronic device may also include components such as a communication interface and a communication bus. The memory, the processor and the communication interface communicate with each other through the communication bus.
[0176] The communication interface is used for communication between electronic devices and other devices. The communication bus can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc.
[0177] It should be noted that the various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0178] For the convenience of description, the above system or device is described by dividing it into various modules or units according to its functions. Of course, when implementing the present application, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0179] It can be known from the description of the above implementation methods that those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the present application can be essentially or the part that makes a creative contribution can be embodied in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a disk, an optical disk, etc., including several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application or some parts of the embodiments.
[0180] Finally, it should be noted that, in this article, relational terms such as first, second, third and fourth are used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article 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, article or device. In the absence of further restrictions, the elements defined by the statement "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0181] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A detection method comprising: Obtaining a schematic diagram of a circuit to be tested; Generate netlist data corresponding to the circuit schematic diagram; the netlist data includes the connection relationship between each network node and the corresponding components in the circuit network formed by the circuit schematic diagram; According to the netlist data, the voltage values corresponding to each network node in the circuit network are determined by constructing a parameter matrix of a multivariate linear equation; wherein the resistance value of each component in the circuit network is used as a parameter in the parameter matrix, and the unknowns to be solved in the multivariate linear equation include the voltages corresponding to each network node in the circuit network; According to the voltage values corresponding to the respective network nodes, abnormal state detection is performed on the circuit network formed by the circuit schematic.
2. The detection method according to claim 1, wherein determining the voltage values corresponding to each network node in the circuit network by constructing a parameter matrix of a multivariate linear equation based on the netlist data comprises: According to the connection relationship between each network node and the corresponding component in the circuit network, the component resistance value between two network nodes respectively included in each network node pair is obtained; the network node pair is a node pair formed by two electrically adjacent network nodes in the circuit network; By constructing the parameter matrix of the multivariate linear equation according to the component resistance values between the two network nodes respectively included in each network node pair, the voltage values respectively corresponding to each network node in the circuit network are determined.
3. The detection method according to claim 2, wherein the step of obtaining the component resistance value between two network nodes respectively included in each network node pair according to the connection relationship between each network node and the corresponding component in the circuit network comprises: According to the connection relationship between each network node and the corresponding components in the circuit network, the circuit network is traversed by a recursive method to obtain the component resistance value between two network nodes respectively included in each network node pair in the circuit network.
4. The detection method according to claim 2, wherein the parameter matrix of the multivariate linear equation is constructed according to the component resistance values between the two network nodes respectively included in each network node pair to determine the voltage values respectively corresponding to each network node in the circuit network, comprising: Constructing a parameter matrix of the multivariate linear equation according to component resistance values between two network nodes respectively included in each network node pair; The parameter matrix is used to solve the multivariate linear equation by node voltage method according to Erhof's law, so as to obtain the voltage values corresponding to each network node in the circuit network.
5. The detection method according to claim 4, before using the parameter matrix to solve the multivariate linear equation, further comprising: The parameter matrix is simplified; the simplification includes at least one of the following: eliminating 0 ohm parameters in the parameter matrix, and merging resistance values corresponding to parallel resistors in the parameter matrix.
6. The detection method according to claim 1, wherein the abnormal state detection of the circuit network formed by the circuit schematic diagram according to the voltage values corresponding to the respective network nodes comprises at least one of the following: Detecting whether the voltage of components and / or component pins in the circuit network meets the voltage condition; Detecting whether the current of the components in the circuit network meets the current condition; Check whether the power of the components in the circuit network meets the power conditions.
7. The detection method according to claim 4, further comprising: According to the parameter matrix, it is detected whether the power supply in the circuit network is in a short-circuit state, and / or the series-parallel state of the resistors in the circuit network is detected.
8. The detection method according to claim 1, further comprising: According to the connection relationship between each network node and the corresponding components in the circuit network, it is detected whether there is a single-point network in the circuit network and / or whether there is an empty pin.
9. The detection method according to claim 1, wherein the netlist data further comprises at least one of the following: a correspondence between the page number of the circuit schematic and the network nodes and components in the circuit network, and attributes of each component in the circuit network; The method further comprises at least one of the following: In the case where there are multiple component symbols corresponding to the same component in the circuit schematic, detecting whether the multiple component symbols corresponding to the same component are in consecutive pages of the circuit schematic according to the corresponding relationship between the page number of the circuit schematic and the network nodes and components in the circuit network; Detecting whether a first attribute of each component in the circuit network satisfies an attribute condition; According to the second attribute of each component in the circuit network, it is detected whether the naming of each component meets the corresponding naming rule.
10. An electronic device, comprising: A memory for storing at least one set of computer instructions; A processor, configured to implement the detection method according to any one of claims 1 to 9 by executing the instruction set stored in the memory.
