Construction method of length-limited x-structure steiner minimum tree based on social learning discrete sparrow search

CN117350239BActive Publication Date: 2026-11-03FUZHOU UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311466198.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-07
Publication Date
2026-11-03
Estimated Expiration
2043-11-07

AI Technical Summary

Technical Problem

Existing wiring methods struggle to effectively avoid obstacles in the device layer or lower metal layer when constructing a Steiner minimum tree. Furthermore, the continuous length within the obstacle area exceeds the maximum length of the repeater, leading to signal distortion. Moreover, existing methods are inefficient when handling complex constraints.

Method used

We employ a length-constrained X-structure Steiner minimum tree construction method based on social learning discrete sparrow search. This method optimizes the wiring tree to meet obstacle constraints and minimize line length through preprocessing to generate a lookup table, initialization strategy, social learning discrete sparrow search optimization, adjustment, and multi-strategy hybrid refinement.

Benefits of technology

Under obstacle constraints, the wiring scheme significantly reduces the cost of wire length, improves the quality and efficiency of Steiner trees and wiring, enhances global search capabilities, and avoids signal distortion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117350239B_ABST
    Figure CN117350239B_ABST
Patent Text Reader

Abstract

The application discloses a length-limited X-structure Steiner minimum tree construction method based on social learning discrete sparrow search, mainly including the following three effective strategies: (1) improving the sparrow search method through a social learning mechanism; (2) optimizing the sparrow search method through parameter dynamic adjustment; and (3) modifying and adjusting the obtained Steiner tree through a loop-elimination strategy and a sharp-angle-elimination optimization scheme, so as to reduce the extra line length cost caused and further improve 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 a length-restricted X-architecture Steiner Minimum Tree (LRXSMT). Background Technology

[0002] With the continuous advancement of manufacturing processes in recent years, transistor gate widths have reached the molecular and atomic levels, and the feature sizes of components on chips have drastically decreased. The latency introduced by interconnects affects the timing, power consumption, and cost of chips. This necessitates reducing interconnect lengths in VLSI physical design to minimize latency and improve chip performance. Optimization objectives in placement problems often include net bus length and total latency. Furthermore, the quality of the results generated during the placement phase significantly impacts the quality of the final detailed routing results. Therefore, after placement, it is often necessary to estimate the wire length to evaluate the merits of the placement scheme. In routing problems, the net bus length has a significant impact on signal transmission latency. Because the Steiner minimum tree has strong optimization capabilities regarding wire length, it is widely used in placement and routing problems.

[0003] On the other hand, the increasing integration of chips leads to a continuous increase in the number of components and modules on the chip. In actual routing, it is necessary to avoid overlap between nets and these components, making the obstacle-avoiding Steiner tree problem a research hotspot. In current physical designs, these obstacles often only occupy the device layer or lower metal layers, so routing often does not completely block the wiring. By allowing the wiring to pass through obstacles to a certain extent, the Steiner tree can be further optimized compared to the complete obstacle-avoiding scenario. However, signal distortion occurs after propagating a certain distance in the wire, requiring the use of repeaters to regenerate the signal. But repeaters cannot be placed within the aforementioned obstacle area. Therefore, the continuous length of the wire within the obstacle area must be less than the maximum repeater length, where the maximum repeater length is the maximum wire length that can be achieved after signal regeneration before distortion. This problem is known as the Length-Restricted Steiner Minimum Tree (LRSMT) 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] As the scale of the routing problem continues to grow and the constraints become increasingly complex, such as avoiding obstacles like IP blocks, constructing a Steiner minimum tree becomes more difficult. However, in current physical designs, these obstacles often only occupy the device layer or lower metal layers, thus not completely blocking routing during the process. Most existing routing methods are designed for obstacle-free or obstacle-bypass scenarios. By allowing routing to pass through obstacles to a certain extent, the final Steiner minimum tree can be further optimized compared to the complete obstacle-bypass scenario. Considering the unique advantages of the X-structure in routing problems and the promising application of sparrow search optimization in solving NP-hard problems, this invention proposes a length-constrained X-structure Steiner minimum tree construction method based on social learning discrete sparrow search.

[0006] This method mainly includes the following three effective strategies: (1) improving the sparrow search method through a social learning mechanism; (2) optimizing the sparrow search method through dynamic parameter adjustment; and (3) correcting and adjusting the obtained Steiner tree through a loop elimination strategy and an acute angle elimination optimization scheme, thereby reducing the additional line length cost and further improving the quality of the final Steiner tree. It can obtain a routing scheme that minimizes line length cost while satisfying the constraints.

