Differential pair ordered escape wiring method based on improved Monte Carlo tree search

By improving the intelligent wiring algorithm for Monte Carlo tree search and reinforcement learning, the wiring paths are dynamically optimized, and the orderly escape wiring problem of high-density differential pair pins in printed circuit board design is solved, achieving more efficient wiring path planning and CPU calculation optimization.

CN120124580AActive Publication Date: 2025-06-10FUZHOU UNIV

Patent Information

Application Number
CN202510197673.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-21
Publication Date
2025-06-10
Estimated Expiration
2045-02-21

AI Technical Summary

Technical Problem

Under high-density packaging, how to orderly lead the differential pair pins to the boundary of the printed circuit board while ensuring the equal length of the signal lines and keeping the differential pair close to each other has become a key issue in the automatic wiring of PCB.

Method used

Using an intelligent wiring algorithm based on improved Monte Carlo tree search and reinforcement learning, the orderly escape wiring problem of high-density differential pair pins in printed circuit board design is solved.

Benefits of technology

Effectively reduce routing length, optimize CPU computing time, and be able to handle blocking areas in complex grille pin arrays and interleaved pin arrays to achieve more efficient routing path planning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120124580A_ABST
    Figure CN120124580A_ABST
Patent Text Reader

Abstract

The invention provides a differential pair ordered escape wiring method based on improved Monte Carlo tree search, and aims to solve the problem of path optimization of differential pair signal wiring in the design of a high-density printed circuit board. According to the method, MCTS and Q-learning reinforcement learning technologies are combined, a wiring intermediate point does not need to be preset, and a wiring path can be dynamically generated under a grid pin array and a staggered pin array. Through multiple times of simulation and backtracking, the method can effectively process complex pin arrangement and blocking areas, ensures wiring length matching and reduces electromagnetic interference. Meanwhile, according to the method, a Q table obtained through one-time Q learning can serve as the basis for simulation of all the nodes of the Monte Carlo tree, all the expansion nodes are simulated in the simulation stage, and the defect that the time of the MCTS simulation part is long is overcome. According to the method, the MCTS search capability and the convergence speed are improved by adopting a gradual widening strategy. The method is suitable for PCB design of high-performance electronic equipment, such as the fields of communication, computers and avionics.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of electronic design automation (EDA), and particularly to a differential pair ordered escape routing method based on improved Monte Carlo tree search. Background Art

[0002] With the continuous improvement of the integration level of electronic devices and the increasing demand for high-speed signal transmission, the routing complexity of printed circuit boards (PCBs) is becoming increasingly severe. Differential pair routing technology is widely used in high-speed circuit design because it can effectively suppress electromagnetic interference (EMI) and signal crosstalk. An important challenge in differential pair routing is ordered escape routing. Especially in high-density packages, how to orderly lead the differential pair pins to the boundary of the PCB while ensuring equal length of signal lines and keeping the differential pairs adjacent to each other has become a key issue in PCB automatic routing.

[0003] The ordered escape routing of differential pairs refers to orderly leading out the two pins of the differential pair signal from the pin array, ensuring that the routing paths of each pair of differential signals are as identical as possible and minimizing interference. In practical applications, there are generally two common structures for the pin array: the grid pin array (GridPinArray, GPA) and the staggered pin array (StaggeredPinArray, SPA). The pins in GPA are arranged in a square grid, and each pin has four adjacent routing directions, such as Figure 1 the grid-type pin structure shown in (a) of Figure 1 ; while the pins in SPA are arranged in a hexagonal grid, making each pin have six adjacent routing directions, such as

[0004] In the field of differential pair ordered escape routing, several studies have proposed routing algorithms for grid pin arrays and staggered pin arrays. Li (refer to Modelling and optimisation algorithm for length - matching escape routing of differential pairs) et al. proposed a differential pair routing method based on integer linear programming (ILP), but there are computational efficiency problems when dealing with high - density routing. Jiao (refer to Ordered Escape Routing with Consideration of Differential Pair and Blockage) et al. solved some routing problems through the multi - commodity minimum - cost flow algorithm (MMCF), but it performs poorly in the face of complex blockage regions.

[0005] In view of this, the present invention proposes an intelligent routing algorithm based on reinforcement learning and Monte Carlo tree search (MCTS), aiming to dynamically optimize the routing path.

[0006] Monte Carlo tree search (MCTS) is a decision - making algorithm based on a search tree that can select the optimal path by simulating different strategies in the tree. MCTS works in four steps (as Figure 2 shown): Selection, Expansion, Simulation, and Backup. This method is widely used in complex game problems, such as Go (refer to Monte Carlo tree search in Kriegspiel). In the PCB routing problem, MCTS can dynamically optimize the escape routing process of differential pairs by randomly simulating and selecting different routing paths. Compared with traditional algorithms, MCTS does not require pre - setting intermediate points of routing and can handle complex pin arrangements and blockage regions.

[0007] Q - learning (refer to Q - learning) is an algorithm commonly used in reinforcement learning, aiming to gradually find the optimal strategy by iteratively updating the state - action value (Q - value). This algorithm does not depend on the environment model and can gradually optimize the strategy in a continuous action space. In the differential pair routing problem, Q - learning provides global path optimization guidance for MCTS by real - time updating the reward value of the routing path. Summary of the Invention

[0008] The purpose of the present invention is to propose a differential pair ordered escape routing method based on improved Monte Carlo tree search; by combining the Monte Carlo tree search (MCTS) algorithm with Q-learning in reinforcement learning, the problem of ordered escape routing for high-density differential pair pins in printed circuit board design is solved. The present invention can effectively reduce the routing length, optimize the CPU calculation time, and can handle blocked areas in complex grid pin arrays (GPA) and staggered pin arrays (SPA) to achieve a more efficient routing path planning.

[0009] To achieve the above object, the technical solution of the present invention is: a differential pair ordered escape routing method based on improved Monte Carlo tree search, specifically including the following steps:

[0010] Step 1: Sort all differential pairs dp i (i ∈ [1, n]) in ascending order according to the path weight (estimated length cost) cost of differential pair escape, and add them to the queue Round1, where cost is used as the initial path weight PW of the differential pair i ;

[0011] Step 2: If there is no differential pair in the queue Round1, go to Step 5; otherwise, pop the first differential pair dp from the queue Round1 i ;

[0012] Step 3: If no predicted legal escape point set SetPEP can be found for the differential pair dp i , add the differential pair dp i to the queue Round2 and go to Step 2; otherwise, continue to the next step;

[0013] Step 4: Route the differential pair dp i and the differential pair dp i and the escape point set SetPEP according to the Monte Carlo tree search algorithm. If the routing is successful and the differential pair dp i is not popped from the queue Round3, add the differential pair dp i to the queue Round3. If the routing fails, add the differential pair dp i to the queue Round2;

