A graphics processing method, apparatus, electronic device and storage medium
By determining the optimal slicing-merging direction based on the direction and boundary relationship of the graph pair in the graph merging algorithm, the graph is synchronized-merged, and the problem of thin bar graphs in the unified scanning direction is solved, and the accuracy of circuit analysis is improved.
Patent Information
- Application Number
- CN202411722983.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-28
- Publication Date
- 2025-06-10
- Estimated Expiration
- 2044-11-28
AI Technical Summary
Existing scan line-based graph merging algorithms can easily lead to the emergence of slender bar patterns in a unified scanning direction, affecting the accuracy of cross-sectional width calculation and electromigration calculation of resistor network.
By obtaining all the graphics pairs in the set of graphics to be analyzed, the optimal slicing-merging direction is judged based on the graphics direction and/or boundary relationship of each graphics pair, and the first slicing-merging direction and the second slicing-merging direction are used to slicing-merging the graphics to avoid or reduce the appearance of elongated graphics.
Effectively avoid or reduce the appearance of slender bar graphics, so that the width of the graphic set obtained by the merge is as close to the original design as possible, and improve the accuracy of circuit analysis.
Smart Images

Figure CN119205530B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of integrated circuit technology, and particularly to a graphics processing method, device, electronic device and storage medium. Background Art
[0002] Graphics merging is a basic technology in the EDA (Electronic Design Automation) back-end verification design tool, and its purpose is to eliminate the overlapping parts of graphics for subsequent analysis.
[0003] The scan-line based graphics merging algorithm supports batch merging of graphics. Currently, the scan-line based graphics merging algorithm performs graphics merging on all graphics with a unified scan direction. When the scan direction is vertical (or "vertical cutting"), the scan line is vertical; when the scan direction is horizontal (or "horizontal cutting"), the scan line is horizontal.
[0004] As Figure 1 and Figure 2 shown in two sets of intersecting graphics without connection relationships, when performing vertical cutting uniformly, one set of graphics has vertical slender graphics, while the other set does not; when performing horizontal cutting uniformly, one set of graphics has horizontal slender graphics, while the other set does not. As Figure 3 and Figure 4 shown in multiple intersecting graphics, when performing vertical cutting uniformly, vertical slender graphics appear; when performing horizontal cutting uniformly, horizontal slender graphics appear. It can be seen that a unified scan direction is likely to result in slender graphics in the merged graphics. Since the width of the slender graphics (the length of the short side of the graphics) is less than the width of the original graphic design, it will cause errors in calculating the cross-sectional width of the resistor network, and further affect the accuracy of circuit analysis results such as resistor extraction results and electromigration calculation results. Summary of the Invention
[0005] To solve the above technical problems, the present application provides a graphics processing method, device, electronic device and storage medium, which process graphic pairs based on the optimal cutting-merging direction of each graphic pair, can avoid or reduce the appearance of slender graphics, and make the widths of the graphics in the merged graphic set as close as possible to the original design to improve the accuracy of circuit analysis.
[0006] To solve the above technical problems, the present application provides a graphics processing method, which includes:
[0007] Obtain all graphic pairs in the graphic set to be analyzed, where the graphic pairs include intersecting graphics;
[0008] Determine the optimal splitting-merging direction for each pair of graphics according to the graphic directions and / or boundary relationships of the pairs of graphics, where the optimal splitting-merging direction includes a first splitting-merging direction and a second splitting-merging direction;
[0009] For the pair of graphics whose optimal splitting-merging direction is the first splitting-merging direction, perform splitting-merging processing based on the first splitting-merging direction to obtain a first set of merged graphics;
[0010] For the graphics in the first set of merged graphics and the pairs of graphics in the set of graphics to be analyzed that have not undergone splitting-merging processing, perform splitting-merging processing based on the second splitting-merging direction to obtain a second set of merged graphics.
[0011] In some embodiments, the determining the optimal splitting-merging direction for each pair of graphics according to the graphic directions and / or boundary relationships of the pairs of graphics includes:
[0012] When the graphic directions in the pair of graphics are both the first direction, the optimal splitting-merging direction for the pair of graphics is the first splitting-merging direction;
[0013] When the graphic directions in the pair of graphics are both the second direction, the optimal splitting-merging direction for the pair of graphics is the second splitting-merging direction;
[0014] When the graphic directions in the pair of graphics are the first direction and the second direction respectively, determine the optimal splitting-merging direction according to the boundary relationship of the pair of graphics.
[0015] In some embodiments, the determining the optimal splitting-merging direction according to the boundary relationship of the pair of graphics includes:
[0016] Determine the boundary relationship of the pair of graphics, where the boundary relationship includes a first boundary distance and a second boundary distance in the first direction, and a third boundary distance and a fourth boundary distance in the second direction;
[0017] Determine the optimal splitting-merging direction according to the magnitude relationship between the first boundary distance, the second boundary distance, the third boundary distance and the fourth boundary distance.
[0018] In some embodiments, the determining the optimal splitting-merging direction according to the magnitude relationship between the first boundary distance, the second boundary distance, the third boundary distance and the fourth boundary distance includes:
[0019] Take the smaller value of the first boundary distance and the second boundary distance as a first comparison value, and take the smaller value of the third boundary distance and the fourth boundary distance as a second comparison value;
[0020] Determine the distance calculation direction corresponding to the smaller value of the first comparison value and the second comparison value as the optimal splitting-merging direction.
[0021] This application also provides a graphics processing method, which includes the following steps:
[0022] Obtain all pairs of graphics in the set of graphics to be analyzed, where the pairs of graphics include intersecting graphics;
[0023] Perform splitting-merging processing on the pairs of graphics based on the third splitting-merging direction to obtain a third set of merged graphics;
[0024] Extract the target adjacent graphics from the third set of merged graphics;
[0025] Perform splitting-merging processing on the target adjacent graphics based on the fourth splitting-merging direction to obtain a fourth set of merged graphics.
[0026] In some embodiments, the performing splitting-merging processing on the target adjacent graphics based on the fourth splitting-merging direction to obtain a fourth set of merged graphics includes:
[0027] Extract the target adjacent graphics from the third set of merged graphics according to the third splitting-merging direction and the graphic directions of the adjacent graphics in the third set of merged graphics;
[0028] Perform splitting-merging processing on the target adjacent graphics based on the fourth splitting-merging direction;
[0029] Summarize the processed graphics with the unprocessed graphics in the third set of merged graphics to obtain the fourth set of merged graphics.
[0030] This application also provides a graphics processing device, which includes:
[0031] A first graphics acquisition module, configured to obtain all pairs of graphics in the set of graphics to be analyzed, where the pairs of graphics include intersecting graphics;
[0032] A first direction determination module, configured to determine the optimal splitting-merging direction of each pair of graphics according to the graphic directions and / or boundary relationships of each pair of graphics, where the optimal splitting-merging direction includes a first splitting-merging direction and a second splitting-merging direction;
[0033] A first processing module, configured to perform splitting-merging processing on the pairs of graphics with the optimal splitting-merging direction being the first splitting-merging direction based on the first splitting-merging direction to obtain a first set of merged graphics;
[0034] A second processing module, configured to perform splitting-merge processing on the graphics in the first merged graphics set and the graphics pairs in the to-be-analyzed graphics set that have not undergone splitting-merge processing, based on the second splitting-merge direction, so as to obtain a second merged graphics set.
[0035] This application also provides a graphics processing device, which includes:
[0036] A second graphics acquisition module, configured to acquire all graphics pairs in the to-be-analyzed graphics set, where the graphics pairs include intersecting graphics;
[0037] A third processing module, configured to perform splitting-merge processing on the graphics pairs based on a third splitting-merge direction to obtain a third merged graphics set;
[0038] An extraction module, configured to extract target connected graphics from the third merged graphics set;
[0039] A fourth processing module, configured to perform splitting-merge processing on the target connected graphics based on a fourth splitting-merge direction to obtain a fourth merged graphics set.
[0040] This application provides an electronic device, including a storage medium and a controller. A computer program is stored on the storage medium, and when the computer program is executed by the controller, the steps of the above-mentioned graphics processing method are implemented.
[0041] This application provides a storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above-mentioned graphics processing method are implemented.
[0042] The graphics processing method of this application includes: acquiring all graphics pairs in the to-be-analyzed graphics set, where the graphics pairs include intersecting graphics; judging the optimal splitting-merge direction of each graphics pair according to the graphics direction and / or boundary relationship of each graphics pair, and the optimal splitting-merge direction includes a first splitting-merge direction and a second splitting-merge direction; for the graphics pairs with the optimal splitting-merge direction being the first splitting-merge direction, performing splitting-merge processing based on the first splitting-merge direction to obtain a first merged graphics set; for the graphics in the first merged graphics set and the graphics pairs in the to-be-analyzed graphics set that have not undergone splitting-merge processing, performing splitting-merge processing based on the second splitting-merge direction to obtain a second merged graphics set. This application processes the graphics pairs based on the optimal splitting-merge direction of each graphics pair, which can avoid or reduce the appearance of long and thin graphics, and make the widths of the graphics in the merged graphics set as close as possible to the original design, so as to improve the accuracy of circuit analysis.
[0043] The graphic processing method of the present application includes: obtaining all graphic pairs in the graphic set to be analyzed, where the graphic pairs include intersecting graphics; performing splitting-merging processing on the graphic pairs based on the third splitting-merging direction to obtain a third merged graphic set; extracting target connected graphics from the third merged graphic set; and performing splitting-merging processing on the target connected graphics based on the fourth splitting-merging direction to obtain a fourth merged graphic set. After performing splitting-merging processing on the graphic pairs in a unified direction and then performing splitting-merging processing on the target connected graphics, the present application can avoid or reduce the appearance of slender graphics, making the widths of the graphics in the merged graphic set as close as possible to the original design, so as to improve the accuracy of circuit analysis. Description of the Drawings
[0044] Figure 1 It is a schematic diagram of vertical cutting of a graphic pair.
[0045] Figure 2 It is a schematic diagram of horizontal cutting of a graphic pair.
[0046] Figure 3 It is a schematic diagram of vertical cutting of another graphic pair.
[0047] Figure 4 It is a schematic diagram of horizontal cutting of another graphic pair.
[0048] Figure 5 It is a schematic flowchart of the graphic processing method shown according to an embodiment.
[0049] Figure 6 It is a schematic diagram of a graphic set shown according to an embodiment.
[0050] Figure 7 It is a schematic diagram of splitting-merging a graphic pair based on the first splitting-merging direction.
[0051] Figure 8 It is a schematic diagram of splitting-merging a graphic pair based on the second splitting-merging direction.
[0052] Figure 9 It is a schematic diagram of determining the best splitting-merging direction for graphic pairs with different graphic directions.
[0053] Figure 10 It is a schematic diagram of splitting-merging another graphic set.
[0054] Figure 11 It is a schematic flowchart of the graphic processing method shown according to another embodiment.
[0055] Figure 12 It is a schematic diagram of performing graphic splitting-merging shown according to another embodiment.
[0056] Figure 13 It is a schematic structural diagram of a graphics processing device shown according to an embodiment.
[0057] Figure 14 It is a schematic structural diagram of a graphics processing device shown according to another embodiment. Detailed implementation manners
[0058] To facilitate the understanding of the present application, the present application will be described more comprehensively below with reference to the relevant drawings. The preferred embodiments of the present application are shown in the drawings. However, the present application can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, these embodiments are provided to make the disclosure of the present application more thorough and comprehensive.
[0059] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the technical field to which this application belongs. The terms used in the specification of this application herein are only for the purpose of describing specific embodiments and are not intended to limit this application. The term "and / or" used herein includes any and all combinations of one or more of the related listed items. In this application, "each" includes one and more than two quantities.
[0060] Figure 5 It is a schematic flowchart of a graphics processing method shown according to an embodiment. As Figure 5 shown, a graphics processing method of the present application includes the following steps:
[0061] S1. Obtain all graphic pairs in the graphic set to be analyzed, where the graphic pairs include intersecting graphics;
[0062] S2. Judge the optimal splitting-merging direction of each graphic pair according to the graphic direction and / or boundary relationship of each graphic pair. The optimal splitting-merging direction includes a first splitting-merging direction and a second splitting-merging direction;
[0063] S3. For the graphic pairs with the optimal splitting-merging direction being the first splitting-merging direction, perform splitting-merging processing based on the first splitting-merging direction to obtain a first merged graphic set;
[0064] S4. For the graphics in the first merged graphic set and the graphic pairs in the graphic set to be analyzed that have not undergone splitting-merging processing, perform splitting-merging processing based on the second splitting-merging direction to obtain a second merged graphic set.
[0065] In the set of graphs to be analyzed, it may include graph pairs, adjacent graphs, and independent graphs. Among them, intersection means that there is an overlapping part between two graphs, and the area of the overlapping part is greater than 0; adjacency means that two graphs are connected but the area of the overlapping part is equal to 0; independence means that there is no connection relationship between the graphs. The first splitting-merging direction and the second splitting-merging direction are splitting-merging directions with different directions. In one implementation, the first splitting-merging direction and the second splitting-merging direction are perpendicular to each other. For example, if the first splitting-merging direction is vertical, the second splitting-merging direction can be horizontal; if the first splitting-merging direction is horizontal, the second splitting-merging direction can be vertical.
[0066] The technical solution of this application performs graph processing based on the first splitting-merging direction and the second splitting-merging direction to eliminate the overlapping parts of the graphs. Compared with only using one splitting-merging direction during the processing, using two splitting-merging directions in this application can merge the graphs more flexibly, reduce the probability of long and thin strip graphs appearing in the merging result, and further make the widths of all graphs in the merged graph set as close as possible to the original design to improve the accuracy of circuit analysis.
[0067] Among them, a long and thin strip graph refers to a graph whose short side dimension is smaller than the short side dimension of the original graph after graph merging. The original graph can refer to the graph that generates the long and thin strip graph during merging, or any graph in the set of graphs to be analyzed. In this embodiment, rectangles are mainly used as examples of graphs. In some embodiments, the graphs can also be trapezoids and other graphs.
[0068] Among them, for the graph pair whose optimal splitting-merging direction is the first splitting-merging direction, splitting-merging processing is performed based on the first splitting-merging direction. Then, for the graphs in the merged graph set obtained from the first processing and the graph pairs in the set of graphs to be analyzed that have not undergone splitting-merging processing, splitting-merging processing is performed based on the second splitting-merging direction. This is equivalent to merging a part of the graph pairs in the set of graphs to be analyzed and then performing a second merging of the remaining graph pairs with a different splitting-merging direction. In this way, the splitting-merging direction used for different graph pairs during merging can be selected more flexibly, and the probability of long and thin strip graphs appearing in the merging result can be reduced.
[0069] Among them, the optimal splitting-merging direction refers to the splitting-merging direction that can prevent the appearance of long and thin strip-shaped graphics after the merging of graphic pairs, that is, the width (the shorter side) of the merged graphic is not less than the width of the original graphic. The optimal splitting-merging direction is not used to determine the order of the splitting-merging directions. It can be that the graphic pairs with the optimal splitting-merging direction being vertical are merged first, or it can be that the graphic pairs with the optimal splitting-merging direction being horizontal are merged first. Therefore, the first splitting-merging direction and the second splitting-merging direction are only used to distinguish the direction of the first splitting-merging and the direction of the second splitting-merging.
[0070] Take Figure 6 the shown graphic set as an example. There are four graphics A, B, C, and D in the graphic set. Before graphic processing, first find all the intersecting graphic pairs. The algorithm for this part is the same as the existing technical means and will not be elaborated here. Figure 6 In it, there are 3 groups of graphic pairs formed among the graphics, that is, graphic A and graphic B form a group of graphic pairs, graphic B and graphic C form a group of graphic pairs, and graphic C and graphic D form a group of graphic pairs. When merging, obtain the optimal splitting-merging direction of each group of graphic pairs. For example, if the group of graphic pairs of graphic A and graphic B and the group of graphic pairs of graphic B and graphic C are both suitable for vertical cutting, and the group of graphic pairs of graphic C and graphic D is suitable for horizontal cutting, then a horizontal cut can be made on the group of graphic pairs of graphic C and graphic D first (or a vertical cut can be made on the group of graphic pairs of graphic A and graphic B and the group of graphic pairs of graphic B and graphic C first), to obtain new graphics E and F. Graphics E and F are the first merged graphic set. Summarize the graphics of the graphic E and F and the graphic pairs in the original graphic set that have not undergone splitting-merging processing, as Figure 7 shown. At this time, graphics A, B and the new graphics E, F form a new graphic set. Among them, there are 2 groups of graphic pairs and 1 group of adjacent graphics formed among the graphics. Graphic A and graphic B form a group of graphic pairs, graphic B and graphic E form a group of graphic pairs, and graphic E and graphic F form a group of adjacent graphics.
[0071] Among them, the adjacent and mutually independent graphics will no longer be merged. For all the graphic pairs in the summarized graphic set, uniformly adopt the second splitting-merging direction for the second merging process to further eliminate the overlapping parts of the graphics and obtain the second merged graphic set.
[0072] Continue to take Figure 6 the shown graphic set as an example, in combination with Figure 7 and Figure 8, after the first splitting - merging process, figure A and figure B form a pair of figures, and figure B and figure E form a pair of figures. Therefore, perform a vertical cut (the second splitting - merging process) on figures A, B, and E to obtain new figures G, H, and I. At this time, all figures G, H, I, and F do not overlap with each other, and the figure merging is completed. It can be seen that in the finally merged figure, there are no long and narrow figures, and the short - side dimensions of each figure are still the same as those of the original figure.
[0073] Among them, the optimal splitting - merging direction is determined according to the figure directions of the figure pairs, so that each group of figure pairs can be merged using the splitting - merging direction that is most adapted to their respective figure characteristics, thereby reducing the probability of long and narrow figures appearing.
[0074] In some embodiments, the direction of a figure is referenced by the direction of the long side of the figure. For example, when the long side of the figure is vertical, the direction of the figure is vertical; when the long side of the figure is horizontal, the direction of the figure is horizontal. A pair of figures includes two figures, and the figure direction of each group of figure pairs is determined by the directions of these two figures. For example, when the direction of the figure is horizontal or vertical, the combinations of the directions of the two figures are both horizontal, both vertical, one horizontal and one vertical. Therefore, the figure directions of the figure pairs include both in the first direction, both in the second direction, respectively in the first direction and the second direction. The first direction and the second direction are used to distinguish different figure directions, such as horizontal and vertical.
[0075] In some embodiments, judging the optimal splitting - merging direction of each figure pair according to the figure direction and / or boundary relationship of each figure pair includes:
[0076] When the figure directions in the figure pair are both in the first direction, the optimal splitting - merging direction of the figure pair is the first splitting - merging direction;
[0077] When the figure directions in the figure pair are both in the second direction, the optimal splitting - merging direction of the figure pair is the second splitting - merging direction;
[0078] When the figure directions in the figure pair are respectively in the first direction and the second direction, determine the optimal splitting - merging direction according to the boundary relationship of the figure pair.
[0079] Taking the first direction as the horizontal direction as an example, if both of the original figures are horizontal, then the figure directions of the figure pair are both horizontal. Horizontal cutting may cause the width of the original figures to be damaged. Therefore, for a figure pair composed of two horizontal figures, vertical cutting should be selected, that is, the optimal splitting-merging direction is vertical. In this way, the first splitting-merging direction is the direction perpendicular to the first direction. It can be understood that the angular relationship between the optimal splitting-merging direction and the first direction depends on the shape of the figure pair. For example, when the figure pair is two rectangles intersecting horizontally, the optimal splitting-merging direction is the direction perpendicular to the first direction.
[0080] Taking the second direction as the vertical direction as an example, if both of the original figures are vertical, then the figure directions of the figure pair are both vertical. Vertical cutting may cause the width of the original figures to be damaged. Therefore, for a figure pair composed of two vertical figures, horizontal cutting should be selected, that is, the optimal splitting-merging direction is horizontal. In this way, the second splitting-merging direction is the direction perpendicular to the second direction. It can be understood that the angular relationship between the optimal splitting-merging direction and the second direction depends on the shape of the figure pair. For example, when the figure pair is two rectangles intersecting vertically, the optimal splitting-merging direction is the direction perpendicular to the second direction.
[0081] When the figure directions in the figure pair are the first direction and the second direction respectively, it means that two figures in different directions intersect. At this time, the optimal splitting-merging direction is determined according to the boundary relationship of the figure pair, so that such figure pairs will not have long and thin figures after figure merging.
[0082] Figure 9 Several figure pairs with figure directions being the first direction and the second direction respectively are exemplified, each having different degrees of intersection (overlapping area) and intersection positions. In this case, the optimal splitting-merging direction is determined according to the boundary relationship of the figure pair, so that such figure pairs will not have long and thin figures after figure merging.
[0083] In some embodiments, determining the optimal splitting-merging direction according to the boundary relationship of the figure pair includes:
[0084] Determining the boundary relationship of the figure pair, where the boundary relationship includes the first boundary distance and the second boundary distance in the first direction, and the third boundary distance and the fourth boundary distance in the second direction;
[0085] Determining the optimal splitting-merging direction according to the magnitude relationship among the first boundary distance, the second boundary distance, the third boundary distance, and the fourth boundary distance.
[0086] Among them, combined with Figure 9Taking (a) as an example, with the first direction being horizontal and the second direction being vertical, the first boundary distance refers to the distance between the first adjacent sides of two figures in the first direction, that is, the distance x1 between the left boundary of figure J and the left boundary of figure K. The second boundary distance refers to the distance between the second adjacent sides of two figures in the first direction, that is, the distance x2 between the right boundary of figure J and the right boundary of figure K. The third boundary distance refers to the distance between the third adjacent sides of two figures in the second direction, that is, the distance y1 between the lower boundary of figure J and the lower boundary of figure K. The fourth boundary distance refers to the distance between the fourth adjacent sides of two figures in the second direction, that is, the distance y2 between the upper boundary of figure J and the upper boundary of figure K.
[0087] Combined with Figure 9 Taking (b) as an example, with the first direction being horizontal and the second direction being vertical, the first boundary distance refers to the distance between the first adjacent sides of two figures in the first direction, that is, the distance x11 between the left boundary of figure U and the left boundary of figure V. The second boundary distance refers to the distance between the second adjacent sides of two figures in the first direction, that is, the distance x22 between the right boundary of figure U and the right boundary of figure V. The third boundary distance refers to the distance between the third adjacent sides of two figures in the second direction, that is, the distance y11 between the lower boundary of figure U and the lower boundary of figure V. The fourth boundary distance refers to the distance between the fourth adjacent sides of two figures in the second direction, that is, the distance y22 between the upper boundary of figure U and the upper boundary of figure V.
[0088] It can be seen that when two figures overlap, the positional relationship between the overlapping area and the figures can be represented by the first boundary distance, the second boundary distance, the third boundary distance, and the fourth boundary distance. Therefore, it can be used to select the optimal cutting-merging direction.
[0089] In some embodiments, according to the magnitude relationship among the first boundary distance, the second boundary distance, the third boundary distance, and the fourth boundary distance, the optimal cutting-merging direction is determined, including:
[0090] Take the smaller value between the first boundary distance and the second boundary distance as the first comparison value, and take the smaller value between the third boundary distance and the fourth boundary distance as the second comparison value;
[0091] Determine the distance calculation direction corresponding to the smaller value between the first comparison value and the second comparison value as the optimal cutting-merging direction.
[0092] Among them, since the first comparison value is the smaller value between the first boundary distance and the second boundary distance, the distance calculation direction of the first comparison value is the first direction. Since the second comparison value is the smaller value between the third boundary distance and the fourth boundary distance, the distance calculation direction of the second comparison value is the second direction. It can be seen that the first comparison value and the second comparison value are the widths of the possible long and narrow strip-shaped graphics. Therefore, determining the distance calculation direction corresponding to the smaller value between the first comparison value and the second comparison value as the optimal splitting-merging direction will not damage the width of the graphics and avoid the appearance of long and narrow strip-shaped graphics.
[0093] When calculating the boundary distance, when one of the boundaries used to calculate the boundary distance is completely located within another graphic, the boundary distance is less than or equal to 0. At this time, it can be considered that the distance value is infinite, so that it will not be selected as the smaller value when taking the smaller value. This is because when splitting, the boundary relationship here will not cause the generation of long and narrow strip-shaped graphics.
[0094] Take Figure 9 the graphic pair shown in (a) as an example. Take the first comparison value min1 as the minimum value of x1 and x2, and take the second comparison value min2 as the minimum value of y1 and y2. If min1 is less than min2, the optimal splitting-merging direction is the same as the direction of graphic J, otherwise it is the same as the direction of graphic K. Among them, x1 is the distance value obtained by subtracting the abscissa of the left boundary of graphic J from the abscissa of the left boundary of graphic K; x2 is the distance value obtained by subtracting the abscissa of the right boundary of graphic K from the abscissa of the right boundary of graphic J; y1 is the distance value obtained by subtracting the ordinate of the lower boundary of graphic K from the ordinate of the lower boundary of graphic J; y2 is the distance value obtained by subtracting the ordinate of the upper boundary of graphic J from the ordinate of the upper boundary of graphic K. Among them, since the calculation result of y2 is 0, then y2 = infinite, min1 = x2, min2 = y1. Therefore, min1 is less than min2, and the splitting-merging direction is the same as the direction of graphic J. Graphic J is horizontal, so the optimal splitting-merging direction is horizontal.
[0095] Take Figure 9Taking the pair of figures shown in (b) as an example, the first comparison value min1 is taken as the minimum value of x11 and x22, and the second comparison value min2 is taken as the minimum value of y11 and y22. If min1 is less than min2, the optimal splitting-merging direction is the same as the direction of figure U; otherwise, it is the same as the direction of figure V. Here, x11 is the distance value obtained by subtracting the abscissa of the left boundary of figure U from the abscissa of the left boundary of figure V; x22 is the distance value obtained by subtracting the abscissa of the right boundary of figure V from the abscissa of the right boundary of figure U; y11 is the distance value obtained by subtracting the ordinate of the lower boundary of figure V from the ordinate of the lower boundary of figure U; y22 is the distance value obtained by subtracting the ordinate of the upper boundary of figure U from the ordinate of the upper boundary of figure V. If the calculation result of y22 is less than 0, then y22 = infinity, min1 = x22, min2 = y11. Therefore, min1 is less than min2, and the splitting-merging direction is the same as the direction of figure U. Since figure U is horizontal, the optimal splitting-merging direction is horizontal.
[0096] For Figure 6 the set of figures shown, the process of figure processing is as follows:
[0097] There are four figures A, B, C, and D in the set of figures, and 3 pairs of figures are formed between the figures, that is, figure A and figure B form a pair of figures, figure B and figure C form a pair of figures, and figure C and figure D form a pair of figures. When merging, obtain the optimal splitting-merging direction of each pair of figures. Among them, according to Figure 9 the judgment method, it can be determined that in the pair of figures A and B, the distance calculation direction corresponding to the smaller value of the first comparison value and the second comparison value is vertical, which is suitable for vertical cutting and then merging; in the pair of figures B and C, the distance calculation direction corresponding to the smaller value of the first comparison value and the second comparison value is vertical, which is suitable for vertical cutting and then merging; in the pair of figures C and D, the distance calculation direction corresponding to the smaller value of the first comparison value and the second comparison value is horizontal, which is suitable for horizontal cutting and then merging.
[0098] Next, a horizontal cut can be made on the pair of figures C and D first (or a vertical cut can be made on the pair of figures A and B and the pair of figures B and C first). After splitting-merging, new figures E and F are obtained. Then, figure summarization is performed, as Figure 7 shown. At this time, figures A, B and the new figures E, F form a new set of figures. In the new set of figures, 2 pairs of figures and 1 group of adjacent figures are formed between the figures, that is, figure A and figure B form a pair of figures, figure B and figure E form a pair of figures, and figure E and figure F form a group of adjacent figures.
[0099] After the first splitting-merging process, figure A and figure B form a pair of figures, and figure B and figure E form a pair of figures. Therefore, after performing another vertical cut and merge on figures A, B, and E, new figures G, H, and I are obtained. At this time, all figures G, H, I, and F do not overlap with each other, and the splitting-merging of the figures is completed.
[0100] Please refer to Figure 10 , and an example is given for the process of splitting-merging figures for another set of figures.
[0101] First, there are figures L, M, N, and O in the figure set. It can be determined that there are two pairs of figures in the figure set, namely, figure L and figure M form a pair of figures, and figure N and figure O form a pair of figures. According to Figure 9 's judgment method, it can be determined that in the pair of figures L and M, the distance calculation direction corresponding to the smaller value of the first comparison value and the second comparison value is horizontal, which is suitable for horizontal cut and merge processing. Figure N and figure O form a pair of figures. In this pair of figures, the distance calculation direction corresponding to the smaller value of the first comparison value and the second comparison value is vertical, which is suitable for vertical cut and merge processing. Figure N is in a connected relationship with both figure L and figure M, not an intersecting relationship, so it is not included in the combination to be merged.
[0102] Next, first perform a horizontal cut-merge on the pair of figures L and M. After the horizontal cut-merge, figures A and B no longer exist, and new figures P and Q are formed. Summarize figures P and Q with figures N and O to obtain a new figure set. In the new figure set, there is a pair of figures, namely, figure N and figure O form a pair of figures.
[0103] Finally, perform a vertical cut-merge on the pair of figures N and O. After the vertical cut-merge, new figures R and S are formed, and finally figure set P, Q, R, and S is obtained. It can be seen that there are no long and thin figures in the figure set.
[0104] It should be noted that in the above example, it can also be vertical cut-merge first and then horizontal cut-merge, and the processing results are the same.
[0105] Through the above method, since when splitting-merging figures, the optimal splitting-merging direction of each pair of figures is determined, and different optimal splitting-merging directions are sequentially used to process the pairs of figures, the appearance of long and thin figures is avoided, and the widths of the figures in the processed figure set are as close as possible to the original design, thereby improving the accuracy of circuit analysis.
[0106] As Figure 11 shown, a method for processing figures in this application includes the following steps:
[0107] S10. Obtain all pairs of graphics in the set of graphics to be analyzed, where the pairs of graphics include intersecting graphics.
[0108] S20. Perform splitting-merging processing on the pairs of graphics based on the third splitting-merging direction to obtain a third set of merged graphics.
[0109] S30. Extract the target adjacent graphics from the third set of merged graphics.
[0110] S40. Perform splitting-merging processing on the target adjacent graphics based on the fourth splitting-merging direction to obtain a fourth set of merged graphics.
[0111] The main difference from the previous embodiment is that in this embodiment, first, a splitting-merging is performed on all pairs of graphics in one splitting-merging direction, and then a processing is performed on the target adjacent graphics in another splitting-merging direction. In this way, even if there are long and thin graphics after the first splitting-merging, a targeted merging processing can be performed again, making it possible to further eliminate the long and thin graphics.
[0112] It can be understood that using this method may still have a part of long and thin graphics in the finally processed graphics, but compared with only using a unified direction for splitting-merging once, there is a probability of eliminating some long and thin graphics during the second splitting-merging, so as to achieve the purpose of reducing long and thin graphics. Compared with the previous embodiment, this embodiment does not need to confirm the optimal splitting-merging direction of each group of pairs of graphics and has higher processing efficiency.
[0113] Among them, the third splitting-merging direction and the fourth splitting-merging direction are used to distinguish the directions of two scans. In actual implementation, the third splitting-merging direction can be the same as the first splitting-merging direction or the second splitting-merging direction, and the fourth splitting-merging direction can be the same as the second splitting-merging direction or the first splitting-merging direction.
[0114] In some embodiments, performing splitting-merging processing on the target adjacent graphics based on the fourth splitting-merging direction to obtain a fourth set of merged graphics includes:
[0115] Determine the target adjacent graphics in the third set of merged graphics according to the third splitting-merging direction and the graphic directions of the adjacent graphics in the third set of merged graphics;
[0116] Perform splitting-merging processing on the target adjacent graphics based on the fourth splitting-merging direction;
[0117] Summarize the processed graphics with the unprocessed graphics in the third set of merged graphics to obtain a fourth set of merged graphics.
[0118] Among them, the target connected figure refers to the figure in the connected figure merged based on the third segmentation-merging direction, and the figure direction is the same as the third segmentation-merging direction. In this case, there are generally slender strip figures in these connected figures. Therefore, for these figures, performing another segmentation-merging in a direction different from the first segmentation-merging may eliminate the slender strip figures, thereby achieving the purpose of reducing the slender strip figures.
[0119] Taking Figure 12 the shown figure set as an example, assuming that all the first-time segmentation-merging is performed in a horizontal cutting manner. Among all the figures generated in this way, if the two connected figures are both horizontal, then perform vertical segmentation-merging (the segmentation-merging direction is reversed) on this type of figure. It can be found that the slender strip figures are eliminated after processing, thereby reducing the appearance of slender strip figures.
[0120] The figure processing method of the present application includes: obtaining all figure pairs in the figure set to be analyzed, where the figure pairs include intersecting figures; performing segmentation-merging processing on the figure pairs based on the third segmentation-merging direction to obtain a third merged figure set; extracting the target connected figures in the third merged figure set; performing segmentation-merging processing on the target connected figures based on the fourth segmentation-merging direction to obtain a fourth merged figure set. After the present application performs segmentation-merging processing on the figure pairs in a unified direction and then performs segmentation-merging processing on the target connected figures, it can avoid or reduce the appearance of slender figures, making the width of the figures in the merged figure set as close as possible to the original design to improve the accuracy of circuit analysis.
[0121] Please refer to Figure 13 , a figure processing device of the present application includes:
[0122] A first figure acquisition module 141, configured to obtain all figure pairs in the figure set to be analyzed, where the figure pairs include intersecting figures;
[0123] A first direction determination module 142, configured to determine the optimal segmentation-merging direction of each figure pair according to the figure direction and / or boundary relationship of each figure pair, where the optimal segmentation-merging direction includes a first segmentation-merging direction and a second segmentation-merging direction;
[0124] A first processing module 143, configured to perform segmentation-merging processing on the figure pairs with the optimal segmentation-merging direction being the first segmentation-merging direction based on the first segmentation-merging direction to obtain figure pairs in a first merged figure set;
[0125] A second processing module 144, configured to perform splitting- and-merging processing on the graphics in the first merged graphics set and the graphics in the graphics set to be analyzed that have not been subjected to splitting- and-merging processing, based on the second splitting- and-merging direction, so as to obtain a second merged graphics set.
[0126] In some embodiments, when determining the optimal splitting- and-merging direction for each graphics pair according to the graphic direction and / or boundary relationship of each graphics pair, the first direction determination module 142 is configured to:
[0127] When the graphic direction of the graphics pair intersects in the first direction, the optimal splitting- and-merging direction of the graphics pair is the first splitting- and-merging direction;
[0128] When the graphic direction of the graphics pair intersects in the second direction, the optimal splitting- and-merging direction of the graphics pair is the second splitting- and-merging direction;
[0129] When the graphic direction of the graphics pair is the first direction and the second direction, determine the optimal splitting- and-merging direction according to the boundary relationship of the graphics pair.
[0130] In some embodiments, when determining the optimal splitting- and-merging direction according to the boundary relationship of the graphics pair, the first direction determination module 142 is configured to:
[0131] Determine the boundary relationship of the graphics pair, where the boundary relationship includes a first boundary distance and a second boundary distance in the first direction, and a third boundary distance and a fourth boundary distance in the second direction;
[0132] Determine the optimal splitting- and-merging direction according to the magnitude relationship between the first boundary distance, the second boundary distance, the third boundary distance, and the fourth boundary distance.
[0133] In some embodiments, when determining the optimal splitting- and-merging direction according to the magnitude relationship between the first boundary distance, the second boundary distance, the third boundary distance, and the fourth boundary distance, the first direction determination module 142 is configured to:
[0134] Take the smaller value of the first boundary distance and the second boundary distance as the first comparison value, and take the smaller value of the third boundary distance and the fourth boundary distance as the second comparison value;
[0135] Determine the distance calculation direction corresponding to the smaller value of the first comparison value and the second comparison value as the optimal splitting- and-merging direction.
[0136] As Figure 14 shown, a graphic processing device includes:
[0137] A second graphic acquisition module 151, configured to acquire all graphics pairs in the graphics set to be analyzed, where the graphics pairs include intersecting graphics;
[0138] A third processing module 152, configured to perform splitting-merging processing on the pair of graphics based on the third splitting-merging direction to obtain a third merged graphics set;
[0139] An extraction module 153, configured to extract target connected graphics from the third merged graphics set;
[0140] A fourth processing module 154, configured to perform splitting-merging processing on the target connected graphics based on the fourth splitting-merging direction to obtain a fourth merged graphics set.
[0141] In some embodiments, when performing splitting-merging processing on the target connected graphics based on the fourth splitting-merging direction to obtain a fourth merged graphics set, the fourth processing module 152 is configured to:
[0142] Extract the target connected graphics from the third merged graphics set according to the third splitting-merging direction and the graphic directions of the connected graphics in the third merged graphics set;
[0143] Perform splitting-merging processing on the target connected graphics based on the fourth splitting-merging direction;
[0144] Summarize the processed graphics and the unprocessed graphics in the third merged graphics set to obtain the fourth merged graphics set.
[0145] For the specific working processes of the above modules, please refer to the description of the method embodiments, which will not be elaborated here.
[0146] This application provides an electronic device, including a storage medium and a controller. A computer program is stored on the storage medium, and when the computer program is executed by the controller, the steps of the above-mentioned graphic processing method are implemented.
[0147] This application provides a storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above-mentioned graphic processing method are implemented.
[0148] For the specific working processes of the above modules, please refer to the description of the method embodiments, which will not be elaborated here.
[0149] This application provides an electronic device, including a storage medium and a controller. The computer program is stored on the storage medium, and when the computer program is executed by the controller, the steps of the above-mentioned graphic processing method are implemented.
[0150] This application provides a storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above-mentioned graphic processing method are implemented.
[0151] The above-described embodiments merely represent several implementation manners of the present application. The description thereof is relatively specific and detailed, but it should not be construed as a limitation on the scope of the invention patent. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all fall within the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the appended claims.
Claims
1. A method for processing graphics of an integrated circuit, characterized in that: The method comprises: Acquire all graphic pairs in the graphic set to be analyzed, wherein the graphic pairs include intersecting graphics; Determining the optimal splitting-merging direction of each pair of graphics according to the graphic direction and / or boundary relationship of each pair of graphics, wherein the optimal splitting-merging direction includes a first splitting-merging direction and a second splitting-merging direction, wherein the first splitting-merging direction and the second splitting-merging direction are splitting-merging directions with different directions, and the optimal splitting-merging direction refers to a splitting-merging direction that can make the width of the merged graphics not less than the width of the original graphics; For a pair of graphics whose optimal splitting-merging direction is the first splitting-merging direction, performing splitting-merging processing based on the first splitting-merging direction to obtain a first merged graphics set; For the graphs of the first merged graph set and the graph pairs in the to-be-analyzed graph set that have not been split-merged, split-merge processing is performed based on the second split-merge direction to obtain a second merged graph set.
2. The method according to claim 1, characterized in that The step of determining the optimal splitting-merging direction of each graphic pair according to the graphic direction and / or boundary relationship of each graphic pair includes: When the directions of the graphics in the graphics pair are all the first direction, the optimal splitting-merging direction of the graphics pair is the first splitting-merging direction; When the directions of the graphics in the graphic pair are all the second direction, the optimal splitting-merging direction of the graphic pair is the second splitting-merging direction; When the directions of the graphics in the graphic pair are respectively the first direction and the second direction, the optimal splitting-merging direction is determined according to the boundary relationship of the graphic pair.
3. The method according to claim 2, characterized in that The determining the optimal splitting-merging direction according to the boundary relationship of the graphic pair includes: Determine a boundary relationship of the pair of graphics, wherein the boundary relationship includes a first boundary distance and a second boundary distance in the first direction, and a third boundary distance and a fourth boundary distance in the second direction; The optimal split-merge direction is determined according to the magnitude relationship among the first boundary distance, the second boundary distance, the third boundary distance and the fourth boundary distance.
4. The method according to claim 3, characterized in that The determining the optimal splitting-merging direction according to the magnitude relationship among the first boundary distance, the second boundary distance, the third boundary distance, and the fourth boundary distance includes: Taking the smaller value of the first boundary distance and the second boundary distance as a first comparison value, and taking the smaller value of the third boundary distance and the fourth boundary distance as a second comparison value; A distance calculation direction corresponding to a smaller value between the first comparison value and the second comparison value is determined as the optimal split-merge direction.
5. A method for processing graphics of an integrated circuit, characterized in that: The method comprises the following steps: Acquire all graphic pairs in the graphic set to be analyzed, wherein the graphic pairs include intersecting graphics; Performing splitting-merging processing on the graphic pair based on a third splitting-merging direction to obtain a third merged graphic set; Extracting target connected graphics from the third merged graphics set; Based on the fourth split-merge direction, the target connected graphics are split-merged to avoid or reduce the appearance of slender strip graphics, and a fourth merged graphics set is obtained, wherein the third split-merge direction and the fourth split-merge direction are split-merge directions with different directions, and the slender strip graphics refer to graphics whose short side size is smaller than the short side size of the original graphics after the graphics are merged.
6. The method according to claim 5, characterized in that The step of performing a splitting-merging process on the target connected graphics based on the fourth splitting-merging direction to obtain a fourth merged graphics set includes: extracting target connected graphics in the third merged graphics set according to the third split-merge direction and the graphic directions of the connected graphics in the third merged graphics set; Performing a splitting-merging process on the target connected graph based on the fourth splitting-merging direction; The processed graphics and the unprocessed graphics in the third combined graphics set are combined to obtain the fourth combined graphics set.
7. A graphics processing device for an integrated circuit, characterized in that: The device comprises: A first graphic acquisition module, used to acquire all graphic pairs in the graphic set to be analyzed, wherein the graphic pairs include intersecting graphics; A first direction determination module is used to determine the optimal splitting-merging direction of each graphic pair according to the graphic direction and / or boundary relationship of each graphic pair, wherein the optimal splitting-merging direction includes a first splitting-merging direction and a second splitting-merging direction, wherein the first splitting-merging direction and the second splitting-merging direction are splitting-merging directions with different directions, and the optimal splitting-merging direction refers to a splitting-merging direction that can make the width of the merged graphic not less than the width of the original graphic; A first processing module, configured to perform a splitting-merging process based on the first splitting-merging direction on a pair of graphics whose optimal splitting-merging direction is the first splitting-merging direction, so as to obtain a first merged graphics set; The second processing module is used to perform split-merge processing based on the second split-merge direction on the graphics of the first merged graphics set and the graphics pairs that have not been split-merged in the graphics set to be analyzed, so as to obtain a second merged graphics set.
8. A graphics processing device for an integrated circuit, characterized in that: The device comprises: A second graphic acquisition module, used to acquire all graphic pairs in the graphic set to be analyzed, wherein the graphic pairs include intersecting graphics; A third processing module, configured to perform a split-merge process on the graphic pair based on a third split-merge direction to obtain a third merged graphic set; An extraction module, used for extracting target connected graphics from the third merged graphics set; The fourth processing module is used to perform splitting and merging processing on the target connected graphics based on the fourth splitting and merging direction to avoid or reduce the appearance of slender strip graphics, and obtain a fourth merged graphics set. The third splitting and merging direction and the fourth splitting and merging direction are splitting and merging directions with different directions. The slender strip graphics refer to graphics whose short side size is smaller than the short side size of the original graphics after the graphics are merged.
9. An electronic device, comprising a storage medium and a controller, characterized in that: The storage medium stores a computer program, and when the computer program is executed by the controller, the steps of the graphics processing method for an integrated circuit according to any one of claims 1 to 6 are implemented.
10. A storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by the processor, the steps of the graphics processing method for an integrated circuit according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Electronic design automation (EDA) simulation method and device
CN112883681A
Confirmation method of adjacent graphs, electronic equipment and storage medium
CN117371385A