A PCB differential pair automatic routing method, device, equipment, storage medium

By automatically determining the network pair of differential pairs in high-speed circuits, sorting pins according to the shortest connection path, obtaining merged points for automatic routing and decoupling, the problem of differential distribution line automation in the existing technology is solved, and an efficient automatic routing process is realized.

CN115618796BActive Publication Date: 2025-08-05INSPUR SUZHOU INTELLIGENT TECH CO LTD

Patent Information

Application Number
CN202211320307.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-26
Publication Date
2025-08-05
Estimated Expiration
2042-10-26

AI Technical Summary

Technical Problem

In the prior art, it is difficult to automate the differential distribution lines during automatic wiring in high-speed circuits, especially keeping the equal length, parallelism and line spacing of the two signal lines unchanged, resulting in low wiring efficiency.

Method used

By determining the network pair of differential pairs and sorting the pins according to the shortest connection path principle, obtaining merged points for automatic routing, and finally decoupling to obtain two parallel differential pair routing.

Benefits of technology

Automatic differential pair wiring without manual participation is realized, saving engineering time and ensuring the availability and reliability of wiring results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115618796B_ABST
    Figure CN115618796B_ABST
Patent Text Reader

Abstract

The present invention belongs to the technical field of PCB automatic wiring, and specifically provides a PCB differential pair automatic wiring method, device, equipment, and storage medium. The method includes the following steps: determining a network pair that needs to be differentially wired, and sorting the pins on each network according to the shortest connection path principle; pairing the pins on the two networks according to the sorting; obtaining the merging point of the paired pins; automatically routing the obtained merging points in sequence; decoupling the automatic routing results to obtain two parallel differential pair wirings after decoupling. The differential pair wiring points are merged, and automatic wiring is performed using an automatic wiring method. The obtained result information is decoupled to obtain two parallel wirings, and finally connected to the actual pins, thereby completing the differential pair automatic wiring process. The entire wiring process can be completed automatically without human intervention, thereby saving engineering time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of PCB automatic wiring, and in particular to a PCB differential pair automatic wiring method, device, equipment, and storage medium. Background Art

[0002] Routing is a critical and important step and process in PCB design. The quality of PCB routing will directly affect the subsequent usability of the PCB board, so the PCB routing results are also very important. In general routing tasks, wires are used to connect the pins of the device according to certain rules and constraints. However, in high-speed circuits, differential routing also exists. This so-called differential routing means that two lines with exactly the same signal are kept parallel during routing, and the line width and line spacing are maintained. It is also important to note that during the routing process, the length of the two lines should be kept as equal as possible, and the line spacing should not be changed, and they must remain parallel.

[0003] Because differential routing has the above characteristics, when engineers perform differential routing, they need to use software to set some rules, etc., so as to obtain better differential routing results as much as possible. For example, patent CN202010108082.7 proposes a method and system for differential routing in PCB design. This method improves the efficiency and accuracy of differential routing in PCB design through a first routing module, a thick line generation module, a moving module, and a second routing module.

[0004] However, patent CN202010108082.7 also uses manual routing as an auxiliary for differential routing. How to achieve automatic differential routing based on constraints such as line width and gap width through automatic routing is also a problem that needs to be considered and solved in the current automatic routing field. Summary of the Invention

[0005] To address the problem of how to achieve automatic differential routing based on constraints such as line width and gap width through automatic routing, the present invention provides a PCB differential pair automatic routing method, device, equipment, and storage medium.

[0006] In a first aspect, the technical solution of the present invention provides a PCB differential pair automatic routing method, comprising the following steps:

[0007] Determine the network pairs that require differential routing and sort the pins on each network according to the shortest connection path principle;

[0008] Pair the pins on the two networks in order;

[0009] Get the merge point of the paired pins;

[0010] Automatically route the acquired merge points in sequence;

[0011] A decoupling operation is performed on the automatic routing result to obtain two parallel differential pair routings after decoupling.

[0012] Furthermore, the steps of determining the network pairs that require differential routing and sorting the pins on each network according to the shortest connection path principle include:

[0013] Get the network pairs that need differential routing from the exported dsn file; each network in the paired network contains the same number of pins, which is M;

[0014] Sort the pins of the first network in the network pair based on the principle of minimizing the total length of the first network connection, and obtain the pins of the first network with the minimum connection, thereby generating a sorted set of the first network;

[0015] The pins of the second network in the corresponding network pair are respectively obtained, which are closest to the pins in the sorted set of pins of the first network, to generate the sorted set of the second network.

[0016] Furthermore, the steps of pairing the pins on the two networks in order include:

[0017] The pins in the sorted set of the first network and the pins in the sorted set of the second network are paired in sequence, that is, the first pin in the sorted set of the first network is paired with the first pin in the sorted set of the second network, and the Mth pin in the sorted set of the first network is paired with the Mth pin in the sorted set of the second network in sequence.

