Conditional cyclic circuit partitioning method based on balanced weight and minimum edge cut

By adopting the method of circulating circuit division based on the equilibrium power value and minimum edge cutting in the segmentation of the door circuit, the problem of unbalanced value and high communication cost between the segments and the high cost of communication are solved, and the relative balance between the power and value between the segments and the Taking into account the cost of low communication.

CN112784510BActive Publication Date: 2025-01-24SHENZHEN STATE MICRO TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110262496.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-03-10
Publication Date
2025-01-24
Estimated Expiration
2041-03-10

AI Technical Summary

Technical Problem

The prior art is difficult to achieve the balance of weights between blocks and low communication costs in gate circuit segmentation.

Method used

Put forward a conditioning method based on a balanced power value and minimum cutting circuit circuit division method. By converting the door circuit into an inexplicable graph, calculating the total weight and determining the mean limit, the penetration of the apex , Until each episode meets the preset threshold range.

Benefits of technology

In a process, the privileges and low communication costs are relatively balanced and low after the gate circuit segmentation is better realized, and multiple global operations have been avoided, and the amount of calculation is reduced step by step.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112784510B_ABST
    Figure CN112784510B_ABST
Patent Text Reader

Abstract

The present invention proposes a conditional cyclic circuit segmentation method based on balanced weights and minimum edge cuts, including: step S1: converting the gate circuit into an undirected graph, calculating the total weights of all vertices, and determining the mean limit based on the total weight; step S2: starting from any edge vertex, adding the currently traversed vertex to the root point set until the sum of the weights of all vertices in the root point set meets the mean limit; step S3: screening the vertices in the root point set, traversing the vertices outside the root point set, and merging the connected vertices outside the root point set into a subset; step S4: outputting a set whose sum of weights meets a preset threshold range, and re-dividing the set that does not meet the threshold range until each set meets the preset threshold range. Compared with the prior art, the present invention can better achieve the two purposes of relative balance of weights between different blocks after gate circuit segmentation and low communication cost in one process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a circuit segmentation method for gate-level simulation, in particular to a conditional cyclic circuit segmentation method based on balanced weights and minimum edge cuts. Background Art

[0002] Existing gate circuit partitioning methods include the mobile iteration improvement method based on the FM algorithm, and the K-way balanced partitioning method based on the approximate algorithm. The mobile iteration method based on FM is completed through the mobile iteration of a single vertex, aiming to reduce the number of connections between partition modules, that is, the communication cost between modules. The FM method needs to calculate the current global gain once after each vertex movement, which will consume a long computing time. The K-way balanced partitioning method can achieve an approximate balanced effect on the segmentation of the graph, but due to problems such as circuit network clustering and connectivity, partitioning based on balance alone cannot achieve good results.

[0003] Therefore, how to design a conditional cyclic circuit partitioning method based on balanced weights and minimum edge cuts, which can simultaneously achieve relative balance of weights between blocks after circuit segmentation and low communication cost, is a technical problem that needs to be solved urgently in the industry. Summary of the invention

[0004] In view of the problem that the existing algorithms cannot simultaneously take into account the relative balance of weights and low communication costs between blocks after segmentation, the present invention proposes a conditional cyclic circuit segmentation method based on balanced weights and minimum edge cuts.

[0005] The technical solution of the present invention is to propose a conditional cyclic circuit segmentation method based on balanced weights and minimum edge cuts, comprising: step S1: converting a gate circuit into an undirected graph, calculating the total weights of all vertices, and determining a mean value limit based on the total weights;

[0006] Step S2: Start traversing from any edge vertex, and add the currently traversed vertex to the root point set until the sum of the weights of all vertices in the root point set meets the mean limit;

[0007] Step S3: Screen the vertices in the root point set, traverse the vertices outside the root point set, and merge the connected vertices outside the root point set into a subset;

[0008] Step S4: output the set whose weight sum satisfies the preset threshold range, and re-divide the set that does not satisfy the threshold range until each set satisfies the preset threshold range, the set including the root point set and the subset.

[0009] Further, the step S2 comprises:

[0010] Step S21: select any edge vertex as the traversal starting point, traverse along the connecting line of the traversal starting point, and merge the currently traversed vertex into the root point set;