[0007] The solution adopted in this invention includes the following steps:

[0008] 1. Preprocessing stage: 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.

[0009] 2. Initialization Phase: Initialization strategies are applied to initialize the population. The historical best position P of each sparrow is initialized. i The position g of the optimal sparrow individual best .

[0010] 3. Update Stage of Discrete Sparrow Search Optimization Based on Social Learning: The sparrow population is iteratively updated using a discretized sparrow search optimization method that incorporates a social learning mechanism, and the globally optimal sparrow individual g is obtained. best As the optimal wiring tree.

[0011] 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.

[0012] 5. Multi-strategy hybrid refining stage: Multiple hybrid refining strategies are applied, including local optimization based on common edges, cycle elimination strategies, and acute angle elimination strategies, to refine g. best Optimize and further improve the quality of the wiring tree.

[0013] To achieve the above objectives, the present invention specifically adopts the following technical solution:

[0014] A method for constructing a length-constrained X-structure Steiner minimum tree based on discrete sparrow search using social learning, characterized by:

[0015] Includes the following steps:

[0016] Step S1: Preprocessing stage: Based on the pin and obstacle position information, generate a lookup table to provide a fast lookup for subsequent steps. The table records the number of obstacles passed by any two pins after any interconnection selection.

[0017] Step S2: Initialization Phase: Initialize the population using the initialization strategy; initialize the historical best position P of each sparrow. i The position g of the optimal sparrow individual best ;

[0018] Step S3: Update stage of discrete sparrow search optimization based on social learning: The sparrow population is iteratively updated by introducing a discretized sparrow search optimization method with a social learning mechanism, and the globally optimal sparrow individual g is obtained. best As the optimal wiring tree;

[0019] Step S4: Adjustment Phase: For the obtained g best Adjustment strategies are applied to edges that may violate constraints to ensure that each edge can bypass obstacles;

[0020] Step S5: Multi-strategy hybrid refining stage: Apply multiple hybrid refining strategies, including local optimization based on common edges, cycle elimination strategy, and acute angle elimination strategy, to refine g. best Optimize to further improve the quality of the cabling tree.

[0021] Furthermore, in step S1, the following edge pair encoding scheme of the X-structure Steiner tree is adopted: first, the pins and obstacles are assigned numerical numbers according to the order, and then the numerical string (pqc) is used. 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, that is, the bus length of the wiring tree represented by the sparrow.

[0022] A lookup table composed of associative arrays is used to speed up calculations in subsequent steps by pre-calculating relevant information for each pin under different connection selection methods: For each pair of pins p and q, the number of obstacles and obstacle numbers traversed by edge pq after connection via selection method c are calculated, and all information is recorded in set {O}. k In the}, the final lookup table is formed.

[0023] Furthermore, in step S2, the initialization strategies employed include a minimum spanning tree construction method and a random wiring tree construction method; by combining the two initialization strategies, the diversity of the initial population is improved.

[0024] Furthermore, in step S3, the discretized sparrow search optimization method incorporating a social learning mechanism includes:

[0025] The fitness function formula used takes into account both the bus length of the wiring tree and obstacle information, specifically:

[0026]

[0027]

[0028] Where c represents individual sparrow X i The number of obstacles that an edge in the wiring tree passes through, where n is the total number of pins in the net, and Length(X) i L1(e) represents the length of the sparrow's bus, and L1(e) represents X. i The length of edge e is defined as follows: L2(e) represents the length of edge e after legalization by changing the selection method, and L3(e) represents the length of edge e after legalization by introducing obstacle corner points; the relevant edges are defined as follows:

[0029] Oseg(X i ) represents Sparrow X i The edges that satisfy the maximum conductor length constraint;

[0030] Dseg(X i ) represents Sparrow X i Edges that do not meet the maximum wire length constraint can be made legal by changing the pin connection selection method.

[0031] Cseg(X i ) represents Sparrow X i Edges that do not meet the maximum wire length constraint and cannot be made legal by changing the pin connection selection method must be transformed into legal edges by introducing certain obstacle corners;

[0032] Two dynamic parameter adjustment strategies were employed to regulate the number of discoverers and scouts in the population.

[0033] Number of discoverers N p The settings are as follows:

[0034]

[0035] Np max =0.3N

[0036] Np min =0.15N

