Electrical component module layout and routing method based on improved variable neighborhood search algorithm

By adopting an improved variable neighborhood search algorithm and actor-commentator model in the layout and wiring of electrical component modules, the problem of difficult to balance layout utilization rate and wiring success rate in traditional heuristic algorithms, cold start and evaluation time-consuming, realizing More efficient layout and routing optimization.

CN117371384BActive Publication Date: 2025-02-14GUANGDONG UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311514553.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-14
Publication Date
2025-02-14
Estimated Expiration
2043-11-14

AI Technical Summary

Technical Problem

Traditional heuristic algorithms have problems in the layout and wiring of electrical component modules that are difficult to balance layout utilization and wiring success rate, cold start and time-consuming evaluation.

Method used

Using the layout and wiring method of the electrical component module based on the improved variable neighborhood search algorithm, the electrical component module data is trained by constructing the actor-commentator (A2C) model, and the initial solution is generated, and the improved variable neighborhood search algorithm is used for iteration. Optimize, the optimal solution for the final output layout and routing.

Benefits of technology

Effectively improve the cold start problem in traditional heuristic algorithms, improve the initial solution quality of layout and routing, and reduce the number of calls of evaluation functions, reduce the iteration time of the algorithm, improve the balance of layout utilization and routing success rate sex.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117371384B_ABST
    Figure CN117371384B_ABST
Patent Text Reader

Abstract

The present invention discloses an electric component module layout and routing method based on an improved variable neighborhood search algorithm, comprising the following steps: inputting an electric component module data file and reading information of the electric component module data file; constructing an actor-commentator (A2C) model, using information of the electric component module data file to train the A2C model, and obtaining a trained A2C model; using the trained A2C model to construct an initial solution for the layout and routing of the electric component module; using an improved variable neighborhood search algorithm to iterate the initial solution for the layout and routing of the electric component module, and obtaining an optimal solution for the layout and routing of the electric component module; based on the optimal solution for the layout and routing of the electric component module, outputting a result file. The present invention solves the problem that when using a traditional heuristic algorithm to solve the layout and routing problem of the electric component module, there is still a problem of difficulty in balancing the layout utilization rate and the wiring success rate, cold start and time-consuming evaluation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of electronic component layout and wiring, in particular to an electronic component module layout and wiring method based on an improved variable neighborhood search algorithm. Background Art

[0002] In the process of analog integrated circuit design, it is necessary to layout and route the electrical component modules in the integrated circuit. In the layout and routing, the following situations are often encountered: some electrical component modules have been placed in a part of the analog integrated circuit design area, and some other electrical component modules need to be placed in the remaining area so that these modules can be successfully placed in the limited area and meet the wiring requirements of these modules. In view of the above situation, the traditional heuristic algorithm is used to solve the layout and routing problems of the above electrical component modules, which can ensure the rationality of the layout, but the traditional heuristic algorithm still has the problem of difficult balance between layout utilization and wiring success rate, cold start and time-consuming evaluation. Summary of the invention

[0003] In view of the above-mentioned defects, the present invention proposes an electrical component module layout and routing method based on an improved variable neighborhood search algorithm, with the aim of solving the problems of electrical component module layout and routing using traditional heuristic algorithms, such as the difficulty in balancing layout utilization and routing success rate, and the time-consuming cold start and evaluation.

[0004] To achieve this object, the present invention adopts the following technical solutions:

[0005] The method for placing and routing an electrical component module based on an improved variable neighborhood search algorithm comprises the following steps:

[0006] Step S1: inputting an electrical component module data file and reading information of the electrical component module data file, wherein the information of the electrical component module data file includes module information, boundary information and connection information;

[0007] Step S2: constructing an actor-critic (A2C) model, and training the A2C model using information from the electrical component module data file to obtain a trained A2C model;

[0008] Step S3: constructing an initial solution for the layout and routing of the electrical component module using the trained A2C model;

