Standard cell delay prediction method and system based on machine learning model

By applying the machine learning model of LightGBM algorithm in static timing analysis, the data in the standard unit library is modeled, which solves the problem of limited computing accuracy and efficiency in large-scale circuit design by traditional tools, and achieves more efficient and accurate timing analysis.

CN119903797APending Publication Date: 2025-04-29SHANDONG UNIV
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411948486.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-27
Publication Date
2025-04-29

AI Technical Summary

Technical Problem

When traditional static timing analysis tools deal with large-scale circuit designs, computing accuracy and efficiency are limited, especially in standard unit delay calculations, the scale of lookup tables has increased exponentially, resulting in a significant increase in the demand for storage and computing resources.

Method used

The machine learning model based on LightGBM algorithm is used to model the data in the standard unit library, and a prediction model that can effectively capture the delay characteristics is constructed through feature selection and optimization.

Benefits of technology

It improves the accuracy and computing efficiency of standard unit delay prediction, shortens computing time, meets real-time computing needs, and plays an important role in the actual chip design process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119903797A_ABST
    Figure CN119903797A_ABST
Patent Text Reader

Abstract

The invention relates to a standard unit delay prediction method and system based on a machine learning model, and belongs to the technical field of electronic design automation. And carrying out modeling on the data extracted from the standard cell library by adopting a LightGBM algorithm. Through feature selection and optimization, a prediction model capable of effectively capturing delay characteristics is constructed. Experimental results show that compared with a traditional model, the LightGBM-based method has outstanding advantages in prediction accuracy and calculation efficiency. According to the method, a machine learning algorithm is combined with a standard cell library design, a mapping relation between delay characteristics and factors such as voltage, temperature, input transmission delay time and output load is established by utilizing a machine learning model, a rapid and accurate standard cell delay prediction scheme is provided, the prediction precision is improved, and the prediction efficiency is improved. And the calculation time is reduced, an innovative solution is provided for delay analysis of the standard cell, and the method is expected to play an important role in an actual chip design process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a standard unit delay prediction method and system based on a machine learning model, belonging to the technical field of electronic design automation. Background Art

[0002] Static Timing Analysis (STA) is an important method for evaluating the timing performance in digital integrated circuit design. STA does not rely on input vectors, but determines whether the circuit can work correctly at the expected clock frequency by analyzing the timing path of the circuit. It is an essential part of the modern VLSI (very large scale integrated circuit) design process.

[0003] As chip technology continues to evolve toward the nanoscale, the scale and complexity of circuit design are growing exponentially. Current design projects often involve hundreds of millions or even billions of transistors, which places higher demands on traditional static timing analysis tools. In this context, how to improve calculation accuracy, shorten development cycles, and optimize performance has become an important research direction in the field of electronic design.

[0004] The core of STA is to analyze all possible signal propagation paths in the circuit to ensure that the signal can reach the target within the specified time and complete the logic calculation within the specified clock cycle. In this process, not only the timing path search is required, but also the delay calculation of all standard cells and interconnects on the path is required. For standard cell delay calculation, traditional static timing analysis tools mostly use a table lookup-based method combined with an interpolation algorithm to improve accuracy. This method relies on pre-simulated data in standard cell timing library files (such as .lib files). However, with the continuous increase in circuit scale and design constraints, the accuracy and efficiency of calculations will become a major limiting factor.

[0005] The calculation method of traditional STA tools is based on the decomposition and analysis of path delays, and efficient timing verification is achieved through table lookup, interpolation, and linear RC model technologies. This method achieves a good balance between accuracy and computational complexity, but with the increase in standard cell types, process node complexity, and the number of conditions, the size of the delay lookup table grows exponentially, resulting in a significant increase in storage and computing resource requirements, which may make it impossible to complete the analysis within a reasonable time. In addition, the traditional calculation model is too idealized, and the accuracy is insufficient under complex design conditions. In order to solve these problems, modern methods gradually introduce statistical static timing analysis (Statistical STA), distributed computing-based optimization, and machine learning models to enhance the capabilities of traditional methods. These new technologies can more accurately handle process changes and complex timing interactions to meet the needs of modern design. Although these new technologies have enhanced the capabilities of traditional methods in many aspects, they still have some shortcomings. For example, statistical static timing analysis is highly complex, and statistical methods often need to deal with a large number of process changes and factors such as temperature, process, and voltage (PVT), which makes the model establishment and calculation process very complicated. In addition, as the design scale increases, the computing time and resource requirements of statistical analysis will also increase significantly, making it difficult to meet the needs of modern large-scale chip design. The performance of machine learning models usually depends on a large amount of training data. Especially in chip design, the quality and quantity of training data may become a bottleneck. If the training data is insufficient, the model may overfit or have poor generalization ability. This paper proposes a standard cell delay prediction method based on machine learning models, which aims to achieve more efficient and accurate timing analysis by learning the complex relationship between standard cell delay and various design parameters. Summary of the invention

[0006] In view of the shortcomings of the prior art, the present invention provides a standard cell delay prediction method based on a machine learning model. The present invention uses the LightGBM algorithm to model the data extracted from the standard cell library. Through feature selection and optimization, a prediction model that can effectively capture the delay characteristics is constructed. Experimental results show that compared with traditional models, the LightGBM-based method shows outstanding advantages in prediction accuracy and computational efficiency. This method combines the machine learning algorithm with the standard cell library design, and uses the machine learning model to establish a mapping relationship between the delay characteristics and factors such as voltage, temperature, input transmission delay time and output load, providing a fast and accurate standard cell delay prediction solution. This method not only improves the prediction accuracy, but also reduces the calculation time, providing an innovative solution for standard cell delay analysis, and is expected to play an important role in the actual chip design process.