[0037] Where t is the current iteration number, t max The maximum number of iterations for the algorithm is N, where N is the total number of populations.

[0038] Number of scouts N c The settings are as follows:

[0039]

[0040] The discretization update formula used is as follows:

[0041] (1) Discoverer update formula:

[0042]

[0043]

[0044] Where M represents the mutation operation, C1, C2, and C3 represent forward learning from the globally optimal sparrow, forward learning from the individual's historical best, and forward learning from a randomly generated sparrow, respectively, and p1 represents X. i The probability of positive learning, p2 represents X. i The probability of performing a mutation operation, where R is a random number between 0 and 1, and CR p ∈[0,1], where α is a random number between 2 and 3;

[0045] (2) Participant update formula:

[0046]

[0047]

[0048] Where C4 represents individual X i Learning positively from the historical experience of randomly better discoverers, C5 represents individual X. i Learning backwards from the worst-performing individual globally; q1 represents X i The probability of performing forward or backward learning, q2 represents X. i The probability of performing a mutation operation, where R is a random number between 0 and 1, and CR s∈[0,1], where α is a random number between 2 and 3;

[0049] (3) Scout update formula:

[0050]

[0051] Where f g The globally optimal solution X g The fitness value is f. g ≤f i CR is the coefficient of variation, which determines the probability that a scout located at the center of the population will adopt a different update strategy. p1 and q1 are the probabilities of the scout performing forward learning, p2 is the scout's mutation probability, and q2 is the scout's probability of performing backward learning.

[0052] Furthermore, in step S4, it is considered that the obtained wiring tree may contain Dseg(X) i ) and Cseg(X i Two types of illegal edges that violate constraints are identified; an adjustment strategy is adopted to legalize them. The specific implementation steps are as follows:

[0053] (1) Check g based on lookup table best Check if each edge PQ in the algorithm is a valid edge; if so, repeat this step to check the next edge until the last edge; otherwise, proceed to step (2).

[0054] (2) Check whether edge PQ can be legalized by selecting 0 or selecting 1 according to the lookup table; if so, replace the connection method of PQ with the connection selection method that meets the conditions and return to step (1); otherwise delete edge PQ and go to step (3);

[0055] (3) List the relevant obstacles B = {B1, B2, ..., B} that are crossed by edge PQ and whose continuous lengths within the obstacle violate the constraint, based on the lookup table. n}, calculate P and B i The distance between centers D = {D i1 D i2 ,…,D in}, and sort B in ascending order according to D to obtain B' = {B'1, B'2, ..., B'} n Let the current starting point S = P;

