Construction method of X structure obstacle-avoiding steiner minimum tree based on discrete sparrow search optimization

CN117725880BActive Publication Date: 2026-10-23FUZHOU UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311785053.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-22
Publication Date
2026-10-23
Estimated Expiration
2043-12-22

AI Technical Summary

Technical Problem

[0005]本发明的目的在于针对随着布线问题规模不断发展,约束要求不断复杂,如避开IP块等障碍约束使Steiner最小树构建更加困难,考虑到X结构在布线问题中展现出的特有优势和麻雀搜索优化在求解NP难问题上有良好的应用前景,因此提供一种基于离散麻雀搜索优化的X结构绕障Steiner最小树构建方法,能够在满足约束条件的情况下得到一个最小化线长代价的布线方案

Benefits of technology

[0063]相较于现有技术,本发明具有以下有益效果:本发明设计一种基于离散麻雀搜索优化的绕障X结构Steiner最小树构建方法,能够在满足约束条件的情况下得到一个最小化线长代价的布线方案。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117725880B_ABST
    Figure CN117725880B_ABST
Patent Text Reader

Abstract

The application relates to a discrete sparrow search optimization-based X structure obstacle-avoiding Steiner minimum tree construction method. The method mainly comprises the following three effective strategies: (1) a new initialization strategy combining a greedy thought and a roulette wheel thought, which improves the diversity of an initial population; (2) a discrete updating mechanism based on sparrow search optimization, which improves the search ability and can more effectively solve a Steiner minimum tree problem; and (3) a loop elimination strategy, which can modify and adjust the obtained Steiner tree, thereby reducing the extra line length cost caused by the loop elimination strategy and further improving the quality of the final Steiner tree.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer-aided design technology for integrated circuits, and in particular to a method for constructing an Obstacle-Avoidance X-architecture Steiner Minimal Tree (OAXSMT) based on discrete sparrow search optimization. Background Technology

[0002] Very Large Scale Integration (VLSI) is an integrated circuit that integrates thousands of transistors on a single chip. As the size of transistors integrated on a chip continues to increase and feature sizes continue to shrink, chip density continues to rise. This undoubtedly exacerbates the complexity of circuit design, especially the complexity of interconnect design. This is because the quality of interconnect design largely determines the total circuit delay, power consumption, and electrical noise. In ultra-deep submicron processes, interconnect delay dominates VLSI technology, significantly impacting the final chip performance. For example, at 100nm, the switching delay of a MOSFET is 5ps, while the RC response time of a 1nm interconnect is 30ps, with a difference ratio of 6:1. At 35nm, this difference ratio becomes 100:1. Therefore, interconnect design presents new challenges for high-performance VLSI design, and reducing interconnect delay is key. An intuitive approach is to optimize interconnect length, i.e., reduce interconnect length. Circuit interconnection is essentially about connecting nodes through appropriate interconnection methods. The Steiner Minimal Tree (SMT) problem is about finding the minimum total length by introducing additional nodes while connecting all given nodes. Therefore, the SMT model has good optimization capabilities in terms of line length and can accurately evaluate line length.

[0003] On the other hand, various obstacles are often encountered in actual VLSI design, such as macrocells, IP blocks, and pre-routed nets. The Steiner minimum tree problem that takes obstacles into account is called the Obstacle-Avoiding Steiner Minimal Tree (OASMT) problem.

[0004] Sparrow Search Optimization, proposed in 2020, is a swarm intelligence optimization method inspired by the foraging and anti-predation behaviors of sparrows. This method possesses strong search capabilities, is simple to implement, requires few parameters, and is highly scalable. It shows promising application prospects, particularly in solving NP-hard problems or complex problems with non-convex and non-differentiable characteristics. Summary of the Invention

[0005] The purpose of this invention is to address the increasing complexity of constraints as the scale of routing problems grows, such as the difficulty in constructing Steiner's minimum tree by avoiding obstacles like IP blocks. Considering the unique advantages of the X-structure in routing problems and the promising application prospects of sparrow search optimization in solving NP-hard problems, this invention provides a method for constructing an X-structure obstacle-avoiding Steiner's minimum tree based on discrete sparrow search optimization. This method can obtain a routing scheme that minimizes line length cost while satisfying the constraints.

[0006] To achieve the above objectives, the technical solution of this invention is: a method for constructing an X-structure obstacle-bypassing Steiner minimum tree based on discrete sparrow search optimization, comprising the following steps:

[0007] S1. Initialization Phase 1: Based on the pin and obstacle location information in the problem model, generate a lookup table to provide a fast lookup for subsequent steps. The lookup table records the number of obstacles passed by any two pins after any interconnection selection.

[0008] S2. Initialization Phase Two: Initialize the population using a hybrid initialization strategy, initializing the historical best position P of each sparrow. i, The position g of the optimal sparrow individual best ;

