A pitch inspection method, device, medium, and program product
Patent Information
- Application Number
- CN202611507151.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-24
- Publication Date
- 2026-10-30
AI Technical Summary
目前,该检查过程主要依赖layout人员手动完成,检查效果受执行人员主观因素影响,不同人员对同一布局的检查结果可能存在差异,检查质量难以保证一致
[0010]可见,本申请技术效果包括:从设计文件自动提取各器件的器件类型和器件位置,能减少人工逐一确认器件信息的工作量。通过确定同层相邻器件并测量实际间距,能够避免因人工检查主观性导致的检查结果差异,使不同人员对同一布局的检查结果保持一致。在预设的二维信息结构中查找与器件类型及相对方向对应的间距基准参数,并将实际间距与间距基准参数进行对比生成风险提示信息,能够将间距判定依据统一为标准化数据,减少因人员经验不同而造成的判定偏差。同时,该方案能够自动完成器件间距的测量与比对,对于器件数量较多的PCB设计文件,可缩短检查周期,提高检查效率。此外,通过区分相对方向并分别读取对应的间距基准参数,能够适应不同方向上的差异化间距要求,使检查结果更符合实际设计需要,能减少人工检查的主观性影响,提高器件间距检查的准确性和效率。
Smart Images

Figure CN123013838A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a spacing inspection method, device, medium, and program product. Background Technology
[0002] After the PCB (Printed Circuit Board) layout design is completed, layout personnel need to check the component placement to confirm its rationality. Currently, this check process mainly relies on manual work by layout personnel. The inspection effectiveness is affected by the subjective factors of the personnel performing the work; different personnel may have different results for the same layout, making it difficult to guarantee consistent inspection quality. Furthermore, with the increasing complexity of PCBA (Printed Circuit Board Assembly) design, the number of components on a PCB can reach tens of thousands. Manual inspection is labor-intensive and time-consuming, making it difficult to meet the demands for efficient and accurate layout inspection.
[0003] Therefore, how to reduce the subjective influence of manual inspection and improve the accuracy and efficiency of component spacing inspection is a problem that needs to be solved by those skilled in the art. Summary of the Invention
[0004] In view of this, the purpose of this application is to provide a spacing inspection method, device, medium and procedure product to reduce the subjective influence of manual inspection and improve the accuracy and efficiency of device spacing inspection.
[0005] Firstly, this application provides a spacing checking method, including: Obtain the design file and extract the device information for each component from the design file; the device information includes the component type and component location; For each target device, determine the adjacent devices in the same layer of the target device based on the device location and the stack-up structure in the design document, and measure the actual distance between the target device and the adjacent devices in the same layer. In the preset two-dimensional information structure, the target row index item corresponding to the device type of the target device and the target column index item corresponding to the device type of adjacent devices in the same layer are determined; wherein, the row direction and column direction of the two-dimensional information structure correspond to the recording of the device type set; the intersection position of any row index item and any column index item records the spacing reference parameters corresponding to the two device types in multiple relative directions respectively; Read the target spacing reference parameter corresponding to the target relative direction from the intersection of the target row index and the target column index; the target relative direction is: the direction of adjacent devices in the same layer relative to the target device; The actual distance is compared with the target distance benchmark parameter, and corresponding risk warning information is generated based on the comparison results.
[0006] Secondly, this application provides a spacing inspection device, comprising: The acquisition module is used to acquire the design file and extract the device information of each component from the design file; the device information includes the component type and the component location. The measurement module is used to determine the adjacent devices in the same layer of the target device based on the device position of the target device and the stacking structure in the design file, and to measure the actual distance between the target device and the adjacent devices in the same layer. The determination module is used to determine the target row index item corresponding to the device type of the target device and the target column index item corresponding to the device type of adjacent devices in the same layer in a preset two-dimensional information structure; wherein, the row direction and column direction of the two-dimensional information structure correspond to the recording of the device type set; the intersection position of any row index item and any column index item records the spacing reference parameters corresponding to the two device types in multiple relative directions respectively; The reading module is used to read the target spacing reference parameter corresponding to the target relative direction from the intersection of the target row index item and the target column index item; the target relative direction is: the direction of adjacent devices in the same layer relative to the target device; The comparison module is used to compare the actual distance with the target distance benchmark parameters and generate corresponding risk warning information based on the comparison results.
[0007] Thirdly, this application provides an electronic device, comprising: Memory, used to store computer programs; A processor is configured to execute the computer program to implement the aforementioned spacing checking method.
[0008] Fourthly, this application provides a non-volatile storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the aforementioned spacing checking method.
[0009] Fifthly, this application provides a computer program product, including a computer program / instructions that, when executed by a processor, implement the steps of the aforementioned disclosed spacing checking method.
[0010] As can be seen, the technical effects of this application include: automatically extracting the device type and location of each component from the design file, reducing the workload of manually verifying device information one by one. By identifying adjacent components on the same layer and measuring the actual spacing, it avoids discrepancies in inspection results caused by the subjectivity of manual inspection, ensuring consistency in inspection results for the same layout by different personnel. By finding the spacing reference parameters corresponding to the device type and relative direction in a preset two-dimensional information structure, and comparing the actual spacing with the spacing reference parameters to generate risk warning information, it standardizes the spacing judgment criteria, reducing judgment deviations caused by differences in personnel experience. Simultaneously, this solution can automatically complete the measurement and comparison of device spacing, shortening the inspection cycle and improving inspection efficiency for PCB design files with a large number of components. Furthermore, by distinguishing relative directions and reading the corresponding spacing reference parameters separately, it can adapt to differentiated spacing requirements in different directions, making the inspection results more consistent with actual design needs, reducing the subjective influence of manual inspection, and improving the accuracy and efficiency of device spacing inspection.
[0011] Correspondingly, the spacing inspection device, equipment, medium, and program product provided in this application also have the above-mentioned technical effects. Attached Figure Description
[0012] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0013] Figure 1 This is a flowchart of a spacing inspection method disclosed in this application; Figure 2 This is a schematic representation of a device spacing as disclosed in this application; Figure 3 This is a schematic diagram of a layered display disclosed in this application; Figure 4 This is a schematic diagram of a settings page disclosed in this application; Figure 5 This is a schematic diagram of an abnormal location image disclosed in this application; Figure 6 This is a schematic diagram of a software report disclosed in this application; Figure 7 A server architecture diagram provided for this application; Figure 8 A terminal structure diagram provided for this application. Detailed Implementation
[0014] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.
[0015] It should be noted that, in the description of this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. The terms "first," "second," etc., in this application are used to distinguish similar objects and are not used to describe a specific order or sequence.
[0016] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0017] Currently, layout inspection primarily relies on manual work by layout personnel. The inspection effectiveness is influenced by the subjective factors of the personnel performing the work, and different personnel may yield different results for the same layout, making it difficult to guarantee consistent inspection quality. Furthermore, with the increasing complexity of PCBA (Printed Circuit Board Assembly) designs, the number of components on a PCB can reach tens of thousands, resulting in a large workload and long inspection cycle for manual inspection, which is insufficient to meet the demands for high-efficiency and high-accuracy layout inspection. Therefore, this application provides a spacing inspection scheme that can automatically measure and compare component spacing. For PCB design files with a large number of components, this can shorten the inspection cycle and improve inspection efficiency. In addition, by distinguishing relative directions and reading the corresponding spacing reference parameters, it can adapt to differentiated spacing requirements in different directions, making the inspection results more consistent with actual design needs. This reduces the subjective influence of manual inspection and improves the accuracy and efficiency of component spacing inspection.
[0018] See Figure 1 As shown in the figure, this application discloses a spacing checking method, including: S101. Obtain the design file and extract the device information of each device from the design file; the device information includes device type and device location.
[0019] In this embodiment, the design file is a PCB (Printed Circuit Board) design file, such as a .brd format file exported after the design is completed. The component type is used to characterize the material type of the component, such as resistors, capacitors, connectors, chips, etc. Different component types correspond to different spacing requirements. The component location is used to characterize the physical coordinates of the component on the PCB and its layer information, such as the center coordinates of the component and whether the component is located on the top or bottom layer. By extracting the component type and component location, a data foundation can be provided for subsequently determining adjacent components on the same layer, measuring the actual spacing, and querying the two-dimensional information structure, thereby avoiding manual verification of component information one by one and reducing manual workload.
[0020] S102. For the target device in each device, determine the adjacent devices in the same layer of the target device according to the device position of the target device and the stacking structure in the design document, and measure the actual distance between the target device and the adjacent devices in the same layer.
[0021] Among them, the stacked structure is the structural information defined in the design file to distinguish between the top and bottom layers.
[0022] In one implementation, the design file contains multiple devices, each of which can be sequentially used as a target device for spacing checks. Distinguishing between top-level and bottom-level devices through a layered structure ensures that spacing comparisons are performed only within the same physical layer, avoiding confusion in coordinate calculations between top-level and bottom-level devices. Adjacent devices on the same layer refer to devices located on the same layer as the target device and surrounding it, such as devices whose distance from the target device is less than a preset threshold. Measuring the actual spacing between the target device and its adjacent devices on the same layer provides numerical data for subsequent comparison with spacing benchmark parameters.
[0023] In one embodiment, measuring the actual spacing between a target device and adjacent devices on the same layer includes: using the maximum range of the stencil layer outline and the silkscreen layer outline of the target device as the measurement layer for the target device; using the maximum range of the stencil layer outline and the silkscreen layer outline of adjacent devices on the same layer as the measurement layer for those adjacent devices; and measuring the distance between the edge of the target device and the edge of the adjacent devices on the same layer based on the measurement layers of the target device and the adjacent devices to obtain the actual spacing. Here, the stencil layer is a layer used for solder paste printing, and its range corresponds to the actual mounting area of the device; the silkscreen layer is a layer used to represent the outline of the device, and its range corresponds to the silkscreen outline of the device. For some devices, due to their special body shape, the silkscreen outline may be larger than the body pads, meaning the silkscreen layer range is larger than the stencil layer range. By selecting the larger of the two ranges as the measurement layer, the actual physical space occupied by the device can be accurately reflected, avoiding overly lenient spacing determination due to measuring only the pads or overly strict spacing determination due to measuring only the silkscreen. If the outline of the stencil layer and the outline of the silkscreen layer of any device overlap, either one can be selected as the measurement layer.
[0024] In one implementation, adjacent devices on the same layer of the target device are determined based on the device location and the stacking structure in the design file. This includes: determining the target layer where each device is located based on the stacking structure; the target layer being either the top or bottom layer; and identifying devices located on the same layer as the target device and whose distance from the target device is less than a preset threshold, as adjacent devices on the same layer. This method of first filtering by layer and then by distance narrows the comparison range, eliminates devices on different layers and those that are far apart, reduces unnecessary calculations, and improves inspection efficiency.
[0025] S103. In the preset two-dimensional information structure, determine the target row index item corresponding to the device type of the target device and the target column index item corresponding to the device type of adjacent devices in the same layer; wherein, the row direction and column direction of the two-dimensional information structure both correspond to the recording of the device type set; the intersection position of any row index item and any column index item records the spacing reference parameters corresponding to the two device types in multiple relative directions respectively.
[0026] It should be noted that the two-dimensional information structure is a pre-established data structure, where both row and column indices correspond to the same set of device types. That is, the row and column directions record the same complete set of device types, and the order is consistent. The intersection of any row index item and any column index item records the spacing reference parameter between two device types. By using the device type as an index, the spacing reference parameter corresponding to the target device and its adjacent devices on the same layer can be directly located from the two-dimensional information structure without intermediate classification conversion, resulting in a short query path and facilitating fast system execution. The spacing reference parameter is a standard value used to determine whether the actual spacing is reasonable; its specific value is determined based on industry process capabilities.
[0027] In one implementation, the process of generating the two-dimensional information structure includes: configuring type identifiers for each device type according to device naming rules; arranging the type identifiers in a predetermined order to form a device type set; using the device type set as row and column indices, setting the spacing reference parameters for the two device types in the upward, downward, leftward, and rightward directions at the intersection of any row index item and any column index item, thus obtaining the two-dimensional information structure; the spacing reference parameters corresponding to any direction include: median spacing, lower limit spacing, and upper limit spacing. It can be seen that multiple relative directions include the upward, downward, leftward, and rightward directions. This integrates the device type definition and spacing standard values into the same data structure, facilitating unified maintenance and querying. When a new device type is added, it is only necessary to add the type simultaneously in the row and column directions and supplement the spacing reference parameters at the corresponding intersection positions to complete the data expansion, simplifying maintenance.
[0028] S104. Read the target spacing reference parameter corresponding to the target relative direction from the intersection of the target row index item and the target column index item; the target relative direction is: the direction of adjacent devices in the same layer relative to the target device.
[0029] The target relative direction is determined based on the actual orientation of adjacent devices on the same layer relative to the target device. The intersection positions of the two-dimensional information structure are recorded with corresponding spacing reference parameters for each relative direction. Therefore, the spacing requirements for the same pair of devices can differ in different directions. By distinguishing the relative directions and reading the corresponding spacing reference parameters, the system can accommodate the differentiated spacing requirements of asymmetric devices in different directions, avoiding overly strict or lenient judgments in some directions due to the use of a single spacing value.
[0030] In one implementation, the target relative direction is determined as follows: First center coordinates of the target device and second center coordinates of adjacent devices on the same layer are obtained; based on the first and second center coordinates, the difference in horizontal and vertical coordinates between the adjacent devices and the target device are calculated; according to the magnitude of the difference in horizontal and vertical coordinates, the target relative direction is determined to be one of multiple relative directions. For example, when the difference in vertical coordinates is greater than the absolute value of the difference in horizontal coordinates and the difference in vertical coordinates is positive, the adjacent device on the same layer is determined to be above the target device; when the difference in horizontal coordinates is greater than the absolute value of the difference in vertical coordinates and the difference in horizontal coordinates is positive, the adjacent device on the same layer is determined to be to the right of the target device. Automatically determining the direction using coordinate differences avoids errors caused by specifying the direction.
[0031] S105. Compare the actual distance with the target distance reference parameters, and generate corresponding risk warning information based on the comparison results.
[0032] The target spacing benchmark parameters include the median spacing, lower spacing limit, and upper spacing limit. The actual spacing is compared to both the lower and upper spacing limits, and different levels of risk warning information are generated based on the range the actual spacing falls into. The median spacing can be displayed as a recommended distance value on the interface for personnel reference. By comparing the actual spacing with the standardized spacing benchmark parameters, the inspection results of the same layout by different personnel can be kept consistent, reducing judgment bias caused by differences in personnel experience.
[0033] In one example, the actual spacing is compared with the target spacing baseline parameter, and corresponding risk warning information is generated based on the comparison results. This includes: comparing the actual spacing with both the lower and upper spacing limits; if the actual spacing is less than the lower limit, an alarm risk warning is generated; if the actual spacing is not less than the lower limit but less than the upper limit, a warning risk warning is generated; if the actual spacing is not less than the upper limit, a no-risk warning is generated. Specifically, the alarm risk warning corresponds to a spacing below the minimum allowable distance, indicating a high risk of short circuits or mounting interference, requiring modification; the warning risk warning corresponds to a spacing between the minimum allowable distance and the safe distance, indicating that while the spacing meets the minimum requirements, it deviates from the recommended value, and confirmation is recommended; the no-risk warning corresponds to a spacing greater than or equal to the safe distance, indicating that the spacing meets the requirements and no action is needed. This allows for the categorization and display of spacing issues of different degrees, facilitating the priority handling of high-risk problems.
[0034] Accordingly, different risk warning messages can be displayed in different colors on the display interface. For example, alarm risk warning messages are displayed in red, early warning risk warning messages are displayed in yellow, and no risk warning messages are displayed in green or not displayed at all. By using color differentiation, personnel can intuitively identify the layout of problem points with different risk levels on the display interface, facilitating quick location and priority handling.
[0035] In one implementation, after generating corresponding risk warning information based on the comparison results, the process further includes: identifying and recording the tag number, coordinates, actual spacing, target spacing reference parameters, and abnormal location screenshots of the devices that violate spacing requirements, in order to generate an inspection report; wherein, the tag number is used to uniquely identify the device, such as C1, R1, U1, etc. Generating an inspection report allows for centralized display of abnormal information, facilitating personnel review and archiving. The abnormal location screenshots visually show which edge of a device exceeds the spacing limit with another device, allowing personnel to confirm before modification. After generating the inspection report, in response to the operation command on the target item in the inspection report, the system jumps to the corresponding location in the design file; thus, clicking on the abnormal item in the report directly locates the corresponding device position in the design file, eliminating the need for manual searching and reducing location time. After generating the inspection report, abnormal items marked with alarm risk warnings in the report can be identified as items requiring mandatory modification. In response to the modification instructions for these abnormal items, the corresponding actual spacing is remeasured and a secondary assessment is performed. If the secondary assessment result is still an alarm risk warning, a second alarm risk warning is output. If the secondary assessment result is a warning risk warning or no risk warning, the abnormal item is confirmed to have been repaired. This secondary assessment verifies whether the modified layout meets the spacing requirements, ensuring the accuracy of the inspection results.
[0036] In this embodiment, the two-dimensional information structure can be modified. Specifically, hierarchical permission management can be used to maintain the uniqueness and accuracy of modifications, avoiding confusion caused by accidental modifications by personnel. For example, modifications made under administrator privileges are persisted and take effect on all projects, while modifications made under user privileges only take effect in a single test and are automatically restored after a system restart. Therefore, in one implementation, in response to a modification operation with administrator privileges, the spacing reference parameter in the two-dimensional information structure is modified and persisted; in response to a modification operation with user privileges, the spacing reference parameter in the two-dimensional information structure is modified and marked as effective only once; in response to a system restart, the spacing reference parameter effective only once is restored to the value set by the administrator privileges.
[0037] Furthermore, the modification of the two-dimensional information structure also includes: in response to the operation of adding a new device type, adding the new device type to the end of both the row and column directions of the two-dimensional information structure, and recording the corresponding spacing reference parameters at the intersection position of the new device type. By maintaining data through appending rather than inserting at the end of the original two-dimensional information structure, the consistency of the device type arrangement order in the row and column directions can be maintained, avoiding query errors caused by disordered order.
[0038] As can be seen, the spacing inspection method provided in this embodiment, by automatically extracting component information, identifying adjacent components on the same layer, measuring the actual spacing, querying and comparing the spacing reference parameters in the two-dimensional information structure, can reduce the subjective influence of manual inspection and ensure consistent inspection results for the same layout by different personnel. Through hierarchical risk warnings, inspection report generation, secondary judgment, and access control, it can adapt to different design needs and ensure the accuracy and maintainability of inspection results. For PCB design files with a large number of components, it can significantly shorten the inspection cycle and improve inspection efficiency.
[0039] The following describes an automatic layout inspection and control system that presets component layout spacing requirements. When layout personnel complete the component layout, they upload the completed layout design data to the system. The system automatically identifies the layout layers, locates the component's body layer and attribute layer, confirms the component type based on its attributes, and then measures the layout gap between the component and surrounding components of different types according to the component spacing requirements in the Bill of Materials (BOM). Based on the measurement results, the system classifies the risk level and displays the problematic layout points of different risk levels to the layout personnel, enabling them to intuitively and accurately locate and modify abnormal locations without needing to perform a full component inspection against the BOM. The system includes a logic control unit equipped with a computer capable of uploading layout design files and running the detection system. The system also includes a background control system that sets the median design requirement for the layout spacing between each type of component and adjacent components of different types, according to the layout component naming rules and component spacing requirements. It also allows setting upper and lower limits for the spacing based on the median value, and personnel can fine-tune these settings according to specific product requirements.
[0040] A material type list is required in the system backend to serve as the basis for the system's component spacing check. This data includes the following: All component types and material types that may be used during the layout process are assigned a unique name or code according to the naming rules on the board in the layout design, so as to distinguish all material types used in the design process. This list needs to cover all material types that need to be used.
[0041] The median table for material spacing control requirements records the relative spacing requirements between each type of component and other components in the design. It defines the spacing requirements for each type of component, serving as the numerical basis for the software system's background judgment on the rationality of layout spacing. It also acts as the benchmark for setting the upper and lower limits of material spacing. The setting of this median table must be determined through discussion among all relevant designers.
[0042] The principle for determining the median spacing between components is that it is not based on the limits of a particular project or existing projects, but rather on the current process capabilities of the SMT (Surface Mount Technology) industry. Simply relying on the capabilities of a particular project or existing projects would require frequent and extensive adjustments when encountering special projects or extreme design requirements, thus affecting the system's detection performance. Taking the spacing between 0201 resistors as an example, it is necessary to investigate the printing capabilities and placement accuracy of the placement equipment in the factory, as well as the forming accuracy of the solder paste used in the factory's soldering production, to determine the reasonable range of achievable accuracy.
[0043] The median table is maintained and revised as follows: The top row of each horizontal row contains the material number code, used by the system to identify materials. The second row contains the Chinese material type identifier. This identifier has no practical function in the system but is used to help personnel understand the material type represented by each code during form maintenance, avoiding system maintenance errors caused by inconsistent understanding of material types among different personnel, which could affect system judgment. The third row contains the English material type identifier. This column represents the definition of material attributes by personnel during layout design and must be consistent with the material attributes and descriptions set when the material was created. Subsequent layout design drawings and the system's identification of material types will be based on this row for material type classification. Furthermore, subsequent spacing control and alarm control will also be based on this row.
[0044] The median data is explained as follows: The first column of the vertical column is the material number code, which is the same as the first row of the horizontal column, used by the system to identify materials. The second column of the vertical column is the English identifier of the material type, which is the same as the third row of the horizontal column. Materials with the same English identifier must maintain consistent relative positions in both the horizontal and vertical columns. That is, if the material in the first column of the horizontal column is device 01005, the material in the first row of the vertical column is also device 01005, and so on for subsequent material maintenance. The median spacing between different types of materials is determined by drawing a vertical line downwards for one type of material in the horizontal column and a horizontal line for another type of material in the vertical column; the number at the intersection of these two lines is the median spacing between the two types of materials.
[0045] The median table maintenance rules are as follows: if new materials are added later, the same type of material must be added to both the horizontal row and the vertical column, and the maintenance order must follow the order of this table from top to bottom. It is not allowed to disrupt the existing order when inserting material types.
[0046] In one example, the median table corresponding to the material type can be set with reference to Table 1.
[0047] Table 1
[0048] Material types maintain a consistent order both horizontally and vertically, but the corresponding median spacing can be adjusted based on production technology advancements and actual defect rates during actual use. Data adjustments are performed by designated personnel with administrator privileges, and the adjusted values must be decided through discussion among relevant personnel. A single user can modify basic data during a product testing process with user privileges; this modification only takes effect for that single test and reverts to the administrator-set values after a system restart. This setting maintains the uniqueness and accuracy of system parameters, preventing system instability due to accidental user modifications.
[0049] Once all materials in the material type list and material spacing control requirements table are entered into the system, a device spacing overview table is generated, such as... Figure 2 As shown in the device spacing table, system personnel need to further maintain the relative positional relationship between device 1 and its counterpart device 2, that is, the upper limit, middle value, and lower limit of the distance required when device 2 is above, below, to the left, and to the right of device 1.
[0050] Once the data maintenance is complete, the basic data for system operation is considered maintained. Frequent changes to the system's backend basic median data are not permitted; a change frequency of once a year or once every two years is generally reasonable. However, the addition or deletion of material types can be performed based on actual circumstances and is not subject to this frequency restriction.
[0051] After completing a new product layout design, the layout engineer exports a BRD file. Upon importing the file into the system, the system automatically adapts to the BRD file format and differentiates the design data according to the layout's layer stacking, distinguishing SST (silkscreen layer), SPT (stencil layer), and SMT (solder mask layer) based on the actual layer stacking. The BRD file automatically displays the layers after import, as shown in the image. Figure 3 As shown.
[0052] Since SPT represents the actual mounting area of a device, while SST represents the silkscreen outline, some devices, due to their unique shapes, have silkscreen outlines larger than their pads (solder pads), meaning the SST range is larger than the SPT. Therefore, the system automatically selects the larger of the two ranges, SPT and SST, as the device spacing measurement layer. The system automatically measures the distance from the edge of the larger outline layer of each device to its adjacent devices, while simultaneously calling the device library to identify the type of the device and its neighbors. Then, it compares the measured spacing values with the upper, middle, and lower limits of the spacing requirements for both device types in the system's maintained device spacing overview table. If the SPT and SST of some devices overlap, the system automatically selects any one of these layers as the measurement layer for spacing measurement.
[0053] The system's judgment criteria are as follows: If the measured value is greater than or equal to the upper limit of the spacing, the system automatically assumes the spacing meets the design requirements, and the judgment result is automatically displayed as "OK" and hidden. If the measured result is less than the upper limit but greater than the lower limit, the system determines that the spacing is risky and displays it in yellow, reminding personnel to confirm again. If the measured result is less than the lower limit, the system marks the spacing between the two components in red, reminding the layout personnel to modify the layout. At the same time, the system generates a screenshot of the component spacing not meeting the design requirements, prompting personnel to confirm which edge of the component exceeds the spacing standard with another type of material, facilitating confirmation before modification. The system captures images to show the layout personnel which component spacing is at risk (yellow) and which component spacing does not meet the requirements (red), and outputs an Excel report detailing the measurement results of the abnormal data and the names of the components. Specifically, when the distance is less than or equal to the lower limit, the system displays it in red in the judgment result on the interactive interface, indicating that the component spacing needs to be adjusted and re-judged. When the distance is the median value, the system displays it in yellow, indicating that the distance meets the minimum requirements, but should be adjusted as much as possible if space allows. When the distance is greater than or equal to the upper limit, the system displays green, indicating that the distance is safe and does not require secondary verification by personnel. The corresponding risk warnings and upper / lower limit settings page can be found in [reference needed]. Figure 4 . Figure 4 The illustrated software interface mainly includes a basic parameter setting area at the top, a function control area in the middle, and a data display area at the bottom.
[0054] After the system completes the measurement, it can export an excel report of the Layout Check Report with one click. This report details the location of the anomaly, the image of the anomaly, and the data measurement results of the anomalous points. At the same time, the report gives color prompts according to the severity of the measured data, which are yellow or red. Yellow suggests confirmation, and red suggests modification. The Layout personnel give the confirmation result of the corresponding anomaly based on the measured data and the images of the anomalous points in the report. If it is confirmed to continue implementing according to the existing scheme, a written description shall be provided; if modification is required, corresponding modifications shall be made in the design software. The modified layout design file needs to undergo secondary software analysis and identification. The images of the anomalous points are as Figure 5 shown in Figure 5 , where ①, ② and ③ are anomalous points.
[0055] The red results displayed in the software report are the final results determined based on the upper and lower limits of the devices set in the device spacing list. The device spacing list is a consensus reached by the department, and in principle, individual projects are not allowed to make secondary revisions. Therefore, unless the system identifies and determines an anomaly, all red alarms in the report must be modified, and the secondary detection and determination after modification shall at least present a yellow color or no display, so as to prove that the detection result meets the design requirements, and the layout check of this project is qualified before subsequent other work can be carried out. The software report can refer to Figure 6 .
[0056] It can be seen that the systematic method for automatically checking the device spacing during the layout process can accurately identify abnormal layout spacing conditions and display them in a graded manner, which facilitates the layout personnel to quickly confirm the layout spacing and avoids the personnel checking one by one according to the BOM. The working hours for personnel to check according to the BOM and for personnel in the same position to conduct secondary recheck are reduced from three to five days to be completed within one day, thereby greatly saving labor costs. Changing from manual inspection by personnel to automatic system inspection can effectively avoid the difference in inspection results caused by differences in personnel skills and reduce omissions in manual inspection. The upper and lower limits of the devices set in the device spacing list are set after review by all relevant personnel in the department, and the system uses this to judge the spacing, which can effectively avoid differences in different personnel's acceptance and understanding of device spacing, achieve unified standards and consistent results, and effectively manage the design standardization of layout personnel. The device spacing sets the distance requirements from the surrounding devices in the four directions of up, down, left, and right of the device respectively, which can effectively reduce design bottlenecks and improve the flexibility of design layout. The system opens administrator rights and user rights, and the administrator rights are set and operated in the background by a dedicated person, which can effectively avoid the risks brought by personnel misoperation.
[0057] A spacing check apparatus provided in the embodiments of the present application is introduced below, and the spacing check apparatus described below can be cross-referenced with other embodiments described herein.
[0058] This application discloses a spacing inspection device, including: The acquisition module is used to acquire the design file and extract the device information of each component from the design file; the device information includes the component type and the component location. The measurement module is used to determine the adjacent devices in the same layer of the target device based on the device position of the target device and the stacking structure in the design file, and to measure the actual distance between the target device and the adjacent devices in the same layer. The determination module is used to determine the target row index item corresponding to the device type of the target device and the target column index item corresponding to the device type of adjacent devices in the same layer in a preset two-dimensional information structure; wherein, the row direction and column direction of the two-dimensional information structure correspond to the recording of the device type set; the intersection position of any row index item and any column index item records the spacing reference parameters corresponding to the two device types in multiple relative directions respectively; The reading module is used to read the target spacing reference parameter corresponding to the target relative direction from the intersection of the target row index item and the target column index item; the target relative direction is: the direction of adjacent devices in the same layer relative to the target device; The comparison module is used to compare the actual distance with the target distance benchmark parameters and generate corresponding risk warning information based on the comparison results.
[0059] In one implementation, the process of generating a two-dimensional information structure includes: configuring type identifiers for each device type according to device naming rules; arranging the type identifiers in a predetermined order to form a device type set; using the device type set as row and column indices, setting the spacing reference parameters corresponding to the two device types in the up, down, left, and right directions at the intersection of any row index item and any column index item, to obtain a two-dimensional information structure; the spacing reference parameters corresponding to any direction include: median spacing, lower spacing limit, and upper spacing limit.
[0060] In one embodiment, the measurement module is used to: take the maximum range of the stencil layer outline and the silkscreen layer outline of the target device as the measurement layer of the target device; take the maximum range of the stencil layer outline and the silkscreen layer outline of adjacent devices in the same layer as the measurement layer of adjacent devices in the same layer; and measure the distance between the edge of the target device and the edge of the adjacent devices in the same layer based on the measurement layer of the target device and the measurement layer of the adjacent devices in the same layer to obtain the actual spacing.
[0061] In one embodiment, the measurement module is used to: determine the target layer where each device is located based on the stacked structure; the target layer is the top layer or the bottom layer; and determine, based on the device position of the target device, devices located on the same layer as the target device and whose distance from the target device is less than a preset threshold, as adjacent devices in the same layer.
[0062] In one implementation, the target relative direction is determined by: obtaining the first center coordinates of the target device and the second center coordinates of adjacent devices on the same layer; calculating the difference in horizontal coordinates and vertical coordinates of adjacent devices on the same layer relative to the target device based on the first center coordinates and the second center coordinates; and determining the target relative direction as one of multiple relative directions according to the relationship between the magnitude of the difference in horizontal coordinates and the difference in vertical coordinates.
[0063] In one implementation, the target spacing reference parameters include: a lower spacing limit and a higher spacing limit; correspondingly, the comparison module is used to: compare the actual spacing with the lower spacing limit and the higher spacing limit respectively; if the actual spacing is less than the lower spacing limit, an alarm risk warning message is generated; if the actual spacing is not less than the lower spacing limit and is less than the higher spacing limit, a warning risk warning message is generated; if the actual spacing is not less than the higher spacing limit, a no-risk warning message is generated.
[0064] In one embodiment, it further includes a display module for displaying different risk warning information in different colors on the display interface.
[0065] In one embodiment, it further includes: a report generation module, which generates corresponding risk warning information based on the comparison results, and then determines and records the tag number, coordinates, actual spacing, target spacing reference parameters, and abnormal location screenshots of the device that violates the spacing requirements, so as to generate an inspection report.
[0066] In one implementation, it further includes an operation module, which, after generating an inspection report, jumps to the corresponding location in the design file in response to an operation instruction on a target item in the inspection report.
[0067] In one implementation, the system further includes: a re-inspection module, used to, after generating an inspection report, identify abnormal items marked as alarm risk warning information in the inspection report as items that must be forcibly modified; in response to the modification instruction for the abnormal items, remeasure the corresponding actual spacing and perform a second judgment; if the second judgment result is still alarm risk warning information, then output alarm risk warning information a second time; if the second judgment result is early warning risk warning information or no risk warning information, then confirm that the abnormal items have been repaired.
[0068] In one embodiment, the system further includes: a modification module, configured to modify the spacing reference parameter in the two-dimensional information structure in response to a modification operation with administrator privileges, and persistently store the modified spacing reference parameter; modify the spacing reference parameter in the two-dimensional information structure in response to a modification operation with user privileges, and mark the modified spacing reference parameter as effective only once; and restore the effective spacing reference parameter to the value set by the administrator privileges in response to a system restart operation.
[0069] In one implementation, the modification module is further configured to, in response to the operation of adding a new device type, add the new device type to the end of the row direction and the end of the column direction of the two-dimensional information structure, and record the corresponding spacing reference parameters at the intersection position corresponding to the new device type.
[0070] For more detailed information on the working process of each module and unit in this embodiment, please refer to the relevant content disclosed in the foregoing embodiments, which will not be repeated here.
[0071] As can be seen, this embodiment provides a spacing inspection device that can adapt to differentiated spacing requirements in different directions, making the inspection results more in line with actual design needs, reducing the subjective influence of manual inspection, and improving the accuracy and efficiency of device spacing inspection.
[0072] The following describes an electronic device provided by an embodiment of this application. The electronic device described below can be referred to in conjunction with other embodiments described herein.
[0073] This application discloses an electronic device, including: Memory, used to store computer programs; A processor is configured to execute the computer program to implement the methods disclosed in any of the above embodiments.
[0074] Furthermore, embodiments of this application also provide an electronic device. The aforementioned electronic device can be, for example,... Figure 7 The server shown can also be as follows: Figure 8 The terminal shown. Figure 7 and Figure 8 These are all diagrams illustrating the structure of an electronic device according to an exemplary embodiment. The content in the diagrams should not be considered as any limitation on the scope of this application.
[0075] Figure 7 This is a schematic diagram of a server structure provided in an embodiment of this application. The server may specifically include: at least one processor, at least one memory, a power supply, a communication interface, an input / output interface, and a communication bus. The memory stores a computer program, which is loaded and executed by the processor to implement the relevant steps in the spacing check disclosed in any of the foregoing embodiments.
[0076] In this embodiment, the power supply is used to provide operating voltage for each hardware device on the server; the communication interface can create a data transmission channel between the server and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.
[0077] In addition, the memory, as a carrier for resource storage, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored on it include operating system, computer programs and data, etc., and the storage method can be temporary storage or permanent storage.
[0078] The operating system manages and controls the various hardware devices and computer programs on the server to enable the processor to perform operations and processes on the data in the memory. It can be Windows Server, Netware, Unix, Linux, etc. In addition to computer programs capable of performing the spacing checking method disclosed in any of the foregoing embodiments, the computer programs may further include computer programs capable of performing other specific tasks. The data may include application update information and application developer information.
[0079] Figure 8 This is a schematic diagram of the structure of a terminal provided in an embodiment of this application. The terminal may include, but is not limited to, a smartphone, tablet computer, laptop computer, or desktop computer.
[0080] Typically, the terminal in this embodiment includes a processor and a memory.
[0081] The processor may include one or more processing cores, such as a quad-core processor or an octa-core processor. The processor can be implemented using at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), or PLA (Programmable Logic Array). The processor may also include a main processor and coprocessors. The main processor, also known as the CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, the processor may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, the processor may also include an AI (Artificial Intelligence) processor, which handles computational operations related to machine learning.
[0082] The memory may include one or more computer non-volatile storage media, which may be non-transitory. The memory may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In this embodiment, the memory is used to store at least the following computer program, which, after being loaded and executed by the processor, is capable of implementing the relevant steps in the spacing check method executed on the terminal side as disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory may also include operating systems and data, and the storage method may be temporary or permanent storage. The operating system may include Windows, Unix, Linux, etc. The data may include, but is not limited to, application update information.
[0083] In some embodiments, the terminal may further include a display screen, an input / output interface, a communication interface, a sensor, a power supply, and a communication bus.
[0084] Those skilled in the art will understand that Figure 8 The structure shown does not constitute a limitation on the terminal and may include more or fewer components than illustrated.
[0085] The following describes a non-volatile storage medium provided in an embodiment of this application. The non-volatile storage medium described below can be referred to in conjunction with other embodiments described herein.
[0086] A non-volatile storage medium is provided for storing a computer program, wherein the computer program, when executed by a processor, implements the spacing checking method disclosed in the foregoing embodiments. The non-volatile storage medium is a computer-readable non-volatile storage medium, which, as a carrier for resource storage, can be a read-only memory, random access memory, disk, or optical disk, etc. The resources stored thereon include an operating system, computer programs, and data, and the storage method can be temporary storage or permanent storage.
[0087] The following describes a computer program product provided by an embodiment of this application. The computer program product described below can be referred to in conjunction with other embodiments described herein.
[0088] A computer program product includes a computer program / instructions that, when executed by a processor, implement the steps of the aforementioned disclosed spacing checking method.
[0089] Embodiments of this application also provide another computer program product, including a non-volatile computer-readable storage medium for storing a computer program that, when executed by a processor, implements the steps in any of the above embodiments.
[0090] Any of the components, modules, units, parts, methods, and operations described herein can be implemented using software, firmware, hardware (e.g., fixed logic circuitry), manual processing, or any combination thereof. Alternatively or additionally, any functionality described herein can be executed at least in part by one or more hardware logic components, such as, but not limited to, a central processing unit (CPU), a field-programmable gate array (FPGA), an application-specific integrated circuit (ASIC), an application-specific standard product (ASSP), a system-on-a-chip (SoC), a complex programmable logic device (CPLD), a microprocessor (MCU), etc. The terms "system," "computing device," or "apparatus" as used herein encompass various means, devices, and machines for processing data, including, for example, one or more programmable processors, computers, SoCs, or combinations thereof. The apparatus may also include code that creates an execution environment for the computer program in question, such as code constituting processor firmware, a protocol stack, a database management system, an operating system, a cross-platform runtime environment, a virtual machine, or one or more combinations thereof. The aforementioned computer program (also known as a program, software, software application, app, script, or code) can be written in any form of programming language, including compiled or interpreted languages, declarative or procedural languages, and can be deployed in any form, including as a standalone program or as a module, component, subroutine, object, or other unit suitable for a computing environment.
[0091] The various embodiments in this specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0092] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of non-volatile storage medium known in the art.
[0093] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only intended to help understand the methods and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A method for checking spacing, characterized in that, include: Obtain the design file and extract the device information of each device from the design file; The device information includes device type and device location; For each target device among the devices, the adjacent devices in the same layer of the target device are determined according to the device position of the target device and the stacking structure in the design document, and the actual distance between the target device and the adjacent devices in the same layer is measured. In a preset two-dimensional information structure, the target row index item corresponding to the device type of the target device and the target column index item corresponding to the device type of the adjacent devices in the same layer are determined; wherein, the row direction and column direction of the two-dimensional information structure both correspond to the recording of the device type set; the intersection position of any row index item and any column index item records the spacing reference parameters corresponding to the two device types in multiple relative directions respectively; The target spacing reference parameter corresponding to the target relative direction is read from the intersection of the target row index and the target column index; the target relative direction is: the direction of the adjacent device in the same layer relative to the target device; The actual distance is compared with the target distance reference parameter, and corresponding risk warning information is generated based on the comparison result.
2. The method according to claim 1, characterized in that, The process of generating the two-dimensional information structure includes: Configure type identifiers for each device type according to the device naming rules; The various types of identifiers are arranged in a predetermined order to form the device type set; Using the set of device types as row and column indices, spacing reference parameters for the two device types are set at the intersection of any row index item and any column index item in the up, down, left and right directions, respectively, to obtain the two-dimensional information structure; the spacing reference parameters corresponding to any direction include: median spacing, lower limit spacing, and upper limit spacing.
3. The method according to claim 1, characterized in that, Measuring the actual distance between the target device and its adjacent devices on the same layer includes: The maximum range between the stencil layer outline and the silkscreen layer outline of the target device is taken as the measurement layer of the target device. The maximum range between the stencil layer outline range and the silkscreen layer outline range of the adjacent devices in the same layer is taken as the measurement layer of the adjacent devices in the same layer. Based on the measurement layer of the target device and the measurement layer of the adjacent devices in the same layer, the distance between the edge of the target device and the edge of the adjacent devices in the same layer is measured to obtain the actual spacing.
4. The method according to claim 1, characterized in that, Determining adjacent devices in the same layer of the target device based on the device location of the target device and the stack-up structure in the design document includes: The target layer where each device is located is determined based on the stacked structure; the target layer is either the top layer or the bottom layer. Based on the device location of the target device, devices located on the same layer as the target device and whose distance from the target device is less than a preset threshold are identified as adjacent devices on the same layer.
5. The method according to claim 1, characterized in that, The relative orientation of the target is determined in the following way: Obtain the first center coordinates of the target device and the second center coordinates of the adjacent devices in the same layer; Based on the first center coordinates and the second center coordinates, calculate the difference in the horizontal coordinates and the difference in the vertical coordinates of the adjacent devices on the same layer relative to the target device; Based on the relationship between the difference in the horizontal coordinate and the difference in the vertical coordinate, the relative direction of the target is determined to be one of the plurality of relative directions.
6. The method according to claim 1, characterized in that, The target spacing reference parameters include: a lower limit value for spacing and an upper limit value for spacing; Accordingly, the actual distance is compared with the target distance reference parameter, and corresponding risk warning information is generated based on the comparison result, including: The actual spacing is compared with the lower limit value of the spacing and the upper limit value of the spacing, respectively; If the actual distance is less than the lower limit of the distance, an alarm risk warning message is generated; If the actual distance is not less than the lower limit of the distance and less than the upper limit of the distance, a warning risk alert message is generated; If the actual distance is not less than the upper limit of the distance, a risk-free warning message is generated.
7. The method according to claim 6, characterized in that, Also includes: Different risk warning messages are displayed in different colors on the display interface.
8. The method according to any one of claims 1 to 7, characterized in that, After generating the corresponding risk warning information based on the comparison results, it also includes: Identify and record the tag number, coordinates, actual spacing, target spacing reference parameters, and screenshots of abnormal locations for devices that violate spacing requirements, in order to generate an inspection report.
9. The method according to claim 8, characterized in that, After generating the inspection report, it also includes: In response to the operation command for the target item in the inspection report, jump to the corresponding location in the design file.
10. The method according to claim 8, characterized in that, After generating the inspection report, it also includes: The abnormal entries marked with alarm risk warning information in the inspection report are identified as items that must be modified. In response to the modification instruction for the abnormal entry, the corresponding actual distance is remeasured and a secondary judgment is made; If the second determination result is still an alarm risk warning message, then a second alarm risk warning message will be output; if the second determination result is a warning risk warning message or no risk warning message, then it is confirmed that the abnormal item has been repaired.
11. The method according to any one of claims 1 to 7, characterized in that, Also includes: In response to a modification operation with administrator privileges, the spacing reference parameter in the two-dimensional information structure is modified, and the modified spacing reference parameter is persistently stored. In response to a modification operation with user permissions, the spacing reference parameter in the two-dimensional information structure is modified, and the modified spacing reference parameter is marked as effective only once. In response to a system restart, the single-time effective spacing reference parameter is restored to the value set by the administrator.
12. The method according to any one of claims 1 to 7, characterized in that, Also includes: In response to the operation of adding a new device type, the new device type is added to the end of the row direction and the end of the column direction of the two-dimensional information structure, and the corresponding spacing reference parameters are recorded at the intersection position corresponding to the new device type.
13. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the method as claimed in any one of claims 1 to 12.
14. A non-volatile storage medium, characterized in that, Used to store a computer program, wherein the computer program, when executed by a processor, implements the method as described in any one of claims 1 to 12.
15. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the method described in any one of claims 1 to 12.
