Device layout method and electronic device

CN122616468APending Publication Date: 2026-08-21SHENZHEN QIYUNFANG TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610829317.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-09
Publication Date
2026-08-21

AI Technical Summary

Technical Problem

[0002]随着电子设备功能日益复杂,印刷电路板(Printed Circuit Board,PCB)设计需求呈现高度定制化和大规模增长态势,传统手工/半自动布局流程已无法满足效率和精度要求

Benefits of technology

若所述第十一器件连接除自身以外的任意一个器件,则确定所述第十一器件的连接线路上的所有器件的总面积,在所述总面积小于或等于该凸型空缺的面积时,将所述第十一器件的连接线路上的所有器件挪至所述凸型空缺的位置;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122616468A_ABST
    Figure CN122616468A_ABST
Patent Text Reader

Abstract

The application provides a device layout method and an electronic device. The method comprises: in response to a selection operation on a plurality of first devices, displaying the plurality of first devices, the plurality of first devices comprising a target device and a plurality of second devices, the plurality of second devices having a connection relationship with the target device; in response to a layout operation on the plurality of first devices, clustering the plurality of second devices to obtain X groups of same-network devices and Y third devices, and arranging the plurality of first devices based on at least one layout parameter, the X groups of same-network devices and the Y third devices to generate a layout map of the plurality of first devices, the Y third devices being Y second devices other than the X groups of same-network devices in the plurality of second devices. The chip device automatic layout method provided by the application can realize an automatic layout method for complex circuits through GUI interaction guidance, and improve the reliability of the layout result and the adoptability of the scheme.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of device layout technology, and in particular to a device layout method and electronic device. Background Technology

[0002] As electronic devices become increasingly complex, the demand for printed circuit board (PCB) design is showing a trend of high customization and large-scale growth, and traditional manual / semi-automatic layout processes can no longer meet the requirements of efficiency and accuracy.

[0003] In the current mainstream PCB design process, the step from schematic to PCB layout still relies heavily on manual intervention. Existing layout methods are not adaptable to complex circuits, resulting in poor reliability of layout results and low adoption rate of solutions. Summary of the Invention

[0004] In view of this, this application provides a device layout method and an electronic device, which realizes an automatic layout method for complex circuits through interactive guidance of a graphical user interface (GUI), and improves the reliability of the layout results and the adoption rate of the solution.

[0005] In a first aspect, embodiments of this application provide a device layout method, the method comprising: In response to a selection operation of multiple first devices, the multiple first devices are displayed. The multiple first devices are devices that need to be laid out. The multiple first devices include a target device and multiple second devices. The multiple second devices are connected to the target device. In response to the placement operation on the plurality of first devices, the plurality of second devices are clustered to obtain X groups of devices in the same network and Y third devices. Based on at least one placement parameter, the X groups of devices in the same network, and the Y third devices, the plurality of first devices are arranged to generate a layout pattern of the plurality of first devices. The at least one placement parameter is used to constrain the layout pattern. Each group of devices in the same network includes at least two second devices. The pin connection relationship of any one of the at least two second devices is the same as the pin connection relationship of any other second device in the at least two second devices. The Y third devices are the Y second devices in the plurality of second devices other than the X groups of devices in the same network. X and Y are integers greater than or equal to 0.

[0006] Therefore, in the embodiments of this application, the device selection is guided by a GUI interface, and multiple selected first devices are arranged based on at least one layout parameter and clustering results to obtain a layout pattern of multiple first devices. The clustering operation can divide the network into groups of devices within the same network and the remaining devices, and then the layout is performed on units of these groups and remaining devices, which can effectively reduce computational complexity and improve adaptability to large-scale complex circuits. Furthermore, the pin connections of each first device within the same group are identical, thus preserving the original pin connections of these devices and satisfying special network constraints, thereby enhancing the reliability of the layout results. Finally, the GUI interface guides the abstract algorithm into a visual interactive process, allowing the layout strategy of complex circuits to be flexibly adjusted through human-computer collaboration, reducing reliance on human experience, and thus improving adaptability to complex circuits and the acceptability of the layout results.

[0007] In conjunction with the first aspect, in one possible implementation, the at least one layout parameter includes at least one of the desired spacing between adjacent second devices among the plurality of second devices and the wiring spacing reserved for the target device; the step of arranging the plurality of first devices to generate a layout pattern of the plurality of first devices based on at least one layout parameter, the X groups of network devices, and the Y third devices includes: when the at least one layout parameter includes the desired spacing between adjacent second devices among the plurality of second devices, using the desired spacing as the spacing between adjacent second devices in the layout pattern to generate the layout pattern; and / or when the at least one layout parameter includes the wiring spacing reserved for the target device, using a preset area as the area for connecting wiring between the plurality of second devices and the target device to generate the layout pattern, wherein the preset area is a first area in the design pattern excluding the area occupied by the target device in the design pattern, and the first area is obtained by expanding the wiring spacing of the area occupied by the target device.

[0008] Therefore, in the embodiments of this application, by using the desired spacing as the actual spacing between adjacent second devices in the layout, and / or by using a preset area other than the area occupied by the target device after expanding the wiring spacing as the wiring area, precise quantitative control of device arrangement spacing and wiring space can be achieved. This reduces wiring congestion or space waste caused by unreasonable spacing settings, improves the routing connectivity and space utilization of the layout, and thus enhances the adaptability to complex circuit layouts and the reliability of the results.

[0009] In conjunction with the first aspect, in one possible implementation, the target device is the first device with the most pins among the plurality of first devices.

[0010] Therefore, in the embodiments of this application, the first device with the most pins is automatically identified as the target device, and the number of pins of a device is highly positively correlated with its functional importance and connection complexity in the circuit. Thus, automatically identifying the first device with the most pins as the target device enables automatic identification of key devices, and subsequent device placement is based on this device. Consequently, manual specification by the user is eliminated, simplifying the user operation process, reducing placement deviations caused by human error or omission, and making the automatic placement method more intelligent and versatile.

[0011] In conjunction with the first aspect, in one possible implementation, the at least one layout parameter includes a device indicator for selecting the target device; The step of arranging the plurality of first devices to generate a layout pattern of the plurality of first devices based on at least one layout parameter, the X groups of devices in the same network, and the Y third devices includes: The first device corresponding to the device indicator is determined from the plurality of first devices as the target device to generate the layout pattern.

[0012] Therefore, in the embodiments of this application, the device indicator allows users to manually select target devices, thus preserving the flexibility of manual intervention in the layout method. Users can flexibly specify target devices according to actual design requirements, improving the user-friendliness of human-machine collaboration and enabling the layout strategy to be customized, thereby meeting diverse and complex circuit layout requirements.

[0013] In conjunction with the first aspect, in one possible implementation, the display of the plurality of first devices in response to a selection operation of a plurality of first devices includes: In response to a user's selection of the plurality of first devices on a first interface, an identifier for each of the plurality of first devices is displayed on a second interface, wherein the first interface is different from the second interface.

[0014] Therefore, in the embodiments of this application, by performing the device selection operation in the first interface and displaying the identifier of each first device in a second interface different from the first interface, the operation area and the display area are separated. This reduces excessive clutter of interface information, allows users to clearly and centrally view the list of selected devices, reduces the risk of operational confusion, improves the intuitiveness and efficiency of the interaction process, and provides a more user-friendly interactive foundation for subsequent setting of layout parameters and generation of layout schemes.

[0015] In conjunction with the first aspect, in one possible implementation, the layout is displayed in a third interface, which is different from the second interface.

[0016] Therefore, in the embodiments of this application, by displaying the final layout diagram on a third interface different from the second interface, a multi-level interface separation of device selection, parameter setting, and layout result display is achieved. Users can complete tasks at different stages without frequently switching their gaze or scrolling through a single interface. The layout results are presented in an independent and clear manner, facilitating users to quickly evaluate the layout quality and make subsequent fine-tuning, further optimizing the human-computer interaction experience and the verifiability of the layout scheme.

[0017] In conjunction with the first aspect, in one possible implementation, the at least two second devices are multiple multi-pin devices, and the arrangement of the multiple first devices to generate a layout pattern of the multiple first devices based on at least one layout parameter, the X groups of devices in the same network, and the Y third devices includes: Based on the number of second devices and layout resources included in each group of network devices, each group of network devices is merged to obtain X virtual devices. The X virtual devices correspond one-to-one with the X groups of network devices, and the layout resources are the layout space of each group of network devices. Determine the connection relationship between each of the Z fourth devices and the target device, wherein the Z fourth devices include the X virtual devices and the Y third devices, and Z is an integer greater than 0; Based on the connection relationship between each fourth device and the target device, the Z fourth devices are laid out to generate the layout pattern.

[0018] Therefore, in the embodiments of this application, by merging devices on the same network into virtual devices, a large number of devices on the same network in a complex circuit are abstracted into virtual devices that can be regarded as a single layout object, thereby effectively reducing computational complexity and improving adaptability to large-scale complex circuits. At the same time, the virtual devices are abstracted from multiple multi-pin devices on the same network, thereby preserving the original pin connection relationships of these devices, so that special network constraints are satisfied, thereby enhancing the reliability of the layout results.