[0009] Step S4: using an improved variable neighborhood search algorithm to iterate the initial solution of the electrical component module layout and routing to obtain the optimal solution of the electrical component module layout and routing;

[0010] Step S5: Output the result file based on the optimal solution of the layout and routing of the electrical component module.

[0011] Preferably, in step S2, the A2C model includes an actor network and a critic network;

[0012] Let the network parameters of the actor network be θ and the network parameters of the critic network be ω, then the gradient formula of the network parameters θ of the actor network is as follows:

[0013]

[0014] Where N represents the total number of sample instances; R n Represents the reward value obtained by the nth sample instance; Represents the state set of all inputs of the nth sample instance; represents the output of the actor network; represents the gradient operator of θ; Represents the state set of all inputs in the nth sample instance In the case of n probability;

[0015] The gradient formula of the commentator network with the network parameter ω is as follows:

[0016]

[0017] in, represents the gradient operator of ω.

[0018] Preferably, step S3 specifically includes the following sub-steps:

[0019] Step S31: inputting the electrical component module that needs layout and routing into the trained A2C model to obtain the electrical component module layout and routing sequence;

[0020] Step S32: using an improved skyline heuristic algorithm to decode the layout and routing sequence of the electrical component module to obtain an optimal layout and routing sequence of the electrical component module, that is, an initial solution for the layout and routing of the electrical component module.

[0021] Preferably, in step S32, the following sub-steps are specifically included:

[0022] Step S321: constructing an initial skyline using a ray method based on boundary information;

[0023] Step S322: placing the electrical component module in the electrical component module placement and routing sequence in the lower left space above the initial skyline;

[0024] Step S323: Determine whether the lower left space can be used to place an electric component module. If so, determine whether there is an L-shaped or T-shaped electric component module without wasted space in the lower left space. If so, fill the L-shaped or T-shaped electric component module into the lower left space and update the skyline. If not, score all rectangular electric component modules in the lower left space according to the scoring strategy, select the rectangular electric component module with the highest score to fill into the lower left space, and update the skyline.

[0025] If it cannot be placed, select the minimum height between the height of the left wall and the height of the right wall in the space above the initial skyline to fill it into the lower left space, and update the skyline;

[0026] Step S324: looping steps S322-S323 until the electrical component modules in the electrical component module layout and routing sequence are completely placed, and an initial solution for the electrical component module layout and routing is obtained.

[0027] Preferably, in step S4, the following steps are also included:

[0028] A graph convolutional neural network (GCN) model is established, and the initial solution of the electrical component module layout and routing is input into the GCN model to predict the layout and routing score.

[0029] Preferably, in step S4, the following sub-steps are specifically included:

[0030] Step S41: using the variable domain descent method (VND) to reorder the optimal layout and wiring sequence of the electrical component module to obtain a new sequence;

[0031] Step S42: determine whether the new sequence is in the taboo list, if so, execute step S41, if not, add the new sequence to the taboo list;

[0032] Step S43: Determine whether the new sequence in the taboo table reaches the taboo length. If not, call the evaluation function to evaluate the new sequence. If so, build a binary classification model and a training set, use the training set to train the binary classification model, obtain the trained binary classification model, and use the trained binary classification model to predict whether the new sequence is better than the old sequence. If so, call the evaluation function to evaluate the new sequence. If not, execute step S41.

[0033] Step S44: Determine whether the new sequence is better than the old sequence. If so, update the optimal layout and wiring sequence of the electrical component module; if not, add the wrongly predicted data to the training set, use the training set to retrain the binary classification model, and execute step S41.

[0034] The technical solution provided by the embodiments of the present application may have the following beneficial effects:

[0035] In this solution, the A2C model after training is used to construct the initial solution of the layout and routing of the electrical component module. The A2C algorithm can effectively improve the cold start problem existing in the traditional heuristic algorithm. At the same time, the initial solution of the layout and routing of the electrical component module takes into account the connection between the module layout and routing to a certain extent. This solution uses an improved variable neighborhood search algorithm to reduce the number of calls to the evaluation function and effectively solve the problem of time-consuming evaluation in the traditional heuristic algorithm. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 The invention is a flowchart of the steps of the method for layout and routing of electrical component modules based on the improved variable neighborhood search algorithm. DETAILED DESCRIPTION

[0037] The embodiments of the present invention are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals represent the same or similar elements or elements having the same or similar functions from beginning to end. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.

[0038] The method for placing and routing an electrical component module based on an improved variable neighborhood search algorithm comprises the following steps:

[0039] Step S1: inputting an electrical component module data file and reading information of the electrical component module data file, wherein the information of the electrical component module data file includes module information, boundary information and connection information;

[0040] Step S2: constructing an actor-critic (A2C) model, and training the A2C model using information from the electrical component module data file to obtain a trained A2C model;

[0041] Step S3: constructing an initial solution for the layout and routing of the electrical component module using the trained A2C model;

[0042] Step S4: using an improved variable neighborhood search algorithm to iterate the initial solution of the electrical component module layout and routing to obtain the optimal solution of the electrical component module layout and routing;

[0043] Step S5: Output the result file based on the optimal solution of the layout and routing of the electrical component module.

[0044] The electrical component module layout and routing method based on the improved variable neighborhood search algorithm of this solution is as follows: Figure 1As shown, the first step is to input the electrical component module data file and read the information of the electrical component module data file, wherein the information of the electrical component module data file includes module information and connection information. In this embodiment, the module information refers to a number of polygonal modules of different shapes and sizes, and the polygonal modules include rectangular modules, L-shaped modules or T-shaped modules. Boundary information refers to the restricted area surrounded by the orthogonal polygons that have been placed. Connection information refers to the connection relationship between the ports of the modules. The second step is to build an actor-commentator (A2C) model, and use the information of the electrical component module data file to train the A2C model to obtain the trained A2C model. Specifically, the actor-commentator algorithm is a reinforcement learning method that combines policy gradient and temporal difference learning. With the help of the value function network, the actor-commentator algorithm can perform single-step parameter updates without waiting until the end of the round to update, which is more efficient than the round update of the pure policy gradient. The actor-commentator model is composed of an actor network and a commentator network. The actor network selects actions based on probability, and the commentator network evaluates the quality of the action based on the action selected by the actor network. The actor network then modifies the probability of selecting the action according to the evaluation of the commentator network. By training the A2C model using the information of the electrical component module data file, the prediction accuracy of the A2C model can be improved. The third step is to use the trained A2C model to construct the initial solution of the electrical component module layout and routing. In this embodiment, the use of the A2C algorithm can provide a good initial solution for the variable neighborhood search algorithm, effectively improving the cold start problem existing in the traditional heuristic algorithm. The fourth step is to use the improved variable neighborhood search algorithm to iterate the initial solution of the electrical component module layout and routing to obtain the optimal solution of the electrical component module layout and routing. In this embodiment, the variable neighborhood search algorithm is a heuristic algorithm based on local search. The core of this type of algorithm is to generate a new sequence through some techniques. If the new sequence is better than the optimal sequence currently searched, the current optimal sequence is replaced by the new sequence. When using the traditional variable neighborhood search algorithm, each time the new and old sequences are compared, the evaluation function needs to be called to evaluate the new sequence. Multiple calls to the evaluation function will greatly reduce the number of iterations and reduce the algorithm's search efficiency for the solution space. In this solution, based on the initial solution of the electrical component module layout and routing, the improved variable neighborhood search algorithm is used to iterate it, and the optimal solution of the electrical component module layout and routing can be quickly searched. The improved variable neighborhood search algorithm can reduce the number of calls to the evaluation function, speeding up the algorithm iteration speed while ensuring the quality of the solution. The fourth step is to output the result file based on the optimal solution of the layout and wiring of the electrical component module. In this embodiment, the output result file is a reasonable layout plan. The reasonable layout plan requires that the electrical component modules do not overlap and cannot exceed the limited area.