[0011] Step S22: Determine whether the sum of the weights of all vertices in the current root point set reaches the mean limit, if so, stop traversing and execute step 3, otherwise continue traversing.

[0012] Furthermore, when traversing the vertices in step S21, the traversed vertices are numbered at the same time, and the traversal algorithm adopts a breadth-first algorithm. The numbers are sequentially numbered from the traversal starting point to the outermost vertex explored by the breadth-first algorithm, and all vertices in the same layer are numbered the same.

[0013] Furthermore, after traversing and labeling the vertices in step S21, the vertices adjacent to the outermost vertices are recorded based on the vertex labels and the recording results are saved. In step 3, the vertices in the root point set are screened based on the recording results.

[0014] Further, recording the vertices adjacent to the outermost vertices based on the vertex numbers and saving the recording results specifically includes:

[0015] Step S23: based on the labels of the vertices, storing the vertices adjacent to the outermost vertices and outside the root point set into the first space;

[0016] Step S24: storing the vertices adjacent to the outermost vertices and located in the root point set into the second space;

[0017] Step S25: storing the vertices whose adjacent vertices are all the outermost vertices into the third space.

[0018] Furthermore, the step S3 of screening the vertices in the root point set includes:

[0019] Step S31: remove vertices that exist in both the first space and the third space from the first space; add vertices that exist in the third space and are adjacent to the outermost vertices to the second space;

[0020] Step S32: sequentially calculating the number of vertices adjacent to the outermost vertex in the first space and the second space, and storing the numerical results in the corresponding first space and the second space instead of the vertex;

[0021] Step S33: Compare the values ​​in the first space and the second space corresponding to the outermost vertices in turn, and remove the outermost vertices whose values ​​in the first space are greater than those in the second space from the root point set; and add the vertices in the third space to the root point set.

[0022] Furthermore, merging the connected vertices into a subset includes: separating the vertices of the root point set from the undirected graph, so that the vertices outside the root point set form at least one subset, and the vertices in each subset are connected to each other.

[0023] Further, re-dividing the set that does not meet the threshold range includes:

[0024] When the sum of the weights of the vertices in a subset is less than the lower limit of the threshold range, the subset is merged into the root point set and a new set is generated. A new mean boundary is determined based on the total weights of all vertices in the new set, and the process returns to step 2 to re-divide the new set so that the new set is divided into at least two sets based on the mean boundary.

[0025] Further, the re-dividing the set that does not meet the threshold range also includes:

[0026] When the sum of the weights of the vertices in a subset is greater than the upper limit of the threshold range, a new mean boundary is determined based on the total weights of all vertices in the subset, and the process returns to step 2 to re-divide the subset so that the subset is divided into at least two sets based on the mean boundary.

[0027] Furthermore, the mean value limit is half of each total weight.

[0028] Compared with the prior art, the present invention has at least the following beneficial effects:

[0029] 1. It can better achieve the two goals of relatively balanced weights between different blocks after gate circuit segmentation and low communication cost in one process.

[0030] 2. It avoids multiple global operations and can reduce the amount of calculation step by step after each round of segmentation. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0032] Figure 1 This is a flow chart of a conditional cyclic circuit segmentation method based on balanced weights and minimum edge cuts in this application;

[0033] Figure 2 A schematic diagram of circuit division of an embodiment of the present application;

[0034] Figure 3This is a schematic diagram illustrating an example of another embodiment of the present application. DETAILED DESCRIPTION

[0035] In order to make the technical problems, technical solutions and beneficial effects to be solved by the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0036] Thus, a feature indicated in this specification will be used to illustrate one of the features of an embodiment of the present invention, rather than implying that each embodiment of the present invention must have the described feature. In addition, it should be noted that this specification describes many features. Although some features can be combined together to illustrate possible system designs, these features can also be used in other combinations that are not explicitly described. Thus, unless otherwise stated, the described combinations are not intended to be limiting.

[0037] The principle and structure of the present invention are described in detail below with reference to the accompanying drawings and embodiments.

