A method and device for detecting chip power consumption
By setting the detection source and power consumption excitation generation module in the chip, using the selection unit and register to excite the module to be detected, and calculating its real power consumption, the problem in the existing technology of being unable to detect the power consumption of each module of the chip is solved, and the chip is realized Accurate analysis of internal power consumption.
Patent Information
- Application Number
- CN202011004309.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-09-22
- Publication Date
- 2024-10-25
- Estimated Expiration
- 2040-09-22
AI Technical Summary
The existing technology cannot effectively detect the real power consumption of each module in the chip, resulting in the inability to conduct effective internal power consumption analysis of the chip.
A chip power consumption detection device is designed, which includes a detection source and a power consumption excitation generation module. The module to be detected is stimulated by an enable signal. The selection unit and register are used to measure the power consumption of each module. The comparison operation unit calculates the real power consumption. .
It realizes the real power consumption detection of each module in the chip, meets the needs of chip internal power consumption analysis, and improves the accuracy and feasibility of power consumption measurement.
Smart Images

Figure CN112083318B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of chip technology, and in particular to a method and device for detecting chip power consumption. Background Art
[0002] Power consumption detection and power consumption analysis are becoming increasingly important in the chip field and have become an indispensable part of the chip development process.
[0003] During the simulation phase, the power consumption of the chip can be estimated through power consumption analysis tools. However, after the chip is manufactured, the actual chip can only measure the current of one power supply line to estimate the power consumption, and the actual power consumption of each module in the chip cannot be obtained.
[0004] Figure 1 The structure of a chip in the prior art is shown. Figure 1 The chip in the chip includes four modules A, B, C, and D, and the four modules are connected through a power supply network. When measuring power consumption, first measure the current consumed by modules A, B, C, and D together, and then use the formula P=IV to obtain the total power consumption information in the current power supply network. If the overall power consumption of the current power supply network exceeds expectations, there is no effective means to classify and debug each internal module. The existing technology only knows the total power consumption and expected threshold of multiple modules inside the chip, and does not know the specific power consumption parameters of each module, and cannot effectively meet the requirements of power consumption analysis inside the chip. Summary of the invention
[0005] The embodiments of the present invention provide a chip power consumption detection method and device, which are used to solve the defect that the actual power consumption of each module in the chip cannot be detected in the prior art, and realize the detection of the actual power consumption of each module in the chip.
[0006] An embodiment of the present invention provides a device for detecting chip power consumption, including:
[0007] Detection source;
[0008] A power consumption incentive generating module, wherein the power consumption incentive generating module is connected to the detection source, and the detection source sends an enable signal to the power consumption incentive generating module so that the power consumption incentive generating module generates an incentive signal;
[0009] At least one module to be detected, the power consumption excitation generating module is connected with at least one module to be detected, so that the power consumption excitation generating module inputs the excitation signal to the target module to be detected to obtain the real power consumption of the target module to be detected.
[0010] According to an embodiment of the present invention, the chip power consumption detection device further includes: a register, through which the detection source is connected to the power consumption incentive generating module, the register receives the enable signal, and sends the enable signal to the corresponding power consumption incentive generating module.
[0011] According to a chip power consumption detection device of an embodiment of the present invention, the input end of each module to be detected is connected to a selection unit, and the selection unit is respectively connected to the power consumption stimulus generating module and the original input signal end;
[0012] The selection unit is connected to the register, and is used for conducting the power consumption stimulus generating module and the target module to be detected through the selection unit when the selection unit of the target module to be detected receives an enable signal sent by the register.
[0013] According to a chip power consumption detection device of an embodiment of the present invention, there are multiple modules to be detected, each module to be detected is provided with a corresponding power consumption incentive generating module, and each power consumption incentive generating module is connected to a selection unit of the corresponding module to be detected;
[0014] The selection units of the plurality of modules to be detected are all connected to the register, and the register sends the enable signal to the selection unit of the target module to be detected.
[0015] According to a chip power consumption detection device of an embodiment of the present invention, there are multiple modules to be detected, there is one power consumption incentive generating module, and the power consumption incentive generating module is respectively connected to the selection units of the multiple modules to be detected;
[0016] The selection units of the plurality of modules to be detected are all connected to the register, and the register sends the enable signal to the selection unit of the target module to be detected.
[0017] According to a device for detecting chip power consumption according to an embodiment of the present invention, the module to be detected includes at least one submodule;
[0018] At least one of the submodules is connected to the power consumption incentive generating module, so that the power consumption incentive generating module inputs the incentive signal to the target submodule to obtain the actual power consumption of the target submodule.
[0019] According to a chip power consumption detection device of an embodiment of the present invention, the input end of each submodule is connected to a sub-selection unit, and the detection source is connected to each sub-selection unit through the register;
[0020] The sub-selection unit of each sub-module is connected to the power consumption incentive generation module;
[0021] In the case where the sub-selection unit of the target sub-module receives the enable signal sent by the register, the power consumption incentive generation module and the target sub-module are connected through the sub-selection unit.
[0022] According to a chip power consumption detection device of an embodiment of the present invention, the detection device is further connected to a comparison operation unit and a detector;
[0023] When the detector detects the power consumption of the target module to be detected after the excitation signal is input, the comparison operation unit compares the power consumption of the target module to be detected before the excitation signal is input with the power consumption after the excitation signal is input to obtain the actual power consumption of the target module to be detected.
[0024] An embodiment of the present invention further provides a chip power consumption detection method, which is used in any of the chip power consumption detection devices described above, and the detection method includes:
[0025] The detection source sends an enable signal to the power consumption excitation generation module, so that the power consumption excitation generation module generates an excitation signal;
[0026] The power consumption excitation generating module inputs the excitation signal to the target module to be detected to obtain the actual power consumption of the target module to be detected.
[0027] According to a chip power consumption detection method of an embodiment of the present invention, a detection source sends an enable signal to a power consumption incentive generating module, including: the detection source sends the enable signal to a register, and the register sends the enable signal to a corresponding power consumption incentive generating module;
[0028] Before the power consumption excitation generation module inputs the excitation signal to the target module to be detected, the method further includes: when the selection unit of the target module to be detected receives the enable signal sent by the register, the power consumption excitation generation module and the target module to be detected are connected through the selection unit.
[0029] According to a chip power consumption detection method according to an embodiment of the present invention, when the module to be detected includes at least one submodule, the method further includes: the power consumption stimulus generating module inputs the stimulus signal to the target submodule to obtain the actual power consumption of the target submodule.
[0030] According to a chip power consumption detection method according to an embodiment of the present invention, before the power consumption stimulus generating module inputs the stimulus signal to the target submodule, the method further includes:
[0031] When the sub-selection unit of the target sub-module receives the enable signal sent by the register, the power consumption incentive generation module and the target sub-module are connected through the sub-selection unit.
[0032] According to a chip power consumption detection method of an embodiment of the present invention, the detection device is further connected to a comparison operation unit and a detector;
[0033] The power consumption stimulus generating module inputs the stimulus signal to the target module to be detected to obtain the actual power consumption of the target module to be detected, including:
[0034] The power consumption excitation generating module inputs the excitation signal to the target module to be detected, so as to obtain the power consumption of the target module to be detected after the excitation signal is input;
[0035] When the detector detects the power consumption of the target module to be detected after the excitation signal is input, the detector sends the power consumption of the target module to be detected after the excitation signal is input to the comparison operation unit;
[0036] The comparison operation unit compares the power consumption of the target module to be detected before the excitation signal is input with the power consumption of the target module to be detected after the excitation signal is input, so as to obtain the real power consumption of the target module to be detected.
[0037] An embodiment of the present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of any of the above-mentioned chip power consumption detection methods are implemented.
[0038] An embodiment of the present invention further provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned chip power consumption detection methods are implemented.
[0039] The chip power consumption detection method and device provided by the embodiment of the present invention are configured with a detection source and a power consumption excitation generating module in the chip. The detection source sends an enable signal to the power consumption excitation generating module so that the power consumption excitation generating module generates an excitation signal for the module to be detected to generate power consumption. The power consumption excitation generating module then inputs the excitation signal to the target module to be detected, thereby obtaining the actual power consumption of the target module to be detected to meet the subsequent needs of chip power consumption analysis.
[0040] In addition, the chip power consumption detection method and device provided in the embodiment of the present invention set the detection source to send an enable signal to the power consumption incentive generation module through a register, and the power consumption incentive generation module that sends the enable signal can be determined from multiple power consumption incentive generation modules through the register.
[0041] Furthermore, the chip power consumption detection device provided in the embodiment of the present invention may only have a single power consumption incentive generating module, which is connected to at least one module to be detected. Alternatively, a power consumption incentive generating module may be set in each module to be detected to achieve the purpose of obtaining the actual power consumption of any module to be detected.
[0042] Again, each module to be detected may also include at least one sub-module. Through the chip power consumption detection method and device of the embodiment of the present invention, the actual power consumption of each sub-module can be further obtained to meet the subsequent needs of further accurate analysis of the chip power consumption. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0044] Figure 1 It is a schematic diagram of a chip power consumption verification provided by the prior art;
[0045] Figure 2 It is a structural schematic diagram of a chip power consumption detection device provided by an embodiment of the present invention;
[0046] Figure 3 is a schematic structural diagram of another chip power consumption detection device provided by an embodiment of the present invention;
[0047] Figure 4 It is a structural schematic diagram of another chip power consumption detection device provided by an embodiment of the present invention;
[0048] Figure 5 It is a flowchart of a method for detecting chip power consumption provided by an embodiment of the present invention;
[0049] Figure 6 It is a flow chart of another chip power consumption detection method provided by an embodiment of the present invention;
[0050] Figure 7 It is a structural schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0051] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are 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.
[0052] The embodiment of the present invention discloses a device for detecting chip power consumption, comprising: a detection source, a power consumption stimulus generating module and at least one module to be detected.
[0053] The detection source is used to generate an enable signal to enable the power consumption excitation generation module to generate an excitation signal.
[0054] The detection source may be of various types, such as a core of a central processing unit, or a test interface for internal chip testing, such as a Joint Test Action Group (JTAG) interface.
[0055] The power consumption excitation generation module is connected to the detection source, and the detection source sends an enable signal to the power consumption excitation generation module to enable the power consumption excitation generation module to generate an excitation signal.
[0056] The power consumption excitation generation module is connected to at least one of the modules to be detected, so that the power consumption excitation generation module inputs the excitation signal to the target module to be detected to obtain the actual power consumption of the target module to be detected.
[0057] It should be noted that the power consumption excitation generation module can be one or more. For example, the modules to be detected inside the chip are grouped and equipped with multiple power consumption excitation generation modules, which are dispersedly arranged inside the chip. By determining the target module to be detected to be stimulated and inputting the excitation signal into the target module to be detected, the power consumption of each module to be detected in the chip can be measured in turn.
[0058] The chip power consumption detection device provided by the embodiment of the present invention sets a detection source and a power consumption excitation generating module in the chip. The detection source sends an enable signal to the power consumption excitation generating module so that the power consumption excitation generating module generates an excitation signal for the module to be detected to generate power consumption. Then, the power consumption excitation generating module inputs the excitation signal to the target module to be detected, thereby obtaining the actual power consumption of the target module to be detected to meet the subsequent needs of chip power consumption analysis.
[0059] In order to determine the target module to be detected to be stimulated in the chip, the embodiment of the present invention discloses a device for detecting chip power consumption, see Figure 2 and Figure 3In addition to the detection source, the power consumption incentive generating module and at least one module to be detected, this embodiment also includes: a register, the detection source is connected to the power consumption incentive generating module through the register, the register receives an enable signal, and sends the enable signal to the corresponding power consumption incentive generating module.
[0060] Through the register, the target module to be detected in the chip can be determined, and then the power consumption measurement of the target module to be detected can be realized in the subsequent steps.
[0061] Specifically, the input end of each module to be detected is connected to a selection unit, and the selection unit is respectively connected to the power consumption excitation generation module and the original input signal end;
[0062] The selection unit is connected to the register, and is used for conducting the power consumption stimulus generating module and the target module to be detected through the selection unit when the selection unit of the target module to be detected receives an enable signal sent by the register.
[0063] For example, the chip includes four modules to be detected, A, B, C, and D, and the registers are respectively connected to the selection units of the four modules to be detected, A, B, C, and D. At the beginning of work, all the modules to be detected are in an idle state. When the register sends an enable signal to the selection unit of the corresponding module to be detected, such as the selection unit of the module to be detected C, the power consumption excitation generation module is connected to the module to be detected C through the selection unit, so that the power consumption excitation generation module transmits the excitation signal to the module to be detected C.
[0064] Optionally, the setting of the power consumption incentive generation module can be divided into two cases:
[0065] In one case, see Figure 2 , each module to be detected is provided with a corresponding power consumption incentive generating module. During design, the power consumption incentive generating module can be located outside the module to be detected, or it can be located inside the module to be detected. In order to save chip space, in this embodiment, the power consumption incentive generating module is made inside the module to be detected, and the power consumption incentive generating module is connected to the selection unit of the corresponding module to be detected through a circuit, so that a corresponding incentive signal can be generated for the module to be detected. The selection units of multiple modules to be detected are all connected to the register, and the register sends an enable signal to the selection unit of the target module to be detected.
[0066] by Figure 2Take the chip in the example that includes four modules A, B, C, and D to be detected. The input ports of the four modules to be detected are connected to corresponding selection units, and each module to be detected is provided with a power consumption stimulus generation module, and the power consumption stimulus generation module of each module to be detected is respectively connected to the register. In this case, each module to be detected inside the chip has a relatively independent power consumption stimulus generation module, which can be assigned to different module design and development personnel to adjust the stimulus generation details by themselves. This makes the stimulus generation of each module to be detected more accurate, more adaptive, and easier to achieve chip timing convergence.
[0067] In another case, see Figure 3 There is only one power consumption incentive generating module, which is respectively connected to the selection units of multiple modules to be detected. The selection units of multiple modules to be detected are all connected to the register, and the register sends an enable signal to the selection unit of the target module to be detected.
[0068] by Figure 3 For example, the chip includes four modules A, B, C, and D to be detected. The detection source is connected to the power consumption excitation generation module through a register. The register receives an enable signal and sends the enable signal to the corresponding power consumption excitation generation module. The power consumption excitation generation module is respectively connected to the selection units of the four modules to be detected, and the selection units of the four modules to be detected are all connected to the register. Taking the register sending the enable signal to the selection unit of the module B to be detected as an example, the power consumption excitation generation module is connected to the module B to be detected, so that the excitation signal of the power consumption excitation generation module is sent to the module B to be detected via the selection unit.
[0069] In this case, the power consumption stimulus generation module in the chip needs to be set independently of the module to be detected. Since there is only one power consumption stimulus generation module, the area in the chip can be further saved. And since the stimulus generation module is moved outside the module to be detected, the subsequent power consumption measurement will exclude the power consumption of the power consumption stimulus module itself, making it more accurate to measure the power consumption of the module to be detected in the general function mode.
[0070] If in subsequent power consumption measurement iterations it is found that the power consumption of the previous simulation is inconsistent with the power consumption of the chip, the same stimulus signal as the register transfer level simulation and gate-level netlist simulation before chip tape-out can be generated on the chip. Then, by comparing and analyzing the actual power consumption of each module to be tested in the chip with the power consumption of the register transfer level or gate-level netlist simulation, the cause of the different power consumption can be found, and the power consumption analysis prediction process and methodology before chip tape-out can be optimized.
[0071] Further, see Figure 2 and Figure 3The detection device is also connected to a comparison operation unit and a detector. When the detector detects the power consumption of the target module to be detected after the excitation signal is input, the detector sends the detected power consumption of the target module to be detected to the comparison operation unit; the comparison operation unit compares the power consumption of the target module to be detected before the excitation signal is input with the power consumption after the excitation signal is input to obtain the real power consumption of the target module to be detected.
[0072] In the embodiment of the present invention, the detector and the comparison operation unit may be a hardware unit or a software unit, and of course may also be a unit formed by combining hardware and components, which is not specifically limited in this embodiment.
[0073] The detector can actively poll each module to be detected within a set period to obtain the latest power consumption of each module to be detected. Then, the power consumption of the target module to be detected before the excitation signal is input has been obtained by the detector in the previous period and stored in the local storage space, such as memory, hard disk storage area, etc.
[0074] After obtaining the real power consumption of the module to be tested, you can further use the real power consumption of the module to perform other analysis tasks. For example, compare the real power consumption of the module to be tested with the gate-level netlist simulation power consumption before tape-out to analyze and find the cause of the power consumption difference. For the gate-level netlist simulation power consumption before tape-out, you can get it during the chip simulation stage by using the simulation result FSDB file plus the PTPX tool.
[0075] By analyzing and comparing the actual power consumption of each module and the gate-level netlist simulation power consumption before tape-out, we can find the cause of the power consumption difference, further improve the power consumption simulation prediction process before tape-out, and determine the actual power consumption problem.
[0076] The chip power consumption detection device provided in the embodiment of the present invention may only have a single power consumption incentive generating module, which is connected to at least one module to be detected. Alternatively, a power consumption incentive generating module may be set in each module to be detected to achieve the purpose of obtaining the actual power consumption of any module to be detected.
[0077] The chip power consumption detection device of the embodiment of the present invention, in addition to setting up multiple modules to be detected in the chip, can further set up multiple sub-modules in each module to be detected, and further achieve the purpose of measuring the power consumption of any sub-module.
[0078] Specifically, see Figure 4 An embodiment of the present invention discloses a chip power consumption detection device, which includes at least one sub-module for each module to be detected, and at least one sub-module is connected to a power consumption excitation generation module so that the power consumption excitation generation module inputs an excitation signal to a target sub-module to obtain the actual power consumption of the target sub-module.
[0079] Optionally, the input end of each submodule is connected to a subselection unit, the detection source is connected to each subselection unit through a register, and the subselection unit of each submodule is connected to the power consumption excitation generation module.
[0080] When the sub-selection unit of the target sub-module receives the enable signal sent by the register, the power consumption incentive generation module and the target sub-module are connected through the sub-selection unit.
[0081] by Figure 4 For example, Figure 4 One of the modules to be detected A in the chip is shown, and a power consumption excitation generation module is provided in the module to be detected A. The power consumption excitation generation module is connected to the selection unit of the module to be detected A, so that the module to be detected A receives the excitation signal of the power consumption excitation generation module; and the power consumption excitation generation module is connected to the register, so that the power consumption excitation generation module receives the enable signal of the register. The specific signal transmission process has been described in detail in the above content, so it will not be repeated here.
[0082] More specifically, the module A to be detected includes four submodules A1 to A4, and the four submodules A1 to A4 are respectively connected to subselection units. The power consumption excitation generation module in module A is respectively connected to the subselection units of the four submodules A1 to A4. In addition, the subselection units of the four submodules A1 to A4 are respectively connected to registers for receiving enable signals of the registers. For example, when submodule A1 receives the enable signal of the register, the power consumption excitation generation module is connected to submodule A1 so that the excitation signal is sent to submodule A1.
[0083] The chip power consumption detection device of the embodiment of the present invention can further obtain the actual power consumption of each submodule by setting at least one submodule in each module to be detected, so as to meet the subsequent demand for further accurate analysis of the chip power consumption.
[0084] The embodiment of the present invention discloses a method for detecting chip power consumption. Figure 5 , used in the chip power consumption detection device as described in the above embodiment, the method includes the following steps 501-502:
[0085] 501. A detection source sends an enable signal to a power consumption excitation generation module, so that the power consumption excitation generation module generates an excitation signal.
[0086] Specifically, for a structure, a chip includes a plurality of modules to be detected, and there may be one power consumption excitation generating module, which is respectively connected to the plurality of modules to be detected in the chip.
[0087] For a chip of this structure, the detection source directly sends an enable signal to the power consumption excitation generation module, so that the power consumption excitation generation module generates an excitation signal.
[0088] For another structure, the chip includes multiple modules to be detected, and each module to be detected has a corresponding power consumption stimulus generating module. During manufacturing, the power consumption stimulus generating module can be arranged inside the corresponding module to be detected.
[0089] For a chip of this structure, the detection source sends an enable signal to the corresponding power consumption excitation generation module, so that the power consumption excitation generation module generates an excitation signal.
[0090] 502. The power consumption stimulus generating module inputs the stimulus signal to the target module to be detected to obtain the actual power consumption of the target module to be detected.
[0091] For a structure in which each module to be detected has a corresponding power consumption excitation generating module, the power consumption excitation generating module can directly input an excitation signal to the corresponding module to be detected to obtain the actual power consumption of the target module to be detected.
[0092] For example, see Figure 2 The chip includes four modules to be detected, A, B, C, and D. Each module to be detected has a corresponding power consumption incentive generation module. If the power consumption incentive generation module corresponding to the module to be detected C receives an enable signal, the power consumption incentive generation module generates an incentive signal and inputs it to the module to be detected C.
[0093] Specifically, each power consumption excitation generation module is connected to the selection unit of the corresponding module to be detected, and the register is respectively connected to the selection units of multiple modules to be detected in the chip. The detection source sends an enable signal to the register, and the register sends the enable signal to the power consumption excitation generation module corresponding to the module to be detected C; at the same time, the register sends the enable signal to the selection unit of the module to be detected C, so that the power consumption excitation generation module can be connected to the module to be detected C, so that the power consumption excitation generation module can input the excitation signal to the module to be detected C.
[0094] For a structure in which there is only one power consumption excitation generating module in a chip, the power consumption excitation generating module can input an excitation signal to a target module to be detected to obtain the actual power consumption of the target module to be detected. How to determine the target module to be detected requires a register to determine.
[0095] Specifically, see Figure 3, the detection source is connected to the register, the register is respectively connected to the selection units of the multiple modules to be detected, and the power consumption excitation generation module is respectively connected to the selection units of the multiple modules to be detected. The detection source sends an enable signal to the register, and the register sends the enable signal to the corresponding power consumption excitation generation module; at the same time, the register sends the enable signal to the selection unit of the target module to be detected, so that the power consumption excitation generation module can be connected to the target module to be detected, so that the power consumption excitation generation module can input the excitation signal to the target module to be detected.
[0096] Correspondingly, before the power consumption excitation generation module inputs the excitation signal to the target module to be detected, the method also includes: when the selection unit of the target module to be detected receives the enable signal sent by the register, the power consumption excitation generation module and the target module to be detected are connected through the selection unit.
[0097] The chip power consumption detection method provided by the embodiment of the present invention is achieved by setting a detection source and a power consumption excitation generating module in the chip. The detection source sends an enable signal to the power consumption excitation generating module, so that the power consumption excitation generating module generates an excitation signal for the module to be detected to generate power consumption. Then, the power consumption excitation generating module inputs the excitation signal to the target module to be detected, thereby obtaining the actual power consumption of the target module to be detected to meet the subsequent needs of chip power consumption analysis.
[0098] In addition, the chip power consumption detection method provided in the embodiment of the present invention sets the detection source to send an enable signal to the power consumption incentive generation module through a register, and determines the power consumption incentive generation module that sends the enable signal among multiple power consumption incentive generation modules through the register.
[0099] The embodiment of the present invention discloses a method for detecting chip power consumption. Figure 6 , a device for detecting chip power consumption as described in the above embodiment, comprising:
[0100] 601. The detection source sends the enable signal to a register, and the register sends the enable signal to a corresponding power consumption incentive generating module, so that the power consumption incentive generating module generates an incentive signal.
[0101] 602. When the selection unit of the target module to be detected receives an enable signal sent by the register, the power consumption stimulus generating module and the target module to be detected are connected through the selection unit.
[0102] 603. The power consumption excitation generating module inputs the excitation signal to the target module to be detected to obtain the power consumption of the target module to be detected after the excitation signal is input.
[0103] The chip power consumption detection device in the embodiment of the present invention may only have a single power consumption incentive generating module connected to at least one module to be detected, or a power consumption incentive generating module may be set in each module to be detected.
[0104] For the specific structures of the above two chip power consumption detection devices, reference may be made to the detailed contents of the aforementioned embodiments, which will not be described in detail here.
[0105] 604. When the detector detects the power consumption of the target module to be detected after the excitation signal is input, the detector sends the power consumption of the target module to be detected after the excitation signal is input to the comparison operation unit.
[0106] The configuration of the detector and the comparison operation unit has been described in detail in the aforementioned embodiments and will not be repeated here.
[0107] 605. The comparison operation unit compares the power consumption of the target module to be detected before the excitation signal is input with the power consumption of the target module to be detected after the excitation signal is input, so as to obtain the real power consumption of the target module to be detected.
[0108] Among them, for the power consumption of the target module to be detected before the excitation signal is input, the detector can actively poll each module to be detected within a set period to obtain the latest power consumption of each module. Then, for the power consumption of the target module to be detected before the excitation signal is input, the detector has already obtained it in the previous period and stored it in the local storage space, such as memory, hard disk storage area, etc.
[0109] In more detail, for the case where the module to be detected includes at least one submodule, as in the above embodiments and Figure 4 As shown, the method further includes the following steps S61-S62:
[0110] S61. When the sub-selection unit of the target sub-module receives an enable signal sent by a register, the power consumption incentive generation module and the target sub-module are connected through the sub-selection unit.
[0111] S62 , the power consumption stimulus generating module inputs the stimulus signal to the target submodule to obtain the actual power consumption of the target submodule.
[0112] Through steps S61 to S62, the chip power consumption detection method of the embodiment of the present invention can further obtain the actual power consumption of each submodule to meet the subsequent demand for further accurate analysis of the chip power consumption.
[0113] Specifically, the specific calculation process of the real power consumption of each target submodule is the same as the above-mentioned calculation process of the real power consumption of each module to be detected, including the following steps S63 to S65:
[0114] S63. The power consumption excitation generating module inputs the excitation signal to the target submodule to obtain the power consumption of the target submodule after the excitation signal is input.
[0115] S64 . When the detector detects the power consumption of the target submodule after the excitation signal is input, the detector sends the power consumption of the target submodule after the excitation signal is input to the comparison operation unit.
[0116] S65 . The comparison operation unit compares the power consumption of the target submodule before the excitation signal is input with the power consumption of the target submodule after the excitation signal is input to obtain the real power consumption of the target submodule.
[0117] Figure 7 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 7 As shown, the electronic device may include: a processor 710, a communication interface 720, a memory 730 and a communication bus 740, wherein the processor 710, the communication interface 720 and the memory 730 communicate with each other through the communication bus 740. The processor 710 may call the logic instructions in the memory 730 to execute the chip power consumption detection method, and the detection method includes:
[0118] The detection source sends an enable signal to the power consumption excitation generation module, so that the power consumption excitation generation module generates an excitation signal;
[0119] The power consumption excitation generating module inputs the excitation signal to the target module to be detected to obtain the actual power consumption of the target module to be detected.
[0120] In addition, the logic instructions in the above-mentioned memory 730 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0121] On the other hand, an embodiment of the present invention further provides a computer program product, the computer program product including a computer program stored on a non-transitory computer-readable storage medium, the computer program including program instructions, when the program instructions are executed by a computer, the computer can execute the chip power consumption detection method provided by the above-mentioned method embodiments, the detection method including:
[0122] The detection source sends an enable signal to the power consumption excitation generation module, so that the power consumption excitation generation module generates an excitation signal;
[0123] The power consumption excitation generating module inputs the excitation signal to the target module to be detected to obtain the actual power consumption of the target module to be detected.
[0124] On the other hand, an embodiment of the present invention further provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the chip power consumption detection method provided in the above embodiments is implemented. The detection method includes:
[0125] The detection source sends an enable signal to the power consumption excitation generation module, so that the power consumption excitation generation module generates an excitation signal;
[0126] The power consumption excitation generating module inputs the excitation signal to the target module to be detected to obtain the actual power consumption of the target module to be detected.
[0127] The device embodiments described above are merely illustrative, 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. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0128] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0129] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A chip power consumption detection device, characterized in that: include: Detection source; A power consumption incentive generating module, the power consumption incentive generating module is connected to the detection source and both are located in the chip, the detection source sends an enable signal to the power consumption incentive generating module to enable the power consumption incentive generating module to generate an incentive signal; At least one module to be detected, the power consumption excitation generating module is connected to at least one module to be detected, so that the power consumption excitation generating module inputs the excitation signal to the target module to be detected to obtain the real power consumption of the target module to be detected; It also includes: a register, through which the detection source is connected to the power consumption incentive generating module, the register receives the enable signal, and sends the enable signal to the corresponding power consumption incentive generating module; The input end of each module to be detected is connected to a selection unit, and the selection unit is respectively connected to the power consumption excitation generation module and the original input signal end; The selection unit is connected to the register, and is used for, when the selection unit of the target module to be detected receives an enable signal sent by the register, the power consumption stimulus generating module and the target module to be detected are connected through the selection unit; The detection device is also connected to a comparison operation unit and a detector; When the detector detects the power consumption of the target module to be detected after the excitation signal is input, the comparison operation unit compares the power consumption of the target module to be detected before the excitation signal is input with the power consumption after the excitation signal is input to obtain the actual power consumption of the target module to be detected.
2. The chip power consumption detection device according to claim 1, characterized in that: There are multiple modules to be detected, each of which is provided with a corresponding power consumption incentive generating module, and each of which is connected to a selection unit of the corresponding module to be detected; The selection units of the plurality of modules to be detected are all connected to the register, and the register sends the enable signal to the selection unit of the target module to be detected.
3. The chip power consumption detection device according to claim 1, characterized in that: There are multiple modules to be detected, and there is one power consumption incentive generating module, and the power consumption incentive generating module is respectively connected to the selection units of the multiple modules to be detected; The selection units of the plurality of modules to be detected are all connected to the register, and the register sends the enable signal to the selection unit of the target module to be detected.
4. The chip power consumption detection device according to claim 1, characterized in that: The module to be detected includes at least one submodule; At least one of the submodules is connected to the power consumption incentive generating module, so that the power consumption incentive generating module inputs the incentive signal to the target submodule to obtain the actual power consumption of the target submodule.
5. The chip power consumption detection device according to claim 4, characterized in that: The input end of each submodule is connected to a sub-selection unit, and the detection source is connected to each sub-selection unit through the register; The sub-selection unit of each sub-module is connected to the power consumption incentive generation module; In the case where the sub-selection unit of the target sub-module receives the enable signal sent by the register, the power consumption incentive generation module and the target sub-module are connected through the sub-selection unit.
6. A method for detecting chip power consumption, characterized in that: A device for detecting chip power consumption according to any one of claims 1 to 5, wherein the detection method comprises: The detection source sends an enable signal to the power consumption excitation generation module, so that the power consumption excitation generation module generates an excitation signal; The power consumption excitation generating module inputs the excitation signal to the target module to be detected to obtain the real power consumption of the target module to be detected; The detection source sends an enable signal to the power consumption incentive generating module, including: the detection source sends the enable signal to a register, and the register sends the enable signal to the corresponding power consumption incentive generating module; Before the power consumption excitation generating module inputs the excitation signal to the target module to be detected, the method further includes: In the case that the selection unit of the target module to be detected receives the enable signal sent by the register, the power consumption stimulus generating module is connected to the target module to be detected through the selection unit.
7. The method for detecting chip power consumption according to claim 6, characterized in that: In the case where the module to be detected includes at least one submodule, the method further includes: The power consumption stimulus generating module inputs the stimulus signal to the target submodule to obtain the actual power consumption of the target submodule.
8. The method for detecting chip power consumption according to claim 7, characterized in that: Before the power consumption stimulus generating module inputs the stimulus signal to the target submodule, the method further includes: When the sub-selection unit of the target sub-module receives the enable signal sent by the register, the power consumption incentive generation module and the target sub-module are connected through the sub-selection unit.
9. The method for detecting chip power consumption according to claim 6, characterized in that: The detection device is also connected to a comparison operation unit and a detector; The power consumption stimulus generating module inputs the stimulus signal to the target module to be detected to obtain the actual power consumption of the target module to be detected, including: The power consumption excitation generating module inputs the excitation signal to the target module to be detected, so as to obtain the power consumption of the target module to be detected after the excitation signal is input; When the detector detects the power consumption of the target module to be detected after the excitation signal is input, the detector sends the power consumption of the target module to be detected after the excitation signal is input to the comparison operation unit; The comparison operation unit compares the power consumption of the target module to be detected before the excitation signal is input with the power consumption of the target module to be detected after the excitation signal is input, so as to obtain the real power consumption of the target module to be detected.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the chip power consumption detection method according to any one of claims 6 to 9 are implemented.
11. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the chip power consumption detection method as claimed in any one of claims 6 to 9 are implemented.