[0007] Terminology explanation:

[0008] 1. Standard cell: It is a basic logic unit used in digital integrated circuit design. It is a pre-designed and optimized small circuit module, usually containing logic gates, triggers or other commonly used functional blocks. The main components include logical functions, layout information, timing characteristics, etc.

[0009] 2. Input conversion time: Input conversion time (Input Transition Time), also known as input rise / fall time (Input Rise / Fall Time) or input conversion rate (Input Slew Rate), refers to the time required for the input signal of a standard cell to change from one level (such as low level or high level) to another level. Specifically, it usually indicates the time difference for the input signal voltage to complete the change from 10% to 90% (or vice versa) within the supply voltage range.

[0010] 3. Output load capacitance: Output load capacitance refers to the capacitance connected to the output of a standard unit, which is one of the key factors affecting signal propagation delay, conversion time and power consumption. In static timing analysis and delay calculation, output load usually refers to all capacitances connected to the output, including the input capacitance and wiring capacitance of the subsequent unit.

[0011] 4. Timing Arc: Timing Arc refers to the timing description of the signal propagation path from the input to the output in a standard cell. In static timing analysis, the timing arc is used to describe the propagation delay of the signal from input to output, usually including the conversion time (conversion rate) of the input signal, output load, delay model and other information. The timing arc plays an important role in the timing library file (such as .lib file) and is one of the foundations of delay calculation.

[0012] 5. Process Variation: Process variation refers to the difference in characteristics between different chips or different regions of the same chip under the same manufacturing process due to uncontrollable factors such as materials, equipment, and process steps during the semiconductor manufacturing process. Process variation directly affects the performance of transistors, including delay, current, power consumption, etc., which in turn affects the timing, function, and stability of the entire circuit. In delay calculation and timing analysis, process variation is an important factor that must be considered.

[0013] 6. LightGBM model: LightGBM (Light Gradient Boosting Machine) is an efficient implementation based on the gradient boosting algorithm (GBDT), mainly used for classification, regression and sorting tasks on large-scale data sets.

[0014] The technical solution of the present invention is as follows:

[0015] A standard cell delay prediction method based on a machine learning model is implemented by first extracting delay data from a 55nm process standard cell library. The data set includes delays under different voltages, temperatures, and cell design parameters to ensure that it is extensive and representative. After rigorous training and calibration, a delay calculation model that can adapt to a variety of voltages, temperatures, and cell parameters is successfully constructed; the model exhibits excellent generalization capabilities, not only accurately predicting delays in unknown standard cell libraries, but also having extremely high computational efficiency to meet real-time computing needs, including the following steps:

[0016] Step 1: Data collection, collecting various parameter data related to delay from the standard cell library;

[0017] Step 2: Data cleaning and processing, missing data processing and data segmentation;

[0018] Step 3: Feature selection, select important features related to delay, including but not limited to logic unit type, input and output ports, threshold voltage, rise and fall, load capacitance, input conversion time, process type, voltage and temperature, and encode the category features, which include logic unit type, input and output ports, threshold voltage and process type;

[0019] Step 4: Define the LightGBM model, select the appropriate loss function and evaluation index according to the task type, and configure the model parameters, including learning rate, number of iterations, maximum number of leaf nodes, and maximum tree depth;

[0020] Step 5: Train the LightGBM model. Use the training set data obtained in step 3 to train the model obtained in step 4. Use the GOSS (Gradient-based One-Side Sampling) method or the histogram optimization method to speed up the training process.

[0021] Step 6: Model tuning and cross-validation. Use K-fold cross-validation to evaluate the generalization ability of the model and select the optimal hyperparameter configuration. Use Grid Search or Random Search to tune the model parameters. Common adjustment parameters include the learning rate, number of iterations, maximum number of leaf nodes, and maximum tree depth set in step 4.

[0022] Step 7: Evaluate model performance. Use the 8:2 validation set in step 2 to evaluate the trained LightGBM model and calculate its prediction error. Common evaluation indicators include mean square error (MSE), root mean square error (RMSE) and R2 (coefficient of determination), which effectively measure the accuracy of the model in predicting standard cell delays;

[0023] Step 8: Feature importance analysis: Use the feature importance function provided by LightGBM to analyze the contribution of each feature to delay prediction and identify key influencing factors. Feature importance analysis helps understand the decision-making process of the model and provides feedback for subsequent model optimization and standard unit design;

[0024] Step 9: Delay prediction. Based on the LightGBM model verified and tuned in step 6, use the new standard cell data to perform delay prediction and output the delay value of each standard cell under different working conditions, including rise / fall delay.

[0025] Preferably, in step 1, key parameters and labels that affect delay need to be collected from multiple sources and dimensions to ensure the integrity, accuracy and diversity of the data. Obtain a detailed feature description file in the standard cell library, which is a Liberty format file or SPICE simulation data, and collect the gate delay (Gate Delay) of the unit, that is, the time from the input signal change to the output signal stabilization; the data needs to record the rising delay (Rising Delay) and the falling delay (Falling Delay) separately; the delay unit is usually picoseconds (ps), and multiple data points need to be recorded under different input conversion times and loads, and the actual delay value of each standard cell is extracted as a label, and the resolved characteristic value and the corresponding delay label are integrated to form a data set.

[0026] Preferably, in step 2, for the continuous variable input conversion time and load capacitance, the missing values ​​can be filled with the mean or median; the data is not standardized or normalized, because when the eigenvalue itself has a clear physical meaning, it will be more intuitive without processing. The data set is divided into a training set and a validation set in a ratio of 8:2 to ensure that the training set is used for model learning and the validation set is used for final evaluation; when dividing, the consistency of feature and label distribution is maintained to avoid data bias. The data set extracted in this step is also used for the subsequent 6-fold cross-validation of the model in step 6 to enhance the generalization ability of the model.