[0009] S3. Update Stage Based on Discrete Sparrow Search Optimization: The sparrow search optimization method is discretized by designing discretized crossover and mutation operators, and used for iterative updates of the sparrow population. The globally optimal sparrow individual g is obtained. best As the optimal wiring tree;

[0010] S4, Adjustment Phase: This phase addresses the obtained g... best Adjustment strategies are applied to any edges that may violate constraints to ensure that each edge can bypass obstacles.

[0011] S5, Refining Stage: A hybrid refining strategy is applied, using a local optimization strategy based on common edges and a cycle elimination strategy to refine g. best Optimize.

[0012] In one embodiment of the present invention, step S1 is specifically implemented as follows:

[0013] S11, X-structure Steiner tree encoding:

[0014] Interconnection methods are defined as follows: Under the X structure, the interconnection method c is divided into the following four types:

[0015] Option 0: First, draw a right-angled side from the starting point to the pseudo-Steiner point, and then draw a non-right-angled side of 45° or 135° from the pseudo-Steiner point to the ending point;

[0016] Option 1: First, draw a non-right-angled side of 45° or 135° from the starting point to the pseudo Steiner point, and then draw a right-angled side from the pseudo Steiner point to the ending point;

[0017] Option 2: First, draw a vertical edge from the starting point to the pseudo-Steiner point, and then draw a horizontal edge from the pseudo-Steiner point to the ending point;

[0018] Option 3: First, draw a horizontal edge of 45° or 135° from the starting point to the pseudo Steiner point, and then draw a vertical edge from the pseudo Steiner point to the ending point.

[0019] S12. Design an edge pair encoding scheme for an X-structure Steiner tree: First, assign numerical numbers to the pins and obstacles according to their order, and then encode them using a numerical string (pqc). n-1 f represents the final Steiner tree, where p is the predecessor node number, q is the successor node number, c represents the connection selection of the corresponding edge, n is the number of net pins, and f is the fitness value of the corresponding sparrow.

[0020] S13. Design a lookup table consisting of associative arrays to store obstacle information for the four connection selection methods between any two pairs of pins; for each pair of pins p and q, calculate the number of obstacles and obstacle numbers traversed by edge pq after connection via selection method c, and record all this information in set {O}. k In the}, the final lookup table is formed.

[0021] In one embodiment of the present invention, in step S2, the hybrid initialization strategy includes a minimum spanning tree construction method and a minimum spanning tree construction method improved by roulette wheel betting.

[0022] In one embodiment of the present invention, step S3 is specifically implemented as follows:

[0023] Discrete Sparrow Search Optimization Based on Genetic Operations: By combining genetic algorithms with sparrow search algorithms, a sparrow search optimization method based on genetic operations is proposed to solve the discrete problem of constructing a Steiner minimum tree for obstacle-bypassing X-structures.

[0024] S31. Fitness Function Design:

[0025] The optimization objective of the X-structure obstacle-bypassing Steiner minimum tree (OAXSMT) problem is to optimize the bus length of the net while simultaneously ensuring that the generated routing tree bypasses obstacles. Therefore, the fitness function formula considers both the bus length of the routing tree and obstacle information, resulting in the following fitness formula:

[0026]

[0027] where c represents the number of obstacles traversed by the edges in the routing tree T x , w represents the penalty weight, Len(T x ) is the wire length of T x , and L(e) represents the length of edge e in the routing tree T x ; the definition of related edges is as follows:

[0028] Oseg(A,B) indicates that the edge between pin A and pin B does not pass through any obstacle;

[0029] Dseg(A,B) indicates that the edge between pin A and pin B will pass through at least one obstacle, but obstacle avoidance can be achieved by changing the selection mode of edge AB connection;

[0030] Cseg(A,B) indicates that the edge between pin A and pin B will pass through at least one obstacle, but obstacle avoidance can only be achieved by selecting some corner points from the obstacles;

[0031] ADseg(A,B) represents the edge AB obtained by changing the selection mode of connection between pin A and pin B on the basis of Dseg(A,B) to avoid all obstacles;

[0032] ACseg(A,B) represents the edge AB obtained by adding corner points on the basis of Cseg(A,B) to avoid all obstacles;

[0033] S32. Search update:

[0034] The discretization update formula is as follows:

[0035] 1) Discoverer update formula:

[0036]

[0037] where M represents the mutation operation, C1, C2, and C3 respectively represent the crossover operations performed with the global optimum, the individual historical optimum, and the randomly generated sparrow individual, p i represents the probability that X i performs the global crossover operation when R2<ST, in other cases, the probability of mutation and crossover operations defaults to 1, r is a random number between 0 and 1, CR∈[0,1], j r =randint(1,d) is a random integer from 1 to d, and α is a random number between 2 and 3;

[0038] 2) Participant update formula:

[0039]

[0040] where C4 represents the reverse crossover operation between the individual and the global worst individual, q iIndicates with X w The probability of crossover, C5 represents the crossover between an individual and the discoverer's optimal individual;

[0041] 3) Scout update formula:

[0042]