[0038] The methods for dividing gate circuits in the prior art include a mobile iterative improvement method based on the FM algorithm and a K-way balanced partitioning method based on an approximate algorithm, among which the mobile iterative method based on FM is completed through iteration of a single vertex, which aims to reduce the number of connections between partition modules, that is, the connection cost between modules, while the K-way balanced partitioning method aims to achieve balance between each block after segmentation. However, both algorithms cannot take into account the two purposes of relative balance of weights between blocks and low communication cost, and cannot obtain a good partitioning effect. The idea of ​​the present application is to propose a partitioning method that can simultaneously take into account the two purposes of relative balance of weights between blocks and low communication cost.

[0039] The conditional cyclic circuit segmentation method based on balanced weights and minimum edge cuts proposed in this application includes:

[0040] Step S1: converting the gate circuit into an undirected graph, calculating the total weight of all vertices, and determining the mean bound based on the total weight;

[0041] Step S2: Start traversing from any edge vertex, and add the currently traversed vertex to the root point set until the sum of the weights of all vertices in the root point set meets the mean limit;

[0042] Step S3: Screen the vertices in the root point set, traverse the vertices outside the root point set, and merge the connected vertices outside the root point set into a subset;

[0043] Step S4: output the set whose weight sum satisfies the preset threshold range, and re-divide the set that does not satisfy the threshold range until each set satisfies the preset threshold range, the set including the root point set and the subset.

[0044] See also Figure 1 This is a flow chart of the conditional cyclic circuit segmentation method based on balanced weights and minimum edge cuts in this application. To facilitate subsequent segmentation, this application needs to pre-process the gate circuit first, convert it into an undirected graph, and accumulate the sum of the weights W of all vertices in the undirected graph, and determine the mean limit based on the total weight. In this application, the mean limit is set to half of the sum of the weights W of all vertices in the undirected graph. In other embodiments, if the sum of the weights W is an odd number, the mean limit can also be set to (W+1) / 2, (W-1) / 2, or W / 2.

[0045] Since this application needs to ensure the balance of vertex weights between each block after division, and the two parts obtained by the preliminary division may also be the final output results, in order to ensure the relative balance of vertex weights between the two blocks, the sum of the weights W of all vertices is calculated here, and W / 2 is set as the mean limit. At the same time, the traversal process stops when it reaches the mean limit. In this way, the sum of the root point set and the vertex weights outside the root point set will be equal to W / 2. If the two parts do not need to be divided again in the future, the vertex weights of the two blocks will be relatively balanced.

[0046] Wherein, step S2 includes step S21: selecting any edge vertex as a traversal starting point, traversing along the connecting line of the traversal starting point, and merging the currently traversed vertex into the root point set;

[0047] Step S22: Determine whether the sum of the weights of all vertices in the current root point set reaches the mean limit, if so, stop traversing and execute step 3, otherwise continue traversing.

[0048] It is used to initially divide the gate circuit into two parts, one is the root point set, and the other is the part outside the root point set. The exploration algorithm uses breadth-first exploration, also known as BFS, which is a blind search method. The purpose is to systematically expand and check all nodes in the graph to find the result. It does not consider the possible location of the result and thoroughly searches the entire graph until the result is found. The algorithm is used to start from any edge vertex and traverse layer by layer until all nodes are traversed.

[0049] To facilitate the subsequent storage process, the traversed vertices need to be numbered. The starting point is numbered 1, and all vertices in the same layer are numbered the same. All vertices in the next layer are numbered by 1 based on the previous layer. For example, if the initial vertex is 1, then all vertices in the next layer adjacent to the initial vertex are numbered 2, and then the vertices in the next layer adjacent to all vertices numbered 2 are numbered 3, and so on, until all vertices in the root point set are labeled.

[0050] During the traversal, there may be vertices that are adjacent to the root point set but have not been traversed. These vertices also need to be incorporated into the root point set.

[0051] In order to ensure low communication between the blocks after division, it is also necessary to determine the specific disconnected edges between the blocks. Since the traversal is done layer by layer until the mean limit is reached, the outermost vertices can be determined, that is, the vertices with the highest layer number are adjacent to the vertices outside the root point set. Therefore, the vertices with the highest layer number need to be processed here to determine how to divide specifically.