[0027] Preferably, in step 3, the cell type, input / output port, rise / fall, process type, voltage and temperature are first selected as features according to the standard cell classification; the lookup table (LUT, LookupTable) delay calculation model used in the EDA tool is as follows:

[0028] t delay =f(Trans,C L ,VDD)(1)

[0029] f() is the lookup table interpolation function, Trans is the input conversion time of the signal, C L is the load capacitance, VDD is the threshold voltage;

[0030] The threshold voltage, load capacitance, and input conversion time are selected as features by the above formula; in the feature encoding stage, category features such as process type (such as TT, SS, FF) and logic unit type (such as AND, OR, NAND) are converted into numerical data to facilitate model processing.

[0031] Furthermore, the one-hot encoding method is selected for encoding, each categorical variable in the categorical feature is mapped to an integer value, and then the integer index is converted into a one-hot vector.

[0032] Preferably, in step 4, a LightGBM model object is defined to capture the nonlinear relationship between features and delays, and to process the complexity of multidimensional features and process changes, so as to obtain a model that can predict standard unit delays; the basic structure of the model is a decision tree (composed of decision trees), and the growth strategy of the decision tree adopts a decision tree based on leaf growth; the framework adopts a gradient boosting framework; parameter configuration is performed to set the hyperparameters of the model to ensure a balance between performance and efficiency. Key parameters include: num_leaves (number of leaf nodes), learning_rate (learning rate), n_estimators (number of iterations), max_depth (maximum depth of the tree), max_bin (maximum number of continuous feature buckets), and min_data_in_leaf (minimum number of samples for leaf nodes), etc.

[0033] The default regression loss function of mean square error is selected, and the evaluation indicators used are: mean square error (MSE), mean absolute error (MAE), and explained variance score (EVS).

[0034] Furthermore, since the model involves many relevant parameters, through experience and evaluation of the impact on performance, the following key parameters are selected for grid search optimization:

[0035] (1) learning_rate: The default setting is 0.1, and it is generally set between 0.05 and 0.1. Choosing a smaller learning rate helps to obtain stable and better model performance.

[0036] (2) n_estimators (number of iterations): The default setting is 100. Usually, a value between 100 and 1000 is selected based on the dataset and feature data. Furthermore, to avoid overfitting, a more conservative approach is to select a larger value and combine it with early stopping rounds to allow the model to automatically select the optimal number of iterations. Selecting a larger number of iterations may result in better performance on the training set, but it may also easily lead to overfitting, thus affecting the performance of the test set.

[0037] (3) num_leaves (number of leaf nodes): The default setting is 31. This parameter has an important impact on the performance of the model and is a parameter that controls the shape of the tree. It needs to be adjusted. In the subsequent step 6, grid search optimization is used for adjustment.

[0038] Preferably, in step 5, the training set data obtained in step 3 is used to train the model obtained in step 4 using the lgb.train() method; LightGBM is an efficient gradient boosting framework. This method uses the GOSS (Gradient-based One-Side Sampling) method to optimize the training speed and memory efficiency, and selectively samples the importance of the gradient to reduce the use of data samples while retaining key information, that is, large gradient samples and representative subsets of small gradient samples; the specific steps are to calculate the gradient of each sample in each round of iteration, that is, the error derivative of the objective function to the sample, and the formula is as follows:

[0039]

[0040] MSE is the mean square error, and the formula is:

[0041]

[0042] n is the total number of samples, y i is the true value of the sample, is the sample prediction value;

[0043] Sort by gradient value in descending order, and divide the samples into high gradient group and low gradient group according to the gradient value, the first 20% is the high gradient group, and the last 80% is the low gradient group; all the samples in the high gradient group are retained, and a part of the samples are randomly sampled from the low gradient group. Furthermore, 50% of the samples are randomly sampled from the low gradient group. Too high may lead to overfitting, and too low may lead to insufficient precision; in order to compensate for the reduction of low gradient samples, the gradient of the low gradient samples is multiplied by a scaling factor to keep its total amount consistent with the original data. This method reduces the number of samples and the amount of training calculations, while maintaining the accuracy of the model by retaining high gradient samples.

[0044] Furthermore, histogram optimization is also an efficient optimization algorithm. It belongs to the feature splitting algorithm, which reduces the computational complexity by discretizing continuous feature values. Standard unit delay features (such as input conversion time and output load) are usually continuous values. When feature splitting is performed directly, the gain needs to be calculated for each splitting point. First, the data set is divided into two left and right subsets according to the splitting point, and then training and verification are performed separately. The gain calculation formula is as follows:

[0045]

[0046] n L is the number of samples in the left subset, MSE L is the mean square error of the left subset, n R is the number of samples in the right subset, MSE R is the mean square error of the right subset, MSE total is the total mean square error;

[0047] The gain is calculated based on the histogram, and the split point that maximizes the gain is selected.

[0048] Preferably, in step 6, the method uses six-fold cross validation, randomly divides the entire data set into six equal parts (folds for short), and tries to ensure the consistency of data distribution (such as the distribution of target variables and features) in each fold; selects one of the folds as the validation set, and the remaining five folds as the training set, and rotates in turn to ensure that each fold is used as a validation set once; the results of the six validations (performance indicators) are averaged as the final evaluation score of the model. The applicability of six folds is because: 1. The amount of data is moderate, and the samples are not enough to divide a large-scale validation set separately. 2. In the standard unit delay prediction task, the distribution of training data is complex and requires high stability.