[0014] Step 5: If there is no differential pair in the queue Round2, go to Step 8; otherwise, pop a differential pair dp from the queue Round2 i as the current differential pair dp i ;

[0015] Step 6: If the current differential pair dp i is in the escape point epP of the previous differential pair dpP i iand the subsequent differential pair dpN i escape point epN i If there is a predicted legal set of escape points SetPEP between them, go to step 4; otherwise, continue to the next step;

[0016] Step 7. Remove the previous differential pair dpP i and the subsequent differential pair dpN i For the routing of the differential pair with a smaller path cost in the middle, to ensure that there can be an escape point set SetPEP for the current differential pair dp i increase the path cost PW of the current differential pair dp i and add it to the queue Round2, then go to step 5; i

[0017] Step 8. If there is no differential pair in the queue Round3, go to step 10; otherwise, pop a differential pair dp from the queue Roun3 i as the current differential pair dp i ;

[0018] Step 9. Set the path cost PW of the current differential pair dp i to the minimum value, then go to step 6; i

[0019]

[0020] Step 10. Save all the differential pair routing paths and end the routing.

[0021] Preferably, the calculation of the path cost is specifically as follows:

[0022] dis = Manhattan distance between two pins + shortest distance from the midpoint of the pins to the boundary

[0023] Manhattan distance between two pins = |X Ai - X Bi | + |Y Ai - Y Bi |

[0023] Shortest distance from the midpoint of the pins to the boundary = min(X midi , Y midi , Width - X midi , Height - Y midi )

[0024]

[0025] dis represents the estimated routing length; X Ai 、X Bi represent the abscissas of the A pin and the B pin of the i-th differential pair; Y Ai 、Y BiDenote the vertical coordinates of the A and B pins of the i-th differential pair; X midi Denote the horizontal coordinate of the midpoint of the two pins of the i-th differential pair; Y midi Denote the vertical coordinate of the midpoint of the two pins of the i-th differential pair; Width represents the width of the pin array, and Height represents the height of the pin array.

[0026] Preferably, in step 3, for the differential pair dp i the search for the escape point set SetPEP is specifically as follows: In the quadrilateral formed by the connection line of the two pins of the current differential pair dp i and the nearest boundary, if there are other unrouted pins, the escape point set SetPEP cannot be found; otherwise, the escape points included in the projection of the differential pair connection line on the boundary are used as the predicted legal escape point set SetPEP of the current differential pair dp i .

[0027] Preferably, the routing of the differential pair dp i and the escape point set SetPEP of the differential pair dp i according to the Monte Carlo tree search algorithm specifically includes the following steps:

[0028] Step 4.1: Initialize the head node Head of the Monte Carlo tree and all its legal child nodes using the positions of the two pins of the differential pair dp i , and start the Monte Carlo tree search iteration;

[0029] Step 4.2: If the iteration ends, go to step 4.10; otherwise, continue to the next step;

[0030] Step 4.3: Starting from the head node Head, each time select the child node with the largest UCT value until reaching the leaf node LN of the Monte Carlo tree. The UCT calculation formula is as follows:

[0031]

[0032] R k Denote the total reward of node k; N k Denote the number of times node k is visited; N represents the number of times the parent node of node k is visited; c represents the exploration parameter, which is used to control the balance between exploration and exploitation;

[0033] Step 4.4: Expand the leaf node LN and select one of its child nodes NELN k ;

[0034] Step 4.5: If the Monte Carlo tree already has a Q table, skip Q learning and continue to the next step; otherwise, according to the child node NELN kPerform Q - learning on the pin positions and the escape point set SetPEP. If the Q - learning is successful, obtain the Q - table and proceed to the next step. If the Q - learning fails, delete the current sub - node NELN k , and use another sub - node NELN k 's pin positions and the escape point set SetPEP to perform Q - learning until the Q - learning is successful and proceed to the next step; if the Q - learning for all sub - nodes NELN k fails, then the current differential pair dp i routing fails, go to step 4.12;

[0035] Step 4.6: Use the Q - table to perform simulated routing for all extended sub - nodes NELN;

[0036] Step 4.7: Calculate the reward value for each sub - node NELN k respectively and back - trace to update the reward value and the access count. The calculation method of the reward value for the sub - node NELN k is as follows:

[0037]

[0038]

[0039]

[0040] r represents the reward value after simulated routing for the sub - node NELN k ; D A represents the single - line length of the simulated routing for pin A, D B represents the single - line length of the simulated routing for pin B; L represents the double - line length after the convergence of pins A and B; R(v) represents the reward value of node v; N(v) represents the access count of node v; Selection Path represents the selection path from the root node Head to the sub - node NELN k ;

[0041] Step 4.8: If the current simulated routing scheme SlnN is better than the previous best routing scheme SlnBest, that is, the reward value r is higher, then update the best routing scheme SlnBest to the current simulated routing scheme SlnN;

[0042] Step 4.9: If the best routing scheme SlnBest converges, that is, the routing scheme remains unchanged in a certain number of iterations, then go to step 4.11, otherwise go to step 4.2;

[0043] Step 4.10: If there exists a routing scheme SlnBest, then the routing is successful and proceed to the next step; otherwise the routing fails and go to step 4.12

[0044] Step 4.11: If the optimal wiring plan requires removing the wiring of other differential pairs dp j then remove the wiring of other differential pairs dp j and add the removed differential pairs dp j to the queue Round2 to wait for re - wiring;

[0045] Step 4.12: If the wiring is successful and the differential pair dp i is not popped from the queue Round3, then add the differential pair dp i to the queue Round3; if the wiring fails, then increase the routing weight of the differential pair dp i and add the differential pair dp i to the queue Round2.

[0046] Preferably, the specific steps for initializing the head node Head of the Monte Carlo tree and all its legal child nodes using the pin positions of the two pins of the differential pair dp i are as follows:

[0047] Step 4.1.1: Number the six wiring areas around the differential pair pins from 1 to 6 in a clockwise direction starting from the upper left corner;

[0048] Step 4.1.2: Route the wires starting from the wiring area positions where the two pins have the same parity, obtaining 18 matching methods, including 1 - 1, 1 - 3, 1 - 5, 2 - 2, 2 - 4, 2 - 6, 3 - 3, 3 - 5, 3 - 1, 4 - 4, 4 - 6, 4 - 2, 5 - 5, 5 - 1, 5 - 3, 6 - 6, 6 - 2, 6 - 4, respectively forming 18 Monte Carlo tree nodes nodes;

[0049] Step 4.1.3: Make the following judgments for all nodes nodes. If all nodes have been judged, end the initialization of the head node;

[0050] Step 4.1.4: If in the wiring area represented by the current node node, there is an obstacle in any of the wiring areas corresponding to the two pins, or it is occupied by a differential pair with equal or higher routing weight, then discard the current node node and return to Step 4.1.4 for the next node judgment; otherwise, continue to the next step;