[0018] Furthermore, the steps of obtaining the merge point of the paired pins include:

[0019] Calculate the difference points between the pins of the first network and the pins of the second network in the first pairing on the x-axis and y-axis;

[0020] Calculate the center point between the pin of the first network and the pin of the second network in the first pairing;

[0021] Calculate the candidate merge points of the pins in the first pairing;

[0022] In the same way, calculate the candidate merging points of all paired pins;

[0023] Calculate the merging point with the closest Manhattan distance between the current pin and all candidate merging points of the next pin as the final merging point.

[0024] Furthermore, the step of calculating the candidate merge point of the pins in the first pairing includes:

[0025] The x-coordinate of the first candidate merging point of the first pin is obtained by summing the calculated x-coordinate of the center point of the pin in the first pairing with the calculated difference point on the y-axis between the pin of the first network and the pin of the second network in the first pairing; the y-coordinate of the first candidate merging point of the first pin is obtained by summing the calculated y-coordinate of the center point of the pin in the first pairing with the calculated difference point on the x-axis between the pin of the first network and the pin of the second network in the first pairing;

[0026] The x-coordinate of the second candidate merging point of the first pin is obtained by subtracting the calculated x-coordinate of the center point of the pin in the first pairing from the calculated differential point on the y-axis between the pin of the first network and the pin of the second network in the first pairing; the y-coordinate of the second candidate merging point of the first pin is obtained by subtracting the calculated y-coordinate of the center point of the pin in the first pairing from the calculated differential point on the x-axis between the pin of the first network and the pin of the second network in the first pairing;

[0027] The first candidate merging point of the first pin is obtained according to the x-coordinate of the first candidate merging point of the first pin and the y-coordinate of the first candidate merging point of the first pin; the second candidate merging point of the first pin is obtained according to the x-coordinate of the second candidate merging point of the first pin and the y-coordinate of the second candidate merging point of the first pin.

[0028] Furthermore, the steps of automatically routing the acquired merge points in sequence include:

[0029] Starting from the first merge point, the calculated merge points are automatically routed with the next merge point in sequence. The line width is set to r, the gap of the differential pair is set to g, and the automatic routing needs to search for a path in the space of 2*r+g. The searched path is path.

[0030] Furthermore, the steps of performing a decoupling operation on the automatic routing result to obtain two parallel differential pair routings after decoupling include:

[0031] Determine whether the relative positions of the two merging points of the wiring are horizontal or vertical;

[0032] If it is horizontal, translate the obtained path up and down by (2*r+g) / 2 respectively, and record the left endpoint of the upward / downward movement as pin_start and the right endpoint as pin_end respectively;

[0033] If it is vertical, translate the obtained path to the left and right by (2*r+g) / 2, respectively, and record the lower endpoint of the left / right shift as pin_start and the upper endpoint as pin_end;

[0034] Automatically connect pin_start and pin_end to the actual pin pins, completing the automatic routing of the differential pair.

[0035] In a second aspect, the technical solution of the present invention provides a PCB differential pair automatic routing device, comprising a data preprocessing module, an automatic routing module, and a post-processing module;

[0036] The data preprocessing module is used to determine the network pairs that need differential routing and sort the pins on each network according to the shortest connection path principle; pair the pins on the two networks according to the sorting; and obtain the merging point of the paired pins;

[0037] An automatic routing module is used to automatically route the acquired merge points in sequence;

[0038] The post-processing module is used to perform a decoupling operation on the automatic routing result to obtain two parallel differential pair routings after decoupling.

[0039] Furthermore, the data preprocessing module includes a differential network pair acquisition unit and a sorting processing unit;

[0040] The differential network pair acquisition unit is used to obtain the network pairs that need differential routing from the exported DSN file; the number of pins contained in each network in the paired network is the same, which is M;

[0041] The sorting processing unit is used to sort the pins of the first network in the network pair based on the principle of minimizing the total length of the first network connection, obtain the pins of the minimum connection of the first network, and generate a sorted set of the first network; and obtain the pins of the second network in the corresponding network pair that are closest to the pins in the sorted set of pins of the first network, and generate a sorted set of the second network.

[0042] Furthermore, the data preprocessing module includes a pairing processing unit, which is used to pair the pins in the sorted set of the first network and the pins in the sorted set of the second network in sequence, that is, to pair the first pin in the sorted set of the first network with the first pin in the sorted set of the second network, and to pair the Mth pin in the sorted set of the first network with the Mth pin in the sorted set of the second network in sequence.

[0043] Furthermore, the data preprocessing module also includes a merging point calculation unit, which is used to calculate the difference points of the pin of the first network and the pin of the second network in the first pairing on the x-axis and y-axis; calculate the center point of the pin of the first network and the pin of the second network in the first pairing; calculate the candidate merging point of the pin in the first pairing; calculate the candidate merging point of all paired pins in the same way; calculate the merging point with the closest Manhattan distance between the current pin and all candidate merging points of the next pin as the final merging point.

