CN114707460A - Optimal method for layout planning area based on neural network and sequence pair - Google Patents

Optimal method for layout planning area based on neural network and sequence pair Download PDF

Info

Publication number
CN114707460A
CN114707460A CN202210324355.0A CN202210324355A CN114707460A CN 114707460 A CN114707460 A CN 114707460A CN 202210324355 A CN202210324355 A CN 202210324355A CN 114707460 A CN114707460 A CN 114707460A
Authority
CN
China
Prior art keywords
array
arrays
splus
smin
sequence
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210324355.0A
Other languages
Chinese (zh)
Inventor
黄益豪
蔡述庭
邢延
熊晓明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong University of Technology
Original Assignee
Guangdong University of Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong University of Technology filed Critical Guangdong University of Technology
Priority to CN202210324355.0A priority Critical patent/CN114707460A/en
Publication of CN114707460A publication Critical patent/CN114707460A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/30Circuit design
    • G06F30/39Circuit design at the physical level
    • G06F30/392Floor-planning or layout, e.g. partitioning or placement
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2415Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on parametric or probabilistic models, e.g. based on likelihood ratio or false acceptance rate versus a false rejection rate
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • G06F30/27Design optimisation, verification or simulation using machine learning, e.g. artificial intelligence, neural networks, support vector machines [SVM] or training a model
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/047Probabilistic or stochastic networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/084Backpropagation, e.g. using gradient descent
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2111/00Details relating to CAD techniques
    • G06F2111/06Multi-objective optimisation, e.g. Pareto optimisation using simulated annealing [SA], ant colony algorithms or genetic algorithms [GA]

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Data Mining & Analysis (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Software Systems (AREA)
  • Computational Linguistics (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Biophysics (AREA)
  • Mathematical Physics (AREA)
  • Biomedical Technology (AREA)
  • Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Probability & Statistics with Applications (AREA)
  • Geometry (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Architecture (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Medical Informatics (AREA)
  • Design And Manufacture Of Integrated Circuits (AREA)

Abstract

The invention discloses a method for optimizing a floor plan area based on a neural network and a sequence pair, which aims at the floor plan problem in the electronic design automation of an integrated circuit, firstly, a floor plan database is constructed by utilizing the optimal solution of the floor plan, and the problem of insufficient machine learning data quantity is solved; meanwhile, the layout expressed by sequence pairs in the layout plan is converted into a classification problem in machine learning, and finally a neural network model is built through a multilayer perceptron and trained to obtain a trained model for predicting the optimal solution of the layout plan area; the method can quickly and effectively find the optimal scheme of the layout area.

Description

Optimal method for layout planning area based on neural network and sequence pair
Technical Field
The invention relates to the field of digital integrated circuit electronic design automation, in particular to a layout planning area optimization method based on a neural network and a sequence pair.
Background
Under the incentive of moore's law, integrated circuits have entered the ultra-large-scale era. The number of transistors integrated on a single chip has reached the billions level, and engineers manually design circuits that have failed to meet the requirements of design specifications. Under the circumstances, an Electronic Design Automation (EDA) technology is developed, which refers to a design method for completing flows of functional design, simulation, synthesis, verification, physical design, and the like of a Very Large Scale Integration (VLSI) chip by using computer aided design software. The physical design is a process of converting circuit information of the netlist into physical geometric representation, and a layout GDSII file obtained finally in the process is used in a chip production and manufacturing link. Floorplanning (Floorplan) is a core step in the physical design, in order to ensure that each module is assigned a shape or a suitable location and that each pin with a connection to the outside is assigned a reasonable location. In addition, the floorplanning will affect the performance, power consumption, area, line length and other indexes of the chip, and further affect the design targets of timing sequence, congestion and the like. On the other hand, the subsequent layout and wiring stages are influenced, and the design requirement is difficult to meet in the subsequent stage due to the design with poor layout plan. Therefore, floorplanning is a very important link in the physical design flow of integrated circuits.
With the advent of the 5G and artificial intelligence era and the demand for computing power, more and more functions are contained in a single chip, so that the area of the single chip is increased. In physical design, the final area of a chip is determined in the floorplanning stage, and thus, the area becomes one of evaluation indexes of floorplanning. In the continuous degradation of process nodes, some new evaluation indexes such as routability, timing driving, and the like appear, but the most important evaluation index is area.
Although floorplanning has proven to be an NP-hard problem, a number of excellent solutions to floorplanning have emerged under the many years of research effort. Although each of these methods has advantages and disadvantages, the methods can be roughly classified into four categories according to the method entry point: methods based on partitioning (Dunlop A E, Kernighan B W.A procedure for Placement of standard cell VLSI Circuits [ J ]. IEEE Transactions on Computer-aid Design,1985,4(1):92-98.), heuristic methods based on simulated annealing etc. (Tang X, Wong D F.FAST-SP: A Fast algorithm for Placement of vector pair [ C ]// Proceedings of the said Association and South Pacific Design analysis. 2001: Au526. method based on Force-oriented analytical methods (P.Spindend, U.S. project and F.M. johnnes), "Kraft Fast 2-A t trial-rule-141for Computer-aid Design, 26. analysis method based on Force-oriented analysis (P.Spinden, U.S. project and F.M. Johnnes," IEEE transaction data 2-test for retrieval of vector, 14126, and IEEE transaction No. 10. I.S. IEEE transaction No. 14. I.S. Acc Design, US # 2008. 92-10. I.S. and I. Acc. I.S. further, I.S. 12. I. simulation of Computer-use of Computer-12. I.S. I. and I. IEEE transaction No. 12. I.S. implementation, 2008, I. 12. I.S. implementation, I.S. 12. I. method of implementation, No. A.S. Model of implementation of the present, No. A.S. No. A.S. No. A.S. A, No. A.S. No. A.S. No. A.S. No. A.S. No. A, No. 12, No.8, No. 10, No.8, No. 10, No. 7, No. 10, No. 2, No. 10, No. 7, No. 1, No. 7, No. A, No. 10, No. 1, No. A, No. 10, No. 7, No.8, No. 1, No. 9, No. 1, No. 2, No. 1, goldie A, Yazgan M, et al. A graph placement method for fast chip design [ J ] Nature,2021,594(7862): 207-.
The first of the above methods is a divide-and-conquer concept, i.e. dividing the top design into many smaller designs until the problem can be solved, which will lose the quality of the solution and lack the global view; the second method is easy to get into the trouble of local optimal solution by searching the optimal solution in the design space, and has the problem of low convergence speed; the third mode is to solve the expression formed by the module coordinate constraint in a mathematical form, and the method can obtain an accurate solution, the complexity of the method is increased along with the increase of the problem scale, and the method is limited by an equation expression and a set constraint condition; none of the three approaches described above can be learned from the experience of the last iteration. The fourth mode utilizes the advantages of artificial intelligence in the aspect of joint optimization to improve the quality of a solution, is a hot spot of research in the field of current floor planning, but has the problems of large search space of each step, high hardware requirement during model training and opaque training data sets. If the complexity of the search space of each step can be reduced and the problem of training data can be solved, the artificial intelligence mode brings a new development direction for the layout planning.
Disclosure of Invention
The invention aims to provide a optimal method for a layout area based on a neural network and a sequence pair, which utilizes an open source tool to generate a database required by machine learning and is matched with a sequence pair layout representation mode based on a representation method to quickly and effectively find the optimal solution of the layout area by building a neural network model with a small single-step search space.
In order to realize the task, the invention adopts the following technical scheme:
a method for optimizing a floor plan area based on a neural network and a sequence pair comprises the following steps:
constructing a digital integrated circuit layout plan database with n circuit modules, wherein data in the database is used for completely representing a layout plan and consists of four arrays: one array W stores the width of n modules, one array H stores the height of n modules, and the other two arrays Splus and Smin represent optimal area sequence pairs;
converting a layout represented by sequence pairs in the layout plan into a classification problem in machine learning, comprising: extracting a set of data [ W, H, Splus, Smin ] from a digital integrated circuit floorplan database]The sequence pairs Splus and Smin are respectively stored in S1And S2Performing the following steps; calculate the array S1And array S2N label values index constructed by the middle n elements, and a positive sequence pair array P and a negative sequence pair array M are simultaneously created for storing the elements with determined positions, and the elements without determined positions are replaced by-1; then, the feature X: the training data pair composed of { W, H, P, M } and the label index is written into a new database to be used for neural network model training;
a neural network model is built by adopting a multilayer perceptron, the whole model sequentially comprises an expansion layer, a hidden layer and an output layer from input to output, and the input characteristic of the model is a four-dimensional element { W, H, P, M }; inputting the training data in the new database into a model to obtain a prediction result, calculating loss according to the difference between the prediction result and the label, updating model parameters by using a back propagation method, further reducing the difference between the prediction result and the label, and finally obtaining a model with optimal generalization as a trained model;
using the trained model to pair the array S1And array S2Until the S1 and S2 arrays do not have-1 elements, the position prediction of all elements by the sequence is completed, and the sequence is used for S1、S2A solution with an optimal area is planned for the n modules.
Further, the constructing a digital integrated circuit floorplan database with n number of circuit modules includes:
selecting the number n of modules and the size range of the module size according to the actual application scene;
according to the number n of the modules and the size range of the module size, randomly generating the specific size of each module by using a random function, and then respectively storing the width and the height of each module into a width array W and a height array H;
the positive sequences S of the n module sequence pairs are respectively expressed by two arrays Splus and Smin with the size of n1Negative sequence S2The initial values of the arrays Splus and Smin are b0,b1,b2,...,bn-1Wherein b isi(i ═ 0,1, … n-1) denotes the module name; then, the arrays Splus and Smin are disordered respectively, and finally the arrays Splus and Smin obtained through the disorder are used as n module layout planning initial solutions;
and searching the sequence pair with the optimal area by using a simulated annealing method, and storing the width array W, the height array H and the sequence pair Splus and Smin with the optimal area of the layout plan area of each module into a digital integrated circuit layout plan database.
Further, the searching for the sequence pair with the optimal area by using the simulated annealing method includes:
the input parameters of the simulated annealing method are a highest temperature T, a lowest temperature T, a cooling factor alpha, a width array W of each module, a height array H of each module, and a sequence logarithm array Splus and Smin; the simulated annealing searches a solution with a smaller area through a mode of disturbing on the arrays Splus and Smin, the disturbed sequence pair arrays are Splus _ disturb and Smin _ disturb, wherein the disturbing mode is as follows: the positions of two same elements in the random exchange arrays Splus and Smin, two elements in the random exchange arrays Splus, two elements in the random exchange arrays Smin and random scrambling arrays Splus and Smin;
after the disturbance is completed, calculating the areas of the sequence pairs represented by the disturbed arrays Splus _ disturb and Smin _ disturb, and if the areas are smaller than the areas of the sequence pairs represented by the arrays Splus and Smin, respectively giving the arrays Splus _ disturb and Smin _ disturb to the arrays Splus and Smin so as to achieve the purpose of taking the arrays Splus _ disturb and Smin _ disturb as the optimal solution; if the area is larger than the area represented by the arrays Splus, Smin, this difference solution is accepted with probability exp (-delta/T), otherwise it is discarded; wherein delta is the difference between the two areas; and when the temperature is lower than the lowest temperature t, ending the simulated annealing method, and finally taking the arrays Splus and Smin as n module optimal area sequence pairs.
Further, the converting the layout represented by the sequence pairs in the layout planning into a classification problem in machine learning specifically includes:
2.1 deriving data from the digital IC floorplan database, including an array W storing n module widths, an array H storing n module heights, and optimal area sequence pairs Splus and Smin, respectively storing the sequence pairs Splus and Smin in S1And S2Performing the following steps;
2.2 for n modules, the module names are b respectively0,b1,b2,...,bn-1The selected coding scheme is biI, then each module after coding is: 0.1, 2,. cndot.n-2, n-1; then creating dictionary dices, the key words of the dictionary are module names, the values are coding numbers, and the dictionary can map the module names to corresponding numbers when creating the classification labels, namely dices (b)i)=i;
2.3 constructing an input feature quadruple { W, H, P, M } of the neural network model, wherein W is a width array of n modules, H is a height array of n modules, P, M is an array of elements which are determined by a positive sequence and a negative sequence in a sequence pair respectively, and one of P and M is replaced by-1 if a certain element is not determined;
initializing elements in the arrays P and M to be-1, setting i to be 0, and calculating a label: index ═ n × dicts (S)1[i])+dicts(S2[i]);
2.4 if i is equal to 0, then all elements of array P and array M are-1; if i is greater than 0, P [ i-1 ]]=dicts(S1[i-1]),M[i-1]=dicts(S2[i-1]) (ii) a And then combining the array W and the array H to create an input characteristic X as follows: { W, H, P, M };
2.5, forming a data pair by the input characteristic X and the label index, and storing the data pair into the data; if i < n, i + +, repeating step 2.3 and step 2.4; in a new iteration, recalculating the value of the label index, judging the elements in the array P and the array M to be assigned according to the value of i to obtain an input characteristic X, and finally storing the data pair in the data for training the neural network model.
Further, the training process of the neural network model is as follows:
firstly, inputting the characteristic X ═ { W, H, P, M } into a model, and reducing the characteristic X from four dimensions to a one-dimensional array by an expansion layer; secondly, the hidden layer and the output layer begin to learn the association between the input features and the output features; then, selecting the index number of the neuron with the maximum probability on the output layer as the classification result by utilizing the SoftMax function
Figure BDA0003572810570000051
Then, a cross entropy loss function is used to calculate a classification result
Figure BDA0003572810570000052
Updating model parameters by combining the difference and a back propagation method, wherein the parameters comprise weight and bias of neurons; finally, a trained model is obtained.
Further, using the trained model to pair the array S1And array S2The element (2) is predicted, and the method comprises the following steps:
(1) acquiring the basic characteristics of n modules, then creating an array W and an array H to respectively store the width and the height of the n modules, and simultaneously creating two arrays S1 and S2 which contain n elements and have initial values of-1;
(2) inputting { W, H, S1, S2} into the model at the ith time to obtain an output result y; calculating the value of S [ i ], i.e., S1[ i ] ═ y/n, S2[ i ] ═ y% n;
(3) if i is not equal to n, i is increased by 1 and then the step (2) is repeated; otherwise, jumping to the step (4);
(4) when the S1 and S2 arrays do not have-1 elements, the prediction of the positions of the sequence for all the elements is completed, and the sequence has the optimal solution for the layout area of the n modules.
Compared with the prior art, the invention has the following technical characteristics:
1. the invention provides a method for optimizing a layout area based on a neural network and a sequence pair, which aims at the field of layout planning in the automation of electronic design of an integrated circuit.
2. The method utilizes an open source tool to generate the optimal solution of the layout plan, so as to form a database and solve the problem of insufficient machine learning data quantity; meanwhile, module sequence pairs are converted into numerical labels, layout planning is converted into classification problems in machine learning, and feasibility and effectiveness of the method are verified in an experimental mode.
Drawings
FIG. 1 is a process for generating a data set using an open source tool;
FIG. 2 is an example of a sequence pair representative floorplan;
FIG. 3 is a schematic diagram of the conversion of floorplanning into a classification problem in machine learning;
FIG. 4 is a schematic diagram of neural network model training;
FIG. 5 is a schematic diagram of a new data prediction floorplan optimal solution process;
FIG. 6 is a graph showing the results of a simulated annealing run;
FIG. 7 is a schematic representation of the results of the operation of the process of the present invention;
FIG. 8 is a flowchart of the overall design of the method of the present invention.
Detailed Description
The problem that a training data set is not transparent in layout planning is solved by an artificial intelligence method, which is a phenomenon generally existing in the industrial and academic fields at present. The invention uses the open source tool to generate the data set and achieves the effect of data set reproducibility. In addition, over decades, the representation-based approach is a kind of layout representation in the layout planning, which is mainly the Polish expression, B-tree, O-tree, sequence pair, and so on. The representation of the sequence pairs is relatively compact and therefore forms a layout representation of the present invention.
Referring to the attached drawings, the invention discloses a method for optimizing a floor plan area based on a neural network and a sequence pair, which comprises the following steps:
step 1, constructing a digital integrated circuit layout plan database with n circuit modules, wherein each piece of data in the database is used for completely representing a layout plan and consists of four arrays; one array W stores the width of n modules, one array H stores the height of n modules, and the other two arrays Splus and Smin represent an optimal area sequence pair; this database will be used for the generation of training data, the flow of which is shown in fig. 1.
1.1, selecting the number n of modules and the size range of the module size according to an actual application scene, for example, if the module number range of an Apte circuit in MCNC Benchmark is 9 blocks, n can be set to 9, and the range can be set to be 0 to the maximum value of the width or height of the Apte module, so as to improve the coverage rate of the database; range will only specify the final size range of the n modules.
1.2 according to the number n of modules and the size range parameter of the module size input in the 1.1, randomly generating the specific size of each module by using a random number function range embedded in python, wherein the numerical value of the specific size is less than or equal to the range; the width and height of each module are stored into width array W and height array H, respectively.
1.3 first, how the sequence pairs represent the relationship of two modules is described.
The sequence pair is composed of two sequences S1(also referred to as a positive sequence), S2(also called negative sequence) assuming that there are a block a and a block b, if in sequence S1In (1)<...a,...b,...>In the sequence S2In<...a,...b,...>Module a is to the left of module b; if in the sequence S1In<...a,...b,...>In the sequence S2In<...b,...a,...>Module a is above module b.
FIG. 2 is an example of a floorplan represented by a sequence pair, where S1:<acdbe>,S2:<cdaeb>. For this purpose, two arrays of size n Splus, Smin are used to represent the positive sequences S of the n pairs of modular sequences, respectively1Negative sequence S2The initial values of the arrays Splus and Smin are b0,b1,b2,...,bn-1Wherein b isi(i ═ 0,1, … n-1) represents a module name, and in practical application, the module name may be a name of a memory block such as mem, or may be some example of an IP module such as IO; and then, disorderly scrambling the arrays Splus and Smin respectively by using a shuffle function in a python embedded random library, and finally, taking the arrays Splus and Smin obtained by scrambling as n module layout planning initial solutions.
1.4 searching sequence pairs with optimal areas by using a simulated annealing method.
The input parameters for the simulated annealing process are the maximum temperature T, the minimum temperature T, the cooling factor alpha, the module width arrays W in step 1.2, the module height arrays H, and the log sequence arrays Splus and Smin in step 1.3. The simulated annealing searches a solution with a smaller area through a mode of disturbing on the arrays Splus and Smin, the disturbed sequence pair arrays are Splus _ disturb and Smin _ disturb, wherein the disturbing mode is as follows: the positions of two identical elements in the random swap arrays Splus, Smin (i.e. swapping two modules at random), two elements in the random swap arrays Splus (i.e. swapping the upper and lower modules), two elements in the random swap arrays Smin (i.e. swapping the left and right modules), and random shuffle arrays Splus, Smin (i.e. reselecting a floorplan). After the disturbance is completed, calculating the areas of the sequence pairs represented by the disturbed arrays Splus _ disturb and Smin _ disturb, and if the areas are smaller than the areas of the sequence pairs represented by the arrays Splus and Smin, respectively giving the arrays Splus _ disturb and Smin _ disturb to the arrays Splus and Smin so as to achieve the purpose of taking the arrays Splus _ disturb and Smin _ disturb as the optimal solution; if the area is larger than the area represented by the arrays Splus, Smin, this difference solution is accepted with probability (exp (-delta/T), where delta is the difference between the two areas), otherwise it is discarded. And (3) cooling the temperature, disturbing the sequence pairs, calculating the area and the like, and ending the simulated annealing method until the temperature is lower than the lowest temperature t, and finally taking the arrays Splus and Smin as n module optimal area sequence pairs.
1.5, storing the width array W, the height array H and the optimal area sequence pair Splus and Smin of the layout area of each module into a digital integrated circuit layout database for subsequent machine learning. The data in the database comprises n sequence pairs with the optimal module area, so that the prediction result of a model trained by the data with the optimal area is theoretically optimal.
Since a large amount of raw data is needed for machine learning to train the model, all steps from step 1.2 to step 1.5 will be repeated to obtain multiple copies of data. For example, if 10,000 parts of original data are needed, the above steps need to be repeated for 10,000 times, wherein step 1.5 stores each group of data in the database, so that the database has 10,000 groups of data when the program is finished.
And 2, converting the layout expressed by the sequence pairs in the layout planning into a classification problem in machine learning.
Extracting a group of data from the database obtained in the step 1, wherein the group of data comprises four arrays W, H, Splus and Smin, and respectively storing the sequence pairs Splus and Smin in S1And S2Performing the following steps; calculate the array S1And array S2N label values index constructed from the n elements, and positive sequence pair arrays P and negative sequence pair arrays M for storing the elements with determined positions, the elements with undetermined positions being replaced by-1. Then, the feature X: the data pair consisting of { W, H, P, M } and the tag index is written to a new database, which will be used for model training. In this step, a set of data is reconstructed into n data sets for training the model to have the ability to predict n elements in the sequence pair. Notably, the value of the tag indexThe range is as follows: 0 to (n)2-1), and the label index is an integer, so this problem translates into an input feature of X, an output class number of n2The machine learning classification problem.
The process of converting the sequence pairs into data required for machine learning is shown in fig. 3.
2.1 deriving data from the database constructed in the step 1, wherein the data comprises an array W storing n module widths, an array H storing n module heights, and optimal area sequence pairs Splus and Smin, and the sequence pairs Splus and Smin are respectively stored in S1And S2Performing the following steps;
2.2 encode each module.
For n modules, the module names are respectively b0,b1,b2,...,bn-1The selected coding scheme is biI, then each module after coding is: 0.1, 2,. cndot.n-2, n-1; then creating dictionary dices, the key words of the dictionary are module names, the values are coding numbers, and the dictionary can map the module names to corresponding numbers when creating the classification labels, namely dices (b)i) I. It is noted that the pair of sequences formed before encoding the modules and the pair of sequences formed after encoding represent the same floor plan.
2.3 create the sorted labels.
In the scheme, the input features of the neural network model are composed of quadruplets, namely { W, H, P, M }, wherein W is a width array of n modules, H is a height array of n modules, P is an array of elements which are determined by a positive sequence in a sequence pair, if a certain element is not determined, the array is replaced by-1, M is an array of elements which are determined by a negative sequence in the sequence pair, and if a certain element is not determined, the array is replaced by-1. For example, if the number of modules is 5, W ═ 4,4,6,8],H=[6,6,6,5,5],S1=[b3,b1,b2,b0,b4],S2=[b0,b2,b1,b4,b3]When two elements of the arrays P and M are determined, P is [3,1, -1, -1, -1],M=[0,2,-1,-1,-1]。
Firstly, initializing the generation-1 and the generation-1 of elements in the arrays P and MThis position in the table sequence has not yet been determined to be a value. Let i equal to 0, then calculate the label using the label generation formula: index ═ n × dicts (S)1[i])+dicts(S2[i]). For example: s. the1[i]=b2,S2[i]=b1And n is 5, index is 5 × 2+1 is 11. In this step, S1,S2The number of each element in (1) is unique, so the index obtained is also unique. Therefore, there is no ambiguity problem with using index values as labels for classification in the model. The value range of index is as follows: 0 to (n)2-1) the size of each step of the problem is changed to n2And further reduces the complexity of the search space.
2.4 the combined numbers constitute the machine learning input features.
If i is equal to 0, then all elements of array P and array M are-1; the values of P [0] and M [0] are predicted from P (all elements are-1), M (all elements are-1), W, H at this time.
If i is greater than 0, P [ i-1 ]]=dicts(S1[i-1]),M[i-1]=dicts(S2[i-1]) The element representing the position of i-1 in the positive sequence is determined as dicts (S)1[i-1]) The element at the position of i-1 in the negative sequence is determined as dicts (S)2[i-1]). And combining the array W and the array H in the step 2, and creating an input characteristic X as follows: { W, H, P, M }. When i is 1, then P [0]]And M [0]]Are valued respectively as dicts (S1[ 0]]),dicts(S2[0]) The model is then based on P (P [0 ])]With values, others are-1), M (M [0]]With values other than-1), W, H to predict P [1]]And M1]And so on.
For example: if i is 0, [ [4,4,6,8,8], [6,6,6,5,5], [ -1, -1, -1, -1, -1, -1], [ -1, -1, -1] ]; if i is 1, [ [4,4,6,8,8], [6,6,6,5,5], [3, -1, -1, -1, -1], [0, -1, -1, -1, -1] ]; if i is 2, then { W, H, P, M } [ [4,4,6,8,8], [6,6,6,5,5], [3,1, -1, -1, -1], [0,2, -1, -1, -1] ].
2.5, forming a data pair by the input feature X and the label index, and saving the data pair into the data. If i < n, i + +, repeat step 2.3 and step 2.4. In a new iteration, the value of the label index is recalculated, i.e., index ═ n × dics (S1[ i ]) + dics (S2[ i ]). And judging that the elements in the array P and the array M need to be assigned according to the value of i to obtain an input characteristic X, and finally storing the data pair into the data.
2.6 when the loop is terminated, n parts of data are stored in the data, and the n parts of data are used for training the model to have the capability of predicting n elements in the sequence pair. And finally, all the data in the data are stored in a new database, and the file is directly read in the next training, so that the time is saved for machine learning training.
And 3, after the two points are completed, building a neural network model.
The scheme adopts a Multi-Layer Perception Machine (MLP) to build a neural network model, the input characteristic of the model is a four-dimensional element { W, H, P, M }, the number of output neurons is n2(n is the number of modules), the number of hidden layers is 5, and in addition, an expanded layer is also arranged, and the connection mode among the layers is full connection. The layers of the whole model passing from input to output are an expansion layer, a hidden layer and an output layer in sequence; the expansion layer expands the input four-dimensional elements into a one-dimensional array; the hidden layers are (4 × n, 128), (128, 256), (256, 512), (512, 256) and (256, 128), respectively, and function to fit the relationship between the input features and the output features; the output layer has a size of (128, n)2) Its role is to constrain the number of classes that are finally classified. Other hyper-parameters were chosen as follows:
TABLE 1 statistical table of neural network model parameters
Figure BDA0003572810570000101
Inputting the training data in the new database into a model to obtain a prediction result, calculating a loss amount according to a difference between the prediction result and the label, updating model parameters by using a back propagation method, further reducing the difference between the prediction result and the label, and finally obtaining a model with optimal generalization, as shown in fig. 4.
The training process of the model is as follows: first, the characteristic X ═ { W, H, P, M } is input into the modelThe expansion layer reduces it from four-dimensional to one-dimensional arrays. Second, the hidden layer and the output layer begin to learn the associations between the input features and the output features. Then, selecting the index number of the neuron with the maximum probability on the output layer as the classification result by utilizing the SoftMax function in the pyrrch library
Figure BDA0003572810570000102
Then, a cross entropy loss function is used to calculate a classification result
Figure BDA0003572810570000103
And updating model parameters including weights and biases of neurons by combining the gap and a back propagation method. And finally, obtaining a trained model for predicting the sequence pair.
For example: when the input characteristic X ═ { W, H, P, M } [ [4,4,6,8 } - ]],[6,6,6,5,5],[-1,-1,-1,-1,-1],[-1,-1,-1,-1,-1]]When index is 15, the model to be trained has the ability to predict P [0]]And M [0]]If at that time
Figure BDA0003572810570000111
There is no loss of training; if at that time
Figure BDA0003572810570000112
Not equal to 15, the loss is calculated using the cross entropy function. When the input characteristic X ═ W, H, P, M ═ W, [ [4,4,6, 8] } [ ]],[6,6,6,5,5],[3,-1,-1,-1,-1],[0,-1,-1,-1,-1]]When index is 7, the model to be trained has the ability to predict P [1]]And M [1]]The ability of (c); when the input characteristic X ═ { W, H, P, M } [ [4,4,6,8 } - ]],[6,6,6,5,5],[3,1,-1,-1,-1],[0,2,-1,-1,-1]]When index is 11, the model to be trained has the ability to predict P [2 ]]And M2](ii) ability of; when the input characteristic X ═ { W, H, P, M } [ [4,4,6,8 } - ]],[6,6,6,5,5],[3,1,2,-1,-1],[0,2,1,-1,-1]]When index is 4, the model to be trained has the ability to predict P [3 ]]And M [3 ]](ii) ability of; when the input characteristic X ═ { W, H, P, M } [ [4,4,6,8 } - ]],[6,6,6,5,5],[3,1,2,0,-1],[0,2,1,4,-1]]When index is 23, the model to be trained has the ability to predict P [ 4]]And M [ 4]]The ability of (c); because the same model is used in the whole training processType, so this model has the ability to predict the completion sequence pairs.
Step 4, utilizing the trained model to carry out array S1And array S2Until the S1 and S2 arrays do not have-1 elements, the position prediction of all elements by the sequence is completed, and the sequence is used for S1、S2A solution with an optimal area is planned for the n modules.
In practical applications, the process of the optimal solution for the floorplanning problem area containing n modules is shown in fig. 5.
(1) The basic features (width and height) of n modules are obtained, then an array W and an array H are created to respectively store the width and height of the n modules, and two arrays S1 and S2 which contain n elements and have initial values of-1 are created at the same time.
(2) The ith (i is initially 0) time { W, H, S1, S2} is input into the model to obtain an output y. And (3) reversely deducing the value of the S [ i ] according to a label generation formula, namely S1[ i ] is y/n, and S2[ i ] is y% n. For example: when i is equal to 0, W is equal to [8,4,4,4,4], H is equal to [4,3,5,5,6], S1 is equal to [ -1, -1, -1, -1, -1], S2 is equal to [ -1, -1, -1, -1, -1, 1], in order to predict the values of S1[0] and S2[0], in this case, assuming that the model output result y is equal to 2, S1[0] is equal to 2/5 is equal to 0, and S2[0] is equal to 2% 5 equal to 2. When i is 1, the characteristics { W, H, S1, S2} of the input model are [ [8,4,4,4,4], [4,3,5,5,6], [0, -1, -1, -1, -1], [2, -1, -1, -1] ], and the model is made to predict the values of S1[1] and S2[1 ]. This procedure was used to construct the n data referred to in step 2 as 2.6.
(3) If i is not equal to n, i is increased by itself and step (2) is repeated; otherwise, jumping to the step (4).
(4) At this point, the S1 and S2 arrays have no-1 elements, i.e., the prediction of the positions of all elements by the sequence is completed, and the sequence has the optimal solution for the layout area of the n modules.
The modeling mode used by the invention changes the time complexity of each step into n2The running speed becomes fast. Each step is from n2One of the categories is selected, which is an order of magnitude higher than the complexity of other methods.
In subsequent floorplanning designs, for representation layouts based on representation-based methods, an O-tree or polish expression may be used instead of the sequence pairs of the method; for generating a data set by using an open source tool and aiming at the heuristic method for simulating annealing, the particle swarm optimization method can be adopted to achieve the same effect, so that the particle swarm optimization method is also an alternative scheme in the method; for the part of building the Neural network, Convolutional Neural Networks (CNN) or Reinforcement Learning (RL) can be used instead, and even if the former people use Reinforcement Learning to solve the floorplanning, the effect of the method is better than that of the former people using the Reinforcement Learning alone in combination with the modeling mode in the method.
The method completes verification on MCNC Benchmark which is open source and has industry authority. Apte is a Benchmark in MCNC Benchmark, which contains 9 modules, the module size is 286-. The verification method is as follows:
and inputting a matrix formed by the module sizes W and H in the Apte data set and the two arrays P and M with the size of 9 and the element value of-1 into the model to obtain an output value y of the model. Filling the output value into the arrays P and M, and the specific method is as follows: let i equal 0, P [ i ] y/9, M [ i ] y% 9, i + +. Then, the new value y is obtained by substituting { W, H, P, M } into the model, filling P and M with y in the above manner, and repeating the above steps until P, M has no element value of-1, i ═ 9.
To compare the superiority of the method, the same experiment was carried out using simulated annealing, input parameters such as maximum temperature, minimum temperature, and cooling factor of which were the same as those of step 1. The final experimental results are shown in FIGS. 6 and 7, and the area obtained by the method is 4.75X107Run time 2.2s, and simulated annealing gave an area of 4.82x107And the running time is 11.9s, and experiments show that the method can effectively and quickly find the optimal solution of the layout area.
The above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (6)

