An indexing method for large-scale layout data
Through the Hilbert curve division and B+ tree index structure of large-scale layout data, the problems of low index construction efficiency, slow search speed and low incremental update efficiency in the existing technology are solved, and efficient layout data indexing and searching are achieved, reducing the number of layout data System overhead.
Patent Information
- Application Number
- CN202210609318.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-31
- Publication Date
- 2024-11-05
- Estimated Expiration
- 2042-05-31
AI Technical Summary
When processing large-scale layout data, the index construction efficiency is low, the data search speed is slow, and the incremental update efficiency is low, resulting in large system overhead.
An indexing method is adopted to read the layout data, abstract it into polygons on a two-dimensional plane, and divide the area in the order of Hilbert curves, establish a B+ tree index structure, and support incremental updates and efficient searches.
It improves the construction efficiency and search efficiency of the layout data index structure, supports incremental update of layout data, and reduces system overhead.
Smart Images

Figure CN114861590B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to an indexing method applied to large-scale layout data, and in particular to incremental updating and point searching of layout data. Background Art
[0002] EDA technology is a computer software system developed on the basis of electronic CAD technology. It is a platform for electronic design that uses computers as a platform and integrates the latest achievements in applied electronic technology, computer technology, information processing and intelligent technology. With the help of EDA tools, integrated circuits can develop at a legendary speed, continuing the myth of Moore's Law.
[0003] At the same time, the development of integrated circuits and the continuous advancement of technology have also brought about the following impacts:
[0004] 1. As the process size continues to shrink, the number of transistors integrated in the chip continues to increase. Therefore, under advanced processes, the size of the chip layout data has also expanded several times.
[0005] 2. As process size continues to shrink, advanced processes will bring new design rules, which will not only increase the complexity of chip design, but also increase the size of chip layout data.
[0006] 3. As process size continues to shrink, advanced processes will also introduce new design tools, which will cause the scale of layout data to expand dramatically and grow linearly with the scale of the layout.
[0007] At present, the data of large-scale layouts after photomasks has reached a scale of several hundred GB. Whether in the back-end layout and wiring of the chip or the physical verification stage, the greatest demand is to search for layout data at a specific location in the massive layout data. However, some of the original indexing methods applied to layout data have not been continuously updated with the development of integrated circuits, so the actual use efficiency after indexing the layout data is low and the system overhead is large. In addition, when the local data of the layout changes, the index structure formed based on these indexing methods cannot be updated efficiently, which also leads to low efficiency in incremental updates of layout data.
[0008] Therefore, it is necessary to design a layout indexing method suitable for large-scale layouts, so that EDA tools can efficiently read local information data in the layout with the help of this method, which is convenient for subsequent processing of these layout data, and also convenient for incremental updates after subsequent layout data changes. Summary of the invention
[0009] In view of this, the purpose of the present invention is to provide an indexing method applied to large-scale layout data, so as to solve the problems of low index construction efficiency, slow data search speed and high system overhead during incremental updates when EDA tools deal with large-scale layout data.
[0010] In order to achieve the above object, the present invention adopts the following technical solution:
[0011] An indexing method applied to large-scale layout data, the method comprising:
[0012] Step S1, read in the layout data of the integrated circuit, and parse the stream data according to the data format; extract the vertex coordinates of each module, abstract each module into a polygon on a two-dimensional plane, and layer these polygons according to the number of layers of the original module on the layout, so that the modules on the same layer of the layout, and their corresponding abstracted polygons are still on the same layer;
[0013] Step S2: for the multi-layer two-dimensional plane after the abstraction processing in step S1, each layer of the two-dimensional plane is independently divided into four equal regions by recursive division in units of layers, and whether the sub-region needs to be further divided is determined according to the number of polygons in each sub-region until the number of polygons in each sub-region does not exceed a preset threshold; wherein, while performing the region division, each sub-region is traversed in the order of the Hilbert curve, and a unique index value is assigned, which is named CellId, to establish a mapping relationship between the abstracted polygon and the index value;
[0014] Step S3: If the area division in a certain sub-area has been completed and another area is about to be divided, a B+ tree is constructed with all index values in the sub-area currently divided as key values and all polygon information in the area corresponding to the index value as data; if a B+ tree already exists, the index value is inserted into the tree and the structure is adjusted to maintain the characteristics of the B+ tree;
[0015] Step S4: When the layout data changes, the index structure is incrementally updated, which includes:
[0016] For the B+ tree constructed in step S3, query whether the number of polygons in the relevant area after the change exceeds the threshold;
[0017] If it does not exceed, the polygon information in the corresponding node in the B+ tree is updated. If it exceeds, the area is divided into four equal parts and the relevant nodes in the B+ tree are adjusted;
[0018] Step S5: When it is necessary to query the layout data at the specified coordinates, the index value is calculated by the specified coordinate value, so as to locate the node corresponding to the area containing the coordinates in the B+ tree, and the corresponding layout data information is obtained by traversing each polygon in the node and judging the positional relationship with the specified coordinates.
[0019] Furthermore, in the step S1, the reading of the layout data of the integrated circuit specifically includes:
[0020] Step S101, input the data stream of the GDSII file;
[0021] Step S102: intercept the 16-bit binary numbers of the data stream in sequence to obtain the current module length and the current module type;
[0022] Step S103, judging whether the obtained module is the required module, if not, executing the pointer backward operation to skip the current module; if it is the required module, executing step S104;
[0023] Step S104, translating and recording the polygon information in the current module, and moving the pointer backward according to the known length;
[0024] Step S105, determine whether the data stream has ended, if not, return to step S102; if it has ended, output a set of polygon information.
[0025] Furthermore, in the step S105, the polygon information includes vertex information of each polygon and the layer number of each polygon, so as to distinguish the polygons according to the layer number.
[0026] Furthermore, in step S2, the region is divided into four equal parts using the following method:
[0027] A Hilbert curve is used, which is a fractal curve. A low-order Hilbert curve is expanded to a high-order Hilbert curve through iteration. The lowest-order Hilbert curve is formed by connecting the center points of four square grid units in series in sequence, and the four square grid units constitute a square plane.
[0028] When a certain order of Hilbert curve is iterated to a higher order Hilbert curve, a recursive partitioning method similar to that of the quadtree is adopted; that is, each time, based on the previous time, one or more of the original grid units are divided again according to the density of the graphics, and each grid unit is equally divided into four smaller grid units until the number of polygons in each grid unit is lower than a preset threshold.
[0029] Furthermore, in step S4, updating the polygon information in the corresponding node in the B+ tree specifically includes:
[0030] Step S401: for the changed polygon information, determine whether it needs to be divided. If not, perform area division according to the Hilbert curve sequence; if necessary, execute step S402;
[0031] Step S402, generating a corresponding CellId in the new area, the CellId storing relevant polygon information;
[0032] Step S403: determine whether there is a value related to the new CellId in the existing index. If so, merge the new and old CellIds and related polygon information; if not, input the polygon information into the CellId, and insert the CellId into the B+ tree;
[0033] Step S404: output the updated index structure.
[0034] Furthermore, in step S5, locating the node corresponding to the area containing the coordinates in the B+ tree specifically includes:
[0035] Step S501, input two-dimensional point coordinates;
[0036] Step S502, calculate the minimum CellId that just covers the point;
[0037] Step S503, input CellId to B+ tree;
[0038] Step S504, find out the node covering the CellId;
[0039] Step S505, traverse all polygon information in the node;
[0040] Step S506: Execute a judgment to determine whether there is a polygon containing the coordinate point. If so, relevant polygon information is summarized. If not, there is no layout data at the coordinate point.
[0041] Step S507: output the search result.
[0042] The beneficial effects of the present invention are:
[0043] 1. The method of the present invention can calculate and update index values during the process of dividing the layout area, thereby improving the efficiency of constructing the index structure of the layout data;
[0044] 2. The method of the present invention can construct an index structure for layout data, thereby improving the efficiency of searching for layout data at specified coordinates;
[0045] 3. The method of the present invention supports incremental updating of layout data. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 A schematic diagram of a flow chart of an indexing method applied to large-scale layout data provided in Example 1;
[0047] Figure 2 This is a sample diagram of the simple layout provided in Example 1;
[0048] Figure 3 A schematic diagram of the process of abstracting layout data in step 1;
[0049] Figure 4 A schematic diagram of the process of dividing the layout into regions and assigning index values in step 2;
[0050] Figure 5 is a schematic diagram of the Hilbert curve traversing the sub-region in step 2, where the Figure 5 The graph a in the figure represents a first-order Hilbert curve. Figure 5 Figure b in the figure represents the second-order Hilbert curve;
[0051] Figure 6 The structure diagram and sample diagram of the index value named CellId in step 2, where Figure 6 Figure a in the figure shows the structure diagram of the index value of CellId. Figure 6 Figure b in the figure is a sample diagram of the index value named CellId;
[0052] Figure 7 A sample graph of the index values assigned in step 2, where Figure 7 The graph a in the figure represents the distribution of CellId on the first-order Hilbert curve. Figure 7 Figure b shows the distribution of CellId on the second-order Hilbert curve;
[0053] Figure 8 Schematic diagrams of four different basic Hilbert curves, among which Figure 8 The figure a in the figure represents the standard order unit Hilbert curve. Figure 8 The b figure in the figure represents the unit Hilbert curve of the axis rotation. Figure 8 The c figure in the figure represents an inverted unit Hilbert curve. Figure 8 The d figure in the figure represents the unit Hilbert curve with the axis rotated left and right and inverted;
[0054] Fig. 9This is a sample diagram of the B+ tree to be constructed in step 3;
[0055] Fig.10 A schematic diagram of the process of incrementally updating the layout data provided in Example 1;
[0056] Fig.11 The figure is a flow chart of searching layout data at any coordinates based on the index structure formed by the method of Example 1. DETAILED DESCRIPTION
[0057] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0058] Example 1
[0059] See also Figure 1-Figure 11 This embodiment provides an indexing method for large-scale layout data. The process of the method is as follows: Figure 1 As shown, the method specifically includes:
[0060] Step S1, read in the layout data of the integrated circuit, and parse the stream data according to the data format; extract the vertex coordinates of each module, abstract each module into a polygon on a two-dimensional plane, and layer these polygons according to the number of layers of the original module on the layout, so that the modules on the same layer of the layout, their corresponding abstracted polygons are still on the same layer.
[0061] Specifically, in this embodiment, step S1 is the operation of reading and abstracting layout data. In this embodiment, a simple layout such as Figure 2 As shown, the layout data is described and stored in binary format when describing the position and size of these elements. Figure 3 The process shown is to read the layout data, that is, according to the format of storage information adopted by the known layout data, write a program to read the layout data file in the form of data stream, and obtain the relevant information of each module of the layout through base conversion.
[0062] More specifically, in this embodiment, the read operation of the layout data specifically includes:
[0063] Step S101, input the data stream of the GDSII file;
[0064] Step S102: intercept the 16-bit binary numbers of the data stream in sequence to obtain the current module length and the current module type;
[0065] Step S103, judging whether the obtained module is the required module, if not, executing the pointer backward operation to skip the current module; if it is the required module, executing step S104;
[0066] Step S104, translating and recording the polygon information in the current module, and moving the pointer backward according to the known length;
[0067] Step S105, determine whether the data stream has ended, if not, return to step S102; if it has ended, output a set of polygon information.
[0068] After the above reading operation is completed, the layout data is abstracted, that is, each module is abstracted into a polygon on a two-dimensional plane, and then output to the index construction algorithm. Since the layout usually contains multiple layers, the output polygon information contains both the vertex information of each polygon and the layer number of each polygon, which makes it easy to distinguish a large number of polygons according to the layer number.
[0069] Step S2: Taking each layer as a unit, recursively divide each two-dimensional plane into regions in a manner similar to a quadtree until the number of polygons in each sub-region does not exceed a preset threshold; while dividing the regions, traverse each sub-region in the order of the Hilbert curve and assign a unique index value, which is named CellId here.
[0070] Specifically, in this embodiment, step S2 is an operation of constructing an index relationship. In this step, while dividing the layout plane into regions, an index value is assigned to each region to complete the mapping relationship between the abstracted polygon and the index value, thereby realizing the construction of the index relationship. The specific process of step S2 includes:
[0071] Step S201, for the set of polygon information obtained in step S105, perform region division according to the Hilbert curve sequence;
[0072] Step S202: Update CellId for the new area after division;
[0073] Step S203, updating the polygon number information in each CellId;
[0074] Step S204: Output the CellId set.
[0075] More specifically, in this embodiment, the region division is performed on the layout, which includes:
[0076] Depend on Figure 5 a and Figure 5 b It can be seen that the above Hilbert curve is a fractal curve that can be realized through iteration. The low-order Hilbert curve can be iteratively expanded to a high-order curve. Figure 5 The Hilbert curve in a is the lowest order basic form, connecting only four points, numbered 0 to 3. At the same time, it can be found that if the entire square plane is divided into four square grid units, then these four points are exactly located at the center of each grid unit. Figure 5 b is in Figure 5 A is generated based on the above. Figure 5 Each grid cell in a is represented by a Figure 5 The first-order Hilbert curve of a is replaced to construct a Figure 5 The second-order Hilbert curve of b. Figure 5 Similarly, the second-order Hilbert curve connects 16 points in total. If the entire square plane is divided into 16 grid units, then each point is the center point of the grid unit. Therefore, for the Hilbert curve, the i-th order curve can be realized by replacing each grid unit in the first-order basic curve with the i-1-th order curve. Finally, when i approaches infinity, the Hilbert curve can connect all points in space.
[0077] In summary, the region division method used in the indexing method of this embodiment should be a recursive division method similar to that of the quadtree. That is, each time, based on the previous division, one or more of the original grid units are divided again according to the density of the graphics, and each grid unit is equally divided into four smaller grid units until the number of polygons in each grid unit is lower than a preset threshold.
[0078] More specifically, in this embodiment, the index values used by the index relationship include:
[0079] Each time the Hilbert curve is iterated, each of the original grid cells will be divided once, and then the center points of these grid cells will be connected and numbered in linear order. Therefore, the number of grid cells is 4 times the original number each time iterates. Therefore, once the division is completed, the number of each grid cell is uniquely determined. If you want to further divide it later, each grid cell must be renumbered, which will not only slow down the speed of area division, but also increase the overhead of the program runtime.
[0080] In order to make up for this shortcoming, this embodiment adopts a special key value named CellId as the index value, and the following is a related introduction.
[0081] Figure 6 a is a schematic diagram of the structure of the index value called CellId. Figure 6 b is an example of a CellId, which has 64 binary digits in total. Here they are divided into three categories in descending order:
[0082] Bits 0 to 6: Flag bits. These five bits indicate which layer the CellId is located on. Because it uses 7 binary bits to represent data, the value it can represent is 0 to 127. Therefore, the maximum number of layers of input layout data supported by this index structure is 128.
[0083] Bits 7 to n: data bits, where 8≤n≤63. The values expressed by these data bits are the number values of the CellId on the Hilbert curve. Because it can use up to 56 binary bits to represent data, the value it can represent is 0 to 2. 56 -1.
[0084] Bits n to 63: End bit. The end bit follows the data bit, and the first digit at the beginning of the end bit is 1, and the remaining digits are padded with 0s, which is used to indicate the end of the data bit of CellId.
[0085] More specifically, in this embodiment, the allocation and update of index values include:
[0086] For the initial first-order Hilbert curve, it divides the plane into four regions. Therefore, only the 7th to 8th data bits are needed to assign the four numbers 00, 01, 10 and 11 to these four regions respectively. At this time, the 9th to 63rd bits are all cutoff bits. The numbering of the relevant index values is as follows: Figure 7 As shown in a.
[0087] After iterating the first-order Hilbert curve once to obtain the second-order Hilbert curve, the original 4 regions are divided into 16 regions. Then only the 7th to 10th data bits are needed to assign numbers to these 16 regions respectively. And observe Figure 7It can be seen from a that the area numbered 0 in the first-order curve is numbered from 0 to 3 in the second-order curve, and from 0 to 15 in the third-order curve. Therefore, assuming that two data bits are used to represent the areas numbered from 0 to 3 in the first-order Hilbert curve, their values are 00, 01, 10, and 11 respectively. If we take out the area numbered 00 for observation, the numbers 0 to 3 of this area on the second-order Hilbert curve can be represented by 4 data bits, which are 0000, 0001, 0010, and 0011 respectively. The numbering of the relevant index values is as follows Figure 7 As shown in b.
[0088] The first-order Hilbert curve is a unit Hilbert curve. As the name suggests, it is the basic unit of the higher-order Hilbert curve. The second-order Hilbert curve is composed of three unit Hilbert curves: axis rotation, upside down, and axis rotation left and right inversion, connected end to end in a certain order.
[0089] In order to save the information of the four unit Hilbert curves, it can be found that the difference between each unit Hilbert curve is that they connect the four grid units in different orders, so they can be saved in the form of an array.
[0090] The following explains how to represent these four unit Hilbert curves in array form:
[0091] First, you can Figure 8 The horizontal and vertical coordinates are set as shown in a. The coordinates of the four grid cells are: 0 represents (0,0), 1 represents (0,1), 2 represents (1,0), and 3 represents (1,1).
[0092] The standard sequence is Figure 8 As shown in a: they are connected in the order of (0,0), (0,1), (1,0), (1,1), so the unit Hilbert curve represented by the standard order in the array is [0,1,3,2];
[0093] Axis rotation Figure 8 As shown in b: In the order of (0,0), (1,0), (1,1), (0,1), the corresponding array is [0,2,3,1];
[0094] Upside down like Figure 8 As shown in c: In the order of (1,1), (1,0), (0,0), (0,1), the corresponding array is [3,2,0,1];
[0095] The axis rotates left and right inverted as Figure 8As shown in d: In the order of (1,1), (0,1), (0,0), (1,0), the corresponding array is [3,1,0,2].
[0096] The iteration of the Hilbert curve has a fixed algorithm. Therefore, if the initial first-order Hilbert curve shape is determined, then the shapes of all subsequent Hilbert curves are determined. Therefore, during the iteration process, the shape of the Hilbert curve after the next iteration is saved at the same time. Figure 8 a~ Figure 8 The lower right corner of each grid in d shows the shape of the Hilbert curve in the grid at the next iteration.
[0097] After storing the original shape information, the four numbers 00, 01, 10 and 11 can be used to represent Figure 8 a~ Figure 8 Next, we will introduce how to generate the second-order Hilbert curve based on the first-order Hilbert curve with the help of the known unit Hilbert curve information.
[0098] First, construct an auxiliary matrix with one row and four columns [1,0,0,3], which is represented by binary numbers as [01,00,00,11].
[0099] by Figure 8 c as an example, it is known that the first-order Hilbert curve is a unit Hilbert curve of the upside-down type, which can be represented by 10. Performing an XOR operation on 10 and each element in the auxiliary matrix gives:
[0100] [01,00,00,11]^10=[11,10,10,01]
[0101] The inverted unit Hilbert curve mentioned above is represented by an array of [3,2,0,1], that is, in the order of (1,1), (1,0), (0,0), (0,1), so matching each item of these two matrices with one row and four columns, we can know:
[0102] The number in the (1,1) grid is 11, which is like Figure 8 d is filled with the unit Hilbert curve;
[0103] The number in the (1,0) grid is 10, which is like Figure 8 The unit Hilbert curve of c is filled;
[0104] The number in the (0,0) grid is 10, which is like Figure 8 The unit Hilbert curve of c is filled;
[0105] The number in the (0,1) cell is 01, which is like Figure 8 b is filled with the unit Hilbert curve.
[0106] The process of iterating from the second-order Hilbert curve to the third-order Hilbert curve is the same.
[0107] Step S3: If the area division in a certain sub-area has been completed and another area is about to be divided, a B+ tree is constructed using all index values in the currently divided sub-area as key values and all polygon information in the area corresponding to the index values as data; if a B+ tree already exists, the index values are inserted into the tree and the structure is adjusted to maintain the characteristics of the B+ tree.
[0108] Specifically, in this embodiment, step S3 is to perform storage of index values based on the B+ tree, which includes: after the above operations, a large number of polygons are approximately included in their position information in the order of the Hilbert curve with CellId, and an index relationship between abstracted layout data and CellId is constructed. Here, the index value storage work is performed.
[0109] Assuming that we are currently in layer 0, we use CellId to number each grid cell in the first-order and second-order Hilbert curves. Since the number of CellId digits is too long, the following extracts the first 15 CellId digits for comparison:
[0110] The CellId corresponding to the area numbered 1 in the first-order Hilbert curve is: 000000000100000
[0112] The CellId corresponding to the area numbered 2 is: 000000001100000
[0114] The area is divided into four blocks by the second-order Hilbert curve, numbered from 5 to 8. The CellIds corresponding to these four blocks are arranged in ascending order according to the number values, and are:
[0115] 000000001001000…
[0116] 000000001011000…
[0117] 000000001101000…
[0118] 000000001111000…
[0119] It can be seen that in the first-order Hilbert curve, the CellId value of the area numbered 1 is smaller than that of the area numbered 2. Therefore, if a quadtree-like partitioning method is subsequently used, that is, the local area, such as the area numbered 1, is continuously divided according to the density of the polygon, then the CellId values constructed by all subsequent partitions in the area are smaller than the CellId in the area numbered 2.
[0120] Therefore, if we construct the index relationship according to the order of traversing the grid cells by the Hilbert curve, the final output series of CellIds are strictly arranged in order from small to large. So for linear data, it is natural to think of storing these CellIds in the form of a B+ tree, such as Fig. 9 shown.
[0121] Step S4: When the layout data changes, the index structure can be incrementally updated. Check in the B+ tree whether the number of polygons in the relevant area after the change exceeds the threshold. If not, update the polygon information in the corresponding node in the B+ tree. If it exceeds, divide the area into four equal parts and adjust the relevant nodes in the B+ tree.
[0122] Specifically, in this embodiment, step S4 is to perform incremental update of layout data. Specifically, in this step, after the index structure has been established, if operations such as adding, deleting, and modifying layout data are performed, the index structure should be changed based on the already constructed index structure according to the changes in the layout data. This can not only improve the efficiency of building a new index structure, but also reduce system overhead. With the support of CellId as an index value, this embodiment can adjust the local index structure.
[0123] More specifically, the flowchart of the incremental update of this embodiment is as follows: Fig.10 As shown, it includes:
[0124] Step S401: for the changed polygon information, determine whether it needs to be divided. If not, perform area division according to the Hilbert curve sequence; if necessary, execute step S402;
[0125] Step S402, generating a corresponding CellId in the new area, the CellId storing relevant polygon information;
[0126] Step S403: determine whether there is a value related to the new CellId in the existing index. If so, merge the new and old CellIds and related polygon information; if not, input the polygon information into the CellId, and insert the CellId into the B+ tree;
[0127] Step S404: output the updated index structure.
[0128] More specifically, the most critical step in the above process is to insert the new CellId into the old B+ tree. Because the CellId in the B+ tree is stored strictly in ascending order. Although the length of the corresponding CellId data bits is different due to the different depths of each local area, the corresponding areas of all CellIds will not overlap. For example, Figure 7 In a, the B+ tree will not store the area numbered 00 and the area numbered 0010 at the same time, and the CellId corresponding to the 00 area and the CellId corresponding to the 0000 node cannot coexist.
[0129] Therefore, in order to ensure that the area corresponding to the pre-inserted CellId does not overlap with the area corresponding to all CellIds in the B+ tree, it is necessary to convert the new CellId into an interval form and search the B+ tree for any CellId that overlaps with the interval. Figure 7 In a, the 00 area is divided to any depth, and the data bits of CellId are extended by two bits each time the division is performed, and the existing data bits do not change. Therefore, the obtained CellId values are all in the interval [00000000010…, 00000000110…].
[0130] There are ultimately three possible scenarios:
[0131] (1) There is no CellId that intersects with the grid cell of the new CellId. At this time, you only need to insert the new CellId into the corresponding position of the B+ tree. In order to prevent the number of key values at the node from exceeding the preset value after insertion, the B+ tree needs to be fine-tuned;
[0132] (2) There is a CellId whose corresponding grid cell completely covers the grid cell of the new CellId. Add the polygon in the new CellId to the CellId in the original B+ tree, and repeat Fig.10 The process in
[0133] (3) There is a CellId whose corresponding grid cell is completely covered by the grid cell of the new CellId. Divide the grid cell of the new CellId once, and repeat Fig.10 The process in .
[0134] Step S5: When it is necessary to query the layout data at the specified coordinates, the index value can be calculated by the specified coordinate value, so as to locate the node corresponding to the area containing the coordinates in the B+ tree, and the corresponding layout data information can be obtained by traversing each polygon in the node and judging the positional relationship with the specified coordinates.
[0135] Specifically, in this embodiment, step S5 is to perform point search of the layout data. Point search refers to finding the layout data corresponding to all abstracted polygons containing a certain two-dimensional coordinate on a certain layer of the given layout. The relevant process is as follows: Fig.11 As shown, it includes:
[0136] Step S501, input two-dimensional point coordinates;
[0137] Step S502, calculate the minimum CellId that just covers the point;
[0138] Step S503, input CellId to B+ tree;
[0139] Step S504, find out the node covering the CellId;
[0140] Step S505, traverse all polygon information in the node;
[0141] Step S506: Execute a judgment to determine whether there is a polygon containing the coordinate point. If so, relevant polygon information is summarized. If not, there is no layout data at the coordinate point.
[0142] Step S507: output the search result.
[0143] More specifically, after the front end sends a point search request, the point can be approximately regarded as a very small rectangle, so as to generate a CellId corresponding to the smallest sub-region that can just cover its area.
[0144] The above part has proposed that the index structure formed by the index method provided by this implementation is in the form of a B+ tree, and the index value at each node is CellId, so the coordinate point to be queried can be enlarged to the area corresponding to the CellId by scaling. Due to the data bit length limit of CellId, the error of this scaling will not be very large, but the efficiency of the search can be improved by scaling. Then, the nodes related to CellId are searched in the B+ tree, all polygon information in the node is taken out, and the mutual position relationship with the original two-dimensional coordinate point to be queried is determined to obtain the corresponding result.
[0145] In summary, the present invention provides an indexing method for large-scale map data, which uses an index value structure composed of a flag bit, a data bit and a cutoff bit. In the process of area division, as the recursion deepens, the index value can be continuously updated from top to bottom by widening the length of the data bit and reducing the length of the cutoff bit, thereby improving the efficiency of index construction; at the same time, based on the index value structure, different area division depths can be adopted in different areas according to the density of modules, thereby improving the flexibility of the index structure.
[0146] After the present invention establishes an index structure based on the indexing method, whenever changes such as addition, deletion and modification occur in the layout data, only the nodes corresponding to the changed local areas can be updated on the basis of the original index structure, thereby realizing incremental update of the layout data and greatly saving system overhead.
[0147] The matters not described in detail in the present invention are all known technologies to those skilled in the art.
[0148] The preferred specific embodiments of the present invention are described in detail above. It should be understood that a person skilled in the art can make many modifications and changes based on the concept of the present invention without creative work. Therefore, any technical solution that can be obtained by a person skilled in the art through logical analysis, reasoning or limited experiments based on the concept of the present invention on the basis of the prior art should be within the scope of protection determined by the claims.
Claims
1. An indexing method for large-scale layout data, characterized in that: The method includes: Step S1, read in the layout data of the integrated circuit, and parse the stream data according to the data format; extract the vertex coordinates of each module, abstract each module into a polygon on a two-dimensional plane, and layer these polygons according to the number of layers of the original module on the layout, so that the modules on the same layer of the layout, and their corresponding abstracted polygons are still on the same layer; Step S2: for the multi-layer two-dimensional plane after the abstraction processing in step S1, each layer of the two-dimensional plane is independently divided into four equal regions by recursive division in units of layers, and whether the sub-region needs to be further divided is determined according to the number of polygons in each sub-region until the number of polygons in each sub-region does not exceed a preset threshold; wherein, while performing the region division, each sub-region is traversed in the order of the Hilbert curve, and a unique index value is assigned, which is named CellId, to establish a mapping relationship between the abstracted polygon and the index value; Step S3: If the area division in a certain sub-area has been completed and another area is about to be divided, a B+ tree is constructed with all index values in the sub-area currently divided as key values and all polygon information in the area corresponding to the index value as data; if a B+ tree already exists, the index value is inserted into the tree and the structure is adjusted to maintain the characteristics of the B+ tree; Step S4: When the layout data changes, the index structure is incrementally updated, which includes: For the B+ tree constructed in step S3, query whether the number of polygons in the relevant area after the change exceeds the threshold; If it does not exceed, the polygon information in the corresponding node in the B+ tree is updated. If it exceeds, the area is divided into four equal parts and the relevant nodes in the B+ tree are adjusted; Step S5: When it is necessary to query the layout data at the specified coordinates, the index value is calculated by the specified coordinate value, so as to locate the node corresponding to the area containing the coordinates in the B+ tree, and the corresponding layout data information is obtained by traversing each polygon in the node and judging the positional relationship with the specified coordinates.
2. The indexing method for large-scale layout data according to claim 1, characterized in that: In the step S1, the reading of the layout data of the integrated circuit specifically includes: Step S101, input the data stream of the GDSII file; Step S102: intercept the 16-bit binary numbers of the data stream in sequence to obtain the current module length and the current module type; Step S103, judging whether the obtained module is the required module, if not, executing the pointer backward operation to skip the current module; if it is the required module, executing step S104; Step S104, translating and recording the polygon information in the current module, and moving the pointer backward according to the known length; Step S105, determine whether the data stream has ended, if not, return to step S102; if it has ended, output a set of polygon information.
3. The indexing method for large-scale layout data according to claim 2, characterized in that: In the step S105, the polygon information includes vertex information of each polygon and the layer number of each polygon, so as to distinguish the polygons according to the layer number.
4. The indexing method for large-scale layout data according to claim 3, characterized in that: In step S2, the region is divided into four equal parts using the following method: A Hilbert curve is used, which is a fractal curve. A low-order Hilbert curve is expanded to a high-order Hilbert curve through iteration. The lowest-order Hilbert curve is formed by connecting the center points of four square grid units in series in sequence, and the four square grid units constitute a square plane. When a certain order of Hilbert curve is iterated to a higher order Hilbert curve, a recursive partitioning method similar to that of the quadtree is adopted; that is, each time, based on the previous time, one or more of the original grid units are divided again according to the density of the graphics, and each grid unit is equally divided into four smaller grid units until the number of polygons in each grid unit is lower than a preset threshold.
5. The indexing method for large-scale layout data according to claim 4, characterized in that: In step S4, the updating of polygon information in the corresponding node in the B+ tree specifically includes: Step S401: for the changed polygon information, determine whether it needs to be divided. If not, perform area division according to the Hilbert curve sequence; if necessary, execute step S402; Step S402, generating a corresponding CellId in the new area, the CellId storing relevant polygon information; Step S403: determine whether there is a value related to the new CellId in the existing index. If so, merge the new and old CellIds and related polygon information; if not, input the polygon information into the CellId, and insert the CellId into the B+ tree; Step S404: output the updated index structure.
6. The indexing method for large-scale layout data according to claim 5, characterized in that: In step S5, locating the node corresponding to the area containing the coordinates in the B+ tree specifically includes: Step S501, input two-dimensional point coordinates; Step S502, calculate the minimum CellId that just covers the point; Step S503, input CellId to B+ tree; Step S504, find out the node covering the CellId; Step S505, traverse all polygon information in the node; Step S506: Execute a judgment to determine whether there is a polygon containing the coordinate point. If so, relevant polygon information is summarized. If not, there is no layout data at the coordinate point. Step S507: output the search result.