[0056] (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 principle 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, go to step (5); otherwise, k = k + 1 and repeat step (4).

[0057] (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.

[0058] Furthermore, in step S5, the hybrid refining strategy specifically includes:

[0059] (1) Local optimization strategy based on common edges

[0060] The specific implementation steps are as follows:

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

[0062] 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 minimum line length.

[0063] (2) Loop Elimination Strategy

[0064] Let the starting points of the two sides be P1 and P2, and the ending points be P3 and P4, respectively. According to 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, it is solved by connecting the pin with other related pins, while for the second case, it is solved by taking the intersection point as a new Steiner point and connecting the related pins. In the newly generated structure, it should be ensured that the new routing selection combination can maximize the length of the common edge line.

[0065] (3) Acute Angle Elimination Strategy

[0066] This includes elimination strategies based on edge replacement and elimination strategies based on Steiner points:

[0067] The edge replacement-based elimination strategy eliminates acute angles in the wiring tree by enumerating different edge combinations, thereby further optimizing the line length.

[0068] The Steiner point-based elimination strategy calculates Fermat points and incorporates them as Steiner points, then selects the connection method to eliminate acute angles.

[0069] Compared with existing technologies, this invention and its preferred solutions mainly include the following three effective strategies: (1) improving the sparrow search method through a social learning mechanism; (2) optimizing the sparrow search method through dynamic parameter adjustment; and (3) correcting and adjusting the obtained Steiner tree through a loop elimination strategy and an acute angle elimination optimization scheme, thereby reducing the additional line length cost and further improving the quality of the final Steiner tree. It can obtain a routing scheme that minimizes line length cost while satisfying constraints. Attached Figure Description

[0070] Figure 1 These are schematic diagrams illustrating four interconnection methods according to embodiments of the present invention;

[0071] Figure 2 This is a schematic diagram of the mutation operator in an embodiment of the present invention;

[0072] Figure 3 This is a schematic diagram of the forward crossover operator in an embodiment of the present invention;

[0073] Figure 4 This is a schematic diagram of the reverse crossover operator in an embodiment of the present invention;

[0074] Figure 5 This is a schematic diagram illustrating the adjustment strategy in an embodiment of the present invention;

[0075] Figure 6 This is a schematic diagram of 16 topological structures for pin P in Embodiment 2 of the present invention;

[0076] Figure 7 This is a schematic diagram of a cross loop according to an embodiment of the present invention;

[0077] Figure 8 This is a schematic diagram of local refinement based on common edges in an embodiment of the present invention;

[0078] Figure 9 This is a schematic diagram of acute angle elimination and refinement based on edge replacement in an embodiment of the present invention;

[0079] Figure 10 This is a schematic diagram of acute angle elimination and refining based on Steiner points in an embodiment of the present invention. Detailed Implementation

[0080] To make the features and advantages of this patent more apparent and understandable, specific embodiments are provided below for detailed explanation:

[0081] It should be noted that the following detailed descriptions are illustrative and intended to provide further explanation of this application. Unless otherwise specified, all technical and scientific terms used in this specification have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains.

[0082] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the exemplary embodiments according to this application. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.

[0083] The present invention will be further described below with reference to specific embodiments:

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

[0085] Definition 1: Right-angled side. In an X-structure, the side in the wiring tree where the routing direction is horizontal or vertical is called a right-angled side.

[0086] Definition 2: Non-right-angled side. In the X structure, the hypotenuse with a routing direction of 45° or 135° in the wiring tree is called a non-right-angled side.

[0087] Define 3 pseudo-Steiner points. Endpoints other than pins are called pseudo-Steiner points, such as... Figure 1 PS point in the middle.

[0088] Definition 4. Connection Selection. Under the X architecture, the connection selection c of interconnects is divided into the following four types:

[0089] Definition 4.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.

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

[0091] Definition 4.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.

[0092] like Figure 1 As shown in (b), pin P1 is connected to point PS via a 45° non-right-angled side, and then connected to pin P2 via a vertical side.

[0093] Definition 4.3 Option 2. Option 2 first draws a vertical edge from the starting point to the pseudo Steiner point, and then draws a horizontal edge from the pseudo Steiner point to the ending point.

[0094] like Figure 1 As shown in (c), pin P1 is connected to point PS via a vertical edge, and then connected to pin P2 via a horizontal edge.

[0095] Definition 4.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.

[0096] like Figure 1 As shown in (d), pin P1 is connected to point PS via the horizontal side, and then connected to pin P2 via the vertical side.

[0097] 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, i.e., the bus length of the wiring tree represented by the sparrow.

[0098] 2. Preprocessing strategy:

[0099] Since calculating the fitness of each sparrow requires considering not only the XSMT bus length it represents but also the legality of its routing edges, recalculating the obstacle crossings for each edge in subsequent steps would result in numerous redundant calculations, severely impacting efficiency. Therefore, to avoid redundant calculations, this invention designs a lookup table composed of associative arrays. This table pre-calculates relevant information for each pin under different connection selection methods to accelerate calculations in subsequent steps. For each pair of pins p and q, the number of obstacles traversed and the obstacle numbers after edge pq is connected 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.

[0100] 3. Initialization strategy:

[0101] The quality and diversity of the initial population have a significant impact on the optimization performance of swarm intelligence optimization methods. A high-quality initial population can improve the convergence speed of swarm intelligence optimization methods and increase the chances of finding the global optimum. Most existing related works are based on the minimum spanning tree algorithm to construct the initial solution, but this method is essentially based on a greedy strategy, that is, selecting the shortest edge to add to the tree each time. Although this strategy can achieve good results, it also limits the search range, reduces the diversity of the initial population, and easily leads to swarm intelligence optimization methods getting trapped in local optima.

[0102] To address the above problems, this invention proposes an initialization strategy, which includes a method for constructing a minimum spanning tree and a method for constructing a randomly generated wiring tree. By combining the two initialization strategies, the diversity of the initial population is improved.

[0103] 4. Mutation operation:

[0104] In the mutation operator, two edges are randomly selected from the spanning tree and PSE and E transformations are performed on these two edges respectively.

[0105] like Figure 2 As shown, Figure 2 (a) The middle edge P2P41 was obtained through E transformation. Figure 2 In (b), edge P1 P41, and Figure 2 (a) The middle edge P2P13 was obtained through the PS+E transformation. Figure 2 In (b), edge P2P31. The PS transformation changes the connection method of the two pins of the edge, while the E transformation changes the connection method of the two pins of the edge. During the transformation process, after each edge is deleted, all pins are divided into two sets using a disjoint-set data structure. Then, pins are randomly selected from these two sets to ensure that a new spanning tree is formed.

[0106] 5. Forward learning operators:

[0107] The forward learning operator is used to learn from the superior experiences of better sparrows. The update process of this operator is as follows: Consider the tree X represented by the two sparrows. i With X j The common edges of the two trees are merged and added to set S1, and the remaining edges are stored in the remaining edge set S2. Edges are randomly selected from set S2 and added to set S1, until set S1 forms a complete new acyclic wiring tree. This acyclic wiring tree is the new wiring tree generated through forward learning. The process of the forward learning operator is as follows: Figure 3 As shown.

[0108] 6. Reverse crossover operator:

[0109] The reverse learning operator improves the fitness of sparrows by learning from each poorly performing sparrow and changing potential poor edges. The update process of this operator is as follows: Consider the tree X represented by two sparrows. i With X j , will X i Zhong and X j Different edges are added to set S1, and the remaining edges are stored in set S2. Edges are randomly selected from set S2 and added to set S1 until set S1 forms a complete new acyclic wiring tree. This acyclic wiring tree is the new wiring tree generated through back-learning. The operation process of the back-learning operator is as follows: Figure 4 As shown.

[0110] 7. Optimization of Discrete Sparrow Search Based on Social Learning:

[0111] The sparrow search algorithm first divides the population into discoverers and participants based on the sparrows' energy reserves, i.e., their fitness values, at a fixed ratio. 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. 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 capabilities and risk prevention abilities.

[0112] The Sparrow Search algorithm searches for the optimal solution to a problem through the simple behavior of particles and the information interaction of the population. It is an algorithm for solving continuous optimization problems. The Sparrow Search algorithm has strong search capabilities and is simple to implement, has few parameters, and is highly scalable. To improve the diversity of learning objects for the sparrows, this embodiment introduces the concept of social learning into the sparrow search optimization process. This expands the learning object range of the followers from a single optimal discoverer to the excellent historical experiences of more discoverers, thereby increasing the diversity of learning objects and enhancing the algorithm's search capabilities. The method proposed in this invention has stronger global search capabilities and can effectively solve the discrete problem of constructing a length-constrained X-structure Steiner minimum tree.

[0113] 8. Fitness function design:

[0114] The primary optimization objective of the LRXSMT problem is the bus length of the net, while the generated routing tree must satisfy constraints, specifically the length constraint within obstacles. Therefore, the fitness function formula designed in this invention considers both the bus length of the routing tree and obstacle information, resulting in the following fitness formula:

[0115]

[0116] Where c represents individual sparrow X i The number of obstacles that an edge in the wiring tree passes through, where n is the total number of pins in the net, and Length(X) i L1(e) represents the length of the sparrow's bus, and L1(e) represents X. i Let L2(e) represent the length of edge e after legalization by changing the selection method, and L3(e) represent the length of edge e after legalization by introducing obstacle corner points. The relevant edges are defined as follows:

[0117] Define 5Oseg(X) i ).Oseg(X i ) represents Sparrow X i The edges that satisfy the maximum conductor length constraint.

[0118] Define 6Dseg(X) i ).Dseg(X i ) represents Sparrow X i Edges that do not meet the maximum wire length constraint can be made legal by changing the pin connection selection method.