[0045] In this solution, the A2C model after training is used to construct the initial solution of the layout and routing of the electrical component module. The A2C algorithm can effectively improve the cold start problem existing in the traditional heuristic algorithm. At the same time, the initial solution of the layout and routing of the electrical component module takes into account the connection between the module layout and routing to a certain extent. This solution uses an improved variable neighborhood search algorithm to reduce the number of calls to the evaluation function and effectively solve the problem of time-consuming evaluation in the traditional heuristic algorithm.

[0046] Preferably, in step S2, the A2C model includes an actor network and a commentator network;

[0047] Let the network parameters of the actor network be θ and the network parameters of the critic network be ω, then the gradient formula of the network parameters θ of the actor network is as follows:

[0048]

[0049] Where N represents the total number of sample instances; R n Represents the reward value obtained by the nth sample instance; Represents the state set of all inputs of the nth sample instance; represents the output of the actor network; represents the gradient operator of θ; Represents the state set of all inputs in the nth sample instance In the case of n probability;

[0050] The gradient formula of the commentator network with the network parameter ω is as follows:

[0051]

[0052] in, represents the gradient operator of ω.

[0053] In this embodiment, in the gradient formula of the network parameter θ of the actor network and the gradient formula of the network parameter ω of the commentator network, R n The layout function decodes the sequence and passes it to the prediction model for prediction. is the advantage function, which means that If the result of the advantage function is positive, the probability of the action will be increased, otherwise it will be reduced. Further explanation: In the process of training the A2C model, the network parameters θ of the actor network and ω of the commentator network need to be initialized.

[0054] Preferably, in step S3, the following sub-steps are specifically included:

[0055] Step S31: inputting the electrical component module that needs layout and routing into the trained A2C model to obtain the electrical component module layout and routing sequence;

[0056] Step S32: using an improved skyline heuristic algorithm to decode the layout and routing sequence of the electrical component module to obtain an optimal layout and routing sequence of the electrical component module, that is, an initial solution for the layout and routing of the electrical component module.

[0057] In this embodiment, when the electrical component modules that need to be laid out and routed are input into the trained A2C model, the electrical component module layout and routing sequence can be obtained through the actor network of the trained A2C model. This solution adopts an improved skyline heuristic algorithm for layout. On the basis of the traditional skyline heuristic algorithm, an empirical routing score is introduced, which not only puts all electrical component modules into the boundary as much as possible, but also adds a certain safety distance for each electrical component module, so that the electrical component modules will not be close to each other, thereby improving the wiring success rate.

[0058] Preferably, in step S32, the following sub-steps are specifically included:

[0059] Step S321: constructing an initial skyline using a ray method based on boundary information;

[0060] Step S322: placing the electrical component module in the electrical component module placement and routing sequence in the lower left space above the initial skyline;

[0061] Step S323: Determine whether the lower left space can be used to place an electric component module. If so, determine whether there is an L-shaped or T-shaped electric component module without wasted space in the lower left space. If so, fill the L-shaped or T-shaped electric component module into the lower left space and update the skyline. If not, score all rectangular electric component modules in the lower left space according to the scoring strategy, select the rectangular electric component module with the highest score to fill into the lower left space, and update the skyline.

[0062] If it cannot be placed, select the minimum height between the height of the left wall and the height of the right wall in the space above the initial skyline to fill it into the lower left space, and update the skyline;

[0063] Step S324: looping steps S322-S323 until the electrical component modules in the electrical component module layout and routing sequence are completely placed, and an initial solution for the electrical component module layout and routing is obtained.