[0049] Furthermore, Grid Search is used for search optimization. First, the search space is defined, and the hyperparameters that need to be tuned and the corresponding candidate values ​​are determined. For example, the parameters selected in this experiment are num_leaves: [15, 31, 62]; n_estimators: [50, 70, 100, 200]; learning_rate: [0.1, 0.2, 0.3, 0.4]. These values ​​are common candidate values. After the search optimization adjustment, the effect is significant, so no other values ​​are selected for optimization. Next, exhaustive hyperparameter combinations, including the number of leaf nodes, the number of iterations, and the cross combination between the learning rate, for each set of parameter combinations in the search space, return to step 5 to train the model and evaluate its performance until step 6; finally, compare the performance indicators of all combinations, such as the root mean square error (RMSE) or the mean square error (MSE), and select the parameter combination with the best performance as the hyperparameter of the final model.

[0050] Preferably, in step 7, the model performance is evaluated, and the following evaluation indicators are selected:

[0051] 1. Mean Squared Error (MSE): The mean squared error is the square average of the difference between the predicted value and the actual value, reflecting the overall deviation of the model prediction results. The formula is as shown in formula (3):

[0052]

[0053] n is the total number of samples, y i is the true value of the sample, is the sample prediction value;

[0054] 2. Root Mean Squared Error (RMSE) is the square root of MSE and is used to intuitively express the average level of prediction error. The formula is:

[0055]

[0056] 3. Coefficient of determination (R 2 , Coefficient of Determination), the coefficient of determination is used to measure the linear relationship between the explanatory variables of the model, indicating the degree of fit between the model prediction value and the actual value. The formula is:

[0057]

[0058] is the average of the actual values.

[0059] Preferably, in step 8, the method uses the feature importance calculation function of LightGBM to generate a feature list sorted by importance, and removes features with feature importance less than 5%.

[0060] Preferably, step 10 is also included to evaluate the accuracy of the standard unit delay calculation model based on machine learning from multiple angles, and the analysis of the model effect is mainly carried out from three aspects: first, the prediction effect of the model on different types of units under a known data set is analyzed to detect the accuracy of the model (such as steps 1-8); second, the accuracy of the model prediction under unknown PVT is analyzed, mainly based on the default data set for verification (ie step 9, using new data for prediction); finally, the accuracy is compared with other algorithm models.

[0061] A computer-readable storage medium stores a program thereon, which, when executed by a processor, implements the steps in a standard cell delay prediction method based on a machine learning model as described above.

[0062] An electronic device includes a memory, a processor, and a program stored in the memory and executable on the processor. When the processor executes the program, the steps in the standard unit delay prediction method based on a machine learning model as described above are implemented.

[0063] The present invention chooses to introduce machine learning (ML) into the field of static timing analysis as a new research direction. Compared with traditional delay calculation based on table lookup and physical model, machine learning methods can utilize a large amount of design data and statistical characteristics to achieve faster and potentially more accurate timing analysis.

[0064] In static timing analysis, machine learning models (such as regression models or neural networks) can directly predict delays based on input conversion time and output load, replacing complex table lookup and interpolation processes, significantly improving computing efficiency. At the same time, machine learning can capture the delay distribution of different process corners in the training model through generalization capabilities and quickly generate PVT analysis results.

[0065] Compared with traditional machine learning methods, the machine learning model in this paper can better adapt to complex timing changes, especially in the selection of data sets, and can ensure the accuracy of prediction results while using small-scale data training. Traditional machine learning-based delay prediction methods usually use some basic regression models or shallow models, which cannot effectively capture the nonlinear relationship between standard unit delay and various complex design factors. The machine learning model in this paper adopts a more complex model architecture, which can better fit complex data patterns and provide higher prediction accuracy. When training models, traditional machine learning methods are time-consuming and difficult to process training data efficiently. The model in this paper introduces more efficient training algorithms (such as gradient boosting trees), making the training process more efficient and able to complete large-scale data training in a shorter time. Traditional methods may perform well under certain specific design or process conditions, but when faced with new or unseen design data, they may overfit or fail to adapt. The model in this paper has stronger generalization ability and can maintain stable prediction performance under different process nodes or design conditions.

[0066] The beneficial effects of the present invention are:

[0067] 1. The present invention proposes a standard cell delay prediction method based on a machine learning model, embeds the delay calculation rules into the machine learning algorithm, uses an improved machine learning model to capture complex nonlinear relationships, reduces delay prediction errors, and improves the reliability of chip design.

[0068] 2. The present invention proposes a standard cell delay prediction method based on a machine learning model, which can adapt to the combination of various process angles, temperatures, and voltages through training data, automatically capture the nonlinear impact of various conditions on delay, and significantly improve the applicability and flexibility of the model.

[0069] 3. This paper proposes a standard cell delay prediction method based on a machine learning model. The trained LightGBM model only needs to perform simple matrix operations in the prediction stage, which is much faster than traditional numerical calculations or SPICE simulations. The prediction time is significantly reduced, making delay calculation of large-scale standard cell libraries possible.

[0070] 4. The present invention proposes a standard cell delay prediction method based on a machine learning model, which can efficiently process a large number of standard cells and their characteristic data and perform batch prediction, thereby improving the feasibility and efficiency of large-scale delay prediction.

[0071] 5. The present invention proposes a standard cell delay prediction method based on a machine learning model. The machine learning model is naturally suitable for integration into modern EDA tools and seamlessly combined with the automated chip design process. The delay prediction model is embedded into the EDA process through an interface to achieve automation from feature extraction to delay prediction. This greatly improves design efficiency and reduces development cycles. BRIEF DESCRIPTION OF THE DRAWINGS

[0072] Figure 1 A schematic diagram of the standard unit prediction process based on the machine learning model;