[0051] Step 4.1.5: If the wiring area represented by the current node node is occupied by a differential pair dp with a lower routing weight, then the node node can encroach on the wiring area of the differential pair dp, remove all the wires of the differential pair dp and add it to the queue Round2 to wait for re - wiring;

[0052] Step 4.1.6: Take the current node node as the child node of the head node Head; return to Step 4.1.4 for the next node judgment.

[0053] Preferably, in step 4.4, expanding the leaf node LN specifically includes:

[0054] Step 4.4.1: Check the single - line lengths of the two pins of the leaf node LN in the previous simulated wiring. If the single - line lengths of the two pins are the same, go to step 4.4.3; otherwise, continue to the next step;

[0055] Step 4.4.2: If one of the two pins has a longer single - line length and the other has a shorter single - line length, the pin with the longer single - line length expands in only one direction, that is, the current position of the pin with the longer single - line length in the direction of the previous simulated wiring, and the pin with the shorter single - line length expands in all legal and feasible directions, that is, the directions without obstacles and not occupied by differential pairs with equal or higher routing rights in the routing area; go to step 4.4.4;

[0056] Step 4.4.3: If the single - line lengths of pins A and B are equal, then both pins A and B expand in all legal and feasible directions, that is, the directions without obstacles and not occupied by differential pairs with equal or higher routing rights in the routing area;

[0057] Step 4.4.4: Combine the expanded directions of pins A and B one by one to form all child nodes of the leaf node LN.

[0058] Preferably, the Q - learning in step 4.5 is specifically as follows:

[0059] Step 4.5.1: If the Monte Carlo tree formed by the current differential pair dp i has undergone Q - learning and obtained the Q - table, end this step; otherwise, continue to the next step;

[0060] Step 4.5.2: Start Q - learning training, with a maximum of nTrain times. After training exceeds nTrain times, go to step 4.5.12;

[0061] Step 4.5.3: Start iteration for each training, with a maximum of mIteration times. After iteration exceeds mIteration times, go to step 4.5.11;

[0062] Step 4.5.4: Perform the following strategies on pins A and B of the current differential pair dp i respectively. After both pins are completed, go to step 4.5.10;

[0063] Step 4.5.5: If the position S of the current pin p (p ∈ {A, B}) has reached the escape point set SetPEP, go to step 4.5.4 to calculate the next pin; otherwise, continue to the next step;

[0064] Step 4.5.6: Randomly generate a random number num. If num is less than the exploration probability epsilon, the pin p randomly takes one step in a direction from the position S to reach the position S'; otherwise, it takes one step in the direction with the maximum Q value towards the S position to reach the position S'.

[0065] Step 4.5.7: If the position S' is an obstacle or the routing area of other differential pairs with greater routing rights, the reward value is -1; if it reaches the escape point set SetPEP, the reward value is 1; if it reaches the boundary escape point outside the escape point set SetPEP, the reward value is -0.1 to avoid routing occupying boundary resources and affecting the escape of other differential pairs; in other cases, the reward value is 0;

[0066] Step 4.5.8: Update the Q table;

[0067] Step 4.5.9: Go to Step 4.5.4;

[0068] Step 4.5.10: If both pins A and B reach the escape point set SetPEP, proceed to the next step; otherwise, continue the iteration and go to Step 4.5.3;

[0069] Step 4.5.11: Save the number of iterations. If the standard deviation of the number of iterations in the latest 10 training sessions converges to less than 1, continue; otherwise, decrease epsilon and continue training, then go to Step 4.5.2;

[0070] Step 4.5.12: If both pins A and B reach the predicted escape point set SetPEP, save the Q table as the basis for simulating all nodes of this Monte Carlo tree, and Q learning is successful; otherwise, Q learning fails for the current node.

[0071] Preferably, the Q table is updated according to the following formula:

[0072]

[0073] Q(s t ,a t ) represents the action value of taking the action a t under the state s t at the time step t; α represents the learning rate; r t+1 represents the reward value; γ represents the discount factor.

[0074] Preferably, the specific process of using the Q table to simulate routing for all expanded child nodes is as follows:

[0075] Step 4.6.1: For each child node NELN k in all expanded child nodes, perform the following steps;

[0076] Step 4.6.2, if the child node NELN k If the positions S1 and S2 of the two pins A and B are both escape point sets SetPEP, the Monte Carlo tree successfully searches for the target, no simulation wiring is needed, and this method ends; otherwise, the following simulation wiring is performed, where the head node Head is connected to the expansion node NELN k Wiring SEP k It is not re-wiring;

[0077] Step 4.6.3, if S1 is in the escape point set SetPEP, go to step 4.6.6; otherwise, the pin A to Q table has the maximum Q value at S1 and is not SEP k Take one step in the direction to reach S1';

[0078] Step 4.6.4, if S1' is the analog routing area of ​​pin B, it means that pins A and B meet at the position of S1', then copy the routing of pin B after this to pin A;

[0079] Step 4.6.5: If the analog routing of the two pins has been merged, S2' is directly equal to S1', and go to step 4.6.3; otherwise, continue with the analog routing of pin B;

[0080] Step 4.6.6, if S2 is in the escape point set SetPEP, go to step 4.6.8; otherwise, pin B has the maximum Q value at position S2 in the Q table and is not SEP k Take one step in the direction to reach S2';

[0081] Step 4.6.7. If S2' is the analog routing area of ​​pin A, it means that pins A and B meet at the position of S2', then copy the routing of pin A after this to pin B;

[0082] Step 4.6.8: If S1' or S2' reaches another differential pair dp with smaller right of way j The routing area of ​​the current differential pair can occupy this routing area, saving the dp of other differential pairs. j To node NELN k If the Monte Carlo tree path of the final routing solution passes through the node NELN k , then the differential pair dp j Remove the stitches and re-thread them;

[0083] Step 4.6.9: If both S1' and S2' reach the escape point set SetPEP, the simulation routing is completed, otherwise continue

[0084] Step 4.6.10: Update S1 to S1' and S2 to S2', and go to step 4.6.2.

[0085] Preferably, the current differential pair dp i In the previous differential pair dpP i The escape point epP i And the subsequent differential pair dpN i The escape point epN i The judgment on whether there is a predicted legal set of escape points SetPEP between them is as follows:

[0086] Step 6.1. The previous differential pair of the current differential pair dp i Is dpP i With the serial number P and the escape point epP i The subsequent differential pair is dpN i With the serial number N (N>i>P) and the escape point epN i ;

[0087] Step 6.2. If the number of remaining escape points between the escape point epP i And epN i Is less than (N-P-1), it means that the number of remaining escape points is not enough for the differential pairs dpP i And dpN i To escape between the remaining differential pairs, return false; otherwise continue;