[0044] Furthermore, the merging point calculation unit is further configured to sum the calculated x-coordinate of the center point of the pin in the first pairing with the calculated differential point on the y-axis between the pin of the first network and the pin of the second network in the first pairing to obtain the x-coordinate of the first candidate merging point of the first pin; sum the calculated y-coordinate of the center point of the pin in the first pairing with the calculated differential point on the x-axis between the pin of the first network and the pin of the second network in the first pairing to obtain the y-coordinate of the first candidate merging point of the first pin; sum the calculated x ... The difference points of the pins of the two networks on the y-axis are calculated to obtain the x-coordinate of the second candidate merging point of the first pin; the y-coordinate of the second candidate merging point of the first pin is obtained by subtracting the calculated y-coordinate of the center point of the pin in the first pairing from the calculated difference points on the x-axis between the pins of the first network and the pins of the second network in the first pairing; the first candidate merging point of the first pin is obtained according to the x-coordinate of the first candidate merging point of the first pin and the y-coordinate of the first candidate merging point of the first pin; the second candidate merging point of the first pin is obtained according to the x-coordinate of the second candidate merging point of the first pin and the y-coordinate of the second candidate merging point of the first pin.

[0045] Furthermore, an automatic routing module is used to automatically route the calculated merging points starting from the first merging point and the next merging point in sequence, wherein the line width is set to r, the gap of the differential pair is g, and the automatic routing requires a path search in the space of 2*r+g, and the searched path is path.

[0046] Furthermore, the post-processing module includes a pin position relationship determination unit, a decoupling setting unit, and a connection and wiring unit;

[0047] A pin position relationship determination unit is used to determine whether the relative positions of two merging points of the wiring are horizontal or vertical;

[0048] The decoupling setting unit is used to translate the obtained path upward and downward by (2*r+g) / 2 if the path is horizontal, and record the left endpoint of the upward / downward movement as pin_start and the right endpoint as pin_end respectively; if the path is vertical, the obtained path is translated left and right by (2*r+g) / 2, and record the lower endpoint of the left / right movement as pin_start and the upper endpoint as pin_end respectively;

[0049] The connection and routing unit is used to automatically connect pin_start and pin_end with the actual pin pins, completing the automatic routing of the differential pair.

[0050] In a third aspect, the technical solution of the present invention further provides an electronic device, comprising:

[0051] at least one processor; and,

[0052] a memory communicatively connected to the at least one processor; wherein,

[0053] The memory stores computer program instructions that can be executed by at least one processor, and the computer program instructions are executed by the at least one processor to enable the at least one processor to perform the PCB differential pair automatic routing method as described in the first aspect.

[0054] In a fourth aspect, the technical solution of the present invention further provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions enable the computer to execute the PCB differential pair automatic routing method as described in the first aspect.

[0055] As can be seen from the above technical solution, the present invention has the following advantages: based on the specifics of differential pair routing, the points of the differential pair routing are merged and automatically routed using an automated routing method. The resulting information is then decoupled to obtain two parallel routings, which are then connected to the actual pins, thus completing the automatic routing process for the differential pair. The entire routing process is completed automatically without manual intervention, saving engineering time. At the same time, the routing results are usable and reliable.

[0056] In addition, the present invention has a reliable design principle, a simple structure and a very broad application prospect.

[0057] It can be seen that compared with the prior art, the present invention has outstanding substantial features and significant progress, and the beneficial effects of its implementation are also obvious. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0059] Figure 1 is a schematic flow chart of a method according to an embodiment of the present invention.

[0060] Figure 2 is a schematic block diagram of an apparatus according to an embodiment of the present invention.

[0061] Figure 3 It is a schematic diagram of a specific processing flow of a post-processing module of an apparatus according to an embodiment of the present invention. DETAILED DESCRIPTION

[0062] When routing a PCB, differential pair routing may occur, meaning two networks need to be equal in length and parallel. Based on the characteristics of differential pair routing, the pins of each network are sorted, grouped, and then merged. Automatic routing is performed on the merged points to obtain a path between the merged points. The paths between the merged points are then moved based on network parameters such as line width and spacing to obtain differential pair routing. Finally, the actual pin points are connected to the decoupled merged points, completing the differential pair automatic routing task. The entire routing process can be completed automatically without manual intervention, saving engineering time. Furthermore, the routing results are usable and reliable. To help those skilled in the art better understand the technical solutions of the present invention, the following will be a clear and complete description of the technical solutions in the embodiments of the present invention, in conjunction with the accompanying drawings. Obviously, the described embodiments are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without inventive effort should fall within the scope of protection of the present invention.

