A digital integrated circuit optimization method
By combining the graph neural network and bidirectional long and short-term memory network and other models, circuit topology information is extracted and learned, and the accurate prediction and speed improvement problems of leakage power consumption optimization in the existing technology are solved, and high-precision leakage power consumption optimization is achieved.
Patent Information
- Application Number
- CN202210697638.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-20
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2042-06-20
AI Technical Summary
Existing machine learning models are difficult to learn gate unit-level information, path-level topology information and circuit-level topology information at the same time, and cannot accurately predict leakage power consumption and improve optimization speed, and there is a problem of threshold voltage regulation timing violations.
By extracting topological connection information, path topological information and timing characteristics between gate units, combined with graph neural network, bidirectional long and short-term memory network and artificial neural network, the connection between circuit-level topological information, path-level topological information and gate unit information is established. Achieve prediction of the threshold voltage type of the gate unit.
Accurate prediction of power leakage is achieved, optimized running time is reduced, the optimization speed of power leakage is improved, and multiple iterations and timing violations are avoided, achieving optimization effects similar to commercial tools.
Smart Images

Figure CN115017850B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a method for optimizing a digital integrated circuit, and in particular to a method for optimizing leakage power consumption in an engineering modification (ECO) phase of a digital integrated circuit. Background Art
[0002] With the development of integrated circuits and the advancement of process nodes, the proportion of leakage power in total power consumption continues to increase, and the problem of optimizing leakage power in integrated circuits has become increasingly important. In the past, when the proportion of leakage power was relatively small, the energy consumption problem of integrated circuits could be effectively solved by reducing the dynamic power consumption that accounted for a larger proportion through technologies such as power supply voltage scaling and threshold voltage scaling. However, when the process node develops to the 100nm range, the reduction of threshold voltage will cause the subthreshold leakage power consumption to grow exponentially, which may cause a large change in the chip operating temperature, and thus affect the timing of the chip operation. Therefore, under the premise of ensuring that the timing constraints are strictly met, optimizing leakage power consumption has become one of the important issues in the optimization of integrated circuit power consumption.
[0003] Engineering Change Order (ECO) is usually used to optimize the power consumption, performance and area of the circuit to achieve the best possible chip design indicators. Each standard cell in the standard cell library usually has multiple types of sizes and threshold voltages. Under certain timing constraints, the leakage power consumption of the circuit can be optimized by adjusting the size and threshold voltage. However, in the post-wiring stage, size adjustment usually requires incremental layout, which increases the chip design time, while threshold voltage adjustment does not cause significant interference to the overall layout and wiring, so it becomes a more commonly used leakage power optimization method in the ECO stage. However, the threshold voltage replacement requires multiple rounds of iterations, and each iteration requires a corresponding timing check to ensure that the timing constraints are met, which brings huge time costs and prolongs the entire design cycle of the chip. Therefore, it is very important to solve the time-consuming problem of leakage power optimization in the ECO stage.
[0004] Machine learning has been applied to the field of leakage power optimization. However, since leakage power optimization requires a trade-off between circuit timing and leakage power, its complexity makes it difficult for traditional machine learning methods to achieve good prediction results. On the one hand, the worst negative slack (WNS) and total negative slack (TNS) of the optimized circuit cannot deteriorate and cannot introduce new violations; on the other hand, there are many shared gate units on the tightly interwoven timing paths, and the threshold voltage adjustment of any gate unit on these paths may cause new timing violations in the paths that share the unit. Therefore, the type of threshold voltage after the gate unit is optimized depends not only on the information of the gate unit itself, but also on its adjacent gate units. Then, in the final embedding vector of the gate unit, it is necessary to consider not only the impact of its own characteristics on the optimized threshold voltage, but also the path topology information with the worst timing passing through the gate unit. However, the existing research mainly uses the characteristics of the gate unit itself for modeling, lacks path topology information, and cannot meet the high-precision requirements of prediction.
[0005] In addition, the Graph Neural Network (GNN) learns the information of adjacent gate units based on graph learning, thereby extracting circuit-level topological information. It is a model that can be effectively applied to leakage power optimization problems. However, the existing GNN models for dealing with leakage power optimization problems still have shortcomings. First, the threshold voltage adjustment of different types of adjacent gate units will have different effects on the final threshold voltage type of their central gate unit, but the existing GNN models cannot distinguish different adjacent gate units when aggregating. Secondly, the existing GNN models only retain the output of the last layer when learning node representations, which will lead to the loss of local topological information of adjacent gate units with one or two order distances.
[0006] In general, it is difficult for existing machine learning models to simultaneously learn gate unit level information, path level topology information, and circuit level topology information. In addition, there are problems such as the inability to distinguish between different types of adjacent gate units and the lack of local topology information. As a result, existing machine learning-based leakage power optimization methods cannot achieve high-precision leakage power optimization prediction effects while reducing the leakage power optimization running time. Therefore, how to establish a prediction framework to accurately predict leakage power and improve the leakage power optimization speed is an urgent problem to be solved. Summary of the invention
[0007] Technical problem: The purpose of the present invention is to provide a digital integrated circuit optimization method that can accurately predict leakage power optimization and effectively improve the speed of leakage power optimization.
[0008] Technical solution: A digital integrated circuit optimization method of the present invention is to allocate appropriate threshold voltage types to gate units in the circuit under the premise of meeting certain timing constraints, so that leakage power consumption is minimized; the method comprises the following steps:
[0009] S1: Extract the topological connection information between gate units, gate unit feature information and path topology information as the input of the leakage power optimization model; first extract the topological connection relationship between gate units from the circuit netlist to form an adjacency matrix; then obtain the timing report of the specified circuit through the timing and power analysis tool, and extract the timing and power consumption related information to form a feature matrix, including the timing characteristics, capacitance characteristics and power consumption characteristics of the unit itself and the adjacent units; then extract the key path passing through each gate unit in the circuit to obtain the path feature sequence; finally, use the commercial circuit optimization tool to optimize the circuit leakage power consumption, and obtain the optimized threshold voltage type of each gate unit in the circuit as the real label value for model training and inference;
[0010] S2: The adjacency matrix reflecting the topological connection relationship between gate units obtained by extracting the circuit netlist in step S1 and the feature matrix related to timing and power consumption obtained by extracting the timing report are used as the input of the graph neural network GNN. After training, the network can model the circuit-level topological information, thereby establishing a connection between the circuit topology structure and the leakage power optimization results;
[0011] S3: The path feature sequence extracted in step S1 is used as the input of the bidirectional long short-term memory network BLSTM. After training, the network can model the path-level topology information of the critical path passing through each gate unit in the circuit and establish the connection between the path-level topology information and the leakage power optimization result;
[0012] S4: The feature matrix composed of the information related to timing and power consumption obtained by extracting the timing report in step S1, including the timing characteristics, capacitance characteristics and power consumption characteristics of the gate unit itself and the adjacent gate units, is used as the input of the artificial neural network ANN. After training, the model can establish the connection between the gate unit's own information and the leakage power optimization result;
[0013] S5: Merge the output of the graph neural network (GNN) model in step S2, the output of the bidirectional long short-term memory (BLSTM) neural network in step S3, and the output of the artificial neural network (ANN) in step S4; the merged vector is used as the input of the threshold voltage classification network. After training, the model can establish the relationship between the circuit-level topology information, the path-level topology information, the gate unit topology information, and the threshold voltage type of the gate unit after leakage power optimization, so as to predict the optimized threshold voltage type of the gate unit in the circuit.
[0014] in,
[0015] The step S1 specifically includes the following steps:
[0016] S11: The circuit netlist is converted into a directed acyclic graph by representing the gate units in the circuit netlist as nodes in the graph and the interconnection lines between the gate units as edges in the graph; an adjacency matrix is constructed according to the directed acyclic graph, and the adjacency matrix contains information on the topological connection relationship between the gate units, including the fan-in gate unit, fan-out gate unit and brother gate unit of each central unit, and then the compressed sparse row CSR format is used to compress the adjacency matrix;
[0017] S12: Performing logic synthesis on the register transfer level RTL netlist of the circuit through a logic synthesis tool to obtain a gate unit level netlist after logic synthesis, then performing physical design processes such as layout and routing on the synthesized netlist through a layout and routing tool to obtain a wired netlist, and then using a timing and power analysis tool to perform static timing analysis and power analysis on the wired netlist to obtain timing information and leakage power information of the circuit path; extracting the timing characteristics, capacitance characteristics and power consumption characteristics of the gate unit itself and adjacent units from the timing report; the above-mentioned timing, capacitance and power consumption related characteristics constitute a feature matrix;
[0018] S13: extracting the path of the minimum timing margin passing through each gate unit in the circuit, then traversing the set of all gate units on the path, and finding the corresponding feature vector in the feature matrix for each gate unit in the set, thereby obtaining the path feature sequence of each gate unit in the circuit; padding the sequence data to the maximum path length to solve the problem of inconsistent sequence data length caused by inconsistent path length, and obtaining the feature sequence matrix after padding;
[0019] S14: Use a commercial circuit optimization tool to optimize the leakage power consumption of the circuit by adjusting the threshold voltage, and obtain the threshold voltage type of each gate unit after the leakage power consumption optimization as the true label value for model training and inference.
[0020] The timing characteristics and capacitance characteristics of the gate unit itself include: worst output timing margin, worst input timing margin, maximum output conversion time, maximum input conversion time, total input capacitance, maximum delay change and gate unit delay; the timing characteristics and capacitance characteristics of adjacent gate units include: fan-in gate unit worst timing margin, total fan-in gate unit capacitance, fan-out gate unit worst timing margin, total fan-out gate unit capacitance, worst brother gate unit timing margin, total brother gate unit capacitance; power consumption characteristics include: initial leakage power consumption.
[0021] In the step S2, the adjacency matrix and feature matrix obtained in step S1 are used as inputs of the graph neural network GNN. First, the feature vector corresponding to each gate unit in the feature matrix is mapped to a vector of fixed dimension through the embedding layer; then the output of the embedding layer is connected to the multi-layer GNN layer for learning. The GNN layer includes an aggregation layer and a coding layer for aggregating the features of adjacent gate units. The aggregation layer aggregates the information of the fan-in, fan-out and brother gate units of each gate unit respectively. The output of the aggregation layer is used as the input of the coding layer composed of a multi-layer sensor. After learning in the coding layer, the node embedding vector of the current GNN layer is updated. The output of the current GNN layer is used as the input of the next GNN layer, and the aggregation coding process is repeated until the output of the multi-layer GNN layer is obtained; then the outputs of the multi-layer GNN are merged through the merging layer so that the final node embedding vector contains information of different depths; finally, it is output to the fully connected layer for dimensional transformation, and the final embedding vector containing circuit-level topology information is obtained through the output layer, thereby establishing a connection between the circuit topology structure and the leakage power optimization result.
[0022] In the step S3, the path feature sequence matrix obtained in the step S1 is used as the input of the bidirectional long short-term memory network BLSTM. The path feature sequence matrix is first normalized, and then the invalid filling values in the long short-term memory LSTM feature sequence generation process are compressed. Then the feature sequence is respectively input into the long short-term memory network layer forward and backward to obtain the forward long short-term memory embedding vector and the backward long short-term memory embedding vector; after the two are combined, they are transformed by the weight matrix, and then the compressed sequence is refilled for subsequent data processing, and finally input into the pooling layer for dimensionality reduction to obtain the final long short-term memory embedding vector, thereby establishing a connection between the path-level topology information and the leakage power optimization result.
[0023] In step S4, the feature matrix in step S1 is used as the input of the multi-layer perceptron MLP, and the final static embedding vector is output through the conversion of multiple layers of fully connected layers, thereby establishing a connection between the gate unit's own information and the leakage power optimization result.
[0024] The step S5 specifically comprises the following steps:
[0025] S51: merge the embedding vector containing circuit-level topology information output by the graph neural network GNN in step S2, the embedding vector containing path-level topology information output by the bidirectional long short-term memory neural network BLSTM in step S3, and the vector containing gate unit information output by the artificial neural network ANN in step S4 to obtain the final node embedding vector;
[0026] S52: Input the final node embedding vector into the threshold voltage classification network for training. The end of the classification network is connected to the output of the normalized exponential softmax function to obtain a matrix P with a dimension of |V|×n, where V represents the set of gate units in the netlist, |V| represents the number of gate units in the netlist, i represents the number of units in the netlist 1≤i≤|V|, n represents the number of types of threshold voltages used, c represents the number of threshold voltages used 1≤c≤n, and P ic represents the probability that the i-th gate unit belongs to the c-th threshold voltage in the unit library; then the cross entropy error between the predicted value and the true value of the network is calculated, and the calculation formula of the cross entropy loss function is as follows:
[0027]
[0028] Where L represents the loss function value, Y ic represents the threshold voltage allocation result of the i-th gate unit after the commercial circuit optimization tool performs leakage power optimization. If the threshold voltage is c, then Y ic =1, otherwise Y ic =0; then the adaptive moment estimation optimizer Adam is used to minimize the cross entropy loss function and optimize the model parameters. Finally, the relationship between the circuit-level topology information, the path-level topology information, the gate unit topology information and the threshold voltage type of the gate unit after leakage power optimization is established to predict the optimized threshold voltage type of the gate unit in the circuit.
[0029] Beneficial effects: The present invention discloses a digital integrated circuit optimization method, which can be applied to circuit optimization in the engineering modification (ECO) stage, and will not cause significant interference to the overall layout and wiring of the circuit; compared with commercial circuit optimization tools, the threshold voltage adjustment process does not require multiple rounds of iterations, which can greatly improve the circuit optimization speed; the prediction accuracy of the gate unit threshold voltage type is high, and a leakage power optimization effect similar to that of commercial circuit optimization tools can be achieved. The present invention is of great significance for accelerating the speed of digital integrated circuit leakage power optimization. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 Schematic diagram of the framework for optimizing leakage power consumption of digital integrated circuits;
[0031] Figure 2 Aggregation layer of the GNN model;
[0032] Figure 3 This is a schematic diagram of the graph neural network (GNN) model structure;
[0033] Figure 4 This is a schematic diagram of the bidirectional long short-term memory neural network (BLSTM) model structure;
[0034] Figure 5 Schematic diagram of the multi-layer perceptron network (MLP) model structure. DETAILED DESCRIPTION
[0035] The technical solution of the present invention is further introduced below in conjunction with specific implementation methods.
[0036] The specific implementation scheme of the present invention discloses a digital integrated circuit optimization method, wherein the optimization refers to assigning a suitable threshold voltage type to a gate unit in the circuit so as to minimize leakage power consumption; for example, the selected TSMC28nm process unit library contains three threshold voltage types, conventional threshold voltage (RVT), low threshold voltage (LVT) and ultra-low threshold voltage (ULVT). The method comprises the following steps:
[0037] S1: Extract the topological connection information between gate units, gate unit feature information and path topology information as the input of the leakage power optimization model. First, extract the topological connection relationship between gate units from the circuit netlist to form an adjacency matrix; then obtain the timing report of the specified circuit through the timing and power analysis tool, and extract the timing and power-related information to form a feature matrix, including the timing characteristics, capacitance characteristics and power consumption characteristics of the unit itself and the adjacent units; then extract the key path through each gate unit in the circuit to obtain the path feature sequence; finally, optimize the circuit leakage power through the commercial circuit optimization tool to obtain the optimized threshold voltage type of each gate unit in the circuit as the real label value for model training and inference; for example: the threshold voltage type includes three types: conventional threshold voltage (RVT), low threshold voltage (LVT) and ultra-low threshold voltage (ULVT).
[0038] S2: The adjacency matrix reflecting the topological connection relationship between gate units obtained by extracting the circuit netlist in step S1 and the timing-related feature matrix obtained by extracting the timing report are used as the input of the graph neural network GNN. After training, the network can model the circuit-level topological information, thereby establishing a connection between the circuit topology structure and the leakage power optimization results.
[0039] S3: The path feature sequence extracted in step S1 is used as the input of the bidirectional long short-term memory network BLSTM. After training, the network can model the path-level topology information of the critical path passing through each gate unit in the circuit and establish the connection between the path-level topology information and the leakage power optimization results.
[0040] S4: The feature matrix consisting of the timing and power consumption related information obtained by extracting the timing report in step S1, including the timing characteristics, capacitance characteristics and power consumption characteristics of the unit itself and the adjacent units, is used as the input of the artificial neural network ANN. After training, the model can establish the connection between the gate unit's own information and the leakage power optimization results.
[0041] S5: Merge the output of the graph neural network (GNN) model in step S2, the output of the bidirectional long short-term memory (BLSTM) neural network in step S3, and the output of the artificial neural network (ANN) in step S4; the merged vector is used as the input of the threshold voltage classification network. After training, the model can establish the relationship between the circuit-level topology information, the path-level topology information, the gate unit topology information, and the threshold voltage type of the gate unit after leakage power optimization, so as to predict the optimized threshold voltage type of the gate unit in the circuit.
[0042] Step S1 specifically includes the following steps:
[0043] S11: The circuit netlist is converted into a directed acyclic graph by representing the gate units in the circuit netlist as nodes in the graph and the interconnection lines between the gate units as edges in the graph. The adjacency matrix is constructed based on the directed acyclic graph. The adjacency matrix contains the information of the topological connection relationship between the gate units, including the fan-in gate unit, fan-out gate unit and brother gate unit of each central unit. The adjacency matrix is then compressed using the compressed sparse row CSR format.
[0044] S12: Performing logic synthesis on the register transfer level RTL netlist of the circuit through a logic synthesis tool to obtain a gate unit level netlist after logic synthesis, then performing physical design processes such as layout and routing on the synthesized netlist through a layout and routing tool to obtain a wired netlist, and then using a timing and power analysis tool to perform static timing analysis and power analysis on the wired netlist to obtain timing information and leakage power information of the circuit path; extracting the timing characteristics, capacitance characteristics and power consumption characteristics of the unit itself and adjacent units from the timing report; the above-mentioned timing, capacitance and power consumption related characteristics constitute a feature matrix;
[0045] S13: extracting the path of the minimum timing margin passing through each gate unit in the circuit, then traversing the set of all gate units on the path, finding the corresponding feature vector in the feature matrix for each gate unit in the set, thereby obtaining the path feature sequence of each gate unit in the circuit, and padding the sequence data to the maximum path length to solve the problem of inconsistent sequence data length caused by inconsistent path length, and obtaining the feature sequence matrix after padding;
[0046] S14: Use a commercial circuit optimization tool to optimize the leakage power consumption of the circuit by adjusting the threshold voltage, and obtain the threshold voltage type of each gate unit after the leakage power consumption optimization, including the conventional threshold voltage (RVT), low threshold voltage (LVT) or ultra-low threshold voltage (ULVT), as the true label value for model training and inference.
[0047] The timing characteristics and capacitance characteristics of the gate unit itself include: worst output timing margin, worst input timing margin, maximum output conversion time, maximum input conversion time, total input capacitance, maximum delay change and gate unit delay; the timing characteristics and capacitance characteristics of adjacent gate units include: fan-in gate unit worst timing margin, total fan-in gate unit capacitance, fan-out gate unit worst timing margin, total fan-out gate unit capacitance, worst brother gate unit timing margin, total brother gate unit capacitance; power consumption characteristics include: initial leakage power consumption.
[0048] In step S2, the adjacency matrix and feature matrix obtained in step S1 are used as the input of the graph neural network GNN. First, the feature vector corresponding to each gate unit in the feature matrix is mapped to a vector of fixed dimension through the embedding layer; then the output of the embedding layer is connected to the multi-layer GNN layer for learning. The GNN layer includes an aggregation layer and an encoding layer for aggregating the features of adjacent gate units. The aggregation layer aggregates the information of the fan-in, fan-out and brother gate units of each gate unit respectively. The output of the aggregation layer is used as the input of the encoding layer composed of a multi-layer perceptron. After learning in the encoding layer, the node embedding vector of the current GNN layer is updated. The output of the current GNN layer is used as the input of the next GNN layer. The aggregation encoding process is repeated until the output of the multi-layer GNN layer is obtained; then the output of the multi-layer GNN is merged through the merging layer so that the final node embedding vector contains information of different depths; finally, it is output to the fully connected layer for dimensional transformation, and the final embedding vector containing circuit-level topology information is obtained through the output layer, thereby establishing a connection between the circuit topology structure and the leakage power optimization result. For example: the number of layers of the graph neural network for extracting circuit-level topological features is 3, the number of hidden layer neurons is 128, the aggregation function uses the mean aggregation function, the number of output layer neurons is 128, the number of neighbor node samples is 15, the embedding layer dimension is 32, and the feature matrix dimension is 14.
[0049] In the step S3, the path feature sequence matrix obtained in the step S1 is used as the input of the bidirectional long short-term memory network BLSTM. First, the feature sequence matrix is normalized, and then the invalid filling values in the long short-term memory LSTM feature sequence generation process are compressed. Then, the feature sequence is input into the long short-term memory network layer forward and backward respectively to obtain the forward long short-term memory embedding vector and the backward long short-term memory embedding vector; after the two are combined, they are transformed by the weight matrix, and then the compressed sequence is refilled for subsequent data processing, and finally input into the pooling layer for dimensionality reduction to obtain the final long short-term memory embedding vector, thereby establishing the connection between the path-level topological information and the leakage power optimization result. For example: the parameters of the bidirectional long short-term memory network for extracting path-level topological features are: the number of layers of the long short-term memory network is 2, the number of neurons in the hidden layer is 128, the number of neurons in the output layer is 128, the input sequence length is the maximum path length of the circuit, and the input dimension is 14.
[0050] In step S4, the feature matrix in step S1 is used as the input of the multi-layer perceptron MLP, and the final static embedding vector is output through the conversion of multiple fully connected layers, thereby establishing the connection between the gate unit's own information and the leakage power optimization result. For example, the parameters of the multi-layer perceptron module for extracting gate unit-level features are: the number of multi-layer perceptron layers is 3, the dimension of the feature matrix is 14, the number of hidden layer neurons is 128, and the number of output layer neurons is 128.
[0051] Step S5 specifically includes the following steps:
[0052] S51: merge the embedding vector containing circuit-level topology information output by the graph neural network GNN in step S2, the embedding vector containing path-level topology information output by the bidirectional long short-term memory neural network BLSTM in step S3, and the vector containing gate unit information output by the artificial neural network ANN in step S4 to obtain the final node embedding vector;
[0053] S52: Input the final node embedding vector into the threshold voltage classification network for training. The end of the classification network is connected to the output of the normalized exponential softmax function to obtain a matrix P with a dimension of |V|×n, where V represents the set of gate units in the netlist, |V| represents the number of gate units in the netlist, i represents the number of units in the netlist 1≤i≤|V|, n represents the number of types of threshold voltages used, c represents the number of threshold voltages used 1≤c≤n, and P ic represents the probability that the i-th gate unit belongs to the c-th threshold voltage in the unit library; then the cross entropy error between the predicted value and the true value of the network is calculated, and the calculation formula of the cross entropy loss function is as follows:
[0054]
[0055] Where L represents the loss function value, Y ic represents the threshold voltage allocation result of the i-th gate unit after the commercial circuit optimization tool performs leakage power optimization. If the threshold voltage is c, then Y ic =1, otherwise Y ic =0; then the adaptive moment estimation optimizer Adam is used to minimize the cross entropy loss function and optimize the model parameters; finally, the relationship between the circuit-level topology information, the path-level topology information, the gate unit topology information and the threshold voltage type of the gate unit after leakage power optimization is established to predict the optimized threshold voltage type of the gate unit in the circuit. For example: the parameters of the threshold voltage classification network are: the number of threshold voltage categories is 3, the number of training batches is 512, the learning rate is 0.001, the optimizer selects the adaptive moment estimation optimizer Adam, and the loss function selects the cross entropy loss function.
Claims
1. A digital integrated circuit optimization method, characterized in that: The optimization refers to assigning appropriate threshold voltage types to gate units in the circuit under the premise of satisfying certain timing constraints, so that leakage power consumption is minimized; the method includes the following steps: S1: Extract the topological connection information between gate units, gate unit feature information and path topology information as the input of the leakage power optimization model; first extract the topological connection relationship between gate units from the circuit netlist to form an adjacency matrix; then obtain the timing report of the specified circuit through the timing and power analysis tool, and extract the timing and power consumption related information to form a feature matrix, including the timing characteristics, capacitance characteristics and power consumption characteristics of the unit itself and the adjacent units; then extract the key path passing through each gate unit in the circuit to obtain the path feature sequence; finally, use the commercial circuit optimization tool to optimize the circuit leakage power consumption, and obtain the optimized threshold voltage type of each gate unit in the circuit as the real label value for model training and inference; S2: The adjacency matrix reflecting the topological connection relationship between gate units obtained by extracting the circuit netlist in step S1 and the feature matrix related to timing and power consumption obtained by extracting the timing report are used as the input of the graph neural network GNN. After training, the network can model the circuit-level topological information, thereby establishing a connection between the circuit topology structure and the leakage power optimization results; S3: The path feature sequence extracted in step S1 is used as the input of the bidirectional long short-term memory network BLSTM. After training, the network can model the path-level topology information of the critical path passing through each gate unit in the circuit and establish the connection between the path-level topology information and the leakage power optimization result; S4: The feature matrix composed of the information related to timing and power consumption obtained by extracting the timing report in step S1, including the timing characteristics, capacitance characteristics and power consumption characteristics of the gate unit itself and the adjacent gate units, is used as the input of the artificial neural network ANN. After training, the model can establish the connection between the gate unit's own information and the leakage power optimization result; S5: Merge the output of the graph neural network (GNN) model in step S2, the output of the bidirectional long short-term memory (BLSTM) neural network in step S3, and the output of the artificial neural network (ANN) in step S4; the merged vector is used as the input of the threshold voltage classification network. After training, the model can establish the relationship between the circuit-level topology information, the path-level topology information, the gate unit topology information, and the threshold voltage type of the gate unit after leakage power optimization, so as to predict the optimized threshold voltage type of the gate unit in the circuit.
2. The digital integrated circuit optimization method according to claim 1, characterized in that: The step S1 specifically includes the following steps: S11: The circuit netlist is converted into a directed acyclic graph by representing the gate units in the circuit netlist as nodes in the graph and the interconnection lines between the gate units as edges in the graph; an adjacency matrix is constructed according to the directed acyclic graph, and the adjacency matrix contains information on the topological connection relationship between the gate units, including the fan-in gate unit, fan-out gate unit and brother gate unit of each central unit, and then the compressed sparse row CSR format is used to compress the adjacency matrix; S12: Performing logic synthesis on the register transfer level RTL netlist of the circuit by using a logic synthesis tool to obtain a gate unit level netlist after logic synthesis, then performing layout and routing physical design flow on the synthesized netlist by using a layout and routing tool to obtain a wired netlist, and then using a timing and power analysis tool to perform static timing analysis and power analysis on the wired netlist to obtain timing information and leakage power information of the circuit path; extracting timing characteristics, capacitance characteristics and power consumption characteristics of the gate unit itself and adjacent units from the timing report; the above-mentioned timing, capacitance and power consumption related characteristics constitute a feature matrix; S13: extracting the path of the minimum timing margin passing through each gate unit in the circuit, then traversing the set of all gate units on the path, and finding the corresponding feature vector in the feature matrix for each gate unit in the set, thereby obtaining the path feature sequence of each gate unit in the circuit; padding the sequence data to the maximum path length to solve the problem of inconsistent sequence data length caused by inconsistent path length, and obtaining the feature sequence matrix after padding; S14: Use a commercial circuit optimization tool to optimize the leakage power consumption of the circuit by adjusting the threshold voltage, and obtain the threshold voltage type of each gate unit after the leakage power consumption optimization, which is used as the true label value for model training and inference.
3. The digital integrated circuit optimization method according to claim 2, characterized in that: The timing characteristics and capacitance characteristics of the gate unit itself include: worst output timing margin, worst input timing margin, maximum output conversion time, maximum input conversion time, total input capacitance, maximum delay change and gate unit delay; the timing characteristics and capacitance characteristics of adjacent gate units include: fan-in gate unit worst timing margin, total fan-in gate unit capacitance, fan-out gate unit worst timing margin, total fan-out gate unit capacitance, worst brother gate unit timing margin, total brother gate unit capacitance; power consumption characteristics include: initial leakage power consumption.
4. The digital integrated circuit optimization method according to claim 1, characterized in that: In the step S2, the adjacency matrix and feature matrix obtained in step S1 are used as inputs of the graph neural network GNN. First, the feature vector corresponding to each gate unit in the feature matrix is mapped to a vector of fixed dimension through the embedding layer; then the output of the embedding layer is connected to the multi-layer GNN layer for learning. The GNN layer includes an aggregation layer and a coding layer for aggregating the features of adjacent gate units. The aggregation layer aggregates the information of the fan-in, fan-out and brother gate units of each gate unit respectively. The output of the aggregation layer is used as the input of the coding layer composed of a multi-layer sensor. After learning in the coding layer, the node embedding vector of the current GNN layer is updated. The output of the current GNN layer is used as the input of the next GNN layer, and the aggregation coding process is repeated until the output of the multi-layer GNN layer is obtained; then the outputs of the multi-layer GNN are merged through the merging layer so that the final node embedding vector contains information of different depths; finally, it is output to the fully connected layer for dimensional transformation, and the final embedding vector containing circuit-level topology information is obtained through the output layer, thereby establishing a connection between the circuit topology structure and the leakage power optimization result.
5. The digital integrated circuit optimization method according to claim 1, characterized in that: In the step S3, the path feature sequence matrix obtained in the step S1 is used as the input of the bidirectional long short-term memory network BLSTM, the path feature sequence matrix is first normalized, and then the invalid filling values in the long short-term memory LSTM feature sequence generation process are compressed, and then the feature sequence is respectively input into the long short-term memory network layer forwardly and backwardly to obtain the forward long short-term memory embedding vector and the backward long short-term memory embedding vector; After the two are merged, they are transformed by the weight matrix, and then the compressed sequence is refilled to facilitate subsequent data processing. Finally, they are input into the pooling layer for dimensionality reduction to obtain the final long short-term memory embedding vector, thereby establishing a connection between the path-level topology information and the leakage power optimization results.
6. The digital integrated circuit optimization method according to claim 1, characterized in that: In step S4, the feature matrix in step S1 is used as the input of the multi-layer perceptron MLP, and the final static embedding vector is output through the conversion of multiple layers of fully connected layers, thereby establishing a connection between the gate unit's own information and the leakage power optimization result.
7. The digital integrated circuit optimization method according to claim 1, characterized in that: The step S5 specifically comprises the following steps: S51: merge the embedding vector containing circuit-level topology information output by the graph neural network GNN in step S2, the embedding vector containing path-level topology information output by the bidirectional long short-term memory neural network BLSTM in step S3, and the vector containing gate unit information output by the artificial neural network ANN in step S4 to obtain the final node embedding vector; S52: Input the final node embedding vector into the threshold voltage classification network for training. The end of the classification network is connected to the output of the normalized exponential softmax function to obtain a matrix P with a dimension of |V|×n, where V represents the set of gate units in the netlist, |V| represents the number of gate units in the netlist, i represents the number of units in the netlist 1≤i≤|V|, n represents the number of types of threshold voltages used, c represents the number of threshold voltages used 1≤c≤n, and P ic represents the probability that the i-th gate unit belongs to the c-th threshold voltage in the unit library; then the cross entropy error between the predicted value and the true value of the network is calculated, and the calculation formula of the cross entropy loss function is as follows: Where L represents the loss function value, Y ic represents the threshold voltage allocation result of the i-th gate unit after the commercial circuit optimization tool performs leakage power optimization. If the threshold voltage is c, then Y ic =1, otherwise Y ic =0; then the cross entropy loss function is minimized through the adaptive moment estimation optimizer Adam to optimize the model parameters, and finally the relationship between the circuit-level topology information, the path-level topology information and the gate unit topology information and the threshold voltage type of the gate unit after leakage power optimization is established to realize the prediction of the optimized threshold voltage type of the gate unit in the circuit.
