Processing method and device for automatically checking wiring, electronic equipment and storage mediumTechnical Field
The present invention relates to the field of circuit board design, and in particular, to a processing method and apparatus for automatically checking a trace, an electronic device, and a storage medium.
Background
In a good PCB design, the signal lines should all have a complete reference plane as a return path. When the traces are cross-plane, the reference plane discontinuity is incomplete, which can cause problems, such as EMI and crosstalk. Therefore, the trace needs to be inspected.
In the prior art, the PCB is usually searched by human eyes, the efficiency is low, omission easily occurs, and the PCB design period and the design quality are influenced.
Disclosure of Invention
The invention provides a processing method and device for automatically checking wiring, electronic equipment and a storage medium, and aims to solve the problems that the manual mode is low in efficiency and omission easily occurs.
According to a first aspect of the present invention, there is provided a processing method for automatically checking a trace, including:
determining a plane layer and a routing layer in a plurality of layers stacked in a PCB design file; each plane layer is provided with one or more planes; each routing layer is correspondingly provided with one or more buses;
aiming at each routing, dividing the routing into a plurality of routing segments, and determining position information of a starting point and an end point of each routing segment; the position information represents the position in the two-dimensional plane of the PCB;
and aiming at each routing, according to the position information of each starting point and each end point, displaying a first routing segment and a second routing segment in the routing as different display states, wherein the first routing segment refers to routing segments crossing different planes, and the second routing segment refers to routing segments not crossing different planes.
Optionally, the displaying the first routing segment and the second routing segment as different display states according to the position information of each starting point and each ending point, including:
for each routing wire, traversing each starting point and each end point on each plane according to the position information of each starting point and each end point;
if a routing part exists between the adjacent starting point and the adjacent end point on the same plane, determining a routing segment between the adjacent starting point and the adjacent end point as a second routing segment, and determining that the second routing segment is displayed as a second display state corresponding to the second routing segment;
and determining that the route segment which is not determined as the second route segment in the routes is the first route segment, and determining that the first route segment is displayed as a first display state corresponding to the first route segment.
Optionally, before displaying the first routing segment and the second routing segment as different display states according to the position information of each endpoint, the method further includes: displaying all the wires as target display states;
the first display state is the target display state, the second display state is another display state different from the target display state, or:
the second display state is the target display state, and the first display state is another display state different from the target display state.
Optionally, the target display state and the first display state are highlighted, and the second display state is a non-highlighted display state.
Optionally, the lengths of the walking line segments are the same and are less than or equal to twice the minimum spacing between the planes.
Optionally, the different planes specifically refer to different copper sheets.
Optionally, the planar layer is a negative sheet layer;
determining a plane layer and a routing layer in a plurality of layers stacked in a PCB design file, comprising:
and determining a routing layer and a plane layer according to the stacking attributes of different layers.
According to a second aspect of the present invention, there is provided a processing device for automatically checking a trace, comprising:
the determining module is used for determining a plane layer and a routing layer in a plurality of layers stacked in the PCB design file; each plane layer is provided with one or more planes; each routing layer is correspondingly provided with one or more buses;
the segmentation module is used for traversing each routing, dividing the routing into a plurality of routing segments and determining the position information of the end point of each routing segment; the position information represents the position in the two-dimensional plane of the PCB;
the display module is used for displaying a first routing segment and a second routing segment as different display states according to the position information of each endpoint, wherein the first routing segment refers to routing segments which cross different planes, and the second routing segment refers to routing segments which do not cross different planes.
According to a third aspect of the invention, there is provided an electronic device comprising a memory and a processor,
the memory is used for storing codes;
the processor is configured to execute the codes in the memory to implement the processing method for automatically checking the trace according to the first aspect and the optional aspects thereof.
According to a fourth aspect of the present invention, there is provided a storage medium having a program stored thereon, characterized in that the program, when executed by a processor, implements the processing method of automatically checking for traces according to the first aspect and its alternatives.
According to the processing method and device for automatically checking the routing, the electronic equipment and the storage medium, the plane layer and the routing layer in a plurality of layers stacked in a PCB design file can be automatically determined; whether the wiring crosses different planes or not is automatically identified based on the determined planes and the wiring, wherein related personnel only need to trigger the starting of automatic inspection without consuming too much manpower and time, the inspection efficiency is effectively improved, and omission can be effectively avoided.
Meanwhile, the routing is divided into a plurality of routing segments, the routing segments crossing the plane and the routing segments not crossing the plane are displayed in a distinguishing mode according to the position information of the starting point and the end point of each routing segment, and compared with a scheme of only judging the starting point and the end point of the routing, the routing detection method and the routing detection device can detect the situation that the routing crosses a plurality of planes but two end points are located on the same plane, so that the routing segments are crossing the plane and the routing segments are not crossing the plane.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a first schematic flow chart illustrating a processing method for automatically checking traces according to an embodiment of the present invention;
FIG. 2 is a first schematic view of traces and planes according to an embodiment of the present invention;
FIG. 3 is a second schematic view of traces and planes according to an embodiment of the invention;
FIG. 4 is a flowchart illustrating step S103 according to an embodiment of the present invention;
fig. 5 is a second flowchart illustrating a processing method for automatically checking traces according to an embodiment of the present invention;
FIG. 6 is a block diagram of a processing device for automatically checking trace according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of an electronic device in an embodiment of the invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims, as well as in the drawings, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The technical solution of the present invention will be described in detail below with specific examples. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments.
Fig. 1 is a first flowchart illustrating a processing method for automatically checking traces according to an embodiment of the present invention.
The method according to the present embodiment may be applied to any hardware and/or software for performing the process on the PCB, and may be, for example, a processing method and apparatus for automatically checking the trace based on the ALLEGRO.
Referring to fig. 1, a processing method for automatically checking a trace includes:
s101: determining a plane layer and a routing layer in a plurality of layers stacked in a PCB design file;
s102: aiming at each routing, dividing the routing into a plurality of routing segments, and determining position information of a starting point and an end point of each routing segment;
s103: and aiming at each routing, according to the position information of each starting point and each end point, displaying the first routing segment and the second routing segment in different display states. The first routing section refers to a routing section which spans different planes, and the second routing section refers to a routing section which does not span different planes.
Each plane layer can be correspondingly provided with one or more planes, different planes can refer to different copper sheets, the plane layers can be negative sheet layers, and then the embodiment can be applied to the wiring inspection of the PCB with the plane layers being negative sheets. Each routing layer can correspondingly have one or more buses; the present embodiment can be applied to check the traces of each routing layer.
In one embodiment, in step S101, the method may include:
and determining a routing layer and a plane layer according to the stacking attributes of different layers.
The routing and planarization layers can be understood as Etch and Plane, and any means for describing them by attributes, whether applicable to any software or by any name, will not depart from the scope of the present embodiments.
In one example, if the embodiment is applied to the algorithm software, the layer with the Conductor attribute may be defined as a routing layer, and the layer with the Plane attribute is defined as a planar layer.
After the definition, all routing layers and plane layers of the PCB can be displayed through a pop-up window, so that a user can view the routing layers and the plane layers in time. Furthermore, the number of the routing layers and the number of the plane layers may be one or more.
The position information in step S102 may represent a position in a two-dimensional plane of the PCB, where the two-dimensional plane may also be understood as a two-dimensional plane perpendicular to the stacking direction. It can be described by coordinates in a coordinate system, and can also be characterized by other ways. Further, the position represented by the position information of the start point and the position information of the end point may be understood as a position of the corresponding start point or end point in the above two-dimensional plane.
FIG. 2 is a first schematic view of traces and planes according to an embodiment of the present invention; fig. 3 is a second schematic view of traces and planes in an embodiment of the invention.
Referring to fig. 2 and fig. 3, the starting point and the ending point of thetrace 23 are located in the area corresponding to theplane 22, but due to the design of the plane 22 (or the design of the trace 23), the trace may crossother planes 21.
In the present embodiment, as shown in fig. 5, thetrace 23 can be divided into a plurality oftrace segments 231 through step S102. In step S102, the starting points and the end points may be sequentially marked along the direction of the trace, and each starting point is adjacent to at least one end point in the bus. The lengths of the running line segments may be the same, and this embodiment does not exclude the embodiment with different lengths.
The length of the routing section can be configured at will according to requirements, and the lower the length of the routing section is, the determined routing part crossing different planes can be closer to the plane edge, so that the display result can represent the routing part crossing the planes more accurately.
In one embodiment, the length of the trace segment may be less than or equal to twice the minimum spacing between the planes, and in particular, it may be equal to the minimum spacing between the planes. Based on the length, taking fig. 3 as an example, it can be ensured that each routing segment does not cross out of one plane and then cross back to the same plane as shown in fig. 2.
In the implementation, in order to avoid short circuit and ensure PCB manufacturability, the minimum spacing can fully consider PCB manufacturer processing capability, for example, 1OZ copper S ≧ 4mil can be used.
The above steps S102 and S103 can be implemented in the following order: step S102 and step S103 are implemented firstly for each wire, step S102 and step S103 are implemented firstly for the next wire, and the first wire sections and the second wire sections of all wires are distinguished and displayed by circulating step S102 and step S103;
in other embodiments, step S102 may be performed on all the traces, and then step S103 may be performed on each trace.
It is clear that, regardless of the implementation order, as long as the above steps S102 and S103 are implemented, the description of the present embodiment is not deviated.
FIG. 4 is a flowchart illustrating step S103 according to an embodiment of the present invention; fig. 5 is a second flowchart illustrating a processing method for automatically checking traces according to an embodiment of the invention.
Referring to fig. 4, step S103 may include:
s1031: for each routing wire, traversing each starting point and each end point on each plane according to the position information of each starting point and each end point; wherein, the starting point and the end point on each plane can be traversed in turn along the routing direction;
s1032: whether a wiring part exists between the adjacent starting point and the adjacent end point on the same plane or not;
if the determination result in step S1032 is yes, step S1033 may be implemented: determining a route segment between the adjacent starting point and the adjacent end point as a second route segment, and determining that the second route segment is displayed as a second display state corresponding to the second route segment;
s1034: whether the starting points and the end points of all planes corresponding to the routing are traversed or not;
if the determination result in step S1034 is no, returning to step S1031, so as to implement steps S1032 to S1034 for the next plane, starting point, and end point;
if the determination result in step S1034 is yes, in step S1035: and determining that the route segment which is not determined as the second route segment in the routes is the first route segment, and determining that the first route segment is displayed as a first display state corresponding to the first route segment.
The first display state and the second display state referred to above can be understood as any display state that can be visually distinguished by a user. Meanwhile, the process of step S1033 or step S1035 may be to change the display state, or may be to maintain the original display state, and further, no matter how, as long as the display state can be different from the display state, the description of the embodiment does not depart.
Referring to fig. 5, before step S103, the method may further include: and displaying all the wires as target display states.
Furthermore, if the first display state is the target display state, then: the second display state is other display states different from the target display state;
if the second display state is the target display state, then: the first display state is another display state different from the target display state.
As can be seen, in the above embodiment, it is only necessary that the first route segment or the second route segment change its display state after the inspection.
In one example, the target display state may be a highlighted state.
Further, in step S104, all buses may be highlighted first. In step S1033, the second trace segment of each non-crossing plane may be highlighted to become a non-highlighted display state, and in step S1035, each first trace segment of a crossing plane may be kept highlighted.
Through the process, in the final display result, each first wiring segment across the plane is highlighted, and the rest wirings are not highlighted, so that a user can conveniently and accurately view the bus part across the plane.
In the above example, the display state may be changed in a reverse highlighting manner, in other examples, the target display state may also be a non-highlighted display state, and correspondingly, the first display state may be a non-highlighted display state, and the second display state may be a highlighted display state.
In other examples, the target display state may also be a display state of a specific color, line type, and line width, and correspondingly, the first display state and the second display state may be different display states of different colors, line types, and line widths.
Further, the above steps S102 and S103 are repeated, that is, whether each trace on the trace layer crosses different planes of the plane layer is circularly determined, and then the trace segment crossing different planes is highlighted for the PCB designer to check.
In summary, in the processing method for automatically inspecting traces provided in this embodiment, a planar layer and a trace layer in a plurality of layers stacked in a PCB design file can be automatically determined; whether the wiring crosses different planes or not is automatically identified based on the determined planes and the wiring, wherein related personnel only need to trigger the starting of automatic inspection without consuming too much manpower and time, the inspection efficiency is effectively improved, and omission can be effectively avoided.
Meanwhile, the routing is further divided into a plurality of routing segments, and the routing segments crossing the plane and the routing segments not crossing the plane are displayed in a distinguishing manner according to the position information of the starting point and the ending point of each routing segment.
Fig. 6 is a schematic diagram of program modules of a processing device for automatically checking trace according to an embodiment of the invention.
Referring to fig. 6, theprocessing device 300 for automatically checking trace includes:
a determiningmodule 301, configured to determine a planar layer and a routing layer in multiple layers stacked in the PCB design file; each plane layer is provided with one or more planes; each routing layer is correspondingly provided with one or more buses;
asegmenting module 302, configured to traverse each trace, divide the trace into a plurality of trace segments, and determine position information of an endpoint of each trace segment; the position information represents the position in the two-dimensional plane of the PCB;
thedisplay module 303 is configured to display, according to the position information of each endpoint, a first routing segment and a second routing segment in different display states, where the first routing segment refers to a routing segment that spans different planes, and the second routing segment refers to a routing segment that does not span different planes.
Optionally, thedisplay module 303 is specifically configured to:
for each routing wire, traversing each starting point and each end point on each plane according to the position information of each starting point and each end point;
if a routing part exists between the adjacent starting point and the adjacent end point on the same plane, determining a routing segment between the adjacent starting point and the adjacent end point as a second routing segment, and determining that the second routing segment is displayed as a second display state corresponding to the second routing segment;
and determining that the route segment which is not determined as the second route segment in the routes is the first route segment, and determining that the first route segment is displayed as a first display state corresponding to the first route segment.
Optionally, the apparatus further includes: the target display module is used for displaying all the wires as target display states;
the first display state is the target display state, the second display state is another display state different from the target display state, or:
the second display state is the target display state, and the first display state is another display state different from the target display state.
Optionally, the target display state and the first display state are highlighted, and the second display state is a non-highlighted display state.
Optionally, the lengths of the walking line segments are the same and are less than or equal to twice the minimum spacing between the planes.
Optionally, the different planes specifically refer to different copper sheets.
Optionally, the planar layer is a negative sheet layer;
determining a plane layer and a routing layer in a plurality of layers stacked in a PCB design file, comprising:
and determining a routing layer and a plane layer according to the stacking attributes of different layers.
In summary, in the processing apparatus for automatically inspecting traces provided in this embodiment, a planar layer and a trace layer in a plurality of layers stacked in a PCB design file can be automatically determined; whether the wiring crosses different planes or not is automatically identified based on the determined planes and the wiring, wherein related personnel only need to trigger the starting of automatic inspection without consuming too much manpower and time, the inspection efficiency is effectively improved, and omission can be effectively avoided.
Meanwhile, the routing is further divided into a plurality of routing segments, and the routing segments crossing the plane and the routing segments not crossing the plane are displayed in a distinguishing manner according to the position information of the starting point and the ending point of each routing segment.
Fig. 7 is a schematic structural diagram of an electronic device in an embodiment of the invention.
Referring to fig. 7, anelectronic device 40 is provided, which includes:
aprocessor 41; and the number of the first and second groups,
amemory 42 for storing executable instructions of the processor;
wherein theprocessor 41 is configured to perform the above-mentioned method via execution of the executable instructions.
Theprocessor 41 is capable of communicating with thememory 42 via thebus 43.
The present embodiments also provide a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the above-mentioned method.
Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The program may be stored in a computer-readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.