[0063] like Figure 1 As shown, an embodiment of the present invention provides a PCB differential pair automatic routing method, comprising the following steps:

[0064] Step 1: Determine the network pairs that need differential routing and sort the pins on each network according to the shortest connection path principle;

[0065] Step 2: Pair the pins on the two networks in order;

[0066] Step 3: Get the merge point of the paired pins;

[0067] Step 4: Automatically route the acquired merge points in sequence;

[0068] Step 5: Decouple the automatic routing results to obtain two parallel differential pair routings after decoupling.

[0069] It should be noted that, in some embodiments, the steps of determining the network pairs that require differential routing and sorting the pins on each network according to the shortest connection path principle include:

[0070] Step 11: Get the net pairs that need differential routing from the exported dsn file; each net in the paired nets has the same number of pins, which is M. Get a pair of nets that need differential routing, denoted as net1 and net2, where net1 contains M pins and net2 also contains M pins.

[0071] Step 12: Sort the pins of the first network in the network pair based on the principle of minimizing the total length of the first network connection, and obtain the minimum connection pins of the first network, generating a sorted set of the first network; Sort the M pins in net1 based on the principle of minimizing the total length of the net1 connection, and obtain the minimum connection sort, which is recorded as {N1_pin1, N1_pin2, …, N1_pinm};

[0072] Step 13: Obtain the pins of the second network in the corresponding network pair that are closest to the pins in the sorted set of pins of the first network, and generate the sorted set of the second network; among the M pins of net2, obtain the pins N1_pin1, N1_pin2, …, N1_pinm that are closest to each other, which is the minimum connection sorting of net2, and record it as {N2_pin1, N2_pin2, …, N2_pinm}.

[0073] The pins in the sorted set of the first network are paired with the pins in the sorted set of the second network in sequence. That is, the first pin in the sorted set of the first network is paired with the first pin in the sorted set of the second network, and the Mth pin in the sorted set of the first network is paired with the Mth pin in the sorted set of the second network in sequence. In other words, the pins of net1 obtained in step 12 and the pins of net2 obtained in step 13 are paired in sequence, i.e., (N1_pin1, N2_pin1), (N1_pin2, N2_pin2), …, (N1_pinm, N2_pinm).

[0074] Correspondingly, the x-coordinate of the pin is represented as pin.x, and the y-coordinate of the pin is represented as pin.y. The steps of obtaining the merge point of the paired pins include:

[0075] Step 31: Calculate the difference points between the pin of the first network and the pin of the second network in the first pairing on the x-axis and y-axis;

[0076] Calculate the difference points between N1_pin1 and N2_pin1 on the x-axis and y-axis, diff_x = |N1_pin1.x–N2_pin1.x| / 2, diff_y = |N1_pin1.y–N2_pin1.y| / 2;

[0077] Step 32: Calculate the center point of the pin of the first network and the pin of the second network in the first pairing;

[0078] Calculate the center point of N1_pin1 and N2_pin1, median_x = (N1_pin1.x + N2_pin1.x) / 2, median_y = (N1_pin1.y + N2_pin1.y) / 2;

[0079] Step 33: Calculate the candidate merging point of the pins in the first pairing; specifically comprising: summing the calculated x-coordinate of the center point of the pins in the first pairing with the calculated difference point on the y-axis between the pins of the first network and the pins of the second network in the first pairing to obtain the x-coordinate of the first candidate merging point of the first pin; summing the calculated y-coordinate of the center point of the pins in the first pairing with the calculated difference point on the x-axis between the pins of the first network and the pins of the second network in the first pairing to obtain the y-coordinate of the first candidate merging point of the first pin;

[0080] The x-coordinate of the second candidate merging point of the first pin is obtained by subtracting the calculated x-coordinate of the center point of the pin in the first pairing from the calculated differential point on the y-axis between the pin of the first network and the pin of the second network in the first pairing; the y-coordinate of the second candidate merging point of the first pin is obtained by subtracting the calculated y-coordinate of the center point of the pin in the first pairing from the calculated differential point on the x-axis between the pin of the first network and the pin of the second network in the first pairing;

[0081] Obtain the first candidate merging point of the first pin according to the x-coordinate of the first candidate merging point of the first pin and the y-coordinate of the first candidate merging point of the first pin; obtain the second candidate merging point of the first pin according to the x-coordinate of the second candidate merging point of the first pin and the y-coordinate of the second candidate merging point of the first pin;

[0082] Specifically, pin1_meg1_x=median_x+diff_y, pin1_meg1_y=median_y+diff_x, pin1_meg2_x=median_x–diff_y, pin1_meg2_y=median_y–diff_x, then the candidate merge points are [pin1_meg1, pin1_meg2];

[0083] Step 34: Calculate candidate merging points for all paired pins in the same way;