[0073] Figure 2 It is a schematic diagram of prediction results of the operation unit full adder ADDF of Example 1;

[0074] Figure 3 A schematic diagram of a prediction result of a sequential logic unit D flip-flop DDF in Example 1;

[0075] Figure 4 It is a schematic diagram of prediction results of the combinational logic unit inverter INV of Example 1;

[0076] Figure 5 This is a schematic diagram of the prediction results under unknown PVT of Example 1. DETAILED DESCRIPTION

[0077] The present invention will be further described below by way of embodiments in conjunction with the accompanying drawings, but is not limited thereto.

[0078] Embodiment 1:

[0079] Embodiment 1 of the present invention uses a machine learning model to perform delay prediction on a standard cell data set extracted from a UMC 55nm library. Table 1 lists the selected features.

[0080] Table 1 Feature selection table

[0081]

[0082] This embodiment achieves efficient prediction of standard cell delay through sufficient data preparation and effective model optimization. In the data preparation stage, the high quality of model input data is ensured through in-depth analysis and parameterization processing; in the algorithm selection and optimization stage, an efficient and stable LightGBM model is constructed through cross-validation and grid search, and finally a fast and accurate standard cell delay calculation method is formed, which provides strong technical support for chip design optimization.

[0083] The environment used in this embodiment is a laboratory local server, and data is generated, extracted and processed by python scripts. The experiment samples the UMC55nm standard cell library, which contains the cell delay information of three types of standard cells, including combinational logic cells, sequential logic cells and arithmetic cells, with a total of 11725 data. However, the process library is not limited to the above examples.

[0084] Figure 1 FIG. 1 is a flow chart of a standard cell delay prediction method based on a machine learning model of the present invention. Figure 1 As shown, file parsing and data extraction are performed at step 101. The standard cell library is usually provided in Liberty format (.lib), containing detailed mapping data between cell delay and input characteristics (such as load, voltage, temperature, etc.). To analyze the features that have a significant impact on delay, first, cell type, input and output ports, rise and fall, process type, voltage and temperature are selected as features according to the standard cell classification. The lookup table (LUT) delay calculation model used in EDA tools is as follows:

[0085] t delay =f(Trans,C L ,VDD)(1)

[0086] f() is the lookup table interpolation function, Trans is the input conversion time of the signal, C L is the load capacitance and VDD is the threshold voltage.

[0087] The threshold voltage, load capacitance, and input conversion time are selected as features by the above formula. The data is extracted using a Python script and stored in a processable format (such as a CSV file). The actual delay value of each standard unit is extracted as a label, and the parsed feature value and the corresponding delay label are integrated to form a sample set. The next step is data segmentation, with the training set and test set divided in a ratio of 8:2.

[0088] At step 102, the model is selected. First, a preliminary evaluation is performed, and a variety of algorithms suitable for multivariate nonlinear regression tasks are selected for performance evaluation, such as XGBoost, random forest model, etc. The LightGBM model is determined based on the following: 1. Lightweight: LightGBM has the advantages of fast training speed and low memory usage. 2. Performance: In regression tasks with more features, LightGBM can usually provide high-precision predictions.

[0089] At step 103, the model is optimized and cross-validated. This method selects grid search optimization to traverse all possible parameter combinations to find the best configuration. Grid search first sets a set of candidate values ​​for each hyperparameter, and then generates the Cartesian product of these candidate values ​​to form a combination grid of hyperparameters. Next, grid search will perform model training and evaluation on each hyperparameter combination to find the best performing hyperparameter combination. The next step is to use 6-fold cross-validation (k-fold cross-validation) to divide the data set into k subsets, which are used as validation sets in turn, and the rest are used as training sets to calculate the average performance. The goal is to avoid overfitting or underfitting of the model and ensure the generalization ability of the model to unknown data.

[0090] At step 104, delay prediction and verification evaluation are performed. After the model is established and training is completed, the standardized test set is input into the LightGBM model for unknown unit delays, and the predicted delay value is output. By analyzing the error of the model in calculating the delay, the performance of the model is evaluated from multiple aspects. The analysis of the model effect is mainly carried out from three aspects. The first is to analyze the prediction effect of the model on different types of units under a known data set and detect the accuracy of the model. The second is the accuracy analysis of the model's prediction under unknown PVT, which is mainly verified based on the default data set. Finally, the accuracy is compared with other algorithm models. In addition, the accuracy and stability of the model can also be evaluated by indicators such as mean absolute error (MAE) and mean square error (MSE).

[0091] The specific implementation steps are as follows:

[0092] Step 1: Data collection, it is necessary to collect key parameters and labels that affect delay from multiple sources and multiple dimensions to ensure the integrity, accuracy and diversity of the data. In order to achieve efficient data collection and organization for standard cell delay prediction, this method chooses to use Python scripts to parse standard cell library files (such as .lib files) and organize the extracted data into a standardized CSV file format. This process is divided into the following steps: 1. Understand the standard cell library file format and analyze the core information contained, such as cell definitions, characteristic data, and environmental parameters. 2. Organize the file parsing logic, use regular expressions to extract data, and perform hierarchical processing. 3. Perform data organization, expand the parsed data structure into a table form, and store it in a CSV file.

[0093] Step 2: Data cleaning and processing, missing data processing and data segmentation. This method does not standardize or normalize the data, because when the eigenvalue itself has a clear physical meaning, it will be more intuitive without processing; for continuous variables such as input conversion time and load capacitance, the mean or median can be used to fill the missing values. When segmenting, maintain the consistency of feature and label distribution to avoid data bias. Use a random number generator to randomly select samples, assign 80% of the samples to the training set, and the remaining 20% ​​to the validation set. At the same time, we must ensure that the random seed is fixed (such as random_state = 42) to ensure the repeatability of the segmentation. This data set is also prepared for the subsequent cross-validation of the model, dividing the complete data set into 6 equal parts to enhance the generalization ability of the model.

