Circuit board layout method, device, storage medium and electronic equipment

CN122797429APending Publication Date: 2026-09-22GUANGZHOU SHIYUAN ELECTRONICS CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510341312.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-21
Publication Date
2026-09-22

AI Technical Summary

Technical Problem

但是,在对布局好的电路板进行布线时,有可能出现布线无法布通的问题,此时则需要重新调整布局,重新进行布线,通常需要出现多次迭代才能达到设计要求,导致布局布线效率低

Benefits of technology

[0038]本申请在第一次执行第一操作时,将所有第一布局调整操作的布局操作概率被设置为相同,这种初始设置确保了在没有先验信息的情况下,每个第一布局调整操作都有平等的机会被选择,避免了因初始概率偏差导致的不公平竞争;在第N次执行第一操作时,通过计算第N-1次执行第一操作后的第二目标函数值与第一目标函数值的差值,评估第N-1次执行第一操作时采取的第一布局调整操作的效果,进而修正对应的第一布局调整操作的布局操作概率,从而逐步淘汰效果不佳的操作,增加有效操作的选择概率,从而逐步更新优化布局调整操作。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122797429A_ABST
    Figure CN122797429A_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a circuit board layout and wiring method, device, storage medium and electronic equipment, the method comprising: layout and wiring of a plurality of first components, to obtain first wiring data and first target function value; when the wiring is not connected, perform the first operation: according to the first wiring data, determine the second layout adjustment operation of the second component; according to the second layout adjustment operation of the second component, obtain the second layout data; according to the second layout data, obtain the second wiring data and the second target function value; according to the second target function value and the first target function value, update the first wiring data, continue to execute the first operation, until the number of times of executing the first operation is greater than or equal to the preset number of times threshold, from the second target function value and the first target function value, determine the optimal target function value; according to the layout data and the wiring data corresponding to the optimal target function value, layout and wiring, the present application can improve the layout and wiring efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of circuit boards, and in particular to a circuit board layout and wiring method, apparatus, storage medium, and electronic device. Background Technology

[0002] Printed circuit boards (PCBs) are one of the most important components in the electronics industry. PCBs can replace complex wiring to realize the electrical connection between various components in a circuit. This not only simplifies the assembly and soldering of electronic products, reduces the amount of wiring work done in traditional methods, and alleviates the labor intensity of workers, but also reduces the overall size of the device, lowers product costs, and improves the quality and reliability of electronic equipment.

[0003] In the design of printed circuit boards (PCBs), the traditional method is to first lay out the various components on the PCB to determine their relative positions, and then route the layout to establish electrical connections between the components. However, when routing the layout, problems may arise where the routing cannot be completed. In such cases, the layout needs to be readjusted and the routing redone, usually requiring multiple iterations to meet the design requirements, resulting in low layout and routing efficiency. Summary of the Invention

[0004] To overcome the problems existing in the related technologies, this application provides a circuit board layout and routing method, apparatus, storage medium and electronic device, which can improve the efficiency of layout and routing.

[0005] According to a first aspect of the embodiments of this application, a circuit board layout and routing method is provided, comprising the following steps:

[0006] Obtain the layout and routing information of the circuit to be laid out; the layout and routing information includes several first components;

[0007] The plurality of first components are laid out to obtain first layout data; routing is performed according to the first layout data to obtain first routing data and a first objective function value; the first objective function value is used to indicate the quality index when routing is performed using the first routing data;

[0008] When the first wiring data indicates that the wiring is not completed, the first operation is performed: based on the first wiring data, a second layout adjustment operation for the second component is determined; based on the second layout adjustment operation for the second component, layout constraint information is determined; based on the layout constraint information, second layout data is obtained; wiring is performed based on the second layout data to obtain second wiring data and a second objective function value; the second component is one or more of the plurality of first components; the second objective function value is used to indicate the quality index when wiring is performed using the second wiring data;

[0009] Based on the second objective function value and the first objective function value, update the first routing data and continue to execute the first operation until the number of times the first operation is executed is greater than or equal to a preset threshold. Then, determine the optimal objective function value from the second objective function value and the first objective function value, and perform layout and routing according to the layout data and routing data corresponding to the optimal objective function value.

[0010] In this embodiment, when the first routing data indicates that the routing is not complete, a second placement adjustment operation for the second component is determined based on the first routing data; placement constraint information is determined based on the second placement adjustment operation for the second component; second placement data is obtained based on the placement constraint information; routing is performed based on the second placement data to obtain the second routing data and the second objective function value. This effectively adjusts the placement based on the result of the routing not being complete, achieving coordinated optimization of placement and routing, thereby improving placement and routing efficiency. Furthermore, the first routing data is updated based on the second objective function value and the first objective function value, iteratively adjusting the placement and routing data to continuously break local optima and gradually approach the global optimum, obtaining the globally optimal placement and routing result, thus improving the reliability of placement and routing.

[0011] In one embodiment, the step of determining the second layout adjustment operation of the second component based on the first wiring data includes:

[0012] Based on the first wiring data, the second layout adjustment operation of the second component is determined from a preset number of first layout adjustment operations;

[0013] Specifically, during the first execution of the first operation, a second layout adjustment operation for the second component is randomly determined from among the plurality of first layout adjustment operations based on the first wiring data; during the Nth execution of the first operation, a second layout adjustment operation for the second component is determined based on the first wiring data and the layout adjustment probabilities corresponding to each of the plurality of first layout adjustment operations; wherein the layout adjustment probabilities corresponding to each of the plurality of first layout adjustment operations are determined based on the first objective function value and the second objective function value; N is greater than 1 and N is an integer.

[0014] In this embodiment, the second layout adjustment operation of the second component is determined based on the layout adjustment probability corresponding to each of the first layout adjustment operations. The layout adjustment probability is continuously iterated and adjusted to ensure that the second layout adjustment operation of the second component determined each time is the optimal layout adjustment operation, thereby accelerating the acquisition of the optimal layout and routing result.

[0015] In one embodiment, the plurality of first layout adjustment operations include a plurality of first sub-operations and a plurality of second sub-operations; wherein, the plurality of first sub-operations are used to indicate the deletion of the current layout position of the second component; the plurality of second sub-operations are used to indicate the adjustment of the current layout position of the second component; the step of determining the second layout adjustment operation of the second component from the preset plurality of first layout adjustment operations based on the first wiring data includes:

[0016] From the plurality of first sub-operations, one of the first sub-operations is selected as the layout adjustment operation for the second component, and / or

[0017] From the plurality of second sub-operations, one of the second sub-operations is selected as the layout adjustment operation of the second component.

[0018] In this application embodiment, the first operation deletes the layout position of the second component that causes the wiring to be unsuccessful, so as to avoid the second component still being in the same layout position and causing the wiring to be unsuccessful in the next layout. Alternatively, the second operation adjusts the layout position of the second component so that the second component is in the adjusted layout position in the next layout. Or, the first and second operations are used in combination, so as to speed up the acquisition of the optimal layout and routing result through the layout adjustment operation of the second layout device.

[0019] In one embodiment, the step of determining layout constraint information based on the second layout adjustment operation of the second component includes:

[0020] When the selected second sub-operation is to select all the first components that failed to punch holes from a number of first components as the second components, the layout coordinates of the second components are moved, and the layout position information of the moved second components is used as the layout constraint information.

[0021] When the selected second sub-operation is to randomly select a first component that failed to punch a hole or a first component with an unconnected pin from a plurality of first components as the second component, the second component is rotated at a preset angle, and the layout position information of the rotated second component is used as the layout constraint information.

[0022] When the selected second sub-operation is to randomly select a first component with an unconnected pin from a plurality of first components as the second component, other pins of the second component are randomly selected as connection points; the pin position information of the randomly selected second component is used as the layout constraint information;