[0088] Step 6.3. Take all the escape points in the escape point interval [epP i +i-P, epN i -(N-i)] as the predicted legal set of escape points SetPEP of the differential pair dp i .

[0089] Compared with the prior art, the present invention has the following beneficial effects:

[0090] The present invention solves the problem of orderly escape routing of high-density differential pair pins in printed circuit board design. By combining two algorithms of MCTS and Q-learning, it can dynamically generate a routing path without the need to preset intermediate points, especially suitable for high-density differential pair routing in grid pin arrays and staggered pin arrays; the present invention effectively reduces the routing length, optimizes the CPU calculation time, and can handle blocked areas in complex grid pin arrays (GPA) and staggered pin arrays (SPA) to achieve more efficient routing path planning; the present invention is widely applied to the design and manufacturing process of high-performance electronic devices and is suitable for high-density PCB design in fields such as communication, computer, aviation, national defense, and medical treatment. Description of the Drawings

[0091] Figure 1 Are the structures of two kinds of pin arrays;

[0092] Figure 2 A flow chart of the four steps of the Monte Carlo tree search algorithm of the present invention;

[0093] Figure 3 A flow chart of a differential pair ordered escape routing algorithm based on improved Monte Carlo tree search proposed by the present invention;

[0094] Figure 4 This is a schematic diagram of a method for predicting the escape point of a simple differential pair in the first round of the present invention;

[0095] Figure 5 This is a schematic diagram of the numbering of six wiring areas around the pin when initializing the head node of the present invention;

[0096] Figure 6 A schematic diagram of the automatic merging of two wirings when one pin wiring reaches another pin wiring area for the simulated wiring of the present invention;

[0097] Figure 7 Schematic diagram of the method for predicting the escape point of complex differential pairs in the second round of the present invention. DETAILED DESCRIPTION

[0098] The technical solution of the present invention is described in detail below in conjunction with the accompanying drawings.

[0099] The present invention proposes a differential pair orderly escape routing method based on improved Monte Carlo tree search, and some symbols and their meanings used are as follows:

[0100] n: the number of differential pairs;

[0101] dp i : The differential pair with sequence number i;

[0102] cost: the estimated length cost (right of way) of the differential pair escape;

[0103] PW i : PathWeight differential pair dp i The differential pair with larger right of way can occupy the routing area of ​​the differential pair with smaller right of way during routing, and make the occupied differential pair untie and reroute;

[0104] Round 1: The priority queue for the first round of routing, PW i The larger it is, the higher the priority;

[0105] Round2: The priority queue for the second round of routing, PW i The larger it is, the higher the priority;

[0106] Round3: The priority queue for the third round of optimized routing. The smaller the differential pair number, the higher the priority.

[0107] SetPEP: Set of Predicted Escape Points, the set of predicted legal escape points;

[0108] Head: The head node of the Monte Carlo tree, formed by the differential pair of two pin positions;

[0109] LN: LeafNode, the leaf node of the Monte Carlo tree;

[0110] NELN k : The k-th child node expanded by the leaf node;

[0111] SlnN: Solution Now, the current simulated wiring solution;

[0112] SlnBest: Solution Best, the current best wiring solution;

[0113] dpP i : The previously wired differential pair of the differential pair with sequence number i;

[0114] epP i : The escape point of the previously wired differential pair of the differential pair with sequence number i;

[0115] dpN i : The subsequently wired differential pair of the differential pair with sequence number i;

[0116] epN i : The escape point of the previously wired differential pair of the differential pair with sequence number i;

[0117] SEP k : Select and Expand Path, the wiring of the selection and expansion part, that is, the path from the Head node to node k. The wiring of this part cannot be occupied during the simulated wiring;

[0118] Reference Figure 2-3 , the method specifically includes the following steps:

[0119] Step 1. For all differential pairs dp i (i ∈ [1, n]), sort them in ascending order according to the path weight (estimated length cost) cost of the differential pair escape, and add them to the queue Round1, where cost is used as the initial path weight PW of the differential pair i ;

[0120] Step 2. If there is no differential pair in the queue Round1, go to Step 5; otherwise, pop the first differential pair dp from the queue Round1 i ;

[0121] Step 3: If for differential pair dp i a predicted legal escape point set SetPEP cannot be found, add differential pair dp i to queue Round2 and go to Step 2; otherwise, continue to the next step;

[0122] Step 4: Route differential pair dp i and differential pair dp i along with escape point set SetPEP according to the Monte Carlo tree search algorithm. If the routing is successful and differential pair dp i is not popped from queue Round3, add differential pair dp i to queue Round3. If the routing fails, add differential pair dp i to queue Round2;

[0123] Step 5: If there are no differential pairs in queue Round2, go to Step 8; otherwise, pop a differential pair dp i from queue Round2 as the current differential pair dp i ;

[0124] Step 6: If there is a predicted legal escape point set SetPEP between the escape point epP i of the previous differential pair dpP i and the escape point epN i of the subsequent differential pair dpN i for the current differential pair dp i , go to Step 4; otherwise, continue to the next step;

[0125] Step 7: Remove the routing of the differential pair with a smaller path weight among the previous differential pair dpP i and the subsequent differential pair dpN i . To ensure that there can be an escape point set SetPEP for the current differential pair dp i , increase the path weight PW i of the current differential pair dp i and add it to queue Round2, then go to Step 5;

[0126] Step 8: If there are no differential pairs in queue Round3, go to Step 10; otherwise, pop a differential pair dp i from queue Roun3 as the current differential pair dp i ;

[0127] Step 9: Set the path weight PW i of the current differential pair dp i to the minimum value and go to Step 6;

[0128] Step 10: Save all differential pair routing paths and end the routing.

[0129] Preferably, the calculation of the path cost is specifically as follows:

[0130] dis = Manhattan distance between two pins + shortest distance from the midpoint of the pins to the boundary

[0131] Manhattan distance between two pins = |X Ai - X Bi | + |Y Ai - Y Bi |

[0132] Shortest distance from the midpoint of the pins to the boundary = min(X midi , Y midi , Width - X midi , Height - Y midi )

[0133]

[0134] dis represents the estimated routing length; X Ai , X Bi represent the abscissas of the A and B pins of the i-th differential pair; Y Ai , Y Bi represent the ordinates of the A and B pins of the i-th differential pair; X midi represents the abscissa of the midpoint of the two pins of the i-th differential pair; Y midi represents the ordinate of the midpoint of the two pins of the i-th differential pair; Width represents the width of the pin array, and Height represents the height of the pin array.