[0052] Therefore, after traversing and labeling the vertices in step S21, the vertices adjacent to the outermost vertices are recorded based on the vertex labels and the recording results are saved. In step 3, the vertices in the root point set are screened based on the recording results.

[0053] Specifically, it includes step S23: based on the labels of the vertices, storing the vertices adjacent to the outermost vertices and outside the root point set into the first space;

[0054] Step S24: storing the vertices adjacent to the outermost vertices and located in the root point set into the second space;

[0055] Step S25: storing the vertices whose adjacent vertices are all the outermost vertices into the third space.

[0056] Its first space, second space and third space correspond to space A, space B and space C in the flowchart respectively, and space A, space B and space C respectively store vertices adjacent to the vertex with the largest level number and outside the root point set; vertices adjacent to the vertex with the largest level number and located at the previous level; and vertices whose adjacent vertices are all the vertex with the largest level number.

[0057] Since the segmentation is completed at the level where the vertex with the largest level number in the root point set is located, first find all the vertices with the largest level number in the root point set. The number of their adjacent points represents the total number of edges adjacent to them. After storing the vertex with the largest level number and its adjacent points, it is necessary to classify the adjacent vertices of the vertex with the largest level number in the root point set, and use the classification feature to select the vertex with the largest number in the root point set to retain or remove, thereby achieving the division with the least edge cuts. It specifically includes: Step S31: remove the vertices that exist in both the first space and the third space from the first space; add the vertices that exist in the third space and are adjacent to the outermost vertex to the second space;

[0058] Step S32: sequentially calculating the number of vertices adjacent to the outermost vertex in the first space and the second space, and storing the numerical results in the corresponding first space and the second space instead of the vertex;

[0059] Step S33: Compare the values ​​in the first space and the second space corresponding to the outermost vertices in turn, and remove the outermost vertices whose values ​​in the first space are greater than those in the second space from the root point set; and add the vertices in the third space to the root point set.

[0060] Here, the number of vertices adjacent to the vertex with the largest level number is stored instead of the vertex to determine the minimum edge cut. The number of vertices represents the total number of edges connected to them. The value stored in space A can be regarded as the total number of edges connected to the vertex with the largest level number and vertices outside the root point set, and the value stored in space B can be regarded as the total number of edges connected to the vertex with the largest level number and the vertices of the previous layer in the root point set. When splitting, in order to determine the minimum edge cut, it is necessary to remove the vertices in space A whose values ​​are greater than the values ​​corresponding to space B from the root point set. After removal, the vertices in the root point set connected to the outside world become the vertices of the previous layer connected to the vertex with the largest level number, and the number of edges connected to them is less than the number of edges connected to the vertex with the largest level number and the outside world, which is the minimum edge cut. For example, the vertices with the largest hierarchical numbers in the root point set are Q1, Q2, and Q3, all of which are numbered 4. The total number of edges that Q1 has adjacent to the outside world is 3, and the total number of edges adjacent to the third-level vertices is 4. The total number of edges that Q2 has connected to the outside world is 5, and the total number of edges adjacent to the third-level vertices is 2. The total number of edges that Q3 has adjacent to the outside world is 2, and the total number of edges adjacent to the third-level vertices is 4. Then the set stored in space A is {3, 5, 2}, and the set stored in space B is {4, 2, 4}. Here, the value corresponding to Q2 in space A is 5, which is greater than the value 2 in space B, and needs to be eliminated. Finally, the vertices with the largest hierarchical numbers in the root point set are Q1 and Q3, and the total number of edges adjacent to the outside world is 3 and 2, which is less than the number of edges adjacent to the previous layer, and is the minimum edge cut. The number of edges adjacent to the root point set and the vertex Q2 outside the root point set is 2, which is also the minimum edge cut. Therefore, after the division, the root point set can be disconnected from the vertices outside the root point set, and multiple sets outside the root point set are obtained, and the number of adjacent edges between them is the smallest, that is, the communication between the blocks is the lowest.

[0061] After determining the root point set by the above method, the root point set is disconnected from the vertices outside the root point set. The multiple vertices outside the root point set are not connected, and may be connected to the root point set separately. After disconnection, all connected sets outside the root point set are divided into a subset, so that there can be at least one subset, and when there are multiple subsets, they will not be connected to each other.