1. A method for optimizing a floorplan area based on a neural network and sequence pairs, comprising:
constructing a digital integrated circuit floorplan database with n circuit modules, wherein data in the database is used for completely representing a floorplan and consists of four arrays: one array W stores the width of n modules, one array H stores the height of n modules, and the other two arrays Splus and Smin represent an optimal area sequence pair;
converting a layout represented by sequence pairs in a layout plan into a classification problem in machine learning, comprising: extracting a set of data [ W, H, Splus, Smin ] from a digital integrated circuit floorplan database]The sequence pairs Splus and Smin are respectively stored in S1And S2Performing the following steps; calculate the array S1And array S2N label values index constructed by the middle n elements, and a positive sequence pair array P and a negative sequence pair array M are simultaneously created for storing the elements with determined positions, and the elements without determined positions are replaced by-1; then, the feature X: the training data pair composed of { W, H, P, M } and the label index is written into a new database to be used for neural network model training;
a neural network model is built by adopting a multilayer perceptron, the whole model sequentially comprises an expansion layer, a hidden layer and an output layer from input to output, and the input characteristic of the model is a four-dimensional element { W, H, P, M }; inputting the training data in the new database into a model to obtain a prediction result, calculating loss according to the difference between the prediction result and the label, updating model parameters by using a back propagation method, further reducing the difference between the prediction result and the label, and finally obtaining a model with optimal generalization as a trained model;
using the trained model to pair the array S1And array S2Until the S1 and S2 arrays do not have-1 elements, the position prediction of all elements by the sequence is completed, and the sequence is used for S1、S2A solution with the optimal area is planned for the n modules.
2. The method of claim 1, wherein the constructing a digital integrated circuit floorplan database having n number of circuit blocks comprises:
selecting the number n of modules and the size range of the module size according to the actual application scene;
according to the number n of the modules and the size range of the module size, randomly generating the specific size of each module by using a random function, and then respectively storing the width and the height of each module into a width array W and a height array H;
the positive sequences S of the n module sequence pairs are respectively expressed by two arrays Splus and Smin with the size of n1Negative sequence S2The initial values of the arrays Splus and Smin are b0,b1,b2,...,bn-1Wherein b isi(i-0, 1, … n-1) represents a module name; then, the arrays Splus and Smin are disordered respectively, and finally the arrays Splus and Smin obtained through the disorder are used as n module layout planning initial solutions;
and searching the sequence pair with the optimal area by using a simulated annealing method, and storing the width array W, the height array H and the sequence pair Splus and Smin with the optimal area of the layout plan area of each module into a digital integrated circuit layout plan database.
3. The method of claim 2, wherein the searching for the optimal sequence pair by simulated annealing comprises:
the input parameters of the simulated annealing method are a highest temperature T, a lowest temperature T, a cooling factor alpha, a width array W of each module, a height array H of each module, and a sequence logarithm array Splus and Smin; the simulated annealing searches a solution with a smaller area through a mode of disturbing on the arrays Splus and Smin, the disturbed sequence pair arrays are Splus _ disturb and Smin _ disturb, wherein the disturbing mode is as follows: positions of two same elements in the random swap arrays Splus and Smin, two elements in the random swap arrays Splus, two elements in the random swap arrays Smin and random scrambling arrays Splus and Smin;
after the disturbance is completed, calculating the areas of the sequence pairs represented by the disturbed arrays Splus _ disturb and Smin _ disturb, and if the areas are smaller than the areas of the sequence pairs represented by the arrays Splus and Smin, respectively giving the arrays Splus _ disturb and Smin _ disturb to the arrays Splus and Smin so as to achieve the purpose of taking the arrays Splus _ disturb and Smin _ disturb as the optimal solution; if the area is larger than the area represented by the arrays Splus, Smin, this difference solution is accepted with probability exp (-delta/T), otherwise it is discarded; wherein delta is the difference between the two areas; and when the temperature is lower than the lowest temperature t, ending the simulated annealing method, and finally taking the arrays Splus and Smin as n module optimal area sequence pairs.
4. The method for optimizing a floorplan area based on a neural network and sequence pairs as claimed in claim 1, wherein the converting the floorplan represented by the sequence pairs in the floorplan into a classification problem in machine learning specifically comprises:
2.1 deriving data from the digital IC floorplan database, including an array W storing n module widths, an array H storing n module heights, and optimal area sequence pairs Splus and Smin, respectively storing the sequence pairs Splus and Smin in S1And S2The preparation method comprises the following steps of (1) performing;
2.2 for n modules, the module names are b respectively0,b1,b2,...,bn-1The selected coding scheme is biI, then each module after coding is: 0.1, 2, n-1; then creating a dictionary dics, wherein the keywords of the dictionary are module names and the values are coding numbers, and the dictionary can map the module names to the corresponding numbers when creating the classification labelsI.e. dicts (b)i)=i;
2.3 constructing an input feature quadruple { W, H, P, M } of the neural network model, wherein W is a width array of n modules, H is a height array of n modules, P, M is an array of elements which are determined by positive sequences and negative sequences in sequence pairs respectively, and one of P and M is replaced by-1 if a certain element is not determined;
initializing elements in the arrays P and M to be-1, setting i to be 0, and calculating a label: index ═ n × dicts (S)1[i])+dicts(S2[i]);
2.4 if i is equal to 0, then all elements of array P and array M are-1; if i is greater than 0, P [ i-1 ]]=dicts(S1[i-1]),M[i-1]=dicts(S2[i-1]) (ii) a And then combining the array W and the array H to create an input characteristic X as follows: { W, H, P, M };
2.5, forming a data pair by the input characteristic X and the label index, and storing the data pair into the data; if i < n, i + +, repeating step 2.3 and step 2.4; in a new iteration, recalculating the value of the label index, judging the elements in the array P and the array M to be assigned according to the value of i to obtain an input characteristic X, and finally storing the data pair in the data for training the neural network model.
5. The method of claim 1, wherein the neural network model is trained by:
firstly, inputting the characteristic X ═ { W, H, P, M } into a model, and reducing the characteristic X from four dimensions to a one-dimensional array by an expansion layer; secondly, the hidden layer and the output layer begin to learn the association between the input features and the output features; then, selecting the index number of the neuron with the maximum probability on the output layer as the classification result by utilizing the SoftMax function
Figure FDA0003572810560000031
Then, a cross entropy loss function is used to calculate a classification result
Figure FDA0003572810560000032
Updating model parameters by combining the difference and a back propagation method, wherein the parameters comprise weights and bias of neurons; finally, a trained model is obtained.
6. The method of claim 1, wherein the trained model pair array S is used1And array S2The element (2) is predicted, and the method comprises the following steps:
(1) acquiring the basic characteristics of n modules, then creating an array W and an array H to respectively store the width and the height of the n modules, and simultaneously creating two arrays S1 and S2 which contain n elements and have initial values of-1;
(2) inputting { W, H, S1, S2} into the model at the ith time to obtain an output result y; calculating the value of S [ i ], i.e., S1[ i ] ═ y/n, S2[ i ] ═ y% n;
(3) if i is not equal to n, i is automatically increased by 1 and then the step (2) is repeated; otherwise, jumping to the step (4);
(4) when the S1 and S2 arrays do not have-1 elements, the prediction of the positions of the sequence for all the elements is completed, and the sequence has the optimal solution for the layout area of the n modules.
CN202210324355.0A 2022-03-30 2022-03-30 Optimal method for layout planning area based on neural network and sequence pair Pending CN114707460A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210324355.0A CN114707460A (en) 2022-03-30 2022-03-30 Optimal method for layout planning area based on neural network and sequence pair

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210324355.0A CN114707460A (en) 2022-03-30 2022-03-30 Optimal method for layout planning area based on neural network and sequence pair