[0019] In conjunction with the first aspect, in one possible implementation, the step of laying out the Z fourth devices based on the connection relationship between each fourth device and the target device to generate the layout pattern includes: The fourth devices with the same connection relationship with the target device among the Z fourth devices are divided into the same group to obtain N device groups. Each device group contains one or more fourth devices. Any fourth device in the i-th device group is indirectly connected to the target device through i-1 devices. When i=1, any fourth device in the i-th device group is directly connected to the target device. N and i are integers greater than or equal to 1. The layout layer corresponding to the i-th device group is determined to be the i-th layer, and the (i+1)-th layer is located outside the i-th layer. The outside is the side of the i-th layer that is far away from the target device. When i=1, the i-th layer is adjacent to the target device. The fourth device in each device group is placed in the corresponding layout layer to generate the layout pattern.

[0020] Therefore, in the embodiments of this application, by laying out the components of a complex circuit in a layered manner according to the connection relationship, a clear hierarchical structure is formed, multidimensional constraints are transformed into inter-layer progressive rules, and the layout of each layer satisfies the connection relationship constraints, thereby improving the reliability of the layout result.

[0021] In conjunction with the first aspect, in one possible implementation, the step of laying out the fourth device in each device group in the corresponding placement layer to generate the placement layout includes: The priority of one or more fourth devices in the i-th device group is determined by the layout order of one or more fourth devices in the (i-1)-th device group in the layout direction, wherein the layout direction is a predetermined direction for laying out devices. When i=1, the priority of one or more fourth devices in the i-th device group is determined by the arrangement order of the networks corresponding to the pins on one side of the target device in the layout direction. Based on the priority, one or more fourth devices in the i-th device group are laid out along the layout direction on the i-th layer to generate the initial layout of the i-th device group; The initial layout of each device group is integrated to obtain the layout.

[0022] Therefore, in the embodiments of this application, priority sorting allows high-priority devices to obtain the optimal layout position first, reducing resource preemption conflicts, meeting layout direction constraints, making the layout process predictable and reproducible, and improving the reliability and consistency of the layout results.

[0023] In conjunction with the first aspect, in one possible implementation, the fourth device in the i-th device group is laid out along the layout direction on the i-th layer based on the priority to generate the initial layout of the i-th device group, further comprising: If there is a gap in the i-th layer after one or more fourth devices in the i-th device group have been laid out, and there are one or more additional devices in the i-th device group, the one or more additional devices of the i-th device group are laid out in the gap in the i-th layer until the i-th layer is filled or until one or more additional devices of the i-th device group have been laid out, so as to generate the initial layout of the i-th device group. If, after the i-th layer is filled, there are one or more remaining fourth devices and / or one or more remaining additional devices of the i-th device group that have not been laid out, the remaining one or more fourth devices and / or one or more remaining additional devices of the i-th device group shall be treated as one or more additional devices of the i+1 device group and participate in the layout of the i+1 device group to generate the initial layout of the i+1 device group.

[0024] Therefore, in the embodiments of this application, the layout area is dynamically optimized through the gap filling and overflow mechanism. The gaps in this layer are filled first to make the layout area smaller and the structure more compact, thus meeting the compactness constraint target, improving resource utilization and layout flexibility, and thereby enhancing the adaptability to complex circuits.

[0025] In conjunction with the first aspect, in one possible implementation, the second device included in each group of network devices is a two-pin device; the step of merging each group of network devices to obtain X virtual devices based on the number and layout resources of the second devices included in each group of network devices includes: When the number of multiple two-pin devices included in a group of devices in the same network is less than or equal to a first threshold and the layout resources are sufficient, the multiple two-pin devices are connected in series to form a virtual device along the first direction of each two-pin device, and the length of each two-pin device in the first direction is greater than the length of the two-pin device in any other direction besides the first direction. When the number of multiple dual-pin devices included in a group of devices on the same network is less than or equal to a first threshold and the layout resources are insufficient, the multiple dual-pin devices are connected in series to form a virtual device along the second direction of each dual-pin device, and the length of each dual-pin device in the second direction is less than the length of the dual-pin device in any other direction besides the second direction. If the number of multiple two-pin devices included in a group of devices on the same network is greater than a first threshold, the multiple two-pin devices are connected in series to form a virtual device along the second direction of each two-pin device.

[0026] Therefore, in the embodiments of this application, different directions are adaptively selected to connect and merge the second devices contained in a group of devices in the same network according to the number of devices and resource conditions. When resources are sufficient, the longest first direction is used to connect the devices in series to preserve the integrity of the pins and make the layout more accurate. When resources are insufficient, the shortest second direction is used to connect the devices in series to compress the pins and make the layout more compact. This satisfies the device combination constraints under different resource conditions and improves the adaptability and robustness of the algorithm to complex circuits with changing conditions.

[0027] In conjunction with the first aspect, in one possible implementation, after arranging the plurality of first devices to generate a layout pattern of the plurality of first devices, the method further includes: The layout, bus length and routing are determined after the layout is laid out according to the layout diagram. The layout refers to the spatial distribution of the plurality of first devices after the layout is laid out according to the layout diagram. The routing refers to the routing topology of the electrical connections between the plurality of first devices after the layout is laid out according to the layout diagram. Based on the layout, bus length, and routing, the layout pattern is optimized.

[0028] Therefore, in the embodiments of this application, the layout is optimized by combining the spatial distribution and routing topology after layout with the bus length, making the layout quality quantifiable and verifiable. This optimization process comprehensively considers area compactness, routing smoothness, and optimal line length, realizing a multi-objective comprehensive optimization closed loop, improving the verifiability and manufacturability of the layout scheme, thereby improving the reliability of the layout result.

[0029] In conjunction with the first aspect, in one possible implementation, optimizing the layout based on the layout configuration, the bus length, and the routing configuration includes: Based on the aforementioned layout, determine the types of vacancies included in any subsequent layer of the layout; Based on the type of vacancy included in any layer's layout, fill in the vacancy in that layer's layout to obtain the first layout. Based on the routing of the first layout, the fifth and sixth devices whose routing intersect are identified in the first layout. If there are intersecting fifth and sixth devices, and if the fifth and sixth devices are the same size and neither is connected to any other device except itself, swap the positions of the fifth and sixth devices to obtain the second layout. The second layout is translated, and during the translation process, the layout corresponding to the position where the bus length of the second layout is shortest is determined as the optimized layout layout.

[0030] Therefore, in the embodiments of this application, by first determining the type of gaps in each layer after layout and filling them, then exchanging suitable device positions for routing intersections, and finally finding the target position with the shortest bus length through overall translation, a multi-dimensional comprehensive optimization from area compactness and routing smoothness to optimal line length is achieved. This optimization process not only reduces space waste and routing conflicts caused by uneven layout, but also dynamically adjusts the overall position of devices to minimize the total interconnect length, thereby significantly improving the area utilization, signal integrity, and manufacturability of the layout, further enhancing the adaptability of the automatic placement method to complex circuits and the reliability of the placement results.

[0031] In conjunction with the first aspect, in one possible implementation, determining the type of vacancy included in any layer of the layout after the initial layout, based on the layout situation, includes: Based on the layout described, determine the spatial distribution of multiple devices arranged in any layer; If the spatial distribution state includes a concave state, the type of gap in any layer layout is determined to include a concave gap. The concave state refers to any layer including a seventh device. The seventh device refers to an eighth device and a ninth device other than itself existing on both sides, and the size of the eighth device and the ninth device in the direction perpendicular to the layout is larger than the size of the seventh device. If the spatial distribution state includes a convex state, the type of void in any layer layout is determined to be a convex void. The convex state refers to the state in which any layer is not filled by devices in the layout direction.

[0032] Therefore, in the embodiments of this application, the definition criteria for concave and convex gaps are clearly defined: concave gaps are identified as recessed areas based on the presence of larger adjacent devices on both sides of the device, while convex gaps are identified as protruding areas based on the state where the layout direction is not filled by devices. This gap type determination method based on spatial distribution can accurately capture irregular boundaries in the layout, providing accurate positioning basis for subsequent gap filling processing, making the optimization process more targeted and effective.

[0033] In conjunction with the first aspect, in one possible implementation, determining the fifth and sixth devices whose traces intersect in the first layout based on the routing information of the first layout includes: Based on the routing topology of the electrical connections between the plurality of first devices, determine whether there are routing intersections; In the case of the aforementioned trace intersection, the device with the larger number of layers among the two devices connected by one of the two lines corresponding to the trace intersection is identified as the fifth device, and the device with the larger number of layers among the two devices connected by the other line is identified as the sixth device.

[0034] Therefore, in the embodiments of this application, the existence of routing intersections is determined by the routing topology, and when intersections exist, the devices with higher layer numbers in the two crossover lines are identified as the fifth and sixth devices, respectively. This method of locating crossover devices can accurately identify devices causing signal conflicts due to cross-layer routing, providing clear operational targets for subsequent location swapping to resolve routing intersection problems, thereby improving the efficiency and accuracy of routing optimization.

[0035] In conjunction with the first aspect, in one possible implementation, the process of filling gaps in the layout of any layer based on the type of gaps included in the layout to obtain a first layout includes: In the case where the type of the void is a concave void, a tenth device is determined in the next layer of any layer layout, whose area is less than or equal to the area of ​​the concave void, and the tenth device is moved to the position of the concave void. In the case where the void type is a convex void, determine the eleventh device in the next layer of any layer layout whose area is less than or equal to the area of ​​the convex void, and determine whether the eleventh device is connected to any device other than itself. If the eleventh device is connected to any device other than itself, then the total area of ​​all devices on the connection line of the eleventh device is determined. If the total area is less than or equal to the area of ​​the convex gap, then all devices on the connection line of the eleventh device are moved to the position of the convex gap. If the eleventh device is not connected to any other device besides itself, then the eleventh device is moved to the position of the convex vacancy.

