A method for region partitioning in circuit layout mesh generation

By constructing rectangular mesh cells that conform to the trace direction in circuit layout meshing, and combining them with triangular meshing, the problem of inconsistent orientation of rectangular mesh cells in existing technologies is solved, thereby improving the accuracy and efficiency of simulation solutions.

CN115544945BActive Publication Date: 2026-03-06XPEEDIC CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211266452.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-17
Publication Date
2026-03-06
Estimated Expiration
2042-10-17

AI Technical Summary

Technical Problem

Existing mesh generation methods cannot effectively create rectangular mesh cells that conform to the routing direction in the routing section, resulting in large calculation errors, increased resource requirements, and failure to reflect the difference in resistivity between the inside and outside of the conductor.

Method used

By obtaining the planar graphic of the area to be meshed, the first rectangular mesh unit is constructed according to the boundary, and the rectangular mesh is divided in the same direction as the length and width. Combined with the triangular mesh division, rectangular mesh units that conform to the routing direction are created.

Benefits of technology

This method aligns the direction of rectangular mesh cells with the direction of traces, reducing computational errors, lowering resource requirements, reflecting the difference in resistivity between the inside and outside of the conductor, and improving the accuracy and efficiency of simulation solutions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115544945B_ABST
    Figure CN115544945B_ABST
Patent Text Reader

Abstract

This invention discloses a region partitioning method for circuit layout meshing, belonging to the field of electromagnetic simulation technology for PCBs and chips. Addressing the issue of inconsistent rectangular mesh directions with the trace directions in the trace portion, this invention provides a region partitioning method for circuit layout meshing, including: acquiring a planar graphic of the region to be meshed, the planar graphic being a polygon; constructing first rectangular mesh units based on the boundaries of the planar graphic; dividing the first rectangular mesh units into multiple second rectangular mesh units by aligning their length and width; and performing triangular meshing on the remaining planar graphic in adjacent first rectangular mesh units. This invention can create second rectangular mesh units with corresponding directions within different first rectangular mesh units, ensuring that the direction of the rectangular mesh units after meshing conforms to the trace direction of the corresponding region.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of electromagnetic simulation technology for PCBs and chips, and in particular to a method for region division applied to circuit layout mesh partitioning. Background Technology

[0002] As electronic devices continue to evolve towards miniaturization, multifunctionality, and high performance, their reliability becomes increasingly crucial. The electromagnetic field has a significant demand for electromagnetic simulation. Based on computer technology and electromagnetic theory, electromagnetic simulation is gradually replacing extensive experimental testing and analysis, enabling efficient, flexible, comprehensive, and in-depth scientific research on electromagnetic-related issues of information systems. The simulation solver, used to calculate the model's state during simulation generation, is the core of the simulation. The simulation solver requires mesh generation as input data. Therefore, the quantity and quality of the mesh generation have a significant impact on the simulation results.

[0003] Existing mesh generation schemes primarily use triangular and rectangular meshes. In circuit design, the traces connecting devices are typically very narrow and long graphics, created using lines of equal width (i.e., the width is basically the same at all points in the graphic).

[0004] If a triangular mesh is used for this region, a large number of mesh cells must be divided to ensure the quality of the triangles, which will drastically increase the time and space resources required for the solution. Alternatively, reducing the number of triangles may result in triangles with large aspect ratio differences. In a narrow triangle, there will inevitably be a vertex angle that is very small (very close to 0°). Due to the limited precision of computer calculations, there will be errors between the actual values ​​and the data stored in the computer. The smaller the value, the larger the error ratio, which will lead to deviations in subsequent calculations and seriously affect the quality of the solution.

[0005] If rectangular mesh cells are used in the routing section, even if the rectangle itself is relatively long and narrow, there will be no numerical error because the apex angle is 90°, and the impact on accuracy is relatively small. Therefore, the resource requirements of the solution process can be greatly reduced while ensuring the progress.

