PCB wiring angle defect detection and evaluation method and device, terminal and storage medium

By extracting data from PCB design files to build a topological model and performing dynamic compensation calculations, the problem of inefficient PCB trace angle detection in the existing technology is solved, automated and accurate angle defect detection and evaluation is realized, and design efficiency and quality are improved.

CN120509185APending Publication Date: 2025-08-19MOZART SEMICON (SUZHOU) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510613128.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-13
Publication Date
2025-08-19

AI Technical Summary

Technical Problem

In the prior art, the trace angle detection method in PCB design is time-consuming and labor-intensive, manual inspection is easy to miss problems, simple DRC tools have single functions, fixed rules and automated tools are not flexible enough, and it is difficult to adapt to different design specifications, resulting in low design efficiency and difficult to guarantee quality.

Method used

By extracting basic design data from the PCB design file, building a topological model, dynamic compensation calculation is performed in combination with the preset threshold rule library, the final angle threshold is generated, discretized processing is performed, and the angles in adjacent line segments are calculated, the edge angles in the threshold buffer range are filtered for risk level division, and a heat map is generated through three-dimensional visualization technology.

Benefits of technology

It realizes automated detection and evaluation of PCB trace angle defects, improves the accuracy and applicability of the detection, and can quickly identify and locate high-risk areas, improving design efficiency and quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120509185A_ABST
    Figure CN120509185A_ABST
Patent Text Reader

Abstract

The invention discloses a PCB wiring angle defect detection and evaluation method and device, a terminal and a storage medium, and the method comprises the steps: extracting the basic design data of wiring from a PCB design file, and constructing a topology model according to the basic design data; obtaining a reference angle threshold value according to the topology model and a preset threshold value rule base, performing dynamic compensation calculation according to the reference angle threshold value and the topology model, and generating a final angle threshold value of the current PCB design file; discretization processing is carried out on the wires according to the basic design data, discretized vertex sequences are obtained, all the vertex sequences are traversed, and included angles between adjacent line segments are obtained through calculation; and according to the final angle threshold, edge included angles in a preset threshold buffer range are screened from all the included angles, and the edge included angles are subjected to risk grade division and output.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of PCB design and manufacturing, and in particular to a method, device, terminal and storage medium for detecting and evaluating PCB trace angle defects. Background Art

[0002] Amidst the rapid development of electronic information technology, printed circuit boards (PCBs), core components of electronic devices, are experiencing increasing design complexity and sophistication. The quality of PCB design directly impacts the performance and reliability of electronic products, particularly in terms of signal integrity. Well-designed PCBs can effectively reduce signal interference and improve transmission efficiency, providing a solid foundation for the efficient operation of modern electronic devices. Therefore, ensuring the rationality of trace angles in PCB design is a critical step in the design process.

[0003] To address trace angle issues in PCB design, existing technologies typically rely on manual inspection or simple DRC (Design Rule Check) tools. Manual inspection relies on the designer's experience, visually or by measurement, to identify traces with right and sharp angles. DRC tools, on the other hand, primarily check basic rules such as line width and spacing, and have limited ability to identify complex trace angles. Additionally, some automated tools, based on fixed rules, use preset angle thresholds for preliminary trace screening. However, these methods often fail to adapt to the requirements of diverse design specifications and lack effective assessment of angle risks.

[0004] However, these methods have significant limitations: manual inspection is time-consuming and labor-intensive, making it easy to miss issues; simple DRC tools are limited in functionality and inadequate for complex designs; and automated tools based on fixed rules lack flexibility and cannot dynamically adjust angle thresholds to accommodate varying design specifications. These issues are particularly acute when designing high-density, multi-layer PCBs, leading to low design efficiency and difficulty ensuring quality. Therefore, developing a method that can automatically and accurately identify and evaluate PCB trace angle defects has become a pressing technical challenge. Summary of the Invention

[0005] In order to overcome the above technical problems, the present application provides a PCB trace angle defect detection and evaluation method, device, terminal and storage medium.

[0006] In the first aspect, the present application provides a method for detecting and evaluating PCB trace angle defects, which uses the following technical means: A method for detecting and evaluating PCB trace angle defects includes the following steps: Extracting basic design data of the routing from the PCB design file and constructing a topology model based on the basic design data; obtaining a reference angle threshold based on the topology model and a preset threshold rule library; performing dynamic compensation calculation based on the reference angle threshold and the topology model to generate a final angle threshold for the current PCB design file; Discretize the routing according to the basic design data, obtain a discretized vertex sequence, and traverse all the vertex sequences to calculate the angles between adjacent line segments; According to the final angle threshold, edge angles within a preset threshold buffer range are screened from all the angles, and risk levels are classified and outputted for the edge angles.