[0023] When the selected second sub-operation is to randomly select a first component from a plurality of first components as the second component, the layout coordinates of the second component are moved and / or the second component is rotated by a preset angle, and the layout position information of the moved second component and / or the layout position information of the rotated second component is used as the layout constraint information.

[0024] In this embodiment, the layout position information of all failed punching second components after adjustment is used as layout constraint information; or, the layout position information obtained by rotating a randomly selected failed punching second component or a randomly selected unconnected pin second component by a preset angle is used as layout constraint information; or, the information of other pins of randomly selected second components as connection points is used as layout constraint information; or, the layout coordinates of a randomly moved second component and / or the second component rotated by a preset angle is used as layout constraint information; or, the layout position information of the moved second component and / or the layout position information of the rotated second component is used as layout constraint information. This can provide a clear adjustment direction for layout adjustment, so as to obtain the optimal layout and routing result as soon as possible.

[0025] In one embodiment, the step of moving the layout coordinates of the second component and using the layout position information of the moved second component as the layout constraint information when the selected second sub-operation is to select all the first components that failed to punch holes from a plurality of first components as the second component includes:

[0026] Based on the first layout data, the component topology diagram is obtained;

[0027] Perform the second operation: Based on the component topology diagram, determine several third components associated with the second component; based on the relative positions of the second component and the several third components, determine the target adjustment direction; move the layout coordinates of the second component according to the target adjustment direction, and obtain third layout data based on the moved second component; perform routing according to the third layout data to obtain third routing data.

[0028] When the third wiring data indicates that the wiring is not completed, the component topology diagram is updated according to the third layout data, and the second operation continues to be performed until the third wiring data indicates that the wiring is completed or the second component cannot move its layout coordinates. Then, the layout position information of the second component when the wiring is completed is used as the layout constraint information, or the layout position information of the second component in the last iteration is used as the layout constraint information.

[0029] In this embodiment of the application, after multiple iterations of adjusting the layout position of the second component, the third wiring data may have solved all the wiring problems, that is, the third wiring data has been successfully routed. At this time, the layout position information of the second component corresponding to the third wiring data can be used as layout constraint information to update the first wiring data again, so as to break the local solution again and further approach the global optimum. When the second component cannot be adjusted, the layout position information of the second component in the last iteration is used as layout constraint information to update the first wiring data again to find a better solution in order to achieve the global optimum layout and wiring result.

[0030] In one embodiment, the step of determining the target adjustment direction based on the relative positions of the second component and the plurality of third components includes:

[0031] Based on the first wiring data, determine the location of the wiring failure;

[0032] The fault location is determined to point in the target direction of the second component; based on the relative positions of the second component and several third components, directions outside the target direction are determined as adjustment directions to be determined.

[0033] The adjustment direction that minimizes the number of first components affected during movement is taken as the target adjustment direction.

[0034] This application embodiment adjusts the layout by eliminating the fault location and pointing to the target direction of the second component. This avoids moving to the fault location during layout adjustment, which would prevent the routing from being completed. By analyzing each direction to be adjusted and calculating the number of first components that may be affected during adjustment, the direction with the least impact is selected as the target adjustment direction. This can minimize interference with other components, thereby improving the reliability and efficiency of layout and routing.

[0035] In one embodiment, the layout operation probability corresponding to each of the plurality of first layout adjustment operations is obtained in the following way:

[0036] When the first operation is executed for the first time, the layout adjustment probability corresponding to each of the plurality of first layout adjustment operations is set to be the same;

[0037] When the first operation is executed for the Nth time, the layout adjustment probability corresponding to each of the plurality of first layout adjustment operations is obtained when the first operation is executed for the N-1th time; based on the difference between the second objective function value and the first objective function value after the first operation is executed for the N-1th time, the correction probability of the first layout adjustment operation used when the first operation is executed for the N-1th time is obtained; based on the correction probability, the layout adjustment probability of the corresponding first layout adjustment operation is updated to obtain the layout adjustment probability corresponding to each of the plurality of first layout adjustment operations when the first operation is executed for the Nth time.

[0038] In the first execution of the first operation, this application sets the layout operation probability of all first layout adjustment operations to be the same. This initial setting ensures that each first layout adjustment operation has an equal chance to be selected in the absence of prior information, avoiding unfair competition caused by initial probability bias. In the Nth execution of the first operation, the effect of the first layout adjustment operation taken in the N-1th execution is evaluated by calculating the difference between the second objective function value and the first objective function value after the N-1th execution of the first operation. The layout operation probability of the corresponding first layout adjustment operation is then corrected, thereby gradually eliminating operations with poor performance and increasing the selection probability of effective operations, thus gradually updating and optimizing the layout adjustment operations.

[0039] In one embodiment, the step of determining the second layout adjustment operation of the second component based on the layout adjustment probabilities corresponding to each of the plurality of first layout adjustment operations includes:

[0040] Arrange the layout adjustment probabilities corresponding to the plurality of first layout adjustment operations in descending order, and take the first layout adjustment operations that are arranged before a preset number as the second layout adjustment operations of the second component.

[0041] In this embodiment, the first layout adjustment operation corresponding to the layout adjustment probability arranged before a preset number is used as the second layout adjustment operation of the second component. This can ensure that the layout adjustment is performed with the optimal layout adjustment operation each time the first operation is executed, thereby improving the reliability of layout and routing.

[0042] In one embodiment, the step of updating the first wiring data based on the second objective function value and the first objective function value, and continuing to perform the first operation, includes:

[0043] When the second objective function value is better than the first objective function value, the second routing data is used as the first routing data, the second objective function value is used as the first objective function value, and the first operation continues to be performed;

[0044] When the first objective function value is better than the second objective function value, keep the first wiring data and the first objective function value unchanged, and continue to execute the first operation.

[0045] In each execution of the first operation, the layout is optimized based on the routing data corresponding to the optimal objective function value. This avoids deteriorating the layout and prevents it from falling into a worse layout state due to local adjustments. Thus, it gradually approaches the global optimum without deviating from the optimization direction.

[0046] In one embodiment, the step of determining the optimal objective function value from the second objective function value and the first objective function value includes:

[0047] When there is a wiring completion result in the first wiring data and the second wiring data, the optimal objective function value is determined from the objective function values ​​corresponding to the wiring completion; wherein, the objective function value corresponding to the wiring completion includes the first objective function value and / or the second objective function value;

[0048] When neither the first wiring data nor the second wiring data contains a wiring completion result, the optimal objective function value is determined from the second objective function value and the first objective function value.

[0049] In this embodiment, when there is a routing completion result in the first and second routing data, the optimal objective function value is determined from the objective function values ​​corresponding to the routing completion. This avoids increasing the cost of manually adjusting the layout and routing based on the optimal objective function value. When there is no routing completion result in the first and second routing data, the optimal objective function value is determined directly from the second and first objective function values. This allows the optimal layout and routing result to be obtained quickly even if the layout and routing is manually adjusted, thus improving the efficiency of layout and routing.

[0050] According to a second aspect of the embodiments of this application, a circuit board layout and wiring apparatus is provided, comprising:

[0051] A circuit information acquisition module is used to acquire the circuit information to be laid out and routed; the circuit information to be laid out and routed includes several first components;

[0052] The data acquisition module is used to lay out the plurality of first components to obtain first layout data; to perform routing based on the first layout data to obtain first routing data and a first objective function value; the first objective function value is used to indicate the quality index when routing is performed using the first routing data.