[0084] Step 35: Calculate the merging point with the shortest Manhattan distance between the current pin and all candidate merging points of the next pin, and use it as the final merging point; record it as pin_meg. For the case where there are M pairs, that is, there are M merging points, which are recorded as pin1_meg, pin2_meg, ..., pinm_meg respectively.

[0085] Furthermore, the steps of automatically routing the acquired merge points in sequence include:

[0086] Starting from the first merge point, the calculated merge points are automatically routed with the next merge point in sequence. The line width is set to r, the gap of the differential pair is set to g, and the automatic routing needs to search for a path in the space of 2*r+g. The searched path is path.

[0087] Accordingly, the steps of performing a decoupling operation on the automatic routing result to obtain two parallel differential pair routings after decoupling include:

[0088] Step 51: Determine whether the relative positions of the two merging points of the wiring are horizontal or vertical;

[0089] If it is horizontal, go to step 52, if it is vertical, go to step 53;

[0090] Step 52: Shift the obtained path upward and downward by (2*r+g) / 2, respectively, and record the left endpoint of the upward / downward shift as pin_start and the right endpoint as pin_end; then proceed to step 54;

[0091] Step 53: Shift the obtained path to the left and right by (2*r+g) / 2, respectively. The lower endpoint of the left / right shift is recorded as pin_start, and the upper endpoint is recorded as pin_end. Execute step 54.

[0092] Step 54: Automatically connect pin_start and pin_end to the actual pin pins, completing the automatic routing of the differential pair.

[0093] Based on the specifics of differential pair routing, the present invention merges the points of the differential pair routing, automatically routing them using an automated routing method. The resulting information is then decoupled to create two parallel routings, which are then connected to the actual pins, completing the automated routing process for the differential pair. The entire routing process is automated without human intervention, saving engineering time and ensuring that the routing results are usable and reliable.

[0094] like Figure 2 As shown, an embodiment of the present invention provides a PCB differential pair automatic routing device, including a data pre-processing module, an automatic routing module, and a post-processing module;

[0095] The data preprocessing module is used to determine the network pairs that need differential routing and sort the pins on each network according to the shortest connection path principle; pair the pins on the two networks according to the sorting; and obtain the merging point of the paired pins;

[0096] An automatic routing module is used to automatically route the acquired merge points in sequence;

[0097] The post-processing module is used to perform a decoupling operation on the automatic routing result to obtain two parallel differential pair routings after decoupling.

[0098] It should be noted that the data preprocessing module includes a differential network pair acquisition unit and a sorting processing unit;

[0099] The differential network pair acquisition unit is used to obtain the network pairs that need differential routing from the exported DSN file; the number of pins contained in each network in the paired network is the same, which is M;

[0100] The sorting processing unit is used to sort the pins of the first network in the network pair based on the principle of minimizing the total length of the first network connection, obtain the pins of the minimum connection of the first network, and generate a sorted set of the first network; and obtain the pins of the second network in the corresponding network pair that are closest to the pins in the sorted set of pins of the first network, and generate a sorted set of the second network.

[0101] The data preprocessing module includes a pairing processing unit, which is used to pair the pins in the sorted set of the first network and the pins in the sorted set of the second network in sequence, that is, to pair the first pin in the sorted set of the first network with the first pin in the sorted set of the second network, and to pair the Mth pin in the sorted set of the first network with the Mth pin in the sorted set of the second network in sequence.

[0102] The data preprocessing module also includes a merging point calculation unit, which is used to calculate the difference points of the pin of the first network and the pin of the second network in the first pairing on the x-axis and y-axis; calculate the center point of the pin of the first network and the pin of the second network in the first pairing; calculate the candidate merging point of the pin in the first pairing; calculate the candidate merging point of all paired pins in the same way; calculate the merging point with the shortest Manhattan distance between the current pin and all candidate merging points of the next pin as the final merging point.

[0103] The merging point calculation unit is further configured to sum the calculated x-coordinate of the center point of the pin in the first pairing with the calculated difference point on the y-axis between the pin of the first network and the pin of the second network in the first pairing to obtain the x-coordinate of the first candidate merging point of the first pin; sum the calculated y-coordinate of the center point of the pin in the first pairing with the calculated difference point on the x-axis between the pin of the first network and the pin of the second network in the first pairing to obtain the y-coordinate of the first candidate merging point of the first pin; sum the calculated x-coordinate of the center point of the pin in the first pairing with the calculated difference point on the x-axis between the pin of the first network and the pin of the second network in the first pairing to obtain the y-coordinate of the first candidate merging point of the first pin; The x-coordinate of the second candidate merging point of the first pin is obtained by subtracting the calculated y-coordinate of the center point of the pin in the first pairing from the calculated differential point on the x-axis between the pin of the first network and the pin of the second network in the first pairing to obtain the y-coordinate of the second candidate merging point of the first pin; the first candidate merging point of the first pin is obtained according to the x-coordinate of the first candidate merging point of the first pin and the y-coordinate of the first candidate merging point of the first pin; the second candidate merging point of the first pin is obtained according to the x-coordinate of the second candidate merging point of the first pin and the y-coordinate of the second candidate merging point of the first pin.