[0062] The sum of the weights of the vertices in the obtained multiple subsets is not the same. Here, the threshold range of the weights is set to [a, b]. The subset will be output only when the sum of the weights of the vertices in the subset is within the threshold range [a, b]. If the sum of the weights of all vertices in the subset is less than the lower limit a of the threshold range [a, b], it means that the number of vertices in the subset is too small to be output. In this case, all the vertices in this subset are merged into the root point set, and the root point set is updated to obtain a new set. The sum of the weights of all vertices in this set is equal to the sum of the weights of the vertices in the original root point set and the sum of the weights of the vertices in the set that is less than the lower limit a. The sum of the weights is set to P, and the mean limit is reset to P / 2. The set is returned to step S2 for division again.

[0063] If the sum of the weights of all vertices in the subset is greater than the upper limit value b of the threshold range [a, b], it means that there are a large number of vertices in the subset and it needs to be divided again. Since the sum of the vertex weights in the subset is large and can be divided independently, the subset does not need to be merged into the root set for division and can directly return to step S2 for division. At the same time, the mean limit of the subset is half of the sum of its vertex weights.

[0064] The upper limit a and lower limit b of the threshold range can be set according to the complexity of the gate circuit to be divided. The sum of the weights of the vertices in all the sets finally obtained by the segmentation method of the present application will be in the threshold range [a, b], and the loop will only stop when all the sets are in the threshold range [a, b]. The whole set includes the root point set and multiple unconnected subsets outside the root point set. All the sets finally obtained are in the threshold range [a, b], that is, the blocks after each segmentation are relatively balanced. At the same time, due to the processing of the root point set, the connection lines between the blocks are also the least, that is, it takes into account both the relative balance of the blocks and the low communication cost.

[0065] See also Figure 2 , the following is explained in conjunction with an embodiment of the present application, Figure 2 An undirected graph corresponding to a gate-level circuit consisting of 29 vertices, each of which has a weight of 1. The sum of the weights of the vertices of the undirected graph is 29, and the corresponding mean limit is 29 / 2=14.5. For the convenience of the following description, the 29 vertices are named 1-29, and then the traversal starts from any edge vertex. In this embodiment, the traversal starts from vertex 1 until the mean limit is reached. Vertex 1 is the initial vertex and is marked as 1. Vertices 2 and 3 are the next layer of vertices adjacent to vertex 1 and are marked as 2. When the sum of the weights of the vertices in the second layer is 3, which is less than the mean limit 14.5, the traversal continues. Vertices 4, 5, 6, and 7 are the next layer of vertices adjacent to the vertex labeled 2 and are marked as 3. , the sum of the weights of all the traversed vertices is 7, which is still less than the mean limit of 14.5, so continue traversing. 8, 9, 10, 11, and 15 are the next layer of vertices adjacent to the vertex labeled 3, labeled 4. The sum of the weights of all the traversed vertices is 12, which is less than the mean limit of 14.5. Continue traversing. 12, 13, 16, and 17 are the next layer of vertices adjacent to the vertex labeled 4, labeled 5. The sum of the weights of all the traversed vertices is 16, which is greater than the mean limit of 14.5. Stop traversing and divide all the traversed vertices into a root point set, which is {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 16, 17}.

[0066] After obtaining the root point set of the preliminary division, create spaces A, B, and C to store various vertices. Since the maximum level number in the root point set is 5, space A stores vertices that are adjacent to the 5th level vertices and are outside the root point set, resulting in space A={

[14] ,

[14] ,

[18] , [19 20]}. Since the values ​​adjacent to each vertex in the fifth level need to be determined later, space A stores the vertices adjacent to each vertex. Similarly, space B stores vertices that are adjacent to the 5th level vertices and belong to level number 4, resulting in space B={[8 9], [10 11],

[15] ,

[15] }. Space C stores all vertices whose adjacent vertices are 5th level vertices, and we can get C={

[14] }.