[0043] Where f g The globally optimal solution X g The fitness value is f. g ≤f i m1 = p i m2 = q i These represent the probabilities of the scout's mutation operation;

[0044] After the search and update are completed, the final global optimal particle of the population is used as the candidate X structure Steiner wiring tree.

[0045] In one embodiment of the present invention, the mutation operation increases the randomness and global search capability of the algorithm by transforming the interconnection between pins. Specifically, two edges are randomly selected from the spanning tree, and PSE transformation and E transformation are performed on these two edges respectively. The PSE transformation operation involves deleting the corresponding edge and randomly generating a new edge to replace it, with the newly generated edge randomly selecting the connection method. The E transformation involves deleting the corresponding edge, retaining its connection method, and randomly generating a new edge using that connection method. After each edge is deleted in the PSE and E transformations, the remaining edges are scanned, and all pins are divided into two sets using a disjoint-set data structure. Then, a pin is randomly selected from each of these two sets to form a newly generated edge, thus forming a new spanning tree.

[0046] The crossover operation includes:

[0047] Forward crossover operator: The forward crossover operation retains the common edges of the two wiring trees and randomly selects the remaining edges to form a new wiring tree. First, all edges are sorted according to the pin numbers in the two wiring trees from smallest to largest. Second, the common edges of the two wiring trees are retained as edges of the new wiring tree after the crossover, and the remaining edges are stored in a set of remaining edges. Finally, edges are randomly selected from the set of remaining edges and added to the new wiring tree until a complete new acyclic wiring tree is formed. During the random edge selection process, a disjoint-set data structure is used to avoid the formation of cycles.

[0048] Reverse crossover operator: The only difference from the forward crossover operator is in the second step, which is to retain the different edges of the two wiring trees as the edges of the new wiring tree after the crossover without forming a cycle, and store the remaining edges in a set of remaining edges.

[0049] In one embodiment of the present invention, step S4 is specifically implemented as follows:

[0050] Since the wiring tree obtained in step S3 may contain two types of illegal edges that violate constraints: Dseg(A,B) and Cseg(A,B), an adjustment strategy is proposed to legalize these two types of illegal edges. The specific implementation steps are as follows:

[0051] S41, Check g based on lookup table best Check whether each edge PQ avoids all obstacles. If so, repeat this step to check the next edge until the last edge. Otherwise, proceed to step S42.

[0052] S42. Check whether edge PQ can be selected by choosing 0 or choosing 1 to achieve obstacle avoidance according to the lookup table. If so, replace the connection method of PQ with the selection method that meets the conditions. Otherwise, delete edge PQ and proceed to step S43.

[0053] S43. Based on the lookup table, list the obstacles B = {B1, B2, ..., B} that edge PQ passes through. n}, calculate the distance D between the centers of P and B = {D i1 D i2 ,…,D in}, and sort B according to the ascending distance of D to obtain B'={B'1,B'2,…,B' n Let the current starting point S = P;

[0054] S44, from B' k Select the corner point closest to line SQ and denote it as C; calculate the connection information of edge SC and add it to the lookup table; based on the criterion that the priority of selection 0 and selection 1 is higher than that of selection 2 and selection 3, determine the final connection method of SC and set S as C; if k = n, then execute step S45, otherwise k = k + 1 and repeat this step;

[0055] S45. Calculate the connection information of SQ and add it to the lookup table, and prioritize selecting 0 or selecting 1 to connect SQ.

[0056] In one embodiment of the present invention, step S5 is specifically implemented as follows:

[0057] S51. Local optimization strategy based on common edges

[0058] 1) Scan g best For each edge, count the degree of each pin and its adjacent pins;

[0059] 2) For each pin P i If P i If the degree is d, then first enumerate P. i All wiring options combinations, i.e., 4 d From these, select the combination with the minimum line length.

[0060] S52, Loop Elimination Strategy

[0061] Let the starting points of the two sides be P1 and P2, and the ending points be P3 and P4, respectively. Based on the position of the intersection point, the intersection problem is divided into two cases: (1) the intersection point is a certain pin; (2) the intersection point is introduced as a Steiner point. For the first case, the problem is eliminated by connecting the pin with other related pins. For the second case, the problem is solved by taking the intersection point as a new Steiner point and connecting the related pins.

[0062] In one embodiment of the present invention, in the newly generated structure, it should be ensured that the new wiring selection combination can maximize the common edge length.

[0063] Compared with the prior art, the present invention has the following advantages: The present invention designs a Steiner minimum tree construction method for obstacle-bypassing X-structure based on discrete sparrow search optimization, which can obtain a wiring scheme that minimizes line length cost while satisfying the constraints. Attached Figure Description

[0064] Figure 1 There are four interconnection methods.

[0065] Figure 2 There are two initial solutions.

[0066] Figure 3 It is a mutation operator.

[0067] Figure 4 It is a positive crossover operator.

[0068] Figure 5 This is the reverse crossover operator.