[0036] Therefore, in the embodiments of this application, by distinguishing between concave and convex vacancies and employing different filling strategies: for concave vacancies, a single device with a matching area is directly selected from the next layer to fill the vacancies; for convex vacancies, the connection relationship of the devices in the next layer is further determined, and if there is a connection chain, the entire chain of devices is moved to fill the vacancies. This refined vacancies filling method can effectively compress the layout area of ​​the current layer using the devices in the lower layer, and also reduces the possibility of destroying the integrity of the original connection relationship due to arbitrary movement. It achieves a balance between compact inter-layer layout and preservation of connection logic, thereby improving space utilization without compromising the electrical performance of the circuit, making the optimized layout more compact, reasonable, and easier to route.

[0037] Secondly, embodiments of this application provide a device layout apparatus, the apparatus comprising: The display unit is configured to display the plurality of first devices in response to a selection operation of the plurality of first devices, wherein the plurality of first devices are devices to be laid out, the plurality of first devices include a target device and a plurality of second devices, and the plurality of second devices are connected to the target device; A layout unit is configured to, in response to a layout operation on the plurality of first devices, cluster the plurality of second devices to obtain X groups of devices within the same network and Y third devices, and arrange the plurality of first devices based on at least one layout parameter, the X groups of devices within the same network, and the Y third devices to generate a layout pattern of the plurality of first devices. The at least one layout parameter is used to constrain the layout pattern. Each group of devices within the same network includes at least two second devices. The pin connection relationship of any one of the at least two second devices is the same as the pin connection relationship of any other second device among the at least two second devices. The Y third devices are the Y second devices among the plurality of second devices excluding the X groups of devices within the same network, where X and Y are integers greater than or equal to 0.

[0038] Thirdly, embodiments of this application provide an electronic device including a memory and a processor. The memory stores a computer program, the computer program includes program instructions, and the processor is configured to invoke the program instructions to execute the steps in the method designed in the first aspect above.

[0039] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program for electronic data interchange, wherein the computer program causes a computer to perform some or all of the steps described in the method of the first aspect of embodiments of this application.

[0040] Fifthly, embodiments of this application provide a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps described in the method of the first aspect of embodiments of this application. The computer program product may be a software installation package.

[0041] The beneficial effects of the technical solutions in the second to fifth aspects can be found in the technical effects of the technical solution in the first aspect, and will not be repeated here. Attached Figure Description

[0042] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0043] Figure 1 A schematic diagram of a layout system provided for an embodiment of this application; Figure 2 A schematic flowchart illustrating a device layout method provided in an embodiment of this application; Figure 3 A schematic diagram of a first interface provided for an embodiment of this application; Figure 4 A schematic diagram of a second interface provided for an embodiment of this application; Figure 5 A schematic diagram illustrating the addition of a first device as provided in an embodiment of this application; Figure 6 A schematic diagram illustrating the opening of a secondary menu in a second interface provided for an embodiment of this application; Figure 7 A schematic diagram illustrating a second interface floating on top of other interfaces, provided for an embodiment of this application; Figure 8 A schematic diagram illustrating a layout pattern generation method provided for an embodiment of this application; Figure 9 A flowchart illustrating a method for generating a layout of multiple first devices based on at least one layout parameter, X groups of devices in the same network, and Y third devices, provided for embodiments of this application. Figure 10 A schematic diagram illustrating the merging of a network device group into a virtual device, provided for an embodiment of this application; Figure 11 A schematic diagram illustrating another method of merging network-connected device groups into virtual devices, provided for an embodiment of this application; Figure 12 A schematic diagram illustrating one different type of gap provided for an embodiment of this application; Figure 13 A schematic diagram illustrating an embodiment of this application in which a second version is translated as a whole in a certain direction; Figure 14 This is a functional unit block diagram of a device layout device provided in an embodiment of this application; Figure 15 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.

[0044] Explanation of reference numerals in the attached figures: First interface; 301 - Target device area; 302 - Device layout area; 303 - Target device; 304 - First device; Second interface; 410 - Component selection area; 411 - Component addition control; 412 - Component deletion control; 413 - Clear selection control; 414 - Sorting method control; 415 - Forward / reverse order control; 420 - Layout parameter area; 421 - Target device selection control; 303 - Target device; 304 - First device; Virtual devices; 1001 - Device 1; 1002 - Device 2; 1003 - Device 3; 1004 - Device 5; 1005 - Device 6; Concave gap; 1201 - Seventh device; 1202 - Eighth device; 1203 - Ninth device; Map translation; 1301 - Target device; 1302 - Second layout; 1400 - Layout arrangement of devices; 1401 - Display unit; 1402 - Layout unit; 1500 - Electronic Equipment; 1510 - Processor; 1520 - Memory; 1521 - Computer program or instructions. Detailed Implementation

[0045] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.

[0046] The terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses.

[0047] In the embodiments of this application, "at least one item" or similar expressions refer to any combination of these items, including any combination of a single item or a plurality of items. "One or more" refers to one or more items, while "multiple" refers to two or more items. For example, "at least one item" of a, b, or c can represent the following seven cases: a, b, c; a and b; a and c; b and c; a, b, and c. Each of a, b, and c can be an element or a set containing one or more elements.

[0048] In the embodiments of this application, "connection" refers to various connection methods, such as direct connection or indirect connection, to achieve communication between devices. The embodiments of this application do not impose any limitations on this. In the description of this application, it should be noted that, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "connection" should be interpreted broadly. In one example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection, an electrical connection, or a connection that allows mutual communication; it can be a direct connection or an indirect connection through an intermediate medium; it can be the internal communication of two components or the interaction between two components.

[0049] In this document, the term "implementation" means that a specific feature, structure, or characteristic described in connection with an implementation may be included in at least one implementation of this application. The appearance of this phrase in various places in the specification does not necessarily refer to the same implementation, nor is it a separate or alternative implementation mutually exclusive with other implementations. It will be explicitly and implicitly understood by those skilled in the art that the implementations described herein can be combined with other implementations.

[0050] First, the layout system to which the device layout method proposed in the embodiments of this application applies will be described. This layout system typically includes a display device, an input device, and a processing device.

[0051] In this embodiment, see Figure 1 , Figure 1 This is a schematic diagram of a layout system provided in an embodiment of this application. The layout system includes a display device, an input device, and a processing device. The display device displays one or more layout interfaces, such as a device selection interface, a parameter interface, and a layout diagram interface. The input device receives user input data and control commands, and the processing device generates a layout diagram based on the user's input data and control commands.

[0052] Understandable Figure 1 The layout system shown in the illustrations, including the form and number of display devices, input devices, and processing devices, are merely examples and do not constitute a limitation on the embodiments of this application.

[0053] For example, the layout system may also include servers, user equipment, or other devices.

[0054] For example, the layout system may include other display devices besides the one shown.

[0055] For example, the layout system may include other input devices besides those shown.

[0056] For example, the layout system may include other processing devices besides those shown.

[0057] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the above content and the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application. At the same time, these embodiments can be related to each other or independent of each other, and the same content between different embodiments can be referenced by each other, which will not be elaborated here.

[0058] The following will combine Figure 2 A device layout method according to an embodiment of this application will be described. Figure 2 A schematic flowchart illustrating a device layout method provided in this application embodiment, which can be applied to... Figure 1 The layout system shown includes the following steps: S201: In response to the selection operation of multiple first devices, display multiple first devices.

[0059] In this embodiment, the user can select or click on the devices to be laid out in the first interface to determine multiple first devices. Specifically, see [link to documentation]. Figure 3 , Figure 3 This is a schematic diagram of a first interface provided for an embodiment of this application. For example... Figure 3 As shown, the first interface can be used to display circuit board diagrams or various electronic devices. This interface includes a target device area 301 and a device layout area 302. The target device area 301 displays the target device 303, and the device layout area 302 surrounds the target device area 301 to lay out multiple first devices 304. The line segments connecting the pins of the first devices 304 and the target devices 303 in the figure represent the routing. It should be noted that this first interface can be an initial interface or an interface displaying the previous layout after the previous layout was completed.

[0060] In the first interface, users can select or click on multiple first devices participating in this layout. The identifier of each of these selected first devices can be displayed in the second interface.

[0061] In this embodiment, refer to Figure 4 , Figure 4 This is a schematic diagram of a second interface provided for an embodiment of this application. Figure 4 As shown, the second interface may include a device selection area 410 and a layout parameter area 420. The identifiers of the multiple first devices selected in the first interface are displayed in the device selection area 410.

[0062] Meanwhile, the device selection area 410 also includes a device addition control 411, a device deletion control 412, a clear selection control 413, a sorting method control 414, and a forward / reverse order control 415.

[0063] Specifically, such as Figure 5 As shown, Figure 5 This is a schematic diagram illustrating the addition of a first device according to an embodiment of this application. The device addition control 411 allows the addition of a first device to be laid out. Each first device is identified by its name and a delete control. The user can delete the first device by manipulating the delete control of the corresponding identifier. The device deletion control 412 allows batch selection from multiple first device identifiers displayed; the selected first device identifiers will be deleted, and the deleted first device will not participate in subsequent layout. The clear selection control 413 can delete all displayed first devices. (See also...) Figure 6 , Figure 6 This is a schematic diagram illustrating the opening of a secondary menu in a second interface provided for an embodiment of this application. For example... Figure 6 As shown, clicking the sorting method control 414 opens a drop-down sub-menu, allowing you to select the sorting method when displaying the identifiers of multiple first devices. If not adjusted, the default order is used, which is the order when selecting the first device. The forward / reverse order control 415 is used to adjust whether the identifiers of multiple first devices are displayed in forward or reverse order.