[0119] Define 7Cseg(X) i ).Cseg(X i ) represents Sparrow X i Edges that do not meet the maximum wire length constraint and cannot be made legal by changing the pin connection selection method must be transformed into legal edges by introducing certain obstacle corners.

[0120] 9. Dynamic parameter adjustment

[0121] Considering that the algorithm requires strong exploration capabilities in the early stages to avoid getting trapped in local optima, and strong development capabilities in the later stages to improve the quality of the solution, this embodiment of the algorithm, based on the parameter adjustment experience of previous work, designs two dynamic parameter adjustment strategies to adjust the number of discoverers and scouts in the population.

[0122] Number of discoverers N p The settings are as shown in the formula:

[0123]

[0124] Where t is the current iteration number, t max is the maximum number of iterations for the algorithm, and N is the total number of populations.

[0125] Number of scouts N c The settings are as shown in the formula:

[0126]

[0127] 10. Search Update:

[0128] The specific discretization update formula designed in this invention is as follows:

[0129] (1) Discoverer update formula:

[0130]

[0131] Where M represents the mutation operation, C1, C2, and C3 represent forward learning from the globally optimal sparrow, forward learning from the individual's historical best, and forward learning from a randomly generated sparrow, respectively, and p1 represents X. i The probability of positive learning, p2 represents X. iThe probability of performing a mutation operation, where R is a random number between 0 and 1, and CR p ∈[0,1], where α is a random number between 2 and 3.