[0053] An iterative adjustment module is used to perform a first operation when the first wiring data indicates that the wiring is not continuous: determining a second layout adjustment operation for the second component based on the first wiring data; determining layout constraint information based on the second layout adjustment operation for the second component; obtaining second layout data based on the layout constraint information; performing wiring based on the second layout data to obtain the second wiring data and a second objective function value; the second component is one or more of the plurality of first components; the second objective function value is used to indicate the quality index when wiring is performed using the second wiring data.

[0054] The placement and routing module is used to update the first routing data according to the second objective function value and the first objective function value, continue to execute the first operation until the number of times the first operation is executed is greater than or equal to a preset number threshold, determine the optimal objective function value from the second objective function value and the first objective function value, and perform placement and routing according to the placement data and routing data corresponding to the optimal objective function value.

[0055] According to a third aspect of the embodiments of this application, an electronic device is provided, including a processor and a memory; the memory stores a computer program adapted to be loaded by the processor and executed as described above in the circuit board layout and routing method.

[0056] According to a fourth aspect of the embodiments of this application, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the circuit board layout and routing method as described above.

[0057] In this embodiment, when the first routing data indicates that the routing is not complete, a second placement adjustment operation for the second component is determined based on the first routing data; placement constraint information is determined based on the second placement adjustment operation for the second component; second placement data is obtained based on the placement constraint information; routing is performed based on the second placement data to obtain the second routing data and the second objective function value. This effectively adjusts the placement based on the result of the routing not being complete, achieving coordinated optimization of placement and routing, thereby improving placement and routing efficiency. Furthermore, the first routing data is updated based on the second objective function value and the first objective function value, iteratively adjusting the placement and routing data to continuously break local optima and gradually approach the global optimum, obtaining the globally optimal placement and routing result, thus improving the reliability of placement and routing.

[0058] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application.

[0059] To better understand and implement this invention, the following detailed description is provided in conjunction with the accompanying drawings. Attached Figure Description

[0060] 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 some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0061] Figure 1 This is a flowchart illustrating a circuit board layout and routing method according to one embodiment of this application;

[0062] Figure 2 A flowchart illustrating a method for determining the probability of a layout operation in one embodiment of this application;

[0063] Figure 3 A flowchart illustrating a method for determining layout constraint information according to an embodiment of this application;

[0064] Figure 4 A flowchart illustrating a method for determining layout constraint information, as shown in another embodiment of this application;

[0065] Figure 5 A flowchart illustrating a method for determining layout constraint information by moving a second component, as shown in one embodiment of this application;

[0066] Figure 6 This is a flowchart illustrating a method for determining the adjustment direction of a target, as shown in one embodiment of this application.

[0067] Figure 7 This is a flowchart illustrating a method for updating first wiring data according to one embodiment of this application;

[0068] Figure 8 A flowchart illustrating a method for determining the optimal objective function value according to an embodiment of this application;

[0069] Figure 9 This is a schematic block diagram illustrating a circuit board layout and wiring apparatus according to one embodiment of this application;

[0070] Figure 10 This is a schematic diagram of the structure of an electronic device according to one embodiment of this application. Detailed Implementation

[0071] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings. Wherein, when the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements.

[0072] It should be understood that the embodiments described below do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without inventive effort are within the scope of protection of this application.

[0073] The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The singular forms "a" and "the" as used herein are also intended to include the plural forms unless the context clearly indicates otherwise. Furthermore, in the description of this application, unless otherwise stated, "a plurality of" means two or more. It should also be understood that the term "and / or" as used herein refers to and includes any or all possible combinations of one or more associated listed items, for example, A and / or B, which can represent: A alone, A and B together, and B alone; the character " / " generally indicates that the preceding and following objects are in an "or" relationship.

[0074] It should be understood that although the terms first, second, third, etc., may be used in this application to describe various information, this information should not be limited to these terms, and these terms are only used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence, nor should they be construed as indicating or implying relative importance. Those skilled in the art can understand the specific meaning of the above terms in this application according to the specific circumstances. Depending on the context, the word "if" as used in this application can be interpreted as "when," "when," or "in response to determination."

[0075] When designing printed circuit boards (PCBs), the traditional method is to first lay out the components on the PCB to determine their relative positions, and then route the layout to establish electrical connections between the components. However, during the routing process, problems may arise where the routing cannot be completed. In such cases, the layout needs to be readjusted and the routing redone, often requiring multiple iterations to meet the design requirements, resulting in low layout and routing efficiency.

[0076] In the process of developing this application, the inventors discovered that traditional placement and routing are performed separately. The placement stage cannot fully consider the routing requirements, and the routing stage struggles to effectively adjust the placement results. This necessitates multiple iterations between placement and routing, especially in cases involving multi-objective optimization and complex constraints, where the complexity and number of iterations of placement and routing increase exponentially. Moreover, the placement optimization results from the previous stage are often corrupted during the routing process in the subsequent stage, leading to reduced reliability of placement and routing.

[0077] In the iterative placement and routing process of this application, the placement data is adjusted based on the routing data fed back during routing, and the routing data is optimized based on the adjusted placement data, thereby achieving coordinated optimization of placement and routing and improving placement and routing efficiency. At the same time, the optimal objective function value is determined based on the objective function value obtained in each placement and routing iteration, and then the placement and routing data is adjusted based on the routing data corresponding to the optimal objective function value, thereby continuously breaking the local optimal placement and routing and gradually approaching the global optimal placement and routing, and thus performing placement and routing with the optimal placement and routing data, thereby improving the reliability of placement and routing.

[0078] The circuit board placement and routing method of this application can be executed by a circuit board placement and routing device, which can be implemented by software and / or hardware. The circuit board placement and routing device can consist of two or more physical entities, or it can consist of a single physical entity. The hardware referred to by the circuit board placement and routing device essentially refers to computer equipment, such as a computer, mobile phone, or tablet.

[0079] The following will be combined with the appendix Figures 1 to 8 This application provides a detailed description of the circuit board layout and routing method provided in the embodiments.

[0080] Please see Figure 1 The circuit board layout and routing method provided in this application includes the following steps:

[0081] Step S101: Obtain the layout and routing circuit information; the layout and routing circuit information includes several first components.

[0082] Optionally, the circuit information to be placed and routed may also include component design information, several circuit constraint data, and placement and routing objective function.

[0083] The component design information includes component information and circuit loop information.

[0084] Component information refers to information related to the component itself. Optionally, component information may include component type, component size, and / or component pin information. Component information can be obtained from datasheets, integrated circuit chip lookup software, the component's official website, or extracted from circuit board layout design files. Circuit loop information is the closed path of current flowing through the circuit, starting from the power source and returning to the power source. Optionally, circuit loop information includes DC loop information and / or AC loop information.

[0085] Optionally, the component design information may also include the component's location in the circuit schematic and its wiring information.

[0086] Component location information refers to the specific position of each component in the schematic diagram. This specific position may include the coordinates of the component's center point in the schematic diagram, the component's orientation in the schematic diagram, the coordinates of the component's bounding box in the schematic diagram, and / or the component's relative positional relationship in the schematic diagram. Component wiring information refers to the electrical connection relationships between components. This electrical connection relationship may include the pins used for connection, which component pins are electrically connected, and the specific path connecting the two pins. The component location information and wiring information in the schematic diagram can be extracted from the circuit schematic file.

[0087] Among them, circuit board constraint data is the data used to define and restrict the design rules such as circuit board layout, wiring, and component placement when designing and manufacturing circuit boards. Circuit board constraint data includes electrical constraint data, mechanical constraint data, and / or thermal management constraint data.

