Data processing methods, data structure generation methods, query methods
By adopting a two-dimensional spatial point index tree structure in the layout data file, the problem of low efficiency in querying the connection relationship of basic graphic elements in the existing technology is solved, fast indexing and efficient query are achieved, and the efficiency and accuracy of integrated circuit design are improved.
Patent Information
- Application Number
- CN202211727967.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2021-12-31
- Filing Date
- 2022-12-30
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2042-12-30
AI Technical Summary
The existing layout data file format is inefficient in extracting basic primitive information and checking connection relationships, and cannot meet the current query speed requirements, resulting in excessive computer storage space usage and inefficient query.
A two-dimensional spatial point index tree structure (such as a quadtree) is used to replace the linear data structure. By setting up multi-level nodes (root nodes, branch nodes, and leaf nodes), a data structure is constructed to store the area bounding box, number, and layer information of basic graphics elements, thereby realizing fast indexing and querying of the connection relationship between basic graphics elements.
It greatly improves the query efficiency of the connection relationship of basic graphics elements in layout files, reduces computing resource consumption, simplifies connection relationship checking, and improves the query speed and accuracy of ultra-large-scale integrated circuit design.
Smart Images

Figure CN116090395B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of semiconductor design and production, and in particular relates to a data processing method and a corresponding data structure generation method and a corresponding query method. Background Art
[0002] In VLSI design, there are currently two mainstream layout data file formats: GDSII and OASIS. While these two layout data file formats differ in their storage methods, both contain basic primitives (BasicCells) and cells, such as Boundary and Path in GDSII. Depending on how they are created, there are different types of primitives, such as SREF and AREF in GDSII, and Repetitions in OASIS. AREFs in GDSII create new primitives by referencing other basic primitives or primitives and forming a large number of repetitive structures in a regular pattern. SREFs in GDSII create new primitives by referencing other basic primitives or primitives and creating a large number of repetitive structures.
[0003] Electronic Design Automation (EDA) tools for integrated circuits offer greater flexibility and variety in handling array types in designs, primarily due to the high reusability of components within integrated circuits. This necessitates the high compressibility of layout data files. This also means that fully expanding a layout data file generates a significant amount of redundant information, consuming significant computer storage space and hindering the efficient search and extraction of relevant basic primitive information.
[0004] In the field of semiconductor design and production, it is necessary to check the connection relationship between basic graphics elements. From the above, it can be seen that the data structure under the existing conventional layout data file format cannot meet the current query speed requirements for extracting basic graphics element information and checking the connection relationship between basic graphics elements, and the efficiency is difficult to further improve.
[0005] Therefore, it is necessary to conduct in-depth research on a data structure generation method and a query method that can be applied to extract the connection relationship between any basic graphics elements, and with faster speed and higher efficiency, so as to further promote the in-depth development and widespread application of semiconductor design and production technology. Summary of the Invention
[0006] The present invention is to solve all or part of the problems of the above-mentioned prior art. On the one hand, the present invention provides a data processing method. The layout file processed by this method will facilitate the query operation of the connection relationship between basic graphics elements; on the other hand, the present invention provides a data structure generation method, which can generate a data structure that is conducive to improving the efficiency of analyzing the connection relationship between each graphic element in the layout; the present invention also provides a corresponding query method, which can quickly extract the connection relationship between any basic graphics elements, replace the linear data structure with a spatial point index tree data structure, and then query, so as to further improve the efficiency of analyzing the connection relationship between each graphic element in the layout file.
[0007] One aspect of the present invention provides a data processing method, comprising: providing multiple nodes, each hierarchically divided into root nodes, branch nodes, and leaf nodes, forming a two-dimensional spatial point index tree structure; storing node information in whole or in part; and storing node information including: information about the region bounding box corresponding to the node; a list storing the number of basic primitives, basic primitive numbers, layer information, and adjacent layer information. The region bounding box refers to the region corresponding to the node; the number of basic primitives refers to the number of basic primitives that intersect with the region bounding box corresponding to the node; the basic primitive numbers are used to identify basic primitives, and the basic primitive numbers stored in the list correspond to basic primitives that intersect with the region bounding box corresponding to the node; the layer information identifies the layer to which the basic primitive in the node belongs, and the adjacent layer information refers to information about layers that have adjacent connections to the corresponding layer. Generally, the basic primitive numbers in all the nodes are continuous.
[0008] The root node and the branch node do not store the node information. The node information refers to the information contained in the leaf node. That is, the leaf node information includes the information of the bounding box of the leaf node, and a list that stores the basic primitive number, layer information, and adjacent layer information of the layer in the overlapping area with the bounding box of the leaf node. The bounding box refers to the area corresponding to the node. For example, when constructing a quadtree structure, the leaf node corresponds to the smallest rectangular box after the layout file is divided into four equal parts. The number of basic primitives refers to the number of basic primitives related to the leaf node. The number of basic primitives is used to identify the basic primitives. The layer information refers to which layer the basic primitive related to the leaf node belongs to. The adjacent layer information of the layer refers to the layer information that has a vertical connection relationship with the layer, representing the layer information with a vertical connection relationship.
[0009] The two-dimensional space point index tree structure is a quadtree structure; the area boundary box is a rectangular area, the root node corresponds to the minimum rectangular box of all basic graphics elements in the selected layout file, and the leaf node corresponds to the minimum rectangular box after the layout file is continuously divided into four equal parts.
[0010] The branch node corresponds to four lower-level branch nodes or four leaf nodes. When the branch node is divided into four leaf nodes, if the area of the basic cell spatially intersects with the bounding boxes of the regions corresponding to multiple leaf nodes, the node information corresponding to the basic cell is retained on the branch node and not inserted into the leaf node. The node information is stored in the branch node and leaf nodes with the basic cell. That is, the branch node with the basic cell contains: information about the bounding box of the region corresponding to the branch node, and a list storing the basic cell number, layer information, and upper and lower layer information of the layer; the leaf node contains: information about the bounding box of the region corresponding to the leaf node, and a list storing the basic cell number, layer information, and upper and lower layer information of the layer where the bounding box corresponding to the leaf node overlaps.
[0011] The information of the region bounding box includes size information and coordinate information of the region bounding box.
[0012] The basic graphic element refers to a polygonal structure graphic in a layer.
[0013] Another aspect of the present invention provides a method for generating a data structure, comprising: step S1. obtaining a layout file (such as a GDSII layout file) and traversing to obtain layer information; the layer information includes primitive information and basic primitive information; step S2. numbering the basic primitives, including consecutively numbering the basic primitives that constitute the same primitive (ensuring that the basic primitive numbers in the primitive are consecutive) and that the numbers of all basic primitives are consecutive; step S3. creating a two-dimensional spatial point index tree data structure based on the numbered layout file to generate a file of the data structure; wherein the basic primitive refers to a polygonal structure graphic in a layer; the basic primitive information includes the layer information, position information and size information of the basic primitive; the primitive refers to a graphic composed of several basic primitives, and the primitive information includes a creation method of the primitive, and the creation method includes: a method of referencing a basic primitive or a primitive (such as SREF in GDSII), and / or Or array basic primitives or primitives (such as AREF in GDSII); the basic primitive refers to a polygonal structure graphic in a layer (such as a filled polygon Boundary in GDSII, a line Path with a certain width); the basic primitive information includes the layer information, position information and size information of the basic primitive; the process of step S3 includes: determining an initial node bounding box for selecting all layers, obtaining an area determined by a node bounding box based on the area determined by the initial node bounding box and the level to which the node belongs, and the node bounding box corresponds to the node; using the numbered basic primitives as data objects, traversing the data objects (i.e., basic primitives) based on the numbers, determining the current node corresponding to the node bounding box that overlaps with the area to which the current data object belongs according to the position information; determining the node to which the current data object is inserted based on the number of data objects in the current node; completing the traversal and generating the level settings of all nodes.
[0014] Some layout files, such as GDSII, have features that can be described as a tree structure, but this tree structure is not conducive to fast indexing. By performing hierarchical partitioning based on node bounding boxes, a two-dimensional spatial point index tree structure is constructed that takes spatial information into account. The generated data structure integrates and divides information to achieve the purpose of fast indexing to spatially related graphics.
[0015] The method for determining the initial node bounding box for selecting all layers includes determining the initial node bounding box according to the maximum extension of each layer in different directions, or according to the maximum value of the coordinates of the basic primitives in different directions.
[0016] The node bounding box refers to the rectangle with the smallest area after the initial node bounding box is divided into multiple levels of regions according to the level to which the node belongs. In some embodiments, the node bounding box is the rectangle of the smallest unit corresponding to the initial node bounding box after being divided into four equal parts multiple times. The basic graphic elements cannot span different node bounding boxes, and the regions of different node bounding boxes at the same level do not overlap with each other.
[0017] The process of obtaining the region determined by the node bounding box based on the region determined by the initial node bounding box and the level to which the node belongs includes: sequentially dividing the region determined by the initial node bounding box into multiple first-level sub-regions according to the level to which the corresponding node belongs, and correspondingly forming multiple first-level node bounding boxes; the region determined by the next-level node bounding box is the sub-region formed by dividing the region determined by the upper-level node bounding box.
[0018] The step S3 further includes predefining the maximum number of associated objects in each node of the two-dimensional spatial point index tree and the maximum depth of the two-dimensional spatial point index tree.
[0019] Denote the maximum number of associated objects as M and the maximum depth as N; denote the level number of the current node as j, j ∈ [0, N], and the number of data objects already inserted in the current node as i, where i is a positive integer; traverse the data objects in ascending order of the numbering, including: initialize j = 0, i = M, that is, the initial node bounding box corresponds to the root node, and insert the M data objects into the root node one by one; Step 1: j = j + 1, divide the next-level branch nodes, and the branch nodes correspond to the node bounding boxes one by one; Step 2: Traverse the data objects in the (j - 1)-level node: determine the current node to which the current data object belongs and insert it into the corresponding current node, and complete the traversal; Step 3: Traverse the remaining current data objects and determine the current node to which the current data object belongs; if i < M, insert the current data object into the corresponding current node, i = i + 1; if i ≥ M, if j < N, return to Step 1; repeat Steps 1 to 3; if j = N, perform Step 4: construct the current node as a leaf node and add all the data objects to the storage table of the leaf node. When the maximum depth N is reached, no further division is made. According to the above process, all the data objects are traversed, and the construction of the hierarchical partition of the bounding box and the data structure of the two-dimensional spatial point index tree is completed. This data structure mapping can avoid high memory occupancy.
[0020] Inserting the current data object into the corresponding current node means inserting a data object into one or more next-level branch nodes. According to the position information of each data object (basic graphic element), determine which next-level node bounding boxes overlap (it may overlap with one or more next-level node bounding boxes). After determining the overlapping next-level node bounding boxes, the corresponding next-level branch nodes can be determined, and then the data object is inserted into the corresponding one or more next-level branch nodes.
[0021] If i=0, the area covered by the current first-level branch node does not contain any data object, and a null pointer is returned. This means that the current first-level branch node is a null pointer node that does not contain any data object.
[0022] The two-dimensional spatial point index tree includes any one of a quadtree, a balanced multi-branch search tree (B-Tree, B+-Tree), a k-dimensional tree (any dimensional tree kD-Tree), a horizontal vertical tree (HV-Tree) or a spatial data index tree (R-Tree).
[0023] The present invention also provides a query method for checking the connection relationship between basic graphic elements in a layout file, generating a data structure file based on the generation method provided in one aspect of the present invention; including iteratively checking the connection relationship; the steps of iteratively checking the connection relationship include: a first step, setting the selected starting coordinates as the current inspection window, selecting the current target layer, and generating a layer list; establishing an identifier array with the same length as the number of basic graphic elements, and initializing all identifiers to "unchecked", wherein the identifiers correspond one to one with the basic graphic elements (Basic Cell); establishing a search queue for storing the index sequence number of the basic graphic element (Basic Cell) to be checked; establishing a suspicious object queue for storing the basic graphic elements (Basic Cell) to be checked that may have an overlapping relationship with the inspection window; Cell); the index number corresponds to the basic primitive number one by one; the second step is to initialize the suspicious object queue; the third step is to check the spatial information of the basic primitives in the suspicious object queue, put the basic primitives that meet the conditions into the retrieval queue, and clear the suspicious object queue; the fourth step is to record the basic primitive at the head of the retrieval queue as the current basic primitive, set the polygonal structure graphic area of the current basic primitive as the current inspection window, extract the adjacent layers that have a connection relationship in the layout space of the layer corresponding to the current basic primitive, add the adjacent layers and the layer corresponding to the current basic primitive to the layer list to update the layer list; put the index number of the current basic primitive (the first basic primitive number) into the inspection result set and update its corresponding identifier to "checked" (by marking the identifier as "checked", the purpose of setting the identifier array is to mark), and remove the current basic primitive from the retrieval queue; the fifth step is to remove the current basic primitive from the retrieval queue; Step 1, updating the suspicious object queue, checking the spatial information of the basic graphics elements in the current suspicious object queue and whether they have been marked as "inspected", and putting the index numbers of the basic graphics elements that have not been marked as "inspected" and meet the conditions into the current retrieval queue; Step 6, judging whether the current retrieval queue is empty, if not, repeating the fourth to fifth steps until the current retrieval queue is empty; wherein, the operation of initializing and updating the suspicious object queue includes: starting from the root node according to the position information and coordinate information of the current inspection window, searching for the branch nodes corresponding to the area overlapping with the current inspection window step by step, and putting the index numbers of all basic graphics elements in the found branch nodes into the suspicious object queue; the spatial information includes: the overlapping relationship between the basic graphics element and the current inspection window and whether the layer to which it belongs is in the layer list; the compliance means that the basic graphics element overlaps with the current inspection window and the layer to which it belongs is in the layer list.
[0024] The query method comprises the following steps: obtaining an initial layout file and determining a target basic primitive, wherein the data structure file includes a first data structure file generated based on the initial layout file; performing the iterative connection check based on the first data structure file to obtain an initial check result set; the initial check result set includes all basic primitives in the initial layout file that have a connection relationship with the target basic primitive, excluding cut-off layers; creating a new first layout file (such as a GDSII layout file) based on the initial check result set; obtaining the cut-off layers of the initial layout file to create a new second layout file; performing a truncation operation (for example, which can be implemented through simple geometric operations) on the first layout file using the second layout file, i.e., using the cut-off layers in the second layout file to delete the overlapping areas of the corresponding layers in the first layout file, and recording the updated first layout file as a third layout file; the data structure file also includes a second data structure file generated based on the third layout file; performing the iterative connection check on the second data structure file to obtain a final check result set.
[0025] The final inspection result set includes all basic graphic elements (including the target basic graphic element) that are connected to the target basic graphic element.
[0026] The layer depth of the first layout file is set to 1.
[0027] The query method provided by the present invention also implements the function of selecting a cut-off layer to obtain all basic primitives that are connected to the target basic primitive after considering only the cut-off layer. Before creating the first layout file, a cut-off layer is selected; the cut-off layer of the initial layout file is the selected cut-off layer. This function of selecting a cut-off layer is implemented by: during the creation of the first layout file, only the selected cut-off layer in the initial layout file is retrieved and created as a second layout file. This second layout file is then used to perform a truncation operation (a simple geometric operation) on the first layout file. Specifically, the cut-off layer in the second layout file is used to delete the overlapping areas of the corresponding layers in the first layout file. The first layout file after the truncation operation is then used as the third layout file. The cut-off layer is selected based on actual application requirements, and the basic primitives obtained from the query are all basic primitives that are connected to the target basic primitive after considering the selected cut-off layer. This better meets the needs of actual applications, and the results obtained can be directly used in actual work, making the query more targeted and improving the efficiency of the overall work process. The impact of the cut layer must be addressed before the actual chip is produced. Therefore, the corresponding position of the actual chip will be cut off by the cut layer. Considering the impact of the cut layer on the connectivity of the cut layer during the design phase further improves the query method.
[0028] After obtaining the final inspection result set, all basic primitives are obtained and a marking layer is added to the initial layout file to highlight them. Marking the basic primitives in the initial layout file is helpful to guide layout design and analysis.
[0029] The method for updating the suspicious object queue includes: when the next-level nodes of the branch node all contain several basic graphic elements, the several basic graphic elements are inserted into the branch node and the several basic graphic elements are removed from the next-level nodes; the method for searching level by level starting from the root node includes: judging whether the number of the current basic graphic element is the same as the basic graphic element number stored in the branch node, if so, not searching downward; if not, continuing to search downward.
[0030] The number of data objects in the next-level node is recorded as Y, and the number of data objects under the branch node that needs to be inserted into the basic primitive is recorded as X; a threshold of X to Y (X / Y) is preset, and whether to insert the branch node is determined based on the threshold.
[0031] The step of iteratively checking the connection relationship further includes: deduplicating basic graphic elements in the search queue and / or the suspicious object queue, and removing repeated basic graphic element numbers.
[0032] Compared with the prior art, the present invention has the following main beneficial effects:
[0033] 1. The data processing method of the present invention can simplify the connection relationship checking operation of basic graphic elements compared to layout files such as GDSII, avoid the large amount of computing power consumption on obviously useless intersection judgment, greatly improve the efficiency of searching and extracting relevant basic graphic element information, and facilitate further optimization of computer resources.
[0034] 2. The data structure generation method of the present invention can generate the data structure of the data processing method of the present invention, has corresponding advantages, can avoid high memory usage, and can obtain a data structure that is conducive to improving indexing efficiency.
[0035] 3. The query method of the present invention is used to check the connection relationship between basic graphics elements in the layout file, which has corresponding advantages. It greatly reduces the comprehensive time consumption of querying the connection relationship between basic graphics elements in the layout, can efficiently find and extract relevant basic graphics element information, has a fast inspection speed and reliable inspection results, and further improves the level of ultra-large-scale integrated circuit design. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 This is a schematic diagram of the data structure generation method process of the second embodiment of the present invention.
[0037] FIG2( a ) is a schematic diagram of a layout file according to a second embodiment of the present invention.
[0038] FIG2( b ) is a schematic diagram of the data structure of the second embodiment of the present invention.
[0039] FIG2( c ) is a schematic diagram of graphic elements in a layout file according to the second embodiment of the present invention.
[0040] FIG3 (a) to FIG3 (g) are schematic diagrams of basic graphic elements of each layer according to the second embodiment of the present invention.
[0041] FIG3( h ) is a schematic diagram of the M1 layer structure according to the second embodiment of the present invention.
[0042] FIG3( i ) is a schematic diagram of the M1 layer and the region boundary box according to the second embodiment of the present invention.
[0043] Figure 4 This is a schematic diagram of basic graphic elements and their numbers in embodiment 2 of the present invention.
[0044] Figure 5 This is a schematic diagram of the process of creating a quadtree data structure according to the third embodiment of the present invention.
[0045] FIG6 (a) is a schematic diagram of layout file partitioning according to the third embodiment of the present invention.
[0046] FIG6( b ) is a schematic diagram of a quadtree data structure according to a third embodiment of the present invention.
[0047] Figure 7 Schematic diagram of the query method according to the fourth embodiment of the present invention.
[0048] Figure 8 Schematic diagram of the iterative connection relationship check process of the fourth embodiment of the present invention. DETAILED DESCRIPTION
[0049] The following is a clear and complete description of the technical solutions in the specific embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making any creative efforts are within the scope of protection of the present invention.
[0050] In some embodiments, in order to check the connection relationship of Basic Cell, a linear data structure is created to uniquely identify all Basic Cells under the root node, and then the connection relationship of Basic Cell in the GDSII layout is checked and analyzed based on this linear data structure. This method can achieve a rapid inspection and analysis of the connection relationship of BasicCell in the GDSII layout to a certain extent, and improve the query speed and efficiency. However, when faced with the number of BasicCells in ultra-large-scale integrated circuits that are often more than 100 million, the above approach consumes a lot of computing power on obviously useless intersection judgments, so there is still unnecessary time consumption, and the overall time consumption is still high. In order to further improve, the present invention provides a method for improving the query efficiency of the linear data structure created above by using a two-dimensional spatial point index tree data structure through the following embodiments, providing a solution for significantly reducing the overall time consumption of the query of the connection relationship of BasicCell in the layout. In the following embodiments, taking quadtree and GDSII layout files as examples, a quadtree data structure is used instead of a linear data structure for query, which improves the efficiency of analyzing the connection relationship between each graphic element in the layout file, and considers spatial information to integrate and divide information to achieve the purpose of quickly indexing to spatially related graphics. It should be noted that the 2D point index tree can also be other more advanced 2D graph index trees, such as HV-Tree, B-Tree, B+-Tree, R-Tree, and arbitrary dimensional kD-Tree, depending on the specific application and is not limited. Compared to the query efficiency of linear data structures, for example, the query efficiency of the quadtree data structure and corresponding query methods has been generally verified to be about 10-80 times higher, and in some areas, the query efficiency has been improved by more than 100 times.
[0051] The above description is for better understanding of the present invention and is not intended to limit the scope of the present invention in any form.
[0052] Example 1
[0053] In a first embodiment of the present invention, a data processing method is provided, comprising: setting a plurality of nodes, wherein the plurality of nodes are hierarchically arranged and divided into root nodes, branch nodes, and leaf nodes, forming a two-dimensional spatial point index tree structure; storing node information in whole or in part in the plurality of nodes; the node information including: information about the region bounding box corresponding to the node, and a list storing the number of primitives, primitive numbers, layer information, and adjacent layer information; wherein the region bounding box refers to the region corresponding to the node; the number of primitives refers to the number of primitives that intersect with the region bounding box corresponding to the node; the primitive number is used to identify the primitive, and the primitive numbers stored in the list correspond to the primitives that intersect with the region bounding box corresponding to the node; the layer information identifies the layer to which the primitive in the node belongs, and the adjacent layer information refers to information about layers that have adjacent connections to the primitive. In the example, the primitives in the nodes of the quadtree data structure are allocated based on space, so there is no requirement for the primitives in a single node to have continuous attributes.
[0054] In this embodiment, the multiple nodes set in an example scenario include a root node, multiple levels of branch nodes, and leaf nodes. The root node corresponds to four branch nodes, and the branch nodes correspond to four next-level branch nodes or four leaf nodes. The root node and branch nodes do not store node information. The leaf nodes contain information such as the bounding box of the leaf node, and a list storing the numbers of basic graphic elements that overlap with the bounding box of the leaf node, their layer information, and their upper and lower layer information. The bounding box of the example refers to the rectangular area corresponding to the node, such as the smallest rectangular box after the layout file is divided into four equal parts. The number of basic graphic elements refers to the number of basic graphic elements associated with the leaf node (intersecting with the bounding box of the leaf node). The basic graphic element number is used to identify the basic graphic element. The layer information refers to the layer to which the basic graphic element associated with the leaf node belongs. The upper and lower layer information of the layer refers to the layer information that has a upper and lower connection relationship with the layer to which it belongs, indicating the layer information with the upper and lower connection relationship.
[0055] In other example cases, the multiple nodes set up also include root nodes, multi-level branch nodes, and leaf nodes. The root node corresponds to four branch nodes, and the branch node corresponds to four next-level branch nodes or four leaf nodes. When a branch node needs to be divided into four leaf nodes, if it is found that the basic primitive will span multiple leaf nodes, then the position of the basic primitive will not be moved (the node information corresponding to the basic primitive will be left on the branch node), and the basic primitive will not be inserted into the leaf node; the branch node with the basic primitive contains information: the branch node corresponds to the area bounding box (Boundary Box) information, and a list that stores the basic primitive number, layer information, and upper and lower layer information of the layer left in the branch node; the leaf node contains information: the leaf node corresponds to the area bounding box (Boundary Box) information, and a list that stores the basic primitive number, layer information, and upper and lower layer information of the layer that has an overlapping area with the area bounding box corresponding to the leaf node; among them, the area bounding box (Boundary Box) Box) refers to the rectangular area corresponding to the node. For example, the leaf node corresponds to the smallest rectangular box after the layout file is divided into four equal parts. The number of basic graphics elements refers to the number of basic graphics elements related to the node. The basic graphics element number is used to identify the basic graphics elements. The layer information refers to which layer the basic graphics element related to the node belongs to. The upper and lower layer information of the layer refers to the layer information that has a upper and lower connection relationship with the layer to which it belongs, representing the layer information with a upper and lower connection relationship.
[0056] In the above two examples, the first one does not store the basic primitive numbers in the branch nodes, but only stores them in the leaf nodes; while the second one retains the basic primitive numbers that span multiple nodes in the upper-level nodes. The purpose of setting the second one is to further reduce the computational complexity of area judgment.
[0057] Example 2
[0058] Based on the data structure in the first embodiment, this embodiment illustrates the method for generating the data structure. Figure 1 As shown, the method specifically includes the following steps: Step S1. Obtain a layout file (GDSII layout file) and traverse to obtain layer information; Step S2. Number the basic graphics elements and ensure that the numbers of the basic graphics elements in the graphics elements are continuous and the numbers of all basic graphics elements are continuous; Step S3. Create a quadtree data structure based on the numbered GDSII layout file.
[0059] Obtain the layout file shown in Figure 2(a). This example is a GDSII layout file, containing seven layers: M1, M2, M3, V1, V2, MC1, and MC2. In Figure 2(a), M1_drawing (L101D0) represents the M1 layer; M2_drawing (L103D0) represents the M2 layer; M3_drawing (L105D0) represents the M3 layer; V1_drawing (L102D0) represents the V1 layer; V2_drawing (L104D0) represents the V2 layer; MC1_drawing (L90D0) represents the MC1 layer; and MC2_drawing (L91D0) represents the MC2 layer. V1 connects M1 and M2, V2 connects M2 and M3, MC1 truncates M1, and MC2 truncates M2. The characteristics of the GDSII layout file can also be described as a tree structure. According to the layout file in Figure 2 (a), a file based on the layer information data structure as shown in Figure 2 (b) is generated. The top-level primitive is named CELL_001, and the second layer has four primitives named CELL_001Upper, CELL_001cut, CELL_001drop_out, and CELL_001linker3. Among them, CELL_001Upper is composed of three third-level primitives: CELL_001base, CELL_001linker1, and CELL_001linker2. This can be understood in conjunction with Figure 2 (c).
[0060] The specific steps for obtaining traversal information in step S1 are as follows: Step 1: Starting from the root primitive node to be checked (i.e. CELL_001), iteratively enter each primitive child node to count the basic primitive starting position information and the number of basic primitives under the current primitive node, as shown in the following examples:
[0061] CELL_001 has four child Cell nodes and a total of 38 primitives. As shown in Figure 3(a), CELL_001Upper starts with primitive number 0 in CELL_001 and includes 26 primitives (arrayed once). As shown in Figure 3(b), CELL_001cut starts with primitive number 26 in CELL_001 and includes two primitives (arrayed three times). As shown in Figure 3(c), CELL_001drop_out starts with primitive number 28 in CELL_001 and includes four primitives (arrayed once). As shown in Figure 3(d), CELL_001linker3 starts with primitive number 32 in CELL_001 and includes two primitives (arrayed once).
[0062] CELL_001Upper has three subunits and a total of 26 primitives. As shown in Figure 3(e), CELL_001base starts at primitive 0 in CELL_001Upper and contains 10 primitives (arrayed twice); as shown in Figure 3(f), CELL_001linker1 starts at primitive 20 in CELL_001Upper and contains 3 primitives (arrayed once); as shown in Figure 3(g), CELL_001linker2 starts at primitive 23 in CELL_001Upper and contains 3 primitives (arrayed once).
[0063] There are 10 sub-cells in CELL_001base. Since each sub-cell is a basic primitive, there are 10 basic primitives in CELL_001base. The number of the starting basic primitive of each cell is its cell number.
[0064] There are three subunits in CELL_001linker1. Since each subunit is a basic primitive, there are three basic primitives in CELL_001linker1. The number of the starting basic primitive of each primitive is its unit number.
[0065] There are three subunits in CELL_001linker2. Since each subunit is a basic primitive, there are three basic primitives in CELL_001linker2. The number of the starting basic primitive of each primitive is its unit number.
[0066] There are two subunits in CELL_001cut. Since each subunit is a basic primitive, there are two basic primitives in CELL_001cut. The number of the starting basic primitive of each primitive is its unit number.
[0067] There are 4 sub-units in CELL_001drop_out. Since each sub-unit is a basic primitive, there are 4 basic primitives in CELL_001drop_out. The number of the starting basic primitive of each primitive is its unit number.
[0068] There are two subunits in CELL_001liker3. Since each subunit is a basic primitive, there are two basic primitives in CELL_001liker3. The number of the starting basic primitive of each primitive is its unit number.
[0069] The final node information is shown in Table 1 below (the number of Basic Cells under the current Cell node):
[0070] Table 1. Node information
[0071]
[0072] Step 2: Return to the root primitive node to be checked (i.e., CELL_001) and iterate again to access the statistics of each sub-primitive node. CELL_001 has four first-level sub-primitive nodes, involving a total of seven layers. For example, CELL_001Upper is a 1-row × 1-column array type, with three first-level sub-cells, involving three layers: the M1 layer structure shown in Figure 3(h). The maximum bounding box of the M1 layer is taken as the region bounding box of the M1 layer. For details, refer to Figure 3(i). Similarly, the region bounding boxes of V1 and M2 are obtained. The region bounding box information of these three layers is saved in CELL_001base. For details, refer to Table 2 below.
[0073] Table 2. Region bounding box information
[0074]
[0075] CELL001linker1 is a 1-row x 1-column array with three first-level sub-elements (all basic primitives) across two layers: V1 and M2. The bounding box information for these two layers is calculated and saved in CELL_001linker1. See Table 3 below for details.
[0076] Table 3. Region bounding box information
[0077]
[0078] CELL001linker2 is a 1-row x 1-column array with three first-level sub-elements (all basic primitives) across two layers: V1 and M2. The bounding box information for these two layers is calculated and saved in CELL_001linker2. See Table 4 below for details.
[0079] Table 4. Region bounding box information
[0080]
[0081] Integrate the bounding box information of all three sub-elements of CELL_001Upper. The array type will calculate the relative coordinates of its bounding box under the current element based on the number of array rows and columns, rotation angle, and offset coordinates and save them to CELL_001Upper. For details, please refer to Table 5 below.
[0082] Table 5. Region bounding box information
[0083]
[0084] CELL_001cut is a 1-row x 3-column array with two primary sub-elements (both basic primitives) across two layers: MC1 and MC2. The bounding box information for these two layers is calculated and saved in CELL_001cut. See Table 6 below for details.
[0085] Table 6. Region bounding box information
[0086]
[0087] CELL_001drop_out is a 1-row x 1-column array with four first-level sub-elements (all basic primitives) across three layers: M2, V2, and M3. The bounding box information for these three layers is collected and saved in CELL_001drop_out. See Table 7 below for details.
[0088] Table 7. Region bounding box information
[0089]
[0090] CELL_001linker3 is a 1-row x 1-column array with two first-level sub-elements (both basic primitives) across two layers: V1 and M2. The bounding box information for these two layers is calculated and saved in CELL_001linker3. See Table 8 below for details.
[0091] Table 8. Region bounding box information
[0092]
[0093] Integrate the bounding box information of all four sub-elements of CELL_001. The array type will calculate the relative coordinates of its bounding box under the current cell based on the number of array rows and columns, rotation angle, and offset coordinates. For details, please refer to Table 9 below.
[0094] Table 9. Region bounding box information
[0095]
[0096] Regarding the numbering of the basic primitives in step S2, after completing the layer information traversal in step S1, the information of each layer and the corresponding basic primitive information can be obtained, such as Figure 4 After all basic primitives are numbered as shown, each basic primitive in the example is numbered from 1 to 37.
[0097] Regarding step S3, an example is to construct a quadtree data structure. Based on the above-mentioned layout file that has been numbered, the specific implementation includes: determining the initial node bounding box that encloses all layers, obtaining the area determined by the node bounding box based on the area determined by the initial node bounding box and the level to which the node belongs, and the node bounding box corresponds to the node; using the numbered basic primitives as data objects, traversing the data objects (Basic Cells, basic primitives) based on the numbers, and determining the current node corresponding to the node bounding box that overlaps with the area to which the current data object belongs according to the position information; determining the node into which the current data object is inserted based on the number of data objects within the current node; completing the traversal and generating the level settings for all nodes.
[0098] In the example case, the method for determining the initial node bounding box that encloses all layers includes determining the initial node bounding box according to the maximum extension of each layer in different directions, or according to the maximum values of the coordinates of the basic primitives in different directions. The example node bounding box is the rectangular box of the smallest unit corresponding to the initial node bounding box after being equally divided multiple times.
[0099] In the example case, the process of obtaining the area determined by the node bounding box based on the area determined by the initial node bounding box and the level to which the node belongs includes: sequentially dividing the area determined by the initial node bounding box into multiple sub-areas according to the level to which the corresponding node belongs, correspondingly forming multiple node bounding boxes; the area determined by the next-level node bounding box is the sub-area formed by dividing the area determined by the upper-level node bounding box.
[0100] Example step S3 also includes predefined maximum values for the number of associated objects within each node in the two-dimensional spatial point index tree and the maximum depth of the two-dimensional spatial point index tree. As shown in example step S3 Figure 5 denote the maximum value of the number of associated objects as M and the maximum depth as N; denote the level number of the current node as j, j Î [0, N], and the number of data objects already inserted within the current node as i, where i is a positive integer; traverse the data objects in ascending order based on the numbers, including: initializing j = 0, i = M, that is, the initial node bounding box corresponds to the root node, and inserting the M data objects into the root node one by one; Step 1: j = j + 1, divide the next-level branch nodes, and the branch nodes correspond one by one to the node bounding boxes; Step 2: Traverse the data objects within the (j - 1)-level nodes: determine the current node to which the current data object belongs and insert it into the corresponding current node, and complete the traversal; Step 3: Traverse the remaining current data objects, determine the current node to which the current data object belongs, if i < M, insert the current data object into the corresponding current node, i = i + 1; if i ≥ M, if j < N, return to Step 1; repeat Steps 1 to 3; if j = N, perform Step 4: Construct the current node as a leaf node and add all data objects to the storage table of the leaf node.
[0101] In the example scenario, when the layout file to be processed is a very fragmented layout file, a smaller maximum number of associated objects and a larger maximum depth of the two-dimensional spatial point index tree can be set. However, when the layout file to be processed contains a large number of large-scale structures, the opposite can be true. The typical value range for M is 16 to 2048, and the typical value range for N is 4 to 16. M is the maximum number of associated objects that is preset, that is, the maximum number of basic graphics that can be stored inside each node in the quadtree data structure. For example, the leaf node at the bottom cannot go any further down, so the number of associated objects stored in the leaf node can exceed M; except for the leaf node at the bottom of the quadtree data structure, the root node and the child nodes in the middle need to judge the number of basic graphics already in the node before inserting new basic graphics; if there are already M basic graphics in the root node, inserting a new basic graphics will not meet the requirement that the number of basic graphics in the root node is ≤ M, then the root node needs to be divided into four child nodes downward, and the rectangular box that selects all basic graphics will also be divided into four equal parts, and then judge which child nodes and regions the M basic graphics that have been inserted into the root node belong to, and finally the attribution of the M+1th basic graphics will be judged.
[0102] Combine Figure 4 The following example demonstrates the maximum number of associated objects within each node of the quadtree, M = 6, and the maximum depth of the quadtree, N = 3. A quadtree node represents a rectangular area. The quadtree data structure is such that each node corresponds to each area, and the upper limit on the number of associated objects that a node can store is the condition that triggers whether to continue partitioning. When the number of data objects within a node (the maximum value of the internal basic primitive number) exceeds the preset maximum number of associated objects, the node needs to be divided into four lower-level nodes. This practice is intended to improve the actual indexing efficiency of the quadtree and establish a quadtree that can bring efficiency improvements.
[0103] First, create a quadtree root node, and at the same time draw a bounding box of the root nodes of all layers, and the bounding box of the root node corresponds to the root node; the basic graphics elements numbered 0-5 have been inserted into the root node, and then the basic graphics element numbered 6 is inserted, the number of data objects in the root node is greater than the preset M, then the layout file needs to be divided into four equal parts, and at the same time, the root node is divided into four branch nodes, first determine which sub-regions of the upper, lower, left, and right sides of the basic graphics element numbered 0-5 overlap, and insert them into the branch nodes corresponding to the sub-regions; then determine which sub-region the basic graphics element numbered 6 belongs to, and before inserting the basic graphics element numbered 6, it is also necessary to determine whether the data object data in the corresponding node reaches the preset number of associated objects. For example, after the basic graphics element numbered 6 is inserted into the corresponding node, the number of data objects in the node is greater than 6, then the node needs to be divided down, such as the basic graphics element numbered 6. After the primitive is inserted into the corresponding node, if the number of data objects in the node is ≤6, then this node does not need to be divided further, and the basic primitive numbered 6 can be inserted into the corresponding node; then the basic primitives numbered 7-37 are judged in turn to which area they belong and the node insertion actions are performed, but the entire process must meet the following conditions: If the number of data objects at the current node is zero, it means that the area covered by the current node does not contain any data objects, then a null pointer is returned, indicating that the current node is a null pointer node that does not contain any objects; if the number of data objects at the current node is not zero and is less than M, then there is no need to divide the node and the area further, then the associated data object to be newly inserted can be inserted into the current node, then the corresponding node is determined based on the area to which the next data object belongs (which areas have overlapping relationships), and then the number inside the corresponding node of the corresponding area is judged.
[0104] Excluding the above two cases, the remaining case is that the current node will have more data objects than M due to the need to insert new data objects, which means that it needs to be divided down into four next-level sub-areas and four next-level sub-nodes. However, before dividing the four sub-areas, it is necessary to determine whether the depth of the current node has reached the maximum depth N: If the maximum depth N is not reached, the current area and the current node are divided down into four next-level sub-areas and four next-level sub-nodes respectively. First, determine the next-level sub-node to which the M data in the current node belong and insert them into the corresponding sub-node, and then determine the sub-node to which the data object to be newly inserted belongs. Before inserting the data object, determine the number of data objects in the sub-node; If the maximum depth N is reached, no further division will be made, the current node will be constructed as a leaf node, and the data object will be added to the storage table of the leaf node.
[0105] Finally, according to the above process, all data objects are traversed, the bounding box partitions at all levels and the construction of the quadtree data structure are completed, and the layout file partition diagram shown in Figure 6 (a) and the quadtree data structure shown in Figure 6 (b) are generated.
[0106] Example 4
[0107] This embodiment provides a method for querying the connection relationship between basic graphics elements in a layout file, which is used to check the connection relationship between basic graphics elements in a layout file. The example process is as follows: Figure 7 As shown: it includes: obtaining an initial layout file, determining the target basic graphic element, the data structure file includes a first data structure file generated according to the initial layout file; based on the first data structure file, iteratively checking the connection relationship to obtain an initial inspection result set; the initial inspection result set is all basic graphic elements in the initial layout file that have a connection relationship with the target basic graphic element without considering the cut-off layer; creating a new first layout file (such as a GDSII layout file) according to the initial inspection result set; obtaining the cut-off layer of the initial layout file to create a new second layout file; using the second layout file to perform a truncation operation on the first layout file (for example, which can be implemented through simple geometric operations), that is, using the cut-off layer in the second layout file to delete the overlapping area of the corresponding layer in the first layout file, and recording the updated first layout file as a third layout file, the data structure file also includes a second data structure file generated according to the third layout file; for the second data structure file, iteratively checking the connection relationship to obtain a final inspection result set.
[0108] Among them, Figure 8As shown, the steps of iteratively checking the connection relationship include: the first step, setting the selected starting coordinates as the current inspection window, selecting the current target layer, and generating a layer list; establishing an identifier array with the same length as the number of basic graphics elements, and initializing all identifiers to "unchecked", with the identifiers corresponding to the basic graphics elements one by one; establishing a retrieval queue for storing the index numbers of the basic graphics elements to be checked; establishing a suspicious object queue for storing the index numbers of the basic graphics elements to be checked that may overlap with the inspection window; the index numbers correspond to the basic graphics element numbers one by one; the second step, initializing the suspicious object queue; the third step, checking the spatial information of the basic graphics elements in the suspicious object queue, putting the basic graphics elements that meet the conditions into the retrieval queue, and clearing the suspicious object queue; the fourth step, recording the basic graphics element at the head of the retrieval queue as the current basic graphics element, setting the polygonal structure graphic area of the current basic graphics element as the current inspection window, extracting the adjacent layers that have a connection relationship in the layout space of the layer corresponding to the current basic graphics element, adding the adjacent layers and the layer corresponding to the current basic graphics element to the layer list to update the layer list; the index number of the current basic graphics element (the first basic graphics element) is added to the retrieval queue. The fifth step is to update the suspicious object queue, check the spatial information of the basic primitives in the current suspicious object queue and whether they have been marked as "checked", and then add the index numbers of the basic primitives that have not been marked as "checked" and meet the conditions to the current search queue. The sixth step is to determine whether the current search queue is empty. If not, repeat steps 4 to 5 until the current search queue is empty. The operation of initializing and updating the suspicious object queue includes: starting from the root node, searching for branch nodes corresponding to the area that overlaps with the current inspection window based on the position information and coordinate information of the current inspection window, and adding the index numbers of all basic primitives in the found branch nodes to the suspicious object queue. The spatial information includes: the overlap relationship between the basic primitive and the current inspection window and whether the layer to which it belongs is in the layer list. Meeting the conditions means that the basic primitive overlaps the current inspection window and its layer is in the layer list. It should be noted that in the layer list in the first step above, since only the initial target layer is selected, it can be understood that the initial layer list refers to the initial target layer; in the fourth step, the adjacent layers and the current target layer form a list with multiple layers.
[0109] In some embodiments, the method for updating the suspicious object queue includes: when the next-level nodes of the branch node all contain several basic graphic elements, then inserting several basic graphic elements into the branch node and removing several basic graphic elements from the next-level nodes; the method for searching level by level starting from the root node includes: judging whether the number of the current basic graphic element is the same as the basic graphic element number stored in the branch node, if so, not searching downward; if not, continuing to search downward.
[0110] Taking the quadtree data structure as an example, all nodes store the rectangular area information corresponding to themselves, and the leaf node at the bottom also stores the basic primitive number related to itself. Because it uses area overlap to make judgments, updating the suspicious object queue is to put all the basic primitives in the leaf nodes with overlapping areas into the suspicious object queue, and place the basic primitive numbers shared by the four leaf nodes in the branch node of the previous level. At the same time, the branch node also stores all related basic primitive numbers, that is, the information stored in this branch node includes: rectangular area information, common basic primitive number, and all related basic primitive numbers. There will be certain differences in the judgment during the operation of updating the suspicious object queue. The differences are as follows: based on the position information and coordinate information of the current inspection window (the basic primitive to be retrieved), start from the quadtree root node and search downward for the quadtree node corresponding to the area that overlaps with the current inspection window (the overlap judgment is performed on the rectangular area of the layout file divided into four equal parts). At the same time, it is judged whether the basic primitive to be retrieved is the same as the basic primitive number stored in the quadtree node; if the area overlaps and the basic primitive number is also in the list storing common basic primitive numbers, there is no need to perform further area judgment, and all the basic primitive index numbers under this quadtree node (all related basic primitive numbers) are directly pulled and put into the suspicious object queue; if the area overlaps but is not the same as one of the common basic primitive numbers, the area overlap judgment and number same judgment are performed on the next level node (such as the leaf node).
[0111] In some embodiments, the number of data objects in the next-level node is recorded as Y, and the number of data objects under the branch node where the basic primitive needs to be inserted is recorded as X. A threshold of the ratio of X to Y is preset, and the decision to insert the branch node is based on the threshold. For example, if two or more of the four child nodes under a branch node contain a certain basic primitive, the basic primitive is inserted into the branch node and removed from the child nodes. The rule is: when the number of data objects under the next-level child node is Y, and the number of data objects under a branch node where the basic primitive needs to be inserted is X, the basic primitive is allowed to be inserted when the ratio of X to Y is below a certain threshold. For example, node A corresponds to the following four nodes B, and basic graphic element number 1 exists in two of the next-level nodes B. Then, if basic graphic element number 1 is directly mentioned in node A, all relevant basic graphic element numbers need to be stored in the corresponding node A. However, there may actually be a problem of a large amount of unnecessary data calculation. By placing basic graphic element numbers that span multiple next-level nodes in the node, it is to reduce the amount of judgment and calculation. The large amount of unnecessary data calculation is not conducive to fully meeting the design requirements. Therefore, a threshold is set to judge the number of data objects involved in the two nodes B and the number of data objects involved in the entire node A. For example, if the threshold is exceeded, it is considered unnecessary to store the basic graphic element number 1 that exists in both nodes B in node A. The setting value of the threshold can be set according to the actual application and is not limited.
[0112] In some embodiments, the basic graphic elements in the search queue and the suspicious object queue are deduplicated to remove repeated basic graphic element numbers.
[0113] With reference to FIG6 (a) and FIG6 (b), based on the partitioned and numbered layout file and the constructed quadtree data structure, the query method is expanded as follows: The first iteration checks the connection relationship (without considering the cut-off layer), including the following steps:
[0114] Step 1: Based on the 38 basic graphics elements in the layout file, a new identifier array with a length of 38 is created, and all identifiers are initialized to "unchecked". Each identifier corresponds to a basic graphics element, which is generated by depth-first traversal of the above quadtree data structure.
[0115] Step 2: Create a new search queue to store the index numbers (basic primitive numbers) of the basic primitives to be checked; create a new suspicious object queue to store the index numbers (basic primitive numbers) of the basic primitives to be checked that may overlap with the inspection window.
[0116] Step 3. Set the user-selected starting coordinates to the inspection window (the user can obtain the starting coordinates by clicking a location in the layout file on the computer human-computer interaction page). Set the user-selected starting coordinates to be within the basic primitive area numbered 35. Select the target layer (the user can specify a layer as the current target layer on the computer human-computer interaction page). Set the user-selected layer to M3.
[0117] Based on the starting coordinates, start from the quadtree root node and search downward for the quadtree nodes corresponding to the area that overlaps with the inspection window (this is the overlap determination of the rectangular area divided into four equal parts by the layout file). In the example, the relevant quadtree nodes and layout file areas are highlighted in yellow, and all the basic primitive index numbers (34, 35, 37) under these nodes are placed in the suspicious object queue;
[0118] Step 4: Check the overlapping relationship between each basic graphic element (34, 35, 37) and the inspection window in the suspicious object queue and whether the layer to which it belongs is within the target layer. After checking, only the basic graphic element numbered 35 meets the requirements. Put the basic graphic element (35) that meets the conditions into the search queue and clear the suspicious object queue;
[0119] Step 5: Set the first basic element (35) at the head of the search queue as the inspection window, extract its upper and lower related layers (upper: none; lower: V2), and change the target layer to the upper and lower related layers and the layer list [M3, V2] of the layer itself, put the first index number 35 (the first basic element number) into the inspection result and mark it as "inspected", and remove the first basic element (35) in the search queue;
[0120] Step 6. According to the position information and coordinate information of the inspection window (the basic graphic element area numbered 35), start from the quadtree root node and search downward for the quadtree node corresponding to the area that overlaps with the inspection window (35) (the overlap is judged by the rectangular area divided into four equal parts by the layout file). After investigation, it is found that the quadtree nodes (0-1-0, 0-1-1, 0-1-2-1, 0-1-2-2, 0-1-3-1) and the layout file area meet the requirements (these quadtree nodes and layout file areas can be highlighted in yellow or other colors), and all the basic graphic element index numbers under these quadtree nodes are put into the suspicious object queue; the suspicious object queue is obtained: 35,34,35,37,15,35,15,32,35,36,15,19,35.
[0121] Step 7: Check whether each basic primitive in the suspicious object queue (35, 34, 35, 37, 15, 35, 15, 32, 35, 36, 15, 19, 35) has been marked as "inspected", and whether the overlap relationship with the inspection window and the layer are in the layer list (list [M3, V2]). Put the basic primitive index numbers that have not been marked as "inspected" and overlap with the current inspection window and are in the layer list into the inspection queue. After checking, it is found that only numbers 36 and 37 meet the requirements, so the inspection queue: 36, 37;
[0122] Step 8. Return to step 5 and set the first basic element at the head of the search queue (basic element numbered 36) as the inspection window. Repeat the operation until the search queue is empty.
[0123] Get the inspection result set: {35, 36, 37, 34, 32, 33, 15, 18, 19, 17, 16, 25, 23, 24, 6, 7, 9, 8, 5, 22, 20, 21, 3, 1, 2, 0, 4}.
[0124] Step 9. Return the inspection results.
[0125] Querying the connection relationship between basic graphics elements in the layout file (considering the cut-off layer) includes the following steps:
[0126] First, a new GDSII data structure with a depth of 1 is created using the results of the previous check, and this is recorded as the first layout file. The cut layer of the initial layout file is obtained and created as a new layout file, recorded as the second layout file. The second layout file is then used to perform a truncation operation (a simple geometric operation) on the first layout file, i.e., deleting the areas of the basic primitives of the first layout file that overlap with the basic primitives of the second layout file. The first layout file after the truncation operation is recorded as the third layout file.
[0127] Using the aforementioned quadtree data structure generation method, a layer-based data structure (i.e., the second data structure file) is generated from the third layout file. Table 10 below shows the correspondence between the renumbered basic primitives in this data structure (i.e., the third layout file) and the basic primitives in the inspection result set obtained above (i.e., the first layout file).
[0128] Table 10. Corresponding relationship between the numbers of basic graphics elements before and after truncation operation
[0129]
[0130] Among them, basic graphic element No. 24 in the third layout file is the lower half of basic graphic element No. 2 in the first layout file after the layer is cut off, and basic graphic element No. 25 in the third layout file is the upper half of basic graphic element No. 2 in the first layout file after the layer is cut off.
[0131] Afterwards, based on the layer-based data structure generated from the third layout file, the entire process of the "first iteration check connection relationship" above is re-executed to obtain the final check result. The example check result set is as follows:
[0132] {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24}, where primitive 0 is the target primitive.
[0133] The final inspection result set includes all basic primitives that are connected to the target basic primitive (including the target basic primitive).
[0134] The query method provided in some embodiments can also implement the function of selecting a cut-off layer to obtain all basic primitives that have a connection relationship with the target basic primitive after only considering the cut-off layer. Before creating a new first layout file, the cut-off layer is selected; the cut-off layer of the initial layout file refers to the selected cut-off layer. The function of selecting a cut-off layer is implemented as follows: during the process of creating a new first layout file, only the cut-off layer selected in the initial layout file is obtained and created as a second layout file, and the second layout file is used to perform a truncation operation (simple geometric operation) on the first layout file, that is, the cut-off layer in the second layout file is used to delete the overlapping area of the corresponding layer in the first layout file, and the first layout file after the truncation operation is used as the third layout file.
[0135] For the sake of clarity, some commonly used English nouns or letters used in this invention are only for illustrative purposes and are not intended to be limiting or specific. Their possible Chinese translations or specific letters should not be used to limit the scope of protection of this invention. It should also be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any actual relationship or order between these entities or operations.
Claims
1. A data processing method, characterized in that: Setting a plurality of nodes, wherein the plurality of nodes are arranged in a hierarchy and divided into a root node, a branch node and a leaf node, forming a two-dimensional spatial point index tree structure; All or part of the plurality of nodes store node information; The node information includes: information of the region bounding box corresponding to the node, and a list, wherein the list stores the number of basic graphic elements, the basic graphic element number, the layer information, and the adjacent layer information; The region bounding box refers to the region corresponding to the node; the number of basic graphic elements refers to the number of basic graphic elements that intersect with the region bounding box corresponding to the node; the basic graphic element number is used to identify the basic graphic element, and the basic graphic element numbers stored in the list correspond to the basic graphic elements that intersect with the region bounding box corresponding to the node; the belonging layer information identifies the layer to which the basic graphic element in the node belongs, and the adjacent layer information refers to the information of the layer that has an adjacent connection relationship with the belonging layer; The two-dimensional space point index tree structure is a quadtree structure; the region boundary box is a rectangular region, the root node corresponds to the minimum rectangular box of all basic primitives in the selected layout file, and the leaf node corresponds to the minimum rectangular box after the layout file is continuously divided into four equal parts; and further includes: The root node and the branch node do not store the node information, and the node information refers to the information contained in the leaf node; Alternatively, the branch node corresponds to four next-level branch nodes or four leaf nodes; when the branch node is divided into four leaf nodes, if the area of the basic graphic element spatially intersects with the area boundary boxes corresponding to multiple leaf nodes, the node information corresponding to the basic graphic element is left on the branch node and is not inserted into the leaf node; the node information is stored in the branch node and leaf node with the basic graphic element.
2. The data processing method according to claim 1, wherein: The information of the region bounding box includes size information and coordinate information of the region bounding box.
3. A method for generating a data structure, characterized in that: include: Step S1. Obtain the layout file and traverse to obtain layer information; The layer information includes graphic element information and basic graphic element information; Step S2. numbering the basic primitives, including consecutively numbering the basic primitives that make up the same primitive and ensuring that all basic primitives are numbered consecutively; Step S3. Creating a two-dimensional spatial point index tree data structure based on the numbered layout file and generating a file of the data structure; The basic graphic element refers to a polygonal structure graphic in a layer; the basic graphic element information includes the layer information, position information and size information of the basic graphic element; The graphic element refers to a graphic composed of a number of basic graphic elements. The graphic element information includes a creation method of the graphic element, and the creation method includes: a method of referencing a basic graphic element or graphic element, and / or a method of arraying a basic graphic element or graphic element; The process of step S3 includes: determining an initial node bounding box for selecting all layers, obtaining an area determined by a node bounding box based on the area determined by the initial node bounding box and the level to which the node belongs, wherein the node bounding box corresponds to the node; Take the numbered basic primitive as a data object, traverse the data objects based on the numbers, and determine the current node corresponding to the node bounding box that overlaps with the region to which the current data object belongs according to the position information; Determine the node into which the current data object is inserted based on the number of data objects within the current node; Complete the traversal and generate the hierarchical settings of all nodes.
4. The method for generating a data structure according to claim 3, wherein: The method for determining the initial node bounding box that encloses all layers includes determining the initial node bounding box according to the maximum extension of each layer in different directions, or according to the maximum values of the coordinates of the basic primitives in different directions; The process of obtaining the region determined by the node bounding box includes: sequentially dividing the region determined by the initial node bounding box into multiple sub-regions according to the hierarchy to which the corresponding node belongs, and correspondingly forming multiple node bounding boxes; The region determined by the next-level node bounding box is a sub-region formed by dividing the region determined by the upper-level node bounding box.
5. The method for generating a data structure according to claim 3, wherein: Step S3 further includes predefining the maximum number of associated objects within each node in the two-dimensional spatial point index tree and the maximum depth of the two-dimensional spatial point index tree.
6. The method for generating a data structure according to claim 5, wherein: Denote the maximum number of associated objects as M and the maximum depth as N; Denote the level number of the current node as j, j ∈ [0, N], and the number of data objects already inserted within the current node as i, where i is a positive integer; Traverse the data objects in ascending order based on the numbers, including: initialize j = 0, i = M, that is, the initial node bounding box corresponds to the root node, and insert the M data objects into the root node one by one; Step 1: j = j + 1, divide the next-level branch nodes, and the branch nodes correspond to the node bounding boxes one by one; Step 2: Traverse the data objects within the (j - 1)-level nodes: determine the current node to which the current data object belongs and insert it into the corresponding current node, and complete the traversal; Step 3: Traverse the remaining current data objects and determine the current node to which the current data object belongs; if i < M, insert the current data object into the corresponding current node, i = i + 1; if i ≥ M, if j < N, return to Step 1; repeat Steps 1 to 3; If j = N, perform Step 4: Construct the current node as a leaf node and add all data objects to the storage table of the leaf node.
7. The method for generating a data structure according to claim 6, wherein: Inserting the current data object into the corresponding current node means inserting one data object into one or more next-level branch nodes.
8. The method for generating a data structure according to claim 6, wherein: If i = 0 and the region covered by the current-level branch node does not contain any data objects, return a null pointer.
9. The method for generating a data structure according to any one of claims 3 to 8, wherein: The two-dimensional spatial point index tree includes any one of a quadtree, a balanced multi-way search tree, a k-d tree, a horizontal-vertical tree, or a spatial data index tree.
10. The query method is characterized by: Used to check the connection relationship between basic primitives in a layout file and generate a file with a data structure based on the generation method according to any one of claims 3-9; Includes iteratively checking the connection relationship; The steps of iteratively checking the connection relationship include: first, setting the selected starting coordinates as the current inspection window, selecting the current target layer, and generating a layer list; establishing an identifier array with the same length as the number of basic graphic elements, and initializing all identifiers to "unchecked", wherein the identifiers correspond one-to-one to the basic graphic elements; establishing a search queue for storing the index numbers of the basic graphic elements to be checked; establishing a suspicious object queue for storing the index numbers of the basic graphic elements to be checked that may overlap with the inspection window, wherein the index numbers correspond one-to-one to the basic graphic element numbers; The second step is to initialize the suspicious object queue; The third step is to check the spatial information of the basic graphic elements in the suspicious object queue, put the basic graphic elements that meet the conditions into the search queue, and clear the suspicious object queue; Step 4: Record the basic primitive at the head of the search queue as the current basic primitive, set the polygonal structure graphic area of the current basic primitive as the current inspection window, extract the adjacent layers that are connected to the layer corresponding to the current basic primitive in the layout space, add the adjacent layers and the layer corresponding to the current basic primitive to the layer list to update the layer list; add the index number of the current basic primitive to the inspection result set and update its corresponding identifier to "inspected", and remove the current basic primitive from the search queue; Step 5: Update the suspicious object queue, check the spatial information of the basic graphics elements in the current suspicious object queue and whether they have been marked as "checked", and put the index numbers of the basic graphics elements that have not been marked as "checked" and meet the conditions into the current search queue; Step 6: Determine whether the current search queue is empty. If not, repeat steps 4 to 5 until the current search queue is empty. The operations of initializing and updating the suspicious object queue include: searching, starting from the root node and step by step, for branch nodes corresponding to the area overlapping with the current inspection window based on the position information and coordinate information of the current inspection window, and placing the index numbers of all basic graphic elements in the found branch nodes into the suspicious object queue; The spatial information includes: the overlapping relationship between the basic graphic element and the current inspection window and whether the layer to which it belongs is in the layer list; The condition is met when the basic graphic element overlaps with the current inspection window and the layer to which it belongs is in the layer list.
11. The query method according to claim 10, characterized in that: The process includes: Acquire an initial layout file and determine a target basic primitive, wherein the data structure file includes a first data structure file generated according to the initial layout file; Based on the first data structure file, performing the iterative check of the connection relationship to obtain an initial check result set; The initial inspection result set is all basic primitives in the initial layout file that are connected to the target basic primitive without considering cut-off layers; Creating a first layout file according to the initial inspection result set; Obtaining the cut layer of the initial layout file and creating a second layout file; Using the second layout file to truncate the first layout file, recording the updated first layout file as a third layout file, wherein the data structure file further includes a second data structure file generated according to the third layout file; Performing the iterative check on the connection relationship for the second data structure file to obtain a final check result set; The final inspection result set includes all basic graphic elements that are connected to the target basic graphic element.
12. The query method according to claim 11, characterized in that: Before creating the first layout file, a cut-off layer is selected; the cut-off layer of the initial layout file refers to the selected cut-off layer.
13. The query method according to any one of claims 10 to 12, characterized in that: The method for updating the suspicious object queue includes: when the next-level nodes of the branch node all contain a plurality of basic graphic elements, inserting the plurality of basic graphic elements into the branch node and removing the plurality of basic graphic elements from the next-level nodes; The method of searching level by level starting from the root node includes: judging whether the number of the current basic primitive is the same as the basic primitive number stored in the branch node; if so, not searching downwards; if not, continuing searching downwards.
14. The query method according to claim 13, characterized in that: The number of data objects in the next level node is recorded as Y, and the number of data objects under the branch node that needs to insert the basic primitive is recorded as X; a threshold of X to Y is preset, and whether to insert the branch node is determined based on the threshold.
15. The query method according to any one of claims 10 to 12, characterized in that: The step of iteratively checking the connection relationship further includes: deduplicating basic graphic elements in the search queue and / or the suspicious object queue, and removing repeated basic graphic element numbers.
Citation Information
Patent Citations
Visualization analysis method for image layer relation in layout design rule file
CN105426556A