[0132] (2) Participant update formula:

[0133]

[0134] Where C4 represents individual X i Learning positively from the historical experience of randomly better discoverers, C5 represents individual X. i Learn backwards from the worst-performing individual globally. q1 represents X. i The probability of performing forward or backward learning, q2 represents X. i The probability of performing a mutation operation, where R is a random number between 0 and 1, and CR s ∈[0,1], where α is a random number between 2 and 3.

[0135] (3) Scout update formula:

[0136]

[0137] Where f g The globally optimal solution X g The fitness value is f. g ≤f i CR is the coefficient of variation, which determines the probability that a scout located at the center of the population will adopt a different update strategy. p1 and q1 are the probabilities of the scout performing forward learning, p2 is the scout's mutation probability, and q2 is the scout's probability of performing backward learning.

[0138] 10. Adjust strategy:

[0139] After the search and update are complete, the final globally optimal particle obtained is used as the candidate X-structure Steiner wiring tree. However, the wiring tree obtained at this point may contain Dseg(X) i ) and Cseg(X i There are two types of illegal edges that violate constraints. For these two types of legal edges, this invention proposes an adjustment strategy to legalize them. The specific implementation steps are as follows:

[0140] (1) Check g based on lookup table best Check if each edge PQ in the array is a valid edge. If it is, repeat this step to check the next edge until the last edge; otherwise, proceed to step (2).

[0141] (2) Check whether edge PQ can be legalized by selecting 0 or 1 according to the lookup table. If yes, replace the connection method of PQ with the connection selection method that meets the conditions and return to step (1); otherwise, delete edge PQ and go to step (3).

[0142] (3) List the relevant obstacles B = {B1, B2, ..., B} that are crossed by edge PQ and whose continuous lengths within the obstacle violate the constraint, based on the lookup table. n}, calculate P and B i The distance between centers D = {D i1 D i2 ,…,D in}, and sort B in ascending order according to D to obtain B' = {B'1, B'2, ..., B'} n Let the current starting point S = P.

[0143] (4) From B' k Select the corner point closest to line SQ, denoted 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, go to step (5); otherwise, k = k + 1 and repeat step (4).