[0069] Figure 6 To adjust the strategy.

[0070] Figure 7 There are 16 topologies for the 2-degree pin P.

[0071] Figure 8 This is a schematic diagram of a cross loop. Detailed Implementation

[0072] The technical solution of the present invention will now be described in detail with reference to the accompanying drawings.

[0073] This invention provides a method for constructing a Steiner minimum tree for obstacle-avoiding X-structures based on discrete sparrow search optimization, specifically including the following steps:

[0074] 1. Initialization phase: Based on the pin and obstacle location information in the problem model, a lookup table is generated to provide a fast lookup for subsequent steps. The table records the number of obstacles that any two pins pass through after being arbitrarily interconnected.

[0075] 2. Initialization Phase: The population is initialized using a hybrid initialization strategy. The historical best position P of each sparrow is initialized. i, The position g of the optimal sparrow individual best .

[0076] 3. Update Stage Based on Discrete Sparrow Search Optimization: The sparrow search optimization method is discretized by designing discretized crossover and mutation operators, and used for iterative updates of the sparrow population. The globally optimal sparrow individual g is obtained. best As the optimal wiring tree.

[0077] 4. Adjustment phase: Adjusting the obtained g... best Adjustment strategies are applied to any edges that may violate constraints, ensuring that each edge can bypass obstacles.

[0078] 5. Refining Stage: A hybrid refining strategy is applied, combining a local optimization strategy based on common edges with a cycle elimination strategy for g. best Optimize the wiring tree to further improve its quality.

[0079] The following is a detailed implementation process of the present invention.

[0080] 1. X-structure Steiner tree encoding:

[0081] Definition 1: Interconnection Methods. Under the X structure, the interconnection method c is divided into the following four types:

[0082] Definition 1.1 Selection 0. In the selection 0 method, first draw a right-angled side from the starting point to the pseudo-Steiner point, and then draw a non-right-angled side of 45° or 135° from the pseudo-Steiner point to the ending point.

[0083] Figure 1 In this diagram, pin A represents the start point, pin B represents the end point, and point S represents the pseudo-Steiner point. For example... Figure 1 As shown in (a), pin A is connected to point S via a vertical edge, and then connected to pin B via a 45° edge.

[0084] Definition 1.2 Option 1. Option 1: First, draw a non-right-angled side of 45° or 135° from the starting point to the pseudo-Steiner point, and then draw a right-angled side from the pseudo-Steiner point to the ending point.

[0085] like Figure 1 As shown in (b), pin A is connected to point S via a 45° non-right-angled side, and then connected to pin B via a vertical side.

[0086] Definition 1.3 Selection 2. In the selection method, first draw a vertical edge from the starting point to the pseudo Steiner point, and then draw a horizontal edge from the pseudo Steiner point to the ending point.

[0087] like Figure 1 As shown in (c), pin A is connected to point S via a vertical edge, and then connected to pin B via a horizontal edge.

[0088] Definition 1.4 Option 3. Option 3 first draws a horizontal edge of 45° or 135° from the starting point to the pseudo Steiner point, and then draws a vertical edge from the pseudo Steiner point to the ending point.

[0089] like Figure 1 As shown in (d), pin A is connected to point S via the horizontal side, and then connected to pin B via the vertical side.

[0090] This invention designs an edge pair encoding scheme for an X-structure Steiner tree. First, pins and obstacles are assigned numerical numbers according to their order, and then encoded using a numerical string (pqc). n-1 f represents the final Steiner tree, where p is the predecessor node number, q is the successor node number, c represents the connection selection of the edge, n is the number of net pins, and f is the fitness value of the sparrow.

[0091] 2. Preprocessing strategy:

[0092] This invention requires the repeated use of information about wiring edges and obstacles, and repeatedly calculating this information significantly increases the computational load of the algorithm. To avoid repeated calculations in subsequent steps, this invention designs a lookup table composed of associative arrays to store obstacle information traversed by the four connection selection methods between any two pairs of pins. For each pair of pins p and q, the number of obstacles traversed and the obstacle numbers of edge pq after connection via selection method c are calculated, and all this information is recorded in the set {O}. k In the}, the final lookup table is formed.

[0093] 3. Hybrid initialization strategy:

[0094] In swarm intelligence optimization algorithms, the quality and diversity of the initial population significantly impact the algorithm's optimization performance. A high-quality initial population can improve the algorithm's convergence speed and increase its chances of finding the global optimum. Most existing works construct initial solutions based on the minimum spanning tree algorithm, but this method is essentially based on a greedy strategy, i.e., selecting the shortest edge to add to the tree each time. While this strategy can achieve good results, it also limits the algorithm's search range, reduces the diversity of the initial population, and easily leads to the search getting trapped in local optima. Therefore, when applied to solving Steiner trees with obstacle-around-X structures, it cannot guarantee finding a high-quality solution every time. Figure 2 The given example shows, Figure 2 (a) shows the actual optimal XSMT routing connection diagram for 5 pins under two obstacle constraints, while Figure 2 (b) uses the minimum spanning tree algorithm to construct XSMT, and it is not difficult to find that the latter has a higher line length cost than the former.