[0094] Step 3: Feature selection, select important features related to delay, including but not limited to logic cell type, input and output ports, threshold voltage, rise and fall, load capacitance, input conversion time, process type, voltage and temperature. The main factors affecting cell delay include environmental conditions, cell type and various cell-related properties. Environmental conditions mainly refer to PVT. Different types of cells have different delay information, and the same type of cells have different delays due to their different cell properties. In addition, different circuit structures will also affect the delay of the cell. Changes in the conversion time and load capacitance of the cell input have a significant impact on the delay. There are many factors that affect the delay after analysis, but the more features, the better. After evaluation, this paper only retains the features in Table 1. The next step is to encode the categorical features. The categorical features are a type of features with discrete values ​​(such as process corners, logic cell types, etc.). This method selects the one-hot encoding method for encoding, maps each categorical variable in the categorical feature to an integer value, and then converts the integer index into a one-hot vector. One-hot encoding is suitable for unordered features between categories (such as logical unit types). Although it will increase the feature dimension and may cause high-dimensional problems (dimensionality explosion), it has little impact on tree models such as LightGBM.

[0095] Step 4: Define the LightGBM model. The task type for this method is a multivariate nonlinear regression problem, and the goal is to predict the standard unit delay value (continuous variable). When selecting the loss function, the mean square error default regression loss function is selected according to the characteristics of the regression task. The evaluation indicators used are: 1. Mean square error (MSE) 2. Mean absolute error (MAE) 3. Explained variance score (EVS). Regarding the parameters of the model, this method selects the default parameters of the model in this step. Some of the selected parameters are shown in Table 2 below.

[0096] Table 2 Model parameters

[0097]

[0098] Step 5: Train the LightGBM model. Use the training set data obtained in step 3 to train the model obtained in step 4. Use the GOSS (Gradient-based One-Side Sampling) method to accelerate training. The process is as follows: 1. At each iteration, calculate the gradient of each sample (that is, the error derivative of the objective function to the sample). 2. Sort by gradient value in descending order, and retain the top 20% (default value) of samples. 3. Randomly sample low-gradient samples and randomly select 50% from the remaining 80% of samples. Multiply the gradient of the low-gradient sample by a scaling factor to keep its total amount consistent with the original data. 4. Perform model update and leaf node split calculation based on the screened samples. The histogram optimization process is as follows: 1. Initialize the LightGBM model parameters and build the initial tree structure. 2. Generate histograms on all features, and count the gradients and values. 3. Use the histogram to calculate the split gain and select the optimal split point.

[0099] Step 6: Model tuning and cross-validation, using 6-fold cross-validation. The model parameters are tuned using the Grid Search grid search method, and all possible hyperparameter combinations are traversed to find the optimal configuration. The grid search first sets a set of candidate values ​​for each hyperparameter, and then generates the Cartesian product of these candidate values ​​to form a combination grid of hyperparameters. Next, the grid search will train and evaluate the model for each hyperparameter combination to find the best performing hyperparameter combination. Due to the large number of related parameters involved in the model, through experience and evaluation of the impact on performance, several key parameters in the following table are selected for grid search optimization. Table 3 is the parameter search range table. After optimization by the imported GridSearchCV, the best parameter values ​​are obtained: {'learning_rate': 0.2, 'n_estimators': 200, 'num_leaves': 31}.

[0100] Table 3 Grid search parameters

[0101]

[0102]

[0103] Step 7: Evaluate model performance. Use the 8:2 validation set in step 2 to evaluate the trained LightGBM model and calculate its prediction error. Taking the combinatorial logic unit INV as an example, multiple machine learning models are used for training, and the calculation results after six-fold cross validation and grid search are shown in the following table, which clearly shows the advantages of the LightGBM algorithm in time series prediction.

[0104] Table 4 Algorithm model effect comparison table

[0105]

[0106] Step 8: Feature importance analysis: Through the feature importance function provided by LightGBM, analyze the contribution of each input feature to delay prediction and identify key influencing factors. Feature importance analysis helps to understand the decision-making process of the model and provide feedback for subsequent model optimization and standard unit design. The feature importance ranking table is as follows:

[0107] Table 5 Feature importance table

[0108]

[0109] As can be seen from the table, the features selected by this method are highly relevant to delay prediction. Although the influence of PVT environmental factors is less than 5%, the features are still retained because of the influence of OCV (On-Chip Variation).

[0110] Step 9: Delay prediction. Based on the LightGBM model verified and tuned in step 6, new standard cell data is used for delay prediction. This method models and predicts three different types of cells in the standard cell timing library under 6 corners in the temperature range of -40℃ to 125℃ and the voltage range of 1.08V to 1.2V. According to the logical function of the cell, the combinational logic cell (inverter INV), the arithmetic unit (full adder ADDF) and the sequential logic unit (D flip-flop DFF) were selected in turn. A total of 588, 7055 and 4082 delay data were extracted respectively.

[0111] The prediction results for each type of unit are as follows: INV unit: the average prediction accuracy reached 99.76%, the average relative error was controlled at 3.4ps, the minimum error was 0.01ps, and the maximum error was 17.1ps. DFF unit: the average prediction accuracy reached 99.27%, the average relative error was controlled at 7ps, the minimum error was 0.1ps, and the maximum error was 24ps. ADDF unit: the average prediction accuracy reached 99.82%, the average relative error was controlled at 7.7ps, the minimum error was 0.06ps, and the maximum error was 86.4ps. These results show that the prediction accuracy of the model on different units shows a high accuracy rate, especially on INV and ADDF units, the prediction error is small, and the accuracy rate is close to 99.8%.