[0064] In this embodiment, the layout parameter area 420 is used to display at least one layout parameter related to the layout. The user can input and / or adjust the layout parameter through an input device, and the input and / or adjusted layout parameter will be displayed in the layout parameter area 420.

[0065] In this embodiment, the plurality of first devices may include a target device and a plurality of second devices, wherein the plurality of second devices are connected to the target device. That is, in the subsequent layout, the layout will be carried out around the target device. Subsequently, the layout parameter area 420 may include a target device selection control 421. When this control is checked, the first device with the most pins among the plurality of first devices will be automatically selected as the target device. Alternatively, the layout parameters may include a device indicator, which can be input and / or adjusted by the user through an input device, thereby enabling the user to manually specify the target device.

[0066] In this embodiment, layout parameters can also be used to constrain the generation of the layout pattern. Specifically, layout parameters may include at least one of the desired spacing between adjacent second devices among a plurality of second devices, and the wiring spacing reserved for the target device. These layout parameters can all be input and / or adjusted by the user via an input device. The desired spacing is used to control the minimum spacing between adjacent second devices during layout, thereby reducing overly dense layouts. The wiring spacing is used to determine a preset area for wiring connections between the plurality of second devices and the target device, thus reserving sufficient routing paths and fan-out space before the second devices are placed close to the target device. For example, the preset area can be a first area in the design layout excluding the area occupied by the target device, which can be obtained by expanding the area occupied by the target device by the wiring spacing. This effectively reduces wiring congestion, lowers signal interference, supports regular fan-out strategies, and improves the adjustability of subsequent designs. The synergistic effect of this wiring area and the desired spacing between peripheral devices achieves an optimal balance between compactness and routerability in the layout pattern, thereby improving the practical engineering adoptability of complex circuit layout schemes.

[0067] It should be noted that this second interface can be a completely new interface, different from the first interface. Specifically, it can be a complete, independent interface. Or, as... Figure 7 As shown, Figure 7 This is a schematic diagram illustrating a second interface floating on top of other interfaces, provided as an embodiment of this application. The second interface may also be a window interface floating on top of other interfaces, partially or completely overlapping with other interfaces; this application does not impose any limitations on this.

[0068] S202: In response to the layout operation on multiple first devices, multiple second devices are clustered to obtain X groups of devices in the same network and Y third devices, and multiple first devices are arranged based on at least one layout parameter, X groups of devices in the same network and Y third devices to generate a layout pattern of multiple first devices.

[0069] In this embodiment, each group of devices on the same network may include at least two second devices. The at least two second devices may be multi-pin devices, and the pin connection relationship of any one of the at least two second devices is the same as the pin connection relationship of any other second device among the at least two second devices. The Y third devices are the Y second devices among the multiple second devices other than the X groups of devices on the same network, where X and Y are integers greater than or equal to 0.

[0070] Simply put, devices in the same group and on the same network have the same number of pins, and their pins are associated with the same network.

[0071] It should be noted that X and Y are both integers greater than or equal to 0. This means that it is possible that no devices in the same network can be clustered and all of them are third-party devices, or that no third-party devices remain after clustering.

[0072] For example, there are 8 devices: Device 1 to Device 8, including 4 two-pin devices (D1-D4), 3 three-pin devices (D5-D7), and 1 four-pin device (D8). Device 1 has 2 pins associated with Net1 and Net2, Device 2 has 2 pins associated with Net1 and Net2, Device 3 has 2 pins associated with Net1 and Net2, Device 4 has 2 pins associated with Net2 and Net3, Device 5 has 3 pins associated with Net1, Net2, and Net3, Device 6 has 3 pins associated with Net1, Net2, and Net3, Device 7 has 3 pins associated with Net2, Net3, and Net4, and Device 8 has 4 pins associated with Net1, Net2, Net3, and Net4. Devices 1, 2, and 3 have the same number of pins and are associated with the same networks, thus they are grouped into one group of devices on the same network. Devices 5 and 6 have the same number of pins and are associated with the same networks, also grouped into one group of devices on the same network. Although device 4 also has 2 pins, its pin network is different from that of devices 1, 2, and 3, and it has no other devices with the same number of pins, thus it is considered a separate third device. Similarly, although device 7 also has 3 pins, its pin network is different from that of devices 5 and 6, and it has no other devices with the same number of pins, thus it is considered a separate third device. Device 8 has no other devices with the same number of pins as it, so it is also considered a separate third device. Ultimately, we have 2 groups of devices on the same network and 3 third devices.

[0073] In this embodiment, the clustering conditions for devices within the same network can be two-pin devices and devices with the same pin connection relationship. That is, only devices with two pins are clustered, and devices with the same pin connection relationship are grouped into the same network device group. Devices with other numbers of pins are all treated as separate third devices. The following will use two-pin devices as an example to explain the subsequent processing. Other cases are similar to the two-pin cases and will not be described again.

[0074] In this embodiment, refer to Figure 8 , Figure 8 This is a schematic diagram illustrating a layout pattern generation method provided in an embodiment of this application. For example... Figure 8 As shown, users can generate a layout using the Start Layout control. After clicking the Start Layout control, a transitional interface displaying the layout progress and information will first appear. Once the layout is complete, the layout will be displayed on a third interface. The transitional interface includes a Cancel Layout control, which users can use to terminate the current layout process. The third interface can be the same as the first interface, obtained by replacing the content displayed on the original first interface with the generated layout; alternatively, the third interface can be a separate interface.

[0075] The following will provide a detailed explanation of the layout generation process.

[0076] In this embodiment, a method is also provided for arranging multiple first devices based on at least one layout parameter to generate a layout pattern of multiple first devices. Specifically, see [link to relevant documentation]. Figure 9 , Figure 9 This is a flowchart illustrating a method for generating a layout of multiple first devices based on at least one layout parameter, X groups of devices in the same network, and Y third devices, as provided in an embodiment of this application.

[0077] like Figure 9 As shown, the specific steps include: S901: Based on the number of second devices and layout resources included in each group of devices in the same network, merge each group of devices in the same network to obtain X virtual devices.

[0078] In this embodiment, layout resources can refer to the layout space of a corresponding group of network devices. The sufficiency of layout resources for each group of network devices can be determined by the relationship between the layout space and the space occupied by the corresponding group of network devices. Specifically, the layout space corresponding to the group of network devices can be quantified by the side length of one side of the target device layout and the usable length of the corresponding device apex on that side. Therefore, if the total length (including the spacing between devices, determined by the desired spacing in the layout parameters) of multiple multi-pin devices connected in series along the first direction of each multi-pin device in the group is less than the sum of the side length and the usable length of the corresponding device apex, the layout resources are considered sufficient; otherwise, the layout resources are considered insufficient. The length of each multi-pin device in the first direction is greater than the length of the multi-pin device in directions other than the first direction.

[0079] Based on this, in this embodiment, taking the case where all second devices in a group of devices on the same network are two-pin devices as an example, when the number of multiple two-pin devices in a group of devices on the same network is less than or equal to a first threshold and layout resources are sufficient, multiple two-pin devices can be connected in series to form a virtual device along the first direction of each two-pin device. Here, the length of each two-pin device in the first direction is greater than its length in any other direction besides the first direction. When the number of multiple two-pin devices in a group of devices on the same network is less than or equal to the first threshold and layout resources are insufficient, multiple two-pin devices can be connected in series to form a virtual device along the second direction of each two-pin device. Here, the length of each two-pin device in the second direction is less than its length in any other direction besides the second direction. When the number of multiple two-pin devices in a group of devices on the same network is greater than the first threshold, multiple two-pin devices can be connected in series to form a virtual device along the second direction of each two-pin device.

[0080] For example, if the first threshold is 2, and two groups of devices on the same network are obtained, namely, device group 1: [device one, device two, device three] and device group 2: [device five, device six], then for device group 1, if... Figure 10 As shown, Figure 10 This is a schematic diagram illustrating the merging of a group of devices on the same network into a virtual device, as provided in an embodiment of this application. Since it contains more than two devices, device 1001, device 2 1002, and device 3 1003 are connected in series in the second direction to obtain virtual device 1. During the series connection process, it is important to ensure that pins associated with the same network are placed on the same side. For device group 2 on the same network, as... Figure 11 As shown, Figure 11This is a schematic diagram illustrating another method of merging network-connected device groups into virtual devices, as provided in this application. Since it contains two devices, the merging method needs to be further determined based on layout resources. If layout resources are sufficient, such as... Figure 11 As shown on the left, device 5 1004 and device 6 1005 are connected in series in the first direction to obtain virtual device 2a. If the layout resources are insufficient, then... Figure 11 As shown on the right, device 5 1004 and device 6 1005 are connected in series in the second direction to obtain virtual device 2b. Similarly, during the series connection process, it is necessary to ensure that the pins associated with the same network are placed on the same side.

[0081] S902: Determine the connection relationship between each of the Z fourth devices and the target device.

[0082] In this embodiment, the Z fourth devices include X virtual devices and Y third devices. That is, the X virtual devices obtained after merging and the Y third devices remaining during clustering are regarded as the Z fourth devices, where Z is an integer greater than 0.

[0083] In this embodiment, the connection relationships include direct connections and indirect connections. A direct connection refers to the fourth device being directly connected to the target device, while an indirect connection refers to the fourth device being connected to the target device through i other fourth devices, where i is an integer greater than or equal to 1.

[0084] S903: Based on the connection relationship between each fourth device and the target device, the Z fourth devices are laid out to generate a layout pattern.