[0006] Current methods for creating rectangular meshes typically use a grid method. This involves first drawing an M*N table, where each cell is a rectangle. This table can completely cover the graphic to be meshed. Then, cells completely or partially outside the graphic are removed, leaving only cells completely inside the graphic. The remaining area is filled with triangles. However, grid-based rectangular cells usually have only one direction, while routing directions can be at least 0° and 45°. This means that if the grid method is used to create rectangular cells for the entire model (e.g., 0°), then routing positions at other angles cannot create rectangular cells that match the routing direction (e.g., 45°).

[0007] Because the solution process needs to consider the skin effect (when there is alternating current or an alternating electromagnetic field in a conductor, the current distribution inside the conductor is uneven, and the current is concentrated in the "skin" part of the conductor, that is, the current is concentrated in a thin layer on the outer surface of the conductor. The closer to the surface of the conductor, the greater the current density, while the current inside the conductor is actually smaller. As a result, the resistance of the conductor increases, and its power loss also increases. This phenomenon is called the skin effect). A single mesh cell has only one resistivity, but in reality, the resistivity is higher on the outside and lower on the inside. If the span of a single mesh cell on the model is too large, this resistance distribution cannot be reflected. Randomly distributing rectangular cells requires creating individual cells as small as possible to ensure that the span is not too large, which obviously increases the number of cells significantly. Distributing rectangular cells along the current direction (i.e., the routing direction) means that the long side of the rectangle is along the current direction, and the short side is the span (i.e., width) of the graphic. Only the length of the short side (i.e., the width) needs to be controlled. Summary of the Invention

[0008] To address the issue of inconsistencies between the rectangular mesh direction and the routing direction in related trace sections, this invention provides a region partitioning method for circuit layout mesh division. The technical solution is:

[0009] A region partitioning method for circuit layout mesh generation includes:

[0010] Obtain a planar graphic of the region to be meshed, wherein the planar graphic is a polygon;

[0011] Construct a first rectangular grid cell based on the boundary of the planar graphic;

[0012] The first rectangular grid cell is divided into multiple second rectangular grid cells by dividing the first rectangular grid cell into rectangular grid cells in the same direction in terms of length and width.

[0013] The remaining planar shapes in two adjacent first rectangular grid cells are divided into triangular grids.

[0014] In a preferred embodiment of the present invention, constructing the first rectangular grid unit based on the boundary of the planar graphic includes:

[0015] Obtain the azimuth angles of each side of the planar figure;

[0016] A side relationship group is established based on the azimuth angle. The side relationship group includes two parallel and opposite sides. A quasi-rectangular mesh cell is constructed with two sides in the same side relationship group as opposite sides.

[0017] Determine whether the pseudo-rectangular mesh unit is an inner hole and whether it includes other sides. If neither is true, then mark the pseudo-rectangular mesh unit as the first rectangular mesh unit.

[0018] In a preferred embodiment of the present invention, the two sides within the same edge relationship group are opposite sides to construct a quasi-rectangular mesh unit, including:

[0019] The first rectangular grid cell is constructed using the shorter of the two sides as the length reference.

[0020] In a preferred embodiment of the present invention, obtaining the azimuth angles of each side of the planar figure includes:

[0021] Establish a corresponding two-dimensional coordinate system based on the direction of each side of the planar figure, and calculate the azimuth angle of the corresponding side.

[0022] In a preferred embodiment of the present invention, the step of establishing a side relationship group based on azimuth angle includes:

[0023] Establish a pseudo-edge relationship group by creating sides with equal azimuth angles, and then pairwise combine the sides of two parallel pseudo-edge relationship groups to establish the edge relationship group; or,

[0024] Establish a pair of sides with an absolute value of 180° for the azimuth difference.

[0025] In a preferred embodiment of the present invention, the two parallel pseudo-edge relationship groups are such that the absolute value of the azimuth angle difference between the two pseudo-edge relationship groups is 180°.

[0026] In a preferred embodiment of the present invention, determining whether the quasi-rectangular mesh unit is an inner hole includes:

[0027] The orientation of the pseudo-rectangular mesh unit is determined based on the orientation of each side of the planar graphic. When the orientation of the pseudo-rectangular mesh unit is the same as the inner orientation of the planar graphic, the pseudo-rectangular mesh unit is an inner hole; otherwise, it is not an inner hole.

[0028] In a preferred embodiment of the present invention, determining whether the quasi-rectangular mesh unit is an inner hole and whether the interior includes other sides includes:

[0029] If there exists a difference between the quasi-rectangular mesh unit and the planar graphic, then the quasi-rectangular mesh unit is an inner hole or contains other sides inside.

[0030] Compared with the prior art, the beneficial effects of the present invention are:

[0031] This invention obtains a planar graphic of the area to be meshed, constructs a first rectangular mesh unit based on the boundary of the planar graphic, and divides the first rectangular mesh unit into rectangular meshes with the length and width in the same direction. In this way, second rectangular mesh units with corresponding directions can be created in different first rectangular mesh units, so that the direction of the rectangular mesh unit after meshing conforms to the routing direction of the corresponding part of the area. Attached Figure Description

[0032] Figure 1 This is a flowchart of the present invention;

[0033] Figure 2 This is a planar schematic diagram of the wiring section in Example 1;

[0034] Figure 3 This is a schematic diagram of the polygonal winding direction used in Example 1;

[0035] Figure 4 for Figure 2 Schematic diagram of part A in the middle;

[0036] Figure 5 for Figure 4 Schematic diagram of the directions of each side;

[0037] Figure 6 for Figure 5 Schematic diagram of the quasi-rectangular mesh unit in the middle section;

[0038] Figure 7 for Figure 6 Schematic diagram of the first rectangular grid unit in the middle section;

[0039] Figure 8 for Figure 2 A schematic diagram of all the first rectangular grid cells in the diagram;

[0040] Figure 9 for Figure 8 A schematic diagram after grid division. Detailed Implementation

[0041] To better understand the above-described objects, features, and advantages of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. Many specific details are set forth in the following description to provide a thorough understanding of the present invention; however, the present invention may also be implemented in other ways different from those described herein, and therefore, the scope of protection of the present invention is not limited to the specific embodiments disclosed below.

[0042] Example 1:

[0043] like Figure 1 As shown, a region partitioning method for circuit layout meshing is presented, which is particularly suitable for routing sections. Figure 2A typical routing model is given, which is an extremely narrow and long ring structure, with routing directions including 0°, 45°, 90°, etc.

[0044] This method includes:

[0045] S1 obtains the planar graphic of the region to be meshed, that is, obtains the planar graphic of the model to be meshed, which is a polygon.

[0046] The specific details can be obtained directly from the process documents.

[0047] S2 constructs the first rectangular grid cell based on the boundary of the planar figure.

[0048] Specifically, S21 obtains the azimuth angles of each side of the planar figure.

[0049] A corresponding two-dimensional coordinate system can be established based on the direction of each side of the planar figure, and the azimuth angle of the corresponding side can be calculated.

[0050] S22 establishes edge relationship groups based on azimuth angles. Each edge relationship group includes two parallel and opposite edges. Quasi-rectangular mesh cells are constructed using the two edges within the same edge relationship group as opposite edges.

[0051] S23 determines whether the quasi-rectangular mesh element is an inner hole and whether the interior includes other edges. If neither is true, the quasi-rectangular mesh element is marked as the first rectangular mesh element.

[0052] In this embodiment, the definition of the winding direction of the planar graphic is as follows: Figure 3 As shown, according to the general definition, a polygon consists of one or more sets of edges connected end-to-end, with each set of edges forming a loop. The direction of the edges is defined by their connection relationship, from which the direction of the loop is derived. Generally, the outer loop rotates counter-clockwise, and the inner loop rotates clockwise. Of course, other definitions can also be used to specify the direction of the polygon's rotation.

[0053] Again Figure 2 Taking the edge inside box A as an example: Figure 4 As shown, there are 12 edges in total (e1-e12), and the directions of each edge are as follows: Figure 5 As shown.

[0054] Using a two-dimensional coordinate system, with the origin at (0, 0) (the origin being the first endpoint of each side according to its direction), the x-axis to the right and the y-axis to the up, the azimuth angle α of each side is calculated. In this embodiment, -180° < α ≤ 180°. Of course, other range restrictions can also be used, such as 0° ≤ α < 360°.

[0055] The azimuth angles of each side are shown in the table below:

[0056] Azimuth angle Edge number -135° e1, e7 -45° e6, e12 0° e5, e11 45° e4, e10 135° e3, e9 180° e2 e8