[0064] Specifically, due to the existence of L-shaped and T-shaped blocks and the special properties of the skyline heuristic algorithm, it is likely to cause waste during placement. Therefore, this solution adopts an improved skyline heuristic algorithm for layout. The improved skyline heuristic algorithm includes a scoring strategy. The scoring strategy of this embodiment takes into account the waste of space and introduces empirical wiring scoring, which can better adapt to L-shaped, T-shaped and rectangular electrical component modules. Further explanation: The skyline heuristic algorithm is a simple and fast packing method. It only maintains a list of horizontal segments, which are also called skyline segments. They are composed of line segments at the top of the entire packing area. A skyline segment can be determined by two objects: the left endpoint and the length of the segment. Above the skyline is the space, which can be regarded as a subset of the unpacked area. A space is defined by three objects: the height of the left wall, the height of the right wall and its corresponding skyline segment. Generally, the endpoint of the lowest or leftmost space is selected as the placement point.

[0065] Preferably, in step S4, the following steps are also included:

[0066] A graph convolutional neural network (GCN) model is established, and the initial solution of the electrical component module layout and routing is input into the GCN model to predict the layout and routing score.

[0067] In this embodiment, a graph convolutional neural network is used to quickly predict the score of the layout and routing of the electrical component module. It is further explained that a graph convolutional neural network is a convolutional neural network that can directly act on a graph and utilize its structural information. In this embodiment, a graph convolutional neural network model with two GCN layers, one pooling layer, and three linear layers can obtain the layout and routing score with the best prediction effect.

[0068] Preferably, in step S4, the following sub-steps are specifically included:

[0069] Step S41: using the variable domain descent method (VND) to reorder the optimal layout and wiring sequence of the electrical component module to obtain a new sequence;

[0070] Step S42: determine whether the new sequence is in the taboo list, if so, execute step S41, if not, add the new sequence to the taboo list;

[0071] Step S43: Determine whether the new sequence in the taboo table reaches the taboo length. If not, call the evaluation function to evaluate the new sequence. If so, build a binary classification model and a training set, use the training set to train the binary classification model, obtain the trained binary classification model, and use the trained binary classification model to predict whether the new sequence is better than the old sequence. If so, call the evaluation function to evaluate the new sequence. If not, execute step S41.

[0072] Step S44: Determine whether the new sequence is better than the old sequence. If so, update the optimal layout and wiring sequence of the electrical component module; if not, add the wrongly predicted data to the training set, use the training set to retrain the binary classification model, and execute step S41.

[0073] In this embodiment, when the binary classification model predicts that the new sequence is better than the old sequence, it is necessary to call the evaluation function for verification. If the verification result shows that the new sequence is indeed better than the old sequence, the sequence is replaced, otherwise the wrong data predicted this time is input into the binary classification model, and the binary classification model is retrained to improve its accuracy; if the binary classification model predicts that the new sequence is worse than the old sequence, the next neighborhood action is directly performed without calling the evaluation function for verification, which can effectively reduce the number of times the evaluation function is called.

[0074] To further explain, the taboo table stores sequence samples and their corresponding scores. When the training set is used to train the binary classification model, when the next new sequence is generated and it is better than the current optimal sequence, it can be spliced ​​with all the sequences in the current taboo table, and the obtained sequence samples are added to the training set and the binary classification model is retrained. Therefore, in the iterative process, better new sequences or wrongly predicted data are constantly generated, and the binary classification model is also constantly improving and learning.

[0075] In addition, each functional unit in each embodiment of the present invention may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.

[0076] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.

Claims