[0135] Preferably, in step 3, the search for the escape point set SetPEP of the differential pair dp i is specifically as follows: Find that in the quadrilateral formed by the connection line of the two pins of the current differential pair dp i and the nearest boundary, if there are other unrouted pins, the escape point set SetPEP cannot be found; otherwise, take the escape points included in the projection of the differential pair connection line on the boundary as the predicted legal escape point set SetPEP of the current differential pair dp i . As Figure 4 shown, the projection of the connection line of the differential pair on the lower boundary, that is, the escape points in the red box, is used as the predicted escape point set.

[0136] Preferably, the routing of the differential pair dp i and the escape point set SetPEP of the differential pair dp i according to the Monte Carlo tree search algorithm specifically includes the following steps:

[0137] Step 4.1: Initialize the head node Head of the Monte Carlo tree and all its legal child nodes using the two pin positions of the differential pair dp i and start the Monte Carlo tree search iteration;

[0138] Step 4.2: If the iteration ends, go to Step 4.10; otherwise continue to the next step;

[0139] Step 4.3: Starting from the head node Head, each time select the child node with the largest UCT value until reaching the leaf node LN of the Monte Carlo tree. The UCT calculation formula is as follows:

[0140]

[0141] R k represents the total reward of node k; N k represents the number of times node k has been visited; N represents the number of times the parent node of node k has been visited; c represents the exploration parameter, which is used to control the balance between exploration and exploitation;

[0142] Step 4.4: Expand the leaf node LN and select one of its child nodes NELN k for Q-learning to obtain the Q-table; since the Q-table is only related to the end point and has nothing to do with the start point position and node position, only the Q-table obtained by performing Q-learning on any one NELNi can be used for simulated wiring of all other nodes;

[0143] Step 4.5: If the Monte Carlo tree already has a Q-table, skip Q-learning and continue to the next step; otherwise, perform Q-learning based on the pin positions of the child node NELN k and the escape point set SetPEP. If Q-learning is successful, obtain the Q-table and continue to the next step. If Q-learning fails, delete the current child node NELN k and perform Q-learning using the pin positions of another child node NELN k until Q-learning is successful and continue to the next step. If Q-learning fails for all child nodes NELN k , then the current differential pair dp i wiring fails, go to Step 4.12;

[0144] Step 4.6: Use the Q-table to perform simulated wiring for all expanded child nodes NELN;

[0145] Step 4.7: Calculate the reward value for each child node NELN k respectively and backtrack to update the reward value and the number of visits. The calculation method of the reward value of the child node NELN k is as follows:

[0146]

[0147]

[0148]

[0149] r represents the child node NELN k The reward value after simulated wiring; D A Represents the single - wire length of the simulated wiring of pin A, D B Represents the single - wire length of the simulated wiring of pin B; L represents the double - wire length after the convergence of pins A and B; R(v) represents the reward value of node v; N(v) represents the access times of node v; Selection Path represents the selection path from the root node Head to the child node NELN k ;

[0150] Step 4.8: If the current simulated wiring scheme SlnN is better than the previous best wiring scheme SlnBest, that is, the reward value r is higher, then update the best wiring scheme SlnBest to the current simulated wiring scheme SlnN;

[0151] Step 4.9: If the best wiring scheme SlnBest converges, that is, the wiring scheme remains unchanged in a certain number of iterations, then go to Step 4.11; otherwise, go to Step 4.2;

[0152] Step 4.10: If there exists a wiring scheme SlnBest, then the wiring is successful, and continue to the next step; otherwise, the wiring fails, and go to Step 4.12

[0153] Step 4.11: If the best wiring scheme needs to remove the wiring of other differential pairs dp j , then remove the wiring of other differential pairs dp j and put the removed differential pair dp j into the queue Round2 to wait for re - wiring;

[0154] Step 4.12: If the wiring is successful and the differential pair dp i is not popped from the queue Round3, then add the differential pair dp i to the queue Round3; if the wiring fails, then increase the routing weight of the differential pair dp i and add the differential pair dp i to the queue Round2.

[0155] Preferably, initializing the head node Head of the Monte Carlo tree and all its legal child nodes for the two pin positions of the utilized differential pair dp i specifically includes the following steps:

[0156] Step 4.1.1: Number the six routing areas around the differential pair pins from 1 to 6 in a clockwise direction starting from the upper left corner; as Figure 5 shown;

[0157] Step 4.1.2: Route the wires starting from the routing area positions where the two pins have the same parity, obtaining 18 matching methods, including 1-1, 1-3, 1-5, 2-2, 2-4, 2-6, 3-3, 3-5, 3-1, 4-4, 4-6, 4-2, 5-5, 5-1, 5-3, 6-6, 6-2, 6-4, respectively forming 18 Monte Carlo tree nodes nodes;

[0158] Step 4.1.3: Make the following judgments for all nodes nodes. If all nodes have been judged, end the initialization of the head node;

[0159] Step 4.1.4: If in the routing area represented by the current node node, there is an obstacle in any of the routing areas corresponding to the two pins, or it is occupied by a differential pair with equal or higher routing rights, then discard the current node node and return to Step 4.1.4 to judge the next node; otherwise continue to the next step;

[0160] Step 4.1.5: If the routing area represented by the current node node is occupied by a differential pair dp with lower routing rights, then the node node can invade the routing area of the differential pair dp, disconnect all the wires of the differential pair dp and add them to the queue Round2 to wait for re-routing;

[0161] Step 4.1.6: Take the current node node as the child node of the head node Head; return to Step 4.1.4 to judge the next node.

[0162] Preferably, in the said Step 4.4, expanding the leaf node LN specifically is:

[0163] Step 4.4.1: Check the single-wire lengths of the two pins of the leaf node LN in the previous simulated routing. If the single-wire lengths of the two pins are the same, then go to Step 4.4.3; otherwise continue to the next step;

[0164] Step 4.4.2: If one of the two pins has a longer single-wire length and the other has a shorter single-wire length, then the pin with the longer single-wire length only expands in one direction, that is, the current position of the pin with the longer single-wire length in the previous simulated routing direction, and the pin with the shorter single-wire length expands in all legal and feasible directions, that is, the directions of the routing areas without obstacles and not occupied by differential pairs with equal or higher routing rights; go to Step 4.4.4;

[0165] Step 4.4.3: If the single - line lengths of pins A and B are equal, then both pins A and B expand all legal and feasible directions, that is, directions where there are no obstacles and the wiring areas are not occupied by differential pairs with equal or higher routing priorities.

[0166] Step 4.4.4: Combine the expanded directions of pins A and B one by one to form all child nodes of the leaf node LN.

[0167] Preferably, the Q - learning in step 4.5 is specifically as follows:

[0168] Step 4.5.1: If the Monte Carlo tree formed by the current differential pair dp i has undergone Q - learning and obtained the Q - table, then end this step; otherwise, continue to the next step.

[0169] Step 4.5.2: Start Q - learning training, with a maximum of nTrain times. After training exceeds nTrain times, go to step 4.5.12.