[0088] In one embodiment, the circuit board constraint data can be constraint data transformed from data input by the designer at the data input interface. For example, first constraint configuration data described by a controlled language directly input by the designer at the data input interface is obtained, and the first constraint configuration data is converted into second constraint configuration data described using formal logic; the second constraint configuration data is converted into third constraint configuration data that can be processed by a layout solver, and the third constraint configuration data is used as the circuit board constraint data. In another embodiment, the circuit board constraint data can be constraint data extracted from a circuit schematic design file. In yet another embodiment, the circuit board constraint data can be constraint data learned through a constraint learning model, wherein the constraint learning model can learn from the wiring layout results obtained by manual layout based on historical constraint configuration data, using the minimum sum of code length and data code length as the optimization objective, and using a greedy strategy to filter and learn some implicit or inherently required constraint data. In yet another embodiment, the circuit board constraint data is one or more of the constraint data directly input by the designer at the data input interface, constraint data extracted from a circuit schematic design file, and constraint data learned through a constraint learning model.

[0089] The placement and routing objective function is used to meet design specifications and performance requirements by rationally arranging component locations and trace paths. The placement and routing objective function can include one or more of the following: minimizing chip area, minimizing power consumption, minimizing routing congestion, minimizing the number of pins, and minimizing the number of unsuccessfully connected loops.

[0090] To facilitate the layout and routing solution by the layout solver, this embodiment of the application uses a constraint management compiler to convert the circuit information to be placed and routed into a language that the layout solver can directly process, thereby speeding up the layout solver to obtain the corresponding layout and routing data.

[0091] Step S102: Layout several first components to obtain first layout data; perform routing based on the first layout data to obtain first routing data and first objective function value.

[0092] The first layout data is used to describe the information of the position of each first component in the circuit on the circuit board. The first layout data may include the specific coordinate position, orientation and layer of the first component on the circuit board.

[0093] Optionally, several first components are laid out according to a preset layout algorithm to obtain first layout data. The preset layout algorithm can be a heuristic algorithm, a genetic algorithm, a simulated annealing algorithm, etc., and this application does not impose any limitations. When laying out several first components, component design information, circuit constraint data, and layout and routing objective functions can be used as supplementary data to ensure that the components are placed in the most suitable positions on the circuit board.

[0094] The first routing data describes the path and connection method of the conductors (or connectors) in the circuit board. This data includes the starting path information of the conductors (or connectors), the layer number of the conductors (or connectors), and the connection relationship of the first components. The first objective function value indicates the quality index when routing using the first routing data. It is a value calculated based on design objectives and constraints, used to evaluate the merits of the current design scheme.

[0095] Optionally, according to a preset routing algorithm, the first components in the first layout data are connected by wires to obtain the first routing data and the first objective function value. The preset routing algorithm can be a maze algorithm, a channel routing algorithm, an A* algorithm, etc., and this application does not impose any limitations.

[0096] Step S103: When the first wiring data indicates that the wiring is not completed, perform the first operation: determine the second layout adjustment operation of the second component based on the first wiring data; determine the layout constraint information based on the second layout adjustment operation of the second component; obtain the second layout data based on the layout constraint information; perform wiring based on the second layout data to obtain the second wiring data and the second objective function value; the second component is one or more of the first components.

[0097] When the first wiring data indicates that the wiring is completed, the first wiring data includes the path and connection method of the conductors (or connecting lines) in the circuit board. At this time, the layout and wiring can be performed according to the first layout data and the first wiring data to obtain the circuit board after layout and wiring.

[0098] When the first routing data indicates that the routing is not continuous, the first routing data includes the result of the routing failure and the information that caused the routing failure. Among them, the information that caused the routing failure includes the location information of the fault point of the routing failure, the location information of the components that failed to drill (i.e., there is no effective space available for drilling), the location information of the components whose pins cannot be connected, and the location information of the pins, etc.

[0099] Wherein, the second component is one or all of the first components that failed to punch a hole; and / or, the second component is one or all of the first components with unconnected pins; and / or, one or more first components are randomly selected, which are not the first components with failed punching or unconnected pins.

[0100] The second layout adjustment operation can be an operation to record the current layout position information of the second component, and / or it can be an operation to move the current layout position information of the second component. The layout position information can include coordinates and / or direction.

[0101] Correspondingly, based on the second layout adjustment operation of the second component, the layout constraint information can be determined to be the current layout position information of the second component as the layout constraint information, so as to indicate that when laying out, the second component should not be laid out at the current layout position, and / or, based on the second layout adjustment operation of the second component, the layout constraint information can be determined to be the layout position information of the moved second component as the layout constraint information, so as to indicate that when laying out, the second component should be set at the moved layout position.

[0102] Optionally, based on the layout constraint information, a preset layout algorithm is used to lay out several first components to obtain second layout data. Then, based on a preset routing algorithm, the components in the second layout data are connected by wires to obtain second routing data and a second objective function value. The second objective function value indicates the quality index when routing using the second routing data. The specific layout and routing method is exactly the same as in step S102, and will not be described in detail here.

[0103] Step S104: Update the first routing data according to the second objective function value and the first objective function value, and continue to execute the first operation until the number of times the first operation is executed is greater than or equal to the preset number threshold. Then, determine the optimal objective function value from the second objective function value and the first objective function value according to the first routing data and the second routing data. Perform layout and routing according to the layout data and routing data corresponding to the optimal objective function value.

[0104] It is understandable that the second wiring data obtained after performing the first operation may show that the wiring is completed or not.

[0105] When the second wiring data indicates that the wiring is complete, in one embodiment, layout and routing are performed according to the second layout data and the second wiring data respectively to obtain the layout and routing circuit board. When the second wiring data indicates that the wiring is complete, in another embodiment, it is determined which of the second objective function value and the first objective function value is optimal. If the second objective function value is better than the first objective function value, the second wiring data is updated to the first wiring data, a first component is randomly selected as the second component, the second layout adjustment operation of the second component is determined, and the first operation continues to be executed; if the first objective function value is better than the second objective function value, the first operation continues to be executed according to the first wiring data.

[0106] When the second routing data indicates that the routing is not completed, it is determined which objective function value is optimal, the second objective function value or the first objective function value. If the second objective function value is better than the first objective function value, the second routing data is updated to the first routing data, and the first operation is continued. If the first objective function value is better than the second objective function value, the first operation is continued based on the first routing data.

[0107] Since the objective function value is a key factor in evaluating the quality of the layout, the optimal routing data can be selected based on the objective function value. Different objective functions evaluate layout and routing quality differently; therefore, the optimal objective function value should be determined appropriately based on the specific objective function. For example, when the objective function indicates minimizing the routing path length, the minimum objective function value between the first and second objective function values ​​is selected as the optimal value. Conversely, when the objective function indicates maximizing the operational amplifier gain or bandwidth, the maximum objective function value between the first and second objective function values ​​is selected as the optimal value.

[0108] In one embodiment, each time the first operation is executed, the second objective function value and the second routing data are stored. When the number of times the first operation is executed is greater than or equal to a preset number threshold, the second objective function value and the second routing data of the preset number threshold are actually stored. At this time, several routing data of routing can usually be obtained from the second routing data of the preset number threshold. Then, the optimal objective function value is determined from the objective function values ​​corresponding to the several routing data of routing.

[0109] Since each execution of the first operation optimizes the routing data corresponding to the optimal objective function value and updates both the second and first objective function values, in another embodiment, when the number of executions of the first operation is greater than or equal to a preset threshold, the optimal objective function value is directly determined based on the second and first objective function values ​​determined in the last iteration. It is understandable that after multiple iterations, the placement and routing have reached near-optimal levels, and the routing results indicated by both the second and first routing data may indicate successful routing. Therefore, the optimal objective function value can be directly determined from the second and first objective function values. Even if the routing data corresponding to the optimal objective function value indicates unsuccessful routing, the optimal placement and routing data can still be obtained through manual fine-tuning based on the routing data corresponding to the optimal objective function value.

