Segmentation method, device, computer readable storage medium and electronic device of GDS II
By dividing the layout area of the GDS II file into four parts, the time consumption problem when modifying a large number of polygon files in the existing technology is solved, and more efficient multi-threaded operation is achieved, thus improving processing efficiency.
Patent Information
- Application Number
- CN202211521347.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-30
- Publication Date
- 2026-02-10
- Estimated Expiration
- 2042-11-30
AI Technical Summary
In existing technologies, modifying GDS II files with a large number of polygons consumes a significant amount of time.
By dividing the layout area of the GDS II file into four equal parts, multiple sub-layout areas are obtained, reducing the number of polygons and allowing multi-threaded operations on the sub-layout areas, thus avoiding single-threaded operations.
It reduces the time cost of processing GDS II files, improves computational efficiency, and reduces the time consumption of single-threaded computation.
Smart Images

Figure CN115731251B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of image processing, in particular to a GDS II segmentation method and device, a computer readable storage medium and an electronic device. BACKGROUND
[0002] GDS II is a binary database file format, which describes the mask layout of the chip by layered planar geometry. The architecture of GDS II can support billions of polygons of the mask, and the simple architecture also facilitates developers to write code to manipulate GDS II. Since GDS II can support billions of polygons, when the developers modify the GDS II file with a large number of polygons, a large amount of time cost will be consumed. SUMMARY
[0003] The main purpose of the present application is to provide a GDS II segmentation method and device, a computer readable storage medium and an electronic device, to solve the problem that a large amount of time cost will be consumed when modifying the GDS II file with a large number of polygons in the prior art.
[0004] According to an aspect of an embodiment of the present application, a GDS II segmentation method is provided, comprising: acquiring a GDS II file, the GDS II file comprising a layout area; acquiring an operation requirement, the operation requirement being a requirement for constructing a mask layout by using the GDS II file; determining whether the layout area in the GDS II file needs to be segmented according to the operation requirement; and in the case that the layout area in the GDS II file needs to be segmented, equally segmenting the layout area in the GDS II file into four parts to obtain a plurality of sub-layout areas.
[0005] Optionally, the operation requirement further comprises a required number, the required number being a number of polygons in the GDS II file that need to participate in the operation, and determining whether the layout area in the GDS II file needs to be segmented according to the operation requirement comprises: in the case that the required number is greater than or equal to a number threshold, determining that the layout area in the GDS II file needs to be segmented; and in the case that the required number is less than the number threshold, determining that the layout area in the GDS II file does not need to be segmented.
[0006] Optionally, the method further comprises: acquiring a storage space occupied by the GDS II file; determining that the layout region in the GDS II file needs to be segmented in a case that the storage space is greater than or equal to a storage capacity threshold; and determining that the layout region in the GDS II file does not need to be segmented in a case that the storage space is less than the storage capacity threshold.
[0007] Optionally, the layout region in the GDS II file is evenly segmented into four parts to obtain a plurality of sub-layout regions, comprising: acquiring coordinate values of each coordinate point in the layout region; and according to the coordinate values of the coordinate points, the layout region in the GDS II file is evenly segmented into four parts to obtain a plurality of sub-layout regions.
[0008] Optionally, the coordinate values comprise horizontal coordinate values and vertical coordinate values, and according to the coordinate values of the coordinate points, the layout region in the GDS II file is evenly segmented into four parts to obtain a plurality of sub-layout regions, comprising: in a case that a predetermined condition is not met, performing a target step at least once until the predetermined condition is met, the target step comprising: according to the horizontal coordinate values and the vertical coordinate values of the coordinate points, the layout region in the GDS II file is evenly segmented to obtain four sub-layout regions, wherein the predetermined condition at least comprises: a running total time of the plurality of layout regions after segmentation is less than a running time before segmentation.
[0009] Optionally, in the process of evenly segmenting the layout region in the GDS II file into four parts to obtain a plurality of sub-layout regions, the method further comprises: in a case that a graphic occupies at least two sub-layout regions in the GDS II file, determining that the graphic is a target graphic, and according to the coordinate values of the coordinate points of the target graphic, the layout region is segmented, wherein the target graphic belongs to one of the sub-layout regions after segmentation.
[0010] Optionally, the method further comprises: merging a plurality of the sub-layout regions to obtain a merged layout region.
[0011] According to another aspect of the embodiments of the present application, a GDS II splitting device is also provided, which comprises: a first obtaining unit configured to obtain a GDS II file, wherein the GDS II file comprises a layout region; a second obtaining unit configured to obtain an operation requirement, wherein the operation requirement refers to a requirement of constructing a mask layout by using the GDS II file; a first determining unit configured to determine whether the layout region in the GDS II file needs to be split according to the operation requirement; and a splitting unit configured to split the layout region in the GDS II file into four parts evenly to obtain a plurality of sub-layout regions in the case that the layout region in the GDS II file needs to be split.
[0012] According to still another aspect of the embodiments of the present application, a computer readable storage medium is also provided, which comprises a stored program, wherein the program performs any one of the methods.
[0013] According to yet another aspect of the embodiments of the present application, an electronic device is also provided, which comprises one or more processors, a memory and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs comprise a program for performing any one of the methods.
[0014] In the embodiments of the present application, the GDS II file is obtained first, then the operation requirement is obtained, then it is determined whether the layout region in the GDS II file needs to be split according to the operation requirement, and finally the layout region in the GDS II file is split into four parts evenly to obtain a plurality of sub-layout regions in the case that the layout region in the GDS II file needs to be split. In this scheme, the layout region of the GDS II file with a large number of polygons is split to obtain smaller sub-layout regions, so that the number of polygons in the layout region is also smaller, and the sub-layout regions of a plurality of GDS II files can be operated simultaneously by using multi-threading, without operating a single large layout by using single-threading, thereby reducing the time cost and effectively improving the efficiency of processing the GDS II file. BRIEF DESCRIPTION OF DRAWINGS
[0015] The accompanying drawings, which form a part of the present application, are intended to provide further understanding of the present application and are incorporated herein for a purpose of explanations. The illustrative embodiments of the present application, as well as the explanations for the embodiments, are used to explain the present application and do not constitute improper limitations to the present application. In the drawings:
[0016] Figure 1 A flowchart of a GDS II splitting method according to an embodiment of the present application is shown;
[0017] Figure 2A schematic diagram of the structure of a GDS II segmentation device according to an embodiment of this application is shown;
[0018] Figure 3 A flowchart illustrating yet another segmentation method for GDS II is shown. Detailed Implementation
[0019] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.
[0020] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0021] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate for the embodiments of this application described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0022] It should be understood that when an element (such as a layer, film, region, or substrate) is described as being "on" another element, the element may be directly on the other element, or there may be an intermediate element present. Furthermore, in the specification and claims, when an element is described as being "connected" to another element, the element may be "directly connected" to the other element, or "connected" to the other element via a third element.
[0023] As mentioned in the background section, modifying GDS II files with a large number of polygons in the prior art consumes a lot of time. To solve the above problem, in a typical embodiment of this application, a GDS II segmentation method, apparatus, computer-readable storage medium, and electronic device are provided.
[0024] According to an embodiment of this application, a GDS II segmentation method is provided.
[0025] Figure 1 This is a flowchart of a GDS II segmentation method according to an embodiment of this application. Figure 1 As shown, the method includes the following steps:
[0026] Step S101: Obtain the GDS II file, which includes the layout area;
[0027] In step S101 above, C++ can be used to read the GDS II file. Of course, it is not limited to using C++ to read the file; any other feasible algorithm or application can be used to read the GDS II file.
[0028] Step S102: Obtain computational requirements, which refer to the requirements for constructing the mask layout using the aforementioned GDS II file;
[0029] In step S102 above, the computational requirements of the requesting end can be obtained first, so that the computational requirements can be used to further determine whether the layout area in the GDS II file needs to be divided more accurately and efficiently.
[0030] Step S103: Based on the above calculation requirements, determine whether it is necessary to segment the above-mentioned map region in the above-mentioned GDS II file;
[0031] Specifically, in practical applications, the number of polygons in a GDS II file may be in the millions. This can result in a significant time cost when modifying a GDS II file with a large number of polygons. Alternatively, the number of polygons in the GDS II file may be relatively small. Therefore, it is advisable to first determine whether it is necessary to segment the map region in the GDS II file.
[0032] In step S103 above, it can be determined whether the layout area in the GDS II file needs to be segmented. This is because some computational requirements are large, or the GDS II file consumes a lot of system memory when running. If the above situations occur, the GDS II file will have a large number of computations or run slowly, which will consume a lot of time. Therefore, it can be determined whether the layout area in the GDS II file needs to be segmented. If it is determined that the layout area in the GDS II file does not need to be segmented, it means that the GDS II file has a small number of computations or runs quickly. In this case, it is not necessary to segment the layout area in the GDS II file.
[0033] Step S104: If it is necessary to divide the above-mentioned map region in the above-mentioned GDS II file, the above-mentioned map region in the above-mentioned GDS II file is divided into four equal parts to obtain multiple sub-map regions.
[0034] In step S104 above, the number of parts that the map area needs to be divided into can be set. For example, it can be four parts. Of course, it is not limited to four parts. It can also be a power of 4. The specific number of parts that need to be divided can also be other numbers. By dividing the map area, sub-map areas can be obtained. The number of polygons in the sub-map areas obtained in this way is smaller. The sub-map areas of the GDS II file can be modified later, which can reduce time costs.
[0035] The method described above first obtains the GDS II file, then determines the computational requirements, and based on these requirements, decides whether to segment the layout region within the GDS II file. If segmentation is necessary, the layout region is divided into four equal parts, resulting in multiple sub-layout regions. This approach, by segmenting the layout region of a GDS II file with a large number of polygons, yields smaller sub-layout regions. These sub-layout regions contain fewer polygons, allowing for simultaneous multi-threaded computation on multiple sub-layout regions of the same GDS II file, eliminating the need for single-threaded computation on a single large layout. This reduces time costs and effectively improves the efficiency of processing GDS II files.
[0036] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.
[0037] It should also be noted that since the segmentation operation of GDS II files also incurs time costs, obtaining the final small layout area in a shorter time directly affects the overall computational efficiency. If the segmentation step takes too long, the final computation time may actually increase rather than decrease. Given the high computational efficiency of C++, it is highly recommended to use C++ for layout segmentation operations.
[0038] There are various ways to determine whether the layout area in the GDS II file needs to be segmented. One method is to use the required quantity to further determine whether the layout area in the GDS II file needs to be segmented accurately and efficiently. In one embodiment of this application, the above-mentioned computational requirements also include the required quantity, which refers to the number of polygons in the above-mentioned GDS II file that need to participate in the computation. Based on the above computational requirements, determining whether the layout area in the above-mentioned GDS II file needs to be segmented specifically includes the following steps:
[0039] Step S1031: If the above-mentioned demand quantity is greater than or equal to the quantity threshold, it is determined that the above-mentioned map area in the above-mentioned GDS II file needs to be divided.
[0040] Specifically, the quantity threshold can be 100 or 500, but it is not limited to these two cases; it can be any other feasible quantity threshold.
[0041] Step S1032: If the required quantity is less than the required quantity threshold, it is determined that the above-mentioned map area in the above-mentioned GDSII file does not need to be divided.
[0042] In steps S1031 to S1032 above, since some computational requirements require a large amount of computation, the number of computations in the GDS II file is large, which will consume a lot of time. Therefore, the size of the number of computational requirements can be used to further accurately and efficiently determine whether the layout area in the GDS II file needs to be divided.
[0043] There are several ways to determine whether the layout region in the GDS II file needs to be segmented. One method is to use the proportion of system memory occupied by the GDS II file during runtime to further determine whether the layout region in the GDS II file needs to be segmented more accurately and efficiently. In another embodiment of this application, the above method further includes the following steps:
[0044] Step S201: Obtain the storage space occupied by the above-mentioned GDS II file;
[0045] Step S202: If the storage space is greater than or equal to the storage capacity threshold, it is determined that the above-mentioned layout area in the above-mentioned GDS II file needs to be divided.
[0046] Specifically, the storage capacity threshold can be 50MB or 600MB, but it is not limited to these two cases; it can be any other feasible storage capacity threshold.
[0047] Step S203: If the storage space is less than the storage capacity threshold, it is determined that the layout area in the GDS II file does not need to be divided.
[0048] In steps S201 to S203 above, since the storage space occupied by the GDS II file is large and the GDS II file runs slowly, it will consume a lot of time. Therefore, the size of the storage space occupied by the stored GDS II file can be used to further accurately and efficiently determine whether the layout area in the GDS II file needs to be divided.
[0049] To further segment the map region more efficiently, in another embodiment of this application, the map region in the GDSII file is divided into four equal parts to obtain multiple sub-map regions, specifically including the following steps:
[0050] Step S1041: Obtain the coordinate values of each coordinate point in the above-mentioned map area;
[0051] Step S1042: Based on the coordinate values of the coordinate points, the map region in the GDS II file is divided into four equal parts to obtain multiple sub-map regions.
[0052] Regarding the actual segmentation process, if a single segmentation is sufficient to meet the requirements, then only one segmentation of the GDS II file's layout area is needed. If a single segmentation is insufficient, then the GDS II file's layout area can be segmented multiple times. In one specific embodiment of this application, the coordinate values include horizontal and vertical coordinate values. Based on the coordinate values of the coordinate points, the layout area in the GDS II file is divided into four equal parts to obtain multiple sub-layout areas. This includes: if a predetermined condition is not met, executing a target step at least once until the predetermined condition is met. The target step includes: dividing the layout area in the GDS II file into four sub-layout areas based on the horizontal and vertical coordinate values of the coordinate points. The predetermined condition includes at least one condition: the total running time of the divided sub-layout areas is less than the computation time before segmentation. In this embodiment, the layout area of the GDS II file can be segmented by executing the target step, and the segmentation is performed at least once until the predetermined condition is met. This ensures that the computation speed of the sub-layout areas obtained in the last segmentation is relatively fast.
[0053] For example, for a map region with an area of 100, the x-coordinate ranges from 0 to 10, and the y-coordinate ranges from 0 to 10. Performing the target step once yields four sub-map regions. Therefore, the coordinate range of each sub-map region is as follows:
[0054] The first sub-map area has a horizontal axis range of 0-5 and a vertical axis range of 0-5;
[0055] The second sub-region has an x-axis range of 0-5 and a y-axis range of 6-10.
[0056] The third sub-region has a horizontal axis range of 6-10 and a vertical axis range of 0-5.
[0057] The fourth sub-region has a horizontal axis range of 6-10 and a vertical axis range of 6-10.
[0058] If the map region of a GDS II file is divided once, 4 sub-map regions can be obtained. If the map region of a GDS II file is divided twice, 16 sub-map regions can be obtained. If the map region of a GDS II file is divided three times, 64 sub-map regions can be obtained. If the map region of a GDS II file is divided four times, 256 sub-map regions can be obtained, and so on.
[0059] Specifically, after dividing the map regions in the GDS II file into equal parts, an index can be built on the resulting sub-map regions. This makes it easier to find the corresponding sub-map regions and the corresponding graphics through the index later.
[0060] Furthermore, the layout area of the GDS II file can be used for for loop segmentation. The specific number of segments can be set according to predetermined conditions. Of course, it is not limited to for loop; other loop statements, such as switch statements, can also be used.
[0061] In steps S1041 to S1042 above, the division of the layout region can improve the efficiency of GDS II file operation. Since the number of polygons in the divided sub-layout regions is small, the corresponding sub-layout regions have higher operation efficiency and can also reduce the number of loop operations. The operation amount of the divided sub-layout regions can be reduced to one-quarter of the original.
[0062] Specifically, the segmentation of sub-map regions can improve computational efficiency in two ways. First, the resulting sub-map regions can be processed by multiple threads using multiple CPUs, and the results of each sub-map region can be merged to obtain the final computation result. Second, segmentation can reduce the number of for loop operations. For example, if the original GDS II file has 100 polygons, without segmenting the map region, it would require 100^2 = 10,000 operations. If the map region is split into 4 parts, each with 25 polygons, it would require 4 * (25^2) = 2,500 operations, directly reducing the computational load to one-quarter of the original.
[0063] Since splitting a GDS II file requires performing a for loop operation on the polygons within the layout area, there will be a time penalty, but the overall efficiency is still better than operating directly on a large layout.
[0064] Besides software methods like map partitioning that can improve computational efficiency, upgrading hardware can also improve computational efficiency. Tests have shown that using a high-frequency CPU results in significantly higher computational efficiency than using a low-frequency CPU.
[0065] In the process of segmenting the layout area of a GDS II file, to avoid a single graphic being divided into multiple sub-regions, in another embodiment of this application, the method further includes the following steps when dividing the layout area in the GDS II file into four equal parts to obtain multiple sub-layout areas:
[0066] Step S301: If a graphic occupies at least two of the sub-landscape regions in the GDS II file, the graphic is determined to be a target graphic. Based on the coordinate values of the coordinate points of the target graphic, the landscape region is divided, wherein the target graphic belongs to one of the divided sub-landscape regions.
[0067] Specifically, if the target graphic belongs to both the first and second sub-regions, it can be assigned to either of these two sub-regions. One way is to determine the area occupied by the target graphic in the two sub-regions and assign it to the sub-region with the larger area. This can be achieved by extending the coordinate range of the sub-region. Another way is to use redundancy to divide the region.
[0068] For example, in the above embodiment, the first sub-region has an x-coordinate range of 0-5 and a y-coordinate range of 0-5; the second sub-region has an x-coordinate range of 0-5 and a y-coordinate range of 6-10. Since the target graphic belongs to both the first and second sub-regions, the x and y coordinate ranges of the first and second sub-regions can be redefined.
[0069] The first sub-map area has a horizontal axis range of 0-5 and a vertical axis range of 0-8;
[0070] The second sub-region has an x-axis range of 0-5 and a y-axis range of 9-10.
[0071] In step S301 above, if the target graphic belongs to two sub-map areas at the same time, it can be re-segmented according to the coordinate values of the coordinate points of the target image. This can avoid the target graphic being truncated and ensure the integrity of the target graphic.
[0072] In another specific embodiment of this application, the above method further includes the following step: merging multiple sub-landmark regions to obtain a merged landmark region. In this embodiment, by dividing the landmark region of the GDS II file, the time cost of operating on the GDS II file can be reduced. After division, the landmark region of the GDS II file still needs to be transmitted to the requesting end. Therefore, multiple sub-landmark regions can be merged to obtain a merged landmark region, so that the requesting end can still perform calculations using the merged landmark region.
[0073] This application also provides a GDS II segmentation apparatus. It should be noted that the GDS II segmentation apparatus of this application can be used to execute the GDS II segmentation method provided in this application. The following describes the GDS II segmentation apparatus provided in this application.
[0074] Figure 2 This is a schematic diagram of a segmentation device for GDS II according to an embodiment of this application. Figure 2 As shown, the device includes:
[0075] The first acquisition unit 10 is used to acquire a GDS II file, wherein the GDS II file includes a layout area;
[0076] The first acquisition unit described above can use C++ to read GDS II files. Of course, it is not limited to using C++ to read GDS II files; any other feasible algorithm or application can also be used to read GDS II files.
[0077] The second acquisition unit 20 is used to acquire the computational requirements, which refer to the requirements for constructing the mask layout using the GDS II file.
[0078] The second acquisition unit mentioned above can first acquire the computing requirements of the requesting end, so that it can then determine more accurately and efficiently whether the layout area in the GDS II file needs to be segmented based on the computing requirements.
[0079] The first determining unit 30 is used to determine whether the above-mentioned map region in the above-mentioned GDS II file needs to be divided according to the above-mentioned calculation requirements.
[0080] Specifically, in practical applications, the number of polygons in a GDS II file may be in the millions. This can result in a significant time cost when modifying a GDS II file with a large number of polygons. Alternatively, the number of polygons in the GDS II file may be relatively small. Therefore, it is advisable to first determine whether it is necessary to segment the map region in the GDS II file.
[0081] The first determining unit described above can determine whether it is necessary to segment the layout area in the GDS II file. This is because some computational requirements are large, or the GDS II file consumes a lot of system memory when running. If the above situations occur, the GDS II file will have a large number of computations or run slowly, which will consume a lot of time. Therefore, it can be determined whether it is necessary to segment the layout area in the GDS II file. If it is determined that it is not necessary to segment the layout area in the GDS II file, it means that the GDS II file has a small number of computations or runs quickly. In this case, it is not necessary to segment the layout area in the GDS II file.
[0082] The segmentation unit 40 is used to divide the aforementioned map region in the aforementioned GDS II file into four equal parts to obtain multiple sub-map regions when it is necessary to segment the aforementioned map region in the aforementioned GDS II file.
[0083] The aforementioned segmentation unit allows setting the number of parts that the map area needs to be divided into. For example, it can be four parts, but it is not limited to four parts; it can also be a power of 4 or other numbers. By dividing the map area, sub-map areas can be obtained. The number of polygons in the sub-map areas obtained in this way is smaller, and the sub-map areas of the GDS II file can be modified later, which can reduce time costs.
[0084] In the aforementioned apparatus, the first acquisition unit acquires the GDS II file, the second acquisition unit acquires the computational requirements, and the first determination unit determines, based on the computational requirements, whether it is necessary to segment the layout region in the GDS II file. If segmentation of the layout region in the GDS II file is necessary, the segmentation unit divides the layout region in the GDS II file into four equal parts, resulting in multiple sub-layout regions. This scheme, by segmenting the layout region of a GDS II file with a large number of polygons, yields smaller sub-layout regions. These sub-layout regions contain fewer polygons, allowing for simultaneous multi-threaded computation on multiple sub-layout regions of GDS II files, eliminating the need for single-threaded computation on a single large layout, thereby reducing time costs and effectively improving the efficiency of processing GDS II files.
[0085] It should also be noted that since the segmentation operation of GDS II files also incurs time costs, obtaining the final small layout area in a shorter time directly affects the overall computational efficiency. If the segmentation step takes too long, the final computation time may actually increase rather than decrease. Given the high computational efficiency of C++, it is highly recommended to use C++ for layout segmentation operations.
[0086] There are multiple ways to determine whether the layout area in the GDS II file needs to be segmented. One method is to use the required quantity to further determine whether the layout area in the GDS II file needs to be segmented accurately and efficiently. In one embodiment of this application, the above-mentioned computational requirements also include the required quantity, which refers to the number of polygons in the above-mentioned GDS II file that need to participate in the computation. The first determining unit includes a first determining module and a second determining module, and the functions of each module are as follows:
[0087] The first determining module is used to determine that the above-mentioned map area in the above-mentioned GDS II file needs to be divided when the above-mentioned demand quantity is greater than or equal to the quantity threshold.
[0088] Specifically, the quantity threshold can be 100 or 500, but it is not limited to these two cases; it can be any other feasible quantity threshold.
[0089] The second determining module is used to determine that, if the required quantity is less than the required quantity threshold, it is not necessary to divide the above-mentioned map area in the above-mentioned GDS II file.
[0090] The first and second determination modules mentioned above require a large amount of computation for some of the computational needs, resulting in a large number of computations in the GDS II file, which would consume a lot of time. Therefore, the size of the number of computational needs can be used to more accurately and efficiently determine whether the layout area in the GDS II file needs to be divided.
[0091] There are several ways to determine whether the layout area in the GDS II file needs to be segmented. One method is to use the proportion of system memory occupied by the GDS II file during runtime to further accurately and efficiently determine whether the layout area in the GDS II file needs to be segmented. In another embodiment of this application, the above-mentioned device further includes a third acquisition unit, a second determination unit, and a third determination unit, and the functions of each unit are as follows:
[0092] The third acquisition unit is used to acquire the storage space occupied by the aforementioned GDS II file;
[0093] The second determining unit is used to determine that the above-mentioned layout area in the above-mentioned GDS II file needs to be divided when the above-mentioned storage space is greater than or equal to the storage capacity threshold.
[0094] Specifically, the storage capacity threshold can be 50MB or 600MB, but it is not limited to these two cases; it can be any other feasible storage capacity threshold.
[0095] The third determining unit is used to determine that, if the storage space is less than the storage capacity threshold, it is not necessary to divide the above-mentioned map region in the above-mentioned GDS II file.
[0096] The third acquisition unit, the second determination unit, and the third determination unit mentioned above can determine more accurately and efficiently whether the layout area in the GDS II file needs to be segmented by storing the storage space occupied by the GDS II file, since the GDS II file occupies a large amount of storage space and runs slowly, which will consume a lot of time.
[0097] To further segment the map area more efficiently, in another embodiment of this application, the segmentation unit includes an acquisition module and a segmentation module, and the functions of each module are as follows:
[0098] The acquisition module is used to acquire the coordinate values of each coordinate point in the above-mentioned map area;
[0099] The segmentation module is used to divide the above-mentioned map region in the above-mentioned GDS II file into four equal parts according to the above-mentioned coordinate values of the above-mentioned coordinate points, so as to obtain multiple sub-map regions.
[0100] In the actual segmentation process, if a single segmentation is sufficient to meet the requirements, then only one segmentation of the GDS II file's layout area is needed. If a single segmentation is insufficient, then the GDS II file's layout area can be segmented multiple times. In a specific embodiment of this application, the coordinate values include horizontal and vertical coordinate values. The segmentation module includes a segmentation submodule, which is used to execute a target step at least once if a predetermined condition is not met, until the predetermined condition is met. The target step includes: dividing the layout area in the GDS II file into four sub-layout areas based on the horizontal and vertical coordinate values of the coordinate points. The predetermined condition includes at least one condition: the total running time of the segmented layout areas is less than the computation time before segmentation. In this embodiment, the layout area of the GDS II file can be segmented by executing the target step, and the segmentation is performed at least once until the predetermined condition is met. This ensures that the computation speed of the sub-layout area obtained in the last segmentation is relatively fast.
[0101] For example, for a map region with an area of 100, the x-coordinate ranges from 0 to 10, and the y-coordinate ranges from 0 to 10. Performing the target step once yields four sub-map regions. Therefore, the coordinate range of each sub-map region is as follows:
[0102] The first sub-map area has a horizontal axis range of 0-5 and a vertical axis range of 0-5;
[0103] The second sub-region has an x-axis range of 0-5 and a y-axis range of 6-10.
[0104] The third sub-region has a horizontal axis range of 6-10 and a vertical axis range of 0-5.
[0105] The fourth sub-region has a horizontal axis range of 6-10 and a vertical axis range of 6-10.
[0106] If the map region of a GDS II file is divided once, 4 sub-map regions can be obtained. If the map region of a GDS II file is divided twice, 16 sub-map regions can be obtained. If the map region of a GDS II file is divided three times, 64 sub-map regions can be obtained. If the map region of a GDS II file is divided four times, 256 sub-map regions can be obtained, and so on.
[0107] Specifically, after dividing the map regions in the GDS II file into equal parts, an index can be built on the resulting sub-map regions. This makes it easier to find the corresponding sub-map regions and the corresponding graphics through the index later.
[0108] Furthermore, the layout area of the GDS II file can be used for for loop segmentation. The specific number of segments can be set according to predetermined conditions. Of course, it is not limited to for loop; other loop statements, such as switch statements, can also be used.
[0109] The acquisition and segmentation modules described above can improve the efficiency of GDS II file operations by segmenting the layout area. Since the number of polygons in the segmented sub-layout areas is smaller, the corresponding sub-layout areas have higher operation efficiency and can also reduce the number of loop operations. The amount of operation of the segmented sub-layout areas can be reduced to one-quarter of the original.
[0110] Specifically, the segmentation of sub-map regions can improve computational efficiency in two ways. First, the resulting sub-map regions can be processed by multiple threads using multiple CPUs, and the results of each sub-map region can be merged to obtain the final computation result. Second, segmentation can reduce the number of for loop operations. For example, if the original GDS II file has 100 polygons, without segmenting the map region, it would require 100^2 = 10,000 operations. If the map region is split into 4 parts, each with 25 polygons, it would require 4 * (25^2) = 2,500 operations, directly reducing the computational load to one-quarter of the original.
[0111] Since splitting a GDS II file requires performing a for loop operation on the polygons within the layout area, there will be a time penalty, but the overall efficiency is still better than operating directly on a large layout.
[0112] Besides software methods like map partitioning that can improve computational efficiency, upgrading hardware can also improve computational efficiency. Tests have shown that using a high-frequency CPU results in significantly higher computational efficiency than using a low-frequency CPU.
[0113] In the process of segmenting the layout area of a GDS II file, to avoid a single graphic being divided into multiple sub-regions, in another embodiment of this application, the above-mentioned apparatus further includes a processing unit, the function of which is as follows:
[0114] The processing unit is configured to, during the process of dividing the map region in the GDS II file into four equal parts to obtain multiple sub-map regions, determine that a graphic in the GDS II file occupies at least two of the sub-map regions as a target graphic, and divide the map region according to the coordinate values of the coordinate points of the target graphic, wherein the target graphic belongs to one of the sub-map regions after division.
[0115] Specifically, if the target graphic belongs to both the first and second sub-regions, it can be assigned to either of these two sub-regions. One way is to determine the area occupied by the target graphic in the two sub-regions and assign it to the sub-region with the larger area. This can be achieved by extending the coordinate range of the sub-region. Another way is to use redundancy to divide the region.
[0116] For example, in the above embodiment, the first sub-region has an x-coordinate range of 0-5 and a y-coordinate range of 0-5; the second sub-region has an x-coordinate range of 0-5 and a y-coordinate range of 6-10. Since the target graphic belongs to both the first and second sub-regions, the x and y coordinate ranges of the first and second sub-regions can be redefined.
[0117] The first sub-map area has a horizontal axis range of 0-5 and a vertical axis range of 0-8;
[0118] The second sub-region has an x-axis range of 0-5 and a y-axis range of 9-10.
[0119] If the aforementioned processing unit finds that the target graphic belongs to two sub-map regions simultaneously, it can re-segment the target graphic based on the coordinate values of the coordinate points of the target image. This avoids truncating the target graphic and ensures its integrity.
[0120] In another specific embodiment of this application, the above-mentioned apparatus further includes a merging unit, which is used to merge multiple sub-layout regions to obtain a merged layout region. In this embodiment, by dividing the layout region of the GDS II file, the time cost of operating on the GDS II file can be reduced. After the division, the layout region of the GDS II file still needs to be transmitted to the requesting end. Therefore, multiple sub-layout regions can be merged to obtain a merged layout region, so that the requesting end can still perform calculations using the merged layout region.
[0121] The aforementioned GDS II segmentation device includes a processor and a memory. The first acquisition unit, the second acquisition unit, the first determination unit, and the segmentation unit are all stored as program units in the memory, and the processor executes the aforementioned program units stored in the memory to achieve the corresponding functions.
[0122] The processor contains a kernel, which retrieves the corresponding program units from memory. One or more kernels can be configured; adjusting kernel parameters can reduce time costs for developers modifying GDS II files with a large number of polygons.
[0123] The memory may include non-permanent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0124] This invention provides a computer-readable storage medium storing a program that, when executed by a processor, implements the GDS II segmentation method described above.
[0125] This invention provides a processor for running a program, wherein the program executes the GDS II segmentation method.
[0126] This application also provides an electronic device including one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs include methods for performing any of the above-described methods.
[0127] This invention provides a device including a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, it performs at least the following steps:
[0128] Step S101: Obtain the GDS II file, which includes the layout area;
[0129] Step S102: Obtain computational requirements, which refer to the requirements for constructing the mask layout using the aforementioned GDS II file;
[0130] Step S103: Based on the above calculation requirements, determine whether it is necessary to segment the above-mentioned map region in the above-mentioned GDS II file;
[0131] Step S104: If it is necessary to divide the above-mentioned map region in the above-mentioned GDS II file, the above-mentioned map region in the above-mentioned GDS II file is divided into four equal parts to obtain multiple sub-map regions.
[0132] The devices mentioned in this article can be servers, PCs, tablets, mobile phones, etc.
[0133] This application also provides a computer program product, which, when executed on a data processing device, is suitable for executing an initialization program having at least the following method steps:
[0134] Step S101: Obtain the GDS II file, which includes the layout area;
[0135] Step S102: Obtain computational requirements, which refer to the requirements for constructing the mask layout using the aforementioned GDS II file;
[0136] Step S103: Based on the above calculation requirements, determine whether it is necessary to segment the above-mentioned map region in the above-mentioned GDS II file;
[0137] Step S104: If it is necessary to divide the above-mentioned map region in the above-mentioned GDS II file, the above-mentioned map region in the above-mentioned GDS II file is divided into four equal parts to obtain multiple sub-map regions.
[0138] To enable those skilled in the art to better understand the technical solution of this application, the technical solution and technical effects of this application will be described below in conjunction with specific embodiments.
[0139] Example
[0140] This embodiment relates to a GDS II file segmentation method. A GDS II file consists of many layers of masks, each containing numerous graphics of various shapes, which may be regular quadrilaterals or polygons. The layout segmentation process in this solution involves a for loop. When a layer of a layout contains millions of polygons, converting a large GDS II layout (layout area) into multiple smaller GDS II layouts (sub-layout areas) consumes considerable time. This solution uses a backtracking algorithm, performing the for loop operation only on a portion of the graphics, significantly reducing the segmentation time. Furthermore, the original algorithm was transferred from Python to C++. Since C++'s traversal efficiency is much higher than Python's, the segmentation time can be further reduced. Figure 3 As shown, the method includes:
[0141] Read the GDSII file to obtain the coordinate data of the graphic;
[0142] The large map being read is iterated through using a for loop, and the original large map is... Figure 1 Divided into four, and stored in the form of a vector (for loop through each polygon to determine whether the polygon is in the target area; if it is, add it to the map; otherwise, discard it).
[0143] Then, the backtracking method is used to iterate through the map, but this time the map is not traversed by the large map, but by traversing the four small maps obtained in the previous step, resulting in 16 medium-sized maps.
[0144] Repeat the operation multiple times until the size of the layout meets the requirements.
[0145] In the above embodiments of the present invention, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0146] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units described above can be a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, or indirect coupling or communication connection between units or modules, and may be electrical or other forms.
[0147] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0148] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0149] If the aforementioned integrated units are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0150] As can be seen from the above description, the embodiments of this application achieve the following technical effects:
[0151] 1) The GDS II segmentation method in this scheme first obtains the GDS II file, then determines the computational requirements, and based on these requirements, determines whether the layout region in the GDS II file needs to be segmented. Finally, if segmentation is necessary, the layout region in the GDS II file is divided into four equal parts, resulting in multiple sub-layout regions. This scheme, by segmenting the layout region of a GDS II file with a large number of polygons, yields smaller sub-layout regions. These sub-layout regions have fewer polygons, allowing for simultaneous multi-threaded computation on multiple sub-layout regions of GDS II files, eliminating the need for single-threaded computation on a single large layout. This reduces time costs and effectively improves the efficiency of processing GDS II files.
[0152] 2) The GDS II segmentation device in this scheme comprises a first acquisition unit acquiring the GDS II file, a second acquisition unit acquiring the computational requirements, and a first determination unit determining whether the layout region in the GDS II file needs to be segmented based on the computational requirements. If segmentation of the layout region in the GDS II file is required, the segmentation unit divides the layout region in the GDS II file into four equal parts, resulting in multiple sub-layout regions. In this scheme, by segmenting the layout region of a GDS II file with a large number of polygons, smaller sub-layout regions can be obtained. These sub-layout regions have fewer polygons, allowing for simultaneous multi-threaded computation on multiple sub-layout regions of GDS II files, eliminating the need for single-threaded computation on a single large layout, thus reducing time costs and effectively improving the efficiency of processing GDS II files.
[0153] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A segmentation method for GDS II, characterized in that, include: Obtain a GDS II file, which includes a layout area; Obtain computational requirements, which refer to the requirements for constructing a mask layout using the GDS II file; Based on the computational requirements, determine whether it is necessary to segment the layout region in the GDS II file; When it is necessary to divide the layout area in the GDS II file, the layout area in the GDS II file is divided into four equal parts to obtain multiple sub-layout areas. The process of dividing the map region in the GDS II file into four equal parts to obtain multiple sub-map regions includes: obtaining the coordinate values of each coordinate point in the map region; and dividing the map region in the GDS II file into four equal parts based on the coordinate values of the coordinate points to obtain multiple sub-map regions. The coordinate values include x-coordinate and y-coordinate values. Based on the coordinate values of the coordinate points, the map region in the GDS II file is divided into four equal parts to obtain multiple sub-map regions. This includes: if a predetermined condition is not met, executing a target step at least once until the predetermined condition is met. The target step includes: dividing the map region in the GDS II file into four equal parts based on the x-coordinate and y-coordinate values of the coordinate points to obtain four sub-map regions. The predetermined condition includes at least: the total running time of the divided map regions is less than the running time before the division. In the process of dividing the map region in the GDS II file into four equal parts to obtain multiple sub-map regions, the method further includes: when a graphic occupies at least two of the sub-map regions in the GDS II file, determining the graphic as a target graphic, and dividing the map region according to the coordinate values of the coordinate points of the target graphic, wherein the target graphic belongs to one of the divided sub-map regions.
2. The method according to claim 1, characterized in that, The computational requirements also include the required quantity, which refers to the number of polygons in the GDS II file that need to participate in the computation. Based on the computational requirements, it is determined whether the map region in the GDS II file needs to be segmented, including: If the required quantity is greater than or equal to the quantity threshold, it is determined that the map region in the GDS II file needs to be segmented. If the required quantity is less than the required quantity threshold, it is determined that the map region in the GDS II file does not need to be segmented.
3. The method according to claim 1, characterized in that, The method further includes: Obtain the storage space occupied by the GDS II file; If the storage space is greater than or equal to the storage capacity threshold, it is determined that the layout area in the GDS II file needs to be segmented. If the storage space is less than the storage capacity threshold, it is determined that the layout region in the GDS II file does not need to be segmented.
4. The method according to claim 1, characterized in that, The method further includes: The multiple sub-map regions are merged to obtain the merged map region.
5. A segmentation device for GDS II, characterized in that, include: The first acquisition unit is used to acquire a GDS II file, wherein the GDS II file includes a layout area; The second acquisition unit is used to acquire the computational requirements, which refer to the requirements for constructing a mask layout using the GDS II file. The first determining unit is used to determine whether the layout area in the GDS II file needs to be segmented based on the computational requirements. A segmentation unit is used to divide the map region in the GDS II file into four equal parts to obtain multiple sub-map regions when it is necessary to segment the map region. The segmentation unit includes an acquisition module and a segmentation module, and the functions of each module are as follows: the acquisition module is used to acquire the coordinate values of each coordinate point in the map region; the segmentation module is used to divide the map region in the GDS II file into four equal parts based on the coordinate values of the coordinate points to obtain multiple sub-map regions. The coordinate values include x-coordinate and y-coordinate values. The segmentation module includes a segmentation sub-module, which is used to execute a target step at least once if a predetermined condition is not met, until the predetermined condition is met. The target step includes: dividing the map region in the GDS II file into four sub-map regions based on the x-coordinate and y-coordinate values of the coordinate points. The predetermined condition includes at least: the total running time of the segmented map regions is less than the running time before segmentation. The device further includes a processing unit, which has the following function: During the process of dividing the layout area in the GDS II file into four equal parts to obtain multiple sub-layout areas, if a graphic occupies at least two of the sub-layout areas in the GDS II file, the processing unit determines the graphic as a target graphic, and divides the layout area according to the coordinate values of the coordinate points of the target graphic, wherein the target graphic belongs to one of the divided sub-layout areas.
6. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein the program performs the method according to any one of claims 1 to 4.
7. An electronic device, characterized in that, include: One or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs comprising methods for performing any one of claims 1 to 4.
Citation Information
Patent Citations
Method for accelerating analysis and optimization of physical layout of integrated circuit
CN102314523A
Method for dividing physical layout
CN102339329A
Stencil mask layout pattern data division processing system, stencil mask layout pattern data division processing method, and program read by computer to execute stencil mask layout pattern data dividing process
US20030027058A1