[0104] The automatic routing module is used to automatically route the calculated merge points starting from the first merge point and then to the next merge point in sequence. The line width is set to r, the gap of the differential pair is set to g, and the automatic routing needs to search for a path in the space of 2*r+g. The searched path is called path.

[0105] The specific processing flow of the post-processing module is as follows Figure 3As shown, it specifically includes: determining whether the relative position of the two merging points of the wiring is horizontal or vertical; if it is horizontal, the obtained path is translated upward and downward by (2*r+g) / 2, and the left endpoint of the upward / downward movement is recorded as pin_start, and the right endpoint is recorded as pin_end; if it is vertical, the obtained path is translated left and right by (2*r+g) / 2, and the lower endpoint of the left / right movement is recorded as pin_start, and the upper endpoint is recorded as pin_end; pin_start and pin_end are automatically connected to the actual pin pins to complete the automatic routing of the differential pair.

[0106] The specific implementation steps of this device are as follows:

[0107] S1: From the DSN file exported by the Allegro software, obtain the network pairs that need to be differentially routed. Here, a pair of networks is used as an example, and they are recorded as net1 and net2 respectively. For the sake of clarity, here, each network has 3 pins as an example, where net1 contains 3 pins and net2 contains 3 pins.

[0108] S2: Sort the three pins in net1 by minimizing the total length of the connections in net1, and obtain the minimum connection order, which is recorded as N1_pin1, N1_pin2, and N1_pin3;

[0109] S3: According to the sorting in step S2, obtain the sorting of the pins of net2 closest to each pin, and obtain N2_pin1, N2_pin2, and N2_pin3;

[0110] S4: Pair the pins of net1 obtained in step S2 and the pins of net2 obtained in step S3 in sequence, i.e., (N1_pin1, N2_pin1), (N1_pin2, N2_pin2), (N1_pin3, N2_pin3);

[0111] S5: Obtain the corresponding merge point for the pair in step S4. The steps for obtaining the merge point are as follows: Calculate the candidate merge points for each pair respectively. The specific steps are as follows: a. Calculate the difference points of N1_pin and N2_pin on the x-axis and y-axis, diff_x = |N1_pin.x–N2_pin.x| / 2, diff_y = |N1_pin.y–N2_pin.y| / 2; b. Calculate the center point of N1_pin and N2_pin, median_x = (N1_pin.x+N2_pin.x) / 2, median_y = (N1_pin.y+N2_pin.y) / 2; c. Calculate the candidate merge point: pin_meg1_x = median_x+diff_y, pin_meg1_y = median n_y+diff_x,pin_meg2_x=median_x–diff_y,pin_meg2_y=median_y–diff_x, obtain the candidate merging point [pin_meg1,pin_meg2]. After obtaining the candidate merging points of the three pairs respectively, calculate the candidate merging point with the shortest Manhattan distance between the candidate merging point of each pair and the candidate merging point of the next pair as the final merging point. That is, calculate the candidate merging point with the shortest Manhattan distance between the candidate merging points of the first pair and the second pair, obtain the merging point of the first pair and the merging point of the second pair, calculate the candidate merging point with the shortest Manhattan distance between the candidate merging points of the second pair and the third pair, obtain the merging point of the second pair and the merging point of the third pair, and record them as meg1, meg2, and meg3 respectively.

[0112] S6: Automatically route the merged points obtained in step S5. The routing result of meg1 and meg2 is path1, and the routing result of meg2 and meg3 is path2. The line width and gap of the differential pair need to be considered. The line width is r and the gap is g. The automatic routing needs to search for paths in the space of 2*r+g.

[0113] S7: Determine whether the relative position of meg1 and meg2 is horizontal or vertical. If it is horizontal, the decoupling operation is to translate the path1 path obtained by S6 upward and downward by (2*r+g) / 2, respectively, and record the left endpoint of the upward movement as N1_pin1_meg, the right endpoint as N1_pin2_meg, and the left endpoint of the downward movement as N2_pin1_meg, and the right endpoint as N2_pin2_meg. If it is vertical, the decoupling operation is to translate the path1 path obtained by S6 to the left and right by (2*r+g) / 2, respectively, and record the lower end of the left movement as N1_pi n1_meg, the upper endpoint is recorded as N1_pin2_meg, the lower endpoint shifted to the right is recorded as N2_pin1_meg, and the upper endpoint is recorded as N2_pin2_meg; the merging point after each network decoupling is automatically connected to the actual pin pin, that is, N1_pin1_meg and N1_pin1, N1_pin2_meg and N1_pin2, N2_pin1_meg and N2_pin1, N2_pin2_meg and N2_pin2 are automatically connected; the subsequent operations of meg2 and meg3 are the same as the above steps, and the automatic routing task of the differential pair can be completed.