[0110] In this embodiment, when the first routing data indicates that the routing is not complete, a second placement adjustment operation for the second component is determined based on the first routing data; placement constraint information is determined based on the second placement adjustment operation for the second component; second placement data is obtained based on the placement constraint information; routing is performed based on the second placement data to obtain the second routing data and the second objective function value. This effectively adjusts the placement based on the result of the routing not being complete, achieving coordinated optimization of placement and routing, thereby improving placement and routing efficiency. Furthermore, the first routing data is updated based on the second objective function value and the first objective function value, iteratively adjusting the placement and routing data to continuously break local optima and gradually approach the global optimum, obtaining the globally optimal placement and routing result, thus improving the reliability of placement and routing.

[0111] In one embodiment, step S103, which involves determining the second layout adjustment operation of the second component based on the first wiring data, includes:

[0112] Step S1031: Based on the first wiring data, determine the second layout adjustment operation of the second component from a number of preset first layout adjustment operations.

[0113] Specifically, during the first execution of the first operation, a second layout adjustment operation for the second component is randomly determined from a set of preset first layout adjustment operations based on the first wiring data; during the Nth execution of the first operation, a second layout adjustment operation for the second component is determined based on the first wiring data and the layout adjustment probabilities corresponding to each of the preset first layout adjustment operations; wherein the layout adjustment probabilities corresponding to each of the preset first layout adjustment operations are determined based on the first objective function value and the second objective function value; N is greater than 1 and N is an integer.

[0114] It is understood that this application pre-defines several first layout adjustment operations. From these pre-define several first layout adjustment operations, one or more first layout adjustment operations can be determined as the second layout adjustment operations of the second component.

[0115] In this embodiment, the second layout adjustment operation of the second component is determined based on the layout adjustment probability corresponding to each of the first layout adjustment operations. The layout adjustment probability is continuously iterated and adjusted to ensure that the second layout adjustment operation of the second component determined each time is the optimal layout adjustment operation, thereby accelerating the acquisition of the optimal layout and routing result.

[0116] Please see Figure 2 In one embodiment, the layout operation probabilities corresponding to each of the several first layout adjustment operations are obtained in the following way:

[0117] Step S10311: When the first operation is executed for the first time, set the layout adjustment probability of each of the several first layout adjustment operations to be the same;

[0118] Step S10312: When the first operation is executed for the Nth time, obtain the layout adjustment probability corresponding to each of the several first layout adjustment operations when the first operation is executed for the N-1th time; based on the difference between the second objective function value and the first objective function value after the first operation is executed for the N-1th time, obtain the correction probability of the first layout adjustment operation used when the first operation is executed for the N-1th time; based on the correction probability, update the layout adjustment probability of the corresponding first layout adjustment operation to obtain the layout operation probability corresponding to each of the several first layout adjustment operations when the first operation is executed for the Nth time.

[0119] Understandably, initially, the layout adjustment probabilities of several first layout adjustment operations can be set to be the same. Then, during the first execution of the first operation, one or more layout adjustment operations are randomly selected from the preset set of first layout adjustment operations as the second layout adjustment operations for the second component. After the first execution of the first operation, the correction probability of the first layout adjustment operation implemented in the first operation is obtained based on the first objective function value and the second objective function value. This is then used to update the layout adjustment probabilities of the corresponding first layout adjustment operations, thereby updating the layout adjustment probabilities corresponding to each of the several first layout adjustment operations. During the second execution of the first operation, the second layout adjustment operation for the second component is determined from the updated layout adjustment probabilities of the first layout adjustment operations, and so on.

[0120] In specific implementation, when the first operation is executed for the first time, setting the layout operation probability of each of the several first layout adjustment operations to be the same can be achieved as follows: Assuming there are M first layout adjustment operations, the initial probability of each operation is 1 / M. Based on the difference between the second objective function value and the first objective function value after the (N-1)th execution of the first operation, the correction probability of the first layout adjustment operation used in the (N-1)th execution of the first operation can be obtained by multiplying the difference between the second objective function value and the first objective function value after the (N-1)th execution of the first operation by a preset adjustment coefficient; or, based on the correspondence between the difference and the correction probability, the correction probability corresponding to the first layout adjustment operation used in the (N-1)th execution of the first operation can be obtained based on the difference between the second objective function value and the first objective function value after the (N-1)th execution of the first operation. Based on the correction probability, the layout adjustment probability of the corresponding first layout adjustment operation can be updated by adding the correction probability to the layout adjustment probability of the corresponding first layout adjustment operation during the (N-1)th execution of the first operation.

[0121] In the first execution of the first operation, this application sets the layout operation probability of all first layout adjustment operations to be the same. This initial setting ensures that each first layout adjustment operation has an equal chance to be selected in the absence of prior information, avoiding unfair competition caused by initial probability bias. In the Nth execution of the first operation, the effect of the first layout adjustment operation taken in the N-1th execution is evaluated by calculating the difference between the second objective function value and the first objective function value after the N-1th execution of the first operation. The layout adjustment probability of the corresponding first layout adjustment operation is then corrected, thereby gradually eliminating operations with poor performance and increasing the selection probability of effective operations, thus gradually updating and optimizing the layout adjustment operations.

[0122] In one embodiment, step S10312, which involves determining the second layout adjustment operation of the second component based on the layout adjustment probabilities corresponding to each of the plurality of first layout adjustment operations, includes:

[0123] Step S103121: Arrange the layout adjustment probabilities corresponding to the several first layout adjustment operations in descending order, and take the first layout adjustment operations that are arranged before the preset number as the second layout adjustment operations of the second component.

[0124] In this embodiment, the first layout adjustment operation corresponding to the layout adjustment probability arranged before a preset number is used as the second layout adjustment operation of the second component. This can ensure that the layout adjustment is performed with the optimal layout adjustment operation each time the first operation is executed, thereby improving the reliability of layout and routing.

[0125] In one embodiment, a plurality of first layout adjustment operations include a plurality of first sub-operations and a plurality of second sub-operations; wherein, the plurality of first sub-operations are used to indicate the deletion of the current layout position of the second component; the plurality of second sub-operations are used to indicate the adjustment of the current layout position of the second component; the step S1031 of determining the second layout adjustment operation of the second component from a plurality of preset first layout adjustment operations based on the first wiring data includes:

[0126] From a number of first sub-operations, select one of them as the layout adjustment operation for the second component, and / or

[0127] From a number of second sub-operations, select one of the second sub-operations as the layout adjustment operation for the second component.

[0128] The first operation aims to break the local optimum of the current solution by deleting the current placement position of the second component, thus providing an opportunity to search for a new and better placement and routing scheme. The second operation aims to reconstruct a feasible placement and routing scheme by adjusting the current placement position of the second component.

[0129] In this application embodiment, a first operation is used to delete the layout position of the second component that causes the wiring to be unsuccessful, so as to avoid the second component still being in the same layout position and causing the wiring to be unsuccessful in the next layout. Alternatively, a second operation is used to adjust the layout position of the second component so that the second component is in the adjusted layout position in the next layout. Or, the first and second operations are used in combination so that the optimal layout and routing result can be obtained as soon as possible through the layout adjustment operation of the second layout device.

[0130] Please see Figure 3 In one embodiment, step S103, which involves determining layout constraint information based on the second layout adjustment operation of the second component, includes:

[0131] Step S1311: When the first sub-operation is to randomly select a first component that failed to punch a hole from a number of first components as the second component, the layout position information of the second component is used as the layout constraint information.

[0132] Step S1312: When the first sub-operation is to select all the first components that failed to punch holes from a number of first components as the second components, the layout position information of the second components is used as the layout constraint information.

