SoC power supply network dynamic voltage drop prediction method based on diffusion model
The U-shaped neural network model based on the diffusion model solves the problem of long time consumption and low accuracy of dynamic voltage drop prediction of SoC power network, achieving more accurate voltage drop prediction and adapting to different operating conditions and chip designs.
Patent Information
- Application Number
- CN202410750027.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-12
- Publication Date
- 2024-10-01
AI Technical Summary
In the existing technology, the SoC power network dynamic voltage drop prediction method is too time-consuming and has low accuracy, especially problems in solving sparse linear equations and traditional machine learning algorithms.
A U-shaped neural network model based on the diffusion model is used to preprocess the historical power consumption and voltage drop data of the SoC chip power network to generate a training data set, and use the noise intensity sequence and diffusion steps to build a dynamic voltage drop prediction model. Forward propagation and reverse diffusion to minimize the loss function for accurate voltage drop prediction.
This method can more accurately simulate and predict the voltage drop behavior of the SoC power network under different operating conditions, capture complex nonlinear relationships, provide more accurate prediction results, and adapt to different chip designs and working conditions.
Smart Images

Figure CN118734683A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of integrated circuit design automation, and in particular relates to a method for predicting dynamic voltage drop of a SoC power supply network based on a diffusion model. Background Art
[0002] With the rapid development of microelectronics technology, the scale and complexity of integrated circuits are increasing, which leads to increasingly severe challenges in power network design. At advanced process nodes, the width of metal interconnects is reduced, the resistivity is relatively increased, and the increase in chip integration makes the design and analysis of power networks more difficult. Excessive deviations in the prediction of dynamic voltage drops in circuit units may cause functional failures and pose a threat to the overall performance and reliability of the chip. Therefore, in the final confirmation stage of integrated circuit design, accurate prediction of power network voltage drops becomes particularly critical.
[0003] Voltage drop can be divided into two types: static and dynamic. Voltage drop is mainly due to the voltage divider effect caused by the resistance of the metal wires in the power network. When current flows from the power port through the power network, a voltage drop will occur on the path due to the resistance of the wires. This voltage drop is closely related to the structure of the power network and is mainly determined by the resistance effect.
[0004] Currently, commercial software generally abstracts the physical design inside the SoC into a mathematical model, and then solves a large sparse linear system of equations to obtain the voltage drop at each node. However, solving on a matrix scale of hundreds of billions of nodes usually requires hundreds of hours of calculation, which is often the most resource-consuming simulation link in digital back-end design. In recent years, with the development of artificial intelligence technology, the technology of using machine learning to predict dynamic voltage drop has also been proposed. The method based on machine learning is superior to the method based on solving sparse linear equations in terms of prediction speed, but there is still much room for improvement in accuracy.
[0005] In summary, in order to solve the above problems, it is necessary to improve and optimize the SoC power network dynamic voltage drop prediction method. Summary of the invention
[0006] Technical problem to be solved: The present invention provides a method for predicting the dynamic voltage drop of a SoC power supply network based on a diffusion model, which can solve the problems in the current field of dynamic voltage drop prediction of a SoC power supply network that the method of solving a sparse linear equation group is too time-consuming and the traditional machine learning algorithm has low accuracy.
[0007] Technical solution:
[0008] A method for predicting dynamic voltage drop of a SoC power supply network based on a diffusion model, the method comprising the following steps:
[0009] S1, obtain the historical power consumption report of the SoC chip power network through the integrated circuit power consumption analysis tool, pre-process the historical power consumption report to obtain the corresponding feature data X, pre-process the voltage drop data of the SoC chip power network to obtain the corresponding true value label Y, and combine the feature data X and the true value label Y to generate a training data set;
[0010] S2, based on the principle of diffusion model, a U-type neural network model is used to build a dynamic pressure drop prediction model, and the dynamic pressure drop prediction model is trained using a training data set; the input of the dynamic pressure drop prediction model is feature data X, and the output is the true value label Y;
[0011] S3, obtain the power consumption report of the SoC chip power network to be predicted from the integrated circuit power consumption analysis tool, and extract the characteristic data X new , import the trained dynamic voltage drop prediction model to predict the voltage drop data.
[0012] Step S1 further comprises:
[0013] Obtain power consumption reports of n SoC chip power networks from the integrated circuit power consumption analysis tool, select internal power consumption, switch power consumption, total power consumption and switching rate scaled power consumption data, and obtain feature data X through data preprocessing; at the same time, analyze the voltage drop data of n SoC chip power networks, and use it as the true value label Y after preprocessing; the feature data X generated by the same SoC chip power network and the true value label Y are one-to-one corresponding, and the feature data generated by the i-th SoC chip power network is defined as X i , and the true value label is defined as Y i .
[0014] Furthermore, the process of selecting internal power consumption, switch power consumption, total power consumption and switching rate scaled power consumption data and obtaining characteristic data X through data preprocessing includes the following steps:
[0015] The internal power consumption, switch power consumption, total power consumption and switching rate scaled power consumption data of each SoC chip power network sample are scaled into a two-dimensional matrix of size (256, 256), and the generated four matrices are normalized and concatenated in the channel dimension. The normalization formula is:
[0016]
[0017] Among them, x is the element value of the power consumption data in the two-dimensional matrix, x max is the maximum value of the two-dimensional matrix element, x min is the minimum value of the two-dimensional matrix elements, x new The value of the newly generated element.
[0018] Furthermore, the process of analyzing the voltage drop data of n SoC chip power supply networks and obtaining the data as the true value label Y after preprocessing includes the following steps:
[0019] Remove all axes with a dimension of 1 in the array from the voltage drop data, then crop the data, limit the elements in the array to the range of (0.000001, 50), adjust the image size to (256, 256), and finally perform logarithmic scaling. The formula for logarithmic scaling is:
[0020]
[0021] Among them, y is the element value in the two-dimensional matrix of the original true value voltage drop label, y new is the newly generated voltage drop element value.
[0022] Step S2 further comprises:
[0023] S201, setting a noise intensity sequence β, wherein the noise intensity sequence β includes T noise intensities; β t represents the noise intensity of the t-th diffusion step, and the value range of the noise intensity is (0,1), β t As the t value increases, it changes according to the law of the cosine function, t = 1, 2, ..., T;
[0024] S202, for each diffusion step t, according to the current noise level β t , generates a noise vector ∈ with the same dimension as the true value voltage drop label of the sample t , the noise vector is sampled from a standard normal distribution;
[0025] S203, in each diffusion step t, a new noised real value voltage drop sample is calculated, and the calculation formula is as follows:
[0026]
[0027] Among them, y t-1 is the noisy real-value voltage drop sample from the previous step, y t is the noised real-value voltage drop sample at the t-th diffusion step;
[0028] S204, after each diffusion step, store the current noised real value voltage drop sample y t and its corresponding noise level β t , and calculate the cumulative noise from diffusion step 0 to diffusion step t;
[0029] S205, concatenate the input feature data X and the noised real value voltage drop sample of the t-th diffusion step constructed in step S203 along the channel dimension to generate the input feature data X of the t-th diffusion stept ;
[0030] S206, the data X spliced in step S205 t The code of the current time step t is input into the U-type neural network to perform forward propagation and obtain the noise o predicted by the model. t ;
[0031] S207, calculate the noise o predicted by the model t With the real noise ∈ t The difference between them is taken and squared to get the loss of each element; the losses of all elements are summed up, and then the average loss of all noise elements in the sample is calculated to get the final noise estimation loss L:
[0032]
[0033] Where N is the number of all elements in the sample;
[0034] S208, repeating steps S201 to S207, and minimizing the value of the loss function L through continuous training until the number of training rounds reaches a preset maximum number of training rounds.
[0035] Step S3 further comprises:
[0036] S301, prepare a random noise image as the starting point of inference, the random noise image is a random noise e0 with Gaussian distribution, and the feature data X new The size of the channel is 1; the random noise e0 and the characteristic data X as the control condition are matched. new Splice according to the channel dimension, and use the splicing result and the encoding of the current time step t=1 as the initial input of the diffusion model;
[0037] S302, load the trained dynamic pressure drop prediction model, set the sampling time step in the inference process to T, start from the initial input data generated in step S301, and gradually perform the reverse diffusion steps; except for the time step of 1, the input of each time step is the output data of the previous step and the feature data X new The concatenation is done by channel dimension and the encoding of the current time step t. At each step, the model predicts the noise component of the current noisy image and removes this part of the noise from the current image. The formula for removing noise is as follows:
[0038]
[0039] Among them, Y t is the current noisy image, o is the noise predicted by the model, and a t is a parameter related to the time step, which is used to control the strength of denoising. t =1-βt ;
[0040] S303, repeat step S302 until the required time step is reached, perform denormalization on the output voltage drop, and restore the size to the size of the characteristic data to obtain the final prediction result of the SoC chip power network.
[0041] Beneficial effects:
[0042] The SoC power network dynamic voltage drop prediction method based on the diffusion model of the present invention can more accurately simulate and predict the voltage drop behavior of the SoC power network under different operating conditions by utilizing the complex system modeling capability of the diffusion model. The model can capture complex nonlinear relationships and can also adapt to different chip designs and operating conditions, thereby providing more accurate prediction results. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 It is a flow chart of the method for predicting dynamic voltage drop of SoC power supply network based on diffusion model of the present invention;
[0044] Figure 2 It is a schematic diagram of the structure of the U-type neural network of the present invention. DETAILED DESCRIPTION
[0045] The following examples will enable those skilled in the art to more fully understand the present invention, but are not intended to limit the present invention in any way.
[0046] The present invention discloses a method for predicting dynamic voltage drop of a SoC power supply network based on a diffusion model. Figure 1 As shown, the specific steps include:
[0047] Step S1: Obtain the power consumption report of the SoC chip power network from an integrated circuit power consumption analysis tool such as Cadence's Innovus, perform preprocessing and generate a training data set:
[0048] Obtain power consumption reports of n SoC chip power networks from the integrated circuit power consumption analysis tool, select internal power consumption, switch power consumption, total power consumption and switching rate scaled power consumption data, and use them as input feature data X for model training in step 2 after data preprocessing. At the same time, use the traditional simulation-based method to analyze the voltage drop data of the n SoC chip power networks, and use them as the true value label Y for model training in step 2 after data preprocessing. The feature data X and true value label Y generated by the same SoC chip power network correspond one to one. Define the feature data generated by the i-th SoC chip power network as X i , and the true value label is defined as Y iAmong them, the simulation-based methods include using commercial tools such as Innovus to directly generate voltage drop data, and modeling the power network as a sparse linear system and obtaining voltage drop data by solving a sparse linear equation system.
[0049] The data preprocessing process for generating input feature data is to scale the internal power consumption, switch power consumption, total power consumption and switching rate scaled power consumption data of each SoC chip power network sample into a two-dimensional matrix of size (256, 256), and splice the generated 4 matrices in the channel dimension after normalization. The normalization formula is:
[0050]
[0051] Among them, x is the element value in the original power consumption two-dimensional matrix, x max is the maximum value of the two-dimensional matrix element, x min is the minimum value of the two-dimensional matrix elements, x new The value of the newly generated element.
[0052] The data preprocessing process for generating the true value label is to remove all axes with a dimension of 1 in the array of the generated voltage drop data, then perform data cropping, limit the elements in the array to the range of (0.000001, 50), adjust the image size to (256, 256), and finally perform logarithmic scaling. The formula for logarithmic scaling is:
[0053]
[0054] Among them, y is the element value in the two-dimensional matrix of the original true value voltage drop label, y new The newly generated voltage drop element value.
[0055] Step S2: Based on the diffusion model principle, a U-type neural network model is used for training. The structural parameters of the U-type network are as follows: Figure 2 shown.
[0056] Step S201: Set a noise intensity sequence β, which includes T noise intensities, β t represents the noise intensity of the t-th diffusion step, and the value range of the noise intensity is (0,1), β t As the t value increases, it changes according to the cosine function.
[0057] Step S202: for each diffusion step t, according to the current noise level β t , generates a noise vector ∈ with the same dimension as the true value voltage drop label of the sample t , the noise vector is sampled from a standard normal distribution.
[0058] Step S203: In each diffusion step t, a new noised real value voltage drop sample is calculated, and the calculation formula is as follows:
[0059]
[0060] where y t-1 Noisy real-valued voltage drop sample from the previous step, y t is the noisy real-valued voltage drop sample for the tth diffusion step.
[0061] Step S204: After each diffusion step, store the current noised real value voltage drop sample y t and its corresponding noise level β t , and the cumulative noise from diffusion step 0 to diffusion step t is calculated.
[0062] Step S205: concatenate the input feature data X and the noised real value voltage drop sample of the t-th diffusion step constructed in step S203 along the channel dimension to generate the input feature data X of the t-th diffusion step. t .
[0063] Step S206: The data X spliced in step S205 t , and the encoding of the current time step t, are input into the U-type neural network to perform forward propagation and obtain the noise o predicted by the model t .
[0064] Step S207: Calculate the noise o predicted by the model t With the real noise ∈ t The difference between them is squared to get the loss of each element. The losses of all elements are summed, and then the average loss of all noise elements in the sample is calculated to get the final noise estimation loss. The calculation formula of this process is as follows:
[0065]
[0066] Where N is the number of all elements in the sample. For a real-value voltage drop sample of size (256, 256), the value of N is 65536.
[0067] Step S208: Minimize the value of the loss function L through continuous training, and the number of training rounds is 200.
[0068] Step S3: Obtain the power consumption report of the SoC chip power network to be predicted from the integrated circuit power consumption analysis tool, and extract the characteristic data X according to the method described in step 1. new , and use the model trained in step 2 to make predictions:
[0069] Step S301: prepare a random noise image as the starting point of inference. This noise image is a random noise e0 with Gaussian distribution, which is consistent with the feature data X new The size of the channel is 1. The random noise e0 and the feature data X as the control condition are new The concatenation by channel dimension and the encoding of the current time step t=1 are used as the initial input of the diffusion model.
[0070] Step S302: Load the diffusion model trained in step 2, set the sampling time step to T=1000 during the inference process, and gradually execute the reverse diffusion steps starting from the initial input data generated in step S301. Except for the time step of 1, the input at each time step is the output data of the previous step and the feature data X new According to the splicing of the channel dimension and the encoding of the current time step t, the model predicts the noise component of the current noisy image at each step and removes this part of the noise from the current image. The formula for removing noise is as follows:
[0071]
[0072] Among them, Y t is the current noisy image, o is the noise predicted by the model, and a t It is a parameter related to the time step, which is used to control the intensity of denoising. t =1-β t .
[0073] Step S303, repeat the above denoising step until the required time step is reached, and the output voltage drop is obtained. Through inverse normalization, the size is restored to the size of the feature data to obtain the final prediction result of the SoC chip power network.
[0074] In summary, the SoC power network dynamic voltage drop prediction method based on the diffusion model involved in this embodiment has the following advantages compared with the existing technology: by utilizing the complex system modeling capability of the diffusion model, it can more accurately simulate and predict the voltage drop behavior of the SoC power network under different operating conditions. The model can capture complex nonlinear relationships and can also adapt to different chip designs and operating conditions, thereby providing more accurate prediction results.
[0075] The above are only preferred embodiments of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technicians in this technical field, some improvements and modifications without departing from the principle of the present invention should be regarded as the protection scope of the present invention.
Claims
1. A method for predicting dynamic voltage drop of SoC power network based on diffusion model, characterized in that: The SoC power network dynamic voltage drop prediction method comprises the following steps: S1, obtain the historical power consumption report of the SoC chip power network through the integrated circuit power consumption analysis tool, pre-process the historical power consumption report to obtain the corresponding feature data X, pre-process the voltage drop data of the SoC chip power network to obtain the corresponding true value label Y, and combine the feature data X and the true value label Y to generate a training data set; S2, based on the principle of diffusion model, a U-type neural network model is used to build a dynamic pressure drop prediction model, and the dynamic pressure drop prediction model is trained using a training data set; the input of the dynamic pressure drop prediction model is feature data X, and the output is the true value label Y; S3, obtain the power consumption report of the SoC chip power network to be predicted from the integrated circuit power consumption analysis tool, and extract the characteristic data X new , import the trained dynamic voltage drop prediction model to predict the voltage drop data.
2. The method for predicting dynamic voltage drop of SoC power supply network based on diffusion model according to claim 1, characterized in that: Step S1 further comprises: Obtain power consumption reports of n SoC chip power networks from the integrated circuit power consumption analysis tool, select internal power consumption, switch power consumption, total power consumption and switching rate scaled power consumption data, and obtain feature data X through data preprocessing; at the same time, analyze the voltage drop data of n SoC chip power networks, and use it as the true value label Y after preprocessing; the feature data X generated by the same SoC chip power network and the true value label Y correspond one by one, and define the feature data generated by the i-th SoC chip power network as X i , and the true value label is defined as Y i .
3. The method for predicting dynamic voltage drop of SoC power supply network based on diffusion model according to claim 2, characterized in that: The process of selecting internal power consumption, switch power consumption, total power consumption and switching rate scaled power consumption data and obtaining characteristic data X through data preprocessing includes the following steps: The internal power consumption, switch power consumption, total power consumption and switching rate scaled power consumption data of each SoC chip power network sample are scaled into a two-dimensional matrix of size (256, 256), and the generated four matrices are normalized and concatenated in the channel dimension. The normalization formula is: Among them, x is the element value of the power consumption data in the two-dimensional matrix, x max is the maximum value of the two-dimensional matrix elements, x min is the minimum value of the two-dimensional matrix elements, x new The value of the newly generated element.
4. The method for predicting dynamic voltage drop of SoC power supply network based on diffusion model according to claim 2, characterized in that: The process of analyzing n voltage drop data of the SoC chip power network and preprocessing them as the true value label Y includes the following steps: Remove all axes with a dimension of 1 in the array from the voltage drop data, then crop the data, limit the elements in the array to the range of (0.000001, 50), adjust the image size to (256, 256), and finally perform logarithmic scaling. The formula for logarithmic scaling is: Among them, y is the element value in the two-dimensional matrix of the original true value voltage drop label, y new is the newly generated voltage drop element value.
5. The method for predicting dynamic voltage drop of SoC power supply network based on diffusion model according to claim 1, characterized in that: Step S2 further comprises: S201, setting a noise intensity sequence β, wherein the noise intensity sequence β includes T noise intensities; β t represents the noise intensity of the t-th diffusion step, and the value range of the noise intensity is (0,1), β t As the t value increases, it changes according to the law of the cosine function, t = 1, 2, ..., T; S202, for each diffusion step t, according to the current noise level β t , generates a noise vector ∈ with the same dimension as the true value voltage drop label of the sample t , the noise vector is sampled from a standard normal distribution; S203, in each diffusion step t, a new noised real value voltage drop sample is calculated, and the calculation formula is as follows: Among them, y t-1 is the noised real-value voltage drop sample from the previous step, y t is the noised real-value voltage drop sample at the t-th diffusion step; S204, after each diffusion step, store the current noised real value voltage drop sample y t and its corresponding noise level β t , and calculate the cumulative noise from diffusion step 0 to diffusion step t; S205, concatenate the input feature data X and the noised real value voltage drop sample of the t-th diffusion step constructed in step S203 along the channel dimension to generate the input feature data X of the t-th diffusion step t ; S206, the data X spliced in step S205 t The code of the current time step t is input into the U-type neural network to perform forward propagation and obtain the noise o predicted by the model. t ; S207, calculate the noise o predicted by the model t With the real noise ∈ t The difference between them is calculated and squared to get the loss of each element; the losses of all elements are summed, and then the average loss of all noise elements in the sample is calculated to get the final noise estimation loss L: Where N is the number of all elements in the sample; S208, repeating steps S201 to S207, and minimizing the value of the loss function L through continuous training until the number of training rounds reaches a preset maximum number of training rounds.
6. The method for predicting dynamic voltage drop of SoC power supply network based on diffusion model according to claim 1, characterized in that: Step S3 further comprises: S301, prepare a random noise image as the starting point of inference, the random noise image is a random noise e0 with Gaussian distribution, and the feature data X new The size of the channel is 1; the random noise e0 and the characteristic data X as the control condition are matched. new Splice according to the channel dimension, and use the splicing result and the encoding of the current time step t=1 as the initial input of the diffusion model; S302, load the trained dynamic pressure drop prediction model, set the sampling time step in the inference process to T, start from the initial input data generated in step S301, and gradually perform the reverse diffusion steps; except for the time step of 1, the input of each time step is the output data of the previous step and the feature data X new The concatenation is done by channel dimension and the encoding of the current time step t. At each step, the model predicts the noise component of the current noisy image and removes this part of the noise from the current image. The formula for removing noise is as follows: Among them, Y t is the current noisy image, o is the noise predicted by the model, and a t is a parameter related to the time step, which is used to control the strength of denoising. t =1-β t ; S303, repeat step S302 until the required time step is reached, perform denormalization on the output voltage drop, and restore the size to the size of the characteristic data to obtain the final prediction result of the SoC chip power network.
Citation Information
Cited By
Communication equipment optimization method and device based on power management
CN119363495A