[0114] In this way, the automatic routing of PCB differential pairs can be implemented.

[0115] An embodiment of the present invention also provides an electronic device, which includes: a processor, a communication interface, a memory and a bus, wherein the processor, the communication interface and the memory communicate with each other through the bus. The bus can be used for information transmission between the electronic device and the sensor. The processor can call the logic instructions in the memory to execute the following method: Step 1: Determine the network pairs that need to be differentially wired, and sort the pins on each network according to the shortest connection path principle; Step 2: Pair the pins on the two networks according to the sorting; Step 3: Obtain the merging point of the paired pins; specifically including calculating the differential point on the x-axis and y-axis between the pin of the first network and the pin of the second network in the first pairing; calculating the center point of the pin of the first network and the pin of the second network in the first pairing; calculating the candidate merging point of the pin in the first pairing; calculating the candidate merging point of all paired pins in the same way; calculating the merging point with the shortest Manhattan distance between the current pin and all candidate merging points of the next pin as the final merging point; Step 4: Automatically route the acquired merging points in sequence; Step 5: Decouple the automatic routing results to obtain two parallel differential pair routings after decoupling; specifically including: Step 51: Determine whether the relative position of the two merging points of the routing is horizontal or vertical; if horizontal, execute Step 52, if vertical, execute Step 53; Step 52: Shift the obtained path path upward and downward by (2*r+g) / 2, respectively, and record the left endpoint of the upward / downward shift as pin_start, and the right endpoint as pin_end; execute Step 54; Step 53: Shift the obtained path path leftward and rightward by (2*r+g) / 2, respectively, and record the lower endpoint of the left / right shift as pin_start, and the upper endpoint as pin_end; execute Step 54; Step 54: Automatically connect pin_start and pin_end to the actual pin pins to complete the automatic routing of the differential pair.

[0116] In addition, the logical instructions in the above-mentioned memory can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0117] An embodiment of the present invention provides a non-transitory computer-readable storage medium, which stores computer instructions. The computer instructions enable a computer to execute the method provided by the above method embodiment, for example, including: step 1: determining a network pair that needs to be differentially routed, and sorting the pins on each network according to the shortest connection path principle; step 2: pairing the pins on the two networks according to the sorting; step 3: obtaining the merging point of the paired pins; specifically including calculating the differential point on the x-axis and y-axis between the pin of the first network and the pin of the second network in the first pairing; calculating the center point of the pin of the first network and the pin of the second network in the first pairing; calculating the candidate merging point of the pins in the first pairing; calculating the candidate merging point of all paired pins in the same way; calculating the merging point with the closest Manhattan distance between the current pin and all candidate merging points of the next pin as the final merging point Merge points; Step 4: Automatically route the obtained merge points in sequence; Step 5: Decouple the automatic routing results to obtain two parallel differential pair routings after decoupling; Specifically including: Step 51: Determine whether the relative position of the two merge points of the routing is horizontal or vertical; If horizontal, execute Step 52, if vertical, execute Step 53; Step 52: Shift the obtained path path upward and downward by (2*r+g) / 2, respectively, and record the left endpoint of the upward / downward shift as pin_start, and the right endpoint as pin_end; Execute Step 54; Step 53: Shift the obtained path path leftward and rightward by (2*r+g) / 2, respectively, and record the lower endpoint of the left / right shift as pin_start, and the upper endpoint as pin_end; Execute Step 54; Step 54: Automatically connect pin_start and pin_end with the actual pin pins to complete the automatic routing of the differential pair.

[0118] Although the present invention has been described in detail with reference to the accompanying drawings and in conjunction with preferred embodiments, the present invention is not limited thereto. Without departing from the spirit and essence of the present invention, a person of ordinary skill in the art may make various equivalent modifications or substitutions to the embodiments of the present invention, and such modifications or substitutions shall be within the scope of the present invention. Any person skilled in the art who can easily conceive of changes or substitutions within the technical scope disclosed in the present invention shall be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be based on the scope of protection of the claims.

Claims

1. A PCB differential pair automatic routing method, characterized in that: The steps include: Determine the network pairs that require differential routing and sort the pins on each network according to the shortest connection path principle; Pair the pins on the two networks in order; Get the merge point of the paired pins; Automatically route the acquired merge points in sequence; Perform a decoupling operation on the automatic routing result to obtain two parallel differential pair routings after decoupling; The steps to obtain the merge point of the paired pins include: Calculate the difference points between the pins of the first network and the pins of the second network in the first pairing on the x-axis and y-axis; Calculate the center point between the pin of the first network and the pin of the second network in the first pairing; Calculate the candidate merge points of the pins in the first pairing; In the same way, calculate the candidate merging points of all paired pins; Calculate the merging point with the closest Manhattan distance between the current pin and all candidate merging points of the next pin as the final merging point.