[0133] Step S1313: When the first sub-operation is to randomly select a first component with an unconnected pin from a number of first components as the second component, the layout position information of the second component is used as the layout constraint information.

[0134] Step S1314: When the first sub-operation is to select all unconnected pins of the first components from a number of first components as the second components, the layout position information of the second components is used as the layout constraint information.

[0135] Step S1315: When the first sub-operation is to randomly select a first component from several first components as the second component, the layout position information of the second component is used as the layout constraint information.

[0136] The layout location information includes the layout coordinates and / or layout direction of the second component. For second components with unconnected pins, the layout location information also includes the layout coordinates and / or layout direction of the pins.

[0137] It is understandable that when the first operation is executed iteratively, if the updated first routing data indicates that the routing is not connected, any of the above methods can be selected as the first operation to determine the layout constraint information. However, if the updated first routing data indicates that the routing is connected, since there are no components that have failed to be connected or whose pins are not connected, at this time, only one first component can be randomly selected from several first components as the second component, and the layout position information of the second component can be used as the layout constraint information.

[0138] This application embodiment considers that the main reason for routing failure is failed hole punching or pin disconnection. Therefore, this application uses the layout position information of one or all failed hole punching, one unconnected pin, or all unconnected pins of the second component as layout constraint information to avoid routing failure caused by the second component being in that layout position during the next layout. In addition, this application also randomly selects one first component from several first components as the layout position information of the second component as layout constraint information, so as to break the current optimal solution, avoid getting trapped in local optima, and gradually approach the global optimum to obtain the optimal layout and routing result.

[0139] Please see Figure 4 In one embodiment, step S103, which involves determining layout constraint information based on the second layout adjustment operation of the second component, includes:

[0140] Step S1321: When the selected second sub-operation is to select all the first components that failed to punch holes from a number of first components as the second components, move the layout coordinates of the second components and use the layout position information of the moved second components as the layout constraint information.

[0141] Step S1322: When the selected second sub-operation is to randomly select a first component that failed to punch a hole or a first component with an unconnected pin from a number of first components as the second component, rotate the second component at a preset angle and use the layout position information of the rotated second component as the layout constraint information.

[0142] Step S1323: When the selected second sub-operation is to randomly select a first component with an unconnected pin from a number of first components as the second component, other pins of the second component are randomly selected as connection points; the pin position information of the randomly selected second component is used as layout constraint information.

[0143] Step S1324: When the selected second sub-operation is to randomly select a first component from several first components as the second component, move the layout coordinates of the second component and / or rotate the second component according to a preset angle, and use the layout position information of the moved second component and / or the layout position information of the rotated second component as layout constraint information.

[0144] The layout location information includes the layout coordinates and / or layout direction of the second component. For second components with unconnected pins, the layout location information also includes the layout coordinates and / or layout direction of the pins.

[0145] In one embodiment, since the second operation is to adjust the layout position of the second component, after the second operation is used to adjust the layout position of the second component, wiring can be performed based on the adjusted layout position of the second component. When the wiring is completed, the layout wiring is performed according to the adjusted position of the second component to obtain the circuit board after layout wiring.

[0146] In another embodiment, after the second operation is used to adjust the layout position of the second component, the adjusted layout position of the second component is used as layout constraint information to constrain the second component to be set in the adjusted layout position during the next iteration of layout.

[0147] Understandably, when iterating through the first operation, if the updated first routing data indicates that the routing is not connected, any second operation can be selected from the above methods to determine the layout constraint information. However, if the updated first routing data indicates that the routing is connected, since there are no components that have failed to be connected or whose pins are not connected, only one first component can be randomly selected from several first components as the second component. The layout coordinates of the second component are moved and / or the second component is rotated according to a preset angle. The layout position information of the moved second component and / or the layout position information of the rotated second component is used as the layout constraint information.

[0148] In this embodiment, the layout position information of all failed punching second components after adjustment is used as layout constraint information; or, the layout position information obtained by rotating a randomly selected failed punching second component or a randomly selected unconnected pin second component by a preset angle is used as layout constraint information; or, the information of other pins of randomly selected second components as connection points is used as layout constraint information; or, the layout coordinates of a randomly moved second component and / or the second component rotated by a preset angle is used as layout constraint information; or, the layout position information of the moved second component and / or the layout position information of the rotated second component is used as layout constraint information. This can provide a clear adjustment direction for layout adjustment, so as to obtain the optimal layout and routing result as soon as possible.

[0149] Please see Figure 5 In one embodiment, step S1321, when the selected second sub-operation is to select all first components that failed to punch holes from a plurality of first components as second components, involves moving the layout coordinates of the second components and using the layout position information of the moved second components as layout constraint information.

[0150] Step S13211: Obtain the component topology diagram based on the first layout data.

[0151] Each first component in the first layout data is regarded as a node. If one of the first components is located in the east, south, west or north direction of another first component, and there are no other first components between the two first components, then a directed edge is established between the two first components, and the direction and distance are marked, thereby obtaining the component topology graph.

[0152] Step S13212: Perform the second operation: Based on the component topology diagram, determine several third components associated with the second component; based on the relative positions of the second component and the several third components, determine the target adjustment direction; move the layout coordinates of the second component according to the target adjustment direction, and obtain the third layout data based on the moved second component; perform routing according to the third layout data to obtain the third routing data.

[0153] For each second component that failed to be punched, identify several first components with directed edges to it in the component topology diagram, and designate them as several third components. Determine the fault location of the non-connected wiring in the first wiring data, exclude the direction pointing from the fault location to the center of the second component, and use other directions as pushing directions. In the pushing direction, determine the target adjustment direction based on the number of affected first components; move the layout coordinates of the second components according to the target adjustment direction. During the adjustment process, you can choose to adjust gradually to meet the minimum spacing requirements of the wiring. After each adjustment, a constraint check is required to check whether the spacing between components meets the design rules and process requirements. At the same time, record the additional spacing requirements caused by the adjustment operation to provide a basis for subsequent iterative adjustments.

[0154] Step S13213: When the third wiring data indicates that the wiring is not completed, update the component topology diagram according to the third layout data, and continue to perform the second operation until the third wiring data indicates that the wiring is completed or the second component cannot move its coordinates. Then, use the layout position information of the second component when the wiring is completed as the layout constraint information, or use the layout position information of the second component in the last iteration as the layout constraint information.

[0155] It is understandable that after multiple iterations of adjusting the placement of the second component, the third routing data may have solved all the routing problems, that is, the routing data has been completed. At this point, the placement information of the second component corresponding to the third routing data can be used as the placement constraint information to update the first routing data again, so as to break the local solution again and further approach the global optimum. When the second component cannot be adjusted, the placement information of the second component in the last iteration is used as the placement constraint information to update the first routing data again to find a better solution, so as to achieve the global optimum layout and routing result.

[0156] Please see Figure 6 In one embodiment, step S13212, which involves determining a plurality of third components associated with the second component based on a component topology diagram, includes:

[0157] Step S1331: Determine the location of the wiring failure based on the first wiring data.

[0158] Step S1332: Determine the target direction of the fault location pointing to the second component; based on the relative positions of the second component and several third components, determine the direction outside the target direction as the adjustment direction to be determined.

[0159] Step S1333: The adjustment direction that minimizes the number of first components affected during movement is taken as the target adjustment direction.

[0160] This application embodiment adjusts the layout by eliminating the fault location and pointing to the target direction of the second component. This avoids moving to the fault location during layout adjustment, which would prevent the routing from being completed. By analyzing each direction to be adjusted and calculating the number of first components that may be affected during adjustment, the direction with the least impact is selected as the target adjustment direction. This can minimize interference with other components, thereby improving the reliability and efficiency of layout and routing.