[0112] The prediction results are shown in the figure Figure 2 , Figure 3 as well as Figure 4 As shown in the three prediction comparison charts, it can be seen that the model has a good prediction effect on unit delay, and the error difference between different units is not large. This effect is due to the following points: 1. The completeness and accuracy of the data set: The data set used in this article covers the variation range of various unit types and their different delay indexes, ensuring the uniform distribution and representativeness of the data, thus providing a reliable foundation for model training. 2. The superior performance of the LightGBM model: LightGBM effectively improves the prediction accuracy with its powerful modeling capabilities and optimization strategies. In addition, the grid search optimization process of the model further improves the overall prediction effect. Overall, the prediction model in this article performs stably on different unit delays, which verifies the feasibility and advantages of the method.

[0113] The cell delay of sequential logic unit DFF at temperatures of -40℃, 25℃, 85℃ and 125℃, voltages of 1.08V, 1.2V and 1.32V, and processes of ff, ss and tt is selected as the training set to predict the cell delay under the unknown PVT conditions of voltage 1.32V, temperature 125℃ and process ff. The average prediction accuracy under voltage 1.32V, temperature 125℃ and process ff reaches 98.66%, the average relative error is controlled at 6.6ps, the minimum error is 0.2ps, and the maximum error is 16ps. Figure 5 It can be seen that the calculation error of the model on the test set is small, indicating that its prediction effect under unknown PVT conditions is significant and has good generalization ability and stability.

[0114] Example 2

[0115] A computer-readable storage medium stores a program thereon, which, when executed by a processor, implements the steps in a standard cell delay prediction method based on a machine learning model as described above.

[0116] Example 3

[0117] An electronic device includes a memory, a processor, and a program stored in the memory and executable on the processor. When the processor executes the program, the steps in the standard unit delay prediction method based on a machine learning model as described above are implemented.

Claims

1. A standard cell delay prediction method based on a machine learning model, characterized in that: The implementation method is to first extract delay data from the standard cell library. The data set includes delay conditions under different voltages, temperatures, and cell design parameters. After training and calibration, a delay calculation model that can adapt to multiple voltages, temperatures, and cell parameters is constructed. The steps include: Step 1: Data collection, collecting various parameter data related to delay from the standard cell library; Step 2: Data cleaning and processing, missing data processing and data segmentation; Step 3: Feature selection, select important features related to delay, including logic unit type, input and output ports, threshold voltage, rise and fall, load capacitance, input conversion time, process type, voltage and temperature, and encode the category features, which include logic unit type, input and output ports, threshold voltage and process type; Step 4: Define the LightGBM model, select the loss function and evaluation index according to the task type, and configure the model parameters, including learning rate, number of iterations, maximum number of leaf nodes, and maximum tree depth; Step 5: Train the LightGBM model. Use the training set data obtained in step 3 to train the model obtained in step 4. Use the GOSS method or histogram optimization method to accelerate the training process. Step 6: Model tuning and cross-validation. Use cross-validation to evaluate the generalization ability of the model and select the optimal hyperparameter configuration. Use Grid Search or Random Search to tune the model parameters. The adjustment parameters include the learning rate, number of iterations, maximum number of leaf nodes, and maximum tree depth set in step 4. Step 7: Evaluate model performance. Evaluate the trained LightGBM model and calculate its prediction error. Evaluation indicators include mean square error, root mean square error and determination coefficient R. 2 ; Step 8: Feature importance analysis: Analyze the contribution of each feature to delay prediction through the feature importance function provided by LightGBM; Step 9: Delay prediction. Based on the LightGBM model verified and tuned in step 6, use the new standard cell data to perform delay prediction and output the delay value of each standard cell under different working conditions, including rise / fall delay.

2. The standard cell delay prediction method based on a machine learning model according to claim 1, characterized in that: In the step 1, a characteristic description file in a standard cell library is obtained, the characteristic description file is a Liberty format file or SPICE simulation data, and the gate delay of the acquisition unit is collected, that is, the time from the input signal change to the output signal stabilization; The data needs to record the rise delay and fall delay separately; the delay unit is picoseconds, and multiple data points are recorded at different input conversion times and loads. The actual delay value of each standard unit is extracted as a label, and the resolved characteristic value and the corresponding delay label are integrated to form a data set; Preferably, in step 2, for the continuous variables input conversion time and load capacitance, the missing values ​​are filled with the mean or median; the data set is divided into a training set and a validation set in a ratio of 8:2, the training set is used for model learning, and the validation set is used for final evaluation; the data set extracted in this step is also used for the subsequent cross-validation of the model in step 6.

3. The standard cell delay prediction method based on a machine learning model according to claim 1, characterized in that: In step 3, firstly, the cell type, input and output ports, rise and fall, process type, voltage and temperature are selected as features according to the standard cell classification; The delay calculation model of the lookup table (LUT) used in EDA tools is as follows: t delay =f(Trans,C L ,VDD)(1) f() is the lookup table interpolation function, Trans is the input conversion time of the signal, C L is the load capacitance, VDD is the threshold voltage; The threshold voltage, load capacitance, and input transition time are selected as features by the above formula; In the feature encoding stage, the categorical features are converted into numerical data; Furthermore, the one-hot encoding method is selected for encoding, each categorical variable in the categorical feature is mapped to an integer value, and then the integer index is converted into a one-hot vector.