[0007] By employing this technical solution, basic design data is extracted from PCB design files and a topology model is constructed, ensuring that the inspection process fully considers the geometric and electrical characteristics of the PCB design. The final angle threshold is generated based on the topology model and a preset threshold rule library, enabling dynamic adjustment of the angle threshold. This discretizes traces and calculates the angle between adjacent line segments, accurately identifying potential angle defects. Edge angles within the threshold buffer are screened and risk-graded. This not only locates the problem but also quantifies its severity, providing designers with clear improvement directions. This achieves automated detection and assessment of PCB trace angle defects.

[0008] Preferably, extracting basic design data of routing from the PCB design file and constructing a topology model based on the basic design data specifically includes the following steps: Extracting basic design data of the routing from the PCB design file, wherein the basic design data includes geometric data, electrical properties, and stacking structure, wherein the geometric data includes three-dimensional geometric coordinates, and the electrical properties include signal types; The extracted basic design data is integrated and a topology model is constructed.

[0009] By adopting the above technical solution, the basic design data of the routing, including geometric data and electrical properties, can be fully extracted from the PCB design file to ensure the integrity and accuracy of the data. By integrating the extracted basic design data and building a topological model, a solid foundation is provided for subsequent angle detection and evaluation, which improves the degree of automation of data processing and reduces human intervention, thereby improving the efficiency and reliability of angle identification in PCB design.

[0010] Preferably, obtaining a reference angle threshold according to the topology model and a preset threshold rule library, performing dynamic compensation calculation according to the reference angle threshold and the topology model, and generating a final angle threshold of the current PCB design file specifically includes the following steps: Acquiring a signal type of the PCB design file from the topology model, and matching a corresponding reference angle threshold in a preset threshold rule library according to the signal type, wherein the threshold rule library includes correspondences between different signal types and corresponding reference angle thresholds; Obtaining local trace density and reference layer integrity data of the current PCB design file from the topology model, determining a local to global trace density ratio based on the local trace density, and determining a reference layer gap area ratio based on the reference layer integrity data; The reference angle threshold is dynamically compensated according to the local-global routing density ratio and the reference layer gap area ratio, and a final angle threshold of the current PCB design file is calculated.

[0011] By adopting the above technical solution, combined with local trace density and reference layer integrity data, the local to global trace density ratio and the reference layer gap area ratio are calculated respectively. This further refines the consideration of the PCB design environment and ensures that the angle threshold setting is more closely aligned with the actual design situation. The final angle threshold is obtained by dynamically compensating the baseline angle threshold, effectively improving the flexibility and accuracy of the detection method, and achieving the effect of dynamically generating the final angle threshold based on the signal type and the specific characteristics of the PCB design file.

[0012] Preferably, the discretization of the routing according to the basic design data and obtaining the discretized vertex sequence specifically includes the following steps: Performing coordinate point analysis on the routing according to the three-dimensional geometric coordinates in the basic design data to determine the type of routing, where the routing type includes a straight routing and a curved routing; If the line is the straight line, performing equally spaced interpolation sampling on the straight line to convert the straight line into a discretized vertex sequence; If the route is the curved route, the curvature of the curved route is calculated, and the curved route is sampled in combination with the curvature and a preset curve sampling rule to generate a discretized vertex sequence containing the curvature.

[0013] By adopting the above technical solution, by judging the route type and processing it separately, it is ensured that both straight routes and curved routes can be accurately converted into discrete vertex sequences. Equally spaced interpolation sampling is used for straight routes to ensure the uniform distribution of vertex sequences and simplify the subsequent calculation process. Curved routes are sampled in combination with curvature and preset rules to generate a vertex sequence containing curvature information, so that the curve features can be retained, further improving the detection accuracy.

[0014] Preferably, traversing all the vertex sequences to calculate the angles between adjacent line segments specifically includes the following steps: Traversing the entire vertex sequence using a preset sliding window algorithm, starting from the start position of the vertex sequence, sliding one vertex position at a time, calculating the angle between two line segments constructed by three adjacent vertices in the sliding window, treating the two adjacent line segments as vectors, and calculating the angle between the two adjacent line segments using a vector dot product formula; The angle is error compensated according to the curvature and a preset error compensation formula to obtain a final angle.

[0015] By adopting the above technical solution and using the sliding window algorithm to traverse the vertex sequence, it is possible to efficiently locate each group of three adjacent vertices and construct two corresponding line segments for angle calculation, thereby comprehensively covering all possible angle situations; combining the curvature and error compensation formula to correct the angle, effectively reducing the calculation error, improving the reliability of angle detection, and providing more accurate data support for subsequent risk assessment.

[0016] Preferably, the step of screening all the angles according to the final angle threshold to obtain edge angles within a preset threshold buffer range and classifying the edge angles into risk levels specifically includes the following steps: Comparing the final angle with the final angle threshold, setting a threshold buffer range according to the final angle threshold, and if the final angle falls within the threshold buffer range, determining the current final angle as an edge angle, and performing a risk assessment on the edge angle; Obtaining a signal influencing factor according to the topological model, and calculating a risk assessment factor according to the signal influencing factor, the edge angle, and a preset risk assessment formula; The edge angle is classified into risk levels according to the risk assessment factor and a preset risk level classification rule.

[0017] By adopting the above technical solution, by comparing the final angle with the final angle threshold and setting the threshold buffer range, it is possible to effectively identify edge angles in a critical state, extract signal influencing factors based on the topological model, calculate the risk assessment factor based on the edge angle and the preset risk assessment formula, and use the risk assessment factor and the preset risk level classification rules to classify the edge angle into risk levels, thereby achieving accurate screening and risk assessment of PCB trace angle defects.

[0018] Preferably, the method further comprises the following steps: Obtaining the angular position of the edge angle, associating the angular position with the corresponding risk level, obtaining the three-dimensional spatial structure of the PCB board corresponding to the PCB file based on the topological model, mapping the angular positions of all the final angles onto the three-dimensional model, and generating a heat map using three-dimensional visualization technology, with different colors representing the risk levels of different final angles; According to the angle position and the risk level, a match is performed in a preset historical case library, the similarity of the current defect is calculated, and the historical case with the highest similarity to the current defect is matched from the historical case library, and the information of the historical case is output.

[0019] By adopting the above technical solution, the angular position of the edge angle is obtained and combined with the topological model to generate the three-dimensional spatial structure of the PCB board. The angular position of each angle is mapped to the three-dimensional model to generate a heat map. This allows designers to intuitively understand the distribution of illegal angles and the corresponding risk level, improve the efficiency of problem location, and achieve accurate risk location and visual display of edge angles in PCB design.

[0020] In a second aspect, the present application provides a PCB trace angle defect detection and evaluation device, which adopts the following technical means: A PCB trace angle defect detection and evaluation device includes the following modules: A data modeling module is used to extract basic design data of routing from PCB design files and build a topology model based on the basic design data; A threshold setting module is used to obtain a reference angle threshold based on the topological model and a preset threshold rule library, perform dynamic compensation calculation based on the reference angle threshold and the topological model, and generate a final angle threshold of the current PCB design file; An angle detection module, configured to discretize the routing according to the basic design data, obtain a discretized vertex sequence, and traverse all the vertex sequences to calculate the angles between adjacent line segments; The risk assessment module is used to screen the edge angles within a preset threshold buffer range from all the angles according to the final angle threshold, classify the edge angles into risk levels, and output the risk levels.

[0021] By adopting the above technical solution, the data modeling module extracts basic design data from the PCB design file and constructs a topology model, ensuring that the detection process is based on comprehensive and accurate design information. The threshold setting module dynamically generates the final angle threshold based on the topology model and a preset threshold rule library, which can adapt to different design specifications and complex scenarios. The angle detection module discretizes the traces and calculates the angle between adjacent line segments, realizing a refined analysis of PCB trace angles. The risk assessment module screens edge angles based on the final angle threshold and classifies risk levels, helping designers quickly locate high-risk areas and realizing automated detection and assessment of PCB trace angle defects.

[0022] In a third aspect, the present application provides a smart terminal that adopts the following technical solution: A smart terminal includes a memory and a processor, wherein the memory stores at least one instruction, at least one program, code set, or instruction set, and the at least one instruction, at least one program, code set, or instruction set is loaded and executed by the processor to implement the PCB trace angle defect detection and assessment method as described above.

[0023] In a fourth aspect, the present application provides a computer-readable storage medium, which adopts the following technical solution: A computer-readable storage medium stores at least one instruction, at least one program, code set, or instruction set, which is loaded and executed by a processor to implement the PCB trace angle defect detection and assessment method as described above.

[0024] In summary, this application has at least one of the following beneficial effects: 1. By extracting basic design data from PCB design files and building a topology model, combined with dynamic compensation calculation to generate the final angle threshold, it can flexibly adapt to different design specifications and improve the accuracy and applicability of detection; 2. Based on discretization processing and sliding window algorithm, the angle between adjacent line segments is calculated to achieve comprehensive detection of PCB trace angles, effectively identify angle defects such as right angles and acute angles, and improve signal integrity.

[0025] 3. The screened edge angles are classified into risk levels and a heat map is generated using 3D visualization technology to help designers quickly locate problems and assess risks, significantly improving design efficiency and quality. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 is a flow chart of the PCB trace angle defect detection and evaluation method of this embodiment; Figure 2 1 is a diagram illustrating the architecture of the PCB trace angle defect detection and evaluation device according to this embodiment. DETAILED DESCRIPTION