[0161] Please see Figure 7 In one embodiment, step S104, which involves updating the first wiring data based on the second objective function value and the first objective function value, and then continuing to perform the first operation, includes:

[0162] Step S10411: When the second objective function value is better than the first objective function value, the second routing data is used as the first routing data, the second objective function value is used as the first objective function value, and the first operation is continued;

[0163] Step S10412: When the first objective function value is better than the second objective function value, keep the first wiring data and the first objective function value unchanged, and continue to execute the first operation.

[0164] In each execution of the first operation, the layout is optimized based on the routing data corresponding to the optimal objective function value. This avoids deteriorating the layout and prevents it from falling into a worse layout state due to local adjustments. Thus, it gradually approaches the global optimum without deviating from the optimization direction.

[0165] Please see Figure 8 In one embodiment, step S104, determining the optimal objective function value from the second objective function value and the first objective function value, includes:

[0166] Step S10421: When there is a routing completion result in the first routing data and the second routing data, the optimal objective function value is determined from the objective function values ​​corresponding to the routing completion; wherein, the objective function value corresponding to the routing completion includes the first objective function value and / or the second objective function value;

[0167] Step S10422: When there is no routing completion result in either the first routing data or the second routing data, determine the optimal objective function value from the second objective function value and the first objective function value.

[0168] Understandably, after multiple iterations, the placement and routing have reached the optimal level. The routing results indicated by the second routing data and the first routing data may both be completed. At this point, the optimal objective function value can be directly determined from the second objective function value and the first objective function value. Even if the routing data corresponding to the optimal objective function value indicates that the routing is not completed, the optimal placement and routing data can still be obtained by manual fine-tuning based on the routing data corresponding to the optimal objective function value.

[0169] In this embodiment, when there is a routing completion result in the first and second routing data, the optimal objective function value is determined from the objective function values ​​corresponding to the routing completion. This avoids increasing the cost of manually adjusting the layout and routing based on the optimal objective function value. When there is no routing completion result in the first and second routing data, the optimal objective function value is determined directly from the second and first objective function values. This allows the optimal layout and routing result to be obtained quickly even if the layout and routing is manually adjusted, thus improving the efficiency of layout and routing.

[0170] Please see Figure 9 This is a schematic diagram of the circuit board layout and wiring device provided in an embodiment of this application. The device 200 includes:

[0171] The circuit information acquisition module 201 is used to acquire the circuit information to be laid out and routed; the circuit information to be laid out and routed includes several first components;

[0172] The data acquisition module 202 is used to lay out a number of first components to obtain first layout data; to perform routing based on the first layout data to obtain first routing data and a first objective function value; the first objective function value is used to indicate the quality index when routing is performed using the first routing data;

[0173] The iterative adjustment module 203 is used to perform a first operation when the first wiring data indicates that the wiring is not continuous: determining a second layout adjustment operation for the second component based on the first wiring data; determining layout constraint information based on the second layout adjustment operation for the second component; obtaining second layout data based on the layout constraint information; performing wiring based on the second layout data to obtain the second wiring data and a second objective function value; the second component is one or more of a plurality of first components; the second objective function value is used to indicate the quality index when wiring is performed using the second wiring data.

[0174] The placement and routing module 204 is used to update the first routing data according to the second objective function value and the first objective function value, continue to execute the first operation until the number of times the first operation is executed is greater than or equal to a preset number threshold, determine the optimal objective function value from the second objective function value and the first objective function value, and perform placement and routing according to the placement data and routing data corresponding to the optimal objective function value.

[0175] It should be noted that the circuit board layout and routing device provided in this application embodiment is only illustrated by the above-described division of functional modules when executing the circuit board layout and routing method. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the circuit board layout and routing device provided in this application embodiment and the circuit board layout and routing method in this application embodiment belong to the same concept, and the implementation process is detailed in the method embodiment, which will not be repeated here.

[0176] The circuit board layout and routing apparatus embodiments of this application can be applied to computer devices. These apparatus embodiments can be implemented through software, hardware, or a combination of both. Taking software implementation as an example, as a logical device, it is formed by a processor that processes the file reading corresponding computer program instructions from the memory and executing them. From a hardware perspective, the computer device in which it resides may include a processor and memory, which are interconnected via a data bus or other known methods.

[0177] Please see Figure 10 This is a schematic diagram of the structure of the electronic device provided in an embodiment of this application. Figure 10 As shown, the electronic device 300 can specifically be a computer, mobile phone, tablet computer, interactive flat panel, etc. The electronic device 300 may include: at least one processor 310, at least one memory 320, at least one display 330, at least one network interface 340, user interface 350 and at least one communication bus 360.

[0178] The communication bus 360 is used to enable communication between these components.

[0179] The user interface 350 may include a display screen and a camera; the user interface 350 may also include standard wired and wireless interfaces.

[0180] The network interface 340 may optionally include a standard wired interface and a wireless interface (such as a Wi-Fi interface).

[0181] The processor 310 may include one or more processing cores. The processor 310 connects to various parts within the electronic device 300 using various interfaces and lines, and performs various functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in the memory 320, and by calling data stored in the memory 320. Optionally, the processor 310 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 310 may integrate one or a combination of several of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content required for display; and the modem handles wireless communication. It is understood that the modem may also be implemented as a separate chip without being integrated into the processor 310.

[0182] The memory 320 may include random access memory (RAM) or read-only memory. Optionally, the memory 320 may include a non-transitory computer-readable storage medium. The memory 320 can be used to store instructions, programs, code, code sets, or instruction sets. The memory 320 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch function, sound playback function, image playback function, etc.), instructions for implementing the above-described method embodiments, etc.; the data storage area may store data involved in the above-described method embodiments, etc. Optionally, the memory 320 may also be at least one storage device located remotely from the aforementioned processor 310. Figure 10 As shown, the memory 320, which serves as a computer storage medium, may include an operating system, a network communication module, and a user.

[0183] exist Figure 10 In the electronic device 300 shown, the user interface 350 is mainly used to provide an input interface for the user and to obtain the user input data; while the processor 310 can be used to call the circuit board layout and routing operation application stored in the memory 320, such as the circuit board layout and routing program; and execute the relevant operations of any circuit board layout and routing method in the above embodiments, with corresponding functions and beneficial effects.

[0184] This application also provides a computer-readable storage medium storing a computer program, the instructions of which are adapted to be loaded by a processor and executed by the circuit board layout and routing method steps described above. For details of the execution process, please refer to the specific descriptions in the embodiments, which will not be repeated here. The device containing the storage medium can be an electronic device such as a personal computer, laptop computer, smartphone, or tablet computer.

[0185] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative, wherein the components described as separate parts may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this application according to actual needs. Those skilled in the art can understand and implement this without creative effort.

[0186] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0187] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 The computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function selected in one or more boxes.

[0188] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function selected in one or more boxes.

[0189] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0190] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0191] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0192] It should also be noted that 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 process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0193] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.

Claims

1. A circuit board layout and routing method, characterized in that, Includes the following steps: Obtain the layout and routing information of the circuit to be laid out; the layout and routing information includes several first components; The plurality of first components are laid out to obtain first layout data; wiring is performed according to the first layout data to obtain first wiring data and first objective function value; The first objective function value is used to indicate the quality index when wiring is performed using the first wiring data; When the first wiring data indicates that the wiring is not completed, the first operation is performed: based on the first wiring data, a second layout adjustment operation for the second component is determined; based on the second layout adjustment operation for the second component, layout constraint information is determined; based on the layout constraint information, second layout data is obtained; wiring is performed based on the second layout data to obtain second wiring data and a second objective function value; the second component is one or more of the plurality of first components; the second objective function value is used to indicate the quality index when wiring is performed using the second wiring data; Based on the second objective function value and the first objective function value, update the first routing data and continue to execute the first operation until the number of times the first operation is executed is greater than or equal to a preset threshold. Then, determine the optimal objective function value from the second objective function value and the first objective function value, and perform layout and routing according to the layout data and routing data corresponding to the optimal objective function value.