[0170] Step 4.5.3: Start iteration for each training, with a maximum of mIteration times. After iteration exceeds mIteration times, go to step 4.5.11.

[0171] Step 4.5.4: Perform the following strategies on pins A and B of the current differential pair dp i respectively. After both pins are completed, go to step 4.5.10.

[0172] Step 4.5.5: If the position S of the current pin p (p ∈ {A, B}) has reached the escape point set SetPEP, then go to step 4.5.4 to calculate the next pin; otherwise, continue to the next step.

[0173] Step 4.5.6: Randomly generate a random number num. If num is less than the preset exploration probability epsilon, then the pin p moves one step randomly in a direction from position S to reach position S'; otherwise, it moves one step in the direction with the maximum Q - value at position S to reach position S'.

[0174] Step 4.5.7: If position S' is an obstacle or the wiring area of another differential pair with a higher routing priority, the reward value is - 1; if it reaches the escape point set SetPEP, the reward value is 1; if it reaches the boundary escape point outside the non - escape point set SetPEP, the reward value is - 0.1 to avoid wiring occupying boundary resources and affecting the escape of other differential pairs; in other cases, the reward value is 0.

[0175] Step 4.5.8: Update the Q - table.

[0176] Step 4.5.9: Go to step 4.5.4.

[0177] Step 4.5.10: If both pins A and B reach the escape point set SetPEP, proceed to the next step; otherwise, continue the iteration and go to Step 4.5.3.

[0178] Step 4.5.11: Save the number of iterations. If the standard deviation of the number of iterations in the latest 10 training sessions converges to less than 1, continue; otherwise, decrease epsilon and continue training, then go to Step 4.5.2.

[0179] Step 4.5.12: If both pins A and B reach the predicted escape point set SetPEP, save the Q-table as the basis for simulating all nodes of this Monte Carlo tree, and Q-learning is successful; otherwise, Q-learning fails for the current node.

[0180] Preferably, the Q-table is updated according to the following formula:

[0181]

[0182] Q(s t ,a t ) represents the action value of taking action a t in state s at time step t t ; α represents the learning rate; r t+1 represents the reward value; γ represents the discount factor.

[0183] Preferably, the specific process of using the Q-table to simulate wiring for all expanded child nodes is as follows:

[0184] Step 4.6.1: For each child node NELN k among all expanded child nodes, perform the following steps;

[0185] Step 4.6.2: If the positions S1 and S2 of the two pins A and B of the child node NELN k are both in the escape point set SetPEP, the Monte Carlo tree has successfully searched for the target, no simulated wiring is required, and this method ends; otherwise, perform the following simulated wiring, where the wiring SEP k from the head node Head to the expanded node NELN k is non-repeatable wiring;

[0186] Step 4.6.3: If S1 is in the escape point set SetPEP, go to Step 4.6.6; otherwise, move pin A one step in the direction of the maximum Q value at the S1 position in the Q-table and not SEP k to reach S1';

[0187] Step 4.6.4: If S1' is the simulated wiring area of pin B, it means that pins A and B converge at the position of S1'. Then copy the wiring of pin B after this point to pin A; ifFigure 6 as shown;

[0188] Step 4.6.5: If the analog wirings of two pins have converged, S2' is directly equal to S1', go to Step 4.6.3; otherwise, continue to simulate the wiring of pin B;

[0189] Step 4.6.6: If S2 is in the escape point set SetPEP, go to Step 4.6.8; otherwise, pin B takes one step in the direction of the maximum Q value at the S2 position in the Q table and is not SEP k to reach S2';

[0190] Step 4.6.7: If S2' is the analog wiring area of pin A, indicating that the wirings of pins A and B converge at the position of S2', then copy the wiring of pin A after this to pin B;

[0191] Step 4.6.8: If S1' or S2' reaches the wiring area of other differential pairs dp j with a smaller routing right, the wiring of the current differential pair can encroach on this wiring area, save other differential pairs dp j to the node NELN k In it, if the Monte Carlo tree path of the final wiring scheme passes through the node NELN k , then the differential pair dp j will be redrawn;

[0192] Step 4.6.9: If both S1' and S2' reach the escape point set SetPEP, the analog wiring is completed; otherwise, continue

[0193] Step 4.6.10: Update S1 to S1', S2 to S2', and go to Step 4.6.2.

[0194] Preferably, the judgment of whether there is a predicted legal escape point set SetPEP between the escape point epP i of the previous differential pair dpP i and the escape point epN i of the subsequent differential pair dpN i is as follows specifically: i

[0195] Step 6.1: The previous differential pair of the current differential pair dp i is dpP i , with the serial number P and the escape point epP i , the subsequent differential pair is dpN i , with the serial number N (N > i > P) and the escape point epN i ;

[0196] Step 6.2: If the escape point epP i ​With epN i The number of remaining escape points between is less than (N - P - 1), indicating that the number of remaining escape points is not enough for differential pair dpP i and dpN i to escape with the remaining differential pairs between them, return false; otherwise continue;

[0197] Step 6.3. Take all the escape points within the escape point interval [epP i + i - P, epN i - (N - i)] as the differential pair dp i the predicted legal escape point set SetPEP. As Figure 7 shown, for predicting the escape points of the complex differential pair 37 in the second round, between the escape points of the previous differential pair 35 and the subsequent differential pair 38, leave the escape points in the red box for differential pair 36, and take all the remaining escape points in the yellow box as the predicted escape point set of differential pair 37.

[0198] The above are the preferred embodiments of the present invention. All changes made according to the technical solutions of the present invention, when the functions and effects produced do not exceed the scope of the technical solutions of the present invention, shall fall within the protection scope of the present invention.

Claims

1. A differential pair ordered escape routing method based on improved Monte Carlo tree search, characterized in that: The specific steps include: Step 1: For all differential pairs, i (i∈[1,n]) are sorted from small to large according to the road right cost of the differential pair escape, and added to the queue Round1, where the cost is used as the initial road right PW of the differential pair i ; Step 2: If there is no differential pair in queue Round1, go to step 5; otherwise, pop the first differential pair dp from queue Round1 i ; Step 3: If the differential pair dp i If the predicted legal escape point set SetPEP is not found, the difference pair dp i Join the queue Round2 and go to step 2; otherwise, continue to the next step; Step 4: Use the Monte Carlo tree search algorithm to find the difference pair dp i and differential pair dp i The escape point set SetPEP is used for routing. If the routing is successful and the differential pair dp i If it is not popped from the queue Round3, the differential pair dp i Join the queue Round3. If the routing fails, the differential pair dp i Join the queue Round2; Step 5: If there is no differential pair in queue Round2, go to step 8; otherwise, pop a differential pair dp from queue Round2. i As the current differential pair dp i ; Step 6: If the current differential pair dp i In the preceding differential pair dpP i Escape point epP i and the subsequent differential pair dpN i Escape Point epN i If there is a predicted legal escape point set SetPEP, go to step 4, otherwise continue to the next step; Step 7: Remove the preamble differential pair dpP i and the subsequent differential pair dpN i The routing of the differential pair with small middle right is to ensure the current differential pair dp i There can be an escape point set SetPEP, which increases the current differential pair dp i Right of way PW i And join the queue Round2, go to step 5; Step 8: If there is no differential pair in queue Round3, go to step 10; Otherwise, a differential pair dp is popped from queue Roun3 i As the current differential pair dp i ; Step 9: Set the current differential pair dp i Right of way PW i is the minimum value, go to step 6; Step 10: Save all differential pair routing paths and end routing.