[0144] (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.

[0145] The adjustment strategy proposed in this invention is as follows: Figure 5 As shown. Figure 5 (a) shows the connection diagram of pins P and Q passing through obstacles B1 and B2. From Figure 5 (b)- Figure 5 (d) It can be seen that edge PQ belongs to Cseg(X) i Therefore, edge PQ is deleted, and the final g is generated by adding corner points C1 and C2 through steps (2)-(5). best .

[0146] 11. Hybrid Refining Strategy:

[0147] Because swarm intelligence algorithms and adjustment strategies have a certain degree of randomness, i.e., uncertainty, therefore g best There is often a certain error compared to the actual optimal LRXSMT. Regarding g... best Based on certain optimizable topologies existing in the obtained g, this invention proposes a hybrid refining strategy that can optimize the obtained g. best Further optimization will be performed to improve the quality of the final wiring tree.

[0148] (1) Local optimization strategy based on common edges

[0149] In corner selection strategies, prioritizing connection methods 0 and 1 might be optimal for both ends of the network. However, when considering several wiring paths within a local area, the optimization of line length due to common edges needs to be considered. Figure 6 Taking the given schematic diagram of the 2-degree pin topology as an example, the 2-degree pin P in the figure may have 16 topologies, among which the length of the common side is different under different structures, and only one case is the optimal structure.

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

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

[0152] 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.

[0153] (2) Loop Elimination Strategy

[0154] like Figure 7 As shown, at this time g best The corresponding tree encoding is 121253532340. It can be observed that edges 121 and 340 form a loop in this wiring tree, but this problem is not apparent from the tree encoding perspective. Eliminating this structure can further optimize the line length of the wiring tree. Therefore, this invention proposes a loop elimination strategy to optimize this type of local topology.

[0155] 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 example... Figure 8 The first case shown in (a) can be resolved by connecting this pin with other relevant pins, ultimately yielding... Figure 8 (c). And for example... Figure 8 The second case shown in (b) is solved by using the intersection point as the new Steiner point and connecting the relevant pins, ultimately obtaining... Figure 8 (d). It is worth noting that in the newly generated structure, the new routing selection combination should be ensured to maximize the length of the common edge.

[0156] (3) Acute Angle Elimination Strategy

[0157] The optimal solution g obtained by the above process bestThere may be some wiring paths that form a 45° angle. Considering that this structure cannot meet the constraints in actual production, and that this structure can be further optimized in terms of final line length after certain adjustments, this invention proposes two acute angle elimination strategies: an elimination strategy based on edge replacement and an elimination strategy based on Steiner points.

[0158] Elimination strategies based on edge replacement, such as Figure 9 As shown, by enumerating different edge combinations, when the selected edges are 11 and 322, the acute angles in the wiring tree are eliminated, and the line length is further optimized.

[0159] Elimination strategies based on Steiner points, such as... Figure 10 As shown, in Figure 10 Based on (a), calculate the Fermat point and introduce the Fermat point P4 as the Steiner point. By selecting an appropriate connection method, the 45° angle can be eliminated.

[0160] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention in any other way. Any person skilled in the art may make changes or modifications to the above-disclosed technical content to create equivalent embodiments. However, any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the protection scope of the present invention.

[0161] This patent is not limited to the above-described preferred implementation method. Anyone can derive other forms of Steiner minimum tree construction methods based on length-constrained X-structures of discrete sparrow search using social learning under the guidance of this patent. All equivalent changes and modifications made within the scope of this patent application shall fall within the scope of this patent.

Claims

1. A method for constructing a length-constrained X-structure Steiner minimum tree based on discrete sparrow search using social learning, characterized in that: Includes the following steps: Step S1: Preprocessing stage: Based on the pin and obstacle position information, generate a lookup table to provide fast lookup for subsequent steps. The table records the number of obstacles passed by any two pins after using any interconnection selection. Step S2: Initialization Phase: Initialize the population using the initialization strategy; initialize the historical best position P of each sparrow. i, The position g of the optimal sparrow individual best ; Step S3: Update stage of discrete sparrow search optimization based on social learning: The sparrow population is iteratively updated by introducing a discretized sparrow search optimization method with a social learning mechanism, and the globally optimal sparrow individual g is obtained. best As the optimal wiring tree; Step S4: Adjustment Phase: For the obtained g best Adjustment strategies are applied to edges that may violate constraints to ensure that each edge can bypass obstacles; Step S5: Multi-strategy hybrid refining stage: Apply multiple hybrid refining strategies, including local optimization based on common edges, cycle elimination strategy, and acute angle elimination strategy, to refine g. best Optimize to further improve the quality of the cabling tree; In step S3, the discretized sparrow search optimization method incorporating a social learning mechanism includes: The fitness function formula used takes into account both the bus length of the wiring tree and obstacle information, specifically: Where c represents individual sparrow X i The number of obstacles that an edge in the represented wiring tree passes through, where n is the total number of pins in the net, and Length(X) i L1(e) represents the bus length of the sparrow, and L1(e) represents X. i Let L2(e) represent the length of edge e after legalization by changing the selection method, and L3(e) represent the length of edge e after legalization by introducing obstacle corner points; the relevant edges are defined as follows: Oseg(X i ) represents Sparrow X i The edges that satisfy the maximum conductor length constraint; Dseg(X i ) represents Sparrow X i Edges that do not meet the maximum wire length constraint can be made legal edges by changing the pin connection selection method; Cseg(X i ) represents Sparrow X i Edges that do not meet the maximum wire length constraint and cannot be made legal by changing the pin connection selection method must be transformed into legal edges by introducing certain obstacle corners. Two dynamic parameter adjustment strategies were employed to regulate the number of discoverers and scouts in the population. The number of discoverers, Np, is set as follows: Where t is the current iteration number, t max The maximum number of iterations for the algorithm is N, where N is the total number of populations. The number of scouts, Nc, is set as follows: The discretization update formula used is as follows: (1) Discoverer update formula: Where M represents the mutation operation, C1, C2, and C3 represent forward learning from the globally optimal sparrow, forward learning from the individual's historical best, and forward learning from a randomly generated sparrow, respectively, and p1 represents X. i The probability of positive learning, p2 represents X. i The probability of performing a mutation operation, where R is a random number between 0 and 1, and CR p ∈[0, 1], where α is a random number between 2 and 3; (2) Participant update formula: Where C4 represents individual X i Learning positively from the historical experience of randomly better discoverers, C5 represents individual X. i Learning backwards from the worst-performing individual globally; q1 represents X i The probability of performing forward or backward learning, q2 represents X. i The probability of performing a mutation operation, CR s ∈[0, 1]; (3) Scout update formula: Where f g The globally optimal solution X g The fitness value is f. g ≤f i CR is the coefficient of variation, which determines the probability that a scout located at the center of the population will adopt a different update strategy. p1 and q1 are the probabilities of the scout performing forward learning, p2 is the scout's mutation probability, and q2 is the scout's probability of performing backward learning.

2. The method for constructing a length-constrained X-structure Steiner minimum tree based on social learning discrete sparrow search according to claim 1, characterized in that: In step S1, the following edge pair encoding scheme of the X-structure Steiner tree is adopted: first, the pins and obstacles are assigned numerical numbers according to the order, and then the numerical string (pqc) is used. n-1 f represents the final Steiner tree, where p is the predecessor node number, q is the successor node number, c represents the edge connection selection, n is the number of net pins, and f is the fitness value of the sparrow, i.e. the bus length of the wiring tree represented by the sparrow. A lookup table composed of associative arrays is used to speed up calculations in subsequent steps by pre-calculating relevant information for each pin under different connection selection methods: For each pair of pins p and q, the number of obstacles and obstacle numbers traversed by edge pq after connection via selection method c are calculated, and all information is recorded in set {O}. k In the}, the final lookup table is formed.