[0095] To address the above problems, this invention proposes a hybrid initialization strategy, which includes a minimum spanning tree construction method and a minimum spanning tree construction method improved by roulette wheel betting. By employing both initialization strategies, the diversity of the initial population is effectively improved.

[0096] 4. Mutation operation:

[0097] The mutation operation increases the randomness and global search capability of the algorithm by changing the interconnections between pins. The principle of the mutation operation is as follows: Figure 3 As shown. Two edges are randomly selected from the spanning tree, and PSE and E transformations are performed on these two edges respectively. The PSE transformation involves deleting the edge and randomly generating a new edge to replace it, with the newly generated edge randomly selecting its connection method. The E transformation involves deleting the edge, retaining its connection method, and randomly generating a new edge using that connection method. After each edge deletion, the remaining edges are scanned, and all pins are divided into two sets using a disjoint-set data structure. Then, a pin is randomly selected from each of these two sets to form a new edge, thus creating a new spanning tree.

[0098] 5. Positive crossover operator:

[0099] The forward crossover operation preserves the common edges of the two routing trees and randomly selects the remaining edges to form a new routing tree. First, all edges are sorted in ascending order of pin numbers in the two routing trees. Second, the common edges of the two routing trees are retained as edges in the new routing tree after the crossover, and the remaining edges are stored in a set of remaining edges. Finally, edges are randomly selected from the set of remaining edges and added to the new routing tree until a complete new acyclic routing tree is formed. A disjoint-set data structure (union-find) is used during the random edge selection process to avoid cycles. The process of the forward crossover operator is as follows: Figure 4 As shown.

[0100] 6. Reverse crossover operator:

[0101] The difference between the forward crossover operator and the reverse crossover operator lies only in the second step: to retain the different edges of the two wiring trees as edges of the new wiring tree after the crossover, provided that no cycle is formed, and to store the remaining edges in a set of remaining edges. The process of the reverse crossover operator is as follows: Figure 5 As shown.

[0102] 7. Discrete Sparrow Search Optimization Based on Genetic Operations:

[0103] The sparrow search algorithm first divides the population into discoverers and participants according to a fixed ratio based on the sparrows' energy reserves, i.e., their fitness values. Discoverers are primarily responsible for searching for food and guiding other individuals in the search; participants follow the discoverers and compete for food. If a participant finds a better solution than the discoverer during the exploration process, the participant can replace the discoverer. However, the ratio of discoverers to participants remains constant during population iteration. Simultaneously, a certain proportion of individuals in the sparrow population act as scouts, responsible for monitoring their companions and detecting predators, thus improving the population's predation ability and risk prevention capabilities. The sparrow search algorithm searches for the optimal solution to the problem through the simple behavior of the particles themselves and the information interaction of the population, making it an algorithm for solving continuous optimization problems. The sparrow search algorithm has strong search capabilities and is simple to implement, has few parameters, and high scalability. Genetic algorithms, on the other hand, use a set of encoded parameters as the computational object and, through core genetic operations such as mutation and crossover, can effectively solve discrete optimization problems. By combining genetic algorithms with the sparrow search algorithm, this invention proposes a sparrow search optimization method based on genetic operations. The method proposed in this invention has stronger global search capabilities and can effectively solve the discrete problem of constructing a Steiner minimum tree for an obstacle-around X-structure.

[0104] 8. Fitness function design:

[0105] The primary optimization objective of the OAXSMT problem is to optimize the net bus length, while the generated routing tree must satisfy constraints, namely, bypassing obstacles. Therefore, the fitness function formula designed in this invention incorporates both the routing tree bus length and obstacle information, resulting in the following fitness formula:

[0106]

[0107] Where c represents the wiring tree T x The number of obstacles that an edge passes through in the diagram, w represents the penalty weight, Len(T) x ) is T x The line length, L(e), represents T. x The length of edge e. The relevant edges are defined as follows:

[0108] Define 2Oseg(A,B).Oseg(A,B) means that the edge between pin A and pin B does not pass through any obstacles.

[0109] Define 3Dseg(A,B).Dseg(A,B) means that the edge between pin A and pin B will pass through at least one obstacle, but the obstacle can be bypassed by changing the way the edge AB is connected.

[0110] Definition 4 Cseg(A,B). Cseg(A,B) means that the edge between pin A and pin B passes through at least one obstacle, and obstacle avoidance can only be achieved by selecting some corner points from the obstacles.

[0111] Definition 5 ADseg(A,B). ADseg(A,B) refers to the edge AB obtained by changing the connection selection mode of pin A and pin B on the basis of Dseg(A,B) to avoid all obstacles.

[0112] Definition 6 ACseg(A,B). ACseg(A,B) refers to the edge AB obtained by adding corner points on the basis of Cseg(A,B) to avoid all obstacles.