[0085] In this embodiment, the Z fourth devices can first be divided into N device groups based on the connection relationship between each fourth device and the chip. Specifically, fourth devices with the same connection relationship can be grouped into the same group. For example, the fourth devices in the first device group are all fourth devices that are directly connected to the target device, and the fourth devices in the i-th device group are all fourth devices that are indirectly connected to the target device through i-1 other fourth devices.

[0086] Then, the layout layer corresponding to the i-th device group is determined to be the i-th layer, and the (i+1)-th layer is located outside the i-th layer. Here, "outer" refers to the side of the i-th layer away from the target device. When i=1, the i-th layer is adjacent to the target device. Specifically, the layout layer number can be pre-determined around the target device, where the first layer is directly adjacent to the chip, the second layer is located outside the first layer, and so on, nested layer by layer. Subsequently, based on the connection relationship between the fourth device itself and the target device, the i-th device group is laid out on the i-th layer. Simply put, the fourth device directly connected to the target device is laid out on the first layer directly adjacent to the target device, the fourth device connected to the target device through one other fourth device is laid out on the second layer, the device connected to the chip through the devices in the first layer is laid out on the second layer, and so on.

[0087] Finally, the fourth device in each device group can be placed in the corresponding placement layer to generate a placement layout. Specifically, the placement method in each layer is similar, and the following will use the placement method of the i-th device group in the i-th layer as an example for illustration.

[0088] In this embodiment, the priority of one or more fourth devices in the i-th device group needs to be determined first. For example, the priority is determined by the layout order of one or more fourth devices in the (i-1)-th device group in the layout direction, which is a pre-determined direction for device layout. When i=1, the priority of the fourth device in the first device group is determined by the arrangement order of the networks corresponding to the pins on one side of the target device's layout device in the layout direction. Specifically, before layout, a layout direction can be determined, such as clockwise around the target device, counterclockwise around the target device, or an independent layout direction for each side of the target device. This layout direction can also be pre-set or a default layout direction. After determining the layout direction, taking the first device group as an example, the order of the pins on that side of the target device can be determined based on the current layout position. After determining this order, the networks corresponding to each pin are determined sequentially based on this order, resulting in the network order. Networks ranked earlier are determined as high priority, and networks ranked later are determined as low priority. The priority of the fourth device is then determined by the network corresponding to the pin connected to the target device. For example, if the current placement is performed on the right side of the target device, with the placement direction from top to bottom, and the pins on the right side of the chip correspond to the following networks from top to bottom: unnamed network, signal and enable control network, power network, and ground network, then the network priority is determined as: unnamed network > signal and enable control network > power network > ground network. For the fourth device in the first device group, the priority of each fourth device can be determined based on the network corresponding to its pins connected to the chip, combined with the network priority. For the second device group and subsequent device groups, the priority can be determined based on the order of the networks corresponding to the pins of the fourth device not connected to the target device in the previous placement direction. The specific determination method can refer to the method for determining the priority of the fourth device in the first device group, and will not be repeated here.

[0089] Then, based on priority, one or more fourth devices in the i-th device group are sequentially placed in the i-th layer along the placement direction to generate the initial layout of the i-th device group. Specifically, the placement orientation of the fourth devices can first be determined based on the length of the edge of the current placement of the target device and the number of fourth devices in the i-th device group. Specifically, if the sum of the longer edges of all fourth devices in the i-th device group is less than or equal to the length of the edge of the current placement of the target device, the longer edges of the fourth devices can be placed closer to the chip layout to reduce the distance occupied by the fourth devices in the direction perpendicular to the edge of the current placement of the target device. If the sum of the longer edges of all fourth devices in the i-th device group is greater than the length of the edge of the current placement of the target device, the shorter edges of the fourth devices are placed closer to the chip layout to place all the fourth devices in the i-th device group in this layer as much as possible.

[0090] Then, according to the determined layout orientation and priority order, each fourth device in the i-th device group is sequentially placed in the i-th layer to determine the initial layout of the i-th device group in the i-th layer.

[0091] Finally, by integrating the initial layouts of the N device groups, a complete layout can be obtained.

[0092] It should be noted that during the layout process, there may be situations where the i-th layer cannot accommodate all the fourth devices in the i-th device group, or where all the fourth devices in the i-th device group cannot fill the i-th layer. In response, this application proposes the following solutions.

[0093] In this embodiment, if there is a gap in the i-th layer after all the fourth devices in the i-th device group have been placed, it is determined whether there are one or more additional devices in the i-th device group. If so, one or more additional devices in the i-th device group are placed in the gap in the i-th layer until the i-th layer is filled, or until one or more additional devices in the i-th device group have been placed. If there are still remaining fourth devices and / or one or more additional devices in the i-th device group that have not been placed after the i-th layer is filled, the remaining fourth devices and / or the remaining one or more additional devices in the i-th device group are used as one or more additional devices in the (i+1)-th device group to participate in the placement of the (i+1)-th device group. Simply put, devices that cannot be placed in the current layer will be carried over to the next layer for placement. At the same time, in the placement of the next layer, the priority of these devices carried over to the next layer is lower than the priority of the corresponding devices in the next layer.

[0094] It should also be noted that if, after all the fourth devices in the i-th device group have been placed, there is a gap in the i-th layer, and the i-th device group does not have one or more additional devices, or if, after all the fourth devices in the i-th device group and one or more additional devices in the i-th device group have been placed, there is still a gap in the i-th layer, then the gap is retained, and the placement of the next layer is carried out directly. That is, the devices in the next layer will not appear in the previous layer when they are placed.

[0095] In this embodiment, as described above, the initial layout of the N device groups arranged according to this method may contain defects such as gaps. Even after integrating the initial layouts of the N device groups to obtain a complete layout, these defects may still exist. Furthermore, after obtaining the complete layout, the layout characteristics, bus lengths, and routing characteristics after layout can be calculated to optimize the layout scheme, reducing the occupied area and bus length, and minimizing crossover routing to obtain a more optimized layout. Here, "layout characteristics" refers to the spatial distribution of multiple first devices after layout based on the layout diagram, and "routing characteristics" refers to the electrical connection topology between the multiple first devices after layout based on the layout diagram.

[0096] Specifically, optimization can include device area pushing optimization and line length optimization, which will be explained separately below.

[0097] (1) Area pushing optimization: The layout is analyzed to determine the types of gaps in each layer. This process starts from the first layer immediately adjacent to the target device and proceeds outwards. Once a gap is identified in a layer, processing of that layer's gaps is stopped immediately. After processing the gaps in that layer, the next layer is used as the starting layer for further outwards, and so on, until all layers have been identified. During optimization, moving devices from the next layer to fill gaps in the current layer creates new gaps in that layer. These newly created gaps are filled during the optimization of the next layer. This iterative optimization process continues until all layers have been identified, resulting in the first layout.

[0098] In this implementation, after determining that a certain layer has gaps, the first step is to determine the types of gaps included in that layer. Specifically, two types of gaps are defined, such as... Figure 12 As shown, Figure 12 This is a schematic diagram of a different type of gap provided in an embodiment of this application. The gap on the left is a concave gap, which is caused by the fact that the dimensions of the eighth device 1202 and the ninth device 1203 on the left and right sides of the seventh device 1201 are larger than the dimensions of the seventh device 1201 in the direction perpendicular to the layout. Figure 12 The gap on the right side is a convex gap, caused by a layer not being filled by components in the layout direction. It should be noted that concave and convex gaps can coexist in the same layer, and multiple concave gaps and / or multiple convex gaps can exist in the same layer.

[0099] In this embodiment, different methods will be used to fill different types of gaps. Specifically, for concave gaps, it can be determined whether there is a tenth device in the next layer with an area smaller than or equal to that concave gap. If so, the tenth device will be moved to fill the concave gap; otherwise, the concave gap will be retained.

[0100] In this embodiment, for a convex gap, it can be determined in the next layer whether there is an eleventh device with an area smaller than or equal to the convex gap. If so, it is further determined whether the eleventh device is connected to other devices. If it is not connected to other devices, the eleventh device is moved to the convex gap to fill it. If the eleventh device is connected to other devices, and the area occupied by the eleventh device is smaller than the area of ​​the convex gap, the connection relationship between the eleventh device and other devices is followed downwards until all devices on the connection line are found. It is determined whether the total area occupied by these devices is less than or equal to the area of ​​the convex gap. If the total area occupied by these devices is less than or equal to the area of ​​the convex gap, these devices are moved as a whole to the convex gap to fill it. If none of the above conditions are met, the convex gap is retained.

[0101] (2) Line length optimization: In this embodiment, after the aforementioned area pushing optimization, the first layout theoretically has a relatively excellent device layout in terms of both area and density. Subsequent optimizations will focus on optimizing the wiring connecting the devices. Specifically, it can first be determined whether there are fifth and sixth devices with intersecting traces in the first layout. For example, the presence of trace intersections can be determined based on the trace topology of the electrical connections between multiple first devices. If trace intersections exist, the device with the higher layer count among the two devices connected by one trace is identified as the fifth device, and the device with the higher layer count among the two devices connected by the other trace is identified as the sixth device.

[0102] If a fifth and sixth device exist, determine if their sizes are identical. If they are, further determine if neither device is connected to any other device. If both conditions are met, swap their positions to remove the crossover. Otherwise, ignore the crossover. The layout processed by the crossover check is then designated as the second layout.

[0103] At the same time, since the device layout does not start from the middle of one side of the target device, the device as a whole may be biased in a certain direction after the layout.