[0027] The following will be combined with the accompanying drawings to clearly and completely describe the technical solutions in the embodiments of the present invention. The described embodiments are only possible technical implementations of the present invention and are not all possible implementations. Those skilled in the art can fully combine the embodiments of the present invention to derive other embodiments without creative work, and these embodiments are also within the scope of protection of the present invention.

[0028] The inventors of this application discovered that manual inspection in existing technologies is time-consuming and labor-intensive, and prone to missing issues; simple DRC tools have limited functionality and are unable to meet complex design requirements; and automated tools with fixed rules lack flexibility and cannot dynamically adjust angle thresholds to accommodate different design specifications. Therefore, this application primarily utilizes the following solution to achieve the goal of automatically and accurately identifying and evaluating PCB trace angle defects. This application is further described below.

[0029] The embodiment of the present application provides a method for detecting and evaluating PCB trace angle defects, such as Figure 1 As shown, the following steps are included: S1. Extract the basic design data of the routing from the PCB design file and build a topology model based on the basic design data. The specific steps include the following: S11. Extract basic design data of the routing from the PCB design file. The basic design data includes geometric data, electrical properties, and stacking structure. The geometric data includes three-dimensional geometric coordinates, and the electrical properties include signal types.

[0030] Three-dimensional geometric coordinates can accurately describe the position and direction of traces in PCB space, which is crucial for subsequent analysis of trace angles and relative position relationships with other components.

[0031] Different signal types have different requirements for routing angles. For example, in this embodiment, high-speed signals have a lower tolerance for routing angles and require stricter detection standards.

[0032] The layout information of adjacent devices helps to evaluate the impact of routing angles on signal integrity. For example, some sensitive devices may be more sensitive to electromagnetic interference generated by routing at specific angles.

[0033] S12. Integrate the extracted basic design data and build a topology model, which includes the layer numbers, line widths, and connection relationships of the PCB.

[0034] The layer number identifies the PCB layer on which the trace is located, the trace width affects the impedance characteristics of the signal, and the connection relationship shows the connection status of the trace in the entire PCB. Together, this information constitutes a complete description of the PCB trace layout.

[0035] S2. Obtain a reference angle threshold based on the topology model and a preset threshold rule library, perform dynamic compensation calculation based on the reference angle threshold and the topology model, and generate a final angle threshold for the current PCB design file. Specifically, the steps include: S21. Obtain the signal type of the PCB design file from the topology model. In this embodiment, the signal types include digital signals, analog signals, and high-speed differential signals. Due to differences in the signal's own transmission characteristics, frequency, and anti-interference capabilities, different signal types have different requirements for PCB routing angles.

[0036] S22. Match a corresponding reference angle threshold in a preset threshold rule library according to the signal type, where the threshold rule library includes a correspondence between different signal types and corresponding reference angle thresholds.

[0037] S23. Obtain the trace local density, reference layer integrity data, and PCB board type of the current PCB design file from the topology model.

[0038] The local density of the traces reflects the density of the traces in a specific area of the PCB; The reference layer integrity reflects the status of the reference layer including the power layer and the ground layer. The integrity includes whether there are gaps and discontinuities.

[0039] S24, determining a local to global routing density ratio based on the local routing density, to reflect the local routing density relative to the routing density of the entire PCB board; Determine the reference layer notch area ratio based on the reference layer integrity data, and determine the coefficient based on the PCB board type.

[0040] S25. Based on the local and global trace density ratio and the reference layer gap area ratio, the reference angle threshold is dynamically compensated to calculate the final angle threshold θ of the current PCB design file. final ,The final angle threshold is used as the judgment standard for subsequent angle detection.

[0041] Among them, θ base is the reference angle threshold, is the ratio of local to global routing density, is the ratio of the notch area in the reference layer, and α and β are compensation coefficients.

[0042] The compensation coefficient α is determined according to the plate type. For example, in this embodiment, if the plate type is FR4, the corresponding α value is 0.2; if the plate type is a high-frequency plate, the corresponding α value is 0.15.

[0043] For the reference layer incomplete compensation coefficient β, when the reference layer is incomplete, β takes a value of 0.3.

[0044] S3. Discretize the routing based on the basic design data, obtain the discretized vertex sequence, and traverse all vertex sequences to calculate the angles between adjacent line segments. This specifically includes the following steps: S31. Perform coordinate point analysis on the routing according to the three-dimensional geometric coordinates in the basic design data to determine the type of routing. The routing types include straight routing and curved routing.