[0113] 9. Search update:

[0114] The specific discretization update formula designed in the present invention is as follows:

[0115] (1) Discoverer update formula:

[0116]

[0117] where M represents the mutation operation, C1, C2, and C3 respectively represent the crossover operations with the global optimum, the individual historical optimum, and the randomly generated sparrow individual, p i represents X i the probability of performing the global crossover operation when R2<ST, while in other cases, the probabilities of the mutation and crossover operations default to 1, r is a random number between 0 and 1, CR∈[0,1], j r =randint(1,d) is a random integer from 1 to d, and α is a random number between 2 and 3.

[0118] (2) Participant update formula:

[0119]

[0120] where C4 represents the reverse crossover operation between the individual and the global worst individual, q i represents the crossover probability with X w , and C5 represents the crossover between the individual and the discoverer optimal individual.

[0121] (3) Scout update formula:

[0122]

[0123] where f g is the fitness value of the global optimal solution X g , with f g ≤f i , m1=p im2 = q i These represent the probabilities of the scout's mutation operation.

[0124] 10. Adjust strategy:

[0125] After the search and update are completed, the final globally optimal particle of the population is used as the candidate X-structure Steiner wiring tree. However, the wiring tree obtained at this time may contain two types of illegal edges that violate the constraints: Dseg(A,B) and Cseg(A,B). To address these two types of illegal edges, this invention proposes an adjustment strategy to legalize them. The specific implementation steps are as follows:

[0126] (1) Check g based on lookup table best Check if each edge PQ avoids all obstacles. If so, repeat this step to check the next edge until the last edge. Otherwise, proceed to step (2).

[0127] (2) Check whether edge PQ can be selected by choosing 0 or choosing 1 to achieve obstacle avoidance according to the lookup table. If so, replace the connection method of PQ with the selection method that meets the conditions. Otherwise, delete edge PQ and then execute step (3).

[0128] (3) List the obstacles B = {B1, B2, ..., B} that edge PQ passes through according to the lookup table. n}, calculate the distance D between the centers of P and B = {D i1 D i2 ,…,D in}, and sort B according to the ascending distance of D to obtain B'={B'1,B'2,…,B' n Let the current starting point S = P.

[0129] (4) From B' k Select the corner point closest to line SQ and denote it as C. Calculate the connection information of edge SC and add it to the lookup table. Based on the criterion that selection 0 and selection 1 have higher priority than selection 2 and selection 3, determine the final connection method of SC and set S as C. If k = n, execute step (5); otherwise, k = k + 1 and repeat this step.

[0130] (5) Calculate the connection information of SQ and add it to the lookup table, and prioritize the connection of SQ using either selection 0 or selection 1.

[0131] The adjustment strategy proposed in this invention is as follows: Figure 6 As shown. It can be observed that... Figure 6 In (a), edge PQ passes through obstacles B1 and B2, and cannot be bypassed by changing the connection selection method. Therefore, this edge belongs to Cseg(A,B), and its adjustment process is as follows: Figure 6 (b)- Figure 6 As shown in (d).

[0132] 11. Hybrid Refining Strategy:

[0133] Because swarm intelligence algorithms and adjustment strategies have a certain degree of randomness, i.e., uncertainty, therefore g best It has a certain error compared to the actual optimal XSMT. Regarding g... best To address certain optimizable topologies in the obtained g, this invention proposes a hybrid refining strategy. best Further optimization will be performed to improve the quality of the final wiring tree.

[0134] (1) Local optimization based on common edges

[0135] by Figure 7 Taking the given 2-degree pin topology diagram as an example, pin P is connected to pins Q and G respectively. Each pair of pins has four possible connections, resulting in a total of 16 topologies. It is easy to see that only the connection method within the dashed box is the optimal local topology. This is because connecting pin P to pins Q and G creates the longest common edge, resulting in the shortest bus length.

[0136] The specific implementation steps of the local optimization strategy based on common edges are as follows:

[0137] 1. Scan g best For each edge, count the degree of each pin and its adjacent pins.

[0138] 2. For each pin P i If P i If the degree is d, then first enumerate P. i All wiring options combinations, i.e., 4 d Choose from a set of combinations, and then select the combination with the shortest line length.

[0139] (2) Loop Elimination Strategy

[0140] like Figure 8 As shown, g best There may be illegal network crossings. Eliminating this structure can further optimize the wire length of the wiring tree. Therefore, this invention proposes a loop elimination strategy to address this problem.

[0141] Let the starting points of the two edges be P1 and P2, and the ending points be P3 and P4, respectively. Based on the location of the intersection point, the intersection problem can be divided into two cases: (1) the intersection point is a pin; (2) the intersection point is a Steiner point. For the first case, the problem is eliminated by connecting the pin with other relevant pins. For the second case, the problem is solved by using the intersection point as a new Steiner point and connecting it with relevant pins. It is worth noting that in the newly generated structure, the new routing selection combination should maximize the length of the common edge.

