Railway track allocation method based on GPU parallel acceleration
By employing a GPU-accelerated parallel orbit allocation method, combined with look-ahead search and backtracking strategies, the orbit allocation order and orbit selection probability are optimized, thus solving the orbit allocation problem in VLSI physical design. This results in a fast and efficient orbit allocation solution, reducing design cycle time and resource waste.
Patent Information
- Application Number
- CN202411974672.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2026-02-06
- Estimated Expiration
- 2044-12-30
AI Technical Summary
In existing VLSI physical design, the track allocation problem has not been effectively combined with GPU parallelism, resulting in long design cycles and difficulty in obtaining a suitable track allocation scheme in a short time, and failing to improve efficiency without sacrificing track allocation quality.
A GPU-based parallel acceleration method for track allocation is adopted. By constructing a cost graph of evaluation metrics and combining look-ahead search and backtracking strategies, the order of wire allocation and the probability of track selection are optimized. Asynchronous parallel computing and sparse row compression strategies are used to improve computational efficiency.
The optimal solution can be obtained in a short time without sacrificing the quality of orbit allocation, which reduces the design cycle and improves computational efficiency and resource utilization.
Smart Images

Figure CN119917268B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of integrated circuit computer-aided design, and particularly relates to a track allocation method based on GPU parallel acceleration. BACKGROUND
[0002] Physical design is a key link in the design process of very large scale integrated circuits (VLSI) and is also the most time-consuming step. Physical design usually includes stages such as netlist partitioning, floorplanning, placement, clock tree synthesis, routing and timing closure. Routing, as a key stage of VLSI physical design, is usually divided into two stages, global routing and detailed routing. The global routing stage performs routing from a global perspective, but ignores many design problems that need to be considered in detailed routing, which leads to mismatch between global routing and detailed routing. Both academia and industry have tried to introduce a track allocation stage as the initial stage of detailed routing to reduce the mismatch between global routing and detailed routing. Introducing track allocation as the initial stage of detailed routing can effectively reduce the overlap between wire segments or between wire segments and obstacles under the condition of ensuring the connectivity of the netlist, reduce the mismatch between global routing and detailed routing, and provide a better initial solution for the detailed routing stage. With the advancement of VLSI process manufacturing technology, the routability evaluation method needs more computing work to solve a legal solution that meets all constraints due to the increasing design complexity and increasingly complex design constraints, thereby leading to longer design cycles and slow convergence of the best target. With the rapid development of graphics processing units (GPU), GPU parallelism in VLSI design complex constraints has received widespread attention. In recent years, researchers have proposed many strategies for track allocation, but so far no one has combined track allocation problems with GPU parallelism to obtain a reasonable track allocation solution in a short time. Therefore, a track allocation method based on GPU parallel acceleration is proposed to obtain a reasonable routability evaluation without sacrificing the quality of track allocation in a short time. SUMMARY
[0003] The purpose of the present application is to provide a track allocation method based on GPU parallel acceleration based on the independence and decomposability of the track allocation problem, which can obtain a track allocation solution in a short time without sacrificing the quality of track allocation.
[0004] To achieve the above purpose, the technical scheme of the present application is as follows: a track allocation method based on GPU parallel acceleration, comprising:
[0005] A track allocation method considering global netlist and local netlist is proposed, which is implemented as follows:
[0006] extracting the wires from the global wire net and the local wire net;
[0007] The wiring area is divided into a plurality of general wiring units according to the channel width, and a wiring strip is composed of a row / column of general wiring units, and each wiring strip includes a plurality of tracks for placing wires; the wiring strip is divided into a plurality of sub-wiring strips, and is further cut into segments;
[0008] A cost graph corresponding to the evaluation index is constructed, a forward search strategy is adopted to find a candidate solution set of the wire distribution, and each candidate solution is assigned a corresponding selection probability; a backtracking strategy is adopted to find a new candidate solution set from the candidate solution set; and the wires are re-distributed on the basis of the track distribution result.
[0009] In an embodiment of the present application, further comprising:
[0010] An asynchronous parallel acceleration calculation method is proposed to finely granulate the calculation tasks of the wiring resource and track distribution.
[0011] In an embodiment of the present application, for the global wire net, the wire is a straight line between the centers of two general wiring units; for the local wire net, two straight line Steiner trees are created for each local wire net, which are the vertical trunk Steiner tree and the horizontal trunk Steiner tree, the trunks of the two Steiner trees are identified respectively, the wire lengths of the two Steiner trees are calculated through the distances from all pins to the trunks, and the trunk with a shorter wire length is selected as the wire extracted by the corresponding local wire net.
[0012] In an embodiment of the present application, the evaluation index includes obstacle cost, overlap cost and wire length cost.
[0013] In an embodiment of the present application, the cost graph corresponding to the evaluation index is constructed in the following manner:
[0014] (1) Obstacle cost
[0015] For an obstacle b occupying a plurality of tracks, the obstacle b is regarded as a plurality of sub-obstacles b corresponding to the occupied tracks respectively t ; the calculation formula of the obstacle cost is as follows:
[0016] bc it = olen(i, b t ),
[0017] wherein bc it represents the obstacle cost of the wire i on the track t, and olen(i, b t ) represents the wire i and the obstacle b tthe overlap cost between the wires; since the obstacles and the tracks are bound and the position of the obstacles is fixed, a complete bipartite graph G corresponding to the obstacle cost of a wire set and a track set is constructed b ;
[0018] (2) Overlap cost
[0019] The overlap cost is generated by the allocation of the same track between the partial wires, each wire has a corresponding wire set that will overlap, so an adjacency list of the overlap cost is constructed; the calculation method of the overlap cost is as follows:
[0020] oc ii' = olen(i, i')
[0021] Where olen(i, i') represents the overlap cost between two different wires i and i';
[0022] When there are multiple wires overlapping in the same segment, the calculation method of the overlap cost is as follows:
[0023]
[0024] Where slen tk represents the length of the kth segment on the track t, oc represents the overlap cost of the corresponding routing strip, onum tk represents the number of overlaps of the wires on the kth segment on the track t, T represents the track set of the routing strip, x it is used to save the allocation of the wires, if x it is 1, it means that the wire i is allocated on the track t, I represents the wire set, S t represents the segment set on the track t, c ik represents whether the wire i exists on the kth segment or not;
[0025] From the aspect of overlap cost, the overlap relationship between the wires will affect the allocation of the subsequent wires, and the overlap cost calculation formula is changed to:
[0026]
[0027] Where ilen i represents the length of the wire i, tlen t represents the length of the track t, slen tk represents the length of the kth segment on the track t, S' represents the segment set that has not been allocated wires; t
[0028] The result of the track allocation scheme only affects the segment set S' that has not been allocated wires t The total length of the wires and the total length of the tracks do not change with the change of the allocation scheme; therefore, the total length of the segments of the unallocated wires needs to be reduced to reduce the overlap cost;
[0029] For the wire to be allocated, the track where the segment of the unallocated wire is located is given priority; the allocation result of the track before the segment can minimize the overlap cost without considering the obstacle cost and the wire length cost; therefore, the allocation order of the wires and the priority of the allocation of the wires to each track are considered, the set of wires is sorted, and the allocation order of the wires is determined;
[0030] (3) Wire length cost
[0031] The pin and the wire are components inside the wire net; a wire net contains a plurality of pins and wires; in the track allocation stage, the placed wire will be connected to other components in the wire net; the total Manhattan distance generated by connecting all the components inside a wire net together is the wire length cost.
[0032] In an embodiment of the present application, a forward search strategy is adopted to find the candidate solution set of the wire allocation, and the specific implementation manner of assigning a corresponding selection probability to each candidate solution is as follows:
[0033] Before allocating each wire, the forward search is performed on each wire, and the conflict between the wire and the track and the conflict between the wires are evaluated by the forward search; the forward search uses the corresponding probability evaluation value between the wire and the track to further distinguish the same sub-state, and the probability sum of the allocation of the wire to each track is 1;
[0034]
[0035] where P i,t represents the probability of the allocation of the wire i to the track t, and T(i) represents the track set to which the wire i can be allocated;
[0036] Some of the wires are mutually exclusive due to their overlapping relationship, and the wires and the obstacles are also mutually exclusive; therefore, the forward search is used to alleviate the conflict between the obstacle cost and the overlap cost;
[0037] According to the obtained obstacle cost bipartite graph G b , the probability of the allocation of each wire to the track is initialized, and the initial probability P i,j is obtained, and the formula is as follows:
[0038]
[0039] Wherein, i represents a wire, j and k are different track numbers, m represents the number of tracks that wire i can be allocated to, and n represents the number of tracks corresponding to the minimum obstacle cost set of wire i; the above formula represents that the probability is divided by the track where the minimum obstacle cost is located, so as to ensure the minimization of the obstacle cost;
[0040] After the initialization of the probability, the updated probability is transmitted between the wires on the basis of the initial probability according to the previous overlapping relationship diagram; wherein the updated probability formula is as follows:
[0041]
[0042] Wherein, V(i) represents a wire set having an overlapping relationship with wire i, P ix,t represents the probability of wire ix being allocated to track t, oc i,ix represents the overlapping relationship of wire i and wire ix being allocated to the same track, v i,t represents the weight of wire i being allocated to different tracks;
[0043] v_sum i =∑(v max -v i,t ),if P i,t ≠0,
[0044] Wherein v max represents the maximum value of the weight set of the wire, and the above formula represents that the weights of all tracks are added by difference, and the greater the product of the overlapping cost and the probability on the track, the greater the expected value of the overlapping cost, and the smaller the expected value of the probability of being allocated to the corresponding track;
[0045]
[0046] Wherein, P′ i,t represents the updated wire allocation probability, and ε is a weight scaling factor for maintaining the proportion of the current weight and normalizing the updated probability.
[0047] In an embodiment of the present application, the specific implementation manner of using a backtracking strategy to find a new candidate solution set for the candidate solution set is as follows:
[0048] In the track allocation process, a sl sub-state is created for the mapping of each wire and track, which is used to save the allocation of the wire; the sl is represented as follows:
[0049] sl id ={slcost,id,bd0,bd1,...,bd t}
[0050] wherein slcost represents the total cost value of each sub-state, id represents the index of the upper layer sub-state pointed to, bd t record the boundary coordinates of the conductor set on each track in the corresponding sub-state; for each conductor, use sl state to save the state to which the conductor is allocated to each track;
[0051] In the actual allocation process, when the sl sub-state of the upper layer has the same updating effect on the conductor allocation of the subsequent steps, the sl sub-state with the maximum probability evaluation value is selected for updating;
[0052] Since the forward search cannot completely predict the conflict situation of the obstacle cost and the overlap cost, the track exchange backtracking strategy for the conductor set needs to be considered when the conflict situation is encountered; in the initial step, the updating of the current sub-state is completed by selecting the appropriate candidate state from the sub-state of the upper layer; at this time, if there is a conflict, a part of the conductors will be exchanged; specifically, according to the cost graph corresponding to the evaluation index constructed, the tracks with the lowest conflict probability after exchange are selected, and the conductor set is exchanged on these tracks; at the same time, the cost after the exchange will also be updated accordingly; if the total cost after the exchange is the same as the cost before the exchange, it is considered that the two conductor sets can be exchanged; otherwise, further backtracking and trying other possible exchange schemes will be performed;
[0053] The sub-state is updated according to the end point of the conductor and the boundary coordinates of the conductor set of the previous sub-state, and the cost updating formula is as follows:
[0054] slcost it =slcost′ it +a×blkcost+β×olcost
[0055] wherein slcost′ it represents the cost corresponding to the state to which the conductor i is allocated to track t after updating, slcost it represents the cost corresponding to the state to which the conductor i is allocated to track t before updating, a represents a very large constant, and β is set to 1.
[0056] In an embodiment of the present application, the track reallocation adopts a reallocation strategy, and in the reallocation strategy, RE is used to represent the cost change amount of the conductor ir after the track is reallocated; the calculation formula of RE is as follows:
[0057] RE=α×Δblkcost(ir,t,t′)+β×Δoverlapcost(ir,t,t′)+γ×Δwlcost(ir,t,t′)
[0058] Where Δblkcost(ir,t,t′), Δoverlapcost(ir,t,t′), and Δwlcost(ir,t,t′) represent the changes in obstacle cost, overlap cost, and line length cost when the conductor ir is redistributed from track t to track t′, respectively, and α, β, and γ represent the weights of the corresponding costs.
[0059] In one embodiment of the present invention, the asynchronous parallel accelerated computing method includes:
[0060] (1) Preprocess and calculate each possible state of obstacle cost and line length cost;
[0061] (2) The computational tasks allocated to the entire track are abstracted into a task timing diagram; each computational task is abstracted into a task node, and each task node has a corresponding predecessor node and successor node; according to the type of computational unit processed by the task, they are divided into CPU task nodes, GPU task nodes and heterogeneous task nodes. Heterogeneous task nodes indicate that the corresponding task needs to combine CPU parallelism and GPU parallelism; in heterogeneous task nodes, CPU tasks and GPU tasks also have a dependency relationship; furthermore, multiple asynchronous streams are introduced to reduce the waiting time of the GPU and allow each asynchronous stream to work independently.
[0062] In one embodiment of the present invention, the wiring resources used by each wiring strip are independent of each other, and the wiring resources on each wiring strip are dynamically allocated to a one-dimensional array by adopting a sparse row compression strategy.
[0063] Compared with the prior art, the present invention has the following advantages: The present invention provides a track allocation method based on GPU parallel acceleration, which can obtain a track allocation solution without sacrificing the quality of track allocation in a short time. Attached Figure Description
[0064] Figure 1 This is a schematic diagram of a multi-layer wiring model.
[0065] Figure 2 This is a diagram illustrating the evaluation indicators.
[0066] Figure 3 This is a schematic diagram of a wire collision.
[0067] Figure 4 This is a schematic diagram of parallel partitioning.
[0068] Figure 5 This is a diagram illustrating asynchronous scheduling. Detailed Implementation
[0069] The technical solution of the present invention will now be described in detail with reference to the accompanying drawings.
[0070] The application provides a track allocation method based on GPU parallel acceleration, comprising the following steps:
[0071] Firstly, for the global wire net, the wire is defined as a straight line between the centers of two global routing units. For the local wire net, two straight line Steiner trees are created for each local wire net, which are vertical trunk Steiner tree and horizontal trunk Steiner tree respectively. The trunks of the two trees are confirmed respectively, and the wire length of the two trees is calculated through the distance from all pins to the trunk, and the trunk with shorter wire length is selected as the extracted wire of the local wire net. As shown in the figure, Figure 1 In the global routing stage, the routing area is divided into a plurality of global routing units according to the channel width, and the routing belt of each layer is composed of a row (column) of global routing units and contains a plurality of tracks for placing wires. The wires are extracted from the global wire net and the local wire net, and the routing belt is divided into a plurality of subsets and cut, and further divided into segments.
[0072] Then, the cost graph corresponding to the evaluation index (obstacle cost, overlap cost, wire length cost) is constructed, and a forward search strategy is adopted to find the candidate solution set of the wire allocation, and each candidate solution is assigned a corresponding selection probability;
[0073] Then, the backtracking strategy is adopted to find the new candidate solution set;
[0074] Finally, the track re-allocation is performed on the wires based on the track allocation result.
[0075] The detailed implementation scheme of the application is introduced below.
[0076] Referring to Figure 2 , the evaluation index diagram, the evaluation index includes obstacle cost, overlap cost and wire length cost.
[0077] 1. Obstacle cost:
[0078] For the obstacle b occupying multiple tracks, the obstacle b and the occupied tracks are regarded as the corresponding sub-obstacles b t .
[0079] The calculation method of the obstacle cost is as follows:
[0080] bc it = olen(i, b t ), (1)
[0081] Wherein, bc it represents the obstacle cost of the wire i on the track t, and olen(i, b t ) represents the wire length of the wire i and the obstacle b tThe overlap cost between two different wires i and i' is denoted as olen(i, i'). b .
[0082] 2. Overlap cost:
[0083] The overlap cost is generated when two or more wires are assigned to the same track. Each wire has a corresponding set of wires that will overlap with it. Therefore, an adjacency list of overlap cost can be constructed. The calculation of overlap cost is as follows:
[0084] oc ii' = olen(i, i') (2)
[0085] where olen(i, i') represents the overlap cost between two different wires i and i'.
[0086] When there are multiple wires overlapping in the same segment, the calculation method of overlap cost is as follows:
[0087]
[0088] where slen tk represents the length of the kth segment on track t, oc represents the overlap cost of the track, onum tk represents the number of overlaps of wires on the kth segment on track t, T represents the set of tracks of the routing track, x it is used to save the assignment of wires. If x it is 1, it means that wire i is assigned to track t, S t represents the set of segments on track t, c ik represents whether wire i exists on the kth segment.
[0089] From the aspect of overlap cost, the overlap relationship between wires will affect the subsequent assignment of wires. Combining formulas (3)-(5), the formula can be transformed as:
[0090]
[0091] where ilen i represents the length of wire i, tlen t represents the length of track t, slen tk represents the length of the kth segment on track t, S' represents the set of segments that have not been assigned wires. t
[0092] Therefore, the result of the track assignment scheme only affects the set of segments S' that have not been assigned wires. t The total length of the wires and the total length of the tracks do not change with the change of the allocation scheme. Therefore, in order to reduce the overlap cost, it is necessary to reduce the total length of the segments of the unallocated wires.
[0093] For the wire to be allocated, the track where the segment of the unallocated wire is located is given priority. Without considering the obstacle and the wire length cost, the allocation result of the track before the segment can minimize the overlap cost.
[0094] Therefore, the allocation order of the wires and the priority of the allocation of the wires to each track should be considered. The set of wires is sorted to determine the allocation order of the wires.
[0095] 3. Wire length cost:
[0096] The pins and the wires are components inside a wire net, and a wire net contains several pins and wires. In the track allocation stage, these placed wires will be connected with other components in the wire net. The Manhattan distance sum of connecting all components inside a wire net together is the wire length cost.
[0097] 4. Look-ahead search:
[0098] Before allocating each wire, the look-ahead search is performed on each wire to make a probability evaluation of the conflict between the wire and the track and between the wires.
[0099]
[0100] This stage uses the corresponding probability evaluation value between the wire and the track to further distinguish the same sub-state, and the probability sum of the allocation of the wire to each track is 1.
[0101] where P i,t represents the probability of the allocation of the wire i to the track t, and T(i) represents the set of tracks to which the wire i can be allocated.
[0102] Some of the wires are mutually exclusive due to their overlapping relationship, and the wires are also mutually exclusive with the obstacles. Therefore, the conflict between the obstacle cost and the overlap cost can be alleviated by the look-ahead search.
[0103] According to the obtained obstacle cost bipartite graph G b , the probability of the allocation of each wire to the track can be initialized to obtain the initial probability P i,j , and the formula is as follows:
[0104]
[0105] where i represents the wire, j and k are different track numbers, m represents the number of tracks that wire i can be assigned to, and n represents the number of tracks corresponding to the minimum obstacle cost set of wire i. Equation (8) represents the probability of being equally divided by the track where the minimum obstacle cost is located. Thus, the minimization of the obstacle cost is ensured.
[0106] After the initialization of the probability, the updated probability is transmitted between the wires on the basis of the initial probability according to the previous overlapping relationship graph. The updated probability formula is as follows:
[0107]
[0108] where V(i) represents the set of wires that have an overlapping relationship with wire i, P ix,t represents the probability of wire ix being assigned to track t, oc i,ix represents the overlapping relationship between wire i and wire ix being assigned to the same track, v i,t represents the weight of wire i being assigned to different tracks.
[0109]
[0110] where v max represents the maximum value of the weight set of the wire, and equation (10) represents the difference value addition of the weights of all tracks. The greater the product of the overlapping cost and the probability on the track, the greater the expected value of the overlapping cost, and the smaller the expected value of the probability of being assigned to the track.
[0111]
[0112] where P′ i,j represents the updated wire assignment probability, and ε is a weight scaling factor of the algorithm, which is used to maintain the proportion of the current weight and normalize the updated probability.
[0113] 5. Candidate search phase:
[0114] In the track assignment process, a sl sub-state is created for the mapping of each wire and track, which is used to save the assignment of the wire. The sl is represented as follows:
[0115] sl id = {slcost, id, bd0, bd1,..., bd t} (12)
[0116] where slcost represents the total cost value of each sub-state, id represents the index of the previous layer sub-state, and bd t Then, the boundary coordinates of the wire set on each track in the state are recorded. For each wire, the sl state is used to save the state of the wire being assigned to each track.
[0117] In the actual assignment process, when the sl sub-state of the previous layer has the same updating effect on the wire assignment of the next few steps, the sl sub-state with the maximum probability evaluation value is selected for updating.
[0118] However, the above forward search cannot completely predict the conflict situation of obstacle cost and overlap cost, so the backtracking strategy of track exchange needs to be considered for the wire set when encountering conflicts.
[0119] In the initial step of the algorithm, the update of the current sub-state is completed by selecting the appropriate candidate state from the sub-state of the previous layer. At this time, if there is a conflict (such as Figure 3 shown), the obstacle cost needs to be given priority considering the obstacle and wire length costs, and the optimal solution of the obstacle cost may be obtained by sacrificing a certain overlap cost. This is because in the previous track assignment process, many sub-states are equivalent, so it is not feasible to only consider the current wire in the assignment process, and further forward search on the subsequent wires and a certain number of backtracking on the wire assignment are needed. In order to more accurately evaluate and find better candidate solutions, the backtracking strategy combines forward search on the subsequent assignment states. During backtracking, the algorithm selects a part of the wires for track exchange. Specifically, according to the constructed cost graph, the algorithm selects the tracks with the lowest conflict probability after exchange, and exchanges the wire set on these tracks. At the same time, the cost after exchange is also updated accordingly. If the total cost after exchange is the same as before, it is considered that the two wire sets can be exchanged; otherwise, the algorithm will further backtrack and try other possible exchange schemes.
[0120] The sub-state is updated according to the end points of the wire and the boundary coordinates of the wire set of the previous sub-state, and the cost update formula is as follows:
[0121] slcost′ it = slcost it + a x bc + β x oc (13)
[0122] where slcost′ it represents the cost corresponding to the updated state (the state of assigning wire i to track t), slcost it represents the cost corresponding to the updated state, a represents a very large constant, and β is set to 1.
[0123] 6. Reassignment strategy:
[0124] In the track assignment process, after track exchange, some non-critical wires will be assigned to a more expensive track, resulting in a significant increase in the resulting wire length cost. In order to reduce this situation, a redistribution strategy is adopted. Let RE represent the change in cost after wire ir is redistributed to a track. The calculation formula of RE is as follows:
[0125] RE = a x Ablkcost(ir, t, t') + b x Aoverlapcost(ir, t, t') + g x Awlcost(ir, t, t') (14)
[0126] where Ablkcost(ir, t, t'), Aoverlapcost(ir, t, t'), Awlcost(ir, t, t') represent the change in obstacle cost, overlap cost, and wire length cost, respectively, when wire ir is redistributed from track t to track t'. a, b, g represent the self-defined cost weights.
[0127] 7. Sub-wiring strip division:
[0128] As shown in Figure 4 , the wiring strip is divided into several independent smaller subsets, called sub-wiring strips, and the wire set in the wiring strip is divided, where the divided wire set and the wires of other sub-wiring strips do not overlap on the same track. The wiring resources used by each sub-wiring strip are independent of each other, and the division of sub-wiring strips does not change the position of the wires or their relative allocation order, thereby improving the running speed of the algorithm without affecting the solution quality.
[0129] 8. Asynchronous parallel strategy:
[0130] Definition 1. Cost order parallel:
[0131] In track assignment, the calculation load of obstacle cost and wire length cost is large when assigning each wire, and finer-grained division can be performed, so the pre-processing calculation of each possible state of obstacle cost and wire length cost is performed to avoid repeated calculation in the actual assignment process, and the parallel granularity can reach the order of magnitude of the product of the number of wires and the number of tracks.
[0132] Definition 2. Asynchronous task node:
[0133] In heterogeneous parallel computing, the computational tasks allocated across the entire track are abstracted into a task timing graph. Each computational task is abstracted as a task node, and each task node has corresponding predecessor and successor nodes. Based on the type of computational unit processed by the task, they can be divided into CPU task nodes, GPU task nodes, and heterogeneous task nodes. Heterogeneous task nodes indicate that the task requires a combination of CPU parallelism and GPU parallelism. Within heterogeneous task nodes, CPU tasks and GPU tasks also have certain dependencies.
[0134] In practical GPU parallel processing, data preprocessing and data transfer are typically required before parallel computation is performed on the GPU. For example... Figure 5 The diagram illustrates the task flow execution under three different scenarios. Tasks marked in red represent GPU tasks, while those marked in blue represent CPU tasks. Task 1 and Task 2 are two tasks without any dependency relationship. The leftmost diagram represents the single serial execution flow of CPU and GPU, where only one task can be executed at a time. In the first task flow execution mode, Task 2 can only begin execution after Task 1 has completed, resulting in wasted time for both CPU and GPU due to mutual waiting. Therefore, the second task flow execution mode is obtained through asynchronous adjustment to reduce its waiting time.
[0135] During GPU task computation, all GPU tasks under a single CUDA stream queue up for execution. For smaller computational tasks, GPU resources (cores and memory bandwidth) may not be fully utilized. To further improve GPU utilization, multiple CUDA streams are introduced to reduce GPU waiting time, allowing each CUDA stream to work independently and better utilize GPU resources.
[0136] Therefore, in this strategy, by combining CPU asynchronization, CPU latency will be significantly reduced in the case of a single CUDA stream. Building on this, creating multiple asynchronous streams and managing them asynchronously allows for better utilization of CPU and GPU computing resources, reducing the bottleneck of a single device and improving parallel execution efficiency.
[0137] 9. Sparse row compression strategy
[0138] The wiring resources on each wiring belt are dynamically allocated into one-dimensional arrays by adopting a sparse row compression (CSR) strategy. In order to achieve the ideal data transmission times, a dynamic data structure is used in the GPU, and the complete data needs to be stored on the GPU to provide feasibility for the task scheduling in the GPU. Due to the difference between the number of wires in each wiring belt and the existence of a large number of sparse matrices, the method is converted into a row compression method. A standard row compression structure is composed of three parts of row offset, column index and value.
[0139] The above is the preferred embodiment of the present application, any changes made according to the technical solutions of the present application, as long as the generated function does not exceed the scope of the technical solutions of the present application, belongs to the protection scope of the present application.
Claims
1. A track allocation method based on GPU parallel acceleration, characterized in that, include: A track assignment method that considers both global and local netting is proposed, and is implemented as follows: Extract conductors from global and local nets; for global nets, conductors are straight lines from the center of one global routing unit to the center of another; for local nets, create two straight Steiner trees for each local net, namely a vertical Steiner tree and a horizontal Steiner tree, identify the trunk of each Steiner tree, calculate the line length of each Steiner tree by the distance from all pins to the trunk, and select the trunk with the shorter line length as the conductor extracted from the corresponding local net; The cabling area is divided into multiple overall cabling units according to the channel width. The cabling strip consists of a row / column of overall cabling units. Each cabling strip includes several tracks for placing wires. The cabling strip is divided into several sub-cabinets and further cut into segments. Construct a cost graph corresponding to the evaluation index, adopt a look-ahead search strategy to find a set of candidate solutions for wire allocation, and assign a corresponding selection probability to each candidate solution; A backtracking strategy is used to find new candidate solutions; the traverse is reallocated based on the orbital assignment results; the method for finding new candidate solutions is as follows: During track assignment, an 'sl' sub-state is created for each traverse and track mapping to store the traverse assignment status; the 'sl' is represented as follows: sl id ={slcost,id,bd0,bd1,...,bd t } Where slcost represents the total cost value of each substate, id represents the index pointing to the previous substate, and bd represents the total cost value. t Record the boundary coordinates of the set of traverses on each track in the corresponding sub-state; for each traverse, use the sl state to save the state of the traverse assigned to each track; In the actual allocation process, when the sl substate of the previous layer plays the same updating role in the subsequent wire allocation steps, the sl substate with the highest corresponding probability evaluation value is selected for updating. In the event of a conflict, a backtracking strategy involving track swapping of the conductor sets needs to be considered. In the initial steps, the current sub-state is updated by selecting a suitable candidate state from the sub-states of the previous layer. If a conflict exists, a subset of conductor sets will be swapped. Specifically, based on the cost graph corresponding to the constructed evaluation index, the tracks with the lowest probability of conflict after swapping are selected, and conductor sets are swapped on these tracks. Simultaneously, the cost after the swap is updated accordingly. If the total cost after the swap is the same as the previous cost, the two conductor sets are considered interchangeable; otherwise, further backtracking is performed to try other possible swapping schemes. The substate is updated based on the endpoints of the conductor and the boundary coordinates of the conductor set of the previous substate. The cost update formula is as follows: slcost it =slcost′ it +a′blkcost+β 0 ×olcost slcost′ it slcost represents the cost corresponding to the state of wire i assigned to track t after the update. it This represents the cost corresponding to the state of the guide wire i assigned to track t before updating, where 'a' represents a very large constant, and β represents the cost. 0 Set to 1; A method for accelerating computation based on asynchronous parallelism is also proposed, including: (1) Preprocess and calculate each possible state of obstacle cost and line length cost; (2) The computational tasks allocated to the entire track are abstracted into a task timing diagram; each computational task is abstracted into a task node, and each task node has a corresponding predecessor node and successor node; according to the type of computational unit processed by the task, they are divided into CPU task nodes, GPU task nodes and heterogeneous task nodes. Heterogeneous task nodes indicate that the corresponding task needs to combine CPU parallelism and GPU parallelism; in heterogeneous task nodes, CPU tasks and GPU tasks also have a dependency relationship; furthermore, multiple asynchronous streams are introduced to reduce the waiting time of the GPU and allow each asynchronous stream to work independently.
2. The track allocation method based on GPU parallel acceleration according to claim 1, characterized in that, Evaluation metrics include obstacle cost, overlap cost, and line length cost.
3. A track allocation method based on GPU parallel acceleration according to claim 1 or 2, characterized in that, The specific methods for constructing cost diagrams corresponding to the evaluation indicators are as follows: (1) Barrier Costs For an obstacle b that occupies multiple tracks, consider obstacle b as a sub-obstacle b corresponding to each track it occupies. t The formula for calculating barrier costs is as follows: b.c. it =I am(i,b) t ), Among them bc it Let olen(i,b) represent the obstacle cost of conductor i on track t. t ) represents wire i and obstacle b t The overlapping costs between them; since obstacles and tracks are bound together, and the positions of obstacles are fixed, a complete bipartite graph G is constructed representing the obstacle costs corresponding to the set of wires and the set of tracks. b ; (2) Overlapping costs Assigning some conductors to the same track will result in overlap costs. Each conductor has a corresponding set of conductors that will overlap, so an adjacency list for overlap costs is constructed. The overlap cost is calculated as follows: oh ii' =I am(i,i') Where, olen(i,i′) represents the overlap cost between two different wires i and i′; When multiple conductors overlap in the same segment, the overlap cost is calculated as follows: one tk ≥0, Among them, slen tk Let oc represent the length of the k-th segment on track t, and onum represent the overlap cost of the corresponding wiring strip. tk The number of overlaps of conductors on the k-th segment of track t represents the number of overlaps, T represents the set of tracks for the wiring strip, and x represents the number of overlaps. it Used to store the wire allocation information, if x it If the value is 1, it means that conductor i is assigned to track t, I represents the set of conductors, and S t Let c represent the set of segments on orbit t. ik Indicates whether conductor i exists in the k-th segment; From the perspective of overlap cost, the overlap relationship between conductors will affect the allocation of subsequent conductors. The formula for calculating overlap cost can be modified as follows: Among them, ilen i tlen represents the length of wire i. t slen represents the length of orbit t. tk S′ represents the length of the k-th segment on track t. t Represents the set of segments that have not been assigned to conductors; The result of the track assignment scheme only affects the set S′ of segments that are not assigned to the traverse. t The total length of the conductor and the total length of the track will not change due to the change in the allocation scheme; therefore, in order to reduce the overlap cost, it is necessary to reduce the total length of the unallocated conductor segments. For the current conductor to be assigned, priority should be given to the track where the segment that has not been assigned a conductor is located; without considering obstacle costs and line length costs, the track assignment results before the segment can minimize overlap costs; therefore, the assignment order of conductors and the priority of conductors assigned to each track should be considered, the conductor set should be sorted, and the assignment order of conductors should be determined. (3) Line length cost Pins and wires are components within a wire mesh. A wire mesh contains several pins and wires. During the track assignment phase, the placed wires will connect to other components of the wire mesh. The total Manhattan distance resulting from connecting all components within a wire mesh is the wire length cost.
4. The track allocation method based on GPU parallel acceleration according to claim 3, characterized in that, The specific implementation of using a look-ahead search strategy to find a set of candidate solutions for wire assignment and assigning a corresponding selection probability to each candidate solution is as follows: Before assigning each traverse, a look-ahead search is performed on each traverse to assess the probability of conflicts between traverses and tracks, as well as between traverses. The look-ahead search uses the corresponding probability assessment values between traverses and tracks to further distinguish subsequent identical sub-states. The sum of the probabilities of a traverse being assigned to each track is 1. Where P i,t Let T(i) represent the probability that wire i is assigned to track t, and let T(i) represent the set of tracks that wire i can be assigned to. Some wires are mutually exclusive due to their overlapping relationship, and the wires and obstacles are also mutually exclusive; therefore, look-ahead search is used to alleviate the conflict between obstacle cost and overlap cost. Based on the obtained obstacle cost bipartite graph G b The probability of assigning a track to each conductor is initialized to obtain the initial probability P. i,j The formula is as follows: Where i represents the conductor, j and k are different track numbers, m represents the number of tracks that conductor i can be assigned to, and n represents the number of tracks corresponding to the set of minimum obstacle costs for conductor i; the above formula means that the probability is evenly distributed by the track with the minimum obstacle cost, thereby ensuring the minimization of obstacle cost; After initializing the probabilities, based on the previous overlap diagram, the updated probabilities are passed between the wires according to the initial probabilities; the probability update formula is as follows: Where V(i) represents the set of wires that overlap with wire i, and P ix,t oc represents the probability that wire ix is assigned to track t. i,ix This indicates the overlap relationship when conductor i and conductor ix are assigned to the same track, v i,t This represents the weight assigned to conductor i on different tracks; v_sum i =∑(v max -v i,t ),if P i,t ≠0, Where v max The formula represents the maximum value of the weight set of the conductor. The above formula means that the weights of all tracks are summed by difference. The larger the product of the overlap cost and probability on the track, the larger the expected value of the overlap cost and the smaller the expected value of the probability of being assigned to the corresponding track. Among them, P′ i,t This represents the updated wire assignment probability, where ε is the weight scaling factor used to maintain the current weight ratio and normalize the updated probability.
5. The track allocation method based on GPU parallel acceleration according to claim 1, characterized in that, Track reallocation employs a reallocation strategy, where RE represents the change in cost after track reallocation for conductor ir. The formula for calculating RE is as follows: RE=α×Δblkcost(ir,t,t′)+β×Δoverlapcost(ir,t,t′)+γ×Δwlcost(ir,t,t′) Where Δblkcost(ir,t,t′), Δoverlapcost(ir,t,t′), and Δwlcost(ir,t,t′) represent the changes in obstacle cost, overlap cost, and line length cost when the conductor ir is redistributed from track t to track t′, respectively, and α, β, and γ represent the weights of the corresponding costs.
6. The track allocation method based on GPU parallel acceleration according to claim 1, characterized in that, The wiring resources used by each wiring strip are independent of each other, and the wiring resources on each wiring strip are dynamically allocated to a one-dimensional array by adopting a sparse row compression strategy.