[0057] After organizing the corresponding edge labels according to their azimuth positions, the parallel relationships of all edges can be determined. Specifically, edge relationship groups are established based on azimuth angles. Edges with equal azimuth angles are grouped together as a pseudo-edge relationship group. Subsequent parallel relationship determination can be performed by pairing edges from two parallel pseudo-edge relationship groups. Specifically, two parallel pseudo-edge relationship groups are defined as follows: the absolute value of the azimuth angle difference between the two pseudo-edge relationship groups is 180°; or, the two edges with an absolute azimuth angle difference of 180° are directly established as an edge relationship group. Group matching is preferred, as calculations are only performed within groups with parallel relationships, significantly reducing algorithm complexity.

[0058] Here, we take the horizontal side as an example. All sides with azimuth angles of 0° and 180° are parallel. According to the definition of side direction, the two opposite sides of a rectangle must be opposite. Therefore, we combine the sides in the 0° and 180° pseudo-side relationship groups to obtain side relationship groups. Then, using the two sides within the same side relationship group as opposite sides, and the shorter side as the length reference, we construct pseudo-rectangular mesh elements to obtain... Figure 6 Four quasi-rectangular mesh elements (dashed lines).

[0059] For quasi-rectangular mesh elements, the winding direction of the quasi-rectangular mesh elements is set according to the relevant edges, that is, according to... Figure 5 The orientation of each side of the planar graphic determines the winding direction of the quasi-rectangular mesh cell. For (e8, e5), the winding direction is clockwise, which is the same as the inner winding direction of the planar graphic. According to the definition of polymorphic winding direction, this quasi-rectangular mesh cell is an inner hole, and the interior of the quasi-rectangular mesh cell is the exterior of the trace portion, which needs to be excluded.

[0060] Determine whether each quasi-rectangular mesh cell contains other edges. For (e2, e11), it contains e5 and e8, so it needs to be excluded. (e2, e5) and (e8, e11) do not contain either of these two cases, therefore they are marked as the first rectangular mesh cell, such as... Figure 7 As shown.

[0061] Determining whether a quasi-rectangular grid cell contains other edges is equivalent to determining whether the line segment represented by that edge is inside the rectangle. The method involves: first, calculating the intersection points of the line segment with the rectangle's border, i.e., finding the intersections of the line segment with each of the rectangle's four sides. After finding the intersections, the original line segment is divided into multiple sub-segments (if there are no new intersections, the line segment remains the same). Next, for each sub-segment, take the midpoint of that sub-segment. Then, calculate the relationship between the midpoint and the rectangle: if the midpoint is inside the rectangle, the current sub-segment is inside the rectangle; if the midpoint is outside the rectangle, the current sub-segment is outside the rectangle. The relationship between the midpoint and the rectangle is equivalent to determining the positional relationship between a point and a polygon, typically using the ray casting method (ray casting: draw a ray from the target point and check how many intersection points it has with the polygon. If the number of intersection points is odd, it's inside the polygon; otherwise, it's outside).

[0062] Alternatively, if there exists a difference f(x) between a quasi-rectangular grid cell M and a planar figure N, i.e. If a quasi-rectangular mesh cell has an internal hole or contains other sides, it must be excluded.

[0063] According to the above method Figure 2 The model is initially divided to obtain Figure 8 .

[0064] S3 divides the first rectangular grid cell into multiple second rectangular grid cells by dividing the first rectangular grid cell into rectangular grid cells in the same direction as the length and width.

[0065] Specifically, the rectangular grid division can be similar to the method of table drawing. The first rectangular grid cell is divided according to its length and width directions, that is, divided in the same direction, so that the length and width directions of the resulting second rectangular grid cell are in the same direction as the first rectangular grid cell. At the same time, the size of the second rectangular grid cell can be based on circuit requirements, for example, the cells near the middle are larger, and the cells at the boundaries are smaller.

[0066] S4 divides the remaining planar graphics in two adjacent first rectangular grid cells into triangular grids.

[0067] Specifically, triangular meshing can be performed using conventional meshing methods such as Delaunay.

[0068] Final division as follows Figure 9 As shown.