2. The differential pair ordered escape routing method based on improved Monte Carlo tree search according to claim 1, characterized in that: The calculation of the road right cost is as follows: dis = Manhattan distance between two pins + shortest distance from the pin midpoint to the border Manhattan distance between two pins = |X Ai -X Bi |+|Y Ai -Y Bi | The shortest distance from the pin midpoint to the boundary = min(X midi ,Y midi ,Width-X midi ,Height-Y midi ) dis represents the estimated wiring length; X Ai , X Bi Represents the horizontal coordinates of the A pin and the B pin of the ith differential pair; Y Ai , Y Bi Indicates the ordinate of the A pin and the B pin of the ith differential pair; X midi Represents the horizontal coordinate of the midpoint of the two pins of the ith differential pair; Y midi Represents the ordinate of the midpoint of the two pins of the i-th differential pair; Width represents the width of the pin array, and Height represents the height of the pin array.

3. The differential pair ordered escape routing method based on improved Monte Carlo tree search according to claim 1, characterized in that: In step 3, the differential pair dp i The specific search for the escape point set SetPEP is: find the current differential pair dp i If there are other unrouted pins in the quadrilateral formed by the connection line of the two pins and the nearest boundary, the escape point set SetPEP cannot be found; otherwise, the escape point contained in the projection of the differential pair connection line on the boundary is used as the current differential pair dp i The predicted legal escape point set SetPEP.

4. The differential pair ordered escape routing method based on improved Monte Carlo tree search according to claim 1, characterized in that: The Monte Carlo tree search algorithm is used to search the difference pair dp i and differential pair dp i The escape point set SetPEP is used for wiring, which specifically includes the following steps: Step 4.1: Using differential pair dp i Initialize the Monte Carlo tree head node Head and all its legal child nodes at the two pin positions, and start the Monte Carlo tree search iteration; Step 4.2: If the iteration is finished, go to step 4.10; otherwise, proceed to the next step; Step 4.3, starting from the head node Head, select the child node with the largest UCT value each time until the leaf node LN of the Monte Carlo tree. The UCT calculation formula is as follows: R k represents the total reward of node k; N k represents the number of times node k is visited; N represents the number of times the parent node of node k is visited; c represents the exploration parameter, which is used to control the balance between exploration and utilization; Step 4.4: Expand the leaf node LN and select one of its child nodes NELN k ; Step 4.5: If the Monte Carlo tree already has a Q table, skip Q learning and proceed to the next step; otherwise, according to the child node NELN k The pin position and escape point set SetPEP are used for Q learning. If Q learning succeeds, the Q table is obtained and the next step is continued. If Q learning fails, the current child node NELN is deleted. k and use another child node NELN k The pin position and escape point set SetPEP are used for Q learning until Q learning succeeds and then proceed to the next step; if all child nodes NELN k If all Q learning fails, the current differential pair dp i If the wiring fails, go to step 4.12; Step 4.6, use the Q table to simulate the wiring of all the extended sub-nodes NELN; Step 4.7: For each child node NELN k Calculate the reward value and backtrack to update the reward value and visit count, child node NELN k The reward value is calculated as follows: r represents the child node NELN k Reward value after simulated wiring; D A Indicates the length of the single line of the analog wiring of pin A, D B represents the length of the single line of the simulated wiring of pin B; L represents the length of the double line after the confluence of pins A and B; R(v) represents the reward value of node v; N(v) represents the number of visits to node v; Selection Path represents the number of nodes from the root node Head to the child node NELN k The choice path; Step 4.8, if the current simulated wiring scheme SlnN is better than the previous best wiring scheme SlnBest, that is, the reward value r is higher, then the best wiring scheme SlnBest is updated to the current simulated wiring scheme SlnN; Step 4.9: If the best wiring scheme SlnBest converges, that is, the wiring scheme remains unchanged in a certain number of iterations, go to step 4.11, otherwise go to step 4.2; Step 4.10: If there is a wiring solution SlnBest, the wiring is successful and proceed to the next step; otherwise, the wiring fails and go to step 4.12 Step 4.11: If the optimal routing solution requires removing other differential pairs, j If the wiring of other differential pairs is removed, j The wiring and the removed differential pair dp j Join the queue Round2 and wait for rewiring; Step 4.12, if the wiring is successful and the differential pair dp i If it is not popped from the queue Round3, the differential pair dp i Add to queue Round3; if routing fails, increase differential pair dp i The right of way will be differential pair dp i Join the queue Round2.

5. The differential pair ordered escape routing method based on improved Monte Carlo tree search according to claim 4, characterized in that: The use of differential pair dp i Initializing the Monte Carlo tree head node Head and all its legal child nodes at the two pin positions specifically includes the following steps: Step 4.1.

1. Number the six wiring areas around the differential pair pins from 1 to 6 in a clockwise direction starting from the upper left corner; Step 4.1.2, start routing from the routing area with two pins of the same odd and even positions, and obtain 18 matching methods, including 1-1, 1-3, 1-5, 2-2, 2-4, 2-6, 3-3, 3-5, 3-1, 4-4, 4-6, 4-2, 5-5, 5-1, 5-3, 6-6, 6-2, and 6-4, which respectively constitute 18 Monte Carlo tree nodes; Step 4.1.3, make the following judgments on all nodes. If all nodes have been judged, the initialization of the head node is finished; Step 4.1.4: If any of the wiring areas corresponding to the two pins in the wiring area represented by the current node node has obstacles or is occupied by a differential pair with equal or higher path rights, then the current node node is discarded and the process returns to step 4.1.4 to determine the next node; otherwise, continue to the next step; Step 4.1.5, if the routing area represented by the current node node is occupied by a differential pair dp with a lower right of way, the node node can occupy the routing area of ​​the differential pair dp, remove all the differential pairs dp and add them to the queue Round2 to wait for rerouting; Step 4.1.6: Set the current node node as the child node of the head node Head; return to step 4.1.4 to determine the next node.

