Basic operation module layout method and device and storage medium
By adjusting the orientation information of the circuit unit and performing layout evaluation and optimization, the problem of unreasonable layout of the circuit unit in the basic computing module is solved, a more compact and reasonable layout is achieved, and the chip layout effect is improved.
Patent Information
- Application Number
- CN202510384787.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-28
- Publication Date
- 2025-08-12
AI Technical Summary
In the prior art, the circuit unit layout of the basic computing module is unreasonable, resulting in poor layout effect, especially in the integrated basic computing modules such as adders and multipliers in the chip, the density is high and the layout constraints are complex.
By acquiring the first orientation information of the circuit unit, adjusting to obtain the second orientation information, calculating the layout evaluation value, and performing layout processing when the evaluation value is less than the threshold value, optimizing the layout of the circuit unit.
It improves the compactness and rationality of the layout of the circuit unit, improves the layout effect of the basic computing module, and reduces the area of the chip.
Smart Images

Figure CN120471001A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of electronic design technology, and in particular to a layout method, device, and storage medium for a basic operation module. Background Art
[0002] Chips may include digital chips, analog chips, mixed signal chips, and the like. Basic operation modules may be provided in the chip. For example, digital chips include computing power chips. Computing power chips such as artificial intelligence (AI) chips, graphics processing units (GPUs), and other chips are integrated with a large number of basic operation modules such as adders and multipliers with high reuse. Related technologies require customization of the basic operation modules in the chip to minimize power consumption and area. However, the density of the circuit units of the customized basic operation modules is generally large, such as greater than 90%, and the layout constraints of the circuit units are also very complex. When the circuit units in the basic operation modules are laid out, it is easy for the layout of the circuit units to be unreasonable, which in turn leads to poor layout effects of the circuit units in the basic operation modules. Summary of the Invention
[0003] The main purpose of this application is to provide a layout method, device and storage medium for a basic operation module, aiming to solve the technical problem of poor layout effect of circuit units in the basic operation module due to unreasonable layout of circuit units in the basic operation module.
[0004] In a first aspect, the present application provides a layout method for a basic operation module, comprising:
[0005] Acquire first position information of each of the plurality of circuit units in the basic operation module;
[0006] Adjusting the first position information of at least one of the circuit units to obtain the second position information of the plurality of circuit units;
[0007] determining a first layout evaluation value corresponding to the basic operation module according to the second position information of each of the plurality of circuit units;
[0008] When the first layout evaluation value is less than a preset evaluation threshold, layout processing is performed on the plurality of circuit units according to the second orientation information of each of the plurality of circuit units to obtain layout information of the basic operation module.
[0009] In a second aspect, the present application provides an electronic device, the electronic device comprising a memory and a processor;
[0010] The memory is used to store computer programs;
[0011] The processor is configured to execute the computer program and implement the steps of the aforementioned basic operation module layout method when executing the computer program.
[0012] In a third aspect, the present application provides a computer-readable storage medium having a computer program stored thereon; when the computer program is executed by a processor, the steps of the aforementioned layout method of the basic operation module are implemented.
[0013] The present application provides a layout method, device and storage medium for a basic operation module. The layout method for the basic operation module includes: obtaining first orientation information of each of multiple circuit units in the basic operation module; adjusting the first orientation information of each of at least one circuit unit to obtain second orientation information of each of the multiple circuit units; determining a first layout evaluation value corresponding to the basic operation module based on the second orientation information of each of the multiple circuit units; when the first layout evaluation value is greater than a preset evaluation threshold, performing layout processing on the multiple circuit units based on the second orientation information of each of the multiple circuit units to obtain layout information of the basic operation module.
[0014] When adjusting the first orientation information of at least one circuit unit in a basic operation module to obtain second orientation information for each of the multiple circuit units, and determining a first layout evaluation value corresponding to the basic operation module based on the second orientation information, the first layout evaluation value can be used to evaluate the layout compactness of the multiple circuit units in the basic operation module after the orientation information adjustment. The smaller the first layout evaluation value, the more compact the layout and routing of the multiple circuit units in the basic operation module. A preset evaluation threshold can be used to indicate the expected optimization target corresponding to the layout optimization of the circuit units in the basic operation module. Based on this, when the first layout evaluation value is less than the preset evaluation threshold, the multiple circuit units are layout-processed based on the second orientation information of each of the multiple circuit units to obtain layout information for the basic operation module. The layout information of the basic operation module is equivalent to that obtained by optimizing the layout of the circuit units in the basic operation module, thereby facilitating the improvement of the layout rationality of the circuit units in the basic operation module. Accordingly, when the layout compactness and layout rationality of the circuit units in the basic operation module are improved, the layout effect of the circuit units in the basic operation module is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 A schematic diagram of a flow chart of a layout method of a basic operation module provided in an embodiment of the present application;
[0016] Figure 2A This is a schematic block diagram of a basic operation module involved in an embodiment of the present application;
[0017] Figure 2B Another schematic block diagram of a basic operation module designed for an embodiment of the present application;
[0018] Figure 3 A schematic diagram of a first preset position range corresponding to a basic operation module according to an embodiment of the present application;
[0019] Figure 4 Schematic diagram of a flow chart of a layout method of a basic operation module according to an embodiment of the present application;
[0020] Figure 5 A schematic block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0021] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0022] The flowcharts shown in the accompanying drawings are for illustrative purposes only and do not necessarily include all contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may be decomposed, combined, or partially merged, so the actual execution order may vary depending on the actual situation.
[0023] The embodiments of the present application provide a layout method, device and storage medium for a basic operation module. Among them, the layout method of the basic operation module can be applied to electronic devices, which can be mobile phones, tablet computers, laptops, desktop computers and other devices. It can also be applied to a server, which can be a separate server, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), and big data and artificial intelligence platforms. Some implementation methods of the present application are described in detail below with reference to the accompanying drawings. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.
[0024] See also Figure 1 , Figure 1 It should be noted that the layout method of the basic operation modules provided in the embodiment of the present application can be used in electronic devices or servers, without limitation.
[0025] like Figure 1 As shown, the layout method of the basic operation module includes steps S101 to S104.
[0026] S101: Obtain first position information of each of a plurality of circuit units in a basic operation module.
[0027] For example, the basic operation module may be provided with a plurality of circuit units, and the electronic device may acquire the first position and first direction of each circuit unit on the basic operation module to obtain first position information of each circuit unit.
[0028] For example, the first orientation information may include a first direction and a first position. The first position may include at least one of the first corner point coordinates of the circuit unit and the first pin coordinates of the circuit unit. Take the shape corresponding to the circuit unit as a rectangle as an example. In the case where the rectangle corresponding to the circuit unit may include four corner points, for example, the coordinates of the lower left corner point of the rectangle may be determined as the first corner point coordinates of the circuit unit. Correspondingly, in the case where the circuit unit may include at least one pin, for example, the first pin coordinates of the circuit unit may be determined based on the center point coordinates of the pin. Of course, this is not limited to this and is not limited here. The pins of the circuit unit can be used by electronic devices to connect the corresponding pins of different circuit units through wires when wiring the circuit units to establish a connection relationship between different circuit units. The corner points of the circuit unit can provide a basis for electronic devices to layout the circuit units.
[0029] In some embodiments, in the process of obtaining the first position information of each of the multiple circuit units in the basic operation module, the electronic device can use an electronic design automation (EDA) tool to obtain the first position information of each of the multiple circuit units in the basic operation module. For example, the electronic device can extract the module information of each of the multiple circuit units of the basic operation module from the EDA tool through a scripting language, such as a Tool Command Language (TCL) scripting language used to control and expand tool functions. The module information may include the name of the circuit unit, the pin name of the circuit unit, the first position information of the circuit unit, the prohibited layout area of the circuit unit, etc., which are not limited here, and the electronic device can then determine the first position information of each of the multiple circuit units in the basic operation module.
[0030] When obtaining the first orientation information of each of the multiple circuit units in the basic operation module, the first orientation information of each of the multiple circuit units can be used by subsequent electronic devices to adjust the first orientation information of at least one circuit unit, so that subsequent electronic devices can perform orientation adjustment, layout evaluation value and layout determination on the circuit units of the basic operation module, thereby optimizing the layout compactness of the basic operation module and obtaining the layout information of the basic operation module.
[0031] S102: Adjust the first position information of at least one circuit unit to obtain the second position information of multiple circuit units.
[0032] For example, when the first orientation information of each of the multiple circuit units in the basic operation module is obtained, the electronic device can perform layout prediction on the multiple circuit units based on the first orientation information of each of the multiple circuit units to obtain the initial predicted layout information of the basic operation module. For multiple circuit units in the same basic operation module, the initial positive step line layout information corresponding to the multiple circuit units can be determined based on the first orientation information of each of the multiple circuit units. Correspondingly, the initial negative step line layout information corresponding to the multiple circuit units can also be determined based on the first orientation information of each of the multiple circuit units. The initial positive step line layout information and the initial negative step line layout information corresponding to the multiple circuit units can be used to determine the initial predicted layout information of the basic operation module.
[0033] For example, in the process of determining the initial predicted layout information of the basic operation module, the electronic device can use a sequence pair mapping algorithm to map the positions of multiple circuit units in the basic operation module on a two-dimensional plane, such as the first position, into two sequence pairs, so as to reflect the positional relationship between different circuit units through the sequence pairs. The sequence pair can convert the initial predicted layout information of the basic operation module from a complex layout problem into a sequence pair form, which simply and clearly presents the positional relationship between the circuit units in the basic operation module. The sequence pair mapping algorithm can convert the actual layout problem of the basic operation module into an algorithm optimization problem, so that the electronic device can optimize the layout of the circuit units in the basic operation module by improving the algorithm, so as to improve the convenience of layout optimization of the circuit units in the basic operation module.
[0034] Take the example of a basic operation module where multiple circuit units include units a to f. The initial predicted layout information of the basic operation module may include initial positive step line layout information and initial negative step line layout information corresponding to units a to f. The initial positive step line layout information and initial negative step line layout information corresponding to units a to f can be used to determine a pair of sequence pairs corresponding to the basic operation module, so as to reflect the positional relationship between different circuit units in units a to f through the sequence pairs. The initial positive step line layout information corresponding to units a to f is as follows: Figure 2A As shown. According to the initial positive step line layout information corresponding to unit a to unit f, it can be determined that the sequence corresponding to the basic operation module includes ecadfb. The initial negative step line layout information corresponding to unit a to unit f is as follows Figure 2B As shown. Based on the initial negative stepping line layout information corresponding to units a to f, it can be determined that the sequence corresponding to the basic operation module includes fcbead. Of course, the multiple circuit units included in the basic operation module, the first orientation information of each of the multiple circuit units, and the sequence pairs corresponding to the basic operation module are not limited to this and are not limited here.
[0035] For a basic operation module, its initial predicted layout information is not necessarily the most compact. Based on this, the electronic device can adjust the first orientation information of at least one circuit unit to obtain the second orientation information of multiple circuit units, so as to subsequently adjust the initial predicted layout information of the basic operation module based on the second orientation information of the multiple circuit units. The electronic device can adjust the initial predicted layout information of the basic operation module by adjusting the first orientation information of at least one circuit unit among the multiple circuit units in the basic operation module, thereby optimizing the layout of the circuit units in the basic operation module.
[0036] For example, the electronic device can adjust the first orientation information of at least one circuit unit. The at least one circuit unit can be randomly selected from multiple circuit units in the basic operation module, without limitation. Accordingly, the first orientation information can include a first direction and a first position of the circuit unit. The electronic device can then adjust at least one of the first direction and the first position of the at least one circuit unit to obtain the second orientation information of each of the multiple circuit units.
[0037] When determining the second orientation information of each of the multiple circuit units in the basic operation module, the second orientation information of each of the multiple circuit units can be used by subsequent electronic devices to determine the first layout evaluation value corresponding to the basic operation module, so that subsequent electronic devices can evaluate whether the layout compactness of the circuit units in the basic operation module is optimized after the orientation information is adjusted, so as to determine the layout information of the basic operation module when the layout compactness of the circuit units is optimized.
[0038] S103 : Determine a first layout evaluation value corresponding to the basic operation module according to the second position information of each of the plurality of circuit units.
[0039] In some embodiments, when the electronic device determines the second orientation information of each of the multiple circuit units, the electronic device can perform layout prediction on the multiple circuit units based on the second orientation information of each of the multiple circuit units to obtain the first predicted layout information of the basic operation module. For multiple circuit units of the same basic operation module, the first positive stepping line layout information corresponding to the multiple circuit units can be determined based on the second orientation information of each of the multiple circuit units. Correspondingly, the first negative stepping line layout information corresponding to the multiple circuit units can also be determined based on the second orientation information of each of the multiple circuit units. The first positive stepping line layout information and the first negative stepping line layout information corresponding to the multiple circuit units can be used to determine the first predicted layout information of the basic operation module.
[0040] Accordingly, the electronic device can calculate a layout evaluation value for the first predicted layout information of the basic operation module based on the second orientation information of each of the multiple circuit units, thereby obtaining a first layout evaluation value corresponding to the basic operation module. The first layout evaluation value can be used to evaluate the compactness of the layout of the multiple circuit units in the basic operation module after the orientation information is adjusted, thereby evaluating the degree of optimization of the layout of the circuit units in the basic operation module.
[0041] For example, the electronic device may substitute the second orientation information of each of the multiple circuit units into a preset layout evaluation function corresponding to the basic operation module to obtain a first layout evaluation value corresponding to the basic operation module. The preset layout evaluation function may be pre-set and is not limited here.
[0042] In an exemplary embodiment, when the electronic device substitutes the second orientation information of each of the multiple circuit units into the preset layout evaluation function corresponding to the basic operation module, the preset layout evaluation function can determine the predicted design parameters of the basic operation module, such as at least one of the ideal line length and the predicted layout area. Accordingly, the preset layout evaluation function can evaluate the layout compactness of the circuit units in the basic operation module based on the predicted design parameters of the basic operation module, and then obtain a first layout evaluation value corresponding to the basic operation module. Specifically, when the layout compactness of the circuit units in the basic operation module is higher, the smaller the predicted design parameters of the basic operation module, such as at least one of the ideal line length and the predicted layout area, the smaller the first layout evaluation value corresponding to the basic operation module.
[0043] When the first layout evaluation value corresponding to the basic operation module is determined based on the second orientation information of each of the multiple circuit units, the first layout evaluation value corresponding to the basic operation module can be used to evaluate the layout compactness of the circuit units in the basic operation module, and then can be used for subsequent determination of the layout information of the basic operation module.
[0044] S104 : When the first layout evaluation value is less than a preset evaluation threshold, perform layout processing on the multiple circuit units according to the respective second orientation information of the multiple circuit units to obtain layout information of the basic operation module.
[0045] For example, when the first layout evaluation value is smaller, the electronic device can determine that the layout of the multiple circuit units in the basic operation module is more compact. The more compact the layout of the multiple circuit units in the basic operation module, the more reasonable the layout of the basic operation module. Accordingly, when the first layout evaluation value is small to a certain extent, the electronic device can determine that the second orientation information of each of the multiple circuit units can be used by the electronic device to optimize the layout of the basic operation module. Then, the electronic device can perform layout processing on the multiple circuit units based on the second orientation information of each of the multiple circuit units to obtain layout information of the basic operation module.
[0046] In some embodiments, the electronic device can evaluate whether the layout compactness of multiple circuit units in the basic operation module reaches the expected optimization target by comparing the first layout evaluation value with a preset evaluation threshold, that is, determine whether the optimization degree when the layout of the circuit units in the basic operation module is optimized reaches the expected optimization target.
[0047] The preset evaluation threshold may be pre-set or may be set or adjusted by the user. For example, when the preset evaluation threshold is set, the preset evaluation threshold may be set to a layout evaluation value that is as small as possible, so that when the electronic device determines the layout information of the basic operation module, it can optimize the layout of the basic operation module with the compactness of the layout of the multiple circuit units on the basic operation module as the expected optimization goal.
[0048] If the first layout evaluation value is less than a preset evaluation threshold, the electronic device can determine that the layout compactness of the multiple circuit units in the basic operation module has been improved due to the second orientation information, and the expected optimization goal has been achieved. The electronic device can then optimize the layout of the basic operation module. Based on this, the electronic device can perform layout processing on the multiple circuit units based on the second orientation information of each of the multiple circuit units to obtain layout information for the basic operation module.
[0049] When the first layout evaluation value is less than a preset evaluation threshold, layout processing is performed on the multiple circuit units based on the second orientation information of each of the multiple circuit units to obtain layout information of the basic operation module, thereby improving the layout compactness of the multiple circuit units in the basic operation module. Accordingly, when the layout compactness of the multiple circuit units in the basic operation module is improved, a smaller area of the basic operation module is more conducive to optimizing the area of the basic operation module.
[0050] In an exemplary embodiment, the electronic device can utilize an EDA tool to combine the second position information of each of the multiple circuit units in the basic operation module to perform layout processing on the multiple circuit units, thereby obtaining layout information of the basic operation module. For example, the electronic device can input the second position information of each of the multiple circuit units in the basic operation module into the EDA tool in a module definition (def) format. The EDA tool can then parse the second position information of each of the multiple circuit units in the basic operation module and utilize the second position information of each of the multiple circuit units to perform layout processing on the multiple circuit units, thereby obtaining layout information of the basic operation module. Of course, this is not limited to this and is not a limitation herein.
[0051] Exemplarily, the first orientation information includes a first direction and a first position. For example, in the process of adjusting the first orientation information of at least one circuit unit, the electronic device may adjust at least one of the first direction and the first position of the at least one circuit unit.
[0052] In some embodiments, the first positions of at least two circuit units located within a first preset position range corresponding to the basic operation module are exchanged to obtain second position information of each circuit unit.
[0053] For example, in the process of adjusting the first position information of each of at least one circuit unit, the electronic device may select at least two circuit units from a plurality of circuit units to adjust the first positions of each of the at least two selected circuit units. For example, the electronic device may randomly select at least two circuit units from a plurality of circuit units. When at least two circuit units are determined, the electronic device may swap the first positions of each of the two circuit units. Accordingly, for other circuit units other than the at least two selected circuit units, their first position information may be directly determined as the second position information of the corresponding circuit unit. Figure 2A as well as Figure 2BAs shown, taking the example of a basic operation module comprising multiple circuit units including units a to f, the electronic device can select unit c and unit a from units a to f as the first circuit unit, and swap the first positions of units c and a to obtain second position information for each of units c and a. The first positions of units c and a can be swapped or not, and this is not a limitation. Accordingly, without changing the first position information of other modules other than units a and c, the electronic device can directly determine the first position information of other modules other than units a and c as the second position information of the corresponding modules. The electronic device can determine the second position information of each of units a to f based on the second position information of units a and c, as well as the first position information of other modules other than units a and c. Of course, the at least two circuit units selected from the multiple circuit units for swapping the first positions are not limited to units a and c. For example, the at least two selected circuit units can also be units a, b, c, and d. The electronic device can exchange the first positions of unit a, unit b, unit c and unit d in pairs, or exchange the first positions of unit a, unit b, unit c and unit d in sequence, or randomly exchange the first positions of unit a, unit b, unit c and unit d, etc., without limitation here.
[0054] Before selecting at least two circuit units for the electronic device to exchange the respective first positions of the at least two circuit units, the selection range of the at least two circuit units may be restricted. Exemplarily, the electronic device may adopt a sliding window optimization strategy to determine the selection range of the at least two units. For example, the electronic device may adopt a sliding window optimization strategy to determine a first preset position range from the position range corresponding to the basic operation module, and set the first preset position range corresponding to the basic operation module as the selection range of the at least two circuit units, so as to exchange the respective first positions of the at least two circuit units located within the first preset position range, and obtain the second orientation information of each circuit unit.
[0055] For example, when adjusting the first orientation information of at least one circuit unit, the electronic device may determine that the first predicted layout information of the basic operation module corresponding to the first orientation information of each circuit unit is equivalent to the better predicted layout information optimized by the EDA tool. The electronic device may then swap the first positions of at least two circuit units within the first preset position range corresponding to the basic operation module to perform a local adjustment on the basic operation module. When the basic operation module is locally adjusted, the electronic device may subsequently evaluate the layout compactness of the circuit units in the basic operation module to determine whether the layout has been optimized compared to before the local adjustment, thereby subsequently optimizing the rationality of the layout of the circuit units in the basic operation module. Accordingly, compared to directly selecting at least two circuit units from a plurality of circuit units for exchanging the first position, under the limitation of the first preset position range, the number of circuit units that can be selected for exchanging the first position when exchanging the first positions of each of at least two circuit units is reduced, which is beneficial for optimizing the layout rationality of the circuit units in the basic operation module while limiting the scope of circuit unit exchange and reducing the search space for searching the circuit units for exchanging the first position, so as to simplify the process of layout optimization of the circuit units in the basic operation module and reduce the computational complexity when optimizing the layout of the circuit units in the basic operation module, thereby helping to improve the optimization efficiency when optimizing the layout of the circuit units in the basic operation module.
[0056] For example, the first preset position range can be determined based on the current size of the basic operation module under the influence of the first orientation information of each circuit unit. The current size of the basic operation module may include the current width and current height of the basic operation module. The positional relationship between circuit units in the same height range is affected by the first position size of the circuit unit in the lateral direction. Figure 2A As shown, unit a, unit d, and unit e are within the same height range. Since the first position of unit e in the transverse direction is smaller than the first position of unit a in the transverse direction, and the first position of unit a in the transverse direction is smaller than the first position of unit d in the transverse direction, the positional relationship of unit a, unit d, and unit e in the sequence pair is that unit e is adjacent to unit a, and unit e is located to the left of unit a, and unit a is adjacent to unit d, and unit a is located to the left of unit d. Accordingly, the positional relationship between circuit units within the same width range is affected by the size of the first position of the circuit unit in the longitudinal direction. Figure 2AAs shown, unit e and unit c are within the same width range. Since the first position of unit e in the longitudinal direction is smaller than the first position of unit c in the longitudinal direction, the positional relationship between unit e and unit c is that unit e is adjacent to unit c, and unit e is located on the upper side of unit c. Moreover, in determining the positional relationship between units a to f, such as the sequence pair process, it is necessary to first determine the positional relationship between all modules within the same width range corresponding to the current height range before continuing to determine the predicted layout order between all modules within the same width range corresponding to the next height range. Figure 2A As shown, the positional relationship between unit e, unit c, unit a and unit d must be determined first, and then the positional relationship between unit f and unit b can be determined.
[0057] Based on this, when the electronic device sets the first preset position range, the width covered by the first preset position range can be set to the current width of the basic operation module, and the height covered by the first preset position range can be set to an adjustable height, such as less than or equal to the current height of the basic operation module. Figure 3 As shown. When the electronic device determines that there are at least two circuit units within the first preset position range based on the first preset position range corresponding to the basic operation module, the electronic device can adjust the first positions of the at least two circuit units within the first preset position range. For example, the first positions of the at least two circuit units within the first preset position range are exchanged. Accordingly, in the process of selecting at least two circuit units to exchange the first positions of the at least two circuit units, the height covered by the first preset position range can be flexibly adjusted within the height range corresponding to the current height of the basic operation module, and is not limited here.
[0058] When the electronic device exchanges the first positions of at least two of the circuit units located within the first preset position range corresponding to the basic operation module to obtain the second position information of each of the circuit units, due to the limitation of the first preset position range, it is beneficial to improve the convenience of selecting the circuit unit. Accordingly, the electronic device can exchange the first positions of the at least two selected circuit units, which is beneficial to improve the convenience of the electronic device in adjusting the first position information of the circuit unit and improving the convenience of the electronic device in determining the second position information of the circuit unit. The second position information of the circuit unit can be used by the subsequent electronic device to optimize the layout of the circuit units in the basic operation module, so as to improve the rationality of the layout of the circuit units in the basic operation module by the electronic device.
[0059] In some embodiments, the first orientation of at least one circuit unit is adjusted to obtain second orientation information of each circuit unit.
[0060] For example, the electronic device may randomly select at least one circuit unit from a plurality of circuit units, and adjust the first direction of each of the at least one selected circuit unit to obtain the second orientation information of each circuit unit. Figure 2A as well as Figure 2B As shown, the basic operation module includes multiple circuit units including units a to f as an example. The electronic device can, for example, select unit b from units a to f to adjust the first direction of unit b to obtain the second orientation information of unit b. For example, the first direction of unit b can be flipped horizontally or vertically, and this is not limited here. Accordingly, the electronic device can directly determine the first orientation information of other modules except unit b as the second orientation information of the corresponding module without changing the first orientation information of other modules except unit b. Of course, the at least one circuit unit selected is not limited to unit b. For example, it can also be at least one of units a to f, and this is not limited here.
[0061] The electronic device can adjust the first orientation of at least one selected circuit unit, which helps improve the convenience of adjusting the first orientation information of the circuit unit and improving the convenience of determining the second orientation information of the circuit unit. The second orientation information of the circuit unit can be used by the electronic device to subsequently optimize the layout of the circuit unit in the basic operation module, thereby improving the rationality of the layout of the circuit units in the basic operation module.
[0062] In some embodiments, predicted design parameters of the basic operation module are determined based on the second orientation information of each of the multiple circuit units; and a first layout evaluation value corresponding to the basic operation module is determined based on the predicted design parameters based on a preset layout evaluation function.
[0063] For example, the second orientation information may include the second directions and second positions of the plurality of circuit units. When the electronic device determines the second orientation information of the plurality of circuit units, the electronic device may determine the predicted design parameters corresponding to the basic operation module based on the second directions and second positions of the plurality of circuit units.
[0064] Exemplarily, the predicted design parameters include at least one of an ideal line length and a predicted layout area. The ideal line length can be used to indicate the theoretical lower limit of the connection line length between the circuit units in the basic operation module. For example, the electronic device can ignore the physical constraints (such as wiring obstacles, timing, interlayer vias, etc.) between different circuit units in the basic operation module, and calculate the shortest line length corresponding to the circuit units in the basic operation module based only on the second orientation information of the circuit units. The shortest line length corresponding to the circuit units in the basic operation module can be used as the ideal line length corresponding to the basic operation module.
[0065] The second position may include the second corner point coordinates of the circuit unit and the second pin coordinates of the circuit unit. The electronic device may perform layout predictions on different circuit units based on the second corner point coordinates of each of the different circuit units to obtain the predicted layout area of the basic operation module. Accordingly, the electronic device may also perform wiring predictions on different circuit units based on the second pin coordinates of each of the different circuit units to obtain the ideal line length of the basic operation module. In an exemplary embodiment, the electronic device may determine the second pin coordinates of the circuit unit based on the center point coordinates of the pins of the circuit unit, and calculate the ideal line length corresponding to the basic operation module based on the second pin coordinates of each of the different circuit units, combined with a preset line length prediction algorithm, which is conducive to improving the accuracy of determining the ideal line length corresponding to the basic operation module.
[0066] The electronic device can evaluate the layout compactness of multiple circuit units in the basic operation module based on the predicted design parameters of the basic operation module. Accordingly, the electronic device can evaluate the layout rationality of multiple circuit units in the basic operation module based on the layout compactness of multiple circuit units in the basic operation module. The higher the layout compactness of multiple circuit units in the basic operation module, the higher the layout rationality of multiple circuit units in the basic operation module, which is conducive to achieving layout optimization of the circuit units in the basic operation module, thereby improving the layout effect of the circuit units in the basic operation module.
[0067] Based on this, the electronic device can determine a first layout evaluation value corresponding to the basic operation module based on a preset layout evaluation function and the predicted design parameters of the basic operation module. The layout evaluation function can include a weighting function related to the predicted design parameters of the basic operation module to evaluate the layout compactness of multiple circuit units in the basic operation module. When the predicted design parameters of the basic operation module include different types of parameters, different types of parameters can be assigned different weights. Accordingly, the weights corresponding to each type of parameter can be determined based on the degree of influence of each type of parameter on the layout compactness of the circuit units in the basic operation module. The higher the degree of influence on the layout compactness of the circuit units in the basic operation module, the higher the weight. For example, when the predicted design parameters include an ideal line length that has a higher influence on the layout compactness of the circuit units in the basic operation module than the predicted layout area, the weight of the ideal line length in the layout evaluation function can be set to be higher than the weight of the predicted layout area in the layout evaluation function. For another example, if the impact of the ideal wire length on the layout compactness of the circuit units in the basic operation module is greater than the impact of the predicted layout area on the layout compactness of the circuit units in the basic operation module, the electronic device may also determine the layout evaluation function based on the ideal wire length. This is of course not limited to this and is not intended to be limiting herein.
[0068] The electronic device may substitute the predicted design parameters of the basic operation module into the layout evaluation function to obtain a first layout evaluation value corresponding to the basic operation module. The smaller the first layout evaluation value, the electronic device may determine that the smaller the predicted design parameters of the basic operation module, the higher the layout compactness of the multiple circuit units in the basic operation module. The larger the first layout evaluation value, the electronic device may determine that the larger the predicted design parameters of the basic operation module, the lower the layout compactness of the multiple circuit units in the basic operation module.
[0069] Based on this, when determining the first layout evaluation value corresponding to the basic operation module, the electronic device can judge whether the layout compactness of the circuit units in the basic operation module is optimized according to the first layout evaluation value, so as to subsequently determine the layout information of the basic operation module.
[0070] In some embodiments, based on a preset line length prediction algorithm, the ideal line length of the basic operation module is determined according to the second orientation information of each of the multiple circuit units; the maximum value of the outline dimension corresponding to the basic operation module is determined according to the second orientation information of each of the multiple circuit units; and the predicted layout area of the basic operation module is determined according to the maximum value of the outline dimension corresponding to the basic operation module.
[0071] For example, the preset line length prediction algorithm can be used to estimate the sum of the line lengths corresponding to multiple circuit units in the basic operation module, and then determine the ideal line length of the basic operation module. The line length prediction algorithm includes, for example, the Steiner tree algorithm, the backtracking method, the minimum spanning tree algorithm, etc., which are not limited here. The electronic device can estimate the line length of the basic operation module based on the preset line length prediction algorithm, combined with the second orientation information of each of the multiple circuit units, to obtain the ideal line length of the basic operation module. For example, the electronic device can determine the ideal line length of the basic operation module based on the preset line length prediction algorithm, combined with the second direction and second pin coordinates of each of the multiple circuit units. The second pin coordinates can be determined based on the center point coordinates of the pins of each of the multiple circuit units, but of course it is not limited to this and is not limited here.
[0072] Accordingly, the electronic device can determine the maximum outline size corresponding to the basic operation module based on the second orientation information of each of the multiple circuit units. The maximum outline size corresponding to the basic operation module can include the maximum outline width and maximum outline height of the basic operation module.
[0073] Take the basic operation module including units a to f as an example. The maximum value of the outline size corresponding to the basic operation module can be determined according to the current size of the basic operation module, such as the current width and current height of the basic operation module. Figure 2A 、 Figure 2B As shown, the electronic device can determine the current width of the basic computing module based on the second corner coordinates of cell f and the second corner coordinates of cell d. For example, the second corner coordinates may include the coordinates of the upper left corner, lower left corner, upper right corner, and lower right corner of each module. The electronic device can determine the maximum horizontal width of cells f and d of the basic computing module based on the horizontal coordinates corresponding to the upper left corner coordinate and lower left corner coordinate of cell f, and the horizontal coordinates corresponding to the upper right corner coordinate and lower right corner coordinate of cell d. Cells f and d can be used to determine the outline of the basic computing module, and the electronic device can determine the current width of the basic computing module based on the maximum horizontal width of cells f and d of the basic computing module. For example, the electronic device can add the reserved wiring width to the maximum horizontal width of cells f and d of the basic computing module to obtain the current width of the basic computing module.
[0074] Accordingly, if Figure 2A 、 Figure 2BAs shown, the electronic device can determine the current height of the basic operation module based on the second corner point coordinates of unit d and the second corner point coordinates of unit b. For example, the electronic device can determine the maximum vertical height of unit d and unit b of the basic operation module based on the vertical coordinates corresponding to the upper left corner point coordinates and the upper right corner point coordinates of unit d and the vertical coordinates corresponding to the lower left corner point coordinates and the lower right corner point coordinates of unit b. Unit d and unit b can be used to determine the outline of the basic operation module, and the electronic device can determine the current height of the basic operation module based on the maximum vertical height of unit d and unit b of the basic operation module. For example, the electronic device can add the reserved wiring height to the maximum vertical height of unit d and unit b of the basic operation module to obtain the current height of the basic operation module.
[0075] When the maximum outline size corresponding to the basic operation module is determined, the electronic device can determine the predicted layout area of the basic operation module. For example, when the current width and current height of the basic operation module are determined, the electronic device can multiply the current width by the current height to obtain the predicted layout area of the basic operation module.
[0076] Based on this, when the second orientation information of each of the multiple circuit units is determined, the second orientation information can be used to determine the ideal line length and predicted layout area of the basic operation module, which helps improve the convenience of determining the ideal line length and predicted layout area of the basic operation module. Accordingly, the ideal line length and predicted layout area of the basic operation module can be used to determine the first layout evaluation value of the basic operation module. The first layout evaluation value can be used by the electronic device to evaluate the layout compactness of the multiple circuit units in the basic operation module, which facilitates the subsequent layout optimization of the circuit units in the basic operation module to improve the layout rationality of the circuit units in the basic operation module, thereby improving the layout effect of the circuit units in the basic operation module. For example, when the first orientation information of the circuit unit is adjusted to the second orientation information, if the ideal line length of the basic operation module is reduced, it can be used to optimize the wiring line length between the circuit units in the basic operation module. If the predicted layout area of the basic operation module is reduced, it can be used to optimize the layout area corresponding to the circuit units in the basic operation module. When the wiring line length between the circuit units in the basic operation module and the layout area corresponding to the circuit units are optimized, it is helpful to improve the layout effect of the circuit units in the basic operation module.
[0077] In some embodiments, when the first layout evaluation value is greater than or equal to a preset evaluation threshold, and the first layout evaluation value is less than a preset reference evaluation value, the second orientation information of at least one circuit unit is adjusted to obtain the third orientation information of multiple circuit units; based on the third orientation information of the multiple circuit units, the second layout evaluation value corresponding to the basic operation module is determined; when the second layout evaluation value is less than the preset evaluation threshold, the multiple circuit units are layout processed based on the third orientation information of the multiple circuit units to obtain the layout information of the basic operation module.
[0078] Exemplarily, the preset reference evaluation value can be determined based on the first orientation information of each of the multiple circuit units. If the first layout evaluation value is determined based on the second orientation information of each of the multiple circuit units, by comparing the first layout evaluation value with the preset reference evaluation value, the electronic device can evaluate whether the layout compactness of the multiple circuit units in the basic operation module has been optimized before and after adjusting the first orientation information. For example, if the first layout evaluation value is less than the preset reference evaluation value, the electronic device can determine that the layout compactness of the circuit units in the basic operation module has been optimized compared to before adjusting the first orientation information of the circuit units.
[0079] Accordingly, by comparing the magnitude relationship between the first layout evaluation value and the preset evaluation threshold, the electronic device can evaluate whether the layout compactness of the circuit units in the basic operation module has reached the expected optimization goal.
[0080] For example, when the first layout evaluation value is greater than or equal to a preset evaluation threshold, the electronic device can determine that the layout compactness of the circuit units in the basic operation module has not reached the expected optimization target, and it is necessary to continue to improve the layout compactness of the circuit units in the basic operation module in order to optimize the layout of the circuit units in the basic operation module, thereby improving the layout rationality of the basic operation module.
[0081] Based on this, when it is determined that the layout compactness of the circuit units in the basic operation module is optimized but the expected optimization target is not achieved, the electronic device can continue to adjust the second orientation information of at least one circuit unit based on the second orientation information of each of the multiple circuit units to obtain the third orientation information of each of the multiple circuit units.
[0082] In some embodiments, in the process of adjusting the second position information of at least one circuit unit, at least one of the second direction and the second position of the at least one circuit unit may be adjusted.
[0083] Exemplarily, the second positions of at least two circuit units located within the second preset position range corresponding to the basic operation module are exchanged to obtain the third position information of each circuit unit; wherein the second preset position range is obtained by traversing the basic operation module in a top-down order with the first preset position range as a window.
[0084] For example, the electronic device can adopt a sliding window optimization strategy, with the first preset position range corresponding to the basic operation module as the window and the basic operation module as a whole as the sliding window range, and control the first preset position range to traverse the basic operation module in order from top to bottom, so that the second position range corresponding to the basic operation module can be obtained.
[0085] The height range corresponding to the second preset position range may be different from the height range corresponding to the first preset position range. The second preset position range may not overlap with the first preset position range, or may partially overlap with the first preset position range, which is not limited here.
[0086] The process of exchanging the second positions of at least two circuit units located within the second preset position range corresponding to the basic operation module to obtain the third position information of each circuit unit can refer to the relevant description of exchanging the first positions of at least two circuit units located within the first preset position range corresponding to the basic operation module to obtain the second position information of each circuit unit, which will not be repeated here.
[0087] Exemplarily, the second direction of at least one circuit unit is adjusted to obtain third direction information of multiple circuit units.
[0088] The process of adjusting the second direction of at least one circuit unit to obtain the third orientation information of multiple circuit units can refer to the relevant description of adjusting the first orientation information of at least one circuit unit to obtain the second orientation information of multiple circuit units, which will not be repeated here.
[0089] In the case of determining the third position information of each of the plurality of circuit units, the electronic device may determine the second layout evaluation value corresponding to the basic operation module according to the third position information of each of the plurality of circuit units.
[0090] The process of determining the second layout evaluation value corresponding to the basic operation module according to the third orientation information of each of the multiple circuit units can refer to the aforementioned description of determining the first layout evaluation value corresponding to the basic operation module according to the second orientation information of each of the multiple circuit units, and will not be repeated here.
[0091] When the second layout evaluation value corresponding to the basic operation module is determined, the electronic device can compare the second layout evaluation value with a preset evaluation threshold to determine whether the degree of optimization of the layout compactness of the circuit units in the basic operation module has reached the expected optimization target. If the second layout evaluation value is less than the preset evaluation threshold, the electronic device can determine that the expected optimization target has been reached, and the electronic device can then perform layout processing on the multiple circuit units based on the third position information of each of the multiple circuit units to obtain layout information of the basic operation module.
[0092] In the case of comparing the size relationship between the first layout evaluation value and the preset evaluation threshold and the preset reference evaluation value, the electronic device can determine a strategy for optimizing the layout of the circuit units in the basic operation module. For example, in the case that the first layout evaluation value is greater than or equal to the preset evaluation threshold, and the first layout evaluation value is less than the preset reference evaluation value, the electronic device can determine that it is necessary to continue adjusting the second orientation information of the circuit unit to optimize the layout of the basic operation module until the second layout evaluation value after the second orientation information is adjusted is less than the preset evaluation threshold. In the case that the electronic device can determine the strategy for optimizing the layout of the basic operation module based on the size relationship between the first layout evaluation value and the preset evaluation threshold and the preset reference evaluation value, it is beneficial to improve the convenience and flexibility of optimizing the layout of the circuit units in the basic operation module, and further help to improve the rationality of the layout of the circuit units in the basic operation module, thereby improving the layout effect of the circuit units in the basic operation module.
[0093] In some embodiments, when the first layout evaluation value is greater than or equal to a preset evaluation threshold, and the first layout evaluation value is greater than or equal to a preset reference evaluation value, the differential solution acceptance probability corresponding to the basic operation module is determined based on the difference between the first layout evaluation value and the preset reference evaluation value; based on the differential solution acceptance probability, one of the first orientation information and the second orientation information of at least one circuit unit is adjusted to obtain fourth orientation information of each of the multiple circuit units; based on the fourth orientation information of each of the multiple circuit units, the third layout evaluation value corresponding to the basic operation module is determined; when the third layout evaluation value is less than the preset evaluation threshold, the multiple circuit units are layout processed based on the fourth orientation information of each of the multiple circuit units to obtain layout information of the basic operation module.
[0094] For example, when the first layout evaluation value is greater than or equal to a preset evaluation threshold, and the first layout evaluation value is greater than or equal to a preset reference evaluation value, the electronic device can determine that the layout compactness of the circuit unit in the basic operation module has not been optimized compared to before adjusting the first orientation information of the circuit unit, and the degree of optimization of the layout compactness of the circuit unit in the basic operation module has not reached the expected optimization target, and it is necessary to continue to improve the layout rationality of the circuit unit in the basic operation module.
[0095] Based on this, the electronic device can determine that the second orientation information of each of the multiple circuit units in the basic operation module is a differential solution during the layout optimization process of the basic operation module. Accordingly, the electronic device can accept the differential solution and continue to optimize the layout of the basic operation module based on the differential solution. The electronic device can also reject the differential solution and continue to optimize the layout of the basic operation module based on the first orientation information of each of the multiple circuit units.
[0096] The electronic device can determine the acceptance probability of the differential solution corresponding to the basic operation module to determine whether to accept the differential solution, and then determine the subsequent measures for layout optimization of the circuit units in the basic operation module, such as determining the orientation adjustment strategy of the circuit units.
[0097] For example, the electronic device may determine the probability of acceptance of the differential solution corresponding to the basic operation module based on the difference between the first layout evaluation value and the preset reference evaluation value. The smaller the difference between the first layout evaluation value and the preset reference evaluation value, the greater the likelihood that the electronic device will accept the differential solution, and the greater the probability of acceptance of the differential solution corresponding to the basic operation module. Correspondingly, the larger the difference between the first layout evaluation value and the preset reference evaluation value, the less likely the electronic device will accept the differential solution, and the smaller the probability of acceptance of the differential solution corresponding to the basic operation module.
[0098] When determining the differential solution acceptance probability corresponding to the basic operation module, the electronic device can determine an orientation adjustment strategy for at least one circuit unit based on the differential solution acceptance probability. For example, when the electronic device determines to accept the differential solution based on the differential solution acceptance probability, the electronic device can adjust the second orientation information of each of the at least one circuit unit to obtain fourth orientation information of each of the multiple circuit units. For another example, when the electronic device determines not to accept the differential solution based on the differential solution acceptance probability, the electronic device can adjust the first orientation information of each of the at least one circuit unit to obtain fourth orientation information of each of the multiple circuit units.
[0099] In some embodiments, when adjusting the first orientation information of at least one circuit unit based on the differential solution acceptance probability, the first positions of at least two circuit units located within a third preset position range corresponding to the basic operation module can be swapped to obtain fourth orientation information of each circuit unit. Of course, this is not limiting. The electronic device can also adjust the first orientation of at least one circuit unit to obtain fourth orientation information of each circuit unit.
[0100] During the process of adjusting the second orientation information of at least one circuit unit based on the differential solution acceptance probability, the second positions of at least two circuit units within the third preset position range corresponding to the basic operation module can be swapped to obtain fourth orientation information of each circuit unit. Of course, this is not limited to this. The electronic device can also adjust the second orientation of at least one circuit unit to obtain fourth orientation information of each circuit unit. The third preset position range can be obtained by traversing the basic operation modules in a top-to-bottom order using the first preset position range as a window.
[0101] For example, the electronic device can adopt a sliding window optimization strategy, with the first preset position range corresponding to the basic operation module as the window and the basic operation module as a whole as the sliding window range, and control the first preset position range to traverse the basic operation module in order from top to bottom, so that the third position range corresponding to the basic operation module can be obtained.
[0102] The height range corresponding to the third preset position range may be different from the height ranges corresponding to the first preset position range and the second preset position range. The third preset position range may not overlap with the first preset position range or the second preset position range, or may partially overlap with at least one of the first preset position range and the second preset position range, without limitation herein.
[0103] When the fourth orientation information of each of the multiple circuit units is determined, the electronic device can determine a third layout evaluation value corresponding to the basic operation module based on the fourth orientation information of each of the multiple circuit units. The process of determining the third layout evaluation value corresponding to the basic operation module based on the fourth orientation information of each of the multiple circuit units can refer to the aforementioned description of determining the first layout evaluation value corresponding to the basic operation module based on the second orientation information of each of the multiple circuit units, and / or the aforementioned description of determining the second layout evaluation value corresponding to the basic operation module based on the third orientation information of each of the multiple circuit units, and will not be repeated here.
[0104] When the third layout evaluation value corresponding to the basic operation module is determined, the electronic device may compare the third layout evaluation value with a preset evaluation threshold to determine whether the degree of optimization of the layout compactness of the circuit units in the basic operation module has reached the expected optimization target. If the third layout evaluation value is less than the preset evaluation threshold, the electronic device may determine that the layout compactness of the circuit units in the basic operation module has reached the expected optimization target, and the electronic device may then perform layout processing on the multiple circuit units based on their respective fourth orientation information to obtain layout information for the basic operation module.
[0105] When the first layout evaluation value is greater than or equal to the preset evaluation threshold, and the first layout evaluation value is greater than or equal to the preset reference evaluation value, the electronic device determines the differential solution acceptance probability corresponding to the basic operation module, and determines the orientation adjustment strategy for the circuit unit based on the differential solution acceptance probability, so as to facilitate the subsequent layout optimization of the circuit units in the basic operation module. This is conducive to improving the convenience and flexibility of the layout optimization of the circuit units in the basic operation module, and further conducive to improving the layout rationality of the circuit units in the basic operation module, thereby improving the layout effect of the circuit units in the basic operation module.
[0106] In some embodiments, when the differential solution acceptance probability is greater than or equal to a preset probability threshold, the second orientation information of each of at least one circuit unit is adjusted to obtain the fourth orientation information of each of the multiple circuit units; when the differential solution acceptance probability is less than the preset probability threshold, the first orientation information of each of the at least one circuit unit is adjusted to obtain the fourth orientation information of each of the multiple circuit units.
[0107] Exemplarily, the preset probability threshold may be pre-set. For example, the preset probability threshold may be randomly selected from 0 to 1, and the preset probability threshold is less than 1. The preset probability threshold may be changeable. For example, the electronic device may reselect the preset probability threshold each time it determines the differential solution acceptance probability corresponding to the basic operation module, without limitation herein.
[0108] For example, when the probability of accepting the differential solution is greater than or equal to a preset probability threshold, the electronic device can determine to accept the differential solution, and then the electronic device can adjust the second orientation information of at least one circuit unit to obtain the fourth orientation information of multiple circuit units.
[0109] For example, when the probability of accepting the differential solution is less than a preset probability threshold, the electronic device can determine not to accept the differential solution, and the electronic device can adjust the first orientation information of at least one circuit unit to obtain fourth orientation information of multiple circuit units.
[0110] The fourth position information of each of the plurality of circuit units can be used by the electronic device to improve the rationality of the layout of the circuit units in the basic operation module.
[0111] In some embodiments, as Figure 4 As shown, the process involved in the layout method of the basic operation module includes steps S201 to S205.
[0112] S201: Obtain first position information of each of a plurality of circuit units in a basic operation module.
[0113] For example, upon obtaining first position information of each of the multiple circuit units in the basic operation module, the electronic device can determine the positional relationship of each of the multiple circuit units in the basic operation module. For example, the electronic device can use a sequence pair mapping algorithm to determine two sequence pairs corresponding to the basic operation module.
[0114] S202: Adjust the first position information of at least one circuit unit to obtain the second position information of multiple circuit units.
[0115] The electronic device can adjust the first position information of each of at least one circuit unit, such as at least one of the first direction and the first position, to obtain the second position information of each of the plurality of circuit units.
[0116] For example, when an electronic device adjusts the first position of at least one circuit unit, it can combine the two sequence pairs corresponding to the basic operation module to determine at least two circuit units located within the first preset position range corresponding to the basic operation module, and exchange the first positions of the at least two circuit units located within the first preset position range corresponding to the basic operation module to determine the second orientation information of each of the multiple circuit units.
[0117] S203: Determine the predicted design parameters of the basic operation module according to the second position information of each of the plurality of circuit units.
[0118] The electronic device can determine predicted design parameters of the basic operation module based on the second position information of each of the multiple circuit units, such as at least one of an ideal line length and a predicted layout area of the basic operation module. The predicted design parameters of the basic operation module can be used to evaluate the layout compactness of the circuit units in the basic operation module, and further evaluate the rationality of the layout of the circuit units in the basic operation module.
[0119] S204 : Based on a preset layout evaluation function and according to the predicted design parameters, determine a first layout evaluation value corresponding to the basic operation module.
[0120] For example, after determining the predicted design parameters of the basic operation module based on the second orientation information of each of the multiple circuit units, the predicted design parameters can be substituted into the preset layout evaluation function to obtain a first layout evaluation value corresponding to the basic operation module. The first layout evaluation value can be used to evaluate the layout compactness of the circuit units in the basic operation module. The smaller the first layout evaluation value, the higher the layout compactness of the circuit units in the basic operation module. In an exemplary embodiment, the layout evaluation function can be simply referred to as function sol, and the function sol can be expressed as sol = f(hpwl, area), where hpwl is used to indicate the ideal line length of the basic operation module, and area is used to indicate the predicted layout area of the basic operation module. Of course, the layout evaluation function is not limited to this and is not limited here.
[0121] S205 , determining whether the first layout evaluation value is less than a preset evaluation threshold; if so, jump to S206 ; if not, jump to S202 .
[0122] The preset evaluation threshold can be used to indicate an expected optimization target when performing layout optimization on the circuit units in the basic operation module. By comparing the first layout evaluation value and the preset evaluation threshold, it can be determined whether the optimization level of the layout optimization on the circuit units in the basic operation module has reached the expected optimization target.
[0123] S206 , performing layout processing on the multiple circuit units according to the respective second orientation information of the multiple circuit units to obtain layout information of the basic operation module.
[0124] When the first layout evaluation value is less than the preset evaluation threshold, the electronic device can determine that the degree of optimization when performing layout optimization on the circuit units in the basic operation module has reached the expected optimization target, and there is no need to continue to perform layout optimization on the circuit units in the basic operation module. Then, layout processing can be performed on the multiple circuit units based on the second orientation information of each of the multiple circuit units to obtain the layout information of the basic operation module.
[0125] When the first layout evaluation value is greater than or equal to the preset evaluation threshold, the electronic device can determine that the optimization degree of the layout optimization of the circuit unit in the basic operation module has not reached the expected optimization target, and it is necessary to continue to optimize the layout of the circuit unit in the basic operation module, and then return to step S202 to continue the next layout optimization of the basic operation module.
[0126] At this time, for step S202, the electronic device may continue to adjust one of the first orientation information and the second orientation information of at least one circuit unit.
[0127] For example, if the first layout evaluation value is greater than or equal to a preset evaluation threshold and is less than a preset reference evaluation value, the second orientation information of at least one circuit unit can be adjusted to obtain third orientation information of multiple circuit units. In this case, the third orientation information of the multiple circuit units will replace the second orientation information of the multiple circuit units involved in steps S203 to S206 to determine the second layout evaluation value corresponding to the basic operation module. The second layout evaluation value will replace the first layout evaluation value corresponding to the basic operation module involved in steps S203 to S206 to provide layout information for subsequent basic operation modules.
[0128] For another example, when the first layout evaluation value is greater than or equal to the preset evaluation threshold, and the first layout evaluation value is greater than or equal to the preset reference evaluation value, the electronic device can determine the differential solution acceptance probability corresponding to the basic operation module, and based on the differential solution acceptance probability, select one of the first orientation information and the second orientation information of at least one circuit unit to adjust, and obtain the fourth orientation information of each of the multiple circuit units. At this time, the fourth orientation information of each of the multiple circuit units will replace the second orientation information of each of the multiple circuit units involved in steps S203 to S206 to determine the third layout evaluation value corresponding to the basic operation module, and then determine the layout information of the basic operation module. The third layout evaluation value will replace the first layout evaluation value corresponding to the basic operation module involved in steps S203 to S206 to provide layout information for subsequent basic operation modules. And so on.
[0129] Accordingly, each time the electronic device completes step S202 to step S205 , it is equivalent to completing an iterative optimization of the layout compactness of the circuit units in the basic operation module.
[0130] During the iterative optimization of the layout compactness of the circuit units in the basic operation module, the electronic device may also count the number of iterative optimizations. Accordingly, upon determining in step S205 that the first layout evaluation value is greater than or equal to a preset evaluation threshold, the electronic device may further determine that the number of iterative optimizations performed on the basic operation module has reached the iteration threshold. If the iteration threshold has been reached, the electronic device may cease iterative optimization of the basic operation module. Accordingly, if the iteration threshold has not been reached, the electronic device may return to step S202 to continue iterative optimization of the basic operation module. Accordingly, when the electronic device ceases iterative optimization of the basic operation module based on the number of iterative optimizations performed on the basic operation module reaching the iteration threshold, the electronic device may select the orientation information of the circuit unit corresponding to the minimum layout evaluation value from the layout evaluation values corresponding to each iteration, perform layout processing on the multiple circuit units, and obtain layout information for the basic operation module. Of course, this is not limited to this. The electronic device may also generate an iterative change curve corresponding to the predicted design parameters corresponding to each iteration, allowing the user to intuitively view the iterative optimization process of the basic operation module.
[0131] In an exemplary embodiment, the electronic device applies a simulated annealing algorithm during the iterative optimization of the layout compactness of the circuit units in the basic operation module.
[0132] For example, an electronic device may adjust one of the first orientation information and the second orientation information of at least one circuit unit based on a simulated annealing algorithm, calculate predicted design parameters of a basic operation module, and determine a layout evaluation value corresponding to each iteration of the basic operation module optimization. Accordingly, the electronic device may determine an annealing temperature involved in the simulated annealing algorithm based on the number of iterations of the basic operation module optimization. The electronic device may determine the differential solution acceptance probability associated with the basic operation module based on the annealing temperature. For example, an initial temperature may be set during the iterative optimization of the basic operation module. As the number of iterations of the layout compactness optimization of the circuit units in the basic operation module increases, the annealing temperature may gradually decrease from the initial temperature. The electronic device may determine the differential solution acceptance probability associated with the basic operation module based on the annealing temperature. For example, the lower the annealing temperature, the lower the differential solution acceptance probability. The higher the annealing temperature, the higher the differential solution acceptance probability. Accordingly, the electronic device may also determine the differential solution acceptance probability associated with the basic operation module based on the annealing temperature and the difference between the layout evaluation value and a preset reference difference value. The layout evaluation value may include a layout evaluation value determined each time the basic operation module is iteratively optimized, such as a first layout evaluation value, a second layout evaluation value, a third layout evaluation value, or the like.
[0133] During the iterative optimization of the basic operation module, a threshold number of iterations may be set. When the number of iterative optimizations of the basic operation module reaches the threshold number of iterations, and if the layout evaluation value corresponding to the basic operation module is still greater than or equal to the preset evaluation threshold, the electronic device may terminate the iterative optimization of the basic operation module. Of course, this is not limited to this; the electronic device may also terminate the iterative optimization of the basic operation module in response to a user instruction, which is not a limitation here.
[0134] Accordingly, the electronic device can record the layout evaluation value corresponding to the basic operation module after each iterative optimization of the basic operation module. When the electronic device terminates the iterative optimization of the basic operation module, the electronic device can select the position information of the multiple circuit units in the basic operation module corresponding to the layout evaluation value with the highest score from the multiple layout evaluation values corresponding to the basic operation module to determine the layout information of the basic operation module.
[0135] The layout method of the basic operation module provided in the above embodiment obtains the first orientation information of each of the multiple circuit units in the basic operation module; adjusts the first orientation information of each of at least one circuit unit to obtain the second orientation information of each of the multiple circuit units; determines the first layout evaluation value corresponding to the basic operation module based on the second orientation information of each of the multiple circuit units; when the first layout evaluation value is greater than a preset evaluation threshold, the multiple circuit units are layout-processed based on the second orientation information of each of the multiple circuit units to obtain the layout information of the basic operation module.
[0136] When adjusting the first orientation information of at least one circuit unit in a basic operation module to obtain the second orientation information of each of the multiple circuit units, and determining the first layout evaluation value corresponding to the basic operation module based on the second orientation information, the first layout evaluation value can be used to evaluate the layout compactness of the multiple circuit units in the basic operation module. The smaller the first layout evaluation value, the more compact the layout of the multiple circuit units in the basic operation module, and the higher the layout rationality of the multiple circuit units in the basic operation module. Based on this, when the first layout evaluation value is less than a preset evaluation threshold, the multiple circuit units are layout processed based on the second orientation information of each of the multiple circuit units to obtain the layout information of the basic operation module, which is conducive to improving the layout compactness of the circuit units in the basic operation module, thereby achieving layout optimization of the circuit units in the basic operation module and improving the layout rationality of the circuit units in the basic operation module. Accordingly, when the layout compactness and layout rationality of the circuit units in the basic operation module are improved, it is conducive to improving the layout effect of the circuit units in the basic operation module.
[0137] The present application also provides a schematic block diagram of a basic operation module layout device, which can be configured in a server or electronic device to execute the basic operation module layout method described above.
[0138] The layout device of the basic operation module includes: an orientation information acquisition module, an orientation information adjustment module, an evaluation module and a layout information determination module.
[0139] The orientation information acquisition module is used to acquire first orientation information of each of the multiple circuit units in the basic operation module.
[0140] The orientation information adjustment module is used to adjust the first orientation information of at least one of the circuit units to obtain the second orientation information of multiple circuit units.
[0141] An evaluation module is used to determine a first layout evaluation value corresponding to the basic operation module according to the second orientation information of each of the plurality of circuit units.
[0142] The layout information determination module is used to perform layout processing on the multiple circuit units according to the second orientation information of each of the multiple circuit units when the first layout evaluation value is less than a preset evaluation threshold, so as to obtain layout information of the basic operation module.
[0143] It should be noted that those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and modules and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0144] The method of the present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld devices or portable devices, tablet devices, multi-processor systems, microprocessor-based systems, set-top boxes, programmable consumer electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media, including storage devices.
[0145] Exemplarily, the above-mentioned method and apparatus may be implemented in the form of a computer program, which may be run on an electronic device.
[0146] See also Figure 5 , Figure 5 1 is a schematic block diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device may be a server or an electronic device.
[0147] like Figure 5 As shown, the electronic device includes a processor, a memory, and a network interface connected via a system bus, wherein the memory may include a storage medium and an internal memory.
[0148] The storage medium can store an operating system and a computer program. The computer program includes program instructions, and when the program instructions are executed, the processor can execute the steps of any one of the basic operation module layout methods.
[0149] The processor is used to provide computing and control capabilities to support the operation of the entire electronic device.
[0150] The internal memory provides an environment for the operation of the computer program in the storage medium. When the computer program is executed by the processor, the processor can execute the steps of the layout method of any basic operation module.
[0151] This network interface is used for network communication, such as sending assigned tasks.
[0152] Those skilled in the art will understand that Figure 5 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the electronic device to which the solution of the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0153] It should be understood that the processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc.
[0154] In one embodiment, the processor is configured to execute a computer program and implement the following steps when executing the computer program:
[0155] Acquire first position information of each of the plurality of circuit units in the basic operation module;
[0156] Adjusting the first position information of at least one of the circuit units to obtain the second position information of the plurality of circuit units;
[0157] determining a first layout evaluation value corresponding to the basic operation module according to the second position information of each of the plurality of circuit units;
[0158] When the first layout evaluation value is less than a preset evaluation threshold, layout processing is performed on the plurality of circuit units according to the second orientation information of each of the plurality of circuit units to obtain layout information of the basic operation module.
[0159] It should be noted that those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the layout of the basic operation module described above can refer to the corresponding process in the aforementioned basic operation module layout method embodiment, and will not be repeated here.
[0160] An embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. The method implemented when the computer program is executed by a processor can refer to the various embodiments of the layout method of the basic operation module of the present application.
[0161] The computer-readable storage medium may be an internal storage unit of the electronic device described in the aforementioned embodiment, such as a hard disk or memory of the electronic device. The computer-readable storage medium may also be an external storage device of the electronic device, such as a plug-in hard disk, a smart memory card (SMC), a secure digital (SD) card, a flash memory card, etc. equipped on the electronic device.
[0162] It should be understood that the terms used in this specification are only for the purpose of describing specific embodiments and are not intended to limit the present application. As used in this specification and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms unless the context clearly indicates otherwise.
[0163] It should also be understood that the term "and / or" used in this specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, including these combinations. It should be noted that, in this article, the terms "include", "comprise" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system that includes a series of elements includes not only those elements, but also other elements that are not explicitly listed, or also includes elements that are inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "including a..." does not exclude the presence of other identical elements in the process, method, article or system that includes the element.
[0164] The serial numbers of the embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments. The above description is only a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
Claims
1. A layout method for a basic operation module, characterized in that: include: Acquire first position information of each of the plurality of circuit units in the basic operation module; Adjusting the first position information of at least one of the circuit units to obtain the second position information of the plurality of circuit units; determining a first layout evaluation value corresponding to the basic operation module according to the second position information of each of the plurality of circuit units; When the first layout evaluation value is less than a preset evaluation threshold, layout processing is performed on the plurality of circuit units according to the second orientation information of each of the plurality of circuit units to obtain layout information of the basic operation module.
2. The layout method according to claim 1, wherein: The first position information includes a first location; The adjusting the first position information of at least one circuit unit to obtain the second position information of the plurality of circuit units includes: The first positions of at least two circuit units located within a first preset position range corresponding to the basic operation module are exchanged to obtain second position information of each circuit unit.
3. The layout method according to claim 1, wherein: The first position information includes a first direction; The adjusting the first position information of at least one circuit unit to obtain the second position information of a plurality of circuit units includes: The first direction of at least one circuit unit is adjusted to obtain second orientation information of each circuit unit.
4. The layout method according to claim 1, wherein: The determining, based on the second position information of each of the plurality of circuit units, a first layout evaluation value corresponding to the basic operation module includes: determining predicted design parameters of the basic operation module according to the second position information of each of the plurality of circuit units; Based on a preset layout evaluation function and according to the predicted design parameters, a first layout evaluation value corresponding to the basic operation module is determined.
5. The layout method according to claim 4, characterized in that: The predicted design parameters include at least one of an ideal line length and a predicted layout area of the basic operation module; The step of determining the predicted design parameters of the basic operation module according to the second position information of each of the plurality of circuit units includes: Based on a preset line length estimation algorithm, determining the ideal line length of the basic operation module according to the second position information of each of the plurality of circuit units; Determining the maximum value of the outline size corresponding to the basic operation module according to the second position information of each of the plurality of circuit units; The predicted layout area of the basic operation module is determined according to the maximum value of the outline size corresponding to the basic operation module.
6. The layout method according to any one of claims 1 to 5, characterized in that: Also includes: When the first layout evaluation value is greater than or equal to a preset evaluation threshold and the first layout evaluation value is less than a preset reference evaluation value, adjusting the second orientation information of at least one circuit unit to obtain third orientation information of a plurality of circuit units; determining a second layout evaluation value corresponding to the basic operation module according to the third position information of each of the plurality of circuit units; When the second layout evaluation value is less than a preset evaluation threshold, layout processing is performed on the plurality of circuit units according to the respective third position information of the plurality of circuit units to obtain layout information of the basic operation module.
7. The layout method according to any one of claims 1 to 5, characterized in that: Also includes: When the first layout evaluation value is greater than or equal to a preset evaluation threshold, and the first layout evaluation value is greater than or equal to a preset reference evaluation value, determining a differential solution acceptance probability corresponding to the basic operation module according to a difference between the first layout evaluation value and the preset reference evaluation value; adjusting one of the first orientation information and the second orientation information of at least one of the circuit units according to the differential solution acceptance probability to obtain fourth orientation information of the plurality of circuit units; determining a third layout evaluation value corresponding to the basic operation module according to the fourth position information of each of the plurality of circuit units; When the third layout evaluation value is less than a preset evaluation threshold, layout processing is performed on the plurality of circuit units according to the respective fourth orientation information of the plurality of circuit units to obtain layout information of the basic operation module.
8. The layout method according to claim 7, wherein: The adjusting, based on the differential solution acceptance probability, one of the first orientation information and the second orientation information of at least one of the circuit units to obtain fourth orientation information of the plurality of circuit units includes: When the acceptance probability of the differential solution is greater than or equal to a preset probability threshold, adjusting the second position information of at least one of the circuit units to obtain fourth position information of the plurality of circuit units; When the differential solution acceptance probability is less than a preset probability threshold, the first orientation information of at least one of the circuit units is adjusted to obtain fourth orientation information of a plurality of the circuit units.
9. An electronic device, characterized in that: The electronic device includes a memory and a processor; The memory is used to store computer programs; The processor is configured to execute the computer program and implement the steps of the basic operation module layout method according to any one of claims 1 to 8 when executing the computer program.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the basic operation module layout method according to any one of claims 1 to 8 are implemented.