2. The PCB differential pair automatic routing method according to claim 1, wherein: The steps to determine the net pairs that need differential routing and sort the pins on each net according to the shortest connection path principle include: Get the network pairs that need differential routing from the exported dsn file; each network in the paired network contains the same number of pins, which is M; Sort the pins of the first network in the network pair based on the principle of minimizing the total length of the first network connection, and obtain the pins of the first network with the minimum connection, thereby generating a sorted set of the first network; The pins of the second network in the corresponding network pair are respectively obtained, which are closest to the pins in the sorted set of pins of the first network, to generate the sorted set of the second network.

3. The PCB differential pair automatic routing method according to claim 2, wherein: The steps to pair the pins on the two networks in order are: The pins in the sorted set of the first network and the pins in the sorted set of the second network are paired in sequence, that is, the first pin in the sorted set of the first network is paired with the first pin in the sorted set of the second network, and the Mth pin in the sorted set of the first network is paired with the Mth pin in the sorted set of the second network in sequence.

4. The PCB differential pair automatic routing method according to claim 1, wherein: The steps for calculating the candidate merge points for the pins in the first pairing include: The x-coordinate of the first candidate merging point of the first pin is obtained by summing the calculated x-coordinate of the center point of the pin in the first pairing with the calculated difference point on the y-axis between the pin of the first network and the pin of the second network in the first pairing; the y-coordinate of the first candidate merging point of the first pin is obtained by summing the calculated y-coordinate of the center point of the pin in the first pairing with the calculated difference point on the x-axis between the pin of the first network and the pin of the second network in the first pairing; The x-coordinate of the second candidate merging point of the first pin is obtained by subtracting the calculated x-coordinate of the center point of the pin in the first pairing from the calculated differential point on the y-axis between the pin of the first network and the pin of the second network in the first pairing; the y-coordinate of the second candidate merging point of the first pin is obtained by subtracting the calculated y-coordinate of the center point of the pin in the first pairing from the calculated differential point on the x-axis between the pin of the first network and the pin of the second network in the first pairing; The first candidate merging point of the first pin is obtained according to the x-coordinate of the first candidate merging point of the first pin and the y-coordinate of the first candidate merging point of the first pin; the second candidate merging point of the first pin is obtained according to the x-coordinate of the second candidate merging point of the first pin and the y-coordinate of the second candidate merging point of the first pin.

5. The PCB differential pair automatic routing method according to claim 4, characterized in that: The steps of automatically routing the obtained merge points in sequence include: Starting from the first merge point, the calculated merge points are automatically routed with the next merge point in sequence. The line width is set to r, the gap of the differential pair is set to g, and the automatic routing needs to search for a path in the space of 2*r+g. The searched path is path.

6. The PCB differential pair automatic routing method according to claim 5, characterized in that: The steps of performing a decoupling operation on the automatic routing result to obtain two parallel differential pair routings after decoupling include: Determine whether the relative positions of the two merging points of the wiring are horizontal or vertical; If it is horizontal, translate the obtained path up and down by (2*r+g) / 2 respectively, and record the left endpoint of the upward / downward movement as pin_start and the right endpoint as pin_end respectively; If it is vertical, translate the obtained path to the left and right by (2*r+g) / 2, respectively, and record the lower endpoint of the left / right shift as pin_start and the upper endpoint as pin_end; Automatically connect pin_start and pin_end to the actual pin pins, completing the automatic routing of the differential pair.

7. A PCB differential pair automatic routing device, applicable to the method according to any one of claims 1 to 6, characterized in that: Including data pre-processing module, automatic wiring module, and post-processing module; The data preprocessing module is used to determine the network pairs that need differential routing and sort the pins on each network according to the shortest connection path principle; Pair the pins on the two networks in order; Get the merge point of the paired pins; An automatic routing module is used to automatically route the acquired merge points in sequence; The post-processing module is used to perform a decoupling operation on the automatic routing result to obtain two parallel differential pair routings after decoupling.

8. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores computer program instructions that can be executed by at least one processor, and the computer program instructions are executed by the at least one processor to enable the at least one processor to perform the PCB differential pair automatic routing method according to any one of claims 1 to 6.

9. A non-transitory computer-readable storage medium, characterized in that The non-transitory computer-readable storage medium stores computer instructions, and the computer instructions enable the computer to execute the PCB differential pair automatic routing method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Method and system for differential wiring in PCB design

    CN111246658A

  • Staggered pin structure based escape wiring method for isometric difference pairs

    CN103902772A

  • PCB automatic wiring method based on united Monte Carlo tree search

    CN112528591A

Cited By

  • Pin arrangement method and device

    CN121257437A