4. The standard cell delay prediction method based on a machine learning model according to claim 1, characterized in that: In the step 4, a LightGBM model object is defined to capture the nonlinear relationship between features and delays, and to process the complexity of multidimensional features and process changes, so as to obtain a model for predicting standard cell delays; the basic structure of the model is a decision tree, and the growth strategy of the decision tree adopts a decision tree based on leaf growth; The framework adopts the gradient boosting framework; parameter configuration is performed to set the model's hyperparameters. Key parameters include: number of leaf nodes, learning rate, number of iterations, maximum tree depth, maximum number of continuous feature buckets, and minimum number of samples for leaf nodes; The default regression loss function of mean square error is selected, and the evaluation indicators used are: mean square error, mean absolute error, and explained variance score; Furthermore, the following key parameters are selected for grid search optimization: (1) Learning rate: The default setting is 0.1, and you can choose a setting between 0.05 and 0.1; (2) Iterations: The default setting is 100. You can choose a value between 100 and 1000 based on the dataset and feature data. Furthermore, you can choose a larger value and combine it with early stopping to allow the model to automatically select the optimal number of iterations. (3) Number of leaf nodes: The default setting is 31; this will be optimized and adjusted in the subsequent step 6.

5. The standard cell delay prediction method based on a machine learning model according to claim 1, characterized in that: In step 5, the training set data obtained in step 3 is used to train the model obtained in step 4 using the lgb.train() method; the GOSS method is used to optimize the training speed and memory efficiency, and the use of data samples is reduced by selectively sampling the importance of the gradient, while retaining key information, that is, large gradient samples and representative subsets of small gradient samples; the specific steps are to calculate the gradient of each sample in each round of iteration, that is, the error derivative of the objective function to the sample, and the formula is as follows: MSE is the mean square error, and the formula is: n is the total number of samples, y i is the true value of the sample, is the sample prediction value; Sort by gradient value in descending order, and divide the samples into high gradient group and low gradient group according to the gradient value, with the first 20% being the high gradient group and the last 80% being the low gradient group; retain all the samples in the high gradient group, randomly sample a part of the samples from the low gradient group, and further, randomly sample 50% of the samples from the low gradient group; multiply the gradient of the low gradient samples by a scaling factor to keep the total amount consistent with the original data; Furthermore, histogram optimization belongs to the feature splitting algorithm; The standard unit delay feature is usually a continuous value. When directly splitting the feature, it is necessary to calculate the gain for each split point. First, the data set is divided into two subsets, the left and the right, according to the split point, and then training and verification are performed separately. The gain calculation formula is as follows: n L is the number of samples in the left subset, MSE L is the mean square error of the left subset, n R is the number of samples in the right subset, MSE R is the mean square error of the right subset, MSE total is the total mean square error; The gain is calculated based on the histogram, and the split point that maximizes the gain is selected.

6. The standard cell delay prediction method based on a machine learning model according to claim 1, characterized in that: In step 6, this method uses six-fold cross validation, randomly divides the entire data set into six equal parts, and ensures the consistency of data distribution in each fold; selects one fold as the validation set, and the remaining five folds as the training set, and rotates in turn, each fold is used as a validation set; the results of the six validations are averaged as the final evaluation score of the model; Furthermore, Grid Search is used for search optimization. First, the search space is defined to determine the hyperparameters that need to be tuned and the corresponding candidate values. Next, the hyperparameter combinations are exhausted, including the cross-combinations between the number of leaf nodes, the number of iterations, and the learning rate. For each set of parameter combinations in the search space, the model is trained in step 5 and its performance is evaluated until step 6. Finally, the performance indicators of all combinations, such as root mean square error or mean square error, are compared, and the parameter combination with the best performance is selected as the hyperparameters of the final model.

7. The standard cell delay prediction method based on a machine learning model according to claim 1, characterized in that: In step 7, the model performance is evaluated, and the following evaluation indicators are selected:

1. Mean square error: The mean square error is the square average of the difference between the predicted value and the actual value, reflecting the overall deviation of the model prediction results. The formula is as shown in formula (3); 2. Root mean square error, the root mean square error is the square root of MSE, which is used to intuitively express the average level of prediction error. The formula is:

3. Coefficient of determination R 2 The coefficient of determination is used to measure the linear relationship between the explanatory variables of the model, indicating the degree of fit between the model prediction value and the actual value. The formula is: is the average of the actual values.

8. The standard cell delay prediction method based on a machine learning model according to claim 1, characterized in that: In step 8, this method uses the feature importance calculation function of LightGBM to generate a feature list sorted by importance, and removes features with feature importance less than 5%; Preferably, step 10 is also included, evaluating the accuracy of the standard unit delay calculation model based on machine learning from multiple angles, and analyzing the model effect from three aspects: first, analyzing the prediction effect of the model on different types of units under a known data set to detect the accuracy of the model; second, analyzing the accuracy of the model's prediction under unknown PVT, and verifying it based on a default data set; finally, comparing the accuracy with other algorithm models.

9. A computer-readable storage medium, characterized in that: A program is stored thereon, which, when executed by a processor, implements the steps in a standard cell delay prediction method based on a machine learning model as described in any one of claims 1-8.

10. An electronic device, characterized in that: It includes a memory, a processor, and a program stored in the memory and executable on the processor. When the processor executes the program, the steps in a standard cell delay prediction method based on a machine learning model as described in any one of claims 1 to 8 are implemented.

Citation Information

Patent Citations

  • Intelligent regulation and control method for cement decomposing furnace based on machine learning and intelligent optimization algorithm

    CN114721263A

  • Reservoir level prediction method based on multi-source data fusion integration

    CN117973600A

  • Explanatable landslide surface displacement prediction method based on LightGBM and SHAP

    CN118536032A

  • Low-voltage distributed photovoltaic power prediction method under in-situ balance scene

    CN118783396A