Impedance line automatic adjustment method, device and medium
By automatically identifying and adjusting the impedance line spacing using vector operations, the problems of low efficiency and insufficient accuracy in existing technologies have been solved. This enables efficient and precise impedance line spacing adjustment, adapting to multiple scenario constraints and spatial safety verification, thereby improving production efficiency and product consistency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENZHEN PARTNER INFORMATION TECH
- Filing Date
- 2026-02-26
- Publication Date
- 2026-06-02
AI Technical Summary
In existing technologies, adjusting the impedance line spacing relies on manual operation, which is inefficient and easily influenced by experience, making it difficult to guarantee accuracy and consistency. It also fails to effectively avoid spatial interference and adapt to multiple scenario constraints in large-scale production.
By identifying impedance lines, acquiring spatial constraint data, using vector operations to determine positional relationships, calculating movement compensation amounts, and controlling line movement to optimize layout, an integrated spatial constraint acquisition and analysis mechanism enables automated adjustments.
It improves the efficiency and accuracy of impedance line adjustment, ensures product consistency, avoids line interference, adapts to diverse layout scenarios, and enhances production efficiency and product yield.
Smart Images

Figure CN122133581A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of impedance line design technology, and in particular to an automatic impedance line adjustment method, device and medium. Background Technology
[0002] With the rapid development of 5G communications, automotive electronics, and radio frequency equipment, printed circuit board (PCB) design is increasingly evolving towards higher density, finer lines, and higher speeds. Correspondingly, complex impedance structures such as differential impedance lines are becoming more prevalent, and the increased signal transmission rate places more stringent demands on impedance matching accuracy. Impedance line spacing is a key parameter determining impedance value and signal integrity; deviations in this spacing will directly cause signal reflection or crosstalk, thus affecting overall system performance.
[0003] In existing technologies, impedance line spacing adjustment mainly relies on manual labor. Engineers need to manually identify the target line, measure the spacing, determine the relative position, and calculate the movement parameters. The entire process is inefficient and easily influenced by experience, making it difficult to guarantee the adjustment accuracy and product consistency.
[0004] While some auxiliary tools can perform impedance calculations, they cannot automatically adjust the physical position in conjunction with the circuit, and generally lack effective verification of spatial constraints such as copper foil and traces around the circuit, making them prone to interference during movement. Furthermore, existing methods cannot dynamically adapt to target spacing based on actual process parameters, thus limiting their application in large-scale, high-precision production scenarios. In summary, existing technologies struggle to simultaneously ensure adjustment efficiency and accuracy while also considering spatial safety verification and flexible adaptation to multiple scenarios. Summary of the Invention
[0005] This invention provides an automatic impedance line adjustment method, device, and medium. The technical problem it aims to solve is: how to provide an automated solution that can efficiently, accurately, and adaptively adjust the spacing of PCB impedance lines, while effectively avoiding spatial interference and adapting to constraints in multiple scenarios.
[0006] In a first aspect, embodiments of the present invention provide an automatic impedance line adjustment method, comprising: The two input target lines are identified to determine whether they are impedance lines. If the two target lines are impedance lines, obtain the spatial constraint data of the two impedance lines on the circuit board plane. The spatial constraint data includes the current spacing between the impedance lines and surrounding elements and the preset minimum safe spacing. Based on the geometric coordinates of the two impedance lines, the relative positional relationship between the two impedance lines is determined through vector operations, thereby identifying the upper and lower lines of the two impedance lines. Based on the relative positional relationship, the outer spatial constraints of the upper edge and the outer spatial constraints of the lower edge are extracted from the spatial constraint data. Based on the outer space constraints of the upper and lower edges, the available outer space for movement of the upper and lower edges is determined. Calculate the current actual distance between the two impedance lines, and calculate the target distance based on the preset impedance model parameters, thereby determining the amount of movement compensation required to make the current actual distance reach the target distance. Based on the available space outside the upper and lower edges that can be moved and the movement compensation amount, determine the movement direction and movement distance of the upper edge and / or the lower edge, and control the upper edge and / or the lower edge to move accordingly; After the upper and / or lower lines have been moved, the line graphic is processed by merging adjacent line segments and deleting redundant line segments to optimize the line layout.
[0007] Optionally, the identification of the two input target lines includes: Check whether the two target lines have predefined impedance markings; If the two target lines do not have the impedance markings, then the parallelism, line width, and whether they belong to the same differential pair attributes of the two target lines are comprehensively scored. When the overall score exceeds a set threshold, the two target lines are determined to be impedance lines.
[0008] Optionally, determining the relative positional relationship between the two impedance lines through vector operations includes: Calculate the coordinates of the midpoints of the two impedance lines respectively; Construct the direction vectors of the two impedance lines themselves and the connection direction vectors connecting the midpoints of the two impedance lines respectively. The cross product of the directional vector and the connection direction vector is calculated, and the upper and lower positions of the two impedance lines are determined based on the positive or negative sign of the cross product value.
[0009] Optionally, determining the available outer space for movement of the upper and lower edges based on the outer spatial constraints of the upper and lower edges includes: For either the upper edge or the lower edge, perform the following steps: When the outer space constraint indicates the existence of surrounding elements, the current distance between the upper edge or the lower edge and the surrounding elements and the corresponding minimum safe distance are obtained based on the space constraint data; the difference between the current distance and the minimum safe distance is calculated to obtain the available outer space. If the outer space constraint indicates that there are no surrounding elements, then the outer available space is set to a predetermined value that indicates sufficient space.
[0010] Optionally, calculating the target spacing based on preset impedance model parameters includes: According to the formula: L_target = k × √(ε) r The target spacing is calculated using the formula (L_target) ×H / W, where L_target represents the target spacing, k is the process correction factor, and ε is the process correction factor. r H is the dielectric constant, H is the dielectric thickness, and W is the linewidth.
[0011] Optionally, determining the movement direction and distance of the upper edge and / or the lower edge based on the available outer space for movement of the upper edge and the lower edge and the movement compensation amount, and controlling the upper edge and / or the lower edge to move accordingly, includes: If the available space outside the upper edge line is greater than the movement compensation amount, then the upper edge line is controlled to move along its outer direction, and the moving distance is equal to the movement compensation amount; If the available space outside the lower edge is greater than the movement compensation amount, then the lower edge is controlled to move along its outer direction, and the moving distance is equal to the movement compensation amount. If the available space outside both the upper and lower edges is greater than the movement compensation amount, then the upper and lower edges are controlled to move in opposite directions along their respective outer directions, with the single-sided movement distance being half of the movement compensation amount; If the available space outside the upper edge and the lower edge are both less than or equal to the movement compensation amount, and the sum of the available space outside the upper edge and the lower edge is greater than or equal to the movement compensation amount, then the upper edge and the lower edge are controlled to move in opposite directions along their respective outer directions, while ensuring that the sum of the moving distances of the upper edge and the lower edge is the movement compensation amount, and that both the upper edge and the lower edge exceed the corresponding available space outside. If the sum of the available space outside the upper edge and the lower edge is less than the movement compensation amount, the movement operation is stopped.
[0012] Optionally, the operation of merging adjacent line segments and deleting redundant line segments on the line graph to optimize the line layout includes: Configure the execution parameters for merging line segments, including the target layer range; Traverse the layers within the target layer range and collect line segment data from each layer; A line tree network structure is constructed based on the collected line segment data, and single-channel lines in the line tree network structure are selected. Based on the direction and aperture attributes of the line segments, the line segments in the selected single-channel lines are grouped. For line segments within the same group, determine whether they meet preset merging conditions; the merging conditions include a directional deviation threshold, an aperture error threshold, and a line segment length threshold; If the merging conditions are met, the endpoints of the line segments within the group are fitted to generate a new merged line segment to replace the original line segments within the group.
[0013] Optionally, after optimizing the route layout, the following may also be included: Construct a tree network structure model of the moved routes; The tree network structure model is traversed and verified to ensure the integrity and continuity of all electrical connections in the tree network structure model.
[0014] Secondly, embodiments of the present invention also provide a computer device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the above-described method.
[0015] Thirdly, embodiments of the present invention also provide a computer-readable storage medium storing a computer program that, when executed by a processor, can implement the above-described method.
[0016] This invention provides an automatic impedance line adjustment method, device, and medium. The method includes: identifying two input target lines to determine if they are impedance lines; if the two target lines are impedance lines, acquiring spatial constraint data of the two impedance lines on a circuit board plane, the spatial constraint data including the current spacing between the impedance lines and surrounding elements and a preset minimum safety spacing; determining the relative positional relationship between the two impedance lines through vector operations based on their geometric coordinates, thereby identifying the upper and lower edge lines; extracting the outer spatial constraints of the upper edge line and the lower edge line from the spatial constraint data based on the relative positional relationship; and based on the upper edge line and the... The invention addresses the spatial constraints on the outer side of the lower edge line, determining the available outer space for the upper and lower edge lines to move. It calculates the current actual distance between the two impedance lines and, based on preset impedance model parameters, calculates the target distance, thus determining the required movement compensation to achieve the target distance. Based on the available outer space for the upper and lower edge lines and the movement compensation, it determines the movement direction and distance of the upper and / or lower edge lines, and controls their corresponding movement. After the upper and / or lower edge lines have moved, it merges adjacent line segments and deletes redundant segments to optimize the line layout. This invention integrates line identification, spatial analysis, position determination, parameter calculation, strategy decision-making, and graphic adjustment into a coherent software execution sequence, replacing time-consuming and error-prone manual intervention, thereby improving processing efficiency to a level suitable for large-scale production. Calculations based on precise coordinate data, vector operations, and physical models eliminate subjective errors from human experience, ensuring consistency and high accuracy in impedance spacing adjustment results. An integrated spatial constraint acquisition and analysis mechanism can pre-assess and ensure that operations comply with safety design rules before movement, preventing line interference. For diverse layout scenarios, by quantifying the available space on the outside and combining it with dynamically calculated adjustment needs, the method intelligently selects differentiated movement strategies, enhancing its adaptability and feasibility under different design densities and complexities.
[0017] Compared to traditional manual methods, this method can significantly shorten the impedance line adjustment time of a single high-density printed circuit board and greatly improve the adjustment efficiency. Through automated calculation and movement, the impedance consistency error can be controlled within a small range (e.g., within ±5%), effectively improving product yield and consistency. Attached Figure Description
[0018] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 A flowchart illustrating an automatic impedance line adjustment method provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of the state of the impedance line before processing, provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of strikethrough and merge operations provided in an embodiment of the present invention; Figure 4 This is a schematic diagram of the state of the impedance line after processing, provided in an embodiment of the present invention. Figure 5 This is a flowchart illustrating the automatic impedance line adjustment process provided in an embodiment of the present invention. Figure 6 This is a flowchart for deleting lines with a length of 0 and the same start and end points, provided in an embodiment of the present invention. Figure 7 A flowchart of the merging line operation provided in an embodiment of the present invention; Figure 8 A flowchart of the impedance line determination process provided in this embodiment of the invention; Figure 9 This is a flowchart of the impedance line movement operation provided in an embodiment of the present invention; Figure 10 This is a schematic block diagram of a computer device provided in an embodiment of the present invention. Detailed Implementation
[0020] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0021] It should be understood that, when used in this specification and the appended claims, the terms "comprising" and "including" indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.
[0022] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.
[0023] It should also be further understood that the term "and / or" as used in this specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0024] As used in this specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if [described condition or event] is detected" may be interpreted, depending on the context, as "once determined," "in response to determination," "once [described condition or event] is detected," or "in response to detection of [described condition or event]."
[0025] Please see Figure 1 This invention provides an automatic impedance line adjustment method, which includes the following steps: S1, identify the two target lines input to determine whether the two target lines are impedance lines.
[0026] In practice, the system first receives basic data for two target lines input by the user. This basic data includes the line's start-point coordinates, end-point coordinates, line width, layer, and electrical attributes. The system reads this basic data and checks whether the target line object contains a predefined impedance identifier. If the impedance identifier exists, the target line is determined to be an impedance line; if not, the parallelism of the two lines is further calculated, their line width is determined to be within the typical impedance line width range, and they are checked to see if they belong to the same differential pair network. A weighted score is performed based on these characteristics, and the target line is determined to be an impedance line when the score exceeds a set threshold.
[0027] For example, in some preferred embodiments, the identification of the two input target lines includes: checking whether the two target lines have a predefined impedance label; if the two target lines do not have the impedance label, then comprehensively scoring the parallelism, line width, whether they meet a preset range, and whether they belong to the same differential pair attributes of the two target lines; when the comprehensive score exceeds a set threshold, the two target lines are determined to be impedance lines.
[0028] In practice, the identification process for the target lines is implemented as follows: The system first reads the attribute lists of the two input line objects, searches for the existence of a predefined attribute label named "Impedance" or similar, or checks whether the network name or component reference identifier contains keywords related to impedance. If both lines are explicitly marked with this impedance identifier, the system directly confirms them as target impedance lines and records the determination result.
[0029] Furthermore, if no explicit impedance identifier is found in the line attributes, the system initiates an auxiliary judgment process based on line characteristics. The system retrieves the geometric data of the two lines from the graphics engine, calculates their direction vectors, and evaluates their parallelism by operating on the dot product and magnitude of the vectors, outputting a numerical value representing the degree of parallelism. Simultaneously, the system reads the line width attribute value and determines whether it falls within a preset typical impedance linewidth range, such as between the minimum and maximum linewidth thresholds. Additionally, the system queries the circuit's netlist or topology to check whether the two lines are connected to the same differential pair signal network or whether they are marked as the positive and negative terminals of a differential pair.
[0030] Furthermore, the system assigns preset weighting coefficients to the parallelism evaluation value, the linewidth compliance Boolean result, and the differential pair correlation Boolean result. These weighted scores are summed to obtain a comprehensive score for the pair of lines. In this embodiment of the invention, a scoring threshold is set. When the calculated comprehensive score is greater than or equal to the scoring threshold, the system determines that the two target lines are impedance lines requiring adjustment; otherwise, it determines that the two target lines are not impedance lines requiring adjustment.
[0031] This embodiment enhances the coverage and fault tolerance of impedance line determination by combining explicit label inspection and implicit feature scoring. For data from standard designs, direct label identification ensures speed and accuracy in determination; for data with incomplete labels or from different design standards, reliable inferences are made by analyzing physical and electrical characteristics closely related to impedance line function, such as line width, parallelism, and differential pair attributes. This dual mechanism reduces the absolute dependence on the completeness of the original design data, enabling the automatic adjustment method to adapt to a wider range of design document sources and diverse design habits, thus improving the method's versatility and practicality.
[0032] S2, if the two target lines are impedance lines, obtain the spatial constraint data of the two impedance lines on the circuit board plane. The spatial constraint data includes the current spacing between the impedance lines and surrounding elements and the preset minimum safe spacing.
[0033] In practice, after identifying the target impedance lines, the system reads the printed circuit board design database to obtain the spatial information of these two target lines on the plane. Using each line segment as a reference, the system searches for other design elements within a certain range to the left and right along its normal direction, including but not limited to other lines, pads, and copper traces. For each found surrounding element, the system calculates the shortest distance between it and the target impedance line, records it as the current spacing, and stores it together with the minimum safe spacing values pre-set for different types of elements, forming structured spatial constraint data.
[0034] S3. Based on the geometric coordinates of the two impedance lines, the relative positional relationship between the two impedance lines is determined through vector operations, thereby identifying the upper and lower edge lines of the two impedance lines.
[0035] In practice, the system processes the geometric coordinates of the two impedance lines. The system calculates the midpoint coordinates of each line segment. Then, based on the start and end coordinates, the system calculates the direction vector of each line segment and the vector connecting the two midpoints. The system calculates the cross product of the direction vector and the vector connecting the midpoints, and based on the sign of the cross product, automatically determines the vertical relationship between the two line segments on the two-dimensional plane, thus explicitly specifying the upper and lower boundaries.
[0036] For example, in some preferred embodiments, determining the relative positional relationship between the two impedance lines through vector operations includes: calculating the midpoint coordinates of the two impedance lines respectively; constructing the direction vectors of the two impedance lines themselves and the connecting direction vectors connecting the midpoints of the two impedance lines respectively; and determining the upper and lower positions of the two impedance lines based on the positive or negative sign of the cross product value of the direction vector and the connecting direction vector.
[0037] In practice, the system calculates the coordinates of the midpoints of the two impedance lines L1 and L2, denoted as M1 and M2 respectively. The vector W connecting M1 and M2 is then calculated as W = M2 - M1.
[0038] Furthermore, calculate the direction vectors V1 and V2 of the two impedance lines respectively. The direction vectors can be obtained by subtracting the starting point coordinates from the end point coordinates of the line segment.
[0039] Furthermore, to determine the top-bottom relationship, the system calculates the vector cross product. The cross product value Z of V1 and W is calculated. According to the rules of the right-hand coordinate system or a preset coordinate system, if Z > 0, then vector V1 is determined to be counterclockwise relative to W. Based on geometric interpretation, L1 can be defined as the top edge and L2 as the bottom edge. If Z < 0, then L1 is determined to be the bottom edge and L2 as the top edge. The system records this determination result as a status identifier.
[0040] This embodiment uses the pure mathematical vector cross product method to determine positional relationships, achieving complete objectivity and precision in the determination process.
[0041] S4. Based on the relative positional relationship, extract the outer spatial constraints of the upper edge and the outer spatial constraints of the lower edge from the spatial constraint data.
[0042] In practice, the system indexes and extracts key parts from the above spatial constraint data: namely, the outer spatial constraint data of the upper boundary line and the outer spatial constraint data of the lower boundary line.
[0043] S5. Based on the outer space constraints of the upper and lower edges, determine the available outer space of the upper and lower edges that can be used for movement.
[0044] In practice, for each side, if there are surrounding elements, the available space on the outside is calculated, and its value is the current spacing minus the minimum safe spacing; if there are no surrounding elements, the available space on the outside is set to a predetermined value that represents sufficient space.
[0045] When acquiring spatial constraint data, the system organizes the information of surrounding elements, current spacing and minimum safe spacing on each side of each target impedance line into structured spatial constraint data entries for storage and management, providing a data foundation for subsequent spatial adequacy analysis.
[0046] For example, in some preferred embodiments, determining the available outer space for movement of the upper and lower edges based on the outer space constraints of the upper and lower edges includes: for either the upper or lower edge, performing the following steps: when the outer space constraint indicates the presence of surrounding elements, obtaining the current distance between the upper or lower edge and the surrounding elements and the corresponding minimum safe distance based on the space constraint data; calculating the difference between the current distance and the minimum safe distance to obtain the available outer space; if the outer space constraint indicates the absence of surrounding elements, setting the available outer space to a predetermined value indicating sufficient space.
[0047] In practice, the specific method for determining the available space outside the top and bottom edges is as follows: Based on the identified vertical positional relationship, the system locates the relevant spatial constraint data records. For the top edge, the system retrieves its outer spatial constraint records; for the bottom edge, the system retrieves its outer spatial constraint records.
[0048] For each such outer space constraint record, the system reads a flag indicating the presence of any surrounding elements on that side. If the flag indicates the presence of surrounding elements, the system further reads two values from the record: the current spacing D and the minimum safe spacing T. The system then performs an arithmetic operation: calculating the available outer space S = D - T. The result S is a specific length value representing the maximum permissible distance the impedance line can move to that side while meeting design safety rules.
[0049] If the flag indicates that no surrounding elements exist, the system does not perform the aforementioned subtraction operation. Instead, the system assigns a predefined, predetermined value representing sufficient space to the outer available space S. This predetermined value can be a very large positive number or a special system constant. In subsequent logical processing, this predetermined value is interpreted as meaning that movement on that side is unrestricted.
[0050] This invention provides crucial and reliable numerical data for movement decisions by quantifying the outer space in different scenarios. By calculating the difference between the current distance and the safe distance when surrounding elements are present, this method not only quantifies the physical distance but also incorporates design rule checks, ensuring that the obtained usable space is a safe operating range that meets manufacturability requirements. Assigning a predetermined value representing sufficiency when there are no surrounding elements simplifies the data processing flow and clearly conveys accessibility information.
[0051] S6, calculate the current actual distance between the two impedance lines, and calculate the target distance based on the preset impedance model parameters, and then determine the amount of movement compensation required to make the current actual distance reach the target distance.
[0052] In practice, the system calculates the spacing. It uses the Euclidean distance formula to calculate the current actual spacing between the two impedance lines. Simultaneously, the system acquires or receives preset impedance model parameters, including the dielectric constant ε. r The parameters are: medium thickness H, line width W, and process correction factor k, and the target spacing is calculated. Furthermore, the movement compensation is the difference between the target spacing and the current actual spacing.
[0053] In some preferred embodiments, calculating the target spacing based on preset impedance model parameters includes: using the formula: L_target=k×√(ε r The target spacing is calculated using the formula (L_target) ×H / W, where L_target represents the target spacing, k is the process correction factor, and ε is the process correction factor. r H is the dielectric constant, H is the dielectric thickness, and W is the linewidth.
[0054] In practice, the target spacing is calculated based on a specific transmission line model formula. The system first accesses a database or configuration file storing process and design parameters to obtain the parameter values required for the calculation. These parameters include: dielectric constant ε. r It reflects the dielectric properties of the insulating material; the dielectric thickness H is the thickness of the insulating medium between the two conductive layers; the linewidth W is the design width value of the impedance conductor.
[0055] Furthermore, the system reads or receives a process correction coefficient k. This coefficient is used to calibrate the deviation between the theoretical model and actual production conditions. Its value is usually determined based on historical production data or process capability analysis and can be configured within a certain range, such as between 1.0 and 1.5.
[0056] The system will obtain the parameter ε r Substituting H, W, and the coefficient k into the formula L_target=k×√(ε) r In the range of ×H / W), the system performs mathematical operations, and the final output L_target is a target spacing value with length units. This value represents the theoretical distance that needs to be set between two impedance lines to achieve the desired characteristic impedance under given electrical and structural parameters.
[0057] This embodiment employs a formula based on physical principles to dynamically calculate the target spacing, significantly improving the accuracy and process adaptability of the adjustment. Compared to methods using fixed empirical values, this formula directly relates to the core physical variables affecting impedance, giving the calculation results clear electrical meaning and more accurately reflecting the real impedance matching requirements of high-speed signals, thus ensuring the scientific nature of the adjustment target from the outset. In particular, the introduction of a process correction coefficient k gives the model the ability to dynamically adapt to different manufacturing conditions. By adjusting the value of k, the impact of process fluctuations such as etching side etching and dielectric thickness tolerances on the final impedance value can be compensated, allowing the automatic adjustment method to flexibly adapt to process windows in different factories or batches, improving the reliability and consistency of the output results in actual production environments.
[0058] S7. Based on the available outer space for movement of the upper and lower edges and the movement compensation amount, determine the movement direction and movement distance of the upper edge and / or the lower edge, and control the upper edge and / or the lower edge to move accordingly.
[0059] In practice, the system compares the displacement compensation amount with the calculated available space values on both outer sides and determines the displacement strategy based on preset condition judgment rules. This strategy determines whether to move the upper edge, the lower edge, or both simultaneously, and specifies the direction and distance of each movement. After the decision, the system updates the coordinate data of the selected impedance line in the graphical database, thus achieving its position translation.
[0060] For example, in some preferred embodiments, determining the movement direction and distance of the upper edge and / or the lower edge based on the available outer space for movement of the upper edge and the lower edge and the movement compensation amount, and controlling the upper edge and / or the lower edge to move accordingly, includes: if only the available outer space of the upper edge is greater than the movement compensation amount, then controlling the upper edge to move along its outer direction, with the movement distance equal to the movement compensation amount; if only the available outer space of the lower edge is greater than the movement compensation amount, then controlling the lower edge to move along its outer direction, with the movement distance equal to the movement compensation amount; if the available outer space of both the upper edge and the lower edge is greater than the movement compensation amount... If the available space outside the upper and lower lines is less than or equal to the movement compensation amount, and the sum of the available space outside the upper and lower lines is greater than or equal to the movement compensation amount, then the upper and lower lines are controlled to move in opposite directions outside their respective outward directions, while ensuring that the sum of the moving distances of the upper and lower lines is equal to the movement compensation amount, and that both the upper and lower lines exceed their corresponding available space outside. If the sum of the available space outside the upper and lower lines is less than the movement compensation amount, then the movement operation is stopped.
[0061] In practice, the determination and execution of the movement strategy are achieved through a series of logical comparisons. The decision-making process receives three inputs: the available space outside the upper boundary line S_up, the available space outside the lower boundary line S_down, and the movement compensation amount ΔL.
[0062] First, determine if only the condition S_up is greater than ΔL. If so, the decision is to move only the top edge, moving it outwards for a distance equal to ΔL. Similarly, determine if only the condition S_down is greater than ΔL. If so, the decision is to move only the bottom edge, moving it outwards for a distance equal to ΔL.
[0063] Furthermore, determine whether S_up and S_down are both greater than ΔL. If so, the decision is to move both sides equally, that is, the upper edge moves upward by ΔL / 2 and the lower edge moves downward by ΔL / 2.
[0064] Furthermore, the system checks whether the condition (S_up + S_down) ≥ ΔL holds true, and whether S_up ≤ ΔL and S_down ≤ ΔL are also satisfied. If true, the decision is to move both sides collaboratively. The system allocates the movement distance according to certain rules, such as the ratio of S_up to S_down, ensuring that the movement distance D_up ≤ S_up on the upper side, the movement distance D_down ≤ S_down on the lower side, and D_up + D_down = ΔL.
[0065] Furthermore, if (S_up + S_down) < ΔL, the system decides to abort the movement operation, not to perform any coordinate modification, and to return a message indicating insufficient space.
[0066] The differentiated movement strategy defined in this embodiment achieves intelligent and safe automated adjustment by establishing a set of conditional logic based on precise numerical comparisons, and can flexibly adapt to various actual layout constraints. When space is sufficient on one side, the strategy selects to move only the line on that side, achieving the goal with the simplest operation and minimizing the impact on potentially dense areas on the other side. When space is sufficient on both sides, evenly distributed movement is adopted, making the line position adjustment more balanced and symmetrical. When the total space is sufficient but one side is insufficient, the strategy allows multi-side collaboration, rationally allocating movement tasks, thereby exploring adjustment possibilities in complex layouts. When the total space cannot meet the requirements, decisive termination avoids the risk of design rule violations or manufacturing defects. This scenario-based refined decision-making mechanism enables the intelligent selection of the optimal or feasible adjustment path while ensuring absolute safety.
[0067] S8, after the upper edge and / or the lower edge are moved, the line graphic is merged with adjacent line segments and redundant line segments are deleted to optimize the line layout.
[0068] In practice, after the movement operation is completed, the system performs post-processing on the line graphics in the relevant layers. This includes finding continuous short line segments in the same layer, network, line width, and direction, fitting their endpoints, and merging them into a longer line segment; and finding and deleting invalid line segment data with zero length or whose start and end points coincide.
[0069] This invention systematically solves the problems of low efficiency and poor accuracy in manual impedance line adjustment by constructing a fully automated process from identification, analysis, decision-making to execution and optimization. The entire process is based on precise coordinate data and physical models for calculation and judgment, eliminating the inherent subjectivity and estimation errors of manual operation. This ensures that the impedance line spacing adjustment results strictly conform to electrical design objectives, maintaining impedance consistency at a high level. The integrated spatial constraint analysis step in the process, by pre-calculating available space and comparing it with movement requirements, ensures that any movement decisions are executed within safe boundaries, effectively avoiding the risk of interference between the adjusted lines and surrounding elements, and guaranteeing the manufacturability of the design. Automated line segment merging and cleanup, as the process's final step, further optimizes the quality of graphical data, reduces redundant information in design documents, and facilitates subsequent manufacturing and verification stages.
[0070] In some preferred embodiments, the operation of merging adjacent line segments and deleting redundant line segments on the line graph to optimize the line layout includes: configuring execution parameters for line segment merging, the execution parameters including a target layer range; traversing layers within the target layer range and collecting line segment data from each layer; constructing a line tree network structure based on the collected line segment data and filtering out single-channel lines in the line tree network structure; grouping the line segments in the filtered single-channel lines according to the direction and aperture attributes of the line segments; determining whether the line segments in the same group meet preset merging conditions; the merging conditions include a direction deviation threshold, an aperture error threshold, and a line segment length threshold; if the merging conditions are met, then performing endpoint fitting on the line segments in the group to generate a new merged line segment to replace the original line segments in the group.
[0071] In practice, the operation of merging adjacent line segments is carried out in sequence. First, initialization is performed. The system reads the configuration file to determine the list of target layers to be merged, such as all signal layers, but this invention does not specifically limit this.
[0072] Next, the system iterates through each target layer. Within each target layer, the system accesses the layer's graphics database, collecting all graphics object data that are of the line segment type. The system initially filters out specific line segments that are directly connected to non-line segment elements such as pads, in order to focus on the routing lines.
[0073] Furthermore, the system uses the collected line segment data to construct the electrical network topology. Based on this topology, the system identifies and filters out single-channel lines with simple structures. These lines typically do not contain branches and are the primary targets for merging operations.
[0074] Furthermore, the system groups the selected line segments. Grouping is based on the line segment's direction and aperture attributes. The system calculates the direction angle of each line segment and groups segments with similar direction angles and the same aperture value into the same group.
[0075] Furthermore, for line segments within the same group, the system performs a merging condition check. The criteria include: whether the maximum directional deviation angle between line segments within the group is less than or equal to 5 degrees; whether the maximum difference between the apertures of the line segments is less than or equal to 0.1 mil; and whether the length of each line segment is greater than or equal to 0.5 mil. Only line segment groups that fully meet these conditions are considered mergingable.
[0076] Furthermore, for mergeable line segment groups, the system employs an endpoint fitting algorithm. The algorithm analyzes the start and end coordinates of all line segments within the group, and calculates and fits a new optimal line segment whose start and end points best represent the overall direction and range of the original line segment group. Subsequently, the system replaces all existing line segment objects in the group with this newly generated fitted line segment in the graphics database, and deletes the original old line segment data.
[0077] In this embodiment of the invention, the automatic movement operation may geometrically generate a series of short line segments connected end to end. This process can automatically identify continuous short line segments with consistent direction and attributes, and fit them into longer, regular single line segments. This simplifies the vector representation of graphics, reduces data volume, and makes photoplotting files more concise and efficient. Furthermore, the regular lines also reduce the process complexity for manufacturers during image transfer and etching, helping to improve the accuracy and consistency of the final product.
[0078] In some preferred embodiments, after optimizing the line layout, the method further includes: constructing a tree network structure model of the moved lines; traversing and verifying the tree network structure model to ensure the integrity and continuity of all electrical connections in the tree network structure model.
[0079] In practice, connectivity integrity verification is performed after layout optimization as follows: The system reads the final graphical data of traces, pads, vias, etc., after all adjustments and optimizations.
[0080] First, the system reconstructs the electrical network topology model. The algorithm analyzes the geometric positions and connections of all conductive elements, constructing a tree-like or graph-like structural model for each independent electrical network on the circuit board. In this electrical network topology model, nodes represent connection points, and edges represent the wire segments connecting the nodes. The electrical network topology model accurately reflects the electrical connectivity state of the current design.
[0081] Furthermore, after the electrical network topology model is constructed, the system performs a traversal verification on each electrical network. The verification algorithm starts from any node in the network and traverses the entire network topology in a depth-first or breadth-first manner. During the traversal, the system checks whether the actual line segment graphical object corresponding to each edge in the model exists and is valid, and confirms that all theoretical nodes in the network can be accessed from the starting point.
[0082] The validation process includes, but is not limited to: detecting the existence of isolated line segments that are not connected to any network; detecting breaks in the network topology, i.e., a node that should be connected in the model but lacks a connecting line segment in the actual graphical data; and verifying the integrity of the network connectivity and that it has not been accidentally split. All anomalies discovered during the validation process will be recorded.
[0083] The connection integrity verification step added in this embodiment of the invention provides a final quality verification loop for the entire automated process. Its core effect is to ensure the electrical correctness of the adjustment operations. Although operations such as moving and merging are based on rigorous algorithms, theoretical edge cases may exist that could lead to unexpected connection breaks when processing extremely complex graphical data. By reconstructing the electrical network afterward and performing a systematic traversal check, this method can proactively detect and report such potential connectivity failures. It can effectively intercept design defects caused by extremely low-probability errors, preventing them from flowing into subsequent manufacturing stages, thereby greatly improving the overall reliability of the automatic adjustment method and the robustness of the output results.
[0084] It should be noted that the implementation process of this embodiment of the invention can rely on multiple logically coordinated modules. For example, the impedance parameter acquisition module is responsible for acquiring ε. r The system implements parameters such as H, W, and k; the spatial constraint analysis module is responsible for detecting surrounding elements, calculating spacing, and analyzing available space on the outer side; the line segment merging and optimization module is responsible for fitting and replacing adjacent line segments; and the impedance line network construction and management module is responsible for rebuilding the network topology and verifying connectivity after adjustment. All modules work together to complete the entire process of automatic impedance line adjustment.
[0085] Furthermore, to more accurately illustrate the technical solution of the present invention, the embodiments of the present invention provide some specific drawings, as follows: Figure 2 : Schematic diagram of the state before impedance line treatment; Figure 2 This diagram illustrates the initial state of two target impedance lines in a printed circuit board design before adjustment operations are performed. The figure primarily depicts two parallel lines whose spacing does not meet the target requirements. This diagram visually represents a typical initial scenario for the objects to be processed by the automatic adjustment method.
[0086] Figure 3 : Illustration of strikethrough and merge line operations; Figure 3 This diagram illustrates an intermediate processing stage in the impedance line adjustment process. It depicts cleanup operations for invalid or redundant patterns, such as deleting segments of zero length, and fitting connections between adjacent segments that are end-to-end and meet merging criteria. This diagram serves to illustrate the auxiliary and automated pre-processing or post-processing steps performed before and after core spacing adjustment to optimize line pattern quality.
[0087] Figure 4 : Schematic diagram of the state after impedance line treatment; Figure 4 This image shows the final result after a series of automated processes. The figure shows that, after adjustments, the spacing between the two impedance lines has been modified to the target value; simultaneously, the circuit diagram has been merged and cleaned up, presenting a more regular and concise form. Figure 4 and Figure 2 To create a comparison, and to demonstrate in a holistic and visual way the technical effects that the method of the present invention can achieve.
[0088] Figure 5 : Overall flowchart of automatic impedance line adjustment; Figure 5 The flowchart presents the overall steps and logical sequence of the automatic impedance line adjustment method of the present invention in a complete and linear manner, which is the core basis for understanding the overall architecture and process flow of the present invention.
[0089] Figure 6 : Delete flowcharts with a length of 0 or with the same start and end points; Figure 6 The flowchart details the execution logic of the specific sub-operation "deleting redundant line segments." The diagram clearly outlines the sequence of steps, typically including: traversing graphic objects, filtering line segment types, determining if they meet deletion conditions such as "length is zero" or "start and end points coincide," marking those that meet the conditions, and finally executing the deletion. This diagram provides concrete operational guidance for optimizing line graphics.
[0090] Figure 7 Merge line operation flowchart; Figure 7 This flowchart details the complete process of the specific sub-operation "merging adjacent line segments." It illustrates a series of steps, from parameter configuration, layer traversal, data collection, line tree construction and filtering, line segment grouping, merging condition determination, to the final endpoint fitting and replacement execution. This diagram provides a clear process specification for automating the merging of scattered line segments and simplifying the graphics.
[0091] Figure 8 Flowchart for determining the line to be moved based on impedance; Figure 8Presented as a flowchart, this diagram focuses on the decision-making logic for determining whether a specific impedance line needs to be moved and identifying the object to be moved. The diagram includes decision nodes such as comparing the current spacing with the target spacing and conducting a preliminary assessment of the adequacy of the outer space. The output of these nodes is a crucial input determining the subsequent movement strategy. This diagram reveals the triggering conditions and pre-judgment logic for the movement operation.
[0092] Figure 9 Impedance line movement operation flowchart; Figure 9 The flowchart details the decision-making and operational processes for implementing the "differentiated movement strategy." Based on a comparison of available space on the outer side and movement compensation, the diagram clearly lists various preset conditional branches (such as unilateral movement, bilateral evenly distributed movement, bilateral cooperative movement, and movement abort), and specifies the corresponding movement object, direction, and distance calculation method under each condition. This diagram directly embodies the core algorithmic logic of this invention, enabling intelligent, safe, and adaptive adjustments.
[0093] Please see Figure 10 , Figure 10 This is a schematic block diagram of a computer device provided in an embodiment of this application. The computer device 500 can be a terminal or a server, wherein the server can be a standalone server or a server cluster composed of multiple servers.
[0094] The computer device 500 includes a processor 502, a memory, and a network interface 505 connected via a system bus 501. The memory may include a non-volatile storage medium 503 and internal memory 504.
[0095] The non-volatile storage medium 503 may store an operating system 5031 and a computer program 5032. When the computer program 5032 is executed, it causes the processor 502 to perform an automatic impedance line adjustment method.
[0096] The processor 502 provides computing and control capabilities to support the operation of the entire computer device 500.
[0097] The internal memory 504 provides an environment for the operation of the computer program 5032 in the non-volatile storage medium 503. When the computer program 5032 is executed by the processor 502, the processor 502 can perform an automatic impedance line adjustment method.
[0098] The network interface 505 is used for network communication with other devices. Those skilled in the art will understand that the above structure is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device 500 to which the present application is applied. A specific computer device 500 may include more or fewer components than shown in the figures, or combine certain components, or have different component arrangements.
[0099] The processor 502 is used to run a computer program 5032 stored in the memory to perform the following steps: The two input target lines are identified to determine whether they are impedance lines. If the two target lines are impedance lines, obtain the spatial constraint data of the two impedance lines on the circuit board plane. The spatial constraint data includes the current spacing between the impedance lines and surrounding elements and the preset minimum safe spacing. Based on the geometric coordinates of the two impedance lines, the relative positional relationship between the two impedance lines is determined through vector operations, thereby identifying the upper and lower lines of the two impedance lines. Based on the relative positional relationship, the outer spatial constraints of the upper edge and the outer spatial constraints of the lower edge are extracted from the spatial constraint data. Based on the outer space constraints of the upper and lower edges, the available outer space for movement of the upper and lower edges is determined. Calculate the current actual distance between the two impedance lines, and calculate the target distance based on the preset impedance model parameters, thereby determining the amount of movement compensation required to make the current actual distance reach the target distance. Based on the available space outside the upper and lower edges that can be moved and the movement compensation amount, determine the movement direction and movement distance of the upper edge and / or the lower edge, and control the upper edge and / or the lower edge to move accordingly; After the upper and / or lower lines have been moved, the line graphic is processed by merging adjacent line segments and deleting redundant line segments to optimize the line layout.
[0100] In some preferred embodiments, the identification of the two input target lines includes: Check whether the two target lines have predefined impedance markings; If the two target lines do not have the impedance markings, then the parallelism, line width, and whether they belong to the same differential pair attributes of the two target lines are comprehensively scored. When the overall score exceeds a set threshold, the two target lines are determined to be impedance lines.
[0101] In some preferred embodiments, determining the relative positional relationship between the two impedance lines through vector operations includes: Calculate the coordinates of the midpoints of the two impedance lines respectively; Construct the direction vectors of the two impedance lines themselves and the connection direction vectors connecting the midpoints of the two impedance lines respectively. The cross product of the directional vector and the connection direction vector is calculated, and the upper and lower positions of the two impedance lines are determined based on the positive or negative sign of the cross product value.
[0102] In some preferred embodiments, determining the available outer space for movement of the upper and lower edges based on the outer space constraints of the upper and lower edges includes: For either the upper edge or the lower edge, perform the following steps: When the outer space constraint indicates the existence of surrounding elements, the current distance between the upper edge or the lower edge and the surrounding elements and the corresponding minimum safe distance are obtained based on the space constraint data; the difference between the current distance and the minimum safe distance is calculated to obtain the available outer space. If the outer space constraint indicates that there are no surrounding elements, then the outer available space is set to a predetermined value that indicates sufficient space.
[0103] In some preferred embodiments, calculating the target spacing based on preset impedance model parameters includes: According to the formula: L_target = k × √(ε) r The target spacing is calculated using the formula (L_target) ×H / W, where L_target represents the target spacing, k is the process correction factor, and ε is the process correction factor. r H is the dielectric constant, H is the dielectric thickness, and W is the linewidth.
[0104] In some preferred embodiments, determining the movement direction and distance of the upper edge and / or the lower edge based on the available outer space for movement of the upper edge and the lower edge and the movement compensation amount, and controlling the upper edge and / or the lower edge to move accordingly, includes: If the available space outside the upper edge line is greater than the movement compensation amount, then the upper edge line is controlled to move along its outer direction, and the moving distance is equal to the movement compensation amount; If the available space outside the lower edge is greater than the movement compensation amount, then the lower edge is controlled to move along its outer direction, and the moving distance is equal to the movement compensation amount. If the available space outside both the upper and lower edges is greater than the movement compensation amount, then the upper and lower edges are controlled to move in opposite directions along their respective outer directions, with the single-sided movement distance being half of the movement compensation amount; If the available space outside the upper edge and the lower edge are both less than or equal to the movement compensation amount, and the sum of the available space outside the upper edge and the lower edge is greater than or equal to the movement compensation amount, then the upper edge and the lower edge are controlled to move in opposite directions along their respective outer directions, while ensuring that the sum of the moving distances of the upper edge and the lower edge is the movement compensation amount, and that both the upper edge and the lower edge exceed the corresponding available space outside. If the sum of the available space outside the upper edge and the lower edge is less than the movement compensation amount, the movement operation is stopped.
[0105] In some preferred embodiments, the operation of merging adjacent line segments and deleting redundant line segments on the line graph to optimize the line layout includes: Configure the execution parameters for merging line segments, including the target layer range; Traverse the layers within the target layer range and collect line segment data from each layer; A line tree network structure is constructed based on the collected line segment data, and single-channel lines in the line tree network structure are selected. Based on the direction and aperture attributes of the line segments, the line segments in the selected single-channel lines are grouped. For line segments within the same group, determine whether they meet preset merging conditions; the merging conditions include a directional deviation threshold, an aperture error threshold, and a line segment length threshold; If the merging conditions are met, the endpoints of the line segments within the group are fitted to generate a new merged line segment to replace the original line segments within the group.
[0106] In some preferred embodiments, after optimizing the circuit layout, the method further includes: Construct a tree network structure model of the moved routes; The tree network structure model is traversed and verified to ensure the integrity and continuity of all electrical connections in the tree network structure model.
[0107] It should be understood that in the embodiments of this application, the processor 502 may be a central processing unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.
[0108] It will be understood by those skilled in the art that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program may be stored in a storage medium, which is a computer-readable storage medium. The computer program is executed by at least one processor in the computer system to implement the process steps of the embodiments of the above methods.
[0109] Therefore, the present invention also provides a storage medium. This storage medium can be a computer-readable storage medium. The storage medium stores a computer program. When executed by a processor, the computer program causes the processor to perform the following steps: The two input target lines are identified to determine whether they are impedance lines. If the two target lines are impedance lines, obtain the spatial constraint data of the two impedance lines on the circuit board plane. The spatial constraint data includes the current spacing between the impedance lines and surrounding elements and the preset minimum safe spacing. Based on the geometric coordinates of the two impedance lines, the relative positional relationship between the two impedance lines is determined through vector operations, thereby identifying the upper and lower lines of the two impedance lines. Based on the relative positional relationship, the outer spatial constraints of the upper edge and the outer spatial constraints of the lower edge are extracted from the spatial constraint data. Based on the outer space constraints of the upper and lower edges, the available outer space for movement of the upper and lower edges is determined. Calculate the current actual distance between the two impedance lines, and calculate the target distance based on the preset impedance model parameters, thereby determining the amount of movement compensation required to make the current actual distance reach the target distance. Based on the available space outside the upper and lower edges that can be moved and the movement compensation amount, determine the movement direction and movement distance of the upper edge and / or the lower edge, and control the upper edge and / or the lower edge to move accordingly; After the upper and / or lower lines have been moved, the line graphic is processed by merging adjacent line segments and deleting redundant line segments to optimize the line layout.
[0110] In some preferred embodiments, the identification of the two input target lines includes: Check whether the two target lines have predefined impedance markings; If the two target lines do not have the impedance markings, then the parallelism, line width, and whether they belong to the same differential pair attributes of the two target lines are comprehensively scored. When the overall score exceeds a set threshold, the two target lines are determined to be impedance lines.
[0111] In some preferred embodiments, determining the relative positional relationship between the two impedance lines through vector operations includes: Calculate the coordinates of the midpoints of the two impedance lines respectively; Construct the direction vectors of the two impedance lines themselves and the connection direction vectors connecting the midpoints of the two impedance lines respectively. The cross product of the directional vector and the connection direction vector is calculated, and the upper and lower positions of the two impedance lines are determined based on the positive or negative sign of the cross product value.
[0112] In some preferred embodiments, determining the available outer space for movement of the upper and lower edges based on the outer space constraints of the upper and lower edges includes: For either the upper edge or the lower edge, perform the following steps: When the outer space constraint indicates the existence of surrounding elements, the current distance between the upper edge or the lower edge and the surrounding elements and the corresponding minimum safe distance are obtained based on the space constraint data; the difference between the current distance and the minimum safe distance is calculated to obtain the available outer space. If the outer space constraint indicates that there are no surrounding elements, then the outer available space is set to a predetermined value that indicates sufficient space.
[0113] In some preferred embodiments, calculating the target spacing based on preset impedance model parameters includes: According to the formula: L_target = k × √(ε) rThe target spacing is calculated using the formula (L_target) ×H / W, where L_target represents the target spacing, k is the process correction factor, and ε is the process correction factor. r H is the dielectric constant, H is the dielectric thickness, and W is the linewidth.
[0114] In some preferred embodiments, determining the movement direction and distance of the upper edge and / or the lower edge based on the available outer space for movement of the upper edge and the lower edge and the movement compensation amount, and controlling the upper edge and / or the lower edge to move accordingly, includes: If the available space outside the upper edge line is greater than the movement compensation amount, then the upper edge line is controlled to move along its outer direction, and the moving distance is equal to the movement compensation amount; If the available space outside the lower edge is greater than the movement compensation amount, then the lower edge is controlled to move along its outer direction, and the moving distance is equal to the movement compensation amount. If the available space outside both the upper and lower edges is greater than the movement compensation amount, then the upper and lower edges are controlled to move in opposite directions along their respective outer directions, with the single-sided movement distance being half of the movement compensation amount; If the available space outside the upper edge and the lower edge are both less than or equal to the movement compensation amount, and the sum of the available space outside the upper edge and the lower edge is greater than or equal to the movement compensation amount, then the upper edge and the lower edge are controlled to move in opposite directions along their respective outer directions, while ensuring that the sum of the moving distances of the upper edge and the lower edge is the movement compensation amount, and that both the upper edge and the lower edge exceed the corresponding available space outside. If the sum of the available space outside the upper edge and the lower edge is less than the movement compensation amount, the movement operation is stopped.
[0115] In some preferred embodiments, the operation of merging adjacent line segments and deleting redundant line segments on the line graph to optimize the line layout includes: Configure the execution parameters for merging line segments, including the target layer range; Traverse the layers within the target layer range and collect line segment data from each layer; A line tree network structure is constructed based on the collected line segment data, and single-channel lines in the line tree network structure are selected. Based on the direction and aperture attributes of the line segments, the line segments in the selected single-channel lines are grouped. For line segments within the same group, determine whether they meet preset merging conditions; the merging conditions include a directional deviation threshold, an aperture error threshold, and a line segment length threshold; If the merging conditions are met, the endpoints of the line segments within the group are fitted to generate a new merged line segment to replace the original line segments within the group.
[0116] In some preferred embodiments, after optimizing the circuit layout, the method further includes: Construct a tree network structure model of the moved routes; The tree network structure model is traversed and verified to ensure the integrity and continuity of all electrical connections in the tree network structure model.
[0117] The storage medium is a physical, non-transient storage medium, such as a USB flash drive, external hard drive, read-only memory (ROM), magnetic disk, or optical disk, or any other physical storage medium capable of storing program code. The computer-readable storage medium can be non-volatile or volatile.
[0118] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0119] In the several embodiments provided by this invention, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For example, the division of each unit is merely a logical functional division, and there may be other division methods in actual implementation. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed.
[0120] The steps in the method of this invention can be adjusted, merged, or reduced in order according to actual needs. The units in the device of this invention can be merged, divided, or reduced according to actual needs. Furthermore, the functional units in the various embodiments of this invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0121] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, a terminal, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention.
[0122] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0123] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Since these modifications and variations fall within the scope of the claims and their equivalents, this invention also intends to include these modifications and variations.
[0124] 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 person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered 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. An automatic impedance line adjustment method, characterized in that, include: The two input target lines are identified to determine whether they are impedance lines. If the two target lines are impedance lines, obtain the spatial constraint data of the two impedance lines on the circuit board plane. The spatial constraint data includes the current spacing between the impedance lines and surrounding elements and the preset minimum safe spacing. Based on the geometric coordinates of the two impedance lines, the relative positional relationship between the two impedance lines is determined through vector operations, thereby identifying the upper and lower lines of the two impedance lines. Based on the relative positional relationship, the outer spatial constraints of the upper edge and the outer spatial constraints of the lower edge are extracted from the spatial constraint data. Based on the outer space constraints of the upper and lower edges, the available outer space for movement of the upper and lower edges is determined. Calculate the current actual distance between the two impedance lines, and calculate the target distance based on the preset impedance model parameters, thereby determining the amount of movement compensation required to make the current actual distance reach the target distance. Based on the available space outside the upper and lower edges that can be moved and the movement compensation amount, determine the movement direction and movement distance of the upper edge and / or the lower edge, and control the upper edge and / or the lower edge to move accordingly; After the upper and / or lower lines have been moved, the line graphic is processed by merging adjacent line segments and deleting redundant line segments to optimize the line layout.
2. The automatic impedance line adjustment method according to claim 1, characterized in that, The identification of the two input target lines includes: Check whether the two target lines have predefined impedance markings; If the two target lines do not have the impedance markings, then a comprehensive score is given for the parallelism, line width, whether they meet the preset range, and whether they belong to the same differential pair attributes of the two target lines. When the overall score exceeds a set threshold, the two target lines are determined to be impedance lines.
3. The automatic impedance line adjustment method according to claim 1, characterized in that, Determining the relative positional relationship between the two impedance lines through vector operations includes: Calculate the coordinates of the midpoints of the two impedance lines respectively; Construct the direction vectors of the two impedance lines themselves and the connection direction vectors connecting the midpoints of the two impedance lines respectively. The cross product of the directional vector and the connection direction vector is calculated, and the upper and lower positions of the two impedance lines are determined based on the positive or negative sign of the cross product value.
4. The automatic impedance line adjustment method according to claim 1, characterized in that, The determination of the available outer space for movement of the upper and lower edges based on the outer space constraints of the upper and lower edges includes: For either the upper edge or the lower edge, perform the following steps: When the outer space constraint indicates the existence of surrounding elements, the current distance between the upper edge or the lower edge and the surrounding elements and the corresponding minimum safe distance are obtained based on the space constraint data; the difference between the current distance and the minimum safe distance is calculated to obtain the available outer space. If the outer space constraint indicates that there are no surrounding elements, then the outer available space is set to a predetermined value that indicates sufficient space.
5. The automatic impedance line adjustment method according to claim 1, characterized in that, The step of calculating the target spacing based on preset impedance model parameters includes: According to the formula: L_target = k × √(ε) r The target spacing is calculated using the formula (L_target) ×H / W, where L_target represents the target spacing, k is the process correction factor, and ε is the process correction factor. r H is the dielectric constant, H is the dielectric thickness, and W is the linewidth.
6. The automatic impedance line adjustment method according to claim 4, characterized in that, The step of determining the movement direction and distance of the upper and / or lower edge lines based on the available outer space for movement of the upper and lower edge lines and the movement compensation amount, and controlling the upper and / or lower edge lines to move accordingly, includes: If the available space outside the upper edge line is greater than the movement compensation amount, then the upper edge line is controlled to move along its outer direction, and the moving distance is equal to the movement compensation amount; If the available space outside the lower edge is greater than the movement compensation amount, then the lower edge is controlled to move along its outer direction, and the moving distance is equal to the movement compensation amount. If the available space outside both the upper and lower edges is greater than the movement compensation amount, then the upper and lower edges are controlled to move in opposite directions along their respective outer directions, with the single-sided movement distance being half of the movement compensation amount; If the available space outside the upper edge and the lower edge are both less than or equal to the movement compensation amount, and the sum of the available space outside the upper edge and the lower edge is greater than or equal to the movement compensation amount, then the upper edge and the lower edge are controlled to move in opposite directions along their respective outer directions, while ensuring that the sum of the moving distances of the upper edge and the lower edge is the movement compensation amount, and that both the upper edge and the lower edge exceed the corresponding available space outside. If the sum of the available space outside the upper edge and the lower edge is less than the movement compensation amount, the movement operation is stopped.
7. The automatic impedance line adjustment method according to claim 1, characterized in that, The operation of merging adjacent line segments and deleting redundant line segments on the line graph to optimize the line layout includes: Configure the execution parameters for merging line segments, including the target layer range; Traverse the layers within the target layer range and collect line segment data from each layer; A line tree network structure is constructed based on the collected line segment data, and single-channel lines in the line tree network structure are selected. Based on the direction and aperture attributes of the line segments, the line segments in the selected single-channel lines are grouped. For line segments within the same group, determine whether they meet preset merging conditions; the merging conditions include a directional deviation threshold, an aperture error threshold, and a line segment length threshold; If the merging conditions are met, the endpoints of the line segments within the group are fitted to generate a new merged line segment to replace the original line segments within the group.
8. The automatic impedance line adjustment method according to claim 1, characterized in that, After optimizing the route layout, it also includes: Construct a tree network structure model of the moved routes; The tree network structure model is traversed and verified to ensure the integrity and continuity of all electrical connections in the tree network structure model.
9. A computer device, characterized in that, The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the method as described in any one of claims 1-8.
10. A computer-readable storage medium, characterized in that, The storage medium stores a computer program that, when executed by a processor, can implement the method as described in any one of claims 1-8.