Wiring method in 3-bend mode
By employing the 3-bend routing method and utilizing edge weight prefix sums and parallel computation, the problems of long global routing time and uneven load distribution are solved, improving the computational efficiency and speed of circuit design, making it suitable for GPU devices.
Patent Information
- Application Number
- PCT/CN2024/144058
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-07-05
- Filing Date
- 2024-12-31
- Publication Date
- 2026-01-08
AI Technical Summary
Existing global routing methods suffer from excessive computation time and uneven load distribution in large-scale circuit design, which affects the efficiency of multi-threaded computing. There is also insufficient research on GPU algorithms.
The 3-bend routing method is adopted. By calculating the edge weight prefix sum of each point, a data structure is constructed to calculate the minimum value of the 3-bend routing scheme in parallel. The parallel computing capability of the GPU is utilized to reduce the impact of uneven load and improve computing efficiency.
Without sacrificing global routing quality, it significantly improves global routing speed, making it suitable for devices with a large number of parallel computing units, such as GPUs, and reducing computation time.
Smart Images

Figure CN2024144058_08012026_PF_FP_ABST
Abstract
Description
3-bend mode routing method
[0001] This application claims priority to the Chinese patent application No. 202410898450.0, filed on July 5, 2024, with the Chinese Patent Office, the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD
[0002] The present application relates to the field of integrated circuit automated design, for example, to a 3-bend mode routing method. BACKGROUND
[0003] Global routing is an important step in physical design. In this step, the program will give a coarse-grained routing result. The coarse-grained routing result can guide the subsequent detailed routing step to find the area, thereby reducing the time cost of detailed routing and improving the quality of detailed routing.
[0004] The time required for global routing is much smaller than that of detailed routing, so in the previous steps of physical design, global routing is often used to make a quick feedback on the quality of the design in order to adjust the unreasonable areas in the design.
[0005] With the increasing size of the current circuit, the time required for global routing may take several hours or even several days. How to improve the speed of global routing without sacrificing the quality of global routing is a key technical point that needs to be solved in the current design field.
[0006] Global routing methods usually use a line network parallel method. Due to the large difference in the size of the line network problem, this method usually has the problem of uneven load, which affects the multi-thread computing efficiency. At the same time, there are not many related researches on GPU algorithms, and more GPU algorithms are needed to take advantage of the powerful computing power of GPU. SUMMARY
[0007] The present application provides a 3-bend mode routing method, which although increases the total amount of calculation, greatly reduces the influence of uneven load, is more suitable for computing devices with a large number of parallel computing units such as GPU, greatly improves the efficiency of calculation, and reduces the time required for calculation.
[0008] The embodiment of the present application provides a 3-bend mode wiring method, which comprises the following steps: calculating the horizontal and vertical edge weights corresponding to each point in a solution area, and calculating the prefix sum of the edge weight corresponding to each point; calculating the cost of the 3-bend wiring scheme corresponding to each point by using the prefix sum corresponding to each point; constructing a data structure, and calculating the minimum value of the 3-bend wiring scheme in an algorithm specified interval in parallel according to the cost of the 3-bend wiring scheme corresponding to each point; and performing an algorithm on the data structure in parallel according to the minimum value of the 3-bend wiring scheme, calculating the minimum value of the interval corresponding to each wire net, and wiring each wire net by using the minimum value of the interval corresponding to each wire net.
[0009] In an embodiment, before the step of calculating the horizontal and vertical edge weights corresponding to each point in a solution area, the method further comprises the following step: preprocessing the solution area.
[0010] In an embodiment, in the process of preprocessing the solution area, the area of all the wire nets to be solved is labeled, the area of the wire net is mapped to a one-dimensional space to obtain a one-dimensional sequence, and each wire net corresponds to a continuous section in the one-dimensional sequence, the length of which is equal to the area of the area corresponding to each wire net.
[0011] In an embodiment, the step of calculating the prefix sum of the edge weight corresponding to each point and calculating the cost of the 3-bend wiring scheme corresponding to each point by using the prefix sum corresponding to each point comprises the following steps: calculating the prefix sum of the edge weight on the one-dimensional sequence, and calculating the cost of the optimal 3-bend wiring scheme corresponding to each point by using the prefix sum corresponding to each point.
[0012] The step of performing an algorithm on the data structure in parallel according to the minimum value of the 3-bend wiring scheme and calculating the minimum value of the interval corresponding to each wire net comprises the following steps: calculating the answer of each wire net according to the cost of the optimal 3-bend wiring scheme corresponding to each point, wherein the answer of each wire net is the minimum value in the interval corresponding to each wire net, and the interval is a continuous interval.
[0013] In an embodiment, the step of calculating the horizontal and vertical edge weights corresponding to each point in a solution area and calculating the prefix sum of the edge weight corresponding to each point comprises the following steps: numbering each point in the solution area of each wire net which needs to be solved according to the horizontal and vertical arrangement order of each point which can be used as an intermediate point of the 3-bend wiring scheme, to obtain the horizontal and vertical numbering sequences; and calculating the prefix sum of the horizontal and vertical edge weight corresponding to each point in parallel on the horizontal and vertical numbering sequences.
[0014] In an embodiment, the constructing the data structure, the minimum value of the 3-bend routing scheme in the algorithm specified interval is calculated in parallel according to the cost of the 3-bend routing scheme corresponding to each point, including: calculating a special interval, and then calculating the minimum value of the 3-bend routing scheme in the specified special interval.
[0015] In an embodiment, the constructing the data structure includes:
[0016] Let d(i,j) be the interval with i as the left end point and length of 2 j , and the minimum value of the interval with i as the left end point and length of 2 j is obtained.
[0017] The interval with i being a multiple of 2 j is a special interval, and then the minimum value of the 3-bend routing scheme in the special interval is calculated.
[0018] In an embodiment, the method further includes: querying the answer; wherein the querying the answer includes finding a longest special interval in each time with the same left end point and the interval to be queried, which is contained in the queried interval, and merging the minimum value of the longest special interval into the answer, and according to the merged answer, ending the query or continuing the query until the final answer is queried.
[0019] In an embodiment, the parallel query is performed without dependence and competition relationship in the query process of each line network. BRIEF DESCRIPTION OF DRAWINGS
[0020] Fig. 1 is a routing schematic diagram of a 3-bend mode routing method according to an embodiment of the present application;
[0021] Fig. 2 is a flow schematic diagram of a 3-bend mode routing method according to an embodiment of the present application;
[0022] Fig. 3 is a data structure construction and answer query schematic diagram of a 3-bend mode routing method according to an embodiment of the present application. DETAILED DESCRIPTION
[0023] The present application will be described below in conjunction with the accompanying drawings and embodiments. It should be understood that the embodiments described herein are only used to explain the present application, and are not used to limit the present application.
[0024] In the following description, for purposes of explanation and not limitation, specific details are set forth such as particular procedures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application can be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
[0025] The embodiment of the present application provides a 3-bend mode wiring method, comprising the following steps:
[0026] The horizontal and vertical edge weights corresponding to each point in the solution area are calculated, and the prefix sum of the edge weight corresponding to each point is calculated;
[0027] The cost of the 3-bend wiring scheme corresponding to each point is calculated by using the prefix sum corresponding to each point;
[0028] A data structure is constructed, and the minimum value of the 3-bend wiring scheme in the interval specified by the algorithm is calculated in parallel according to the cost of the 3-bend wiring scheme corresponding to each point;
[0029] The algorithm is executed in parallel on the data structure according to the minimum value of the 3-bend wiring scheme, the minimum value of the interval corresponding to each net is calculated, and each net is wired by using the minimum value of the interval corresponding to each net, that is, the optimal scheme of the 3-bend wiring is found.
[0030] In the preprocessing of the solution area, the region labels of all the nets to be solved are mapped from a two-dimensional region to a one-dimensional sequence, each net corresponds to a continuous segment in the one-dimensional sequence with the same length as the area of the region corresponding to each net, the prefix sum of the edge weight is calculated on the one-dimensional sequence, and the optimal 3-bend wiring cost corresponding to each point is calculated by using the prefix sum; at this time, the answer of each net is the minimum value in the continuous interval corresponding to the net.
[0031] The horizontal and vertical edge weights corresponding to each point are calculated, and the prefix sum of the edge weight is calculated, comprising the following steps:
[0032] The nets to be solved are numbered according to the horizontal and vertical arrangement order of each possible intermediate point in the solution area of each net as a 3-bend wiring scheme, respectively, according to any net order, to obtain the horizontal and vertical numbering sequences;
[0033] The prefix sum of the horizontal and vertical edge weights is calculated in parallel on the horizontal and vertical numbering sequences, respectively.
[0034] The data structure is constructed and the minimum value is calculated, including calculating special intervals, and then calculating the minimum value of the 3-bend routing scheme of the specified special interval. The construction of the data structure includes the following steps:
[0035] The d(i, j) is taken as the left endpoint i with a length of 2 j interval, and the minimum value of the left-closed right-open interval from i to i+2 j is obtained;
[0036] The interval in which i is a multiple of 2 j is a special interval, and the minimum value of the 3-bend routing scheme of the special interval is calculated.
[0037] Each line network query has no dependency and competition relationship, and parallel query is performed.
[0038] As shown in FIG. 3, the first row is the minimum value corresponding to each point, that is, the minimum value of the interval with a length of 1, that is, d(i, 0).
[0039] The formula for calculating the minimum value of the special interval is d(i, j) = min{d(i, j-1), d(i+2 j-1 , j-1)}.
[0040] According to the order from small to large, the same j can be calculated in parallel.
[0041] Finally, the query answer includes finding a left endpoint and the same query interval each time, including the longest special interval in the query interval, and merging the minimum value of the special interval into the answer. According to the answer, the query is ended or continued until the final answer is obtained.
[0042] The embodiment of the application provides a 3-bend mode routing method, which is a large-scale parallel 3-bend mode routing method based on range minimum / maximum query (RMQ). The method of the embodiment is realized by solving the region preprocessing, data structure construction, and query answer. In the region preprocessing step, the region labels of all the line networks to be solved are mapped to one dimension, and a one-dimensional sequence is obtained, each line network corresponding to a continuous segment in the one-dimensional sequence with a length equal to the area of the region corresponding to the line network. The prefix sum of the edge weight is solved on the one-dimensional sequence, and the best 3-bend routing cost corresponding to each point is calculated by using the prefix sum. At this time, the answer of each line network is the minimum value in the continuous interval corresponding to the line network. In the data structure construction step, some special intervals are selected, and the minimum value of the special interval is calculated by using the divide-and-conquer method. In the query answer step, the minimum value of the interval corresponding to each line network is queried on the data structure. As follows:
[0043] A. Region preprocessing solution
[0044] Calculate the horizontal and vertical edge weights corresponding to each point in the solution region, and calculate the prefix sum of the edge weights; use the prefix sum to calculate the cost of the 3-bend routing scheme corresponding to each point.
[0045] For the nets to be solved, in any net order, number the points that may serve as the intermediate points of the 3-bend routing scheme in each net's solution region in the horizontal (vertical) arrangement order to obtain a numbered sequence. Each net's possible intermediate points correspond to a point in the numbered sequence, and all the intermediate points of a net are a continuous segment within the sequence. On this numbered sequence, we can solve the prefix sums of the edge weights of the horizontal and vertical edges in parallel. Using the prefix sum, we can calculate the cost of the 3-bend routing scheme corresponding to each point in parallel. The excellent 3-bend routing scheme to be selected for each net is the one with the minimum cost among all the 3-bend routing schemes corresponding to the points within the sub-interval of the numbered sequence corresponding to the net's solution region.
[0046] B. Data structure construction
[0047] The judgment basis for special intervals is whether i is a multiple of 2 j and whether this interval is a sub-interval of the original one-dimensional sequence.
[0048] The judgment basis for continuing or ending is whether there are still special intervals that have not been calculated.
[0049] For each i that is a multiple of 2 j , consider the interval [i, i + 2 j ) as a special interval, and we calculate the minimum value of all special intervals (if this special interval exists). When j ≥ 1, the minimum value of the interval [i, i + 2 j ) can be calculated from the minimum values of smaller intervals [i, i + 2 j-1 ) and [i + 2 j-1 , i + 2 j ). For the minimum values of intervals with the same j, they can be calculated in parallel. [[ID=三十二]] [[ID=三十三]]
[0050] [[ID=三十四]]C. Query the answer. For each net, querying the answer means querying the minimum value of the interval corresponding to the net. Suppose the corresponding interval is [L, R), and the following strategy is used to query the answer: Each time, find the largest special interval [L, L + 2 [[ID=三十五]] j [[ID=三十六]]) that is a sub-interval of [L, R), and merge its minimum value into the answer. If L + 2 [[ID=三十七]] j [[ID=三十八]] = R, then the query ends. If L + 2 [[ID=三十九]] j [[ID=四十]] < R, then use the same method to solve [L + 2 [[ID=四十一]] jR). This method can answer the query in O(log2(R-L)) time. And each line net query has no dependency and contention, can be parallel query.
[0051] As shown in Figure 1, it is a typical 3-bend routing scheme. 3-bend routing is a classification of pattern routing, which is characterized by limiting the routing scheme from source to sink to at most three turns.
[0052] As shown in Figure 2. First, for the two line nets (n1 and n2) in the figure, first arrange them in order, and then give the points in the solution area in order. Two line nets correspond to the numbers 0-5 and 6-20 respectively. We calculate the edge weight cost between each point and the adjacent right point (such as 0-1, 1-2), and if there is no point on the right, it can be assumed to be any value, which has no effect on the algorithm. Save this edge weight in a one-dimensional sequence (0-20), and the position i+1 corresponds to the horizontal edge weight between i and the point adjacent to i (such as 1 storing 0-1, 2 storing 1-2). Calculate the prefix sum of this sequence to get the prefix sum sequence d h of the horizontal edge weight. Similarly, calculate the prefix sum of the vertical edge weight sequence d v . The edge weight is calculated using any parallel strategy, and the prefix sum algorithm uses any implementation in the algorithm library. After calculating d h ,d v , for a horizontal or vertical edge, the edge weight is directly calculated by a simple method. For example, the edge weight of the long horizontal edge between points 6 and 10 in Figure 2 is the sum of the edge weights of 6-7, 7-8, 8-9, and 9-10, that is, d h (10)-d h (6). For each point, there are at most four possible 3-bend schemes with the point as the turning point, such as for point 13, the four schemes are (6->8->13->15->20), (6->8->13->18->20), (6->11->13->15->20), and (6->11->13->18->20).
[0053] where 6->8->13->15->20 cost calculation method: d h (8)-d h (6)+d v (13)-d v (8)+d h (15)-d h (13)+d v (20)-d v (15)
[0054] 6->8->13->18->20 cost calculation method:
[0055] d h (8)-d h (6)+d v (13)-d v (8)+d v (18)-d v (13)+d h (20)-d h (18)
[0056] 6->11->13->15->20 cost calculation method:
[0057] d v (11)-d v (6)+d h (13)-d h (11)+d h (15)-d h (13)+d v (20)-d v (15)
[0058] 6->11->13->18->20 cost calculation method:
[0059] d v (11)-d v (6)+d h (13)-d h (11)+d v (18)-d v (13)+d h (20)-d h (18)
[0060] The minimum one is selected as the minimum cost solution of this point. Enumerate all 3-bend solutions of all points inside each wire mesh, and the algorithm expects to get the one with the minimum edge weight cost (the global routing problem always seeks the solution with the minimum cost under a model, and if there are multiple minimums, any one of them is acceptable). For example, the second wire mesh in FIG. 2 needs to select the minimum cost one from the 60 3-bend routing solutions corresponding to the 15 intermediate points (i.e. 6-20). For each point, select the minimum cost one from the 4 solutions with this point as the intermediate turning point. In the lower left corner of FIG. 2, the cost of the minimum cost solution corresponding to each point is marked.
[0061] Next, we construct the data structure. Figure 3 shows the data structure corresponding to Figure 2. The first row represents 21 points from 0 to 20. d(i,0) is the minimum cost of the solution corresponding to point i. For line network 1, the solution to be found is the smallest of the 6 solutions corresponding to the interval [0,6). For line network 2, the solution to be found is the smallest of the 15 solutions corresponding to the interval [6,21). Let d(i,j) be the minimum cost of the solution corresponding to the interval [i,i+2]. j The minimum value of ). Only for i is 2. j Find d(i,j) within the interval of multiples. For j≥1, d(i,j)=min{d(i,j-1),d(i+2)} j-1 ,j-1)};where i is 2 j The interval of multiples is a special interval; j≥1, d(i,j)=min{d(i,j-1),d(i+2)} j-1 The minimum value calculation method for the special interval is ,j-1). Figure 3 shows all the d values that need to be calculated and the data dependencies. It can be noted that d(i,j) with the same j can be calculated in parallel. If there are enough computational cores, the structure in Figure 3 can complete all calculations in 4 computations.
[0062] Next, we use a data structure to find the answer. For net 1, we first try to add the longest interval with the calculated minimum value as the left endpoint to the answer. As shown in Figure 3, [0,4) is the longest interval with the calculated minimum value as the left endpoint, so we merge d(0,2) into the answer. Then we try to find the longest interval with the calculated minimum value as the left endpoint, [4,6) is the longest interval with the calculated minimum value as the left endpoint, so we merge d(4,1) into the answer. For net 1, the answer is min(d(0,2),d(4,1)). Similarly, for net 2, the answer is min(d(6,1),d(8,3),d(16,2),d(20,0)). It is proven that for any interval of length N, the minimum value can always be found in O(log2 N) time using a data structure. It can also be noted that the queries for different nets can be computed in parallel.
[0063] Compared to the simple method of directly calculating the minimum value among all schemes in sequence, the method of this application increases the total amount of computation, but reduces the impact of uneven load, and is more suitable for computing devices with a large number of parallel computing units such as GPUs, which greatly improves the efficiency of computation and reduces the time required for computation.
Claims
1. A 3-bend routing method, comprising: calculating the horizontal and vertical edge cost of each point in the solution region, and calculating the prefix sum of the edge cost of each point; calculating the cost of the 3-bend routing scheme of each point using the prefix sum of each point; constructing a data structure, and calculating the minimum value of the 3-bend routing scheme in the interval specified by the algorithm in parallel according to the cost of the 3-bend routing scheme of each point; performing the algorithm on the data structure in parallel according to the minimum value of the 3-bend routing scheme, calculating the minimum value of each line net corresponding to the interval, and routing each line net using the minimum value of the interval corresponding to each line net.
2. The 3-bend routing method of claim 1, wherein before calculating the horizontal and vertical edge cost of each point in the solution region, the method further comprises: preprocessing the solution region.
3. A 3-bend pattern routing method as claimed in claim 2, wherein, In the process of preprocessing the solution region, labeling the region of all line nets that need to be solved, mapping the region of the line net to a one-dimensional space to obtain a one-dimensional sequence, and each line net corresponds to a continuous segment in the one-dimensional sequence with a length equal to the area of the region corresponding to each line net.
4. A 3-bend pattern routing method as claimed in claim 3, wherein, The calculation of the prefix sum of the edge cost of each point and the calculation of the cost of the 3-bend routing scheme of each point using the prefix sum of each point, comprising: calculating the prefix sum of the edge cost on the one-dimensional sequence, and calculating the cost of the optimal 3-bend routing scheme of each point using the prefix sum.
5. A 3-bend pattern routing method as claimed in claim 4, wherein, The calculation of the minimum value of the 3-bend routing scheme on the data structure, and the calculation of the minimum value of each line net corresponding to the interval, comprising: calculating the answer of each line net according to the cost of the optimal 3-bend routing scheme of each point, wherein the answer of each line net is the minimum value in the interval corresponding to each line net, and the interval is a continuous interval.
6. A 3-bend pattern routing method as claimed in claim 5, wherein, The calculation of the horizontal and vertical edge cost of each point in the solution region, and the calculation of the prefix sum of the edge cost of each point, comprising: numbering each point in the solution region of each line net that needs to be solved according to the horizontal and vertical arrangement order of each point that can be used as an intermediate point of the 3-bend routing scheme, to obtain the horizontal and vertical numbering sequence; calculating the prefix sum of the edge cost of each point in the horizontal and vertical numbering sequence in parallel.
7. The 3-bend pattern routing method of claim 1, wherein, The construction of the data structure, and the calculation of the minimum value of the 3-bend routing scheme in the interval specified by the algorithm in parallel according to the cost of the 3-bend routing scheme of each point, comprising: calculating the special interval, and then calculating the minimum value of the 3-bend routing scheme in the specified special interval.
8. A 3-bend pattern routing method as claimed in claim 7, wherein, The construction of the data structure, comprising: denoting d(i,j) as an interval with i as the left endpoint and a length of 2jj, to obtain the minimum value of the left-closed and right-open interval from i to i+2jj; The interval selected as the special interval is an interval in which i is a multiple of 2jj, and then the minimum value of the 3-bend routing scheme of the special interval is calculated.
9. The 3-bend mode routing method of claim 8, further comprising: querying an answer; wherein the querying answer includes finding a left end point each time and the same interval to be queried, the longest special interval contained in the querying interval, merging the minimum value of the longest special interval into the answer, and judging whether to end the querying or continue the querying according to the merged answer until the final answer is queried.
10. The 3-bend pattern routing method of claim 9, wherein, Parallel querying is performed in the absence of dependency and competition relationship in the querying process of each wire net.
Citation Information
Patent Citations
Overall wiring method for super-large-scale integrated circuit under X structure
CN103902774A
Position prediction method for unit movement in global wiring
CN113723711A
Field programmable gate array (FPGA) wiring method for improving efficiency by sorting destination points of wire nets
CN113919270A
Wiring method meeting minimum area constraint in integrated circuit layout wiring
CN115408978A
3-bend mode wiring method
CN119047411A