1. An electrical component module layout and routing method based on an improved variable neighborhood search algorithm, characterized in that: The following steps are involved: Step S1: inputting an electrical component module data file and reading information of the electrical component module data file, wherein the information of the electrical component module data file includes module information, boundary information and connection information; Step S2: constructing an actor-commentator A2C model, and training the A2C model using information from the electrical component module data file to obtain a trained A2C model; Step S3: constructing an initial solution for the layout and routing of the electrical component module using the trained A2C model; Step S4: using an improved variable neighborhood search algorithm to iterate the initial solution of the electrical component module layout and routing to obtain the optimal solution of the electrical component module layout and routing; Step S5: outputting a result file based on the optimal solution of the layout and wiring of the electrical component module; In step S4, the following sub-steps are specifically included: Step S41: using the variable domain descent method VND to reorder the optimal layout and wiring sequence of the electrical component module to obtain a new sequence; Step S42: determine whether the new sequence is in the taboo list, if so, execute step S41, if not, add the new sequence to the taboo list; Step S43: Determine whether the new sequence in the taboo table reaches the taboo length. If not, call the evaluation function to evaluate the new sequence. If so, build a binary classification model and a training set, use the training set to train the binary classification model, obtain the trained binary classification model, and use the trained binary classification model to predict whether the new sequence is better than the old sequence. If so, call the evaluation function to evaluate the new sequence. If not, execute step S41. Step S44: Determine whether the new sequence is better than the old sequence. If so, update the optimal layout and wiring sequence of the electrical component module; if not, add the wrongly predicted data to the training set, use the training set to retrain the binary classification model, and execute step S41.

2. The method for placing and routing electrical component modules based on an improved variable neighborhood search algorithm according to claim 1, characterized in that: In step S2, the A2C model includes an actor network and a critic network; Let the network parameters of the actor network be , the network parameters of the commentator network are , then the network parameters of the actor network are The gradient formula is as follows: ; Where N represents the total number of sample instances; Represents the reward value obtained by the nth sample instance; Represents the state set of all inputs of the nth sample instance; represents the output of the actor network; express The gradient operator of ; Represents the state set of all inputs in the nth sample instance In the case of probability; The network parameters of the commentator network are The gradient formula is as follows: ; in, express The gradient operator.

3. The method for placing and routing electrical component modules based on an improved variable neighborhood search algorithm according to claim 1, characterized in that: In step S3, the following sub-steps are specifically included: Step S31: inputting the electrical component module that needs layout and routing into the trained A2C model to obtain the electrical component module layout and routing sequence; Step S32: using an improved skyline heuristic algorithm to decode the layout and routing sequence of the electrical component module to obtain an optimal layout and routing sequence of the electrical component module, that is, an initial solution for the layout and routing of the electrical component module.

4. The method for placing and routing electrical component modules based on an improved variable neighborhood search algorithm according to claim 3, characterized in that: In step S32, the following sub-steps are specifically included: Step S321: constructing an initial skyline using a ray method based on boundary information; Step S322: placing the electrical component module in the electrical component module placement and routing sequence in the lower left space above the initial skyline; Step S323: Determine whether the lower left space can be used to place an electric component module. If so, determine whether there is an L-shaped or T-shaped electric component module without wasted space in the lower left space. If so, fill the L-shaped or T-shaped electric component module into the lower left space and update the skyline. If not, score all rectangular electric component modules in the lower left space according to the scoring strategy, select the rectangular electric component module with the highest score to fill into the lower left space, and update the skyline. If it cannot be placed, select the minimum height between the height of the left wall and the height of the right wall in the space above the initial skyline to fill it into the lower left space, and update the skyline; Step S324: looping steps S322-S323 until the electrical component modules in the electrical component module layout and routing sequence are completely placed, and an initial solution for the electrical component module layout and routing is obtained.

5. The method for placing and routing electrical component modules based on an improved variable neighborhood search algorithm according to claim 1, characterized in that: In step S4, the following steps are also included: A graph convolutional neural network (GCN) model is established, and the initial solution of the electrical component module layout and routing is input into the GCN model to predict the layout and routing score.

Citation Information

Patent Citations

  • Training method and device of path planning model and computer system

    CN111325401A

  • Integrated circuit layout optimization method based on reinforcement learning

    CN114896937A