[0142] The above are preferred embodiments of the present invention. Any changes made to the technical solution of the present invention that do not exceed the scope of the technical solution of the present invention shall fall within the protection scope of the present invention.

Claims

1. A method for constructing a Steiner minimum tree for X-structure obstacle avoidance based on discrete sparrow search optimization, characterized in that, Includes the following steps: S1. Initialization Phase 1: Based on the pin and obstacle location information in the problem model, generate a lookup table to provide a fast lookup for subsequent steps. The lookup table records the number of obstacles passed by any two pins after any interconnection selection. S2. Initialization Phase Two: Initialize the population using a hybrid initialization strategy, initializing the historical best position P of each sparrow. i The position g of the optimal sparrow individual best ; S3. Update Stage Based on Discrete Sparrow Search Optimization: The sparrow search optimization method is discretized by designing discretized crossover and mutation operators, and used for iterative updates of the sparrow population. The globally optimal sparrow individual g is obtained. best As the optimal wiring tree; S4, Adjustment Phase: Adjusting the obtained g best Adjustment strategies are applied to any edges that may violate constraints to ensure that each edge can bypass obstacles. S5, Refining Stage: A hybrid refining strategy is applied, using a local optimization strategy based on common edges and a cycle elimination strategy to refine g. best Optimize; Step S1 is implemented as follows: S11, X-structure Steiner tree encoding: Interconnection methods are defined as follows: Under the X structure, the interconnection method C is divided into the following four types: Option 0: First, draw a right-angled side from the starting point to the pseudo-Steiner point, and then draw a non-right-angled side of 45° or 135° from the pseudo-Steiner point to the ending point; Option 1: First, draw a non-right-angled side of 45° or 135° from the starting point to the pseudo Steiner point, and then draw a right-angled side from the pseudo Steiner point to the ending point; Option 2: First, draw a vertical edge from the starting point to the pseudo-Steiner point, and then draw a horizontal edge from the pseudo-Steiner point to the ending point; Option 3: First, draw a horizontal edge of 45° or 135° from the starting point to the pseudo Steiner point, and then draw a vertical edge from the pseudo Steiner point to the ending point. S12. Design an edge pair encoding scheme for an X-structure Steiner tree: First, assign numerical numbers to the pins and obstacles according to their order, and then encode them using a numerical string (pqC). n-1 f represents the final Steiner tree, where p is the predecessor node number, q is the successor node number, n is the number of net pins, and f is the fitness value of the corresponding sparrow. S13. Design a lookup table consisting of an associative array to store obstacle information for the four connection selection methods between any two pairs of pins; for each pair of pins p and q, calculate the number of obstacles and obstacle numbers traversed by edge pq after connection via selection method C, and record all this information in the set {O}. k In the}, the final lookup table is formed; Step S3 is implemented as follows: Discrete Sparrow Search Optimization Based on Genetic Operations: By combining genetic algorithms with sparrow search algorithms, a sparrow search optimization method based on genetic operations is proposed to solve the discrete problem of constructing a Steiner minimum tree for obstacle-bypassing X-structures. S31. Fitness Function Design: The optimization objective of the X-structure obstacle-bypassing Steiner minimum tree (OAXSMT) problem is to optimize the bus length of the net while simultaneously ensuring that the generated routing tree bypasses obstacles. Therefore, the fitness function formula considers both the bus length of the routing tree and obstacle information, resulting in the following fitness formula: Where c represents the wiring tree T x The number of obstacles that an edge passes through in the diagram, w represents the penalty weight, Len(T) x ) is T x The line length, L(e), represents the wiring tree T. x The length of edge e; the definitions of related edges are as follows: Oseg(A,B) means that the edge between pin A and pin B does not pass through any obstacles; Dseg(A,B) indicates that the edge between pin A and pin B will pass through at least one obstacle, but it is possible to bypass the obstacle by changing the way the edge AB is connected. Cseg(A,B) means that the edge between pin A and pin B will pass through at least one obstacle, but can only bypass the obstacle by selecting some corner points from the obstacle; ADseg(A,B) represents the edge AB obtained by changing the connection method of pin A and pin B based on Dseg(A,B) to avoid all obstacles; ACseg(A,B) represents the edge AB obtained by adding corner points to Cseg(A,B) to avoid all obstacles; S32, Search Update: The discretization update formula is as follows: 1) Discoverer update formula: where M represents a mutation operation, C1, C2, and C3 respectively denote crossover operations performed with the global optimum, the individual historical optimum, and a randomly generated sparrow individual, p i represents X i the probability of performing the global crossover operation when R2<ST, in other cases, the probabilities of the mutation and crossover operations default to 1, r is a random number between 0 and 1, CR∈[0, 1], j r =randint(1, d) is a random integer from 1 to d, and α is a random number between 2 and 3; 2) Participant update formula: Where C4 represents the reverse crossover operation between the individual and the worst-performing individual globally, q i Indicates with X w The probability of crossover, C5 represents the crossover between an individual and the discoverer's optimal individual; 3) Scout update formula: Where f g The globally optimal solution X g The fitness value is f. g ≤f i m1=p i m2=q i These represent the probabilities of the scout's mutation operation; After the search and update are completed, the final global optimal particle of the population is used as the candidate X structure Steiner wiring tree.