2. The circuit board layout and routing method according to claim 1, characterized in that: The step of determining the second layout adjustment operation of the second component based on the first wiring data includes: Based on the first wiring data, the second layout adjustment operation of the second component is determined from a preset number of first layout adjustment operations; Specifically, during the first execution of the first operation, a second layout adjustment operation for the second component is randomly determined from among the plurality of first layout adjustment operations based on the first wiring data; during the Nth execution of the first operation, a second layout adjustment operation for the second component is determined based on the first wiring data and the layout adjustment probabilities corresponding to each of the plurality of first layout adjustment operations; wherein the layout adjustment probabilities corresponding to each of the plurality of first layout adjustment operations are determined based on the first objective function value and the second objective function value; N is greater than 1 and N is an integer.

3. The circuit board layout and wiring method according to claim 2, characterized in that: The plurality of first layout adjustment operations include a plurality of first sub-operations and a plurality of second sub-operations; wherein, the plurality of first sub-operations are used to indicate the deletion of the current layout position of the second component; the plurality of second sub-operations are used to indicate the adjustment of the current layout position of the second component; the step of determining the second layout adjustment operation of the second component from the preset plurality of first layout adjustment operations based on the first wiring data includes: From the plurality of first sub-operations, one of the first sub-operations is selected as the layout adjustment operation for the second component, and / or From the plurality of second sub-operations, one of the second sub-operations is selected as the layout adjustment operation of the second component.

4. The circuit board layout and wiring method according to claim 3, characterized in that: The step of determining layout constraint information based on the second layout adjustment operation of the second component includes: When the selected second sub-operation is to select all the first components that failed to punch holes from a number of first components as the second components, the layout coordinates of the second components are moved, and the layout position information of the moved second components is used as the layout constraint information. When the selected second sub-operation is to randomly select a first component that failed to punch a hole or a first component with an unconnected pin from a plurality of first components as the second component, the second component is rotated at a preset angle, and the layout position information of the rotated second component is used as the layout constraint information. When the selected second sub-operation is to randomly select a first component with an unconnected pin from a plurality of first components as the second component, other pins of the second component are randomly selected as connection points; the pin position information of the randomly selected second component is used as the layout constraint information; When the selected second sub-operation is to randomly select a first component from a plurality of first components as the second component, the layout coordinates of the second component are moved and / or the second component is rotated by a preset angle, and the layout position information of the moved second component and / or the layout position information of the rotated second component is used as the layout constraint information.

5. The circuit board layout and routing method according to claim 4, characterized in that: The step of selecting all first components that failed to punch holes from a plurality of first components as second components, and moving the layout coordinates of the second components and using the layout position information of the moved second components as the layout constraint information, includes: Based on the first layout data, the component topology diagram is obtained; Perform the second operation: Based on the component topology diagram, determine several third components associated with the second component; based on the relative positions of the second component and the several third components, determine the target adjustment direction; move the layout coordinates of the second component according to the target adjustment direction, and obtain third layout data based on the moved second component; perform routing according to the third layout data to obtain third routing data. When the third wiring data indicates that the wiring is not completed, the component topology diagram is updated according to the third layout data, and the second operation continues to be performed until the third wiring data indicates that the wiring is completed or the second component cannot move its layout coordinates. Then, the layout position information of the second component when the wiring is completed is used as the layout constraint information, or the layout position information of the second component in the last iteration is used as the layout constraint information.

6. The circuit board layout and routing method according to claim 5, characterized in that: The step of determining the target adjustment direction based on the relative positions of the second component and the plurality of third components includes: Based on the first wiring data, determine the location of the wiring failure; The fault location is determined to point in the target direction of the second component; based on the relative positions of the second component and the plurality of third components, directions outside the target direction are determined as adjustment directions to be determined. The adjustment direction that minimizes the number of first components affected during movement is taken as the target adjustment direction.

7. The circuit board layout and routing method according to claim 2, characterized in that: The layout adjustment probabilities corresponding to each of the plurality of first layout adjustment operations are obtained in the following manner: When the first operation is executed for the first time, the layout adjustment probability corresponding to each of the plurality of first layout adjustment operations is set to be the same; When the first operation is executed for the Nth time, the layout adjustment probability corresponding to each of the plurality of first layout adjustment operations is obtained when the first operation is executed for the N-1th time; based on the difference between the second objective function value and the first objective function value after the first operation is executed for the N-1th time, the correction probability of the first layout adjustment operation used when the first operation is executed for the N-1th time is obtained; based on the correction probability, the layout adjustment probability of the corresponding first layout adjustment operation is updated to obtain the layout adjustment probability corresponding to each of the plurality of first layout adjustment operations when the first operation is executed for the Nth time.

8. The circuit board layout and routing method according to claim 7, characterized in that: The step of determining the second layout adjustment operation of the second component based on the layout adjustment probabilities corresponding to the plurality of first layout adjustment operations includes: Arrange the layout adjustment probabilities corresponding to the plurality of first layout adjustment operations in descending order, and take the first layout adjustment operations that are arranged before a preset number as the second layout adjustment operations of the second component.

9. The circuit board layout and routing method according to any one of claims 1 to 8, characterized in that: The step of updating the first wiring data based on the second objective function value and the first objective function value, and continuing to execute the first operation, includes: When the second objective function value is better than the first objective function value, the second routing data is used as the first routing data, the second objective function value is used as the first objective function value, and the first operation continues to be performed; When the first objective function value is better than the second objective function value, keep the first wiring data and the first objective function value unchanged, and continue to execute the first operation.

10. The circuit board layout and routing method according to any one of claims 1 to 8, characterized in that: The step of determining the optimal objective function value from the second objective function value and the first objective function value includes: When there is a wiring completion result in the first wiring data and the second wiring data, the optimal objective function value is determined from the objective function values ​​corresponding to the wiring completion; wherein, the objective function value corresponding to the wiring completion includes the first objective function value and / or the second objective function value; When neither the first wiring data nor the second wiring data contains a wiring completion result, the optimal objective function value is determined from the second objective function value and the first objective function value.

11. A circuit board layout and wiring device, characterized in that, include: A circuit information acquisition module is used to acquire the circuit information to be laid out and routed; the circuit information to be laid out and routed includes several first components; The data acquisition module is used to lay out the plurality of first components to obtain first layout data; and to perform wiring based on the first layout data to obtain first wiring data and a first objective function value. The first objective function value is used to indicate the quality index when wiring is performed using the first wiring data; An iterative adjustment module is used to perform a first operation when the first wiring data indicates that the wiring is not continuous: determining a second layout adjustment operation for the second component based on the first wiring data; determining layout constraint information based on the second layout adjustment operation for the second component; obtaining second layout data based on the layout constraint information; performing wiring based on the second layout data to obtain the second wiring data and a second objective function value; the second component is one or more of the plurality of first components; the second objective function value is used to indicate the quality index when wiring is performed using the second wiring data. The placement and routing module is used to update the first routing data according to the second objective function value and the first objective function value, continue to execute the first operation until the number of times the first operation is executed is greater than or equal to a preset number threshold, determine the optimal objective function value from the second objective function value and the first objective function value, and perform placement and routing according to the placement data and routing data corresponding to the optimal objective function value.

12. An electronic device comprising a processor and a memory; characterized in that, The memory stores a computer program adapted to be loaded by the processor and executed as described in any one of claims 1 to 10.

13. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the circuit board layout and routing method as described in any one of claims 1 to 10.