FPGA routing method to improve routing efficiency by splitting the wire net
By splitting the original wiring network of the FPGA, forming a network to be wired, and wiring it, the problem of low wiring efficiency of FPGA is solved, and the effect of reducing wiring time and memory usage is achieved, and the wiring timing is optimized.
Patent Information
- Application Number
- CN202111551570.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-17
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2041-12-17
AI Technical Summary
During the FPGA wiring process, the prior art is difficult to effectively improve the wiring efficiency, resulting in long wiring time, high memory usage and affecting chip performance.
By splitting the original network input by the user, several networks to be wired are formed, and each network to be wired is wired using the programmable logic resources of the FPGA, and finally merging to obtain the global routing result.
Through the split wire network, the number and space of leaks in the unfolded search can be reduced, thereby reducing the wiring running time and memory usage, improving wiring efficiency, and optimizing wiring timing and improving wiring quality.
Smart Images

Figure CN114297959B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of FPGA, and in particular to an FPGA wiring method for improving wiring efficiency by splitting a line network. Background Art
[0002] FPGA routing is the process of connecting the occupied logic units using the device's programmable interconnection resources after the chip is laid out. When routing the FPGA, it is generally necessary to abstract the programmable logic resources on the FPGA, including the interconnection resources, into a routing diagram G = (V, E). The wiring diagram has representations of all underlying modules, architectures, and interconnection resources. Each point n in V represents a routing resource or port of a resource module in the FPGA, and each directed edge e = (n1, n2) in E represents a switch from point n1 to point n2. The wire net N in the user's design netlist i When mapped to FPGA, the corresponding line network N i is the combination of its line network endpoints, including the source end s i And several drain terminals ij , wire network N i It can be regarded as a subset of V. i Routing, that is, finding a routing tree RT composed of routing resources (line segments) on G i Can i With all the t ij All connected. When routing is complete, each net in the netlist has the correct routing tree RT i , and no routing resource in the wiring diagram is shared or occupied by more than one wire net, that is, there is no routing conflict.
[0003] When routing a network, a routing algorithm such as a congestion negotiation algorithm is used to search for and route the drain end of the network. In the actual routing process of a network, the search process is often too long, which not only makes the routing time longer but also occupies more memory. At the same time, the quality of the routing results will also affect subsequent processes and even chip performance. Therefore, how to improve the routing efficiency of FPGA becomes a key consideration in the design process. Summary of the invention
[0004] In view of the above problems and technical requirements, the inventors have proposed an FPGA wiring method for improving wiring efficiency by splitting the wire net. The technical solution of the present invention is as follows:
[0005] A FPGA wiring method for improving wiring efficiency by splitting a line network, the method comprising:
[0006] For each original net in the netlist input by the user, if it is determined based on the net characteristics of the original net that the original net does not meet the preset splitting condition, the original net is directly used as a net to be routed;
[0007] If it is determined based on the network characteristics of the original network that the original network meets the preset splitting condition, then according to the predetermined splitting principle, the network endpoints are selected from the original network as splitting points, and the splitting forms multiple virtual points with overlapping layout positions. The original network is split into a plurality of networks to be wired based on the network endpoints in the original network and the formed virtual points. The plurality of virtual points sharing the same layout position are respectively located in a plurality of different networks to be wired, and the network endpoints include a source terminal and a plurality of drain terminals respectively connected thereto.
[0008] The programmable logic resources of the FPGA are used to route each to-be-routed net in the user-input netlist to obtain a sub-routing result, and each sub-routing result is merged to obtain a global routing result corresponding to the FPGA.
[0009] The beneficial technical effects of the present invention are:
[0010] The present application discloses an FPGA routing method for improving routing efficiency by splitting a network. The method detects whether the original network meets preset splitting conditions based on the characteristics of the network endpoints related to the routing efficiency of the original network and the signal type characteristics of the original network. When it is determined that meeting the preset conditions may result in low routing efficiency, the original network is split into multiple networks to be routed to improve routing efficiency. Specifically, by splitting the original network into networks to be routed, when each network to be routed is wound / rewound, the number of drain terminals to be searched and / or the space to be searched can be reduced, thereby reducing the routing running time and memory usage to improve routing efficiency. The method can also reduce the path delay to optimize the routing timing, thereby improving the routing quality to improve the routing efficiency.
[0011] When the original network is split, split points are selected according to one or more predetermined splitting principles for different situations to split the original network, so that the wiring efficiency can be optimized from multiple aspects at the same time. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Figure 1 It is a comparative schematic diagram of the corresponding method of selecting splitting points when the original wire network meets different preset splitting conditions in the present application.
[0013] Figure 2 It is a schematic diagram of a direct connection path formed when the original wire network is routed according to a conventional routing method in an embodiment of the present application, and a comparative schematic diagram of corresponding paths located in two wire networks to be routed that are formed after the original wire network is split according to the method of the present application.
[0014] Figure 3 It is a wiring schematic diagram of multiple to-be-wired nets formed respectively when a source end is selected as a splitting point for an original wire net whose distribution discreteness reaches a predetermined discreteness in an embodiment of the present application.
[0015] Figure 4 In another embodiment of the present application, when the nearest endpoints of the existing to-be-wired nets are selected as splitting points for the original nets whose distribution discreteness reaches a predetermined discreteness, wiring schematic diagrams of multiple to-be-wired nets are formed respectively. DETAILED DESCRIPTION
[0016] The specific implementation of the present invention will be further described below in conjunction with the accompanying drawings.
[0017] The present application discloses an FPGA wiring method for improving wiring efficiency by splitting a wire net. The method has completed the layout of the FPGA before execution. Therefore, according to the layout result of the FPGA, the positions of all wire net endpoints of each original wire net (Net) in the user input netlist can be determined. The wire net endpoints include a source terminal (Source) and a plurality of drain terminals (Sink) respectively connected thereto.
[0018] For each original net in the user-input netlist, routing is not performed directly, but it is first checked whether it meets the preset splitting conditions. If the original net does not meet the preset splitting conditions, the original net is directly used as the net to be routed and the routing operation is performed directly afterwards.
[0019] When it is determined that the original wire net meets the preset splitting conditions, the wire net endpoints are selected from the original wire net as splitting points according to the predetermined splitting principle, and the splitting forms multiple virtual points whose layout positions overlap on the wiring diagram. Then, based on the original wire net endpoints in the original wire net and the formed virtual points, the original wire net is split into several wire nets to be wired. Each wire net to be wired includes some destination points in the original wire net, and multiple virtual points sharing the same layout position are respectively located in multiple different wire nets to be wired, so that these multiple different wire nets to be wired are connected through virtual points. Generally, all original wire nets are processed first to obtain all wire nets to be wired, and then the wiring operation is uniformly performed. The programmable logic resources of the FPGA are used to wire each wire net to be wired, including initial wiring and detailed wiring to obtain sub-wiring results, and then the sub-wiring results are merged to obtain the global wiring result corresponding to the FPGA.
[0020] In conventional practice, the original wire net is directly used as the smallest unit for initial winding, and the original wire net is also used as the smallest unit to be unplugged and rewound in the detailed wiring stage. However, after the original wire net that meets the preset splitting conditions is split, each wire net to be wired is used as the smallest unit, and the wire net to be wired is used as the smallest unit for initial winding in the initial winding stage, and the wire net to be wired is also used as the smallest unit to be unplugged and rewound in the detailed wiring stage.
[0021] This application mainly detects whether the original wire net meets the preset splitting conditions based on the wire net characteristics of the original wire net. The wire net characteristics mainly include the characteristics of the wire net endpoints in the original wire net and the signal type characteristics of the original wire net. These characteristics will have a greater impact on the wiring efficiency of the original wire net. The characteristics of the wire net endpoints mainly include the number of wire net endpoints and / or the distribution of wire net endpoints. The signal type characteristics mainly include whether the original wire net is on the timing critical path and / or whether it involves multiple types of signals. Specifically:
[0022] When it is determined that the number of wire net endpoints in the original wire net meets the preset conditions, and / or, the distribution discreteness of the wire net endpoints in the original wire net reaches the predetermined discreteness, and / or, the original wire net passes through the timing critical path in the user input netlist, and / or, the original wire net includes at least two different types of drain terminals and involves multiple types of signals, it is determined that the original wire net meets the preset splitting conditions. The predetermined splitting principles under different preset splitting conditions are slightly different. This application introduces various preset splitting conditions and corresponding predetermined splitting principles as follows. Please refer to the following for details. Figure 1 :
[0023] 1. When it is determined that the number of the wire network endpoints in the original wire network meets the preset condition, it is determined that the original wire network meets the preset splitting condition. This can be further specifically divided into the following two types:
[0024] (1) When the total number of wire net endpoints in the original wire net exceeds the first preset threshold, it means that the number of wire net endpoints in the original wire net meets the preset conditions. The first preset threshold is a custom value. This situation is manifested as a large number of wire net endpoints in the original wire net. Since the original wire net includes a source terminal and multiple drain terminals, this situation is actually manifested as a large number of drain terminals in the original wire net. When the number of drain terminals in the original wire net is large, if the original wire net is directly used as the smallest unit for rewinding as in the conventional practice, all drain terminals need to be searched and rewound, which takes a long time. After the original wire net is split into multiple wire nets to be wired, the number of drain terminals contained in each wire net to be wired is greatly reduced. Each time, only the wire net to be wired can be rewound without rewinding the entire original wire net, which can greatly reduce the time consumption of rewinding. Therefore, in this case, the wiring efficiency can be improved by splitting the original wire net.
[0025] In this case, the operation of selecting the network endpoints from the original network as the splitting points according to the predetermined splitting principle is: the minimum spanning tree in which the network endpoints are connected in sequence is formed by the minimum spanning tree algorithm for all the network endpoints inside the original network. The minimum spanning tree reflects the access order of each network endpoint from the source end during the wiring process of the original network. Common minimum spanning tree algorithms include Prim and Kruskal algorithms. Then, according to the access order, the network endpoints at no more than K network endpoints starting from the most recent source end or virtual source end are selected as the splitting points, and the virtual drain end and virtual source end with overlapping layout positions are formed at the same time, that is, the total number of network endpoints including the most recent source end or virtual source end, the selected splitting point and the two does not exceed K, K is the first preset threshold. Then each network to be wired obtained by splitting includes all network endpoints between the splitting point and the most recent source end or virtual source end. Therefore, the number of network endpoints included in each network to be wired obtained by splitting can be equal or unequal, and the number of network endpoints included in all networks to be wired does not exceed K, but can also be less than K.
[0026] For example, the original network includes 1 source end and 49 drain ends, a total of 50 network endpoints. The corresponding minimum spanning tree is formed using the minimum spanning tree algorithm, which is represented in sequence as source end, drain end 1, drain end 2, drain end 3...drain end 49. Assuming that the first preset threshold is 10, no more than 10 network endpoints are selected from the first source end in the access order. For example, drain end 9 can be selected as the split point, and the source end, drain end 9 and drain ends 1 to 8 between the two form a total of 10 network endpoints. Alternatively, drain end 8 can be selected as the split point, and the source end, drain end 8 and drain ends 1 to 7 between the two form a total of 9 network endpoints. Other situations are similar.
[0027] Taking drain terminal 9 as the split point as an example, drain terminal 9 forms a virtual drain terminal and a virtual source terminal with overlapping layout positions. For the network endpoints whose access order is after drain terminal 9, drain terminal 9 is its nearest virtual source terminal. According to the above principle, starting from drain terminal 9 forming the virtual source terminal, no more than 10 network endpoints are selected. For example, drain terminal 18 is selected as the split point, and the nearest virtual source terminal (formed by drain terminal 9), drain terminal 18, and drain terminals 10 to 17 between the two form a total of 10 network endpoints.
[0028] The first network to be wired obtained by the splitting includes all network endpoints between the first splitting point (drain terminal 9) and the previous most recent source terminal, including the virtual drain terminal formed by the splitting point and the most recent source terminal and all drain terminals between the two, that is, the first network to be wired includes the source terminal, drain terminals 1 to 8 and the virtual drain terminal formed by drain terminal 9.
[0029] The second network to be routed obtained by splitting includes all network endpoints between the second splitting point (drain terminal 18) and the previous most recent virtual source terminal (drain terminal 9), including the virtual drain terminal formed by the second splitting point and the most recent virtual source terminal and all drain terminals between the two, that is, the second network to be routed includes the virtual source terminal formed by drain terminal 9, drain terminals 10 to 17 and the virtual drain terminal formed by drain terminal 18.
[0030] The method for determining other splitting points can be continued in the same way, thereby obtaining various splitting points, and then obtaining various to-be-wired nets according to the above process.
[0031] In particular, when the original network is a clock signal and all drain ends are clock inputs of various modules, or when the original network is an asynchronous signal and all drain ends are Set / Reset inputs of various modules, even if the total number of network endpoints in the original network exceeds the first preset threshold, splitting is not required because the clock tree can be followed in these two cases.
[0032] (2) When the total number of network endpoints in at least one direct path in the original network exceeds the second preset threshold, it means that the number of network endpoints in the original network meets the preset condition, wherein the direct path refers to the path between network endpoints starting from the source end to the end. Conventional wiring algorithms generally search for each drain end from the source end based on the access order reflected by the minimum spanning tree. As mentioned above, during the execution of the minimum spanning tree, the access order is determined based on the distance between network endpoints. Some drain ends are closest to the source end, but some drain ends are closest to other drain ends. When wiring, some drain ends are directly connected to the source end, while some drain ends need to be connected to the source end through other drain ends. Generally, the drain end that is far away from the source end usually needs to be connected to the source end through one or more other drain ends. Based on the minimum spanning tree, the number of network endpoints in each direct path of the source end can generally be determined.
[0033] When there are many net endpoints in a direct path, it means that the drain at the end needs to pass through a large number of other drains before it can be connected to the source. In this case, the operation of selecting a net endpoint from the original net as a split point according to a predetermined splitting principle is: for a direct path containing a total number of net endpoints exceeding a second preset threshold, the source end is selected as a split point, and multiple virtual source ends with overlapping layout positions are formed at the same time. Each net to be wired includes a split point and P-1 drains in the original connection order in the direct path, where P is the second preset threshold, and the original connection order is the order from the source end to the end of the net endpoint. That is, it is equivalent to splitting the direct path and connecting the drain that should have been connected to other drains to the virtual source end.
[0034] for example Figure 2In the example, the original shape represents a source end in an original network, and the square represents all drain ends in the original network. In an extreme case, according to the conventional wiring method, drain ends A, B, C, and D are connected in sequence to form a direct path to the source end. According to the method of the present application, assuming that the second threshold is 3, the source end is selected as the split point, such as Figure 2 As shown, the source end is split into two virtual source ends. For the sake of convenience, this application defines that all the source ends obtained after the source end is split are called virtual source ends, and the original source end no longer exists. Figure 2 The two virtual source ends in are completely overlapped, but for the convenience of illustration, the layout positions are staggered in this application, and the subsequent other illustrations are similar. Figure 2 In the schematic diagram shown, the original connection sequence is source terminal, drain terminal D, drain terminal C, drain terminal B, drain terminal A, so two waiting-to-be-wired nets can be formed, one waiting-to-be-wired net includes a virtual source terminal, drain terminal D and drain terminal C, and the other waiting-to-be-wired net includes another virtual source terminal, drain terminal B and drain terminal A, as shown in FIG. Figure 2 As shown. Figure 2 In the left approach, the drain terminal A is connected to the source terminal through four shorter wiring segments, and Figure 2 In the approach of the present application on the right side, the drain terminal A is connected to the source terminal through a shorter wiring segment and a longer wiring segment. This approach of the present application can significantly improve the timing and reduce the subsequent rewiring process to meet the timing requirements, thereby improving the wiring efficiency by optimizing the timing.
[0035] 2. When the distribution discreteness of the endpoints of the original wire net reaches a predetermined discreteness, it is determined that the original wire net meets the preset splitting condition. When the distribution discreteness of the endpoints of the wire net in the original wire net reaches a predetermined discreteness, it means that the endpoints of the wire net in the original wire net, that is, the drain terminals, are relatively discrete. Whether in the initial wiring stage or the detailed wiring stage, when searching for the drain terminals using the pathfinding negotiation algorithm, the larger the space to be searched, the longer the search time is, which not only makes the wiring time long but also occupies more memory. After the original wire net is split into multiple wire nets to be wired, the layout positions of the wire net endpoints in each wire net to be wired are relatively concentrated, and the search space is smaller when wiring each wire net to be wired, thereby reducing time consumption and memory occupancy. Therefore, in this case, the wiring efficiency can be improved by splitting the original wire net.
[0036] In this case, there are two methods to detect and find the split point.
[0037] (1) Using the minimum spanning tree algorithm, this approach can simultaneously find the split point while judging that the original wire network meets the preset split condition. Specifically: For all the wire network endpoints in the original wire network, the minimum spanning tree is formed by the minimum spanning tree algorithm, and the minimum spanning tree reflects the access sequence of each wire network endpoint from the source end during the wiring process of the original wire network. This step is similar to (1) in the first case above, and this application will not describe it in detail.
[0038] When it is determined that the distance between two connected wire net endpoints in the minimum spanning tree exceeds the node distance threshold, it is determined that the distribution discreteness of the wire net endpoints in the original wire net reaches a predetermined discreteness. In the process of executing the minimum spanning tree algorithm, in addition to obtaining the access order of each wire net endpoint, the distance between two connected wire net endpoints can also be obtained, because the minimum spanning tree algorithm is sorted based on the distance between the wire net endpoints.
[0039] In this case, the network endpoints are selected from the original network as splitting points according to the predetermined splitting principle, including: taking the network endpoint whose distance to the previous network endpoint connected in the minimum spanning tree exceeds the node distance threshold as the splitting point, and forming a virtual drain terminal and a virtual source terminal with overlapping layout positions at the same time, and each network to be wired includes all network endpoints between the splitting point and the previous most recent source terminal or virtual source terminal.
[0040] For example, the original network includes 8 network endpoints, including 1 source and 7 drains. During the execution of the minimum spanning tree algorithm, the endpoint set is initialized to an empty set. The source is first placed in the endpoint set, and the drain closest to the source is found among the remaining 7 drains. Assuming that drain 1 is closest to the source and does not exceed the node distance threshold, drain 1 is placed in the endpoint set. From the remaining 6 drains, find the drain closest to the point in the endpoint set (that is, the source and drain 1 at this time). Assuming that drain 2 is closest to drain 1 and does not exceed the node distance threshold, drain 2 is placed in the endpoint set. This operation is repeated in sequence, and the order in which it is placed in the endpoint set is the access order of the network endpoints, and the distance between every two connected network endpoints can be determined. Assume that the order obtained in this way is expressed as source terminal, drain terminal 1, drain terminal 2, drain terminal 3...drain terminal 7, wherein the distance between drain terminal 3 and drain terminal 2 exceeds the node distance threshold, and the distance between drain terminal 5 and drain terminal 4 exceeds the node distance threshold, then drain terminal 3 and drain terminal 5 are selected as splitting points respectively. The first network to be wired obtained by splitting includes the source terminal, drain terminal 1, drain terminal 2 and a virtual drain terminal formed by drain terminal 3, the second network to be wired includes a virtual source terminal formed by drain terminal 3, a virtual drain terminal formed by drain terminal 4 and drain terminal 5, and the third network to be wired includes a virtual source terminal formed by drain terminal 5, drain terminal 6 and drain terminal 7.
[0041] Since the distance between the network endpoints can be determined synchronously in the process of obtaining the access order, the split point can also be determined synchronously. For example, in the above process, there is no need to determine the complete access order before selecting drain terminal 3 and drain terminal 5. Instead, drain terminal 3 can be placed in the endpoint set while determining drain terminal 3 as the split point, continuing to execute the method, and then determining drain terminal 5 as the split point.
[0042] (2) Clustering the layout positions of all drain terminals in the original wire net, various existing clustering methods can be used. When clustering forms at least two clusters, it is determined that the distribution discreteness of the wire net endpoints in the original wire net reaches a predetermined discreteness, the layout positions of the wire net endpoints in the same cluster are relatively close, and the layout positions of the wire net endpoints in different clusters are relatively discrete. Figure 3 As shown in the figure, the circle represents the source end, the square represents the drain end, and the layout positions of the drain ends in the original network are clustered into three clusters, which are respectively recorded as cluster 1, cluster 2 and cluster 3. The drain ends contained in each cluster are represented by dotted lines. In general, the drain ends are around the source ends, which are represented by Figure 3 It can be seen that the drain end may be distributed in different directions around the source end.
[0043] In this case, the number of nets to be routed obtained by splitting is usually equal to the number of clusters formed by clustering. There are two ways to select the endpoints of the original net as splitting points according to the predetermined splitting principle:
[0044] In one embodiment, the source end of the original network is selected as the split point to form a number of virtual source ends with overlapping layout positions. Figure 3 As shown in , the source end is split into three virtual source ends with overlapping layout positions. Each network to be routed includes all drain ends in a cluster formed by the split point and the cluster. That is, if the layout positions of all drain ends are clustered to form T clusters, the source end is split into T virtual source ends, each virtual source end corresponds to a cluster, and each virtual source end and all drain ends in a corresponding cluster form a network to be routed, thereby forming a total of T networks to be routed, as shown in Figure 3 The corresponding relationship between each virtual source terminal and a corresponding drain terminal in a cluster is shown, and the wiring schematic diagram of each to-be-wired network is shown exemplarily. In this embodiment, all to-be-wired networks actually use the source terminal in the original network as the virtual source terminal.
[0045] In another embodiment, a network to be wired is formed by a source end and all drain ends in a cluster closest to it. The distance between the source end and each cluster, that is, the distance between a point and a point set, can be determined based on various existing distance calculation algorithms, and this application does not limit this. Assume that Figure 4 In the example, the source end is closest to cluster 2, so the source end forms a network to be routed corresponding to cluster 2.
[0046] Select a wire endpoint in the constructed net to be wired that is closest to the remaining clusters as the split point, that is, calculate the distance between each wire endpoint in the constructed net to be wired and each remaining cluster, select a group of wire endpoints and clusters with the closest distance, and use the wire endpoint in the combination as the split point. This split point may be a source end or any drain end in the constructed net to be wired. The split point simultaneously splits the virtual drain end in the constructed net to be wired and the virtual source end corresponding to the remaining closest cluster at the layout position. The formed virtual source end and the remaining closest cluster form a net to be wired. Assume that Figure 4 In the example of , it is determined by calculation that a drain terminal in cluster 2 is closest to cluster 3, then the drain terminal in cluster 2 is selected as the split point and split into a virtual drain terminal and a virtual source terminal, such as Figure 4 As shown in the figure, the virtual source end formed by the split and the cluster 3 that is closest to it constitute a network to be routed. Continue the above process, and the split point selected next time is the end point of the network in the network to be routed, which may be the source end, or the drain end in cluster 2, or the drain end in cluster 3, and repeat this cycle until all the networks to be routed are determined. Figure 4 The schematic diagram of the connection between the source terminal / virtual source terminal and the corresponding drain terminal in each to-be-wired network is exemplarily shown.
[0047] 3. When the original network passes through the timing critical path in the user input netlist, determine whether the original network meets the preset splitting condition. Select the source end of the original network as the splitting point, form several virtual source ends with overlapping layout positions, and form a network to be routed by the splitting point and each drain end on the timing critical path, and form a network to be routed by the splitting point and all drain ends not on the timing critical path.
[0048] In this case, according to the conventional wiring method, the drain end on the timing critical path may need to pass through many other drain ends before connecting to the source end, resulting in a large delay. If the timing design is to be met, further adjustments will be required later. In this case, the present application splits each drain end on the timing critical path and forms a network to be wired with the source end, so that the drain end on the timing critical path can be directly connected to the source end without passing through other drain ends. This splitting operation is conducive to optimizing timing and improving wiring efficiency and performance.
[0049] 4. When the original network includes at least two different types of drains and involves multiple types of signals, drains of the same type are grouped into a set, and a network to be routed is formed by the source and all drains in a set. A network endpoint that is closest to the remaining sets in the network to be routed is selected as a split point. The split point is split at the layout position to form a virtual drain in the network to be routed and a virtual source corresponding to the remaining set with the closest distance. The formed virtual source and the remaining set with the closest distance form a network to be routed.
[0050] Similar to the above case 3, however, in this case, the drains are clustered not by their layout positions, but by their types. The type corresponding to the set of source terminals constituting the to-be-wired net is selected first and can be configured according to the actual situation. Generally, it is a set of the type with the largest number of drains in the original net. For example, in an example, when the original net is a clock net, most of the drains are clock inputs of various modules, and some of the drains are lookup table inputs (to generate a Gated Clock). The drains can be divided into two categories based on this, one is the drain connected to the clock input, and the other is the drain connected to the lookup table input. All the drains connected to the clock input and the source terminals can be selected first to form a to-be-wired net, and then the split point is selected from the first to-be-wired net to form a virtual source terminal and all the drains connected to the lookup table input to form a to-be-wired net. In this way, when the second to-be-wired net needs to be split and rewound due to a conflict, it does not affect the first to-be-wired net. Since the number of drains in the first to-be-wired net is large, this approach can effectively reduce the time consumption of rewiring and improve the efficiency of rewiring.
[0051] For example, most of the drains in the Set / Reset network are the Set / Reset inputs of the register, and a small part of the drains are the lookup table inputs. The original network can be split according to these two types of drains, and the source end and all the drains connected to the Set / Reset inputs of the register form the first network to be wired. Then, the splitting point is selected from the first network to be wired to form a virtual source end and all the drains connected to the lookup table inputs form the second network to be wired.
[0052] The above application introduces each preset splitting condition of the original wire network and the corresponding predetermined splitting principle. In actual application, the original wire network may meet one or more of the above preset splitting conditions at the same time. For example, if the total number of wire network endpoints in the original wire network exceeds the first preset threshold and the distribution discreteness of the wire network endpoints reaches the predetermined discreteness, then the splitting can be performed first according to the predetermined splitting principle corresponding to one of the preset splitting conditions. It is possible that after the splitting, the problems corresponding to multiple preset splitting conditions are solved at the same time. For example, after the layout positions of the drain terminals are clustered and split according to the above situation 2, not only the distribution discreteness of each wire network to be wired meets the requirements, but also the total number of wire network endpoints in each wire network to be wired does not exceed the first preset threshold. Alternatively, it is also possible that after the splitting according to the predetermined splitting principle corresponding to one of the preset splitting conditions, all requirements cannot be met. For example, in the above example, the total number of wire network endpoints in each wire network to be wired may still exceed the first preset threshold. At this time, the predetermined splitting principle of situation 1 must be combined at the same time. Therefore, if the original wire network meets multiple preset splitting conditions, it can actually be regarded as a combination of the predetermined splitting principles under the above multiple preset splitting conditions.
Claims
1. A FPGA wiring method for improving wiring efficiency by splitting a wire net, characterized in that: The method comprises: For each original net in the netlist input by the user, if it is determined based on the net characteristics of the original net that the original net does not meet the preset splitting condition, the original net is directly used as a net to be routed; If it is determined based on the wire net features of the original wire net that the original wire net meets the preset splitting condition, then according to the predetermined splitting principle, a wire net endpoint is selected from the original wire net as a splitting point, and a plurality of virtual points whose layout positions overlap are formed by splitting, and the original wire net is split into a plurality of wire nets to be wired based on the wire net endpoints in the original wire net and the formed virtual points, and the plurality of virtual points sharing the same layout position are respectively located in a plurality of different wire nets to be wired, and the wire net endpoints include a source end and a plurality of drain ends respectively connected thereto; Utilize the programmable logic resources of FPGA to route each to-be-routed net in the netlist input by the user to obtain sub-routing results, and merge each sub-routing result to obtain the global routing result corresponding to FPGA; Among them, when it is determined that the number of network endpoints in the original network meets the preset conditions, and / or, the distribution discreteness of the network endpoints in the original network reaches a predetermined discreteness, and / or, the original network passes through the timing critical path in the user-input netlist, and / or, the original network includes at least two different types of drain terminals, it is determined that the original network meets the preset splitting conditions.
2. The method according to claim 1, characterized in that When it is determined that the total number of wire mesh endpoints in the original wire mesh exceeds a first preset threshold, and it is determined that the number of wire mesh endpoints in the original wire mesh meets a preset condition, then selecting a wire mesh endpoint as a split point from the original wire mesh according to a predetermined splitting principle includes: A minimum spanning tree is formed for all the network endpoints inside the original network through a minimum spanning tree algorithm, in which the network endpoints are connected in sequence. The minimum spanning tree reflects the access order of each network endpoint starting from the source end during the wiring process of the original network. Then, according to the access order, network endpoints at no more than K network endpoints starting from the most recent source end or virtual source end are selected as splitting points, and virtual drain ends and virtual source ends with overlapping layout positions are formed at the same time, K is the first preset threshold, and each network to be wired includes all network endpoints between the splitting point and the most recent source end or virtual source end.
3. The method according to claim 1, characterized in that When it is determined that the total number of network endpoints in at least one direct path in the original network exceeds a second preset threshold, and it is determined that the number of network endpoints in the original network meets a preset condition, then selecting network endpoints from the original network as splitting points according to a predetermined splitting principle includes: For a direct connection path in which the total number of line network endpoints exceeds the second preset threshold, the source end is selected as the splitting point and multiple virtual source ends with overlapping layout positions are formed. Each network to be wired includes a splitting point and P-1 drain ends in the direct connection path in the original connection order, where P is the second preset threshold, wherein the direct connection path refers to the path from the source end to the end of the line network endpoint, and the original connection order is the order from the source end to the end of the line network endpoint.
4. The method according to claim 1, characterized in that A minimum spanning tree is formed for all the wire network endpoints in the original wire network through a minimum spanning tree algorithm, in which the wire network endpoints are connected in sequence. The minimum spanning tree reflects the access order of each wire network endpoint from the source end during the wiring process of the original wire network. When it is determined that the distance between two connected wire network endpoints in the minimum spanning tree exceeds the node distance threshold, it is determined that the distribution discreteness of the wire network endpoints in the original wire network reaches a predetermined discreteness.
5. The method according to claim 4, characterized in that The step of selecting the endpoints of the wire network as splitting points from the original wire network according to a predetermined splitting principle includes: A net endpoint whose distance to the previous net endpoint connected to the minimum spanning tree exceeds the node distance threshold is used as a split point, and a virtual drain terminal and a virtual source terminal with overlapping layout positions are formed at the same time, and each net to be routed includes all net endpoints between the split point and the previous most recent source terminal or virtual source terminal.
6. The method according to claim 1, characterized in that The layout positions of all drain terminals in the original wire net are clustered, and when the clustering forms at least two clusters, it is determined that the distribution discreteness of the wire net endpoints in the original wire net reaches a predetermined discreteness.
7. The method according to claim 6, characterized in that The step of selecting the endpoints of the wire network as splitting points from the original wire network according to a predetermined splitting principle includes: Selecting the source end of the original wire net as a split point to form a plurality of virtual source ends with overlapping layout positions, each wire net to be wired includes all drain ends in a cluster formed by the split point and the cluster; Alternatively, a network to be wired is formed by a source end and all drain ends in a cluster closest to it, and a network endpoint in the network to be wired that is closest to the remaining clusters is selected as a splitting point. The splitting point is split at the layout position to simultaneously form a virtual drain end in the network to be wired and a virtual source end corresponding to the remaining cluster closest to it, and a network to be wired is formed by the formed virtual source end and the remaining cluster closest to it.
8. The method according to claim 1, characterized in that When the original wire network includes at least two different types of drain terminals, the step of selecting a wire network endpoint from the original wire network as a splitting point according to a predetermined splitting principle includes: The drain terminals of the same type are formed into a set, and a network to be routed is formed by the source terminal and all the drain terminals in a set. For each other set, the endpoint of the network to be routed that is closest to the current set in the constructed network to be routed is selected as the split point, and a virtual drain terminal in the network to be routed where the split point is located and a virtual source terminal corresponding to the current set are formed at the same time. A network to be routed is formed by the virtual source terminal and the drain terminals in the current set.
9. The method according to claim 1, characterized in that: When the original wire net passes through the timing critical path in the netlist input by the user, the method of selecting the wire net endpoints from the original wire net as the splitting points according to the predetermined splitting principle includes: The source end of the original network is selected as a split point to form a plurality of virtual source ends with overlapping layout positions. The split point and each drain end on the timing critical path constitute a network to be routed, and the split point and all drain ends not on the timing critical path constitute a network to be routed.
10. The method according to claim 1, characterized in that During the iteration process, the wires are unplugged and rewound based on the smallest unit of the net to be routed.
Citation Information
Patent Citations
Parallel wiring method based on set partitioning
CN106528919A
Netlist segmentation method using multi-bare-chip structure FPGA layout result
CN113128151A