[0069] In summary, this invention obtains a planar graphic of the area to be meshed, constructs a first rectangular mesh unit based on the boundary of the planar graphic, and divides the first rectangular mesh unit into rectangular meshes with the length and width in the same direction. Thus, second rectangular mesh units with corresponding directions can be created in different first rectangular mesh units, so that the direction of the rectangular mesh units after meshing conforms to the routing direction of the corresponding part of the area.

[0070] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0071] Alternatively, if the integrated units of this invention are implemented as software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of this invention, or the parts that contribute to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, ROM, RAM, magnetic disks, or optical disks.

[0072] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A region division method applied to circuit layout mesh partitioning, characterized in that, The method comprises the following steps: obtaining a planar graph of a region to be meshed, the planar graph being a polygon; the polygon being composed of one or more groups of edges connected at their ends, each group of connected edges forming a loop; the direction of an edge being defined by the connection of its ends, the outer loop rotating in a counterclockwise direction and the inner loop rotating in a clockwise direction; constructing a first rectangular mesh cell according to the boundary of the planar graph; rectangularly meshing the first rectangular mesh cell in the same direction of its length and width to divide the first rectangular mesh cell into a plurality of second rectangular mesh cells; the first rectangular mesh cell being divided in the same direction of its length and width, i.e. lengthwise and widthwise, so that the second rectangular mesh cells are in the same direction of the length and width of the first rectangular mesh cell; triangularly meshing the remaining planar graph in adjacent two first rectangular mesh cells; and the step of constructing a first rectangular mesh cell according to the boundary of the planar graph comprises the following steps: obtaining the azimuth angle of each edge of the planar graph; establishing an edge relationship group according to the azimuth angle, the edge relationship group comprising two parallel and opposite edges, and constructing a quasi-rectangular mesh cell with the two edges in the same edge relationship group as opposite edges; judging whether the quasi-rectangular mesh cell is an inner hole and whether the interior includes other edges, and if not, marking the quasi-rectangular mesh cell as a first rectangular mesh cell; constructing a quasi-rectangular mesh cell with the two edges in the same edge relationship group as opposite edges comprises the following step: constructing a first rectangular mesh cell with the shorter edge of the two edges as a length reference.

2. The region division method for circuit layout mesh partitioning according to claim 1, wherein, the step of obtaining the azimuth angle of each edge of the planar graph comprises the following steps: establishing a corresponding two-dimensional coordinate system according to the direction of each edge of the planar graph, and calculating and obtaining the azimuth angle of the corresponding edge.

3. The region division method for circuit layout mesh partitioning according to claim 1, wherein, the step of establishing an edge relationship group according to the azimuth angle comprises the following steps: establishing a quasi-edge relationship group for edges with equal azimuth angles, and combining each edge in two quasi-edge relationship groups that are parallel to each other in pairs to establish the edge relationship group; or establishing an edge relationship group for two edges with an absolute difference of 180° in azimuth angle.

4. The region division method for circuit layout mesh partition according to claim 3, wherein, the two quasi-edge relationship groups that are parallel to each other are two quasi-edge relationship groups with an absolute difference of 180° in azimuth angle.

5. The region division method for circuit layout mesh partition according to claim 1, wherein, the step of judging whether the quasi-rectangular mesh cell is an inner hole comprises the following steps: determining the direction of rotation of the quasi-rectangular mesh cell according to the direction of each edge of the planar graph, and when the direction of rotation of the quasi-rectangular mesh cell is the same as the direction of rotation of the inner loop of the planar graph, the quasi-rectangular mesh cell is an inner hole, otherwise it is not an inner hole.

6. The region division method for circuit layout mesh partition according to claim 1, wherein, the step of judging whether the quasi-rectangular mesh cell is an inner hole and whether the interior includes other edges comprises the following steps: if there is a difference set between the quasi-rectangular mesh cell and the planar graph, the quasi-rectangular mesh cell is an inner hole or contains other edges in its interior.

Citation Information

Patent Citations

  • Hybrid mesh partition method with design of integrity of system-level packaging power supply

    CN101976287A

  • Radio-frequency integrated-circuit triangular mesh generation method

    CN102663161A