[0104] Therefore, as Figure 13 As shown, Figure 13 This is a schematic diagram illustrating the overall translation of a second layout in a certain direction, as provided in an embodiment of this application. The second layout 1302 can be translated in a certain direction based on the side length of the edge where the device is close to the target device 1301, with an adaptive calculation step size. The bus length of the second layout during the translation process is calculated, thereby determining the position with the shortest bus length as the target position for final layout.

[0105] As can be seen, the method of this application guides the selection of devices through a GUI interface, and arranges multiple selected first devices based on at least one layout parameter and clustering results to obtain a layout pattern of multiple first devices. The clustering operation can divide the devices into groups within the same network and the remaining devices, and then the layout is performed on units of these groups and the remaining devices, which can effectively reduce computational complexity and improve adaptability to large-scale complex circuits. Furthermore, the pin connections of each first device in the same network group are identical, thus preserving the original pin connections of these devices, satisfying special network constraints, and enhancing the reliability of the layout results. The abstract algorithm is encapsulated into a visual interactive process. Moreover, in the process of generating the layout scheme, by merging devices within the same network into virtual devices, a large number of related devices in a complex circuit are abstracted into a single layout object, effectively reducing computational complexity and improving adaptability to large-scale complex circuits; at the same time, the virtual devices retain the original connection relationships, satisfying special network constraints, and thus enhancing the reliability of the layout results. Finally, through the GUI interface guidance, the layout strategy of complex circuits can be flexibly adjusted through human-computer collaboration, reducing reliance on human experience and thus improving the adaptability to complex circuits and the acceptability of layout results.

[0106] The foregoing primarily describes the implementation scheme of this application from a methodological perspective. It is understood that, to achieve the above functions, the apparatus may include hardware structures and / or software circuits corresponding to the execution of each function. Those skilled in the art should readily recognize that, based on the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in a hardware or computer software-driven hardware manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0107] The embodiments of this application can divide the device into functional units according to the above method examples. For example, each function can be divided into a separate functional unit, or two or more functions can be integrated into one processing unit. It should be noted that the unit division in the embodiments of this application is illustrative and is only a logical functional division, while other division methods may be used in actual implementation.

[0108] When using integrated units, Figure 14 This is a functional unit block diagram of a device layout apparatus provided in an embodiment of this application. The device layout apparatus 1400 includes a display unit 1401 and an arrangement unit 1402.

[0109] In this embodiment, the display unit 1401 and the arrangement unit 1402 can be a circuit unit used to receive and process signals, information, etc., or to determine the monitoring mechanism, and there are no specific limitations on this.

[0110] In this embodiment, the device placement device 1400 may further include a storage unit for storing computer program code or instructions executed by the device placement device 1400. The storage unit may be a memory.

[0111] In this embodiment, the device layout device 1400 may be a chip or a chip module.

[0112] In this embodiment, the display unit 1401 and the layout unit 1402 can be integrated into the communication unit. The communication unit can be a communication interface, transceiver, transceiver circuit, etc.

[0113] In this embodiment, the display unit 1401 and the arrangement unit 1402 can be integrated into the processing unit.

[0114] It should be noted that the processing unit can be a processor or controller, such as a baseband processor, baseband chip, central processing unit (CPU), general-purpose processor, digital signal processor (DSP), application-specific integrated circuit (ASIC), field-programmable gate array (FPGA), or other programmable logic device, transistor logic device, hardware component, or any combination thereof. It can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. The processing unit can also be a combination that implements computational functions, such as including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.

[0115] In this embodiment, the device layout device 1400 is used to perform any of the steps performed by the network device / chip / chip module, etc., as described in the above method embodiment.

[0116] In specific implementation, the display unit 1401 and the arrangement unit 1402 are used to perform any of the steps in the above method embodiments, and when performing actions such as sending, other units can be selectively called to complete the corresponding operation. A detailed description follows.

[0117] Display unit 1401 is used to display multiple first devices in response to a selection operation of multiple first devices. The multiple first devices are devices that need to be laid out. The multiple first devices include a target device and multiple second devices. The multiple second devices are connected to the target device. The layout unit 1402 is configured to, in response to a layout operation on a plurality of first devices, cluster a plurality of second devices to obtain X groups of devices in the same network and Y third devices, and arrange the plurality of first devices based on at least one layout parameter, the X groups of devices in the same network and the Y third devices to generate a layout pattern of the plurality of first devices, wherein at least one layout parameter is used to constrain the layout pattern, each group of devices in the same network includes at least two second devices, the pin connection relationship of any one of the at least two second devices is the same as the pin connection relationship of any other second device in the at least two second devices, and the Y third devices are the Y second devices in the plurality of second devices other than the X groups of devices in the same network, where X and Y are integers greater than or equal to 0.

[0118] In this embodiment, at least one layout parameter includes at least one of the desired spacing between adjacent second devices among a plurality of second devices and the wiring spacing reserved for the target device. Based on this, in arranging a plurality of first devices to generate a layout pattern of a plurality of first devices based on at least one layout parameter, X groups of devices on the same network, and Y third devices, the layout unit 1402 is specifically used for: When at least one layout parameter includes a desired spacing between adjacent second devices among a plurality of second devices, the desired spacing is used as the spacing between adjacent second devices in the layout to generate the layout; and / or when at least one layout parameter includes a wiring spacing reserved for a target device, a preset area is used as the area for connecting wiring between the plurality of second devices and the target device to generate the layout, the preset area being the area outside the area occupied by the target device in the first area of ​​the design layout, the first area being obtained by expanding the wiring spacing of the area occupied by the target device.

[0119] In this embodiment, the target device is the first device with the most pins among a plurality of first devices.

[0120] In this embodiment, at least one layout parameter includes a device indicator, which is used to select a target device. Based on this, in terms of arranging multiple first devices to generate a layout pattern of multiple first devices based on at least one layout parameter, X groups of devices in the same network, and Y third devices, the layout unit 1402 is specifically used to: determine the first device corresponding to the device indicator from the multiple first devices as the target device to generate the layout pattern.

[0121] In this embodiment, in response to a selection operation of a plurality of first devices, the display unit 1401 is specifically used to: in response to a user's selection operation of a plurality of first devices in a first interface, display the identifier of each of the plurality of first devices in a second interface, wherein the first interface and the second interface are different.

[0122] In this embodiment, the layout is displayed on the third interface, which is different from the second interface.

[0123] In this embodiment, regarding the arrangement of multiple first devices to generate a layout pattern of multiple first devices based on at least two second devices being multi-pin devices, and based on at least one layout parameter, X groups of devices in the same network, and Y third devices, the arrangement unit 1402 is specifically used for: merging each group of devices in the same network to obtain X virtual devices based on the number of second devices included in each group of devices in the same network and the layout resources, wherein the X virtual devices correspond one-to-one with the X groups of devices in the same network, and the layout resources are the layout space of each group of devices in the same network; determining the connection relationship between each of the Z fourth devices and the target device, wherein the Z fourth devices include X virtual devices and Y third devices, and Z is an integer greater than 0; and laying out the Z fourth devices based on the connection relationship between each fourth device and the target device to generate a layout pattern.

[0124] In this embodiment, regarding the layout of Z fourth devices based on the connection relationship between each fourth device and the target device to generate a layout pattern, the layout unit 1402 is specifically used for: dividing the fourth devices with the same connection relationship with the target device into the same group among the Z fourth devices, resulting in N device groups. Each device group contains one or more fourth devices. Any fourth device in the i-th device group is indirectly connected to the target device through i-1 devices, where i=1, any fourth device in the i-th device group is directly connected to the target device, and N and i are integers greater than or equal to 1; determining the layout layer number corresponding to the i-th device group as the i-th layer, and the (i+1)-th layer is located outside the i-th layer, where the outside is the side of the i-th layer away from the target device, and i=1, the i-th layer is adjacent to the target device; and laying out the fourth devices in each device group in the corresponding layout layer to generate a layout pattern.

[0125] In this embodiment, in terms of laying out the fourth device in each device group in the corresponding placement layer to generate a layout pattern, the placement unit 1402 is specifically used to: determine the priority of one or more fourth devices in the i-th device group, the priority being determined by the placement order of one or more fourth devices in the (i-1)-th device group in the placement direction, wherein the placement direction is a predetermined direction for placing devices, and when i=1, the priority of one or more fourth devices in the i-th device group is determined by the arrangement order of the network corresponding to the pin on one side of the target device in the placement direction; based on the priority, lay out one or more fourth devices in the i-th device group along the placement direction in the i-th layer to generate the initial layout pattern of the i-th device group; and integrate the initial layout patterns of each device group to obtain the layout pattern.

[0126] In this embodiment, in terms of laying out the fourth device in the i-th device group along the layout direction on the i-th layer based on priority to generate the initial layout of the i-th device group, the layout unit 1402 is further configured to: when there is a gap in the i-th layer after one or more fourth devices in the i-th device group have been laid out, and there are one or more additional devices in the i-th device group, lay out one or more additional devices of the i-th device group in the gap in the i-th layer until the i-th layer is filled or until one or more additional devices of the i-th device group have been laid out, to generate the initial layout of the i-th device group; when there are one or more remaining fourth devices and / or one or more remaining additional devices of the i-th device group that have not been laid out after the i-th layer has been filled, use the remaining one or more fourth devices and / or one or more remaining additional devices of the i-th device group as one or more additional devices of the i+1-th device group to participate in the layout of the i+1-th device group, to generate the initial layout of the i+1-th device group.

