Circuit layout routing layout adjustment method and device, storage medium and electronic equipment
By constructing a search rectangle in the circuit layout design to find associated vertices while keeping the slope of the line segments constant, the problem of the inability to automatically move associated vertices in the prior art is solved, thus improving routing efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ORIGIN QUANTUM INSTR CO
- Filing Date
- 2024-11-26
- Publication Date
- 2026-06-02
AI Technical Summary
Existing circuit layout design software cannot automatically move other related inflection points when moving trace segments, resulting in low routing efficiency and requiring designers to make manual adjustments.
By acquiring the target line segment and its endpoint on the circuit layout, a search rectangle is constructed to enclose its endpoint. Related vertices that meet the conditions are found, and pushing vertices that may constitute obstacles are detected. The slope and connection relationship between the target line segment and the pushing vertices remain unchanged, so that the target line segment moves in the normal direction and the pushing vertices move synchronously.
It enables automatic synchronous movement of associated vertices when moving line segments, improving layout routing efficiency and reducing the need for manual adjustments.
Smart Images

Figure CN122133597A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of circuit layout design, and in particular to a method, apparatus, storage medium, and electronic device for adjusting circuit layout routing. Background Technology
[0002] In circuit layout design, after drawing the layout graphics of components, pads, and other circuit entities, it is necessary to arrange polygonal traces between the connection points of each layout graphic to represent the circuit connection relationship. Existing routing methods include manual routing and automatic routing. Manual routing is done by designers manually, while automatic routing is performed automatically by software according to pre-set routing rules.
[0003] However, regardless of the routing method used, the resulting traces are rarely able to fully meet requirements for signal integrity, power distribution, timing, and area constraints, necessitating local adjustments by designers. In some scenarios, it's necessary to move the position of a trace segment, but during this movement, certain inflection points of other traces may become obstructions. Therefore, it's also necessary to move these inflection points and adjust the lengths of the segments to which they belong. Currently, existing layout design software does not support automatically moving other associated inflection points when moving trace segments, so designers must manually perform these adjustments, resulting in low layout routing efficiency. Summary of the Invention
[0004] The purpose of this invention is to provide a circuit layout routing adjustment method, device, storage medium, and electronic device to solve the problem in the prior art that other related inflection points and their corresponding line segments need to be manually adjusted when moving a line segment, and to achieve synchronous movement of other related inflection points when moving a line segment, thereby improving the efficiency of circuit layout routing.
[0005] To solve the above technical problems, the present invention provides a method for adjusting circuit layout routing, comprising:
[0006] Obtain the target line segment located in the middle of the circuit layout trace and its endpoint;
[0007] Construct a search rectangle along a preset direction that surrounds the endpoint of the movement and the two endpoints of the target line segment;
[0008] Within the search rectangle, find the inflection point that belongs to other lines, whose included angle is away from the target line segment, whose angle bisector is perpendicular to the target line segment, and whose moving endpoint is on the same side of the target line segment, as the associated inflection point;
[0009] The detection line segment intercepted by the line segment before and after the target line segment, which passes through each of the associated inflection points and is perpendicular to the angle bisector, intersects with the associated inflection point. The associated inflection points that intersect are taken as the pushing inflection points.
[0010] Keeping the slope and connection relationship of the target line segment and the line segment before and after the pushing inflection point unchanged, move the target line segment toward the moving endpoint in the normal direction, and move the pushing inflection point simultaneously.
[0011] Preferably, the acquisition of the target line segment located in the middle of the circuit layout trace and its moving endpoint includes:
[0012] In response to the selection command, the current line segment located in the middle of the circuit layout trace is selected as the target line segment;
[0013] The mouse position point is acquired in real time and used as the endpoint of the movement of the target line segment.
[0014] Preferably, constructing a search rectangle along a preset direction that surrounds the endpoint of the movement and the two endpoints of the target line segment includes:
[0015] Path points are set at preset distances from both ends of the target line segment on the straight line where the target line segment is located;
[0016] Select the minimum x-coordinate, minimum y-coordinate, maximum x-coordinate, and maximum y-coordinate of the endpoint and the two path points;
[0017] Construct a search rectangle along a preset direction, with the minimum horizontal coordinate and the minimum vertical coordinate as one vertex and the maximum horizontal coordinate and the maximum vertical coordinate as another diagonal vertex.
[0018] Preferably, the step of finding a vertex within the search rectangle that belongs to other lines, has an included angle pointing away from the target line segment, has an angle bisector perpendicular to the target line segment, and is located on the same side of the target line segment as the moving endpoint, includes:
[0019] The inflection points belonging to other routes that are located within the search rectangle are used as the first filtering inflection points;
[0020] Select the inflection point from the first filtering inflection point where the angle between the preceding and following line segments is away from the target line segment as the second filtering inflection point;
[0021] Select the third filtering inflection point from the second filtering inflection points that is on the same side of the target line segment as the moving endpoint;
[0022] From the third selection of inflection points, select the inflection point where the angle bisector of the preceding and following line segments is perpendicular to the target line segment as the associated inflection point.
[0023] Preferably, the detection of whether the detection line segment intercepted by the line segment containing the preceding and following line segments of the target line segment, which passes through each of the associated inflection points and is perpendicular to the angle bisector, intersects the associated inflection point includes:
[0024] Obtain the detection line segment intercepted by the line containing the line segment before and after the target line segment, which is a straight line passing through each of the associated inflection points and perpendicular to the angle bisector.
[0025] The slope of each of the tested line segments is checked sequentially.
[0026] When the slope does not exist, the current detection line segment and the corresponding associated inflection point are projected along the normal direction onto the Y-axis of the reference coordinate system; and when the slope exists, the current detection line segment and the corresponding associated inflection point are projected along the normal direction onto the X-axis of the reference coordinate system.
[0027] Determine whether the projection of the currently detected line segment and the corresponding associated inflection point on the X-axis or Y-axis coincides;
[0028] If they coincide, it is confirmed that the currently detected line segment intersects with the corresponding associated inflection point.
[0029] Preferably, the detection order of the detection line segments is in ascending order of the distance between the detection line segments and the target line segments.
[0030] Preferably, the intersection of the moving endpoint and the straight line containing the preceding and following segments of the target line segment is located on the same side of the target line segment, and the perpendicular distance from the moving endpoint to the target line segment is not greater than the perpendicular distance from the intersection of the preceding and following segments of the target line segment to the target line segment; or the intersection of the moving endpoint and the straight line containing the preceding and following segments of the target line segment is located on both sides of the target line segment; or the straight line containing the preceding and following segments of the target line segment does not have an intersection.
[0031] Maintaining the slope and connection relationship of the target line segment and the line segment before and after the pushing inflection point unchanged, moving the target line segment in the normal direction toward the moving endpoint, and simultaneously moving the pushing inflection point, includes:
[0032] Keeping the slope and connection relationship of the line segments before and after the pushing fold point unchanged, move the pushing fold point toward the moving endpoint on the angle bisector until it crosses the moving endpoint and is separated from the moving endpoint by a preset line distance.
[0033] Keeping the slope and connection relationship of the preceding and following line segments of the target line segment unchanged, move the target line segment toward the moving endpoint in the normal direction until it is collinear with the moving endpoint.
[0034] Preferably, the intersection of the moving endpoint and the straight line containing the preceding and following segments of the target line segment is located on the same side of the target line segment, and the perpendicular distance from the moving endpoint to the target line segment is greater than the perpendicular distance from the intersection of the preceding and following segments of the target line segment to the target line segment.
[0035] Maintaining the slope and connection relationship of the target line segment and the line segment before and after the pushing inflection point unchanged, moving the target line segment in the normal direction toward the moving endpoint, and simultaneously moving the pushing inflection point, includes:
[0036] Keeping the slope and connection relationship of the line segments before and after the pushing fold point unchanged, move the pushing fold point toward the moving endpoint on the angle bisector until it crosses the intersection point and is separated from the intersection point by a preset line distance.
[0037] Keeping the slope and connection relationship of the preceding and following line segments of the target line segment unchanged, move the target line segment toward the endpoint in the normal direction until the target line segment becomes the intersection point.
[0038] To solve the above-mentioned technical problems, the present invention also provides a circuit layout routing adjustment device, comprising:
[0039] The acquisition module is used to acquire the target line segment located in the middle of the circuit layout trace and its moving endpoint;
[0040] A construction module is used to construct a search rectangle that surrounds the two endpoints of the moving endpoint and the target line segment along a preset direction;
[0041] The search module is used to find, within the search rectangle, a vertex that belongs to other lines, whose included angles of the preceding and following line segments are opposite to the target line segment, whose angle bisectors of the preceding and following line segments are perpendicular to the target line segment, and whose moving endpoint is located on the same side of the target line segment, as an associated vertex.
[0042] The detection module is used to detect whether the detection line segment intercepted by the line segment before and after the target line segment and its extension, which passes through each of the associated inflection points and is perpendicular to the angle bisector, intersects with the associated inflection point, and takes the associated inflection point that intersects as the pushing inflection point;
[0043] The adjustment module is used to keep the slope and connection relationship of the target line segment and the line segment before and after the pushing inflection point unchanged, move the target line segment toward the moving endpoint in the normal direction, and move the pushing inflection point synchronously.
[0044] To address the aforementioned technical problems, the present invention also provides a storage medium storing a computer program configured to execute the circuit layout and routing adjustment method described in any of the preceding claims during runtime.
[0045] To address the aforementioned technical problems, the present invention also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the circuit layout and routing adjustment method described in any of the preceding claims.
[0046] Unlike existing technologies, the circuit layout adjustment method provided by this invention, after obtaining the target line segment located in the middle of the circuit layout and its moving endpoint, first constructs a search rectangle along a preset direction to surround the two endpoints of the moving endpoint and the target line segment. Then, it searches for vertices that meet certain conditions within the search rectangle as associated vertices. Next, it detects associated vertices that would constitute obstacles to the movement of the target line segment as pushing vertices. Finally, it keeps the slope and connection relationship of the line segments before and after the target line segment and the pushing vertices unchanged, moves the target line segment toward the moving endpoint in the normal direction, and moves the pushing vertices synchronously. This invention can realize the synchronous movement of other associated vertices when moving the line segment. The line segment movement process can be completed automatically without the need for designers to manually adjust them one by one, thus improving the efficiency of circuit layout routing.
[0047] The circuit layout routing adjustment device, storage medium, and electronic device provided by this invention belong to the same inventive concept as the circuit layout routing adjustment method, and therefore have the same beneficial effects, which will not be described again here. Attached Figure Description
[0048] Figure 1 This is a schematic flowchart illustrating the circuit layout and routing adjustment method provided in an embodiment of the present invention.
[0049] Figure 2 This is a schematic diagram of the target line segment and its endpoint.
[0050] Figure 3 A schematic diagram of the search rectangle that encloses the endpoints of the moving point and the target line segment.
[0051] Figure 4 This is a schematic diagram of the search rectangle for inflection points.
[0052] Figure 5 This is a schematic diagram of the pushing inflection point and the detection line segment.
[0053] Figure 6 This is a schematic diagram illustrating the movement of the target line segment and the pushing inflection point.
[0054] Figure 7 for Figure 1 A detailed flowchart of step S1 in the process shown.
[0055] Figure 8 for Figure 1 A detailed flowchart of step S2 in the process shown.
[0056] Figure 9 This is a schematic diagram of the search rectangle that encloses the endpoint and waypoints of the movement.
[0057] Figure 10 This is a schematic diagram of the process for finding associated vertices.
[0058] Figure 11 This is a flowchart illustrating the process of detecting whether associated vertices intersect with line segments.
[0059] Figure 12 This is a schematic diagram for detecting the projection of line segments and associated inflection points on the Y-axis.
[0060] Figure 13 This is a schematic diagram for detecting the projection of line segments and associated inflection points onto the X-axis.
[0061] Figure 14 This is a schematic diagram of the movement process of the target line segment and the pushing inflection point.
[0062] Figure 15 This is a schematic diagram of the pushing inflection point moving to the point where it crosses the endpoint of the movement and is separated from the endpoint by a preset line distance.
[0063] Figure 16 This is a schematic diagram showing the target line segment moving to the point where it is collinear with the endpoint of the movement.
[0064] Figure 17 This is a schematic diagram of the movement process in another application scenario involving the target line segment and the pushing inflection point.
[0065] Figure 18 This is a schematic diagram showing the pushing inflection point moving to pass the intersection point and being separated from the intersection point by a preset line distance.
[0066] Figure 19 This is a diagram showing the point where the target line segment moves to become an intersection.
[0067] Figure 20 This is a schematic block diagram of a circuit layout and routing adjustment device provided in another embodiment of the present invention. Detailed Implementation
[0068] The specific embodiments of the present invention will now be described in more detail with reference to the accompanying drawings. The advantages and features of the present invention will become clearer from the following description and claims. It should be noted that the drawings are all in a very simplified form and use non-precise proportions, and are only used to facilitate and clarify the illustration of the embodiments of the present invention.
[0069] In the description of this invention, it should be understood that the terms "center", "upper", "lower", "left", "right", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this invention.
[0070] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0071] Please refer to Figure 1 This invention provides a method for adjusting circuit layout routing, which includes the following steps:
[0072] S1: Obtain the target line segment located in the middle of the circuit layout and its endpoint.
[0073] In circuit routing design, traces are often designed as zigzag lines. This design has many advantages, such as reducing signal interference during transmission, improving circuit reliability, and saving routing space. A target segment is a segment on the trace located in the middle, without a direct connection to the start or end point of the trace. The target segment can be determined based on external input; for example, the user can select the middle segment of a trace using the mouse, thus designating it as the target segment.
[0074] The endpoint is a coordinate point in a circuit layout that indicates the location where a target line segment will move. At this location, the target line segment will be collinear with the endpoint, meaning they will lie on the same line. The endpoint can be obtained in several ways, such as by clicking with a mouse, where the mouse cursor position at the time of the click is the endpoint, or by the user selecting the endpoint by inputting coordinates.
[0075] like Figure 2 The diagram shown is a schematic of the target line segment and its endpoint. The target line segment H is the middle segment of a path, and the endpoint P is located on one side of the target line segment H.
[0076] S2: Construct a search rectangle along the preset direction that encloses the two endpoints of the moving endpoint and the target line segment.
[0077] The search rectangle is constructed along a preset direction, meaning that one axis of the search rectangle is parallel to the preset direction. The search rectangle encloses the two endpoints of the movement endpoint and the target line segment. Therefore, the two endpoints of the movement endpoint and the target line segment can be entirely or partially located on the edge of the search rectangle, or partially located inside the search rectangle.
[0078] like Figure 3 The diagram shows a search rectangle S that encloses the endpoints of the movement point P and the target line segment H. The search rectangle S is constructed along a preset direction F, and it encloses the endpoints of the movement point P and the target line segment H.
[0079] S3: Within the search rectangle, find the inflection points that belong to other routes, whose included angles are opposite to the target route, whose angle bisectors are perpendicular to the target route, and whose endpoints are on the same side of the target route as the associated inflection points.
[0080] Among these conditions, a vertex, as an associated inflection point, must meet five criteria: it must be located within the search rectangle's coverage area; it must belong to a different path from the target line segment; the angle bisector of the two line segments with the vertex as their endpoints must be perpendicular to the target line segment; the opening direction of the angle formed by the two line segments must be away from the target line segment; and it must be located on the same side of the target line segment as the endpoint of the movement. The search order for these five criteria is as follows: first, find vertex points located within the search rectangle's coverage area; the search order for the other four criteria can be set according to actual needs.
[0081] like Figure 4 The diagram shows the inflection points within the search rectangle S. There are three inflection points Z1, Z2, Z3, and Z4 within the search rectangle S. These inflection points belong to other paths and are all located on the same side of the target line segment H as the endpoint P. However, the angle between the line segments preceding and following inflection point Z1 faces the target line segment H, therefore it is not an associated inflection point. The angle bisectors of the line segments preceding and following inflection point Z2 (shown by dashed lines in the diagram) are not perpendicular to the target line segment H, therefore it is not an associated inflection point. Only the angles between the line segments preceding and following inflection points Z3 and Z4 face away from the target line segment H, and the angle bisectors of the line segments preceding and following inflection points Z3 and Z4 are perpendicular to the target line segment H. Therefore, inflection points Z3 and Z4 are considered associated inflection points.
[0082] S4: Detect whether the line segment intercepted by the line segment before and after the target line segment, which passes through each associated inflection point and is the perpendicular bisector of the line segment, intersects with the associated inflection point, and take the associated inflection point that intersects with the target line segment as the pushing inflection point.
[0083] Since the angle bisectors of the line segments before and after the associated inflection point are perpendicular to the target line segment, the line passing through each associated inflection point and perpendicular to the angle bisector is parallel to the target line segment. The line containing the line segments before and after the target line segment must intersect the line passing through each associated inflection point and perpendicular to the angle bisector. The portion between the two intersection points on the line passing through each associated inflection point and perpendicular to the angle bisector is the detection line segment. An intersection of the detection line segment and the associated inflection point means that the associated inflection point lies on the detection line segment.
[0084] like Figure 5 The diagram shows the pushing inflection point and the detection line segment. The straight line passing through the associated inflection point Z3 and perpendicular to the angle bisector of the line segments before and after the associated inflection point Z3 is intercepted by the straight lines containing the line segments H1 and H2 before and after the target line segment H, resulting in the detection line segment J1. The straight line passing through the associated inflection point Z4 and perpendicular to the angle bisector of the line segments before and after the associated inflection point Z4 is intercepted by the straight lines containing the line segments H1 and H2 before and after the target line segment H, resulting in the detection line segment J2. The detection line segment J1 does not intersect the associated inflection point Z3, while the detection line segment J2 intersects the associated inflection point Z4. Therefore, only the associated inflection point Z4 serves as the pushing inflection point.
[0085] S5: Keep the slope and connection relationship of the target line segment and the line segments before and after the pushing inflection point unchanged, move the target line segment toward the moving endpoint in the normal direction, and move the pushing inflection point at the same time.
[0086] As the target line segment moves toward the endpoint, the slope and connection relationship of the line segments before and after the target line segment remain unchanged. Therefore, the length of the line segments before and after the target line segment will decrease or the side length will increase as the target line segment moves. Furthermore, since the two endpoints of the target line segment will change position with the line segments before and after the target line segment, the length of the target line segment will also decrease or increase.
[0087] As the pushing inflection point moves towards the endpoint, the slope and connection relationship of the line segments before and after the pushing inflection point remain unchanged. Therefore, the length of the line segments before and after the pushing inflection point will decrease or the side length will increase as the pushing inflection point moves. Correspondingly, the pushing inflection point will change from a point to a line segment, maintaining connection with the line segments before and after it. Therefore, the length of the new line segment will become longer and longer.
[0088] like Figure 6 The diagram shows the movement of the target line segment and the pushing inflection point. The left side of the diagram shows the target line segment H and the pushing inflection point Z4 before they move, and the right side shows the target line segment H and the pushing inflection point Z4 after they have moved a certain distance. As the target line segment H moves in the normal direction, its length gradually decreases, while the lengths of its two preceding and following line segments H1 and H2 increase and their slopes remain unchanged. Once the pushing inflection point Z4 begins to move, the lengths of its two preceding and following line segments decrease and their slopes remain unchanged. Therefore, the pushing inflection point Z4 changes from a point to a line segment G, and the length of line segment G increases.
[0089] In the above manner, the circuit layout adjustment method provided by the embodiments of the present invention, after obtaining the target line segment located in the middle of the circuit layout and its moving endpoint, first constructs a search rectangle along a preset direction to surround the two endpoints of the moving endpoint and the target line segment. Then, it searches for vertices that meet the conditions within the search rectangle as associated vertices. Next, it detects associated vertices that would constitute obstacles to the movement of the target line segment as pushing vertices. Finally, it keeps the slope and connection relationship of the line segments before and after the target line segment and the pushing vertices unchanged, moves the target line segment toward the moving endpoint in the normal direction, and moves the pushing vertices synchronously. The present invention can realize the synchronous movement of other associated vertices when moving the line segment. The line segment movement process can be completed automatically without the need for designers to manually adjust them one by one, thus improving the efficiency of layout routing.
[0090] In the embodiments of this application, please refer to Figure 7 ,yes Figure 1 The flowchart for step S1 in the illustrated process is shown below. Step S1, which involves obtaining the target line segment located in the middle of the circuit layout trace and its endpoint, includes:
[0091] S11: In response to the selection instruction, the current line segment located in the middle of the circuit layout trace is selected as the target line segment.
[0092] The selection command can be triggered by certain operations, such as the user clicking a preset key on the mouse or keyboard, or selecting a preset option on the user interface. At this time, the current line segment located in the middle of the trace is identified as the target line segment. The current line segment can be identified by coordinate information, label information, or mouse cursor. For example, before the user clicks the preset key on the mouse, the line segment in the middle of the trace where the mouse cursor is currently located is the current line segment.
[0093] S12: Acquire the mouse position point in real time and use the mouse position point as the endpoint of the target line segment's movement.
[0094] Once the target line segment is confirmed, the position of the mouse cursor in the circuit layout is obtained in real time, and this position is used as the endpoint of the target line segment's movement.
[0095] In the embodiments of this application, please refer to Figure 8 ,yes Figure 1 The flowchart of step S2 in the illustrated process is shown. Step S2, which involves constructing a search rectangle along a preset direction that encloses the two endpoints of the moving endpoint and the target line segment, includes:
[0096] S21: Set path points on the straight line where the target line segment is located, at preset distances from both ends of the target line segment.
[0097] Here, a path point is a point outside the target line segment. Two path points are on the same straight line as the target line segment, and the distance from both path points to the nearest endpoint of the target line segment is a preset line distance. The preset line distance can be set according to actual needs.
[0098] S22: Select the minimum x-coordinate, minimum y-coordinate, maximum x-coordinate, and maximum y-coordinate of the endpoint and the two path points.
[0099] In the coordinate system of the circuit layout, the endpoint and path point of the movement have coordinate values. The minimum value of the horizontal coordinate, the minimum value of the vertical coordinate, the maximum value of the horizontal coordinate, and the maximum value of the vertical coordinate are selected from all the coordinate values.
[0100] S23: Construct a search rectangle along a preset direction, with the minimum horizontal and vertical coordinates as one vertex and the maximum horizontal and vertical coordinates as the other diagonal vertex.
[0101] The preset direction is a reference direction set according to actual needs. To facilitate coordinate calculation, the preset direction can be set as the direction of the coordinate axes of the coordinate system. The minimum x-coordinate and minimum y-coordinate are used as one vertex of the diagonal, and the maximum x-coordinate and maximum y-coordinate are used as the other vertex of the diagonal. The search rectangle along the preset direction can be obtained from the diagonal vertices.
[0102] like Figure 9 The diagram shows a search rectangle enclosing the endpoint and path points. In the diagram, path points M are set at the two ends of the target line segment H at a preset distance d. The preset direction is the X-axis of the coordinate system. One axis of the search rectangle S is parallel to the preset direction. The search rectangle S is the smallest rectangle enclosing the endpoint P and the two path points M.
[0103] When searching for related vertices, there are multiple search criteria, and therefore, the order in which these criteria are filtered can vary. For example, please refer to [link to relevant documentation]. Figure 10 This is a schematic diagram of the process for finding associated inflection points. Step S3 involves finding an inflection point within the search rectangle that belongs to another path, has an angle between its preceding and following segments pointing away from the target segment, has its angle bisector perpendicular to the target segment, and is located on the same side of the target segment as the endpoint of the movement.
[0104] S31: Use the inflection points of other routes located within the search rectangle as the first filtering inflection points.
[0105] The number of traces on a circuit layout is usually enormous. By narrowing the search range of inflection points to within the search rectangle, many inflection points can be filtered out, because only the inflection points of other traces located within the search rectangle will affect the movement of the target line segment.
[0106] S32: Select the inflection point from the first selection inflection point where the angle between the preceding and following line segments is away from the target line segment as the second selection inflection point.
[0107] Among them, the first selection of turning points only requires turning points where the included angle between the preceding and following line segments is away from the target line segment, because such turning points can be easily adjusted even if they affect the movement of the target line segment.
[0108] S33: Select the third filtering point from the second filtering points that is on the same side of the target line segment as the endpoint of the movement.
[0109] Among them, the vector method can be used to determine whether each second screening vertex is located on the same side of the target line segment as the moving endpoint.
[0110] S34: Select the inflection point from the third selection of inflection points where the angle bisector of the preceding and following line segments is perpendicular to the target line segment as the associated inflection point.
[0111] One approach is to calculate the slope of the line segment before and after the inflection point, and then indirectly calculate the slope of the angle bisector of the line segment before and after the inflection point. The slope of the angle bisector is then compared with the slope of the target line segment to determine whether the angle bisector is perpendicular to the target line segment. If they are perpendicular, the corresponding inflection point is taken as the associated inflection point.
[0112] In the embodiments of this application, please refer to Figure 11 This is a flowchart illustrating the process of detecting whether an associated inflection point intersects with a detection line segment. The steps for detecting whether a detection line segment, intercepted by the lines containing the preceding and following line segments of the target line segment, intersects the associated inflection point include:
[0113] S41: Obtain the detected line segment that is intercepted by the line segment before and after the target line segment when the line passing through each associated inflection point and the perpendicular bisector of the angle is intercepted by the line segment before and after the target line segment.
[0114] Since the angle bisectors of the line segments before and after the associated inflection point are perpendicular to the target line segment, the slope of the line passing through each associated inflection point and perpendicular to the angle bisector will not be the same as the slope of the line containing ...
[0115] like Figure 5 As shown, the detection line segment J2 is the part between the intersection points of the line passing through the associated inflection point Z4 and the perpendicular angle bisector and the lines containing the preceding and following line segments H1 and H2 of the target line segment H.
[0116] S42: Check in sequence whether the slope of each line segment exists.
[0117] In the coordinate system of the circuit layout, if the slope of the detection line segment is parallel to the Y-axis, then the slope of the detection line segment does not exist.
[0118] S43: When the slope does not exist, project the current detected line segment and the corresponding associated inflection point along the normal direction onto the Y-axis of the reference coordinate system; and when the slope exists, project the current detected line segment and the corresponding associated inflection point along the normal direction onto the X-axis of the reference coordinate system.
[0119] If the slope of the currently detected line segment is absent, it means that the current detected line segment is parallel to the Y-axis. Therefore, the current detected line segment and its corresponding associated inflection point are projected along the normal direction onto the Y-axis of the reference coordinate system. If the slope of the current detected line segment exists, it means that the current detected line segment is parallel to the X-axis or is not parallel to either the Y-axis or the X-axis. Therefore, the current detected line segment and its corresponding associated inflection point are projected along the normal direction onto the X-axis of the reference coordinate system.
[0120] like Figure 12 The diagram shows the projection of the detection line segment and associated inflection point onto the Y-axis. The detection line segment J is parallel to the Y-axis; therefore, the detection line segment J and associated inflection point Z are projected onto the Y-axis along the normal direction.
[0121] like Figure 13 The diagram shown is a schematic representation of the projection of the detection line segment and its associated inflection point onto the X-axis. The detection line segment J is not parallel to either the Y-axis or the X-axis. The detection line segment J and its associated inflection point Z are projected onto the X-axis along the normal direction.
[0122] S44: Determine whether the projection of the currently detected line segment and the corresponding associated inflection point on the X-axis or Y-axis coincides.
[0123] The detection order of the detection line segments can be in ascending order of the distance between the detection line segments and the target line segment. That is, the detection line segment with the smaller distance from the target line segment is detected first.
[0124] S45: If they coincide, then the current detected line segment intersects with the corresponding associated inflection point.
[0125] Specifically, if the projection of the detected line segment coincides with that of the associated inflection point, it indicates that the two intersect. This detection method avoids misjudging that the detected line segment and the associated inflection point do not intersect due to coordinate calculation errors that may result in the line segment and the associated inflection point not being strictly on the same straight line.
[0126] In some embodiments of this application, the movement of the target line segment needs to take into account the intersection of the straight lines containing the preceding and following line segments. Specifically, please refer to [link to relevant documentation]. Figure 14This is a schematic diagram of the movement process of the target line segment and the pushing inflection point. If the intersection of the endpoint of the movement with the extension of the line segments before and after the target line segment is on the same side of the target line segment, and the perpendicular distance from the endpoint of the movement to the target line segment is not greater than the perpendicular distance from the intersection of the line segments before and after the target line segment to the target line segment; or if the intersection of the endpoint of the movement with the line segments before and after the target line segment is located on both sides of the target line segment; or if the line segments before and after the target line segment do not intersect;
[0127] The steps of keeping the slope and connection relationship of the target line segment and the line segments before and after the pushing inflection point unchanged, moving the target line segment towards the endpoint in the normal direction, and simultaneously moving the pushing inflection point, i.e., step S5, include:
[0128] S51A: Keep the slope and connection relationship of the line segments before and after the pushing fold point unchanged, move the pushing fold point towards the moving endpoint on the angle bisector until it crosses the moving endpoint and is separated from the moving endpoint by a preset line distance.
[0129] During the movement of the pushing fold point towards the endpoint along the angle bisector, since the slope and connection relationship of the line segments before and after the pushing fold point remain unchanged, the length of the line segments before and after the pushing fold point will increase as the pushing fold point moves. Furthermore, the pushing fold point will change from a point to a line segment, so the length of the newly generated line segment will increase until the pushing fold point moves past the endpoint and is separated from the endpoint by a preset line distance, at which point the movement ends.
[0130] like Figure 15 The diagram shows the pushing inflection point Z moving past its endpoint and at a preset line distance from the endpoint. The left side of the diagram shows the pushing inflection point Z before it moves, and the right side shows the pushing inflection point Z after it moves. Once the pushing inflection point Z starts moving, it will become line segment G, and the length of the moving segment will gradually increase until it moves past its endpoint P and at a preset line distance d from the endpoint P, at which point the movement ends.
[0131] S52A: Keeping the slope and connection relationship of the preceding and following line segments of the target line segment unchanged, move the target line segment toward the endpoint in the normal direction until it is collinear with the endpoint.
[0132] As the target line segment moves toward the endpoint, the slope and connection relationship of the line segments before and after the target line segment remain unchanged. Therefore, the length of the line segments before and after the target line segment will decrease or the side length will increase as the target line segment moves. Furthermore, since the two endpoints of the target line segment will change position with the line segments before and after the target line segment, the length of the target line segment will also decrease or increase.
[0133] Since the intersection of the lines containing the target line segment and the line segment before and after it is farther away from the target line segment than the target line segment at the end point of movement, even if the target line segment moves to the point where it is collinear with the end point of movement, its length will not become zero, although it will become shorter. Therefore, when the target line segment moves to the point where it is collinear with the end point of movement, it is still a line segment, but at this time the target line segment ends its movement.
[0134] like Figure 16 The diagram shown illustrates the point where the target line segment moves to the point where it is collinear with the endpoint of the movement. Figure 15 The left side of the diagram shows the target line segment H before it moves, and the right side shows the target line segment H after it moves. When the target line segment H moves to a point where it is collinear with the endpoint P, and is separated from the line segment G generated by the pushing inflection point Z by a preset line distance d, the length of the target line segment H becomes shorter, but does not become zero.
[0135] In other embodiments of this application, please refer to Figure 17 This is a schematic diagram of the movement process in another application scenario of the target line segment and the pushing inflection point. If the intersection of the moving endpoint and the straight line containing the preceding and following line segments of the target line segment is on the same side of the target line segment, and the perpendicular distance from the moving endpoint to the target line segment is greater than the perpendicular distance from the intersection of the preceding and following line segments of the target line segment to the target line segment;
[0136] Maintaining the slopes and connectivity of the target line segment and the line segments before and after the pushing inflection point unchanged, the steps of moving the target line segment towards the endpoint in the normal direction and simultaneously moving the pushing inflection point include:
[0137] S51B: Keep the slope and connection relationship of the line segments before and after the pushing fold point unchanged, move the pushing fold point towards the moving endpoint on the angle bisector until it crosses the intersection point and is separated from the intersection point by a preset line distance.
[0138] During the movement of the pushing inflection point towards the endpoint along the angle bisector, since the slope and connection relationship of the line segments before and after the pushing inflection point remain unchanged, the length of the line segments before and after the pushing inflection point will increase as the pushing inflection point moves. Furthermore, the pushing inflection point will change from a point to a line segment, so the length of the newly generated line segment will increase. The movement ends when the pushing inflection point moves to the intersection of the lines containing the line segments before and after the target line segment and is separated from the intersection point by a preset line distance.
[0139] like Figure 18 The diagram shows the pushing inflection point Z moving until it crosses the intersection point and is separated from the intersection point by a preset line distance. The left side of the diagram is the diagram before the pushing inflection point Z moves, and the right side is the diagram after the pushing inflection point Z moves. Once the pushing inflection point Z starts moving, it will become a line segment G, and the length of the moving segment will gradually increase until it moves to cross the intersection point K and is separated from the intersection point K by a preset line distance d, at which point the movement ends.
[0140] S52B: Keeping the slope and connection relationship of the preceding and following line segments of the target line segment unchanged, move the target line segment toward the endpoint in the normal direction until the target line segment becomes an intersection point.
[0141] During the movement of the target line segment toward the endpoint, the slope and connection relationship of the line segments before and after the target line segment remain unchanged. Therefore, the length of the line segments before and after the target line segment will increase as the target line segment moves. However, since the positions of the two endpoints of the target line segment will change with the line segments before and after the target line segment, the length of the target line segment will decrease until the target line segment moves to the intersection point, at which point the movement ends.
[0142] like Figure 19 The diagram shown illustrates the point where the target line segment moves to become an intersection, and is combined with... Figure 18 The left side of the diagram shows the target line segment H before it moves, and the right side shows the target line segment H after it moves. When the target line segment H moves to become the intersection point K, it is separated from the line segment G generated by the pushing inflection point Z by a preset line distance d.
[0143] Please refer to Figure 20 Another embodiment of the present invention also provides a circuit layout routing adjustment device, the device comprising:
[0144] The acquisition module 11 is used to acquire the target line segment located in the middle of the circuit layout trace and its moving endpoint.
[0145] The building module 12 is used to construct a search rectangle that surrounds the two endpoints of the moving endpoint and the target line segment along a preset direction.
[0146] The search module 13 is used to find, within the search rectangle, a vertex that belongs to other lines, whose included angles are opposite to the target line segment, whose angle bisectors are perpendicular to the target line segment, and whose endpoint is on the same side of the target line segment as the associated vertex.
[0147] The detection module 14 is used to detect whether the detection line segment intercepted by the line segment before and after the target line segment, which is the line segment passing through each associated inflection point and the perpendicular angle bisector, intersects with the associated inflection point, and takes the associated inflection point that intersects as the pushing inflection point.
[0148] The adjustment module 15 is used to keep the slope and connection relationship of the target line segment and the push-up turning point unchanged, move the target line segment toward the moving endpoint in the normal direction, and move the push-up turning point synchronously.
[0149] The circuit layout adjustment device of this embodiment may also include other technical features of the circuit layout adjustment method of the foregoing embodiment, implement all the steps of the circuit layout adjustment method of the foregoing embodiment, and have the same technical effect as the circuit layout adjustment method of the foregoing embodiment, which will not be repeated here.
[0150] The present invention also provides a storage medium storing a computer program, which is configured to execute the circuit layout and routing adjustment method of the foregoing embodiments when running.
[0151] Specifically, in this embodiment, the storage medium may include, but is not limited to, USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks, and other media capable of storing computer programs.
[0152] The present invention also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the circuit layout and routing adjustment method of the foregoing embodiments.
[0153] Specifically, the memory and processor can be connected via a data bus. Furthermore, the aforementioned electronic device may also include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0154] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," or "specific example," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments. In addition, those skilled in the art can combine and integrate the different embodiments or examples described in this specification.
[0155] The above are merely preferred embodiments of the present invention and do not constitute any limitation on the present invention. Any equivalent substitutions or modifications made by those skilled in the art to the technical solutions and content disclosed in the present invention without departing from the scope of the present invention shall be deemed to have remained within the protection scope of the present invention.
Claims
1. A method for adjusting the routing layout of a circuit diagram, characterized in that, include: Obtain the target line segment located in the middle of the circuit layout trace and its endpoint; Construct a search rectangle along a preset direction that surrounds the endpoint of the movement and the two endpoints of the target line segment; Within the search rectangle, find the inflection point that belongs to other lines, whose included angle is away from the target line segment, whose angle bisector is perpendicular to the target line segment, and whose moving endpoint is on the same side of the target line segment, as the associated inflection point; The detection line segment intercepted by the line segment before and after the target line segment, which passes through each of the associated inflection points and is perpendicular to the angle bisector, intersects with the associated inflection point. The associated inflection points that intersect are taken as the pushing inflection points. Keeping the slope and connection relationship of the target line segment and the line segment before and after the pushing inflection point unchanged, move the target line segment toward the moving endpoint in the normal direction, and move the pushing inflection point simultaneously.
2. The method according to claim 1, characterized in that, The acquisition of the target line segment located in the middle of the circuit layout trace and its moving endpoint includes: In response to the selection command, the current line segment located in the middle of the circuit layout trace is selected as the target line segment; The mouse position point is acquired in real time and used as the endpoint of the movement of the target line segment.
3. The method according to claim 1, characterized in that, The construction of a search rectangle along a preset direction, enclosing the endpoint of the movement and the two endpoints of the target line segment, includes: Path points are set at preset distances from both ends of the target line segment on the straight line where the target line segment is located; Select the minimum x-coordinate, minimum y-coordinate, maximum x-coordinate, and maximum y-coordinate of the endpoint and the two path points; Construct a search rectangle along a preset direction, with the minimum horizontal coordinate and the minimum vertical coordinate as one vertex and the maximum horizontal coordinate and the maximum vertical coordinate as another diagonal vertex.
4. The method according to claim 1, characterized in that, The step of finding a vertex within the search rectangle that belongs to other lines, has an included angle between its preceding and following segments pointing away from the target line segment, has its angle bisector perpendicular to the target line segment, and is located on the same side of the target line segment as the endpoint of the movement, includes: The inflection points belonging to other routes that are located within the search rectangle are used as the first filtering inflection points; Select the inflection point from the first filtering inflection point where the angle between the preceding and following line segments is away from the target line segment as the second filtering inflection point; Select the third filtering inflection point from the second filtering inflection points that is on the same side of the target line segment as the moving endpoint; From the third selection of inflection points, select the inflection point where the angle bisector of the preceding and following line segments is perpendicular to the target line segment as the associated inflection point.
5. The method according to claim 1, characterized in that, The detection of whether the line segment intercepted by the line containing the preceding and following line segments of the target line segment, which passes through each of the associated inflection points and is perpendicular to the angle bisector, intersects the associated inflection point includes: Obtain the detection line segment intercepted by the line containing the line segment before and after the target line segment, which is a straight line passing through each of the associated inflection points and perpendicular to the angle bisector. The slope of each of the tested line segments is checked sequentially. When the slope does not exist, the current detection line segment and the corresponding associated inflection point are projected along the normal direction onto the Y-axis of the reference coordinate system; and when the slope exists, the current detection line segment and the corresponding associated inflection point are projected along the normal direction onto the X-axis of the reference coordinate system. Determine whether the projection of the currently detected line segment and the corresponding associated inflection point on the X-axis or Y-axis coincides; If they coincide, it is confirmed that the currently detected line segment intersects with the corresponding associated inflection point.
6. The method according to claim 5, characterized in that, The detection order of the detection line segments is in ascending order of the distance between the detection line segment and the target line segment.
7. The method according to claim 1, characterized in that, The intersection of the moving endpoint and the straight line containing the preceding and following segments of the target line segment is located on the same side of the target line segment, and the perpendicular distance from the moving endpoint to the target line segment is not greater than the perpendicular distance from the intersection of the preceding and following segments of the target line segment to the target line segment; or the intersection of the moving endpoint and the straight line containing the preceding and following segments of the target line segment is located on both sides of the target line segment; or the straight line containing the preceding and following segments of the target line segment does not have an intersection. Maintaining the slope and connection relationship of the target line segment and the line segment before and after the pushing inflection point unchanged, moving the target line segment in the normal direction toward the moving endpoint, and simultaneously moving the pushing inflection point, includes: Keeping the slope and connection relationship of the line segments before and after the pushing fold point unchanged, move the pushing fold point toward the moving endpoint on the angle bisector until it crosses the moving endpoint and is separated from the moving endpoint by a preset line distance. Keeping the slope and connection relationship of the preceding and following line segments of the target line segment unchanged, move the target line segment toward the moving endpoint in the normal direction until it is collinear with the moving endpoint.
8. The method according to claim 1, characterized in that, The intersection of the moving endpoint and the straight line containing the preceding and following segments of the target line segment is located on the same side of the target line segment, and the perpendicular distance from the moving endpoint to the target line segment is greater than the perpendicular distance from the intersection of the preceding and following segments of the target line segment to the target line segment. Maintaining the slope and connection relationship of the target line segment and the line segment before and after the pushing inflection point unchanged, moving the target line segment in the normal direction toward the moving endpoint, and simultaneously moving the pushing inflection point, includes: Keeping the slope and connection relationship of the line segments before and after the pushing fold point unchanged, move the pushing fold point toward the moving endpoint on the angle bisector until it crosses the intersection point and is separated from the intersection point by a preset line distance. Keeping the slope and connection relationship of the preceding and following line segments of the target line segment unchanged, move the target line segment toward the endpoint in the normal direction until the target line segment becomes the intersection point.
9. A circuit layout routing adjustment device, characterized in that, include: The acquisition module is used to acquire the target line segment located in the middle of the circuit layout trace and its moving endpoint; A construction module is used to construct a search rectangle that surrounds the two endpoints of the moving endpoint and the target line segment along a preset direction; The search module is used to find, within the search rectangle, a vertex that belongs to other lines, whose included angles of the preceding and following line segments are opposite to the target line segment, whose angle bisectors of the preceding and following line segments are perpendicular to the target line segment, and whose moving endpoint is located on the same side of the target line segment, as an associated vertex. The detection module is used to detect whether the detection line segment intercepted by the line segment before and after the target line segment and its extension, which passes through each of the associated inflection points and is perpendicular to the angle bisector, intersects with the associated inflection point, and takes the associated inflection point that intersects as the pushing inflection point; The adjustment module is used to keep the slope and connection relationship of the target line segment and the line segment before and after the pushing inflection point unchanged, move the target line segment toward the moving endpoint in the normal direction, and move the pushing inflection point synchronously.
10. A storage medium, characterized in that, The storage medium stores a computer program, which is configured to execute the circuit layout and routing adjustment method according to any one of claims 1 to 8 when it runs.
11. An electronic device, characterized in that, The device includes a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the circuit layout routing adjustment method according to any one of claims 1 to 8.