6. The differential pair ordered escape routing method based on improved Monte Carlo tree search according to claim 4, characterized in that: In step 4.4, expanding the leaf node LN is specifically as follows: Step 4.4.1, check the single-line lengths of the two pins of the leaf node LN in the last simulated wiring. If the single-line lengths of the two pins are the same, go to step 4.4.3; otherwise, proceed to the next step; Step 4.4.2, if one of the two pins has a longer single-line length and the other pin has a shorter single-line length, the pin with the longer single-line length is extended in only one direction, that is, the current position of the pin with the longer single-line length is in the direction of the last simulated routing, and the pin with the shorter single-line length is extended in all legal and feasible directions, that is, directions without obstacles and in which the routing area is not occupied by differential pairs with equal or higher right of way; go to step 4.4.4; Step 4.4.3: If the single-line lengths of pins A and B are equal, both pins A and B extend in all legal and feasible directions, that is, directions without obstacles and where the routing area is not occupied by differential pairs with equal or higher right of way; Step 4.4.4, combine the directions in which pins A and B are extended one by one to form all child nodes of the leaf node LN.

7. The differential pair ordered escape routing method based on improved Monte Carlo tree search according to claim 4, characterized in that: The Q learning in step 4.5 is specifically as follows: Step 4.5.1, if the current differential pair dp i If the formed Monte Carlo tree has been Q-learned and the Q table is obtained, then end this step, otherwise proceed to the next step; Step 4.5.2, start Q learning training, train at most nTrain times, after training exceeds nTrain times, go to step 4.5.12; Step 4.5.3, start iteration for each training, iterate at most mIteration times, and go to step 4.5.11 after the iteration exceeds mIteration times; Step 4.5.4: For the current differential pair dp i Perform the following strategy on pin A and pin B respectively. After completing both pins, go to step 4.5.10; Step 4.5.5: If the current pin p (p∈{A,B}) position S has reached the escape point set SetPEP, go to step 4.5.4 to calculate the next pin, otherwise continue to the next step; Step 4.5.6, randomly generate a random number num. If num is less than the exploration probability epsilon, pin p will randomly move one step in one direction from position S to position S'; otherwise, it will move one step in the direction with the largest Q value at position S to position S'; Step 4.5.7, if the position S' is an obstacle or a routing area of ​​other differential pairs with greater right of way, the reward value is -1; if it reaches the escape point set SetPEP, the reward value is 1; if it reaches a boundary escape point outside the escape point set SetPEP, the reward value is -0.1 to avoid the routing occupying boundary resources and affecting the escape of other differential pairs; in other cases, the reward value is 0; Step 4.5.8, update the Q table; Step 4.5.9, go to step 4.5.4; Step 4.5.10: If both pins A and B reach the escape point set SetPEP, proceed to the next step; otherwise, continue iteration and go to step 4.5.3; Step 4.5.11, save the number of iterations. If the standard deviation of the number of iterations of the latest 10 trainings converges to less than 1, continue; otherwise, reduce epsilon and continue training, and go to step 4.5.2; Step 4.5.12: If both pins A and B reach the predicted escape point set SetPEP, the Q table is saved as the basis for simulating all nodes of this Monte Carlo tree, and Q learning is successful; otherwise, Q learning of the current node fails.

8. The differential pair ordered escape routing method based on improved Monte Carlo tree search according to claim 7, characterized in that: The Q table is updated according to the following formula: Q(s t ,a t ) represents the state s at time step t t Next, take action a t The action value; α represents the learning rate; r t+1 represents the reward value; γ represents the discount factor.

9. The differential pair ordered escape routing method based on improved Monte Carlo tree search according to claim 4, characterized in that: The specific steps of using the Q table to simulate the wiring of all extended sub-nodes are as follows: Step 4.6.1: For each child node NELN in all expanded child nodes k Follow these steps: Step 4.6.2, if the child node NELN k If the positions S1 and S2 of the two pins A and B are both escape point sets SetPEP, the Monte Carlo tree successfully searches for the target, no simulation wiring is needed, and this method ends; otherwise, the following simulation wiring is performed, where the head node Head is connected to the expansion node NELN k Wiring SEP k It is not re-wiring; Step 4.6.3, if S1 is in the escape point set SetPEP, go to step 4.6.6; otherwise, the pin A to Q table has the maximum Q value at position S1 and is not SEP k Take one step in the direction to reach S1'; Step 4.6.4, if S1' is the analog routing area of ​​pin B, it means that pins A and B meet at the position of S1', then copy the routing of pin B after this to pin A; Step 4.6.5: If the analog routing of the two pins has been merged, S2' is directly equal to S1', and go to step 4.6.3; otherwise, continue with the analog routing of pin B; Step 4.6.6, if S2 is in the escape point set SetPEP, go to step 4.6.8; Otherwise, pin B to Q table has the maximum Q value at position S2 and is not SEP k Take one step in the direction to reach S2'; Step 4.6.

7. If S2' is the analog routing area of ​​pin A, it means that pins A and B meet at the position of S2', then copy the routing of pin A after this to pin B; Step 4.6.8: If S1' or S2' reaches another differential pair dp with smaller right of way j The routing area of ​​the current differential pair can occupy this routing area, saving the dp of other differential pairs. j To node NELN k If the Monte Carlo tree path of the final routing solution passes through the node NELN k , then the differential pair dp j Remove the stitches and re-thread them; Step 4.6.9: If both S1' and S2' reach the escape point set SetPEP, the simulation routing is completed, otherwise continue Step 4.6.10: Update S1 to S1' and S2 to S2', and go to step 4.6.

2.

10. The differential pair ordered escape routing method based on improved Monte Carlo tree search according to claim 1, characterized in that: Current differential pair dp i In the preceding differential pair dpP i Escape point epP i and the subsequent differential pair dpN i Escape Point epN i Whether there is a predicted legal escape point set SetPEP is determined as follows: Step 6.1, current differential pair dp i The leading differential pair is dpP i , the sequence number is P, the escape point is epP i , the post-order differential pair is dpN i , the sequence number is N (N>i>P), the escape point is epN i ; Step 6.2: If the escape point epP i With epN i The number of remaining escape points is less than (NP-1), indicating that the number of remaining escape points is not enough for the differential pair dpP i and dpN i If the remaining differential pairs escape, return false; otherwise continue; Step 6.3: Set the escape point interval [epP i +iP,epN i -(Ni)] as differential pairs dp i The predicted legal escape point set SetPEP.

Citation Information

Patent Citations

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

    CN112528591A

  • PCB wiring sorting method, system and device and readable storage medium

    CN115221833A

  • Analog integrated circuit netlist labeling method based on VF3 algorithm

    CN115906734A

  • Routing scheme for differential pairs in flip chip substrates

    US20050110167A1

  • Area array routing masks for improved escape of devices on PCB

    US20070057362A1

Cited By

  • PCM grid layout method and system

    CN121615707A