[0127] In this embodiment, the second device included in each group of network devices is a two-pin device. Based on this, in merging each group of network devices to obtain X virtual devices based on the number of second devices included in each group of network devices and layout resources, the arrangement unit 1402 is specifically used for: when the number of multiple two-pin devices included in a group of network devices is less than or equal to a first threshold and layout resources are sufficient, connecting multiple two-pin devices in series into a virtual device along the first direction of each two-pin device, wherein the length of each two-pin device in the first direction is greater than the length of the two-pin device in any other direction besides the first direction; when the number of multiple two-pin devices included in a group of network devices is less than or equal to the first threshold and layout resources are insufficient, connecting multiple two-pin devices in series into a virtual device along the second direction of each two-pin device, wherein the length of each two-pin device in the second direction is less than the length of the two-pin device in any other direction besides the second direction; when the number of multiple two-pin devices included in a group of network devices is greater than the first threshold, connecting multiple two-pin devices in series into a virtual device along the second direction of each two-pin device.

[0128] In this embodiment, after arranging multiple first devices to generate a layout pattern of multiple first devices, the arrangement unit 1402 is further configured to: determine the layout situation, bus length and routing situation after layout according to the layout pattern, wherein the layout situation refers to the spatial distribution state of multiple first devices after layout based on the layout pattern, and the routing situation refers to the routing topology state of electrical connections between multiple first devices after layout based on the layout pattern; and optimize the layout pattern based on the layout situation, bus length and routing situation.

[0129] In this embodiment, regarding the optimization of the layout based on the layout situation, bus length, and routing situation, the layout unit 1402 is specifically used for: determining the type of gaps included in any layer of the layout after the layout is completed; filling gaps in the layout of any layer based on the type of gaps included in the layout of that layer to obtain a first layout; determining, based on the routing situation of the first layout, a fifth and a sixth device whose routing intersects in the first layout; if there are intersecting fifth and sixth devices, and the fifth and sixth devices are the same size and neither is connected to any other device except itself, swapping the positions of the fifth and sixth devices to obtain a second layout; and translating the second layout, during which the layout corresponding to the position with the shortest bus length in the second layout is determined as the optimized layout.

[0130] In this embodiment, regarding determining the type of voids in any layer of the layout based on the layout situation, the arrangement unit 1402 is specifically used to: determine the spatial distribution state of multiple devices in any layer according to the layout situation; if the spatial distribution state includes a concave state, determine that the void type of any layer of the layout includes a concave void, where a concave state means that any layer includes a seventh device, and the seventh device means that there are an eighth device and a ninth device on both sides other than itself, and the size of the eighth device and the ninth device in the direction perpendicular to the layout direction is larger than the size of the seventh device; if the spatial distribution state includes a convex state, determine that the void type of any layer of the layout includes a convex void, where a convex state means that any layer is not filled by devices in the layout direction.

[0131] In this embodiment, regarding the routing situation based on the first layout, in determining the fifth and sixth devices whose routing intersects in the first layout, the layout unit 1402 is specifically used to: determine whether there is a routing intersection point according to the routing topology of the electrical connections between multiple first devices; if there is a routing intersection point, determine the device with the larger layer number among the two devices connected by one of the two lines corresponding to the routing intersection point as the fifth device, and determine the device with the larger layer number among the two devices connected by the other line as the sixth device.

[0132] In this embodiment, regarding filling gaps in the layout based on the gap types included in any layer layout to obtain a first layout, the layout unit 1402 is specifically used for: when the gap type is a concave gap, determining a tenth device in the layer below the layout whose area is less than or equal to the area of ​​the concave gap, and moving the tenth device to the position of the concave gap; when the gap type is a convex gap, determining an eleventh device in the layer below the layout whose area is less than or equal to the area of ​​the convex gap, and determining whether the eleventh device is connected to any other device besides itself; if the eleventh device is connected to any other device besides itself, determining the total area of ​​all devices on the connection line of the eleventh device, and if the total area is less than or equal to the area of ​​the convex gap, moving all devices on the connection line of the eleventh device to the position of the convex gap; if the eleventh device is not connected to any other device besides itself, moving the eleventh device to the position of the convex gap.

[0133] It should be noted that, Figure 14 The specific implementation of each operation in the implementation method can be found in the description of the method implementation method shown above, and will not be repeated here.

[0134] See Figure 15 , Figure 15This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device 1500 may include a processor 1510, a memory 1520, and a communication bus for connecting the processor 1510 and the memory 1520.

[0135] Optionally, the memory 1520 may include, but is not limited to, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), or compact disc read-only memory (CD-ROM), and the memory 1520 is used to store program code executed by the electronic device 1500 and data transmitted therefrom.

[0136] In this embodiment, the electronic device 1500 may include a communication interface for receiving and sending data.

[0137] In this embodiment, the processor 1510 may be one or more CPUs. When the processor 1510 is a CPU, the CPU may be a single-core CPU or a multi-core CPU.

[0138] In this embodiment, the processor 1510 can be a baseband chip, a chip, a CPU, a general-purpose processor, a DSP, an ASIC, an FPGA, or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof.

[0139] In specific implementation, the processor 1510 in the electronic device 1500 executes the computer program or instructions 1521 stored in the memory 1520 to perform the following operations: In response to the selection operation of multiple first devices, multiple first devices are displayed. The multiple first devices are devices that need to be laid out. The multiple first devices include a target device and multiple second devices. The multiple second devices are connected to the target device. In response to the layout operation on multiple first devices, multiple second devices are clustered to obtain X groups of devices in the same network and Y third devices. Based on at least one layout parameter, X groups of devices in the same network and Y third devices, multiple first devices are arranged to generate a layout pattern of multiple first devices. At least one layout parameter is used to constrain the layout pattern. Each group of devices in the same network includes at least two second devices. The pin connection relationship of any one of the at least two second devices is the same as the pin connection relationship of any other second device in the at least two second devices. The Y third devices are Y second devices in the multiple second devices other than the X groups of devices in the same network. X and Y are integers greater than or equal to 0.

[0140] It should be noted that, Figure 15 The specific implementation of each operation in the implementation method can be found in the description of the method implementation method shown above, and will not be repeated here.

[0141] This application also provides a computer storage medium storing a computer program for electronic data interchange, which causes a computer to perform some or all of the steps of any of the methods described in the above method embodiments, wherein the computer includes an electronic device.

[0142] This application also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps of any of the methods described in the above method embodiments. The computer program product may be a software installation package, and the computer may include an electronic device.

[0143] It should be noted that, for the sake of simplicity, the various embodiments described above are all presented as a series of actions. Those skilled in the art should understand that this application is not limited by the described order of actions, as some steps in the embodiments of this application can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions, steps, modules, or units involved are not necessarily essential to the embodiments of this application.

[0144] In the above embodiments, the descriptions of each embodiment in this application have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0145] The steps of the methods or algorithms described in this application can be implemented in hardware or by a processor executing software instructions. The software instructions can consist of corresponding software modules, which can be stored in RAM, flash memory, ROM, EPROM, electrically erasable programmable read-only memory (EEPROM), registers, hard disk, portable hard disk, read-only optical disk (CD-ROM), or any other form of storage medium known in the art. An exemplary storage medium is coupled to a processor, enabling the processor to read information from and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and storage medium can reside in an ASIC. Furthermore, the ASIC can reside in a terminal device or management device. Alternatively, the processor and storage medium can exist as discrete components in the terminal device or management device.

[0146] Those skilled in the art will recognize that, in one or more of the examples above, the functions described in the embodiments of this application can be implemented, in whole or in part, by software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. This computer program product includes one or more computer instructions. When these computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., digital video discs (DVDs)), or semiconductor media (e.g., solid-state disks (SSDs)).

[0147] The modules / units included in the various devices and products described in the above embodiments can be software modules / units, hardware modules / units, or a combination of both. For example, for devices and products applied to or integrated into a chip, all modules / units can be implemented using hardware methods such as circuits, or at least some modules / units can be implemented using software programs that run on a processor integrated within the chip, while the remaining (if any) modules / units can be implemented using hardware methods such as circuits. For devices and products applied to or integrated into a chip module, all modules / units can be implemented using hardware methods such as circuits. Different modules / units can be located in the same component (e.g., chip, circuit module, etc.) or different components of the chip module, or at least some modules / units can be implemented using hardware methods such as circuits. The implementation is achieved through a software program that runs on the processor integrated within the chip module. The remaining modules / units (if any) can be implemented using hardware methods such as circuits. For various devices and products applied to or integrated into terminal equipment, each of their modules / units can be implemented using hardware methods such as circuits. Different modules / units can be located in the same component (e.g., chip, circuit module, etc.) or different components within the terminal equipment. Alternatively, at least some modules / units can be implemented through a software program that runs on the processor integrated within the terminal equipment, while the remaining modules / units (if any) can be implemented using hardware methods such as circuits.

[0148] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the embodiments of this application. It should be understood that the above description is only a specific embodiment of the embodiments of this application and is not intended to limit the protection scope of the embodiments of this application. Any modifications, equivalent substitutions, improvements, etc., made on the basis of the technical solution of the embodiments of this application should be included within the protection scope of the embodiments of this application.

Claims

1. A method for laying out a device, characterized in that, The method includes: In response to a selection operation of multiple first devices, the multiple first devices are displayed. The multiple first devices are devices that need to be laid out. The multiple first devices include a target device and multiple second devices. The multiple second devices are connected to the target device. In response to the placement operation on the plurality of first devices, the plurality of second devices are clustered to obtain X groups of devices in the same network and Y third devices. Based on at least one placement parameter, the X groups of devices in the same network, and the Y third devices, the plurality of first devices are arranged to generate a layout pattern of the plurality of first devices. The at least one placement parameter is used to constrain the layout pattern. Each group of devices in the same network includes at least two second devices. The pin connection relationship of any one of the at least two second devices is the same as the pin connection relationship of any other second device in the at least two second devices. The Y third devices are the Y second devices in the plurality of second devices other than the X groups of devices in the same network. X and Y are integers greater than or equal to 0.