[0045] In this embodiment, the coordinate point analysis process is as follows: if the slope between adjacent coordinate points can remain constant within a set range, that is, the direction of a series of coordinate points can be described by a simple linear function relationship, then the line can be determined to be a straight line. In actual applications, the set range value will be very small; If the relationship between the coordinate points cannot be simply expressed by a linear function, and the slope between adjacent coordinate points varies greatly, requiring fitting with a quadratic or higher function, or if the slope change trend of multiple consecutive coordinate points shows nonlinear characteristics, then the line can be determined to be a curve.

[0046] For example, in one specific implementation, the sequence of coordinate points of a certain route is (x1, y1), (x2, y2), (x3, y3), ..., if (y2-y1) / (x2-x1)=(y3-y2) / (x3-x2)..., the route can be determined to be a straight line. If the above ratio changes significantly and irregularly, it is a curve.

[0047] S32. If the line is a straight line, perform equally spaced interpolation sampling on the straight line to convert the straight line into a discretized vertex sequence.

[0048] S33. If the routing is a curved routing, calculate the second-order derivative curvature K of the curved routing to measure the curvature of the curve.

[0049] The curvature and the preset curve sampling rules are combined to sample the curve line to generate a discretized vertex sequence containing the curvature.

[0050] In this embodiment, when K>0.8, it indicates that the curve has a large curvature, and the sampling is performed at an intensified pitch of 0.05 mm to ensure that the detailed changes of the curve can be captured; when K≤0.8, the curve is relatively flat, and the sampling is performed at a pitch of 0.2 mm.

[0051] After sampling is completed, the normalized curvature value is marked for each sampling point, that is, Knorm = K / Kmax; Finally, a vertex sequence containing curvature information is generated, providing a data basis for subsequent angle calculations.

[0052] S34. Traverse the entire vertex sequence using a preset sliding window algorithm.

[0053] In this embodiment, starting from the starting position of the vertex sequence, each time a vertex position is slid, the angle between two line segments constructed by three adjacent vertices in the sliding window is calculated, and the two adjacent line segments are regarded as vectors respectively, and the angle between the two adjacent line segments is calculated using the vector dot product formula.

[0054] in, are the vectors corresponding to the two line segments, are the modulus of the vectors respectively.

[0055] S35. Since the discretization process will inevitably produce certain errors, it is necessary to use an error compensation algorithm to correct the calculated angle.

[0056] The error compensation of the included angle is performed based on the curvature and the preset error compensation formula to obtain the final included angle θ corrected , specifically, θ corrected =θ+γ·f(K norm ); Among them, θ is the calculated angle between two adjacent line segments, γ is the error compensation coefficient, f(K norm ) is a nonlinear function set according to the normalized curvature value, which is used to quantify the influence of curvature on the angle error.

[0057] In specific implementation, the error compensation coefficient can be obtained through actual measurement experiments. After a series of actual measurement experiments to obtain a large number of traces and discretize them, the error data between the original angle θ and the actual precise final angle are calculated. These error data are compared with the corresponding normalized curvature value K norm Perform correlation analysis and use the least squares method to establish the error and K norm In this functional relationship, the error compensation coefficient γ is a key parameter. By continuously adjusting the value of the error compensation coefficient, the function fitting result and the experimental data are optimally matched, thereby obtaining the optimal error compensation coefficient. In this embodiment, for a certain type of common curve line, when γ = 0.05K norm When it is +0.1, it can better compensate for the angle calculation error.

[0058] f(K norm) can be obtained through machine algorithm training, collecting a large amount of PCB trace sample data with different curvature characteristics, including the normalized curvature value K norm , the corresponding original angle θ and the actual angle obtained by precise measurement, are trained and optimized based on the machine learning algorithm to obtain K norm As input, the error between the actual angle and the original angle is used as output to train the algorithm model. The specific process will not be described in detail. During the training process, the model continuously adjusts its own parameters and learns the complex nonlinear relationship between the normalized curvature value and the angle error, thereby constructing a nonlinear function f(K norm ).

[0059] For example, in this embodiment, a multilayer perceptron neural network is used for training. After multiple rounds of training and optimization, a neural network model including multiple hidden layers is obtained. The model represents the nonlinear function f(K norm ), when calculating, K norm Input into the trained model to get the corresponding f(K norm )value.

[0060] S4, screening all angles according to the final angle threshold to obtain edge angles within a preset threshold buffer range, classifying the edge angles into risk levels and outputting the risk levels, specifically including the following steps: S41. Compare the final angle with the final angle threshold, and set a threshold buffer range according to the final angle threshold.

[0061] In this embodiment, the buffer range is θ final The floating range is ±5°, and the floating range can be adjusted according to actual operation requirements.

[0062] If the final angle falls within the threshold buffer range, the current final angle is identified as the edge angle. That is to say, if the difference between the final angle and the final angle threshold is within 5°, it is identified as the edge angle and a risk assessment is performed on the edge angle.

[0063] S42. Obtain signal influencing factors based on the topological model, and calculate a risk assessment factor based on the signal influencing factors, the edge angle, and a preset risk assessment formula.

[0064] In this embodiment, the signal influencing factors are the shielding structure coverage and the sensitive wiring distance. Where R is the risk assessment factor, Δθ is the difference between the final angle and the final angle threshold, S shield is the coverage of adjacent shielding structures, L near The distance to the nearest sensitive trace, in mm.

[0065] S shield shield reflects the degree of protection of the shielding structure for the traces. The higher the coverage rate, the lower the risk of signal interference; L near The closer the distance, the greater the possibility of mutual interference between traces.

[0066] In an implementable specific manner, assume that the length of a certain trace is L, and the length within the coverage range of the shielding structure is L1. Then the shielding structure coverage rate S shield = L1 / L; The topological model records the three-dimensional geometric coordinates and connection relationships of all traces. Traverse all traces, and calculate the shortest distance between each trace and other sensitive traces based on the three-dimensional geometric coordinates, which is the nearest sensitive trace distance. Sensitive traces include high-speed differential signal traces, high-frequency analog signal traces, etc.

[0067] S43. Classify the risk level of the edge angle according to the risk assessment factor and the preset risk level classification rules. In this embodiment, the risk level classification rules are specifically as follows: When R > 0.6, it is determined as a high risk. It is recognized that such traces pose a serious threat to signal integrity and need to be forcibly repaired to ensure stable signal transmission.

[0068] When 0.3 < R ≤ 0.6, it is classified as a medium risk. It is recognized that such traces have certain risk hazards, and optimize the traces, such as increasing shielding measures, fine-tuning the trace angle, etc., to balance the design cost while ensuring signal quality.

[0069] When R ≤ 0.3, it is determined as a low risk. Although such traces have an angular deviation, the impact on signal integrity is small, and only mark and remind them to avoid resource waste caused by over-design.

[0070] In this embodiment, only classify the risk level, display the classified risk level and treatment suggestions to the designers, and do not actually execute the corresponding repair measures.

[0071] S4. Visualize the detection data and convert it into intuitive and interactive information to facilitate designers to quickly understand the PCB trace angle problem and risk status.

[0072] S41. Obtain the angular position of the edge angle and associate the angular position with the corresponding risk level.

[0073] S42. Obtain the three-dimensional space structure of the PCB board corresponding to the PCB file according to the topological model. Based on the three-dimensional space structure, map the angular positions of all the final angles onto the three-dimensional model, and use three-dimensional visualization technology to generate a heat map, and represent the risk levels of different final angles with different colors.

[0074] In this example, high-risk areas are highlighted in red, medium-risk areas in orange, low-risk areas in yellow, and non-risk areas in normal or light colors. This allows users to quickly and intuitively locate problematic routing areas and their risk levels within the 3D heat map.

[0075] S43. Matching is performed in a preset historical case library based on the angle position and risk level, the similarity of the current defect is calculated, and the historical case with the highest similarity to the current defect is matched from the historical case library, and the information of the historical case is output.

[0076] For example, if a high-risk violation angle currently detected is similar to a case in the historical case library, the system will recommend solutions such as replanning the routing path and adding shielding measures in that case to provide users with reference and reference.

[0077] Based on the same inventive concept above, the present application also discloses a PCB trace angle defect detection and evaluation device, such as Figure 2 As shown, it includes the following modules: The data modeling module is used to extract the basic design data of the routing from the PCB design file and build a topology model based on the basic design data; The threshold setting module is used to obtain the reference angle threshold according to the topological model and the preset threshold rule library, perform dynamic compensation calculation based on the reference angle threshold and the topological model, and generate the final angle threshold of the current PCB design file; Angle detection module, which is used to discretize the routing according to the basic design data, obtain the discretized vertex sequence, and traverse all the vertex sequences to calculate the angles between adjacent line segments; The risk assessment module is used to screen the edge angles within the preset threshold buffer range from all angles according to the final angle threshold, classify the edge angles into risk levels and output them.

[0078] In a specific implementation scheme, the data modeling module includes the following units: The first data modeling unit is used to extract the basic design data of the routing from the PCB design file. The basic design data includes geometric data, electrical properties and stacking structure. The geometric data includes three-dimensional geometric coordinates, and the electrical properties include signal types. The second data modeling unit is used to integrate the extracted basic design data and build a topological model. The topological model includes the layer numbers, line widths and connection relationships of the PCB.