[0067] After the spaces A, B, and C are initially stored, the vertices in the spaces A, B, and C are processed. According to step S33, the vertices that exist in both spaces A and C are first removed from space A, and space A={[ ], [ ],

[18] , [19, 20]}, then add the vertices that exist in space C and are adjacent to the 5th layer vertices into space B, and obtain space B={[8, 9, 14], [10, 11, 14], [14, 15],

[15] }, then according to step S32, replace the vertices with the number of vertices adjacent to the 5th layer in space A and space B, and put them into space A and space B, and obtain space A={[0], [0], [1], [2]}, space B={[3], [3], [2], [1]}, where 0, 0, 1, 2 in space A correspond to the number of vertices connected to 12, 13, 16, 17 respectively, and 3, 3, 2, 1 in space B correspond to the number of vertices connected to 12, 13, 16, 17 respectively. It can be seen that only the value corresponding to vertex 17 in space A is greater than the value in space B, then according to step S33, the vertex is removed from the root point set. Because removing vertex 17 only requires cutting off an edge between vertex 15 and vertex 17, and if vertex 17 is retained in the root point set, the edges between vertex 17 and vertex 19 and vertex 20 need to be cut off, so vertex 17, which belongs to layer number 5, needs to be removed from the root point set. At the same time, the vertices in space C are added to the root point set. Since all the adjacent vertices stored in space C are vertices with the largest layer number, if the vertices in space C are not added to the root point set, the connectivity of the points in the root point set will be destroyed, so they need to be added to the root point set. After division, the final root point set is {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}. Compared with the initially divided root point set, it adds vertex 14 and removes vertex 17. Then disconnect the vertices in the root point set from the vertices outside the root point set, and traverse all vertices outside the root point set to divide the connected vertices into a subset, from Figure 2It can be clearly seen that all vertices outside the root point set are connected, so it is divided into another subset {17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29}. Since the root point set is obtained through breadth-first exploration, it can be ensured that all vertices in the root point set are connected during the traversal. In this application, the division only disconnects the vertices with the largest number of layers in the root point set from the outside world, so it will not affect the connectivity between the vertices outside the root point set, so it can be ensured that the vertices outside the root point set are also fully connected.

[0068] After partitioning, the two sets obtained are {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16} and {17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29}. The sum of the weights of all vertices in the first set is 16, and the sum of the weights of all vertices in the second set is 13. Here, the threshold range can be set to [12, 17]. The sum of the weights of the vertices in the two sets are within the threshold range, and no further partitioning is required. The threshold range can also be set to [7, 9]. Since the sum of the weights of the vertices in the two sets is greater than the upper limit of the threshold range of 9, the two sets need to be partitioned again until the sum of the vertices in all sets is within the threshold range.

[0069] See also Figure 3 , is a schematic diagram for explaining an example of another embodiment of the present application, which mainly describes each subset after division. It can be seen from the figure that four sets are obtained after the first division, namely the root point set v, and sets v1, v2, and v3. The threshold range [a, b] is set here, wherein the sum of the weights of all vertices in set v1 and the root point set is greater than the upper limit b of the threshold range, the sum of the weights of all vertices in set v2 is within the threshold range [a, b], and the sum of the weights of all vertices in set v3 is less than the lower limit a of the threshold range. When entering the second division, set v1 is directly divided and the mean limit is set to half of the sum of the weights of all vertices in set v1. Set v2 can be output, and set v3 is merged into the root point set v and divided together with the root point set v. The mean limit at this time is half of the sum of the weights of all vertices in the root point set v and set v3. After the second division, the obtained subsets are judged until all sets are within the threshold range [a, b].

[0070] Compared with the prior art, the sum of the vertex weights of all blocks finally obtained by the present application is within the threshold range [a, b], the blocks are relatively balanced, and the communication between the blocks is low, thereby achieving the two goals of low communication cost and relative balance of weights between the blocks. After each division, the resulting blocks are smaller, which can gradually reduce the amount of computation for the blocks.

[0071] The above are only partial or preferred embodiments of the present invention. Neither the text nor the drawings can limit the scope of protection of the present invention. All equivalent structural changes made by using the contents of the present invention specification and drawings under the overall concept of the present invention, or direct / indirect application in other related technical fields are included in the scope of protection of the present invention.

