Method, system, device and storage medium for calculating chip power consumption
By partitioning the router and subdividing the micro-domain, combined with the multi-parameter power consumption model, comprehensive calculation of the total power consumption of the router is achieved, solving the problem that the total power consumption of the router cannot be fully calculated in the existing technology, and improving the accuracy of power consumption management.
Patent Information
- Application Number
- CN202510090253.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-21
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2045-01-21
AI Technical Summary
The prior art is difficult to fully calculate the total power consumption of a router including processors and switching chips, mainly focusing on local power domain optimization or shutting down auxiliary circuits to reduce power consumption.
By dividing the router area, independent router domains are generated and further subdivided into idle microdomains and power microdomains. The multi-parameter power consumption model is used to calculate static and dynamic power consumption, and a comprehensive calculation of the total power consumption of the router domain is achieved through weighted calculation and superimposed calculation.
Multi-region power consumption analysis is realized, comprehensively calculate the total power consumption of a router including processors and switching chips, and can carefully analyze the power consumption of different modules from the overall system, improving the accuracy and effectiveness of energy efficiency management.
Smart Images

Figure CN119583393B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of chip technology, and in particular to a method, system, device and storage medium for calculating chip power consumption. Background Art
[0002] At present, with the rapid development of information technology and the increasing demand for network bandwidth, routers, as the core equipment of network communication, are developing in the direction of low power consumption and high speed. However, the power consumption of routers is still a key factor affecting their energy efficiency and sustainable development.
[0003] In one prior art, power consumption is reduced by dividing circuit modules into different voltage domains, using low-voltage powered RF and analog circuits, and higher-voltage powered digital circuits. In addition, the setting of multiple power domains and the introduction of auxiliary circuits enable the power domains to be quickly powered off when shut down, effectively reducing power consumption.
[0004] Existing research on router power consumption mainly focuses on optimizing local power domains or reducing power consumption by shutting down certain auxiliary circuits, which makes it impossible to comprehensively calculate the total power consumption of a router including processors and switch chips. Summary of the invention
[0005] The present invention provides a method, system, device and storage medium for calculating chip power consumption, so as to realize multi-region power consumption analysis and comprehensively calculate the total power consumption of a router including a processor and a switching chip.
[0006] In a first aspect, in order to solve the above technical problem, the present invention provides a method for calculating chip power consumption, comprising:
[0007] Based on the area where the router body is located, a region division operation is performed to obtain a router domain, wherein the router domain is an independent area divided according to the internal function of the router;
[0008] According to the router domain, a micro-domain division operation is performed to obtain an idle micro-domain and a power micro-domain;
[0009] In the idle micro-domain and the power micro-domain, parameter extraction operations are performed respectively to obtain idle parameters and power parameters, wherein the idle parameters include leakage current, operating voltage, operating time, capacitance and operating frequency, and the power parameters include output current, output voltage, output time, dynamic power consumption, power micro-domain power consumption in a previous state, and static power consumption in a previous state;
[0010] Calculating according to the idle parameters to obtain idle micro-domain power consumption;
[0011] Calculating according to the power supply parameters to obtain the power consumption of the power supply micro-domain;
[0012] Performing weighted calculation according to the idle micro-domain power consumption and the power micro-domain power consumption to obtain idle micro-domain weighted power consumption and power micro-domain weighted power consumption;
[0013] The total power consumption of the router domain is obtained by performing a superposition calculation based on the idle micro-domain weighted power consumption and the power micro-domain weighted power consumption.
[0014] Preferably, the calculating according to the idle parameter to obtain the idle micro-domain power consumption includes:
[0015] Calculating according to the leakage current, operating voltage and operating time of the idle micro-domain to obtain static power consumption;
[0016] Calculating according to the capacitance, operating voltage and operating frequency of the idle micro-domain to obtain dynamic power consumption;
[0017] Calculation is performed according to the static power consumption and the dynamic power consumption to obtain the idle micro-domain power consumption.
[0018] Preferably, the calculation formula for the static power consumption is:
[0019]
[0020] In the formula, For the Router domain The static power consumption of an idle micro-domain; For the Router domain The leakage current of an idle micro-domain; For the Router domain The operating voltage of an idle micro-domain;
[0021] The calculation formula of the dynamic power consumption is:
[0022]
[0023] In the formula, For the Router domain Dynamic loss of idle micro-domains; is the signal switching factor; For the Router domain The capacitance of an idle micro-domain; is the operating frequency;
[0024] The calculation formula of the idle micro-domain power consumption is:
[0025]
[0026] In the formula, For the Router domain The idle micro-domain power consumption of an idle micro-domain.
[0027] Preferably, the calculating according to the power supply parameters to obtain the power micro-domain power consumption includes:
[0028] Calculating the static power consumption of the power micro-domain according to the output time, output current and output voltage of the power micro-domain;
[0029] The power micro-domain power consumption is calculated based on the static power consumption, the dynamic power consumption, the power micro-domain power consumption in a previous state, and the static power consumption in a previous state to obtain the power micro-domain power consumption.
[0030] Preferably, the calculation formula for the static power consumption of the power micro-domain is:
[0031]
[0032] In the formula, For the Router domain The static power consumption of each power micro-domain; For the Router domain Output current of each power micro-domain; For the Router domain Output voltage of each power micro-domain; For the Router domain Output time of each power micro-domain;
[0033] The calculation formula of the power micro-domain power consumption is:
[0034]
[0035] For the Router domain The power consumption of each power micro-domain; For the Router domain Dynamic power consumption of each power micro-domain; For the The previous state of the router domain is The power consumption of each power micro-domain; For the The previous state of the router domain is The static power consumption of each power micro-domain.
[0036] Preferably, the calculation formula of the idle micro-domain weighted power consumption is:
[0037]
[0038] In the formula, For the Router domain The weighted power consumption of idle micro-domains; is the idle weighting factor; For the Router domain The idle micro-domain power consumption of the idle micro-domains;
[0039] The calculation formula of the power micro-domain weighted power consumption is:
[0040]
[0041] In the formula, For the Router domain The power micro-domain weighted power consumption of each power micro-domain; is the power weighting factor; For the Router domain The power micro-domain power consumption of each power micro-domain.
[0042] Preferably, the calculation formula for the total power consumption of the router domain is:
[0043]
[0044] In the formula, is the total power consumption of the router domain; is the total number of router domains; is the total number of idle micro-domains; is the total number of power micro-domains; For the Router domain The weighted power consumption of idle micro-domains; For the Router domain The weighted power consumption of the power micro-domains of the power micro-domains.
[0045] In a second aspect, the present invention provides a system for calculating chip power consumption, comprising:
[0046] A region division module, used for performing a region division operation based on the region where the router body is located to obtain a router domain, wherein the router domain is an independent region for dividing the internal functions of the router;
[0047] A micro-domain partitioning module, used for performing a micro-domain partitioning operation according to the router domain to obtain an idle micro-domain and a power micro-domain;
[0048] A parameter extraction module, used to perform parameter extraction operations in the idle micro-domain and the power micro-domain, respectively, to obtain idle parameters and power parameters, wherein the idle parameters include leakage current, operating voltage, operating time, capacitance and operating frequency, and the power parameters include output current, output voltage, output time, dynamic power consumption, power micro-domain power consumption in a previous state, and static power consumption in a previous state;
[0049] An idle calculation module, used to calculate according to the idle parameters to obtain the idle micro-domain power consumption;
[0050] A power supply calculation module, used to calculate according to the power supply parameters to obtain the power consumption of the power supply micro-domain;
[0051] A weighted calculation module, used for performing weighted calculation according to the idle micro-domain power consumption and the power micro-domain power consumption to obtain the idle micro-domain weighted power consumption and the power micro-domain weighted power consumption;
[0052] The superposition calculation module is used to perform superposition calculation according to the idle micro-domain weighted power consumption and the power micro-domain weighted power consumption to obtain the total power consumption of the router domain.
[0053] In a third aspect, the present invention further provides an electronic device, comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor implements any one of the above-mentioned methods for calculating chip power consumption when executing the computer program.
[0054] In a fourth aspect, the present invention also provides a computer-readable storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute any one of the above-mentioned methods for calculating chip power consumption.
[0055] Compared with the prior art, the present invention divides the router into regions, generates independent router domains, and further subdivides them into idle micro-domains and power micro-domains, thereby realizing power consumption analysis in multiple regions. Unlike traditional methods that only focus on local optimization or simply shut down auxiliary circuits, the present invention can analyze the power consumption of different modules in detail based on the overall system. With the help of a multi-parameter power consumption model, the static and dynamic power consumption of the idle micro-domain and the power micro-domain is calculated. Through weighted calculation of the idle and power micro-domains, flexible weighting factors are used to finely evaluate the power consumption performance in different states. The total power consumption of the router domain is obtained by superimposing the weighted power consumption of the idle micro-domain and the power micro-domain, realizing multi-region power consumption analysis and comprehensively calculating the total power consumption of the router including the processor and the switching chip. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] Figure 1 is a schematic flow chart of a method for calculating chip power consumption provided by a first embodiment of the present invention;
[0057] Figure 2 It is a schematic diagram of the structure of a system for calculating chip power consumption provided by the second embodiment of the present invention. DETAILED DESCRIPTION
[0058] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0059] Reference Figure 1 A first embodiment of the present invention provides a method for calculating chip power consumption, comprising the following steps:
[0060] S11, performing a region division operation based on the region where the router body is located to obtain a router domain, wherein the router domain is an independent region divided according to the internal function of the router;
[0061] S12, performing a micro-domain division operation according to the router domain to obtain an idle micro-domain and a power micro-domain;
[0062] S13, performing parameter extraction operations in the idle micro-domain and the power micro-domain respectively to obtain idle parameters and power parameters, wherein the idle parameters include leakage current, operating voltage, operating time, capacitance and operating frequency, and the power parameters include output current, output voltage, output time, dynamic power consumption, power micro-domain power consumption in a previous state, and static power consumption in a previous state;
[0063] S14, performing calculation according to the idle parameters to obtain idle micro-domain power consumption;
[0064] S15, performing calculation according to the power supply parameters to obtain the power consumption of the power micro-domain;
[0065] S16, performing weighted calculation according to the idle micro-domain power consumption and the power micro-domain power consumption to obtain idle micro-domain weighted power consumption and power micro-domain weighted power consumption;
[0066] S17, performing a superposition calculation based on the idle micro-domain weighted power consumption and the power micro-domain weighted power consumption to obtain the total power consumption of the router domain.
[0067] In step S11, it is necessary to perform a region division operation based on the region where the router body is located to obtain a router domain, wherein the router domain is an independent region divided according to the internal function of the router, including:
[0068] First, the division of router domains is based on the principle of functional independence. In the actual operation of routers, different modules undertake different functional tasks. Therefore, when dividing router domains, the functional attributes and system structure of the router need to be considered comprehensively. Typical division methods include: processor domain (responsible for data processing and instruction execution), data forwarding domain (management of data packet forwarding and routing operations), switching chip domain (realization of data exchange and signal forwarding) and interface management domain (handling external connections and input / output signal management). Each router domain can independently complete specific tasks and has independent power consumption characteristics, so it can be independently modeled and optimized in power consumption analysis.
[0069] Secondly, the interconnectivity and coordination of each router domain need to be considered during the partitioning process. Although each router domain is independent in terms of power management, in actual operation, the domains need to work together. In order to achieve the best effect in overall power management, the boundaries and communication methods between the domains need to be designed during the partitioning process. For example, the communication between the processor domain and the data forwarding domain involves data flow, signal exchange, etc., and these interactions will also affect power consumption.
[0070] Specifically, the division operation should ensure the independence and manageability of the router domain. Each router domain needs to have certain independent functions and control capabilities, be able to complete the assigned tasks independently, and also be able to cooperate with other router domains.
[0071] In a specific embodiment, the router is divided into router domain. The value of is greater than or equal to 2 to ensure that different functional modules can be distinguished and managed. Each router domain represents an independent functional area with independent task boundaries and power consumption characteristics.
[0072] In step S12, it is necessary to perform a micro-domain division operation according to the router domain to obtain an idle micro-domain and a power micro-domain, including:
[0073] First, the idle micro-domain partitioning aims to identify and manage low-activity or idle state cells within the router domain. The number of idle micro-domains is These micro-domains contain modules that operate in low-load or standby states, such as parts of processor cores, cache memory units, or other infrequently used functional units. By dividing these modules into idle micro-domains, their static power consumption and low dynamic power consumption can be measured and managed independently, providing support for further energy-saving optimization.
[0074] Secondly, the division of power micro-domains is aimed at modules and functional units that require high power consumption support. The number of power micro-domains is These micro-domains include high-frequency operation units of the processor core, switching chip modules, data transmission modules and other high-load task areas. Unlike the idle micro-domain, the power consumption calculation of the power micro-domain needs to take into account more complex dynamic power consumption, operating voltage, output current and load changes.
[0075] In a specific embodiment, the separation and management of idle micro-domains and power micro-domains are particularly important. They correspond to different operating states and energy consumption requirements, so different strategies need to be adopted in power consumption optimization. The idle micro-domain focuses on reducing static energy consumption and managing idle resources, while the power micro-domain needs to optimize the energy efficiency of high-power consumption operations through load management and dynamic adjustment.
[0076] In step S13, it is necessary to perform parameter extraction operations in the idle micro-domain and the power micro-domain, respectively, to obtain idle parameters and power parameters, wherein the idle parameters include leakage current, operating voltage, operating time, capacitance and operating frequency, and the power parameters include output current, output voltage, output time, dynamic power consumption, power micro-domain power consumption in the previous state and static power consumption in the previous state, including:
[0077] In a specific embodiment, the leakage current in an idle micro-domain refers to the tiny current flowing through its components when the micro-domain is in a low load or standby state. It can be directly obtained through hardware sensors such as low-power current sensors such as current probes, which can capture tiny leakage current changes. In addition, the leakage current can also be estimated based on the chip manufacturing process, device characteristics and environmental conditions using a computational model. The model can predict the leakage current change trend under different working environments; the operating voltage refers to the voltage level maintained by the micro-domain in the idle state. This parameter can be monitored by a power management chip. The adjustment and control of the operating voltage is crucial to reducing the power consumption in the idle state, because the change in voltage affects the overall energy consumption of the micro-domain; the operating time indicates the duration of the micro-domain in the idle state, which can be recorded by a timer or a system management program. The operating time is used to evaluate the cumulative effect of idle power consumption and the total energy consumption when idle for a long time; the capacitance in the micro-domain reflects the ability of the circuit to store charge. It can be obtained through circuit design parameters or hardware measurements; the operating frequency indicates the operating frequency of the micro-domain when it is running, which can be monitored by a clock manager.
[0078] In a specific embodiment, the output current represents the current output of the power micro-domain during operation, which can be measured by a current sensor. The output current directly affects the power consumption of the power micro-domain, and a larger output current means a higher energy consumption level; the output voltage represents the voltage output level of the power micro-domain, which can be obtained by a voltage sensor. The output voltage and output current are combined to calculate the power consumption of the power micro-domain to ensure that the output meets the load requirements of the current task; the output time refers to the duration of the power micro-domain in the power supply state. It can be recorded by the system timer. The output time is proportional to the total energy consumption. The extended output time will increase the overall energy consumption of the system; dynamic power consumption: refers to the instantaneous power consumption generated by the power micro-domain during operation. Dynamic power consumption is caused by load changes and state switching, and the calculation formula involves voltage, frequency and signal switching factors. Monitoring of dynamic power consumption helps to adjust the operating state of the system in a timely manner and reduce peak power consumption.
[0079] It should be noted that for the power micro-domain calculation in step S15, it is also necessary to obtain the power micro-domain power consumption of the previous state and the static power consumption of the previous state. The parameter of the power micro-domain power consumption of the previous state reflects the power consumption performance of the power micro-domain in the previous state. The static power consumption of the previous state is similar to the power consumption of the previous state. This parameter is specifically for recording static energy consumption. Static power consumption is mainly composed of leakage current and energy consumption in other inactive states. During the operation of the power micro-domain, the system will use the power consumption monitoring module to record its power consumption data in real time. These data will be stored in the system log or dedicated storage area. When it is necessary to obtain the power consumption of the previous state, it can be read directly from these historical records.
[0080] In step S14, it is necessary to calculate according to the idle parameters to obtain the idle micro-domain power consumption, including:
[0081] First, according to the leakage current, operating voltage and operating time of the idle micro-domain extracted in step S13, calculation is performed to obtain static power consumption. The static power consumption mainly refers to the energy consumption caused by the leakage current when the micro-domain is inactive or low-load state. The calculation formula of the static power consumption is:
[0082]
[0083] In the formula, For the Router domain The static power consumption of an idle micro-domain; For the Router domain The leakage current of an idle micro-domain; For the Router domain The operating voltage of an idle micro-domain;
[0084] Next, according to the capacitance, operating voltage and operating frequency of the idle micro-domain extracted in step S13, calculation is performed to obtain dynamic power consumption. Dynamic power consumption means that although the micro-domain is in an idle state, it needs to maintain basic signal switching or periodic activities, which will cause dynamic power consumption. The calculation formula of the dynamic power consumption is:
[0085]
[0086] In the formula, For the Router domain Dynamic loss of idle micro-domains; is the signal switching factor; For the Router domain The capacitance of an idle micro-domain; is the operating frequency;
[0087] It should be noted that is the signal switching factor, The acquisition of is achieved through experimental measurement, simulation tools and design parameter reference. For example, the power consumption change of the circuit can be measured by using a test board in a laboratory environment. In this process, a standardized switching signal sequence (such as a pulse signal with gradually increasing frequency) is input into the micro domain, and then a power consumption measurement instrument (such as a power analyzer) is used to record the power consumption change at different switching rates. By calculating the rate of change of power consumption at different switching frequencies, the signal switching factor can be derived. ; Use the simulation module of electronic design automation (EDA) tools such as Cadence, Synopsys, or Mentor Graphics to simulate the circuit. By running signal switching analysis in the simulation environment, you can get the impact of signal activity on power consumption. The simulation results will give a detailed report on dynamic power consumption and signal switching, from which you can extract and calculate ; During the design phase, you can refer to the typical signal switching factor values given in the relevant process nodes or design manuals. For example, for some common CMOS process nodes, using 28nm process node logic circuits, the design manual will provide typical A range of values based on which preliminary calculations and adjustments can be made.
[0088] Next, the idle micro-domain power consumption is calculated based on the static power consumption and the dynamic power consumption, wherein the calculation formula of the idle micro-domain power consumption is:
[0089]
[0090] In the formula, For the Router domain The idle micro-domain power consumption of an idle micro-domain.
[0091] In step S15, it is necessary to calculate according to the power supply parameters to obtain the power micro-domain power consumption, including:
[0092] First, according to the output time, output current and output voltage of the power micro-domain extracted in step S13, the static power consumption of the power micro-domain is calculated. The static power consumption of the power micro-domain refers to the basic energy consumption of the micro-domain under the power supply state, which is mainly determined by the output time, output current and output voltage. The calculation formula of the static power consumption of the power micro-domain is:
[0093]
[0094] In the formula, For the Router domain The static power consumption of each power micro-domain; For the Router domain Output current of each power micro-domain; For the Router domain Output voltage of each power micro-domain; For the Router domain Output time of each power micro-domain;
[0095] Next, according to the power micro-domain static power consumption, dynamic power consumption, power micro-domain power consumption of the previous state and static power consumption of the previous state extracted in step S13, calculation is performed to obtain the power micro-domain power consumption, wherein the calculation formula of the power micro-domain power consumption is:
[0096]
[0097] For the Router domain The power consumption of each power micro-domain; For the Router domain Dynamic power consumption of each power micro-domain; For the The previous state of the router domain is The power consumption of each power micro-domain; For the The previous state of the router domain is The static power consumption of each power micro-domain.
[0098] Specifically, by combining the static power consumption of the current state with the power consumption of the previous state, the total energy consumption of the power micro-domain in different operating states can be estimated more accurately. The calculation of total power consumption not only considers the energy consumption characteristics of the current state, but also integrates the influence of the historical state, providing basic support for power consumption calculation and optimization.
[0099] In step S16, it is necessary to perform weighted calculation according to the idle micro-domain power consumption and the power micro-domain power consumption to obtain the idle micro-domain weighted power consumption and the power micro-domain weighted power consumption, including:
[0100] In a specific embodiment, the weighted power consumption of the idle micro-domain is weighted processing of the idle micro-domain power consumption of the idle micro-domain to reflect the influence of the power consumption in the idle state, wherein the calculation formula of the weighted power consumption of the idle micro-domain is:
[0101]
[0102] In the formula, For the Router domain The weighted power consumption of idle micro-domains; is the idle weighting factor; For the Router domain The idle micro-domain power consumption of the idle micro-domains;
[0103] It should be noted that in the weighted calculation, the idle weighting factor is used to weight the basic power consumption of the idle micro-domain to reflect the impact of the power consumption in the idle state on the total energy consumption of the system. Its main function is to control the weight of the idle micro-domain power consumption in the overall power consumption management so that it can be flexibly adjusted under different optimization strategies. The setting is based on system requirements and application scenarios. For example, if the idle state has a greater impact on energy consumption (for example, the system is idle for a long time), you can increase The value of makes the idle state power consumption account for a higher proportion of the total energy consumption, thereby guiding the optimization strategy to reduce the idle power consumption. On the contrary, for idle micro-domains with less impact, the value to reduce its weight.
[0104] For example, in a data center, if the server is frequently idle, the value, making idle power consumption optimization the focus of energy efficiency management.
[0105] In a specific embodiment, the weighted power consumption of the power micro-domain is used to reflect the energy consumption impact of the power micro-domain under load operation, wherein the calculation formula of the weighted power consumption of the power micro-domain is:
[0106]
[0107] In the formula, For the Router domain The power micro-domain weighted power consumption of each power micro-domain; is the power weighting factor; For the Router domain The power micro-domain power consumption of each power micro-domain.
[0108] It should be noted that in the weighted calculation, the power weighting factor is used to adjust the power consumption weight of the power micro-domain, reflecting its impact on the total power consumption of the system under load operation. This factor weights the power consumption of the power micro-domain so that it occupies a suitable position in the total energy consumption, ensuring that it receives sufficient attention in system optimization. Usually, the power micro-domain undertakes the main load tasks and makes a greater contribution to the overall energy consumption of the system. Therefore, It is often set to a higher value to ensure that its influence in the overall energy consumption management is taken into account. If the load fluctuation of the power micro-domain is large during system operation, increase The value can help control the energy consumption performance under high load conditions.
[0109] For example, in a high-performance computing system, the power micro-domain carries a large amount of data computing tasks. value, the optimization focus can be placed on high-load power consumption control during operation, thereby improving the overall system efficiency.
[0110] In step S17, it is necessary to perform a superposition calculation based on the idle micro-domain weighted power consumption and the power micro-domain weighted power consumption to obtain the total power consumption of the router domain, including:
[0111] In a specific embodiment, in order to calculate the total power consumption of the router domain, it is necessary to superimpose the weighted power consumption of all idle micro-domains and the weighted power consumption of the power micro-domain. This process weights and accumulates the power consumption contribution of each micro-domain to finally obtain the total energy consumption of the entire router domain, wherein the calculation formula for the total power consumption of the router domain is:
[0112]
[0113] In the formula, is the total power consumption of the router domain; is the total number of router domains; is the total number of idle micro-domains; is the total number of power micro-domains; For the Router domain The weighted power consumption of idle micro-domains; For the Router domain The weighted power consumption of the power micro-domains of the power micro-domains.
[0114] It should be noted that is the total number of router domains, which refers to the number of router domains divided in the entire system; is the total number of idle micro-domains, i.e., the number of idle micro-domains in each router domain; is the total number of power micro-domains, that is, the number of power micro-domains in each router domain.
[0115] The following describes the working process of the present invention using a common scenario as an example. Figure 2 , which is Figure 1 Schematic diagram of the working scenario of the method.
[0116] In a large data center, routers need to process a large amount of network data traffic, and their load status will fluctuate significantly over time and with changes in business needs. In order to optimize the energy efficiency of routers, the present invention provides a sophisticated power consumption management solution to divide different functional modules and accurately calculate and manage power consumption. First, the router is divided into multiple independent functional domains, including a processor domain, a data forwarding domain, a switching chip domain, and an interface management domain. Each functional domain independently undertakes specific tasks and has independent power consumption characteristics. For example, when the data traffic is large, the processor domain needs to process a large number of data tasks, and its power consumption increases significantly; while in a low load or idle state, its power consumption is mainly composed of static power consumption. Therefore, dividing the functional domains can more accurately manage the power consumption of different modules and improve the energy efficiency of the overall system.
[0117] After completing the division of router domains, the present invention further subdivides each router domain into idle micro-domains and power micro-domains. Idle micro-domains are mainly used to manage modules in low activity or standby state. For example, during low traffic peaks, some processor cores or cache modules will enter an idle state. For the power consumption management of these micro-domains, special attention should be paid to static power consumption and low dynamic power consumption. Taking a processor core as an example, when it enters the idle state, its leakage current is 10mA and the operating voltage is 1.2V. According to the formula, its static power consumption is calculated as:
[0118]
[0119] In addition, by calculating the dynamic power consumption, assuming that the capacitance is 50pF, the signal switching frequency is 100MHz, and the signal switching factor is 0.5, the dynamic power consumption is calculated as:
[0120] The total idle micro-domain power consumption is:
[0121]
[0122] For the power micro-domain, the main management requires modules that require high power consumption support, such as high-frequency processor cores and data exchange modules. When the data traffic is high, these micro-domains need to process a large number of data tasks, and their power consumption management needs to consider dynamic power consumption and complex load changes. Assuming that the output time of the power micro-domain is 1 second, the output current is 2A, and the output voltage is 3.3V, its static power consumption is calculated as:
[0123]
[0124] After completing the power consumption calculation of the idle micro-domain and the power micro-domain, the present invention introduces a weighting factor to perform weighted processing on the power consumption. The idle weighting factor is used to adjust the weight of the idle micro-domain in the total energy consumption. Especially in the idle state for a long time, the idle power consumption can be better optimized by increasing the weighting factor. The power weighting factor is used to adjust the power consumption weight of the power micro-domain under high load conditions. By increasing its weight, the impact of the power micro-domain on the total energy consumption can be highlighted. In a specific application, assuming that a router domain has 5 idle micro-domains and 3 power micro-domains, the total power consumption is calculated as:
[0125]
[0126] This superposition calculation method can comprehensively reflect the total power consumption performance of each state within the router domain, providing data support and strategy selection for further optimizing the system's power consumption.
[0127] In summary, through refined power consumption management and parameter analysis, routers in data centers can achieve more efficient energy consumption control under high load and low load conditions, reduce unnecessary power consumption, and improve the overall performance and stability of the system.
[0128] In summary, the present invention realizes power consumption analysis in multiple regions by dividing the router into regions, generating independent router domains, and further subdividing them into idle micro-domains and power micro-domains. Unlike traditional methods that only focus on local optimization or simply shut down auxiliary circuits, the present invention can analyze the power consumption of different modules in detail based on the overall system. With the help of a multi-parameter power consumption model, the static and dynamic power consumption of the idle micro-domain and the power micro-domain is calculated. Through weighted calculation of the idle and power micro-domains, flexible weighting factors are used to refine the evaluation of power consumption performance in different states. The total power consumption of the router domain is obtained by superimposing the weighted power consumption of the idle micro-domain and the power micro-domain, realizing multi-region power consumption analysis and comprehensively calculating the total power consumption of the router including the processor and the switching chip.
[0129] Reference Figure 2 A second embodiment of the present invention provides a system for calculating chip power consumption, including:
[0130] A region division module, used for performing a region division operation based on the region where the router body is located to obtain a router domain, wherein the router domain is an independent region for dividing the internal functions of the router;
[0131] A micro-domain partitioning module, used for performing a micro-domain partitioning operation according to the router domain to obtain an idle micro-domain and a power micro-domain;
[0132] A parameter extraction module, used to perform parameter extraction operations in the idle micro-domain and the power micro-domain, respectively, to obtain idle parameters and power parameters, wherein the idle parameters include leakage current, operating voltage, operating time, capacitance and operating frequency, and the power parameters include output current, output voltage, output time, dynamic power consumption, power micro-domain power consumption in a previous state, and static power consumption in a previous state;
[0133] An idle calculation module, used to calculate according to the idle parameters to obtain the idle micro-domain power consumption;
[0134] A power supply calculation module, used to calculate according to the power supply parameters to obtain the power consumption of the power supply micro-domain;
[0135] A weighted calculation module, used for performing weighted calculation according to the idle micro-domain power consumption and the power micro-domain power consumption to obtain the idle micro-domain weighted power consumption and the power micro-domain weighted power consumption;
[0136] The superposition calculation module is used to perform superposition calculation according to the idle micro-domain weighted power consumption and the power micro-domain weighted power consumption to obtain the total power consumption of the router domain.
[0137] Preferably, the area division module is used to perform an area division operation based on the area where the router body is located to obtain a router domain, wherein the router domain is an independent area for dividing the internal functions of the router;
[0138] Preferably, the micro-domain division module is used to perform a micro-domain division operation according to the router domain to obtain an idle micro-domain and a power micro-domain;
[0139] Preferably, the parameter extraction module is used to perform parameter extraction operations in the idle micro-domain and the power micro-domain, respectively, to obtain idle parameters and power parameters, wherein the idle parameters include leakage current, operating voltage, operating time, capacitance and operating frequency, and the power parameters include output current, output voltage, output time, dynamic power consumption, power micro-domain power consumption in the previous state and static power consumption in the previous state;
[0140] Preferably, the idle calculation module is used to calculate according to the idle parameters to obtain the idle micro-domain power consumption, including:
[0141] Calculating according to the leakage current, operating voltage and operating time of the idle micro-domain to obtain static power consumption;
[0142] Calculating according to the capacitance, operating voltage and operating frequency of the idle micro-domain to obtain dynamic power consumption;
[0143] Calculation is performed according to the static power consumption and the dynamic power consumption to obtain the idle micro-domain power consumption.
[0144] The calculation formula of the static power consumption is:
[0145]
[0146] In the formula, For the Router domain The static power consumption of an idle micro-domain; For the Router domain The leakage current of an idle micro-domain; For the Router domain The operating voltage of an idle micro-domain;
[0147] The calculation formula of the dynamic power consumption is:
[0148]
[0149] In the formula, For the Router domain Dynamic loss of idle micro-domains; is the signal switching factor; For the Router domain The capacitance of an idle micro-domain; is the operating frequency;
[0150] The calculation formula of the idle micro-domain power consumption is:
[0151]
[0152] In the formula, For the Router domain The idle micro-domain power consumption of an idle micro-domain.
[0153] Preferably, the power supply calculation module is used to calculate according to the power supply parameters to obtain the power micro-domain power consumption, including:
[0154] Calculating the static power consumption of the power micro-domain according to the output time, output current and output voltage of the power micro-domain;
[0155] The power micro-domain power consumption is calculated based on the static power consumption, the dynamic power consumption, the power micro-domain power consumption in a previous state, and the static power consumption in a previous state to obtain the power micro-domain power consumption.
[0156] The calculation formula of the static power consumption of the power micro-domain is:
[0157]
[0158] In the formula, For the Router domain The static power consumption of each power micro-domain; For the Router domain Output current of each power micro-domain; For the Router domain Output voltage of each power micro-domain; For the Router domain Output time of each power micro-domain;
[0159] The calculation formula of the power micro-domain power consumption is:
[0160]
[0161] For the Router domain The power consumption of each power micro-domain; For the Router domain Dynamic power consumption of each power micro-domain; For the The previous state of the router domain is The power consumption of each power micro-domain; For the The previous state of the router domain is The static power consumption of each power micro-domain.
[0162] Preferably, the weighted calculation module is used to perform weighted calculation according to the idle micro-domain power consumption and the power micro-domain power consumption to obtain the idle micro-domain weighted power consumption and the power micro-domain weighted power consumption, including:
[0163] The calculation formula of the idle micro-domain weighted power consumption is:
[0164]
[0165] In the formula, For the Router domain The weighted power consumption of idle micro-domains; is the idle weighting factor; For the Router domain The idle micro-domain power consumption of the idle micro-domains;
[0166] The calculation formula of the power micro-domain weighted power consumption is:
[0167]
[0168] In the formula, For the Router domain The power micro-domain weighted power consumption of each power micro-domain; is the power weighting factor; For the Router domain The power micro-domain power consumption of each power micro-domain.
[0169] Preferably, the superposition calculation module is used to perform superposition calculation according to the idle micro-domain weighted power consumption and the power micro-domain weighted power consumption to obtain the total power consumption of the router domain, including:
[0170] The calculation formula of the total power consumption of the router domain is:
[0171]
[0172] In the formula, is the total power consumption of the router domain; is the total number of router domains; is the total number of idle micro-domains; is the total number of power micro-domains; For the Router domain The weighted power consumption of idle micro-domains; For the Router domain The weighted power consumption of the power micro-domains of the power micro-domains.
[0173] It should be noted that a calculation system for chip power consumption provided in an embodiment of the present invention is used to execute all process steps of a calculation method for chip power consumption in the above embodiment, and the working principles and beneficial effects of the two correspond one to one, so they will not be repeated here.
[0174] The embodiment of the present invention further provides an electronic device. The electronic device includes: a processor, a memory, and a computer program stored in the memory and executable on the processor, such as a ... program. When the processor executes the computer program, the steps in the above-mentioned various embodiments of the method for calculating chip power consumption are implemented, such as Figure 1 Alternatively, when the processor executes the computer program, the functions of the modules / units in the above-mentioned device embodiments are realized, such as the area division module.
[0175] Exemplarily, the computer program may be divided into one or more modules / units, which are stored in the memory and executed by the processor to implement the present invention. The one or more modules / units may be a series of computer program instruction segments capable of implementing specific functions, which are used to describe the execution process of the computer program in the electronic device.
[0176] The electronic device may be a computing device such as a desktop computer, a notebook, a PDA, and a smart tablet. The electronic device may include, but is not limited to, a processor and a memory. Those skilled in the art will appreciate that the above components are merely examples of electronic devices and do not constitute a limitation on the electronic device. The electronic device may include more or fewer components than the above components, or a combination of certain components, or different components. For example, the electronic device may also include input and output devices, network access devices, buses, etc.
[0177] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the electronic device, and uses various interfaces and lines to connect various parts of the entire electronic device.
[0178] The memory can be used to store the computer program and / or module, and the processor realizes various functions of the electronic device by running or executing the computer program and / or module stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0179] Wherein, if the module / unit integrated in the electronic device is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0180] It should be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the accompanying drawings of the device embodiments provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines. A person of ordinary skill in the art may understand and implement it without paying any creative effort.
[0181] The specific embodiments described above further illustrate the purpose, technical solutions and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. It is particularly pointed out that for those skilled in the art, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of protection of the present invention.
Claims
1. A method for calculating chip power consumption, characterized in that: include: Based on the area where the router body is located, a region division operation is performed to obtain a router domain, wherein the router domain is an independent area divided according to the internal function of the router; According to the router domain, a micro-domain division operation is performed to obtain an idle micro-domain and a power micro-domain; Among them, the idle micro-domain is a low-activity or idle state unit within the router domain, including modules running in low-load or standby state; the power micro-domain is the modules and functional units that require high power consumption support, including the high-frequency operation unit of the processor core, the switch chip module, and the data transmission module; In the idle micro-domain and the power micro-domain, parameter extraction operations are performed respectively to obtain idle parameters and power parameters, wherein the idle parameters include leakage current, operating voltage, operating time, capacitance and operating frequency, and the power parameters include output current, output voltage, output time, dynamic power consumption, power micro-domain power consumption in a previous state, and static power consumption in a previous state; Calculating according to the idle parameters to obtain idle micro-domain power consumption; Calculating according to the power supply parameters to obtain the power consumption of the power supply micro-domain; Performing weighted calculation according to the idle micro-domain power consumption and the power micro-domain power consumption to obtain idle micro-domain weighted power consumption and power micro-domain weighted power consumption; Performing a superposition calculation based on the idle micro-domain weighted power consumption and the power micro-domain weighted power consumption to obtain the total power consumption of the router domain; The step of calculating according to the idle parameter to obtain the idle micro-domain power consumption includes: Calculating according to the leakage current, operating voltage and operating time of the idle micro-domain to obtain static power consumption; Calculating according to the capacitance, operating voltage and operating frequency of the idle micro-domain to obtain dynamic power consumption; Calculating according to the static power consumption and the dynamic power consumption to obtain the idle micro-domain power consumption; The step of calculating according to the power supply parameters to obtain the power micro-domain power consumption includes: Calculating the static power consumption of the power micro-domain according to the output time, output current and output voltage of the power micro-domain; The power micro-domain power consumption is calculated based on the static power consumption, the dynamic power consumption, the power micro-domain power consumption in a previous state, and the static power consumption in a previous state to obtain the power micro-domain power consumption.
2. The method for calculating chip power consumption according to claim 1, characterized in that: The calculation formula of the static power consumption is: In the formula, For the Router domain The static power consumption of an idle micro-domain; For the Router domain The leakage current of an idle micro-domain; For the Router domain The operating voltage of an idle micro-domain; The calculation formula of the dynamic power consumption is: In the formula, For the Router domain Dynamic loss of idle micro-domains; is the signal switching factor; For the Router domain The capacitance of an idle micro-domain; is the operating frequency; The calculation formula of the idle micro-domain power consumption is: In the formula, For the Router domain The idle micro-domain power consumption of an idle micro-domain.
3. The method for calculating chip power consumption according to claim 1, characterized in that: The calculation formula of the static power consumption of the power micro-domain is: In the formula, For the Router domain The static power consumption of each power micro-domain; For the Router domain Output current of each power micro-domain; For the Router domain Output voltage of each power micro-domain; For the Router domain Output time of each power micro-domain; The calculation formula of the power micro-domain power consumption is: For the Router domain The power consumption of each power micro-domain; For the Router domain Dynamic power consumption of each power micro-domain; For the The previous state of the router domain is The power consumption of each power micro-domain; For the The previous state of the router domain is The static power consumption of each power micro-domain.
4. The method for calculating chip power consumption according to claim 1, characterized in that: The calculation formula of the idle micro-domain weighted power consumption is: In the formula, For the Router domain The weighted power consumption of idle micro-domains; is the idle weighting factor; For the Router domain The idle micro-domain power consumption of the idle micro-domains; The calculation formula of the power micro-domain weighted power consumption is: In the formula, For the Router domain The power micro-domain weighted power consumption of each power micro-domain; is the power weighting factor; For the Router domain The power micro-domain power consumption of each power micro-domain.
5. The method for calculating chip power consumption according to claim 1, characterized in that: The calculation formula of the total power consumption of the router domain is: In the formula, is the total power consumption of the router domain; is the total number of router domains; is the total number of idle micro-domains; is the total number of power micro-domains; For the Router domain The weighted power consumption of idle micro-domains; For the Router domain The weighted power consumption of the power micro-domains of the power micro-domains.
6. A system for calculating chip power consumption, used to implement the method for calculating chip power consumption according to any one of claims 1 to 5, characterized in that: include: A region division module, used for performing a region division operation based on the region where the router body is located to obtain a router domain, wherein the router domain is an independent region for dividing the internal functions of the router; A micro-domain partitioning module, used for performing a micro-domain partitioning operation according to the router domain to obtain an idle micro-domain and a power micro-domain; A parameter extraction module, used to perform parameter extraction operations in the idle micro-domain and the power micro-domain, respectively, to obtain idle parameters and power parameters, wherein the idle parameters include leakage current, operating voltage, operating time, capacitance and operating frequency, and the power parameters include output current, output voltage, output time, dynamic power consumption, power micro-domain power consumption in a previous state, and static power consumption in a previous state; An idle calculation module, used to calculate according to the idle parameters to obtain the idle micro-domain power consumption; A power supply calculation module, used to calculate according to the power supply parameters to obtain the power consumption of the power supply micro-domain; A weighted calculation module, used for performing weighted calculation according to the idle micro-domain power consumption and the power micro-domain power consumption to obtain the idle micro-domain weighted power consumption and the power micro-domain weighted power consumption; The superposition calculation module is used to perform superposition calculation according to the idle micro-domain weighted power consumption and the power micro-domain weighted power consumption to obtain the total power consumption of the router domain.
7. An electronic device, characterized in that: The method comprises a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor implements the method for calculating chip power consumption as claimed in any one of claims 1 to 5 when executing the computer program.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute the method for calculating chip power consumption according to any one of claims 1 to 5.
Citation Information
Patent Citations
Integrated circuit SoC chip circuit structure capable of realizing power reduction and method thereof
CN101859172A
Power supply low power consumption control method, device and equipment for Internet of Things VPN router system
CN116436712A