[0079] In a specific implementation scheme, the threshold setting module includes the following units: A first threshold setting unit is configured to obtain a signal type of the PCB design file from the topology model and match a corresponding reference angle threshold in a preset threshold rule library according to the signal type, wherein the threshold rule library includes a correspondence between different signal types and corresponding reference angle thresholds; The second threshold setting unit is used to obtain the local routing density and reference layer integrity data of the current PCB design file from the topology model, determine the local to global routing density ratio based on the local routing density, and determine the reference layer gap area ratio based on the reference layer integrity data; The third threshold setting unit is used to dynamically compensate the reference angle threshold based on the local and global trace density ratio and the reference layer gap area ratio, and calculate the final angle threshold of the current PCB design file.

[0080] In a specific implementation scheme, the angle detection module includes the following units: The first angle detection unit is used to perform coordinate point analysis on the routing according to the three-dimensional geometric coordinates in the basic design data to determine the type of routing, which includes straight routing and curved routing; The second angle detection unit is used to perform equidistant interpolation sampling on the straight line if the line is a straight line, and convert the straight line into a discretized vertex sequence; The third angle detection unit is used to calculate the curvature of the curved line if the line is a curved line, sample the curved line in combination with the curvature and a preset curve sampling rule, and generate a discretized vertex sequence including the curvature.

[0081] A fourth angle detection unit is configured to traverse the entire vertex sequence using a preset sliding window algorithm, starting from the start position of the vertex sequence and sliding one vertex position at a time, calculate the angle between two line segments constructed by three adjacent vertices in the sliding window, treat the two adjacent line segments as vectors, and calculate the angle between the two adjacent line segments using the vector dot product formula; The fifth angle detection unit is used to perform error compensation on the included angle according to the curvature and a preset error compensation formula to obtain a final included angle.

[0082] In a specific implementation scheme, the risk assessment module includes the following units: A first risk assessment unit is configured to compare the final angle with a final angle threshold, set a threshold buffer range based on the final angle threshold, and if the final angle falls within the threshold buffer range, identify the current final angle as an edge angle and perform a risk assessment on the edge angle; A second risk assessment unit is configured to obtain a signal influencing factor based on the topological model, and calculate a risk assessment factor based on the signal influencing factor, the edge angle, and a preset risk assessment formula; The third risk assessment unit is used to classify the risk level of the edge angle according to the risk assessment factor and the preset risk level classification rule.

[0083] In a specific embodiment, a PCB trace angle defect detection and evaluation device further includes the following modules: The visualization module is used to obtain the angular position of the edge angle, associate the angular position with the corresponding risk level, and obtain the 3D spatial structure of the PCB board corresponding to the PCB file based on the topological model. Based on the 3D spatial structure, the angular position of all final angles is mapped to the 3D model. The 3D visualization technology is used to generate a heat map, and different colors are used to represent the risk level of different final angles. Matching is performed in the preset historical case library based on the angle position and risk level, the similarity of the current defect is calculated, and the historical case with the highest similarity to the current defect is matched from the historical case library, and the information of the historical case is output.

[0084] Based on the same inventive concept mentioned above, an embodiment of the present application also discloses a computer-readable storage medium, which stores at least one instruction, at least one program, code set or instruction set. The at least one instruction, at least one program, code set or instruction set can be loaded and executed by a processor to implement the PCB trace angle defect detection and evaluation method provided by the above method embodiment.

[0085] Also based on the same inventive concept mentioned above, an embodiment of the present application further discloses a computer-readable storage medium, which stores at least one instruction, at least one program, code set or instruction set. The at least one instruction, at least one program, code set or instruction set is loaded and executed by a processor to implement the PCB trace angle defect detection and evaluation method as described above.

[0086] Those skilled in the art will appreciate that all or part of the steps of the above embodiments may be implemented by hardware or by programs instructing related hardware to implement them. The programs may be stored in computer-readable storage media, which may include, for example, various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical disks.

[0087] The above are only optional embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present application.

Claims

1. A PCB trace angle defect detection and evaluation method, characterized in that: The steps include: Extracting basic design data of routing from PCB design files and building a topology model based on the basic design data; Obtaining a reference angle threshold according to the topology model and a preset threshold rule library, performing dynamic compensation calculation based on the reference angle threshold and the topology model, and generating a final angle threshold of the current PCB design file; Discretize the routing according to the basic design data, obtain a discretized vertex sequence, and traverse all the vertex sequences to calculate the angles between adjacent line segments; According to the final angle threshold, edge angles within a preset threshold buffer range are screened from all the angles, and risk levels are classified and outputted for the edge angles.

2. The PCB trace angle defect detection and evaluation method according to claim 1, characterized in that: Extracting basic design data of the routing from the PCB design file and constructing a topology model based on the basic design data specifically includes the following steps: Extracting basic design data of the routing from the PCB design file, wherein the basic design data includes geometric data, electrical properties, and stacking structure, wherein the geometric data includes three-dimensional geometric coordinates, and the electrical properties include signal types; The extracted basic design data is integrated and a topology model is constructed.

3. The PCB trace angle defect detection and evaluation method according to claim 2, characterized in that: The method of obtaining a reference angle threshold according to the topology model and a preset threshold rule library, performing dynamic compensation calculation according to the reference angle threshold and the topology model, and generating a final angle threshold of the current PCB design file specifically includes the following steps: Acquiring a signal type of the PCB design file from the topology model, and matching a corresponding reference angle threshold in a preset threshold rule library according to the signal type, wherein the threshold rule library includes correspondences between different signal types and corresponding reference angle thresholds; Obtaining local trace density and reference layer integrity data of the current PCB design file from the topology model, determining a local to global trace density ratio based on the local trace density, and determining a reference layer gap area ratio based on the reference layer integrity data; The reference angle threshold is dynamically compensated according to the local-global routing density ratio and the reference layer gap area ratio, and a final angle threshold of the current PCB design file is calculated.

4. The PCB trace angle defect detection and evaluation method according to claim 2, characterized in that: The discretization of the routing according to the basic design data and obtaining the discretized vertex sequence specifically includes the following steps: Performing coordinate point analysis on the routing according to the three-dimensional geometric coordinates in the basic design data to determine the type of routing, where the routing type includes a straight routing and a curved routing; If the line is the straight line, performing equally spaced interpolation sampling on the straight line to convert the straight line into a discretized vertex sequence; If the route is the curved route, the curvature of the curved route is calculated, and the curved route is sampled in combination with the curvature and a preset curve sampling rule to generate a discretized vertex sequence containing the curvature.

5. The PCB trace angle defect detection and evaluation method according to claim 4, characterized in that: The step of traversing all the vertex sequences and calculating the angles between adjacent line segments specifically includes the following steps: Traversing the entire vertex sequence using a preset sliding window algorithm, starting from the start position of the vertex sequence, sliding one vertex position at a time, calculating the angle between two line segments constructed by three adjacent vertices in the sliding window, treating the two adjacent line segments as vectors, and calculating the angle between the two adjacent line segments using a vector dot product formula; The angle is error compensated according to the curvature and a preset error compensation formula to obtain a final angle.

6. The PCB trace angle defect detection and evaluation method according to claim 5, characterized in that: The step of screening all the angles according to the final angle threshold to obtain edge angles within a preset threshold buffer range, and classifying the edge angles into risk levels, specifically includes the following steps: Comparing the final angle with the final angle threshold, setting a threshold buffer range according to the final angle threshold, and if the final angle falls within the threshold buffer range, determining the current final angle as an edge angle, and performing a risk assessment on the edge angle; Obtaining a signal influencing factor according to the topological model, and calculating a risk assessment factor according to the signal influencing factor, the edge angle, and a preset risk assessment formula; The edge angle is classified into risk levels according to the risk assessment factor and a preset risk level classification rule.

7. The PCB trace angle defect detection and evaluation method according to claim 6, characterized in that: The following steps are also included: Obtaining the angular position of the edge angle, associating the angular position with the corresponding risk level, obtaining the three-dimensional spatial structure of the PCB board corresponding to the PCB file based on the topological model, mapping the angular positions of all the final angles onto the three-dimensional model based on the three-dimensional spatial structure, and generating a heat map using three-dimensional visualization technology, with different colors representing the risk levels of different final angles; According to the angle position and the risk level, a match is performed in a preset historical case library, the similarity of the current defect is calculated, and the historical case with the highest similarity to the current defect is matched from the historical case library, and the information of the historical case is output.

8. A PCB trace angle defect detection and evaluation device, characterized in that: Includes the following modules: A data modeling module is used to extract basic design data of routing from PCB design files and build a topology model based on the basic design data; A threshold setting module is used to obtain a reference angle threshold based on the topological model and a preset threshold rule library, perform dynamic compensation calculation based on the reference angle threshold and the topological model, and generate a final angle threshold of the current PCB design file; An angle detection module, configured to discretize the routing according to the basic design data, obtain a discretized vertex sequence, and traverse all the vertex sequences to calculate the angles between adjacent line segments; The risk assessment module is used to screen the edge angles within a preset threshold buffer range from all the angles according to the final angle threshold, classify the edge angles into risk levels, and output the risk levels.

9. An intelligent terminal, characterized in that: The method comprises a memory and a processor, wherein the memory stores at least one instruction, at least one program, code set, or instruction set, and the at least one instruction, at least one program, code set, or instruction set is loaded and executed by the processor to implement the PCB trace angle defect detection and evaluation method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that The readable storage medium stores at least one instruction, at least one program, code set, or instruction set, and the at least one instruction, at least one program, code set, or instruction set is loaded and executed by a processor to implement the PCB trace angle defect detection and evaluation method according to any one of claims 1 to 7.