Claims

1. A conditional cyclic circuit segmentation method based on weight balancing and minimum edge cutting, characterized in that: include: Step S1: converting the gate circuit into an undirected graph, calculating the total weight of all vertices, and determining the mean bound based on the total weight; Step S2: start traversing from any edge vertex, and add the currently traversed vertex to the root point set until the sum of the weights of all vertices in the root point set reaches the mean limit; Step S3: Screen the vertices in the root point set, traverse the vertices outside the root point set, and merge the connected vertices outside the root point set into a subset; Step S4: outputting a set whose sum of weights satisfies a preset threshold range, and re-dividing the set that does not satisfy the threshold range until each set satisfies the preset threshold range, the set including the root point set and the subset; The step S2 comprises: Step S21: select any edge vertex as the traversal starting point, traverse along the connecting line of the traversal starting point, and merge the currently traversed vertex into the root point set; Step S22: determine whether the sum of the weights of all vertices in the current root point set reaches the mean limit, if so, stop traversing and execute step S3, otherwise continue traversing; After traversing and labeling the vertices in step S21, the vertices adjacent to the outermost vertices are recorded based on the vertex labels and the recording results are saved. In step S3, the vertices in the root point set are screened based on the recording results. The step of recording the vertices adjacent to the outermost vertices based on the vertex labels and saving the recording results specifically includes: Step S23: based on the labels of the vertices, storing the vertices adjacent to the outermost vertices and outside the root point set into the first space; Step S24: storing the vertices adjacent to the outermost vertices and located in the root point set into the second space; Step S25: storing the vertices whose adjacent vertices are all the outermost vertices into the third space; The step S3 of screening the vertices in the root point set includes: Step S31: remove vertices that exist in both the first space and the third space from the first space; add vertices that exist in the third space and are adjacent to the outermost vertices to the second space; Step S32: sequentially calculating the number of vertices adjacent to the outermost vertex in the first space and the second space, and storing the numerical results in the corresponding first space and the second space instead of the vertex; Step S33: Compare the values ​​in the first space and the second space corresponding to the outermost vertices in turn, and remove the outermost vertices whose values ​​in the first space are greater than those in the second space from the root point set; and add the vertices in the third space to the root point set.

2. The conditional cyclic circuit segmentation method based on weight balancing and minimum edge cutting according to claim 1 is characterized in that: When traversing the vertices in step S21, the traversed vertices are numbered at the same time. The traversal algorithm adopts a breadth-first algorithm. The numbers are numbered sequentially from the traversal starting point to the outermost vertex explored by the breadth-first algorithm, and all vertices in the same layer are numbered the same.

3. The conditional cyclic circuit segmentation method based on weight balancing and minimum edge cutting according to claim 1, characterized in that: The merging of connected vertices into a subset includes: separating the vertices of the root point set from the undirected graph, so that the vertices outside the root point set form at least one subset, and the vertices in each subset are connected to each other.

4. The conditional cyclic circuit segmentation method based on weight balancing and minimum edge cutting according to claim 1, characterized in that: The re-dividing the set that does not meet the threshold range includes: When the sum of the weights of the vertices in a subset is less than the lower limit of the threshold range, the subset is merged into the root point set and a new set is generated. A new mean boundary is determined based on the total weights of all vertices in the new set, and the process returns to step 2 to re-divide the new set so that the new set is divided into at least two sets based on the mean boundary.

5. The conditional cyclic circuit segmentation method based on weight balancing and minimum edge cutting according to claim 3 is characterized in that: The re-dividing the set that does not meet the threshold range also includes: When the sum of the weights of the vertices in a subset is greater than the upper limit of the threshold range, a new mean boundary is determined based on the total weights of all vertices in the subset, and the process returns to step 2 to re-divide the subset so that the subset is divided into at least two sets based on the mean boundary.

6. The conditional cyclic circuit segmentation method based on weight balancing and minimum edge cutting according to claim 1, characterized in that: The mean bounds are half of each total weight.

Citation Information

Patent Citations

  • Large scale integration circuit division method based on multi-level division method

    CN101101610A

  • Method and apparatus for detecting timing constraint conflicts

    TW201131407A