2. The method according to claim 1, characterized in that, The at least one layout parameter includes at least one of the desired spacing between any two adjacent second devices among the plurality of second devices, and the wiring spacing reserved for the target device; The step of arranging the plurality of first devices to generate a layout pattern of the plurality of first devices based on at least one layout parameter, the X groups of devices in the same network, and the Y third devices includes: When at least one layout parameter includes a desired spacing between adjacent second devices among the plurality of second devices, the desired spacing is used as the spacing between adjacent second devices in the layout to generate the layout; and / or When at least one layout parameter includes a wiring spacing reserved for the target device, a preset area is used as the area for connecting wiring between the plurality of second devices and the target device to generate the layout pattern. The preset area is the area in the first area of ​​the design pattern other than the area occupied by the target device in the design pattern. The first area is obtained by expanding the wiring spacing of the area occupied by the target device.

3. The method according to claim 1 or 2, characterized in that, The target device is the first device with the most pins among the plurality of first devices.

4. The method according to claim 1, characterized in that, The at least one layout parameter includes a device indicator, which is used to select the target device; The step of arranging the plurality of first devices to generate a layout pattern of the plurality of first devices based on at least one layout parameter, the X groups of devices in the same network, and the Y third devices includes: The first device corresponding to the device indicator is determined from the plurality of first devices as the target device to generate the layout pattern.

5. The method according to claim 1, characterized in that, The display of the plurality of first devices in response to a selection operation includes: In response to a user's selection of the plurality of first devices on a first interface, an identifier for each of the plurality of first devices is displayed on a second interface, wherein the first interface is different from the second interface.

6. The method according to claim 5, characterized in that, The layout is displayed in a third interface, which is different from the second interface.

7. The method according to claim 1, characterized in that, The at least two second devices are multi-pin devices. The arrangement of the plurality of first devices to generate a layout pattern of the plurality of first devices based on at least one layout parameter, the X groups of devices in the same network, and the Y third devices includes: Based on the number of second devices and layout resources included in each group of network devices, each group of network devices is merged to obtain X virtual devices. The X virtual devices correspond one-to-one with the X groups of network devices, and the layout resources are the layout space of each group of network devices. Determine the connection relationship between each of the Z fourth devices and the target device, wherein the Z fourth devices include the X virtual devices and the Y third devices, and Z is an integer greater than 0; Based on the connection relationship between each fourth device and the target device, the Z fourth devices are laid out to generate the layout pattern.

8. The method according to claim 7, characterized in that, The step of laying out the Z fourth devices based on the connection relationship between each fourth device and the target device to generate the layout pattern includes: The fourth devices with the same connection relationship with the target device among the Z fourth devices are divided into the same group to obtain N device groups. Each device group contains one or more fourth devices. Any fourth device in the i-th device group is indirectly connected to the target device through i-1 devices. When i=1, any fourth device in the i-th device group is directly connected to the target device. N and i are integers greater than or equal to 1. The layout layer corresponding to the i-th device group is determined to be the i-th layer, and the (i+1)-th layer is located outside the i-th layer. The outside is the side of the i-th layer that is far away from the target device. When i=1, the i-th layer is adjacent to the target device. The fourth device in each device group is placed in the corresponding layout layer to generate the layout pattern.

9. The method according to claim 8, characterized in that, The step of placing the fourth device in each device group in the corresponding placement layer to generate the placement layout includes: The priority of one or more fourth devices in the i-th device group is determined by the layout order of one or more fourth devices in the (i-1)-th device group in the layout direction, wherein the layout direction is a predetermined direction for laying out devices. When i=1, the priority of one or more fourth devices in the i-th device group is determined by the arrangement order of the networks corresponding to the pins on one side of the target device in the layout direction. Based on the priority, one or more fourth devices in the i-th device group are laid out along the layout direction on the i-th layer to generate the initial layout of the i-th device group; The initial layout of each device group is integrated to obtain the layout.

10. The method according to claim 9, characterized in that, Based on the aforementioned priority, the fourth device in the i-th device group is placed along the layout direction on the i-th layer to generate the initial layout of the i-th device group, and the method further includes: If there is a gap in the i-th layer after one or more fourth devices in the i-th device group have been laid out, and there are one or more additional devices in the i-th device group, the one or more additional devices of the i-th device group are laid out in the gap in the i-th layer until the i-th layer is filled or until one or more additional devices of the i-th device group have been laid out, so as to generate the initial layout of the i-th device group. If, after the i-th layer is filled, there are one or more remaining fourth devices and / or one or more remaining additional devices of the i-th device group that have not been laid out, the remaining one or more fourth devices and / or one or more remaining additional devices of the i-th device group shall be treated as one or more additional devices of the i+1 device group and participate in the layout of the i+1 device group to generate the initial layout of the i+1 device group.

11. The method according to any one of claims 7-10, characterized in that, The second device included in each group of devices on the same network is a two-pin device; The method of merging each group of network devices based on the number and layout resources of the second devices included in each group of network devices to obtain X virtual devices includes: When the number of multiple two-pin devices included in a group of devices in the same network is less than or equal to a first threshold and the layout resources are sufficient, the multiple two-pin devices are connected in series to form a virtual device along the first direction of each two-pin device, and the length of each two-pin device in the first direction is greater than the length of the two-pin device in any other direction besides the first direction. When the number of multiple dual-pin devices included in a group of devices on the same network is less than or equal to a first threshold and the layout resources are insufficient, the multiple dual-pin devices are connected in series to form a virtual device along the second direction of each dual-pin device, and the length of each dual-pin device in the second direction is less than the length of the dual-pin device in any other direction besides the second direction. If the number of multiple two-pin devices included in a group of devices on the same network is greater than a first threshold, the multiple two-pin devices are connected in series to form a virtual device along the second direction of each two-pin device.

12. The method according to claim 1, characterized in that, After arranging the plurality of first devices to generate a layout of the plurality of first devices, the method further includes: The layout, bus length and routing are determined after the layout is laid out according to the layout diagram. The layout refers to the spatial distribution of the plurality of first devices after the layout is laid out according to the layout diagram. The routing refers to the routing topology of the electrical connections between the plurality of first devices after the layout is laid out according to the layout diagram. Based on the layout, bus length, and routing, the layout pattern is optimized.

13. The method according to claim 12, characterized in that, The optimization of the layout based on the layout, bus length, and routing includes: Based on the aforementioned layout, determine the types of vacancies included in any subsequent layer of the layout; Based on the type of vacancy included in any layer's layout, fill in the vacancy in that layer's layout to obtain the first layout. Based on the routing of the first layout, the fifth and sixth devices whose routing intersect are identified in the first layout. If there are intersecting fifth and sixth devices, and if the fifth and sixth devices are the same size and neither is connected to any other device except itself, swap the positions of the fifth and sixth devices to obtain the second layout. The second layout is translated, and during the translation process, the layout corresponding to the position where the bus length of the second layout is shortest is determined as the optimized layout layout.

14. The method according to claim 13, characterized in that, Based on the aforementioned layout, determining the types of gaps in any layer of the layout after the initial layout includes: Based on the layout described, determine the spatial distribution of multiple devices arranged in any layer; If the spatial distribution state includes a concave state, the type of gap in any layer layout is determined to include a concave gap. The concave state refers to any layer including a seventh device. The seventh device refers to an eighth device and a ninth device other than itself existing on both sides, and the size of the eighth device and the ninth device in the direction perpendicular to the layout is larger than the size of the seventh device. If the spatial distribution state includes a convex state, the type of void in any layer layout is determined to be a convex void. The convex state refers to the state in which any layer is not filled by devices in the layout direction.

15. The method according to claim 13 or 14, characterized in that, Based on the routing information of the first layout, the fifth and sixth devices whose routing intersect in the first layout are identified, including: Based on the routing topology of the electrical connections between the plurality of first devices, determine whether there are routing intersections; In the case of the aforementioned trace intersection, the device with the larger number of layers among the two devices connected by one of the two lines corresponding to the trace intersection is identified as the fifth device, and the device with the larger number of layers among the two devices connected by the other line is identified as the sixth device.

16. The method according to claim 13, characterized in that, The first layout is obtained by filling in the gaps in the layout of any layer based on the type of gaps included in the layout, including: In the case where the type of the void is a concave void, a tenth device is determined in the next layer of any layer layout, whose area is less than or equal to the area of ​​the concave void, and the tenth device is moved to the position of the concave void. In the case where the void type is a convex void, determine the eleventh device in the next layer of any layer layout whose area is less than or equal to the area of ​​the convex void, and determine whether the eleventh device is connected to any device other than itself. If the eleventh device is connected to any device other than itself, then the total area of ​​all devices on the connection line of the eleventh device is determined. If the total area is less than or equal to the area of ​​the convex gap, then all devices on the connection line of the eleventh device are moved to the position of the convex gap. If the eleventh device is not connected to any other device besides itself, then the eleventh device is moved to the position of the convex vacancy.

17. An electronic device, characterized in that, The device includes a memory and a processor, the memory being used to store a computer program, the computer program including program instructions, and the processor being configured to invoke the program instructions to perform the method as described in any one of claims 1-16.

18. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-readable instructions that, when executed on a computer, cause the computer to perform the method of any one of claims 1-16.