3. The method for constructing a length-constrained X-structure Steiner minimum tree based on social learning discrete sparrow search according to claim 1, characterized in that: In step S2, the initialization strategies employed include a minimum spanning tree construction method and a random wiring tree construction method; by combining the two initialization strategies, the diversity of the initial population is improved.

4. The method for constructing a length-constrained X-structure Steiner minimum tree based on discrete sparrow search using social learning, as described in claim 1, is characterized in that: In step S4, it is considered that Dseg(X) may exist in the obtained wiring tree. i ) and Cseg(X i Two types of illegal edges that violate constraints are identified; an adjustment strategy is adopted to legalize them. The specific implementation steps are as follows: (1) Check g based on lookup table best Check if each edge PQ in the algorithm is a valid edge; if so, repeat this step to check the next edge until the last edge; otherwise, proceed to step (2). (2) Check whether edge PQ can be legalized by selecting 0 or selecting 1 according to the lookup table; if so, replace the connection method of PQ with the connection selection method that meets the conditions and return to step (1); otherwise delete edge PQ and go to step (3); (3) List the relevant obstacles B={B1, B2, …,B} that are crossed by edge PQ and whose continuous lengths violate the constraints, based on the lookup table. m }, Calculate P and B i The distance between centers D = {D i1 D i2 , …, D im }, and sort B in ascending order according to D to get B'={B'1, B'2, …, B' m Let the current starting point S = P; (4) From B' k Select the corner point closest to line SQ, denoted as C, calculate the connection information of edge SC and add it to the lookup table; based on the principle 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=m, go to step (5), otherwise k=k+1 and repeat step (4); (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.

5. The method for constructing a length-constrained X-structure Steiner minimum tree based on social learning discrete sparrow search according to claim 4, characterized in that: In step S5, the hybrid refining strategy specifically includes: (1) Local optimization strategy based on common edges The specific implementation steps are as follows: Scan g best For each edge, count the degree of each pin and its adjacent pins; 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 minimum line length. (2) Loop Elimination Strategy Let the starting points of the two sides be P1 and P2, and the ending points be P3 and P4, respectively. According to 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, it is solved by connecting the pin with other related pins, while for the second case, it is solved by taking the intersection point as a new Steiner point and connecting the related pins. In the newly generated structure, it is ensured that the new routing selection combination can maximize the length of the common edge line. (3) Acute Angle Elimination Strategy This includes elimination strategies based on edge replacement and elimination strategies based on Steiner points: The edge replacement-based elimination strategy eliminates acute angles in the wiring tree by enumerating different edge combinations, thereby further optimizing the line length. The Steiner point-based elimination strategy eliminates acute angles by calculating Fermat points, incorporating them as Steiner points, and then selecting a connection method.