Publications (1)

Publication Number Publication Date
CN114707460A true CN114707460A (en) 2022-07-05

Family

ID=82170965

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210324355.0A Pending CN114707460A (en) 2022-03-30 2022-03-30 Optimal method for layout planning area based on neural network and sequence pair

Country Status (1)

Country Link
CN (1) CN114707460A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115392144A (en) * 2022-10-31 2022-11-25 深圳飞骧科技股份有限公司 Method for automatic design of acoustic surface filter, related system and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115392144A (en) * 2022-10-31 2022-11-25 深圳飞骧科技股份有限公司 Method for automatic design of acoustic surface filter, related system and storage medium
CN115392144B (en) * 2022-10-31 2023-02-03 深圳飞骧科技股份有限公司 Method for automatic design of acoustic surface filter, related system and storage medium

Similar Documents

Publication Publication Date Title
Guan et al. An artificial-neural-network-based, constrained CA model for simulating urban growth
Lopera et al. A survey of graph neural networks for electronic design automation
Cheng et al. On joint learning for solving placement and routing in chip design
Sait et al. VLSI physical design automation: theory and practice
Jyu et al. Statistical timing analysis of combinational logic circuits
US11256845B2 (en) Machine-learning driven prediction in integrated circuit design
US11663485B2 (en) Classification of patterns in an electronic circuit layout using machine learning based encoding
Xu et al. GoodFloorplan: Graph convolutional network and reinforcement learning-based floorplanning
Hanchate et al. Simultaneous interconnect delay and crosstalk noise optimization through gate sizing using game theory
US11651129B2 (en) Selecting a subset of training data from a data pool for a power prediction model
CN114707460A (en) Optimal method for layout planning area based on neural network and sequence pair
CN115146580A (en) Integrated circuit path delay prediction method based on feature selection and deep learning
Cao et al. A timing prediction framework for wide voltage design with data augmentation strategy
US20220391566A1 (en) Machine learning models for predicting detailed routing topology and track usage for accurate resistance and capacitance estimation for electronic circuit designs
KR20240019305A (en) Machine learning-based power/ground (P/G) with rejection
Zhang et al. A machine learning framework with feature selection for floorplan acceleration in ic physical design
Lee et al. i TPlace: machine learning-based delay-aware transistor placement for standard cell synthesis
Chen et al. Macrorank: Ranking macro placement solutions leveraging translation equivariancy
Liu et al. Performance-driven X-architecture Routing Algorithm for Artificial Intelligence Chip Design in Smart Manufacturing
Islam Early Stage DRC Prediction Using Ensemble Machine Learning Algorithms
Lu et al. DREAM-GAN: Advancing dreamplace towards commercial-quality using generative adversarial learning
Tigadi Survey On VLSI Design For Artificial Intelligence And Machine Learning Applications
Hao et al. Evolutionary neural network-based method for constructing surrogate model with small scattered dataset and monotonicity experience
Jung et al. Power distribution network optimization using HLA-GCN for routability enhancement
CN115510780B (en) Automatic gate-level netlist generation method based on PPA prediction

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination