PCB board detection method and device, storage medium and electronic equipment
By automatically identifying and calculating the angle of the PCB board differential trace in the via coordinate system, the problem of low interference detection efficiency in the prior art is solved, and fast and accurate signal interference detection is achieved.
Patent Information
- Application Number
- CN202411984820.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2044-12-31
AI Technical Summary
In the prior art, the PCB board differential trace itself has low interference detection efficiency, resulting in missed detection and missed detection.
By responding to the user's box selection operation of the first-level trace, the first target trace and the second target trace are automatically determined, and the tangent angles of both in the via coordinate system are calculated. If the angles of the two are on the same side, it is judged that there is signal interference in the first target trace.
It realizes rapid and accurate detection of signal interference from differential traces of PCB boards, improves detection efficiency, and reduces the possibility of missed detection and missed detection.
Smart Images

Figure CN119403049B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of hardware design, and specifically, to a PCB board detection method and device, a storage medium, and an electronic device. Background Art
[0002] The server is composed of a large number of computing, storage, and management chips, which require PCB boards to connect the numerous functional modules. In the process of designing the PCB board, differential routing is used to meet high bandwidth and high speed. In the design process, differential routing should be prevented from being interfered by other signals. For example, if the first-layer routing at the via position is in the same direction as the second-layer routing, the differential signal will be interfered by itself.
[0003] In the related art, after the designer completes the design of the PCB board using the design software, they usually manually switch the layers to find the design of this differential routing self-interference, such as checking the signal layer-changing vias one by one on every two layers of the entire board. Obviously, in the face of the complex PCB board design in the server, the workload of manually checking the differential routing self-interference is large, and it is easy to miss the detection, misdetection, etc. That is, the PCB board differential routing self-interference detection in the related art has the problem of low efficiency.
[0004] Regarding the related technologies, the current PCB board differential trace interference detection has the technical problem of low efficiency, and no effective solution has been proposed yet. Summary of the invention
[0005] The embodiments of the present application provide a PCB board detection method and device, a storage medium and an electronic device to at least solve the technical problem of low efficiency in the current PCB board differential trace interference detection in the related art.
[0006] According to an embodiment of the present application, a detection method for a PCB board is provided, comprising: in response to a frame selection operation on a routing in a first layer, determining a first target routing in the first layer, wherein the first layer is used to indicate a layer in the PCB board where the routing exists; determining a second layer according to a layer where a layer-changing via of the first target routing is located, and determining a second target routing in the second layer, wherein the layer-changing via is used to connect different layers in the PCB board, and the second target routing is a routing having electrical continuity with the first target routing; determining a tangent angle of a line between an origin coordinate of the layer-changing via and an endpoint coordinate of the first target routing in a via coordinate system as a first target angle, and determining a tangent angle of a line between an origin coordinate of the layer-changing via and an endpoint coordinate of the second target routing in a via coordinate system as a second target angle, wherein the via coordinate system is a coordinate system with an origin coordinate of the layer-changing via as an origin and a coordinate axis direction being the same as a reference coordinate system of the PCB board; and determining a detection result of the first target routing as the presence of signal interference when the first target angle and the second target angle are located on the same side of the via coordinate system.
[0007] In an exemplary embodiment, after determining the first target routing in the first layer, the above method further includes: determining a first reference routing from multiple candidate routings in the first layer according to an identifier of the first target routing, wherein the first reference routing and the first target routing are a group of differential routings.
[0008] In an exemplary embodiment, the above-mentioned determining the first reference routing from multiple routings on the first level according to the identifier of the first target routing includes: determining the signal name of the candidate routing according to the identifiers of the multiple candidate routings on the first level, and determining the signal name of the first target routing according to the identifier of the first target routing; when the last digit of the signal name of the first target routing is a positive signal digit, the candidate routing whose signal name is the same as the signal name of the first target routing except for the last digit, and the last digit is a negative signal digit is determined as the first reference routing; when the last digit of the signal name of the first target routing is a negative signal digit, the candidate routing whose signal name is the same as the signal name of the first target routing except for the last digit, and the last digit is a positive signal digit is determined as the first reference routing.
[0009] In an exemplary embodiment, the second layer is determined based on the layer where the layer-change via of the first target routing is located, including: searching for the layer-change via in the first layer; determining information of two layers where the layer-change via exists and interconnects the routing; and determining the layer different from the first layer in the two layers where the layer-change via exists and interconnects the routing as the second layer.
[0010] In an exemplary embodiment, the above-mentioned search for layer-changing vias in the first layer includes: determining the starting point coordinates and the ending point coordinates of the first target routing; determining the candidate vias in the first layer; calculating the distances between the starting point and the ending point of the first target routing and the candidate vias in the first layer according to the starting point coordinates or the ending point coordinates, and determining the candidate vias corresponding to the distance of 0 as the layer-changing vias.
[0011] In an exemplary embodiment, the above-mentioned determination of candidate vias in the first layer includes at least one of the following: taking the starting point of the first target routing as the starting point, extending the detection signal link forward and backward, and obtaining information of all vias on the link, and determining all vias on the link as candidate vias; taking the end point of the first target routing as the starting point, extending the detection signal link forward and backward, and obtaining information of all vias on the link, and determining all vias on the link as candidate vias.
[0012] In an exemplary embodiment, the above-mentioned determination of the tangent angle of the line between the origin coordinates of the layer change via and the endpoint coordinates of the first target routing in the via coordinate system as the first target angle includes: determining the routing segment of the first target routing located in the layer change via, and determining the coordinates of the endpoint located on the side outside the layer change via of the routing segment that is partially located outside the layer change via and partially located inside the layer change via; calculating the first tangent value between the endpoint and the origin using the endpoint coordinates and the origin coordinates of the layer change via, and determining the first target angle according to the first tangent value; determining the tangent angle of the line between the origin coordinates of the layer change via and the endpoint coordinates of the second target routing in the via coordinate system as the second target angle, including: determining the routing segment of the second target routing located in the layer change via, and determining the coordinates of the endpoint located on the side outside the layer change via of the routing segment that is partially located outside the layer change via and partially located inside the layer change via; calculating the second tangent value between the endpoint and the origin using the endpoint coordinates and the origin coordinates of the layer change via, and determining the second target angle according to the second tangent value.
[0013] In an exemplary embodiment, in the case where the first target angle and the second target angle are located on the same side of the via coordinate system, determining that the detection result of the first target routing is that there is signal interference includes: when the first target angle indicates that the first target routing is located in the second quadrant or the third quadrant of the via coordinate system, and the second target angle indicates that the second target routing is located in the first quadrant or the fourth quadrant of the via coordinate system, determining that the first target routing and the second target routing are not in the same entry and exit; when the first target angle indicates that the first target routing is located in the second quadrant or the third quadrant of the via coordinate system, and the second target angle indicates that the second target routing is located in the second quadrant or the third quadrant of the via coordinate system, determining that the first target routing and the second target routing are in the same entry and exit, and determining that the detection result of the first target routing is that there is signal interference.
[0014] In an exemplary embodiment, after the first reference routing is determined, the method further includes: detecting the first reference routing, and when the detection result of the first reference routing is that signal interference exists, determining that the detection result of the first target routing is that signal interference exists.
[0015] In an exemplary embodiment, the above-mentioned detection of the first reference routing includes: determining a reference layer change via of the first reference routing, and determining a second reference routing in the second layer, wherein the reference layer change via is used to connect the first layer and the second layer in the PCB board, and the second reference routing is a routing having electrical continuity with the first reference routing; determining a first reference angle based on the origin coordinates of the reference layer change via and the endpoint coordinates of the first reference routing, and determining a second reference angle based on the origin coordinates of the reference layer change via and the endpoint coordinates of the second reference routing; when the first reference angle and the second reference angle meet preset conditions, determining that the detection result of the first reference routing is that signal interference exists.
[0016] In an exemplary embodiment, the above method also includes: when the detection result of the first target routing is that there is no signal interference and the detection result of the first reference routing is that there is no signal interference, detecting the layer change via at the end point of the second target routing; when there is a layer change via connected to the third layer at the end point of the second target routing, detecting the third target routing on the third layer; when the third target routing is that there is signal interference, determining that the detection result of the first target routing is that there is signal interference.
[0017] According to another embodiment of the present application, a PCB board detection device is provided, including: a target routing determination module, which is used to determine a first target routing in the first layer in response to a frame selection operation on the routing in the first layer, wherein the first layer is used to indicate the layer where the routing exists in the PCB board; a second layer determination module, which is used to determine the second layer according to the layer where the layer-changing via of the first target routing is located, and determine the second target routing in the second layer, wherein the layer-changing via is used to connect different layers in the PCB board, and the second target routing is a routing having electrical continuity with the first target routing; an angle calculation module, which is used to determine the second layer according to the layer where the layer-changing via is located, and determine the second target routing in the second layer, wherein the layer-changing via is used to connect different layers in the PCB board, and the second target routing is a routing having electrical continuity with the first target routing; and an angle calculation module, which is used to determine the second layer according to the layer where the layer-changing via is located. The tangent angle of the line between the origin coordinates of the layer-changing via and the endpoint coordinates of the first target routing in the via coordinate system is determined as the first target angle, and the tangent angle of the line between the origin coordinates of the layer-changing via and the endpoint coordinates of the second target routing in the via coordinate system is determined as the second target angle, wherein the via coordinate system is a coordinate system with the origin coordinates of the layer-changing via as the origin and the coordinate axis direction being the same as the reference coordinate system of the PCB board; a detection result determination module is used to determine that the detection result of the first target routing is that there is signal interference when the first target angle and the second target angle are located on the same side of the via coordinate system.
[0018] According to another embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
[0019] According to another embodiment of the present application, an electronic device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0020] According to another embodiment of the present application, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps of the method in each embodiment of the present application are implemented.
[0021] Through the present application, in response to the frame selection operation of the routing in the first layer, the first target routing is determined in the first layer, wherein the first layer is used to indicate the layer where the routing exists in the PCB board; the second layer is determined according to the layer where the layer-changing via of the first target routing is located, and the second target routing in the second layer is determined, wherein the layer-changing via is used to connect different layers in the PCB board, and the second target routing is a routing with electrical continuity with the first target routing; the first target angle is determined based on the origin coordinates of the layer-changing via and the endpoint coordinates of the first target routing, and the second target angle is determined based on the origin coordinates of the layer-changing via and the endpoint coordinates of the second target routing; when the first target angle and the second target angle meet the preset conditions, the detection result of the first target routing is determined to be that there is signal interference. After receiving the frame selection operation of the user, the position of the layer-changing via of the target routing can be quickly detected, the second layer after the via is changed, and the second target routing can be obtained, and the directions of the first target routing and the second target routing are automatically detected. Whether the directions are the same, the detection result is output to the user. Thus, the technical problem of low efficiency in the current PCB board differential routing interference detection in the related art is solved. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 It is a hardware structure block diagram of an optional PCB board detection method according to an embodiment of the present application;
[0023] Figure 2 is a flow chart of an optional PCB board detection method according to an embodiment of the present application;
[0024] Figure 3 is a schematic diagram of routing at different levels of an optional PCB board according to an embodiment of the present application;
[0025] Figure 4 is a schematic diagram of routing at different levels of another optional PCB board according to an embodiment of the present application;
[0026] Figure 5 is a schematic diagram of vias and routing of an optional PCB board according to an embodiment of the present application;
[0027] Figure 6 is a schematic diagram of an optional via coordinate system of a PCB board according to an embodiment of the present application;
[0028] Figure 7 is a schematic diagram of another optional via coordinate system of a PCB board according to an embodiment of the present application;
[0029] Figure 8 It is a structural block diagram of an optional PCB board detection device according to an embodiment of the present application. DETAILED DESCRIPTION
[0030] The embodiments of the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0031] It should be noted that the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0032] Figure 1 FIG. 1 is a hardware structure diagram of an optional PCB board detection method according to an embodiment of the present application. Figure 1 As shown, according to one aspect of the embodiment of the present application, a PCB board detection method is provided. As an optional implementation, the PCB board detection method can be but is not limited to being applied to Figure 1 The PCB board detection system in the hardware environment shown in FIG. The PCB board detection system may include but is not limited to a terminal device 102, a network 110, a server 112, and a database 114. The terminal device 102 runs a target client (such as Figure 1 As shown, the target client is a client for designing PCB boards as an example). The terminal device 102 includes a display 108, a processor 106 and a memory 104. The display 108 can be used to display the PCB board that the user is viewing, etc., and is also used to provide a human-computer interaction interface to receive human-computer interaction operations of touch on different controls. The processor is used to generate an interaction instruction in response to the above human-computer interaction operation, and send the interaction instruction to the server to obtain routing information and via information. The memory is used to store the self-interference of the routing of the PCB board.
[0033] In addition, the server 112 includes a processing engine 116, and the processing engine 116 is used to perform storage or reading operations on the database 114. Specifically, the processing engine 116 reads the routing information and the via information from the database 114.
[0034] Assumptions Figure 1 The terminal device 102 in the embodiment runs a client for designing a PCB board. The specific process of this embodiment is as follows: as in step S102, the terminal device 102 determines the first target routing on the first layer in response to the box selection operation in the client; then step S104 can be executed to obtain routing and via information on the first layer from the server 112 through the network 110. Then steps S106-S108 are executed to determine the second layer according to the layer where the layer-changing via of the first target routing is located, and determine the second target routing in the second layer, wherein the layer-changing via is used to connect different layers in the PCB board, and the second target routing is a routing that has electrical continuity with the first target routing; the first target angle is determined based on the origin coordinates of the layer-changing via and the endpoint coordinates of the first target routing, and the second target angle is determined based on the origin coordinates of the layer-changing via and the endpoint coordinates of the second target routing; when the first target angle and the second target angle meet the preset conditions, it is determined that the detection result of the first target routing is that there is self-interference.
[0035] Optionally, in this embodiment, the terminal device 102 may be a terminal device configured with a target client, which may include but is not limited to at least one of the following: a mobile phone (such as an Android phone, an iOS phone, etc.), a laptop, a tablet computer, a PDA, a MID (Mobile Internet Devices), a PAD, a desktop computer, a smart TV, etc. The target client may be a PCB board design client, a drawing viewing client, and other clients that support the provision of PCB board detection tasks. The network may include but is not limited to: a wired network, a wireless network, wherein the wired network includes: a local area network, a metropolitan area network, and a wide area network, and the wireless network includes: Bluetooth, WIFI, and other networks that implement wireless communication. The server may be a single server, or a server cluster consisting of multiple servers, or a cloud server. The above is only an example, and this embodiment does not impose any limitation on this.
[0036] Optionally, in this embodiment, the above-mentioned PCB board detection method can be applied to, but not limited to, the scenario of designing a PCB board. For example, when a designer is designing a PCB board, after drawing the wiring on the drawing board, he can perform a frame selection operation on the routing in the interface, and can frame select multiple routings. In response to the frame selection operation on the routing, the terminal device can determine multiple target routings, and search for layer-changing vias and routings on the second layer for each target routing. Then, based on the layer-changing vias and the routings on the two layers, it is determined whether the target routing has self-interference. The interference situation of each routing can be obtained, and the differential routing of each routing can be identified to obtain a merged result. This is to achieve rapid detection of the PCB board.
[0037] The above usage scenarios are only examples, and any scenario related to the detection of PCB boards can utilize the solution of the present application. This embodiment does not impose any limitation on this.
[0038] Through the present application, in response to the frame selection operation of the routing in the first layer, the first target routing is determined in the first layer, wherein the first layer is used to indicate the layer where the routing exists in the PCB board; the second layer is determined according to the layer where the layer-changing via of the first target routing is located, and the second target routing in the second layer is determined, wherein the layer-changing via is used to connect different layers in the PCB board, and the second target routing is a routing with electrical continuity with the first target routing; the first target angle is determined based on the origin coordinates of the layer-changing via and the endpoint coordinates of the first target routing, and the second target angle is determined based on the origin coordinates of the layer-changing via and the endpoint coordinates of the second target routing; when the first target angle and the second target angle meet the preset conditions, the detection result of the first target routing is determined to be the existence of self-interference. After receiving the frame selection operation of the user, the position of the layer-changing via of the target routing can be quickly detected, the second layer after the via is changed, and the second target routing can be obtained, and the directions of the first target routing and the second target routing are automatically detected to be the same, and the detection result is output to the user. Thus, the technical problem of low efficiency in the current PCB board differential routing interference detection in the related art is solved.
[0039] In this embodiment, a method for detecting a PCB board is provided. Figure 2 is a flow chart of an optional PCB board detection method according to an embodiment of the present application, such as Figure 2 As shown, the PCB board detection method includes:
[0040] Step S202, in response to a frame selection operation on the routing in the first layer, determining a first target routing in the first layer, wherein the first layer is used to indicate a layer in the PCB board where the routing exists;
[0041] It should be noted that when the differential signal passes through different layers of the PCB (printed circuit board) (through vias), if the routing directions of the first layer and the second layer are the same (same in and same out), it will cause signal self-interference and reduce signal quality.
[0042] Figure 3 is a schematic diagram of routing at different levels of an optional PCB board according to an embodiment of the present application; Figure 3As shown in the figure, the directions of the routing lines at different levels are different. It can be seen intuitively from the side view and the top view that the routing lines of the first level and the routing lines of the second level are on both sides of the via. In the side view, the first target routing line 302 is on the left side of the layer-changing via 306, and the second target routing line 304 is on the right side of the layer-changing via 306. In the top view, the first target routing line 302 and the first reference routing line 308 are on the left side of the via, and the second target routing line 304 and the second reference routing line 310 are on the right side of the via.
[0043] Figure 4 is a schematic diagram of different layers of routing of another optional PCB board according to an embodiment of the present application; Figure 4 As shown, the directions of the routing lines at different levels are the same. From the side view and the top view, it can be intuitively seen that the routing lines of the first level and the routing lines of the second level are on the same side of the via. In the side view, the routing lines 402 of the first level are on the left side of the layer-changing via 406, and the routing lines 404 of the second level are on the right side of the layer-changing via 406. In the top view, the routing lines 402 of the first level are on the left side of the via, and the routing lines of the second level are on the right side of the via.
[0044] In an optional embodiment, the system can provide a user interface that allows engineers to select the traces that need to be checked in a certain layer (first layer) in the PCB design software through a box selection operation. The purpose of this operation is to separate the traces that need to be checked from the complex design of the entire PCB to facilitate subsequent automatic detection. The traces selected by the box will be regarded as the first target traces, which are usually electrically continuous in the same layer, that is, they transmit the same signal or data.
[0045] It should be noted that the layers of the PCB board are used to indicate the different layers for arranging the traces, which can be signal layers, power layers or ground layers. For PCB boards, it can be a single-sided PCB: only one side is used for arranging traces, and the other side is usually used for component installation. Double-sided PCB: Contains two signal layers, usually called the top layer (Component Side) and the bottom layer (Solder Side). The two layers are connected by vias (Vias). Multilayer PCB: A PCB with more than two layers, usually including four or more layers. Multilayer boards can contain a combination of signal layers, power layers and ground layers. Signal Layers: The layers used to arrange traces, which can be single-layer or multi-layer. Signal layers are used to transmit electrical signals. Power Layers: Layers dedicated to power distribution, usually used in conjunction with ground layers to provide stable power supply and reduce noise. Ground Layers: Layers used to provide a common ground reference, which helps reduce electromagnetic interference (EMI) and improve signal integrity. Inner Layers: In a multilayer board, the layers between the outermost layers (top and bottom) are called inner layers. Outer Layers: The outermost layers in a multilayer board, usually the top and bottom layers. The PCB board in this application can be any type of circuit board except a single-layer board.
[0046] Step S204, determining a second layer according to the layer where the layer-changing via of the first target routing line is located, and determining a second target routing line in the second layer, wherein the layer-changing via is used to connect different layers in the PCB board, and the second target routing line is a routing line having electrical continuity with the first target routing line;
[0047] In an optional embodiment, the system automatically detects the layer-changing vias on the first target trace, which are key points connecting different layers of the PCB. Based on the location of the layer-changing vias, the system will determine the other layer (the second layer) to which the vias are connected, and further identify the traces in the second layer that are electrically continuous with the first target trace, i.e., the second target trace. This electrical continuity means that the two traces achieve continuous signal transmission at the vias, which is the basis for maintaining the integrity of differential signals between different layers.
[0048] It should be noted that a via is a common hole drilled at the intersection of the wires that need to be connected in each layer in a double-sided board and a multi-layer board to connect the printed wires between the layers. Vias are divided into two categories based on their functions: 1) inter-layer electrical connection; 2) device fixation or positioning. From a process perspective, they are divided into three categories: through-hole (PTH / NPTH), blind via, and buried via. Via function: Electrical connection: The core function of vias is electrical connection. It transmits signals from different layers through vias to ensure electrical connection between electronic components. Connecting the power supply and ground layer: In a multi-layer PCB design, vias can connect the power supply layer and the ground layer, making the power supply of the entire circuit more stable and reducing power supply noise and interference. Heat dissipation: In some high-power circuits, vias can also play a role in heat dissipation. By transferring heat from the PCB component layer to the heat dissipation layer or an external heat sink, vias can effectively help reduce the overall temperature of the PCB. Layer-changing vias are vias that achieve electrical connection and can achieve inter-layer electrical connection. That is, in addition to the layer-changing vias, there may be vias with other functions on the PCB board. The present application can determine the layer-changing vias from a plurality of vias.
[0049] Step S206, determining the tangent angle of the line between the origin coordinates of the layer-changing via and the endpoint coordinates of the first target routing in the via coordinate system as the first target angle, and determining the tangent angle of the line between the origin coordinates of the layer-changing via and the endpoint coordinates of the second target routing in the via coordinate system as the second target angle, wherein the via coordinate system is a coordinate system with the origin coordinates of the layer-changing via as the origin and the coordinate axis direction being the same as the reference coordinate system of the PCB board;
[0050] In an optional implementation, the system calculates two target angles based on the origin coordinates of the layer-changing via (i.e., the coordinates of the center point of the via), and the endpoint coordinates of the first target route and the second target route. The first target angle refers to the direction of the first target route from the origin of the via to its endpoint, while the second target angle reflects the corresponding direction of the second target route. Calculated by angle.
[0051] It should be noted that the via coordinate system is a coordinate system determined by the origin coordinates of the layer-changing via as the origin and the coordinate axis direction of the coordinate system where the current PCB board is located. The direction of its x-axis is the same as the x-axis direction of the coordinate system where the PCB board is located, and the direction of its y-axis is the same as the y-axis direction of the coordinate system where the PCB board is located.
[0052] The specific method of angle calculation will be explained later and will not be repeated here.
[0053] Step S208 , when the first target angle and the second target angle are located on the same side of the via coordinate system, determining that the detection result of the first target routing line is that signal interference exists.
[0054] It should be noted that the system checks whether the first target angle and the second target angle meet the preset conditions. The preset conditions usually refer to whether the first target angle and the second target angle indicate that the routing has the same entry and exit directions at the via. If the angle calculation result shows that the first target routing and the second target routing have the same entry and exit directions at the via position, the system determines that there is serious signal interference in the differential signal, marks the via position and related routing information as part of the detection result, and prompts the user to make corrections.
[0055] It should be noted that the via coordinate system can be divided into a left side and a right side, wherein the second quadrant and the third quadrant are located on the left side, and the first quadrant and the fourth quadrant are located on the right side.
[0056] The implementation methods of this application are expected to significantly improve the signal integrity in PCB design and reduce signal quality issues caused by the same input and output routing. In practical applications, it can not only improve the work efficiency of engineers and reduce duplication of work, but also improve the accuracy of the design and reduce potential failure points, thereby improving the quality and performance of PCB design as a whole. This technology is particularly important for complex PCB designs that need to process high-speed signals, such as server motherboards, communication equipment motherboards, etc., and can ensure the stability and integrity of signals at high data transmission rates.
[0057] Through the present application, in response to the frame selection operation of the routing in the first layer, the first target routing is determined in the first layer, wherein the first layer is used to indicate the layer where the routing exists in the PCB board; the second layer is determined according to the layer where the layer-changing via of the first target routing is located, and the second target routing in the second layer is determined, wherein the layer-changing via is used to connect different layers in the PCB board, and the second target routing is a routing with electrical continuity with the first target routing; the first target angle is determined based on the origin coordinates of the layer-changing via and the endpoint coordinates of the first target routing, and the second target angle is determined based on the origin coordinates of the layer-changing via and the endpoint coordinates of the second target routing; when the first target angle and the second target angle meet the preset conditions, the detection result of the first target routing is determined to be that there is signal interference. After receiving the frame selection operation of the user, the position of the layer-changing via of the target routing can be quickly detected, the second layer after the via is changed, and the second target routing can be obtained, and the directions of the first target routing and the second target routing are automatically detected. Whether the directions are the same, the detection result is output to the user. Thus, the technical problem of low efficiency in the current PCB board differential routing interference detection in the related art is solved.
[0058] In an optional embodiment, after determining the first target routing in the first layer, the above also includes: determining a first reference routing from multiple candidate routings in the first layer according to an identifier of the first target routing, wherein the first reference routing and the first target routing are a group of differential routings.
[0059] It should be noted that in PCB design, differential routing consists of two routings with opposite electrical characteristics, which are usually used for high-speed signal transmission to reduce signal interference and improve signal integrity. When it is necessary to switch signals between different layers on the board, differential routing is achieved through vias to switch layers from the first layer to the second layer. However, if the positive signal routing on the first layer and the negative signal routing on the second layer "enter and exit at the same time" (i.e. in the same direction) at the via position, it may introduce signal interference itself and affect signal quality.
[0060] In an optional embodiment, in response to the operation of selecting the routing in the first layer in the PCB design software, the system automatically identifies and determines the routing in the selected area as the first target routing. These routings are usually marked with a unique identifier (dbid) to facilitate subsequent processing.
[0061] After determining the first target routing, the system needs to further identify the first reference routing that forms a differential pair with it. This process can be performed based on the routing identifier (dbid) and signal name (net). Specifically, the system can first obtain its signal name through the identifier of the first target routing. Next, the system will search for routings with signal names similar to the first target routing, but ending with "P" or "N", from the multiple candidate routings selected in the box, and use them as the first reference routing. For example, if the signal name of the first target routing is "DATA_P", the routing with the signal name "DATA_N" will be considered as the first reference routing. This is because the positive signal routing of the differential signal usually ends with "P", while the negative signal routing ends with "N".
[0062] Through the above implementation of the present application, the complexity and potential errors in manual comparison are avoided by automatically identifying the differential routing group, ensuring the accuracy and efficiency of the detection. This is particularly important for complex PCB designs that process high-speed signals, such as server motherboards, communication equipment motherboards, etc., and can effectively improve the design quality, reduce signal interference, and improve the stability of electrical performance. In summary, determining the first reference routing according to the identifier of the first target routing is a key step in the technology of automatically detecting the same-in and same-out routing of differential signal vias. It ensures that the system can accurately identify and process differential signal pairs, providing engineers with efficient and accurate signal integrity analysis tools.
[0063] In an optional embodiment, the above-mentioned determining the first reference routing from the multiple routings on the first level according to the identifier of the first target routing includes: determining the signal name of the candidate routing according to the identifiers of the multiple candidate routings on the first level, and determining the signal name of the first target routing according to the identifier of the first target routing; when the last digit of the signal name of the first target routing is a positive signal digit, the candidate routing whose signal name is the same as the signal name of the first target routing except for the last digit and the last digit is a negative signal digit is determined as the first reference routing; when the last digit of the signal name of the first target routing is a negative signal digit, the candidate routing whose signal name is the same as the signal name of the first target routing except for the last digit and the last digit is a positive signal digit is determined as the first reference routing.
[0064] As mentioned earlier, in the field of PCB design, differential routing usually consists of two lines, transmitting signals with a phase difference of 180 degrees, the positive signal routing (usually marked with "P") and the negative signal routing (usually marked with "N"). The automated detection system needs to accurately distinguish and pair these two routings to determine whether they enter and exit at the same time when the via changes layers, so as to avoid self-interference of the signal. The first step in this process is to determine the first target routing, followed by identifying the first reference routing paired with it from the multiple routings on the first layer to form a differential routing pair.
[0065] In an optional implementation, in response to the user's operation of selecting a certain level of routing to be detected, the program can obtain the routing's dbid based on the selected routing, and store the routing's dbid in the array list_line_dbid={line1_dbid, line2_dbid...}. The system reads their identifiers (dbid) from the multiple candidate routings list_line_dbid selected, and uses these identifiers to obtain the corresponding signal names. At the same time, the system also reads the identifier of the first target routing to determine its signal name. The signal name is the basis for distinguishing different signal routings, and usually contains information such as the type and function of the signal. For differential routing, the signal names of the positive and negative signal routings differ only in the last digit. The positive signal routing usually ends with "P" and the negative signal routing ends with "N".
[0066] In an optional implementation, data can be taken out one by one from list_line_dbid. For example, if the data taken out is line1_dbid, line1_net can be obtained through line1_dbid->net to read the signal name of the routing line, and then the signal names of other routing lines in the array, line2_net..., are obtained by the same method. Line1_net is compared with the signal names of other routing lines one by one. If the signal name is different only in the last digit and is "P" or "N", the two lines are a group of differential lines. It is assumed that line1_net and line2_net meet the conditions to be a group of differential lines.
[0067] This identification process is based on the characteristics of the differential routing naming rules, that is, the positive signal routing and the negative signal routing have the same names except for the last digit of the identifier. Through precise signal name comparison, the system can automatically and accurately pair the differential routing, providing the necessary information for subsequent same-in and same-out detection.
[0068] Through the above implementation of the present application, the workflow of engineers is simplified, the time and effort required for manual inspection is reduced, and potential pairing errors are avoided through automated signal name comparison, ensuring the accuracy and comprehensiveness of detection. For complex PCB designs that process high-speed signals, such as server motherboards, communication equipment motherboards, etc., the application of this technology can greatly improve signal integrity and design quality, reduce signal interference, and improve the stability of electrical performance. By automatically identifying the first reference routing according to the identifier of the first target routing, automated pairing of differential routing pairs is achieved, providing a solid foundation for subsequent same-in and same-out detection.
[0069] In an optional embodiment, the second layer is determined based on the layer where the layer-change via of the first target routing is located, including: searching for the layer-change via in the first layer; determining information of two layers where the layer-change via exists and interconnects the routing; and determining the layer that is different from the first layer in the two layers where the layer-change via exists and interconnects the routing as the second layer.
[0070] As mentioned earlier, in PCB design, vias are an important structure used to connect traces on different levels, allowing signals to be transmitted between multiple layers of a PCB to achieve complex circuit layouts and connections. For differential signals, ensuring that the trace directions on the first and second levels at the via location are different (i.e., not in and out at the same time) is critical to maintaining signal integrity and reducing signal interference. Automated inspection systems can quickly detect and avoid these potential problems by identifying vias and determining the second level they connect to.
[0071] In an optional implementation, the system first needs to identify the locations of all layer-changing vias in the first layer selected by the box. Layer-changing vias are key elements used to connect different layers in PCB design. They are usually identified in a specific way in the design software, such as by their attributes or location characteristics. The system automatically scans and locates all layer-changing vias through built-in search algorithms or specific functions (such as getAllVias()), thereby providing a basis for subsequent analysis.
[0072] Once the location of the layer-changing via is determined, the system next needs to obtain information about the two layers connected by the via. In PCB design, each via has specific properties, including the layer it connects to. The system calls the corresponding attribute reading function (such as via_dbid->Layers) through the dbid of the via to obtain the name or number of the two interconnected layers. Typically, a via transfers a signal from the current layer (first layer) to another layer (second layer), and these two layers together constitute the interconnect structure of the via. After obtaining the two-layer information of the interconnected traces, the system will determine the layer that is different from the first layer as the second layer. This is because the first target trace is located on the first layer, and the other trace of the differential signal (i.e., the second target trace) changes layers to the second layer at the via location.
[0073] In an optional implementation, two layers of information of interconnected lines in the layer-changing vias can be obtained through via1_dbid->Layers, which are respectively recorded as layer1 and layer2, and compared with line1_dbid->layer. If they are different, it means that line1 is transferred to this layer through the vias. Here, it is assumed that layer2 is different from line1_layer. Then layer2 can be determined to be the second layer.
[0074] It should be noted that in the process of via location and identification, the system traverses all elements of the first layer and uses specific functions to identify the layer-changing vias, which is usually based on the properties and location characteristics of the vias. In the process of reading layer information, the system uses the dbid of the via to call the API of the design software to read the two layer information connected to it, which includes the name, number or location parameters of the layer. In the process of determining the second layer, the system automatically excludes the first layer by comparing the two layer information obtained, and determines the other layer as the second layer. This is the basis for subsequent detection of the same-in and same-out situation.
[0075] Through the above implementation of the present application, it is possible to ensure that the system automatically and accurately identifies the layer change of differential signal vias, avoiding omissions and errors in manual inspection. The implementation of this process not only reduces the workload of engineers and improves detection efficiency, but also ensures the correct transmission of high-speed signals in the design, reduces the risk of signal interference, and thus improves the overall performance and stability of PCB design. By identifying vias, obtaining interconnection level information, and accurately determining the second level, the system can effectively detect and correct potential signal interference problems, providing powerful tool support for modern complex circuit board design.
[0076] In an optional embodiment, the above-mentioned search for layer-changing vias in the first layer includes: determining the starting point coordinates and the ending point coordinates of the first target routing; determining the candidate vias in the first layer; calculating the distance between the starting point and the ending point of the first target routing and the candidate vias in the first layer according to the starting point coordinates or the ending point coordinates, and determining the candidate vias corresponding to the distance 0 as the layer-changing vias.
[0077] As mentioned earlier, in PCB design, vias are the infrastructure for signal transmission between different layers. Vias can be classified according to their type, application, etc. In the process of looking for layer-changing vias, it is expected to find vias that can achieve electrical connection between different layers among the multiple vias that may exist.
[0078] In an optional implementation, the system first reads the starting and ending coordinates of the first target trace (i.e., the trace to be detected), which are the specific locations of the trace in the first layer of the PCB. By calling the relevant API functions of the design software, such as line_dbid->startLocation or line_dbid->endLocation, the system can obtain the precise coordinates of both ends of the trace, providing a data basis for subsequent via identification and direction analysis.
[0079] It should be noted that the system can identify all possible vias in the first layer as candidate vias. This process can be achieved by calling the global via retrieval function of the design software (such as getAllVias()). The obtained candidate via set will be used for subsequent distance calculation with the starting or ending coordinates of the target routing to determine the real layer-changing via.
[0080] In an optional embodiment, the system uses the starting point coordinates or the ending point coordinates of the first target routing to calculate the distance between them and all candidate vias in the first layer. The distance calculation is based on the principle of coordinate geometry and is achieved by calculating the Euclidean distance from point to point. When the calculated distance is 0, this indicates that the candidate via is exactly located at the starting point or the ending point of the routing, so the via can be determined as a layer-changing via. This process ensures that all layer-changing vias associated with the target routing are accurately identified through continuous iteration and comparison, providing accurate via location information for subsequent same-in and same-out detection.
[0081] In an optional implementation, the getAllVias() function can be used to obtain the dbid of all vias in the PCB board design, and the return value is stored in the candidate via array Vias_dbid, Vias_dbid={via1_dbid, via2_dbid…}. Then take out an element via1_dbid from Vias_dbid, and the coordinates of the candidate via (via1_x via1_y1) can be obtained through via1_dbid->Location. The coordinates of other candidate vias can also be obtained by this method. The x and y coordinates of the starting point of the first target line line1 can be subtracted from the x and y coordinates of the via, that is, line1_x1-via1_x, line1_y1-via1_y1. If the difference between the x and y coordinates is 0, there is a layer-changing via via1 at the starting point of line1.
[0082] It should be noted that the system accurately reads the coordinates of the starting and ending points of each routing line by calling the API function of the design software to ensure the accuracy of subsequent calculations. Using the global search function provided by the design software, the collection information of all vias on the first layer can be obtained as candidate vias for distance calculation. The system can accurately calculate the distance between the starting or ending point of the target routing line and the candidate vias through coordinate geometry calculation methods, which is the basis for identifying layer-changing vias. The system compares the distance calculation result with 0, and the vias with a distance of 0 are considered to be layer-changing vias. This judgment ensures the accuracy and effectiveness of via identification.
[0083] Through the above implementation of the present application, by determining the starting and ending coordinates of the target routing, identifying the candidate vias in the first layer, and accurately calculating the distance to confirm the layer-changing vias, it is a key step to ensure efficient and accurate signal integrity detection. It not only simplifies the signal integrity analysis in PCB design, but also provides a strong technical guarantee for modern high-speed circuit board design. It significantly reduces the burden of engineers manually checking vias in complex PCB designs, improves detection efficiency, and at the same time ensures the accuracy of via identification through accurate coordinate calculation and distance judgment, reducing potential signal integrity problems. For the design of modern high-speed electronic equipment, such as server motherboards, communication equipment motherboards, etc., the implementation of this technology has a value that cannot be ignored in improving signal quality and design reliability.
[0084] In an optional implementation manner, the determining of candidate vias in the first layer includes at least one of the following:
[0085] (1) Taking the starting point of the first target routing as the starting point, extend the detection signal link forward and backward, and obtain the information of all vias on the link, and determine all vias on the link as candidate vias;
[0086] (2) Taking the end point of the first target routing as the starting point, extend the detection signal link forward and backward, obtain the information of all vias on the link, and determine all vias on the link as candidate vias.
[0087] As mentioned above, after determining the starting point and end point coordinates of the first target routing, as well as the candidate vias, the layer-changing vias of the first target routing can be determined. However, for a complex PCB board, the amount of calculation required to calculate all vias in the first layer as candidate vias is large, so the vias that may be layer-changing vias can be determined as candidate vias.
[0088] In an optional embodiment, the system can start from the starting point of the first target routing and extend the detection signal link forward and backward. This means that the system will search in two directions along the path of the signal routing to ensure that the entire link of the signal from the starting point to the end point is covered. In this process, the system will obtain information about all vias encountered on the signal link, including the coordinates of the vias, layer connection information, etc. All these vias will be considered as candidate vias because they may be the location where the signal changes layers, and it is necessary to further determine whether they constitute a situation of same entry and same exit.
[0089] In an optional implementation, similarly, the system can also start from the end point of the first target routing, extend the detection signal link forward and backward, and obtain all via information on the link. As with the case of starting from the starting point, this process also ensures that all possible layer-changing via positions are covered, improving the comprehensiveness and accuracy of the detection. Detecting the vias on the link from the end point is a key step to ensure that each via position on the signal path is checked, and is also an important guarantee for achieving differential signal integrity and avoiding omissions.
[0090] In an optional implementation, the system can search in two directions from the starting point and the end point of the target routing at the same time, thereby realizing bidirectional detection of the signal link and ensuring comprehensive coverage of the detection. The system can use the API or function provided by the design software to obtain detailed information of all vias on the link, providing data support for subsequent judgments. Any via encountered on the signal link will be marked as a candidate via, which is the basis for subsequent judgment of whether it is a layer-changing via. The system needs to process and store the acquired via information for subsequent analysis. This usually involves the design of data structures, such as using arrays or lists to store the dbid or other key information of the via. The system can extend the detection signal link in two directions from the starting point and the end point coordinates respectively, not just from one direction, to ensure the integrity of the detection.
[0091] Through the above-mentioned implementation mode of the present application, by bidirectionally detecting the signal link from the starting point and the end point of the target routing and determining all vias as candidate vias, it is a key step to achieve comprehensive and efficient signal integrity detection. By bidirectionally detecting and determining all vias as candidate vias on the signal link, this technical step provides a solid foundation for the automated detection of differential signal vias with the same entry and exit routing. It ensures the comprehensiveness and accuracy of the detection process and avoids omissions and subjective judgment errors in manual inspection. When processing high-speed signals and high-density PCB designs, the application of this technology can significantly improve the detection efficiency of signal integrity, reduce the design cycle, and improve the design quality and reliability, which is of great significance for the performance optimization of modern electronic equipment.
[0092] In an optional embodiment, the tangent angle of the line between the origin coordinates of the layer-changing via and the endpoint coordinates of the first target routing in the via coordinate system is determined as the first target angle, including: determining a routing segment of the first target routing located in the layer-changing via, and determining the coordinates of the endpoints of the routing segment located partially outside the layer-changing via and partially inside the layer-changing via located on the side outside the layer-changing via; calculating a first tangent value between the endpoint and the origin using the endpoint coordinates and the origin coordinates of the layer-changing via, and determining a first tangent value according to the first tangent value. a target angle; determining the tangent angle of the line between the origin coordinates of the layer-changing via and the endpoint coordinates of the second target routing in the via coordinate system as the second target angle, including: determining the routing segment of the second target routing located in the layer-changing via, and determining the coordinates of the endpoints of the routing segment located partially outside the layer-changing via and partially inside the layer-changing via on the side outside the layer-changing via; calculating the second tangent value between the endpoint and the origin using the endpoint coordinates and the origin coordinates of the layer-changing via, and determining the second target angle according to the second tangent value.
[0093] It should be noted that the system can first determine the routing segments of the first target routing and the second target routing that are partially located inside the layer-changing via and partially outside the via. For these segments, the goal is to obtain the coordinates of the endpoints located on the outside side of the via. This information is the basis for subsequent angle calculations. By calling the API or function of the design software, the system can obtain the coordinate information of the routing segment, including the x and y coordinates of the external endpoints of the via.
[0094] Figure 5 is a schematic diagram of vias and routing of an optional PCB board according to an embodiment of the present application; Figure 5 As shown, the first target routing 502 and the second target routing 504 are routings on two levels passing through the layer-changing via 506. It can be seen that the first target routing 502 and the second target routing 504 are both composed of multiple routing segments, some of which are located in the layer-changing via 506 and some are located outside the layer-changing via 506. The first reference routing 508 and the second reference routing 510 may also have routing segments that are partially located in the reference layer-changing via 512 and partially located outside the reference layer-changing via 512.
[0095] In an optional embodiment, the system can use the coordinates of the external endpoint of the via and the coordinates of the origin of the via to calculate the tangent value between the endpoint and the origin, that is, the slope of the routing direction. Specifically, the system calculates tan((y_first-via1_y1) / (x_first-via1_x)), where (x_first y_first) can be the coordinates of the endpoint of the routing outside the via. Based on the obtained tangent value, the system can determine the first target angle (θ1) and the second target angle (θ2), which is usually achieved through the inverse trigonometric function arctan(tangent), giving the azimuth of the routing relative to the origin of the via.
[0096] In an optional implementation, the system can establish a coordinate system based on the origin coordinates of the via, and define the directions of the x-axis and y-axis to facilitate the calculation of angles. The coordinates of via1 can be used as the origin to set the coordinate system, with the right being the positive direction of the x-axis and the upward direction being the positive direction of the y-axis. The left and right directions can be consistent with the directions of the reference coordinate system of the PCB design system. The system can accurately identify the coordinates of the external endpoints of the vias in the routing segments, which is the basis for calculating tangent values and angles. Through the calculated first target angle and second target angle, the system needs to determine whether the two angles meet the conditions of non-same entry and exit, whether they deviate from 180 degrees or are in different quadrants. The system needs to store and process the calculated angles for subsequent analysis and result output, which involves the design and optimization of data structures.
[0097] Figure 6 is a schematic diagram of an optional via coordinate system of a PCB board according to an embodiment of the present application; Figure 6 As shown, with the layer-changing via origin 606, the coordinate system is set, the right is the positive direction of the x-axis, the upward is the positive direction of the y-axis, the first target endpoint 602 is located outside the layer-changing via, and the other endpoint of this route is located in the via area. An auxiliary line is drawn from the layer-changing via origin 606 to the first target endpoint 602 coordinate (x_first y_first), which can be calculated by arctan((y_first-via1_y1) / (x_first-via1_x)), that is, angle a. Similarly, the second target route also has a section, one end of which is in the via area and the other end is not in the via area. Assuming that the coordinates of the second target endpoint 604 of the route that is not in the via area are (x_second y_second), then angle b=arctan((y_second-via1_y1) / (x_second-via1_x)). If either (a≤270 and b≥270) or (b≤90 and a≥90) is met, it means that the traces do not enter and exit the same via position.
[0098] Through the above-mentioned implementation mode of the present application, by automatically calculating the first target angle and the second target angle, the signal direction at the differential signal via can be accurately determined to avoid self-interference of signals entering and exiting at the same time, which is crucial to maintaining the integrity of high-speed signals and improving the reliability of PCB design.
[0099] In an optional embodiment, in the above-mentioned case where the first target angle and the second target angle are located on the same side of the via coordinate system, determining that the detection result of the first target routing is that there is self-interference includes: when the first target angle indicates that the first target routing is located in the second quadrant or the third quadrant of the via coordinate system, and the second target angle indicates that the second target routing is located in the first quadrant or the fourth quadrant of the via coordinate system, determining that the first target routing and the second target routing are not in the same entry and exit; when the first target angle indicates that the first target routing is located in the second quadrant or the third quadrant of the via coordinate system, and the second target angle indicates that the second target routing is located in the second quadrant or the third quadrant of the via coordinate system, determining that the first target routing and the second target routing are in the same entry and exit, and determining that the detection result of the first target routing is that there is signal interference.
[0100] In an optional implementation, the system can divide the angle range into four quadrants based on the coordinate system established by the via origin coordinates: the first quadrant (0° to 90°), the second quadrant (90° to 180°), the third quadrant (180° to 270°) and the fourth quadrant (270° to 360° or 0°). This angle judgment strategy is based on the characteristics of differential signals, that is, the positive signal routing and the negative signal routing should be on different sides to avoid interference from the same entry and exit.
[0101] In an optional implementation, a may be the first target angle, and b may be the second target angle. If (a≤270 and b≥270) or (b≤90 and a≥90) satisfies one of the two conditions, it means that the traces do not enter and exit the same via position.
[0102] Through the above-mentioned implementation mode of the present application, in the method of automatically detecting the same entry and exit routing of differential signal vias, by accurately comparing the quadrants in which the first target angle and the second target angle are located, the automatic judgment of the signal's own interference is achieved. When processing complex PCB designs, the application of this technology greatly simplifies the signal integrity detection process, reduces the workload of engineers, and improves detection efficiency and design quality.
[0103] In an optional embodiment, after the first reference routing is determined, the method further includes: detecting the first reference routing, and when the detection result of the first reference routing is that signal interference exists, determining that the detection result of the first target routing is that signal interference exists.
[0104] In an optional embodiment, the above-mentioned detection of the first reference routing includes: determining a reference layer change via of the first reference routing, and determining a second reference routing in the second layer, wherein the reference layer change via is used to connect the first layer and the second layer in the PCB board, and the second reference routing is a routing having electrical continuity with the first reference routing; determining a first reference angle based on the origin coordinates of the reference layer change via and the endpoint coordinates of the first reference routing, and determining a second reference angle based on the origin coordinates of the reference layer change via and the endpoint coordinates of the second reference routing; when the first reference angle and the second reference angle meet preset conditions, determining that the detection result of the first reference routing is that signal interference exists.
[0105] In an optional embodiment, the system can determine the layer-changing vias that the "first reference trace" passes through on the PCB board. This via is used to connect the first layer and the second layer and is the key point for signal layer switching. Through the via detection steps described previously, the system can accurately identify the location of the layer-changing vias on the first reference trace. Next, the system needs to determine a "second reference trace" on the second layer that has electrical continuity with the first reference trace. This means that the second reference trace is a direct continuation of the first reference trace after the via changes layers, that is, the two traces are connected in the circuit through the reference layer-changing vias.
[0106] It should be noted that if the detection result of the first reference routing indicates that there is signal interference, that is, when the first reference routing and the second reference routing enter and exit at the same time when the via changes layers, then the system can infer that the first target routing (that is, another routing that is a differential pair with the first reference routing) also has the risk of signal interference. This is based on the characteristics of differential routing, that is, positive and negative phase routing usually maintain consistent paths and layer change strategies in the design.
[0107] Based on the detection result of the first reference routing, the system outputs the detection status of the first target routing. If the first reference routing detects signal interference, the detection result of the first target routing will also be marked as signal interference, prompting engineers to check and modify this pair of differential routing to avoid signal quality problems.
[0108] Figure 7 is a schematic diagram of another optional via coordinate system of a PCB board according to an embodiment of the present application; Figure 7As shown, with reference to the origin of the layer-changing via 706, the coordinate system is set, the right is the positive direction of the x-axis, the upward is the positive direction of the y-axis, the first reference endpoint 702 indicates the endpoint of a section of the first reference routing, this endpoint is located outside the via, and the other endpoint of this routing section is located in the via area. Draw an auxiliary line from the via coordinates to the coordinates of the first reference endpoint 702 (x_first y_first), which can be calculated by arctan((y_first-via1_y1) / (x_first-via1_x)), that is, angle a. Similarly, the second reference routing also has a section, one end of which is in the via area and the other end is not in the via area. Assuming that the coordinates of the second reference endpoint 704 of the routing section not in the via area are (x_second y_second), then angle b=arctan((y_second-via1_y1) / (x_second-via1_x)). If either (a≤270 and b≥270) or (b≤90 and a≥90) is met, it means that the traces do not enter and exit the same via position.
[0109] Through the above-mentioned implementation mode of the present application, by determining the reference layer-changing via of the first reference routing, identifying the second reference routing, and calculating and comparing the relevant angles, the automatic judgment of the interference situation of the first reference routing signal itself is achieved, thereby improving the accuracy of detection.
[0110] In an optional embodiment, the above method also includes: when the detection result of the first target routing is that there is no signal interference and the detection result of the first reference routing is that there is no signal interference, detecting the layer change via at the end point of the second target routing; when there is a layer change via connected to the third layer at the end point of the second target routing, detecting the third target routing on the third layer; when the third target routing is that there is signal interference, determining that the detection result of the first target routing is that there is signal interference.
[0111] It should be noted that in PCB design, the automated detection system should not only pay attention to the layer-changing vias between the first and second layers of the differential pair, but also fully consider all layer-changing points in the signal path to ensure comprehensive detection of signal integrity. When the two traces in the differential signal pair (the first target trace and the first reference trace) do not find the self-interference problem of the same entry and exit in the preliminary detection, the system needs to further check whether there is a layer change to the third layer at the end point of the second target trace, and whether this layer change will cause signal self-interference.
[0112] In an optional embodiment, the system confirms that the detection results of the first target routing (usually one routing in the differential pair) and the first reference routing (the other routing in the differential pair) are both free of self-interference. This means that in the preliminary detection of these two routings, no signal direction problem of the same entry and exit was found, and the signal was in the opposite direction at the layer-changing via between the first layer and the second layer, and the signal integrity was good. Subsequently, the system will pay attention to whether there is a via that changes layers to the third layer at the end point of the second target routing. This is based on the actual situation that the differential signal may change layers at multiple points on the signal path to ensure the comprehensiveness of the signal integrity detection. If a layer-changing via connected to the third layer is found at the end point of the second target routing, the system will further detect the third target routing after the via changes layers, including calculating the third target angle and comparing it with the relevant angles of the first target routing and the second target routing to determine whether there is a signal direction problem of the same entry and exit. If the test result of the third target routing shows that there is self-interference (i.e., it enters and exits the third layer at the same time as the second target routing), then even if there are no problems with the first target routing and the first reference routing in the preliminary test, the system will determine that the final test result of the first target routing is that there is signal interference. This strategy ensures the comprehensiveness of the test, and even if some areas of the signal path perform well in the preliminary test, it can identify potential design problems in the entire signal link, thereby avoiding signal self-interference and ensuring high-quality signal transmission.
[0113] Through the above-mentioned implementation methods of the present application, in summary, in the method of automatically detecting the same-in and -out routing of differential signal vias, by deeply detecting the situation of layer switching to the third layer at the end point of the second target routing and judging whether there is signal interference in the third target routing, a comprehensive detection of all layer-changing vias on the differential signal path is achieved, thereby ensuring signal integrity.
[0114] The following is an embodiment of the detection method based on the above PCB board. When the program starts running, it prompts the user to select the routing to be checked; after receiving the user's selection operation, the program obtains the coordinates of the starting point of the first target routing; the program uses the coordinates of the routing starting point as the starting point to search forward and backward respectively, and records the retrieved positions with the same entry and exit into list_location_of_same_direction. The program can display the results in list_location_of_same_direction to the user. The program can click on each unsatisfied point to automatically jump to the corresponding coordinate position, which is convenient for the user to check and modify.
[0115] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, or by hardware, but in many cases the former is a better implementation method. Based on this understanding, the computer software product is stored in a storage medium (such as ROM / RAM, disk, CD), including several instructions for enabling a terminal device (which can be a computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0116] In this embodiment, a detection device for a PCB board is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0117] Figure 8 is a structural block diagram of an optional PCB board detection device according to an embodiment of the present application, such as Figure 8 As shown, the device comprises:
[0118] A target routing determination module 82 is used to determine a first target routing in the first layer in response to a frame selection operation on the routing in the first layer, wherein the first layer is used to indicate a layer in the PCB board where the routing exists;
[0119] A second layer determination module 84, used to determine the second layer according to the layer where the layer-changing via of the first target line is located, and determine the second target line in the second layer, wherein the layer-changing via is used to connect different layers in the PCB board, and the second target line is a line having electrical continuity with the first target line;
[0120] An angle calculation module 86, used to determine the tangent angle of the line between the origin coordinates of the layer-changing via and the endpoint coordinates of the first target routing in the via coordinate system as the first target angle, and determine the tangent angle of the line between the origin coordinates of the layer-changing via and the endpoint coordinates of the second target routing in the via coordinate system as the second target angle, wherein the via coordinate system is a coordinate system with the origin coordinates of the layer-changing via as the origin and with the same coordinate axis direction as the reference coordinate system of the PCB board;
[0121] The detection result determination module 88 is used to determine that the detection result of the first target routing is that there is signal interference when the first target angle and the second target angle are located on the same side of the via coordinate system.
[0122] Through the present application, in response to the frame selection operation of the routing in the first layer, the first target routing is determined in the first layer, wherein the first layer is used to indicate the layer where the routing exists in the PCB board; the second layer is determined according to the layer where the layer-changing via of the first target routing is located, and the second target routing in the second layer is determined, wherein the layer-changing via is used to connect different layers in the PCB board, and the second target routing is a routing with electrical continuity with the first target routing; the first target angle is determined based on the origin coordinates of the layer-changing via and the endpoint coordinates of the first target routing, and the second target angle is determined based on the origin coordinates of the layer-changing via and the endpoint coordinates of the second target routing; when the first target angle and the second target angle meet the preset conditions, the detection result of the first target routing is determined to be that there is signal interference. After receiving the frame selection operation of the user, the position of the layer-changing via of the target routing can be quickly detected, the second layer after the via is changed, and the second target routing can be obtained, and the directions of the first target routing and the second target routing are automatically detected. Whether the directions are the same, the detection result is output to the user. Thus, the technical problem of low efficiency in the current PCB board differential routing interference detection in the related art is solved.
[0123] Optionally, the target routing determination module 82 is further used to determine a first reference routing from multiple candidate routings on the first layer according to an identifier of the first target routing, wherein the first reference routing and the first target routing are a group of differential routings.
[0124] Optionally, the above-mentioned determining the first reference routing from multiple routings on the first level according to the identifier of the first target routing includes: determining the signal name of the candidate routing according to the identifiers of the multiple candidate routings on the first level, and determining the signal name of the first target routing according to the identifier of the first target routing; when the last digit of the signal name of the first target routing is a positive signal digit, the candidate routing whose signal name is the same as the signal name of the first target routing except for the last digit, and the last digit is a negative signal digit is determined as the first reference routing; when the last digit of the signal name of the first target routing is a negative signal digit, the candidate routing whose signal name is the same as the signal name of the first target routing except for the last digit, and the last digit is a positive signal digit is determined as the first reference routing.
[0125] Optionally, the second level determination module 84 is further used to: search for layer-changing vias in the first level; determine information about two levels where the layer-changing vias have interconnected routing; and determine the level different from the first level in the two levels where the layer-changing vias have interconnected routing as the second level.
[0126] Optionally, the above-mentioned search for layer-changing vias in the first layer includes: determining the starting point coordinates and the ending point coordinates of the first target routing; determining the candidate vias in the first layer; calculating the distances between the starting point and the ending point of the first target routing and the candidate vias in the first layer according to the starting point coordinates or the ending point coordinates, and determining the candidate vias corresponding to the distance 0 as the layer-changing vias.
[0127] Optionally, the above-mentioned determination of candidate vias in the first layer includes at least one of the following: taking the starting point of the first target routing as the starting point, extending the detection signal link forward and backward, and obtaining information of all vias on the link, and determining all vias on the link as candidate vias; taking the end point of the first target routing as the starting point, extending the detection signal link forward and backward, and obtaining information of all vias on the link, and determining all vias on the link as candidate vias.
[0128] Optionally, the angle calculation module 86 is also used to: determine the routing segment of the first target routing located in the layer change via, and determine the coordinates of the endpoints of the routing segment located partially outside the layer change via and partially inside the layer change via on the side outside the layer change via; calculate the first tangent value between the endpoint and the origin using the endpoint coordinates and the origin coordinates of the layer change via, and determine the first target angle based on the first tangent value.
[0129] Optionally, the angle calculation module 86 is further used to: determine the routing segment of the second target routing located in the layer change via, and determine the coordinates of the endpoint of the routing segment located partially outside the layer change via and partially inside the layer change via on the side outside the layer change via; calculate the second tangent value between the endpoint and the origin using the endpoint coordinates and the origin coordinates of the layer change via, and determine the second target angle based on the second tangent value.
[0130] Optionally, the above-mentioned detection result determination module 88 is also used to: when the first target angle indicates that the first target routing is located in the second quadrant or the third quadrant of the via coordinate system, and the second target angle indicates that the second target routing is located in the first quadrant or the fourth quadrant of the via coordinate system, determine that the first target routing and the second target routing are not in the same entry and exit; when the first target angle indicates that the first target routing is located in the second quadrant or the third quadrant of the via coordinate system, and the second target angle indicates that the second target routing is located in the second quadrant or the third quadrant of the via coordinate system, determine that the first target routing and the second target routing are in the same entry and exit, and determine that the detection result of the first target routing is that there is signal interference.
[0131] Optionally, after determining the first reference routing, the method further includes: detecting the first reference routing, and when a detection result of the first reference routing is that signal interference exists, determining that a detection result of the first target routing is that signal interference exists.
[0132] Optionally, the above-mentioned detection of the first reference routing includes: determining a reference layer change via of the first reference routing, and determining a second reference routing in the second layer, wherein the reference layer change via is used to connect the first layer and the second layer in the PCB board, and the second reference routing is a routing having electrical continuity with the first reference routing; determining a first reference angle based on the origin coordinates of the reference layer change via and the endpoint coordinates of the first reference routing, and determining a second reference angle based on the origin coordinates of the reference layer change via and the endpoint coordinates of the second reference routing; when the first reference angle and the second reference angle meet preset conditions, determining that the detection result of the first reference routing is that signal interference exists.
[0133] Optionally, the above-mentioned device also includes: a third detection module, which is used to detect the layer change via at the end point of the second target routing when the detection result of the first target routing is that there is no signal interference and the detection result of the first reference routing is that there is no signal interference; when there is a layer change via connected to the third layer at the end point of the second target routing, detect the third target routing on the third layer; when the third target routing is that there is signal interference, determine that the detection result of the first target routing is that there is signal interference.
[0134] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
[0135] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
[0136] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0137] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0138] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0139] An embodiment of the present application further provides a computer program product, comprising a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program product, and when the computer program is executed by a processor, the steps of the method described in each embodiment of the present application are implemented.
[0140] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.
[0141] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.
[0142] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principles of the present application shall be included in the protection scope of the present application.
Claims
1. A method for detecting a PCB board, characterized in that: The method comprises: In response to a frame selection operation on a routing line in a first layer, determining a first target routing line in the first layer, wherein the first layer is used to indicate a layer in a PCB board where the routing line exists; Determine a second layer according to the layer where the layer-changing via of the first target routing line is located, and determine a second target routing line in the second layer, wherein the layer-changing via is used to connect different layers in the PCB board, and the second target routing line is a routing line having electrical continuity with the first target routing line; The tangent angle of the line between the origin coordinates of the layer-changing via hole and the endpoint coordinates of the first target routing line in the via hole coordinate system is determined as the first target angle, and the tangent angle of the line between the origin coordinates of the layer-changing via hole and the endpoint coordinates of the second target routing line in the via hole coordinate system is determined as the second target angle, wherein the via hole coordinate system is a coordinate system with the origin coordinates of the layer-changing via hole as the origin and the coordinate axis direction being the same as the reference coordinate system of the PCB board; When the first target angle and the second target angle are located on the same side of the via coordinate system, it is determined that the detection result of the first target routing is that signal interference exists.
2. The method according to claim 1, characterized in that: After determining the first target routing in the first layer, the method further includes: A first reference routing line is determined from a plurality of candidate routing lines on the first layer according to an identifier of the first target routing line, wherein the first reference routing line and the first target routing line are a group of differential routing lines.
3. The method according to claim 2, characterized in that The determining a first reference routing line from a plurality of routing lines at the first layer according to the identifier of the first target routing line comprises: Determine the signal name of the candidate routing line according to the identifiers of the plurality of candidate routing lines at the first layer, and determine the signal name of the first target routing line according to the identifier of the first target routing line; When the last digit of the signal name of the first target routing is a positive signal digit, a candidate routing whose signal name is the same as the signal name of the first target routing except for the last digit and whose last digit is a negative signal digit is determined as the first reference routing; When the last digit of the signal name of the first target routing is a negative signal digit, the candidate routing whose signal name is the same as the signal name of the first target routing except for the last digit and whose last digit is a positive signal digit is determined as the first reference routing.
4. The method according to claim 1, characterized in that: The determining the second layer according to the layer where the layer-changing via of the first target routing is located comprises: Searching for the layer-changing via in the first layer; Determine that the layer-changing via has information on two levels of interconnection wiring; A layer different from the first layer among the two layers where interconnection routings exist with the layer-changing via hole is determined as the second layer.
5. The method according to claim 4, characterized in that The step of searching for the layer-changing via hole in the first layer includes: Determine the starting point coordinates and the ending point coordinates of the first target route; determining candidate vias in the first layer; The distances between the starting point and the end point of the first target routing and the candidate via holes in the first layer are calculated according to the starting point coordinates or the end point coordinates, and the candidate via holes corresponding to the distance of 0 are determined as the layer-changing via holes.
6. The method according to claim 5, characterized in that The determining of the candidate vias in the first layer includes at least one of the following: Taking the starting point of the first target routing as the starting point, extending the detection signal link forward and backward, and obtaining information of all vias on the link, and determining all vias on the link as the candidate vias; Taking the end point of the first target routing as the starting point, the detection signal link is extended forward and backward, and information of all vias on the link is obtained, and all vias on the link are determined as the candidate vias.
7. The method according to claim 1, characterized in that The step of determining the tangent angle of a line between the origin coordinates of the layer-changing via hole and the endpoint coordinates of the first target routing line in the via hole coordinate system as a first target angle includes: Determine a routing segment of the first target routing line located in the layer-changing via hole, and determine the coordinates of an endpoint of the routing segment located partially outside the layer-changing via hole and partially inside the layer-changing via hole on a side outside the layer-changing via hole; Calculating a first tangent value between the endpoint and the origin using the endpoint coordinates and the origin coordinates of the layer-changing via hole, and determining the first target angle according to the first tangent value; The step of determining the tangent angle of a line between the origin coordinates of the layer-changing via hole and the endpoint coordinates of the second target routing line in the via hole coordinate system as the second target angle includes: Determine a routing segment of the second target routing line located in the layer-changing via hole, and determine the coordinates of an endpoint of the routing segment located partially outside the layer-changing via hole and partially inside the layer-changing via hole on a side outside the layer-changing via hole; The second tangent value between the endpoint and the origin is calculated using the endpoint coordinates and the origin coordinates of the layer-changing via hole, and the second target angle is determined according to the second tangent value.
8. The method according to claim 7, characterized in that When the first target angle and the second target angle are located on the same side of the via coordinate system, determining that the detection result of the first target routing is that signal interference exists includes: When the first target angle indicates that the first target routing line is located in the second quadrant or the third quadrant of the via coordinate system, and the second target angle indicates that the second target routing line is located in the first quadrant or the fourth quadrant of the via coordinate system, determining that the first target routing line and the second target routing line are not in the same entry and exit; When the first target angle indicates that the first target routing is located in the second quadrant or the third quadrant of the via coordinate system, and the second target angle indicates that the second target routing is located in the second quadrant or the third quadrant of the via coordinate system, it is determined that the first target routing and the second target routing enter and exit the same time, and the detection result of the first target routing is determined to be that signal interference exists.
9. The method according to claim 2, characterized in that: After determining the first reference routing, the method includes: The first reference routing line is detected, and when a detection result of the first reference routing line indicates that signal interference exists, it is determined that a detection result of the first target routing line indicates that signal interference exists.
10. The method according to claim 9, characterized in that The detecting the first reference trace includes: Determine a reference layer-changing via of the first reference routing, and determine a second reference routing in the second layer, wherein the reference layer-changing via is used to connect the first layer and the second layer in the PCB board, and the second reference routing is a routing having electrical continuity with the first reference routing; Determine a first reference angle based on the origin coordinates of the reference layer-changing via hole and the endpoint coordinates of the first reference routing line, and determine a second reference angle based on the origin coordinates of the reference layer-changing via hole and the endpoint coordinates of the second reference routing line; When the first reference angle and the second reference angle meet a preset condition, it is determined that the detection result of the first reference routing is that signal interference exists.
11. The method according to any one of claims 1 to 10, characterized in that The method further comprises: When the detection result of the first target routing line is that there is no signal interference and the detection result of the first reference routing line is that there is no signal interference, the layer-changing via at the end point of the second target routing line; In the case where there is a layer-changing via connected to the third layer at the end point of the second target routing line, detecting the third target routing line on the third layer; In a case where the third target routing line has signal interference, it is determined that the detection result of the first target routing line is that signal interference exists.
12. A PCB board detection device, characterized in that: The device comprises: A target routing determination module, configured to determine a first target routing in a first layer in response to a frame selection operation on routing in the first layer, wherein the first layer is used to indicate a layer in the PCB board where routing exists; A second layer determination module, used to determine a second layer according to the layer where the layer-changing via of the first target routing is located, and determine a second target routing in the second layer, wherein the layer-changing via is used to connect different layers in the PCB board, and the second target routing is a routing having electrical continuity with the first target routing; An angle calculation module, used to determine the tangent angle of the line between the origin coordinates of the layer-changing via and the endpoint coordinates of the first target routing in the via coordinate system as the first target angle, and determine the tangent angle of the line between the origin coordinates of the layer-changing via and the endpoint coordinates of the second target routing in the via coordinate system as the second target angle, wherein the via coordinate system is a coordinate system with the origin coordinates of the layer-changing via as the origin and a coordinate axis direction being the same as a reference coordinate system of the PCB board; The detection result determination module is used to determine that the detection result of the first target routing is that there is signal interference when the first target angle and the second target angle are located on the same side of the via coordinate system.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the method according to any one of claims 1 to 11 when executed by a processor.
14. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 11 are implemented.
15. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 11 are implemented.
Citation Information
Patent Citations
Signal line check system and method
CN103164553A
Method and system for quickly searching cross-plane wiring based on Skill
CN112685992A