2. The method for constructing an X-structure obstacle-bypassing Steiner minimum tree based on discrete sparrow search optimization according to claim 1, characterized in that, In step S2, the hybrid initialization strategy includes a minimum spanning tree construction method and a minimum spanning tree construction method improved by roulette wheel betting.

3. The method for constructing an X-structure obstacle-bypassing Steiner minimum tree based on discrete sparrow search optimization according to claim 1, characterized in that, The mutation operation increases the randomness and global search capability of the algorithm by transforming the interconnections between pins. Specifically, it randomly selects two edges from the spanning tree and performs PSE and E transformations on these two edges respectively. The PSE transformation involves deleting the corresponding edge and randomly generating a new edge to replace it, with the newly generated edge randomly selecting a connection method. The E transformation involves deleting the corresponding edge, retaining its connection method, and using that connection method to randomly generate a new edge. After each edge is deleted in the PSE and E transformations, the remaining edges are scanned, and all pins are divided into two sets using a disjoint-set data structure. Then, a pin is randomly selected from each of these two sets to form a newly generated edge, thus forming a new spanning tree. The crossover operation includes: Forward crossover operator: The forward crossover operation retains the common edges of the two wiring trees and randomly selects the remaining edges to form a new wiring tree. First, all edges are sorted according to the pin numbers in the two wiring trees from smallest to largest. Second, the common edges of the two wiring trees are retained as edges of the new wiring tree after the crossover, and the remaining edges are stored in a set of remaining edges. Finally, edges are randomly selected from the set of remaining edges and added to the new wiring tree until a complete new acyclic wiring tree is formed. During the random edge selection process, a disjoint-set data structure is used to avoid the formation of cycles. Reverse crossover operator: The only difference from the forward crossover operator is in the second step, which is to retain the different edges of the two wiring trees as the edges of the new wiring tree after the crossover without forming a cycle, and store the remaining edges in a set of remaining edges.

4. The method for constructing an X-structure obstacle-bypassing Steiner minimum tree based on discrete sparrow search optimization according to claim 1, characterized in that, Step S4 is implemented as follows: Since the wiring tree obtained in step S3 may contain two types of illegal edges that violate constraints: Dseg(A,B) and Cseg(A,B), an adjustment strategy is proposed to legalize these two types of illegal edges. The specific implementation steps are as follows: S41, Check g based on lookup table best Check whether each edge PQ avoids all obstacles. If so, repeat this step to check the next edge until the last edge. Otherwise, proceed to step S42. S42. Check whether edge PQ can be selected by choosing 0 or choosing 1 to achieve obstacle avoidance according to the lookup table. If so, replace the connection method of PQ with the selection method that meets the conditions. Otherwise, delete edge PQ and proceed to step S43. S43. Based on the lookup table, list the obstacles B = {B1, B2, ..., B} that edge PQ passes through. n }, calculate the distance D between the centers of P and B = {D i1 D i2 , …, D in }, and sort B according to the ascending distance of D to obtain B'={B'1, B'2, …, B'} n Let the current starting point S = P; S44, from B' k Select the corner point closest to line SQ and denote it as C; calculate the connection information of edge SC and add it to the lookup table; based on the criterion that the priority of selection 0 and selection 1 is higher than that of selection 2 and selection 3, determine the final connection method of SC and set S as C; if k=n, execute step S45, otherwise k=k+1 and repeat this step. S45. Calculate the connection information of SQ and add it to the lookup table, and prioritize selecting 0 or selecting 1 to connect SQ.

5. The method for constructing an X-structure obstacle-bypassing Steiner minimum tree based on discrete sparrow search optimization according to claim 4, characterized in that, Step S5 is implemented as follows: S51. Local optimization strategy based on common edges 1) Scan g best For each edge, count the degree of each pin and its adjacent pins; 2) For each pin P i If P i If the degree is d, then first enumerate P. i All wiring options combinations, i.e., 4 d From these, select the combination with the minimum line length. S52, Loop Elimination Strategy Let the starting points of the two sides be P1 and P2, and the ending points be P3 and P4, respectively. Based on the position of the intersection point, the intersection problem is divided into two cases: (1) the intersection point is a certain pin; (2) the intersection point is introduced as a Steiner point. For the first case, the problem is eliminated by connecting the pin with other related pins. For the second case, the problem is solved by taking the intersection point as a new Steiner point and connecting the related pins.

6. The method for constructing an X-structure obstacle-bypassing Steiner minimum tree based on discrete sparrow search optimization according to claim 5, characterized in that, In the newly generated structure, it should be ensured that the new routing selection combination can maximize the length of the common edge.