A method for comparing network connections in a circuit design
Patent Information
- Application Number
- CN202610895311.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-22
- Publication Date
- 2026-08-21
- Estimated Expiration
- 2046-06-22
AI Technical Summary
[0003]然而,在电路设计过程中,由于在后端PCB中可能存在对网表中网络名称或者器件位号的修改,导致无法和前端电路设计图中的网络和器件相对应,因此无法检查出前端网络连接情况和后端PCB的网络连接情况是否一致,进而降低网络连接比较的可靠性
本发明将网表抽象为图数据,通过图数据中的集合进行比较,降低了比较过程的计算复杂度,提高了比较过程的效率,在网络名称和/或器件位号被修改的情况下,仍能够通过图数据对比的方式确定网表之间、网络之间的差异情况,从而提高了网络连接比较的可靠性,进而提高了电路设计效率。
Smart Images

Figure CN122433630B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of chip verification technology, and in particular to a method for comparing network connections in circuit design. Background Technology
[0002] In the field of electronic design automation, iterating circuit designs or comparing different design schemes is a common and crucial step. As a core file describing the connections between components in a circuit, the netlist's comparison results directly impact the efficiency of design correctness verification, change impact analysis, and error localization.
[0003] However, during the circuit design process, modifications to net names or component reference numbers in the netlist may occur in the back-end PCB, causing them to no longer correspond to the nets and components in the front-end circuit design. Therefore, it is impossible to check whether the network connection status of the front-end and the network connection status of the back-end PCB are consistent, thereby reducing the reliability of network connection comparison.
[0004] Therefore, improving the reliability of network connectivity comparison has become an urgent problem to be solved. Summary of the Invention
[0005] To address the aforementioned technical problems, the technical solution adopted by this invention is as follows: A method for comparing network connections in circuit design, the method comprising: S1, extract first graph data from the first netlist file to be compared, and extract second graph data from the second netlist file to be compared. The first graph data includes several first sets, and the second graph data includes several second sets. The first set includes several first nodes. For any first node, the first node has only one connection edge with other first nodes in its own first set. The second set includes several second nodes. For any second node, the second node has only one connection edge with other second nodes in its own second set. S2, for any first set, determine the second set that matches the first set from each second set whose matching identifier is not matched. If there is a second set that matches the first set, set the matching identifier of the second set that matches the first set to matched and execute step S3; otherwise, execute step S4. S3, determine whether there is a difference between the first set and its matching second set. If there is a difference, display the difference items of the first set and its matching second set in a first preset manner, wherein the difference items include the connection edges between the first node and the first node; S4, Display the first set in the second preset mode; S5, traverse all first sets in the first netlist file to obtain the comparison result between the first netlist file and the second netlist file.
[0006] Compared with the prior art, the present invention has significant advantages. Through the above technical solution, the comparison method for network connections in circuit design provided by the present invention achieves considerable technical progress and practicality, and has broad industrial application value. It has at least the following advantages: This invention abstracts netlists into graph data and compares sets within the graph data, reducing the computational complexity of the comparison process and improving its efficiency. Even when net names and / or device reference numbers are modified, the differences between netlists and between nets can still be determined through graph data comparison, thereby improving the reliability of network connection comparison and ultimately enhancing circuit design efficiency. Attached Figure Description
[0007] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0008] Figure 1 This is a flowchart illustrating a method for comparing network connections in circuit design, as provided in an embodiment of the present invention. Detailed Implementation
[0009] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0010] This embodiment provides a method for comparing network connections in circuit design. See [link to relevant documentation] Figure 1 This is a flowchart illustrating a method for comparing network connections in circuit design according to an embodiment of the present invention. The method includes: S1, extract first graph data from the first netlist file to be compared, and extract second graph data from the second netlist file to be compared. The first graph data includes several first sets, and the second graph data includes several second sets. The first set includes several first nodes. For any first node, the first node has only one connection edge with other first nodes in its own first set. The second set includes several second nodes. For any second node, the second node has only one connection edge with other second nodes in its own second set. S2, for any first set, determine the second set that matches the first set from each second set whose matching identifier is not matched. If there is a second set that matches the first set, set the matching identifier of the second set that matches the first set to matched and execute step S3; otherwise, execute step S4. S3, determine whether there is a difference between the first set and its matching second set. If there is a difference, display the difference items of the first set and its matching second set in a first preset manner, wherein the difference items include the connection edges between the first node and the first node; S4, Display the first set in the second preset mode; S5, traverse all first sets in the first netlist file to obtain the comparison result between the first netlist file and the second netlist file.
[0011] The netlist file is used to describe the circuit connection relationship, and the first netlist file and the second netlist file are a set of netlist files that need to be compared.
[0012] In the graph data, nodes correspond to the physical pins of devices, connecting edges correspond to the connection relationships between physical pins, and sets correspond to a complete network. The physical pins corresponding to the nodes in the same set are electrically connected.
[0013] The matching identifier is used to indicate whether the corresponding second set has been successfully matched by a certain first set, so as to avoid the same second set being matched repeatedly by multiple first sets.
[0014] Specifically, the first preset mode and the second preset mode can be set by the implementer. For example, both the first preset mode and the second preset mode can be set to red highlight.
[0015] In one specific implementation, the first netlist file includes a plurality of first network connection entries, each first network connection entry including a first network name and a plurality of first pin information, the first pin information including a first device reference number and a first pin identifier; The extraction of the first graph data from the first netlist file to be compared includes: For any first network connection item in the first netlist file, generate the same number of first nodes according to the number of first pin information in the first network connection item, interconnect the generated first nodes through connection edges, and for any generated first node, use the first physical name corresponding to the first device reference number in the first pin information of the first node as the attribute information of the first node, traverse all generated first nodes to obtain the first set corresponding to the first network connection item. Traverse all first network connection entries in the first netlist file to obtain the first set corresponding to each first network connection entry, and form the first graph data from all the first sets.
[0016] In this context, a network connection entry refers to all the information entries in the netlist file that describe a network. For example, a network connection entry is represented as NET_1:U1.PIN1;U2.PIN2;U3.PIN1, where NET_1 is the network name, U1, U2, and U3 are device reference numbers, PIN1 and PIN2 are pin identifiers, and U1.PIN1 refers to the PIN1 pin of device U1. This network connection entry indicates that the PIN1 pin of device U1, the PIN2 pin of device U2, and the PIN1 pin of device U3 are all connected to the NET_1 network.
[0017] Specifically, the physical name is a known, inherent, and unchanging physical attribute of the device. For example, the physical name is the device's factory model number. It can be seen that the network name and device reference number may change according to the design, but the physical name, as a node attribute, will not change. Therefore, in subsequent netlist comparisons, even if the network name and / or device reference number are modified, the differences between netlists and between networks can still be determined by comparing graph data, thereby improving the reliability of network connection comparisons.
[0018] In one specific implementation, the second netlist file includes several second network connection entries, each of which includes a second network name and several second pin information, the second pin information including a second device reference number and a second pin identifier; The extraction of the second graph data from the second netlist file to be compared includes: For any second network connection entry in the second netlist file, generate the same number of second nodes according to the number of second pin information in the second network connection entry, interconnect the generated second nodes through connection edges, and for any generated second node, use the second physical name corresponding to the second device reference number in the second pin information of the second node as the attribute information of the second node, traverse all generated second nodes to obtain the second set corresponding to the second network connection entry; Traverse all second network connection entries in the second netlist file to obtain the second set corresponding to each second network connection entry, and form the second graph data from all the second sets.
[0019] In addition, implementers can introduce information such as pin direction and pin type into the node attribute information according to actual needs to support more refined comparisons and further improve the reliability of netlist comparisons.
[0020] In one specific implementation, determining the second set that matches the first set from each of the second sets whose matching identifiers are not matched, for any first set, includes: For any first set, if the attribute information of each second node in any second set corresponds one-to-one with the attribute information of each first node in the first set, then the second set is used as the second set matched by the first set.
[0021] In this context, a one-to-one correspondence of attribute information means that the two sets have the same number of nodes and there is a bijective relationship, that is, each first node can find a second node with completely identical attribute information in the second set, and each second node can find a first node with completely identical attribute information in the first set.
[0022] It should be noted that when there is redundant design, for a first set, there may be multiple second sets that can match it. This embodiment adopts a priority matching strategy. That is, when it is first determined that the attribute information of each second node corresponds one-to-one with the attribute information of each first node in the first set, the second set is taken as the second set that matches the first set, and there is no need to continue the comparison.
[0023] In one specific implementation, the step of determining, for any first set, a second set matching the first set from each of the second sets marked as unmatched further includes: For any first set, if there is no second set in which the attribute information of each second node corresponds one-to-one with the attribute information of each first node in the first set, then the second set with the largest number of second nodes corresponding to the attribute information of each first node in the first set shall be the candidate set of the first set. After traversing all the first sets in the first netlist file, if the matching identifier of the candidate set is not matched, then the candidate set is used as the second set that matches the first set.
[0024] The candidate set refers to the second set whose attribute information does not completely correspond, but which has the highest degree of matching with the first set. The second set is used as the potential matching object. The candidate relationship is recorded first. After all the first sets have tried to match exactly, the candidate relationship is processed uniformly.
[0025] In one implementation, there is no need to record candidate relationships. After traversing all the first sets in the first netlist file, for the second set whose matching identifier is still unmatched, the unmatched first set with the highest matching degree with the second set can be selected for matching. The matching degree is represented by the number of nodes corresponding to the attribute information.
[0026] In one specific implementation, determining whether there is a difference between the first set and its matching second set includes: If the second set that matches the first set is a candidate set of the first set, then it is determined that there is a difference between the first set and the matching second set. The first node in the first set that does not correspond to the second node in the candidate set is taken as the difference item, and the connecting edge associated with the first node is taken as the difference item.
[0027] In this candidate set, the second node that does not correspond to the first node in the first set is also considered as a difference item, and correspondingly, the connecting edge associated with the second node is also considered as a difference item.
[0028] In one specific implementation, the matching identifiers of each second set are initially unmatched.
[0029] For example, unmatched and matched can be represented by Boolean values, with 0 representing unmatched and 1 representing matched.
[0030] In one specific implementation, the method further includes: S6, when the user selects a difference item displayed in the first preset mode, jump to the corresponding position of the difference item in the first circuit design diagram corresponding to the first netlist file; S7, when the user selects the first set displayed in the second preset mode, jump to the corresponding position of the first set in the first circuit design diagram corresponding to the first netlist file.
[0031] The first circuit design diagram refers to the source design file that generates the first netlist file, which is usually a circuit schematic or PCB layout diagram.
[0032] Specifically, the comparison results are linked to the original circuit design diagram, allowing users to directly jump to the corresponding location by clicking on the difference item or the unmatched set, thereby greatly improving the efficiency of problem location and enhancing the user experience.
[0033] In this embodiment, the netlist is abstracted as graph data. By comparing sets in the graph data, the computational complexity of the comparison process is reduced and the efficiency of the comparison process is improved. Even if the net name and / or device reference number is modified, the differences between netlists and between nets can still be determined by comparing graph data, thereby improving the reliability of network connection comparison and thus improving circuit design efficiency.
[0034] While specific embodiments of the invention have been described in detail by way of example, those skilled in the art should understand that the examples are for illustrative purposes only and not intended to limit the scope of the invention. Those skilled in the art should also understand that various modifications can be made to the embodiments without departing from the scope and spirit of the invention. The scope of this invention is defined by the appended claims.
Claims
1. A method for comparing network connections in circuit design, characterized in that, The method includes: S1, extract first graph data from the first netlist file to be compared, and extract second graph data from the second netlist file to be compared. The first graph data includes several first sets, and the second graph data includes several second sets. Each first set includes several first nodes, and for any given first node, there is only a connection edge between it and other first nodes within its own first set. Each second set includes several second nodes, and for any given second node, there is only a connection edge between it and other second nodes within its own second set. The first netlist file includes several first network connection entries, each including a first network name and several first pin information, including a first device reference number and a first pin identifier. Extracting the first graph data from the first netlist file to be compared includes: For any first network connection item in the first netlist file, generate the same number of first nodes according to the number of first pin information in the first network connection item, interconnect the generated first nodes through connection edges, and for any generated first node, use the first physical name corresponding to the first device reference number in the first pin information of the first node as the attribute information of the first node, traverse all generated first nodes to obtain the first set corresponding to the first network connection item. Traverse all first network connection entries in the first netlist file to obtain the first set corresponding to each first network connection entry, and form the first graph data from all the first sets. S2, for any first set, determine the second set that matches the first set from each second set whose matching identifier is not matched. If there is a second set that matches the first set, set the matching identifier of the second set that matches the first set to matched and execute step S3; otherwise, execute step S4. S3, determine whether there is a difference between the first set and its matching second set. If there is a difference, display the difference items of the first set and its matching second set in a first preset manner, wherein the difference items include the connection edges between the first node and the first node; S4, Display the first set in the second preset mode; S5, traverse all first sets in the first netlist file to obtain the comparison result between the first netlist file and the second netlist file.
2. The method for comparing network connections in circuit design according to claim 1, characterized in that, The second netlist file includes several second network connection entries, each of which includes a second network name and several second pin information, including a second device reference number and a second pin identifier. The extraction of the second graph data from the second netlist file to be compared includes: For any second network connection entry in the second netlist file, generate the same number of second nodes according to the number of second pin information in the second network connection entry, interconnect the generated second nodes through connection edges, and for any generated second node, use the second physical name corresponding to the second device reference number in the second pin information of the second node as the attribute information of the second node, traverse all generated second nodes to obtain the second set corresponding to the second network connection entry; Traverse all second network connection entries in the second netlist file to obtain the second set corresponding to each second network connection entry, and form the second graph data from all the second sets.
3. The method for comparing network connections in circuit design according to claim 2, characterized in that, For any given first set, determining the second set that matches the first set from each of the second sets marked as unmatched includes: For any first set, if the attribute information of each second node in any second set corresponds one-to-one with the attribute information of each first node in the first set, then the second set is used as the second set matched by the first set.
4. The method for comparing network connections in circuit design according to claim 3, characterized in that, The step of determining, for any first set, a second set that matches the first set from each second set whose matching identifier is not matched further includes: For any first set, if there is no second set in which the attribute information of each second node corresponds one-to-one with the attribute information of each first node in the first set, then the second set with the largest number of second nodes corresponding to the attribute information of each first node in the first set shall be the candidate set of the first set. After traversing all the first sets in the first netlist file, if the matching flag of the candidate set is not matched, then the candidate set is used as the second set that matches the first set.
5. The method for comparing network connections in circuit design according to claim 4, characterized in that, Determining whether there are differences between the first set and its matching second set includes: If the second set that matches the first set is a candidate set of the first set, then it is determined that there is a difference between the first set and the matching second set. The first node in the first set that does not correspond to the second node in the candidate set is taken as the difference item, and the connecting edge associated with the first node is taken as the difference item.
6. The method for comparing network connections in circuit design according to claim 1, characterized in that, The initial matching identifiers for each second set are all unmatched.
7. The method for comparing network connections in circuit design according to claim 1, characterized in that, The method further includes: S6, when the user selects a difference item displayed in the first preset mode, jump to the corresponding position of the difference item in the first circuit design diagram corresponding to the first netlist file; S7, when the user selects the first set displayed in the second preset mode, jump to the corresponding position of the first set in the first circuit design diagram corresponding to the first netlist file.
Citation Information
Patent Citations
Schematic circuit diagram netlist comparison method
CN104091161A
Method and device for checking and comparing consistency of circuit schematic diagram and PCB wiring diagram
CN1582088A