A graph neural network congestion prediction method based on stainer tree two-end connection
By constructing a GSegment structure and a hypergraph structure based on a two-end Steiner tree connection graph neural network method, the problem of insufficient congestion prediction accuracy in the existing technology is solved, a more efficient prediction of the congestion probability of wiring units is achieved, the number of wiring iterations is reduced, and the quality of wiring results is improved.
Patent Information
- Application Number
- CN202510155501.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-12
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2045-02-12
AI Technical Summary
In the existing technology of VLSI layout and routing, the congestion prediction accuracy is insufficient, especially the insufficient utilization of long-distance routing topology information, which leads to an increase in routing iterations and a decrease in result quality.
A graph neural network method based on Steiner tree two-end connection is adopted to establish the STGSG model by constructing GSegment structure and hypergraph structure. The Steiner tree topology information is used to perform binary classification of GCell overflow congestion and refine the congestion probability prediction of wiring units.
The accuracy and efficiency of congestion prediction are improved, the number of routing iterations is reduced, and the quality of routing results is improved.
Smart Images

Figure CN120087405B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of artificial intelligence, and in particular to a graph neural network congestion prediction method based on two-end connection of Stainer tree. BACKGROUND
[0002] In the physical design process, the main tasks include placement and routing. Both of these tasks are NP-complete problems, which need to find the optimal solution under the constraint of design rules. In addition to the wire length, the routability and other optimization objectives are also crucial factors in the placement and routing problems. Especially in the field of very large scale integrated circuits (VLSI), the global router (GR) simplifies the minimum routable unit to GCell. Each GCell corresponds to a certain routing capacity. After routing by the routing algorithm, each GCell will obtain the corresponding routing quantity, and exceeding the routing capacity will cause overflow (OF). In the optimization and iterative routing, the global router usually relies on specific congestion information for rip-up and reroute (RRR), as shown in Figure 1 Predicting the congestion area before the routing stage and incorporating the corresponding optimization measures into the routing algorithm can reduce the number of routing iterations, thereby improving the overall quality of results (QoR).
[0003] In the prior art, although some machine learning-based methods have been proposed for congestion prediction, these methods are mostly based on convolutional neural networks (CNN) or traditional graph neural networks (GNN), which have problems such as insufficient utilization of long-distance routing network topology information and insufficient prediction accuracy when dealing with complex VLSI layouts. For example, the CNN-based method needs to expand the receptive field through multiple layers of convolution to obtain long-distance routing information, but this approach is prone to information loss and overfitting. Traditional GNN methods are prone to over-smoothing problems when dealing with large-scale VLSI layouts, resulting in a decrease in node feature differentiation.
[0004] In the physical design of very large scale integrated circuits (VLSI), congestion prediction in the pre-routing stage is a key link for optimizing placement and reducing the number of iterations. The existing technology mainly includes three categories: traditional empirical models, convolutional neural network (CNN) based prediction methods, and graph neural network (GNN) based topology modeling methods, but all have significant defects.
[0005] 1) Limitations of traditional empirical models
[0006] RUDY (Rectangular Uniform wire Density) is a typical method to estimate the routing demand of GCell by counting pin distribution. However, it relies on empirical formula (e.g. the ratio of wire length to BBox area) designed by human, which is difficult to accurately capture the topological characteristics of complex circuits. For example, RUDY takes the entire bounding box (BBox) of a multi-terminal network (GNet) as a routing probability calculation unit, resulting in uniform distribution of probability within the box, ignoring the actual routing distribution differences of different two-terminal connections (GSegments) after Steiner tree decomposition (e.g. the probability of areas far from pins is significantly reduced). This coarse-grained prediction makes the congestion heat map output by the model have a fuzzy boundary, limiting the classification accuracy.
[0007] 2) Efficiency and receptive field problem of CNN model
[0008] CNN-based models (e.g. RouteNet, RPOS) extract local geometric features through convolution operations, but need to stack multiple layers to expand the receptive field, resulting in a dramatic increase in computational complexity. Moreover, they lack the ability to capture long-distance topological relationships (e.g. interconnections across logical clusters). In addition, CNNs are difficult to directly model the topological structure of circuit netlists, resulting in a high misclassification rate for large areas with low pin density. By using GNN, the routing unit can be modeled as a graph node, which can optimize these processes.
[0009] 3) Over-smoothing and insufficient topological modeling of GNN model
[0010] Related GNN models (e.g. LHNN, CongestionNet) proposed in recent years model specific circuit topological units as graph structures. CongestionNet only uses pins as graph nodes without considering the geometric features of two-dimensional congestion maps. LHNN combines GCell and GNet as graph nodes for message passing, but assigns routing probabilities based on multi-terminal networks (GNet), which leads to the following problems:
[0011] Fuzzy prediction boundary: The global BBox of GNet covers a wide range, and its low-probability areas are incorrectly labeled as high-probability, resulting in unclear classification boundaries (e.g. Figure 2 Misclassification of GNet-based models in sparse areas).
[0012] Over-smoothing phenomenon: The message passing mechanism of traditional GNNs easily loses local features after multiple layers of stacking, requiring complex skip-connection structures to alleviate.
[0013] Dataset limitations: Existing datasets, such as those based on ISPD 2011 and DAC 2012 used by LHNN, have a single congestion rate distribution, making it difficult to demonstrate the generalization ability of the model. To address this, we used the open-source physical design software OpenROAD to create a dataset with a more distributed size distribution and containing Steiner tree information. Summary of the Invention
[0014] The purpose of the present invention is to provide a congestion prediction method for a graph neural network based on a two-end connection of a Steiner tree to solve the problems existing in the above-mentioned prior art.
[0015] The present invention discloses a congestion prediction method for a graph neural network based on a Steiner tree two-end connection. The method constructs a GSgment structure and a hypergraph structure using Steiner tree topology information. The STGSG model is established based on the GNN model. The STGSG model is used to perform binary classification of overflow congestion at the GCell of the global router.
[0016] The process includes the following steps:
[0017] Several open-source, real-world netlists are used, along with physical design back-end flow tools, for placement and routing. When constructing a Steiner tree during global routing, multi-terminal nets sharing the same signal are decomposed into several GSGments, and the physical locations of the netlist's standard cells, the Steiner tree structure, and the GSGment information are extracted as initial data. Feature extraction is performed on the initial data through preprocessing to obtain specific graph node input features. Horizontal and vertical overflows of the GCells resulting from global routing are extracted. The preprocessed node features serve as input to the STGSG model, which outputs a binary classification result regarding overflow corresponding to the GCell, which is supervised and evaluated with the overflow label to predict GCell overflows before routing.
[0018] The advantage of the graph neural network congestion prediction method based on Steiner tree two-terminal connection described in the present invention is that by introducing the Steiner tree structure, a multi-terminal network composed of input and output ports sharing a common signal is refined into several two-terminal networks, which can more accurately calculate the congestion probability of each wiring unit, thereby improving the accuracy of congestion prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 It is a structural diagram of a global router in the prior art.
[0020] Figure 2 This is a schematic diagram comparing the effects of GNet and GSegmen.
[0021] Figure 3It is a schematic diagram of the overall process of the method described in the present invention.
[0022] Figure 4 It is a structural diagram of the STGSG model described in the present invention; wherein Figure 4 (a) is the STGSG model architecture, Figure 4 (b) is the HMP module structure, Figure 4 (c) is the graph convolution process.
[0023] Figure 5 It is a visual diagram of the classification results. DETAILED DESCRIPTION
[0024] The present invention describes a congestion prediction method for a graph neural network based on a Steiner tree two-end connection. GSegment structures and hypergraph structures are constructed respectively through Steiner tree topology information. An STGSG model (Steiner Tree Grid Segment GNN) is established based on the GNN model. The STGSG model is used to perform binary classification of overflow congestion at the GCell of the global router.
[0025] The overall construction process is as follows Figure 3 As shown, 14 open-source, real-world netlists were used for placement and routing using the physical design backend flow tool OpenROAD. By modifying the OpenROAD source code, multi-terminal nets (GNets) sharing the same signal were decomposed into several GSGments when constructing the Steiner tree for global routing. The physical locations of the netlist's standard cells, the Steiner tree structure, and the GSGment information were extracted as initial data. Preprocessing was performed on this initial data to extract features and obtain specific graph node input features. Horizontal and vertical overflows of the GCells in the global routing results were extracted, with 1 indicating overflow and 0 indicating no overflow. To prevent label imbalance, congestion overflow data for both horizontal and vertical channels was combined into a single channel through a logical OR operation. The preprocessed node features served as input to the STGSG model, which outputs a binary classification result for overflows corresponding to the GCells. This model, along with the overflow labels, was used for supervised training and evaluation, enabling the prediction of GCell overflows before routing, thereby optimizing detailed routing structures and reducing the number of overall routing iterations.
[0026] The graph structure in the present invention is a graph structure that includes two node types GCell and GSegment, and three edge types A CC 、A CS 、A SCHypergraph. GCell node: represents the global routing basic unit, corresponding to each grid unit in the two-dimensional layout diagram, used to characterize the local routing resource capacity and congestion characteristics. GSegment node: a two-terminal connection segment (Pin-to-Pin or Pin-to-Steiner node) generated based on the Steiner tree, whose bounding box BBox is the refined routing probability prediction range, which significantly improves the prediction accuracy compared to the broad bounding box of traditional GNet. CC : The adjacency relationship between GCells, representing the spatial adjacency in the two-dimensional layout. Each GCell is only connected to other GCells in the adjacent layer. CS : The connection between GCell and all GSegments within the bounding box of the GSegment to which it belongs is used to transmit local wiring requirement information. SC : Connections from a GSegment to all GCells within its bounding box, used to propagate topological features back to the GCell subgraph. The number of edges from a GCell to a GSegment is equal to the number of edges from a GSegment to a GCell.
[0027] A GSegment node has five node features: the width, height, and area of the GSegment's bounding box, the number of nodes within the bounding box, and a flag indicating whether the GSegment is a top-level pin-related connection. The first four features specify the basic characteristics of the GSegment, while the last flag is used to distinguish top-level topological connections. Experiments have found that top-level connections often have longer wires, which increases the complexity and reduces the accuracy of routing probability prediction.
[0028] For GCell nodes, a 7-dimensional feature vector is used as the input features related to congestion at the geometric level. These include horizontal and vertical wiring capacity (Capacity) and the number of pins within each GCell node. The remaining four are wiring probabilities obtained through raw data preprocessing: horizontal and vertical net density (NetDensity) based on RUDY, and pin density (PinDensity). After obtaining a 2D feature, it is converted into the corresponding features of the graph node GCell.
[0029] The STGSG model consists of a feature embedding module FE and a hypergraph message passing module HMP, as shown in Figure 4 (a) The overall architecture uses a U-Net-like encoder-decoder structure with skip connections. Skip connections are introduced between the encoder and decoder to fuse shallow local features with deep global features, improving the model's ability to perceive long-distance wiring topologies.
[0030] The feature embedding module (FE) first projects the GCell and GSegment node features into a high-dimensional design space to enhance the model's ability to express local geometric features. Matrix transformation is performed using a multi-layer perceptron (MLP). A separate graph convolution is performed on the GCell features.
[0031] The specific structure of the hypergraph message passing module HMP is as follows Figure 4 (b) In addition to using A CC In addition to obtaining geometric information from the 2D congestion map, A CS and A SC Message passing is performed in the circuit topology at the GSegment level. Using GNN to pass messages between the GSegment subgraph and the GCell can extract the features of the circuit topology, especially for longer segments, and can achieve a jump in the receptive field compared to CNN. The MLP layer is used for initial dimension conversion. The features from the GCell subgraph are first passed through A CS Transferred to GSegment, concatenated with the initial GSegment features and transformed, then passed through A SC Transfer them back to the GCell subgraph. Finally, concatenate them with the initial GCell features on the GCell subgraph and perform convolution. The formula is as follows:
[0032] V s,out =f s2 (f s1 (V s,in )|G cs (f c1 (V c,in ))) (1)
[0033] V c,out =G cc (f c2 (f c1 (V c,in )||G sc (V s,out ))) (2)
[0034] Where, f c1 / f s1 represents the multilayer perceptron transformation operation on the GCell and GSegment subgraphs, f c2 / f s2 represents the linear transformation operation, ‖ represents the concatenation operation, Figure 4 In (b), G represents the message passing and aggregation method in the graph convolution process. STGSG adopts a unified method, such as Figure 4 (c) Based on the GraphSAGE model, four aggregators are used for convolution to extract features from the surrounding GCell nodes.
[0035] Experimental test comparison based on data set:
[0036] To obtain the netlist distribution including Steiner tree information, we used the open-source physical design tool OpenROAD to run the entire process of acquiring raw data and OF labels. Real-world benchmarks were conducted using the open-source PDK Nangate45 from OpenROAD and OpenCores. When running OpenROAD's global router, FastRoute, we limited its optimization iterations to prevent situations of no congestion or label imbalance, allowed overflow, and set the number of routing layers to 1-5. All benchmarks maintained an aspect ratio of 1. The following table provides information on the relevant benchmarks for the dataset:
[0037] TABLE I
[0038] DATASET STATISTICS
[0039]
[0040] Where #GS represents the number of GSegment, #GC represents the number of GCell, #ecs,sc represents the number of edges between GCell and GSegment, and #ecc represents the number of edges between GCell and GCell. The congestion rate CR represents the percentage of overflowed GCells to all GCells. Logical OR operations are applied to horizontal and vertical OF labels here. In this dataset, in order to prevent errors caused by the bounding boxes of oversized two-end nets, connections whose bounding boxes of segments exceed 0.25% of the total area of the two-dimensional layout are removed. Compared with the dataset used in LHNN, the dataset shows a more diverse distribution of circuit scales and congestion rates, which indicates that the training difficulty of the model of the present invention has increased, but it is more in line with the actual situation and can better illustrate the generalization ability of the model.
[0041] Experiments were conducted on a Linux server equipped with an NVIDIA RTX 3090 GPU and an AMD EPYC 771364-core CPU. STGSG was implemented using PyTorch and the DGL graph learning framework. Adam was used as the optimizer with a learning rate and weight decay of 0.0001. Binary cross entropy (BCE) was chosen as the loss function for the overflow binary classification task.
[0042] To address the issue of unbalanced overflow labels, a logical OR operation is used to combine horizontal and vertical channel overflow labels into a single channel. In the experiments, the dataset was split into training and test sets with a ratio of 10:4. Mini-batch training was adopted with a batch size of 7. In the binary classification problem, the prediction results were divided into four groups: true positive TP, true negative TN, false positive FP, and false negative FN, based on their predictiveness and ground truth. TP / TN are correctly predicted positive / negative samples, and FN / FP are incorrectly predicted positive / negative samples. Based on these four groups, the following five metrics were used to evaluate the performance of the model in the experiments. For this binary classification task, three evaluation indicators were used: accuracy (ACC), F1 score, and false positive rate (FPR).
[0043] The relevant calculation formula is as follows:
[0044]
[0045] Model Performance: We evaluate our model under 10 random seeds and report the mean and variance of the evaluation metrics. Table 2 shows the results of STGSG on the three classification metrics for all benchmarks.
[0046] TABLE II
[0047] STGSG MODEL EVALUATION RESULTS FOR ALL BENCHMARKS
[0048]
[0049] In the test set, the model achieved 94.54%, 77.42%, and 3.49% accuracy on these three metrics, respectively. Congested and larger circuits generally exhibited better prediction performance. The model correctly captured internal distribution patterns, and even the thousand-scale circuit wbqspiflash achieved a higher F1 score. Due to the smaller size of the test set and the particularly strong results for aes_cipher, the test set performance exceeded the training set.
[0050] Model Comparison: For comprehensive evaluation, our model was compared with U-Net, GraphSAGE, and LHNN. For the U-Net model, two experiments were conducted, one based on GNet and one based on GSegment. The GNet-based model used 2D image data with five channels as input. It differs from Vc in that it uses two fewer channels of PinDensity data and replaces the GSegment-based NetDensity with GNet-based NetDensity in the horizontal and vertical channels. The GSegment-based model uses the same seven GCell subgraph input features as STGSG. U-Net employs eight convolutional layers with a maximum hidden channel size of 512. GraphSAGE performs message passing on a GCell subgraph using the adjacency matrix Acc, employing four graph convolutional layers with a mean aggregator and a hidden dimension of 256. For LHNN, raw node features are used, and the hidden dimension is set to 64 to ensure a fair comparison in terms of GPU memory usage and running speed.
[0051] TABLE III
[0052] COMPARISON WITH U-NET, GRAPHSAGE AND LHNN MODELS
[0053]
[0054] As can be seen from Table 3, compared with other models, the model of the present invention has an improvement of 5.47%, 15.65%, and 3.27% in the evaluation indicators ACC, F1, and FPR, respectively, compared with the model based on GNet to predict routing probability. The relative percentage optimization is 6.13%, 25.28%, and 48.78%, respectively. This demonstrates the efficiency of the routing prediction proposed based on GSegment. In addition, it was found that the U-Net model carrying GSegment information can achieve better classification results without the need for a hypergraph structure.
[0055] Test set visualization: Three benchmarks, namely AES Cipher, PicorV32A and WBQSpiflash, were selected from the test set and visualized in Figure 5The LHNN and STGSG models are visualized in Figure 2. It can be observed that both LHNN and STGSG can make relatively accurate predictions for the overall OF congested cluster. However, it was found that for the classification of OF clusters similar to the red circle marker A of aes cipher, LHNN predicted the entire interior of the congested cluster as congested, while STGSG did not. This is because LHNN makes wiring predictions based on the large-area bounding box of GNet. Similarly, this shortcoming also causes the entire interior of marker C of wbqspiflash to be classified as congested, which greatly reduces the classification prediction performance. For areas that are relatively sparse and do not form OF clusters, such as marker B of aes_cipher, LHNN cannot classify them correctly, but STGSG can.
[0056] Ablation Experiments: To verify the effectiveness of different components in our model, we conducted ablation experiments on various combinations of input node features. Table 4 shows the F1 scores on the test set under different settings. The experiments revealed several key findings:
[0057] 1) The NetDensity feature of GSegment-based Vc has a considerable positive impact on the classification performance of the model. Experiments show that when NetDensity is removed, the F1 score drops sharply to 50.9%.
[0058] 2) The low F1 score without NetDensity is particularly evident in the smaller circuit wbqspiflash, where the F1 score is zero, indicating the importance of NetDensity for model generalization.
[0059] 3) Using only NetDensity, we can achieve very high F1 scores, which shows that GSegment has strong predictive ability in congestion prediction.
[0060] TABLE IV
[0061] ABLATION STUDIES OF STGSG
[0062]
[0063] In summary, the graph neural network congestion prediction method based on Steiner tree two-terminal connection described in the present invention introduces the Steiner tree structure to refine a multi-terminal network composed of input and output ports sharing a common signal into several two-terminal networks, which can more accurately calculate the congestion probability of each wiring unit, thereby improving the accuracy of congestion prediction.
[0064] 1. Refined routing probability prediction: In the traditional global routing process, GNet is usually processed as a whole, which leads to inaccurate routing probability prediction. This invention divides the multi-terminal network into several two-terminal networks GSegment by constructing a Steiner tree, and predicts routing probability based on these two-terminal networks, so as to more accurately reflect the demand for routing resources. For example, Figure 2 The comparison between GNet and GSegment is shown. It can be seen that the routing probability within the bounding box of GSegment is significantly higher than that in the external area. This refined prediction method can better capture routing hotspots.
[0065] 2. Utilize the message passing mechanism of graph neural network: This invention utilizes the message passing mechanism of graph neural network GNN to perform information transmission and feature extraction on the topological structure of GSegment, rather than just convolution on the geometric structure through convolution kernel. By designing a specific graph structure and message passing method, the topological information of the circuit can be effectively utilized to further improve the prediction performance. For example, in Figure 2 By dividing GSegment, we can more clearly see the connection relationship and wiring probability differences between different wiring units, thereby providing more accurate input information for GNN message passing.
[0066] 3. Improve prediction efficiency: During the prediction process, the method of the present invention can complete congestion prediction in a shorter time through refined wiring probability calculation and message passing of graph neural networks, significantly improving the prediction efficiency.
[0067] Those skilled in the art can make various other corresponding changes and deformations based on the technical solutions and concepts described above, and all of these changes and deformations should fall within the scope of protection of the claims of the present invention.
Claims
1. A congestion prediction method based on a graph neural network with two-terminal connections of a Steiner tree, characterized in that: The GSgment structure and the hypergraph structure are constructed respectively through the Steiner tree topology information, and the STGSG model is established based on the GNN model. The STGSG model is used to perform binary classification on the GCell overflow congestion of the global router; The process includes the following steps: Several open-source, real-world netlists are used, along with physical design back-end flow tools, for placement and routing. When constructing a Steiner tree for global routing, multi-terminal nets sharing the same signal are decomposed into several GSGments, and the physical locations of the netlist's standard cells, the Steiner tree structure, and GSGment information are extracted as initial data. Preprocessing is performed on the initial data to extract features and obtain specific graph node input features. Horizontal and vertical overflows of the GCells from the global routing results are extracted. The preprocessed node features serve as input to the STGSG model, which outputs a binary classification result for overflows corresponding to the GCells. This model is then trained and evaluated with the overflow labels for supervised prediction of GCell overflows before routing. The node types of the hypergraph include GCell and GSegment; the edge types include A CC 、A CS 、A SC ; The A CC It is the adjacency relationship between GCells, representing the spatial adjacency in a two-dimensional layout. Each GCell is only connected to the GCells in the adjacent layer. The A CS It is the connection between GCell and all GSegments within the bounding box of the GSegment to which it belongs, and is used to convey local wiring requirement information; The A SC It is the connection between GSegment and all GCells within its bounding box, used to return topological features to the GCell subgraph; The STGSG model consists of a feature embedding module and a hypergraph message passing module, and adopts a U-Net-like encoder-decoder structure with skip connections; The feature embedding module FE first projects the GCell node and GSegment node features into a high-dimensional design space to enhance the model's ability to express local geometric features. The matrix transformation is performed using a multi-layer perceptron (MLP). For the GCell features, a separate graph convolution is performed. The hypergraph message passing module uses A CC Get geometric information from the 2D congestion map using A CS and A SC Perform message passing in the circuit topology at the GSegment level; Features from the GCell subgraph are first passed through A CS Transferred to GSegment, concatenated with the initial GSegment features and transformed, then passed through A SC Transmit it back to the GCell subgraph; finally, connect it with the initial GCell feature on the GCell subgraph and perform convolution; the formula is as follows: V s,out =f s2 (f s1 (V s,in )||G cs (f c1 (V c,in ))) (1) V c,out =G cc (f c2 (f c1 (V c,in )||G sc (V s,out ))) (2) Where, f c1 represents the multilayer perceptron transformation operation on the GCell subgraph; f c2 represents the linear transformation operation on the GCell subgraph; f c2 represents the multilayer perceptron transformation operation on the GCell subgraph; f c2 represents the linear transformation operation on the GCell subgraph; ‖ represents the splicing operation.
2. The congestion prediction method of a graph neural network based on a Steiner tree two-end connection according to claim 1, characterized in that: The congestion overflow data of the horizontal and vertical channels are processed into one channel through a logical "OR" operation.
3. The congestion prediction method of a graph neural network based on a Steiner tree two-end connection according to claim 1, characterized in that: The GCell represents a global wiring basic unit, corresponding to each grid unit in the two-dimensional layout diagram, and is used to characterize the local wiring resource capacity and congestion characteristics; The GSegment is a two-terminal connection segment generated based on the Steiner tree, and the bounding box is the refined wiring probability prediction range.
4. The congestion prediction method of a graph neural network based on a Steiner tree two-end connection according to claim 1, characterized in that: The number of edges from GCell to GSgement is equal to the number of edges from GSegment to GCell.
5. The congestion prediction method of a graph neural network based on a Steiner tree two-end connection according to claim 4, characterized in that: The GSegment has 5 node features; They are the width, height, area, number of nodes in the bounding box corresponding to the GSegment, and a flag indicating whether the GSegment is a top-level pin-related connection; among them, the width, height, area, and number of nodes in the bounding box are the basic characteristics of the GSegment, and the flag is used to distinguish the topological connection of the top-level signal.
Citation Information
Patent Citations
Integrated circuit layout method and device and computer readable storage medium
CN116467981A
Link prediction method based on hypergraph neural network
CN118214707A