[go: up one dir, main page]

CN112631849B - Power consumption detection model construction method, power consumption detection device and electronic equipment - Google Patents

Power consumption detection model construction method, power consumption detection device and electronic equipment Download PDF

Info

Publication number
CN112631849B
CN112631849B CN202011513448.5A CN202011513448A CN112631849B CN 112631849 B CN112631849 B CN 112631849B CN 202011513448 A CN202011513448 A CN 202011513448A CN 112631849 B CN112631849 B CN 112631849B
Authority
CN
China
Prior art keywords
observation signal
power consumption
data
target
application
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011513448.5A
Other languages
Chinese (zh)
Other versions
CN112631849A (en
Inventor
徐祥俊
黄维
卢海平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hygon Information Technology Co Ltd
Original Assignee
Hygon Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hygon Information Technology Co Ltd filed Critical Hygon Information Technology Co Ltd
Priority to CN202011513448.5A priority Critical patent/CN112631849B/en
Publication of CN112631849A publication Critical patent/CN112631849A/en
Application granted granted Critical
Publication of CN112631849B publication Critical patent/CN112631849B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/26Functional testing
    • G06F11/261Functional testing by simulating additional hardware, e.g. fault simulation
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/25Testing of logic operation, e.g. by logic analysers
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Power Sources (AREA)
  • Remote Monitoring And Control Of Power-Distribution Networks (AREA)

Abstract

The application provides a power consumption detection model construction method, a power consumption detection device and electronic equipment, wherein the method comprises the following steps: simulating the target functional module in a first appointed number of application scenes to obtain first turnover data of data signals in each application scene of the first appointed number; screening the data signals according to the first overturn data to determine a target observation signal group; determining second overturn data of the target observation signal group in each application scene from the first overturn data; calculating to obtain correction parameters and signal weights of all target observation signals of the target observation signal group according to the second overturn data; and determining a power consumption detection model according to the correction parameter and the signal weight by taking the turning quantity of each target observation signal in the target observation signal group as an independent variable. The detection of the power consumption of the chip can be more objective, and the efficiency of the detection of the power consumption of the chip can be improved.

Description

功耗检测模型构建方法、功耗检测方法、装置及电子设备Power consumption detection model building method, power consumption detection method, device and electronic equipment

技术领域technical field

本申请涉及芯片检测技术领域,具体而言,涉及一种功耗检测模型构建方法、功耗检测方法、装置及电子设备。The present application relates to the technical field of chip detection, in particular, to a power consumption detection model building method, power consumption detection method, device and electronic equipment.

背景技术Background technique

芯片的功耗是限制芯片设计的重要影响因素之一。而芯片的功耗可以分为动态功耗和静态功耗两部分,其中动态功耗与时钟和数据的翻转相关。动态功耗与时钟和数据的翻转、芯片的功能和芯片运行状态相关。The power consumption of the chip is one of the important factors limiting the design of the chip. The power consumption of the chip can be divided into two parts: dynamic power consumption and static power consumption, where the dynamic power consumption is related to the inversion of clock and data. Dynamic power consumption is related to clock and data toggling, the function of the chip, and the operating state of the chip.

现有估算数据翻转的技术方案一般是通过相关技术人员的工作经验选取观测信号。然后基于观测信号的翻转情况来确定出芯片基于翻转情况下的功耗。此种功耗确定方式确定的功耗准确性依赖于相关技术人员的经验。Existing technical solutions for estimating data inversion generally select observation signals based on the work experience of relevant technical personnel. Then, based on the inversion of the observed signal, the power consumption of the chip based on the inversion is determined. The accuracy of the power consumption determined by this power consumption determination method depends on the experience of relevant technical personnel.

发明内容Contents of the invention

本申请的目的在于提供一种功耗检测模型构建方法、功耗检测方法、装置及电子设备,能够解决关于功耗检测客观性不足的问题。The purpose of the present application is to provide a power consumption detection model building method, power consumption detection method, device and electronic equipment, which can solve the problem of insufficient objectivity of power consumption detection.

第一方面,本申请实施例提供一种功耗检测模型构建方法,包括:In the first aspect, the embodiment of the present application provides a method for constructing a power consumption detection model, including:

将目标功能模块在第一指定数量的应用场景中进行仿真,以得到所述第一指定数量的应用场景中的各个应用场景下的数据信号的第一翻转数据,所述目标功能模块为一芯片设计中的一个功能模块;Simulating the target functional module in a first specified number of application scenarios to obtain the first flip data of the data signal in each application scenario in the first specified number of application scenarios, the target functional module is a chip A functional module in the design;

根据所述第一翻转数据对数据信号进行筛查,以确定目标观测信号组,所述目标观测信号包括多个目标观测信号;Screening data signals according to the first flip data to determine a target observation signal group, where the target observation signals include a plurality of target observation signals;

从所述第一翻转数据中,确定出所述目标观测信号组中的各个目标观测信号在所述第一指定数量的应用场景中的各个应用场景下的第二翻转数据;From the first inversion data, determine the second inversion data of each target observation signal in the target observation signal group in each application scenario in the first specified number of application scenarios;

根据所述第二翻转数据计算得到校正参数以及所述目标观测信号组的各个目标观测信号对应的信号权重;Calculate and obtain correction parameters and signal weights corresponding to each target observation signal of the target observation signal group according to the second flip data;

以所述目标观测信号组中的各个目标观测信号的翻转量为自变量,根据所述校正参数及所述信号权重确定出功耗检测模型,所述功耗检测模型用于对芯片的功耗进行计算。Taking the inversion amount of each target observation signal in the target observation signal group as an independent variable, and determining a power consumption detection model according to the correction parameter and the signal weight, the power consumption detection model is used to control the power consumption of the chip Calculation.

在一种可选的实施方式中,所述根据所述第一翻转数据对数据信号进行筛查,以确定目标观测信号组,包括:In an optional implementation manner, the screening of data signals according to the first flip data to determine a target observation signal group includes:

根据预设数值区间在所述第一指定数量的应用场景中所使用的数据信号进行初级筛选,以得到初始观测信号组,所述初始观测信号组中包括多个初始观测信号;performing primary screening on the data signals used in the first specified number of application scenarios according to a preset value interval to obtain an initial observation signal group, the initial observation signal group including a plurality of initial observation signals;

根据所述初始观测信号组确定出各个初始观测信号的信号误差;determining the signal error of each initial observation signal according to the initial observation signal group;

根据所述各个初始观测信号的信号误差从所述初始观测信号组中确定出所述目标观测信号组。The target observation signal group is determined from the initial observation signal group according to the signal error of each initial observation signal.

在上述实施方式中,通过选出的初始观测信号的信号误差,基于信号误差对选出的初始观测信号进行过滤,从而可以使选出的目标观测信号组中的观测信号能够更好地表征芯片的翻转情况,因此,基于目标观测信号组对芯片的功耗检测也能够更加准确。In the above embodiment, the selected initial observation signal is filtered based on the signal error of the selected initial observation signal, so that the observation signal in the selected target observation signal group can better characterize the chip Therefore, the power consumption detection of the chip based on the target observation signal group can also be more accurate.

在一种可选的实施方式中,所述第一指定数量的应用场景中包括N个应用场景,所述N个应用场景中包括M个子场景;所述根据预设数值区间在所述第一指定数量的应用场景中所使用的数据信号进行初级筛选,以得到初始观测信号组,包括:In an optional implementation manner, the first specified number of application scenarios includes N application scenarios, and the N application scenarios include M sub-scenes; The data signals used in the specified number of application scenarios are initially screened to obtain the initial observation signal group, including:

在每个所述子场景中筛选出翻转量在所述预设数值区间中的观测信号,得到每个子场景对应的观测信号组;In each of the sub-scenes, the observation signals whose flipping amount is in the preset value range are screened out to obtain the observation signal group corresponding to each sub-scene;

针对每个应用场景,将应用场景中的各个所述子场景对应的观测信号组取交集得到所述应用场景对应的观测信号组,以得到所述N个应用场景对应的N个观测信号组,所述N个观测信号组为所述初始观测信号组,其中,M和N为大于一的正整数。For each application scenario, taking the intersection of the observation signal groups corresponding to each of the sub-scenes in the application scenario to obtain the observation signal groups corresponding to the application scenarios, so as to obtain the N observation signal groups corresponding to the N application scenarios, The N observation signal groups are the initial observation signal groups, where M and N are positive integers greater than one.

在上述实施方式中,筛选出预设数值区间中的观测信号组,从而可以使选出的观测信号组中的观测信号能够更好地表示大多数观测信号的翻转情况。In the above implementation manner, the observation signal groups in the preset value range are screened out, so that the observation signals in the selected observation signal group can better represent the inversion of most observation signals.

在一种可选的实施方式中,所述预设数值区间通过以下步骤确定:In an optional implementation manner, the preset value range is determined by the following steps:

计算每个所述子场景中的每个数据信号的单位时间翻转量;calculating the flipping amount per unit time of each data signal in each of the sub-scenes;

确定出各个子场景中的各个数据信号的单位时间翻转量中的非零翻转量中间数;Determining the non-zero intermediate number of inversion amount per unit time of each data signal in each sub-scene;

根据所述非零翻转量中间数确定出所述预设数值区间。The preset value interval is determined according to the non-zero intermediate number of the flip amount.

在上述实施方式中,基于所述非零翻转量中间数确定出所述预设数值区间能够更好地表示各个观测信号的可能的所在区间,从而可以使基于该预设数值区间确定出的观测信号能够更好地表示大多数观测信号的翻转情况。In the above embodiment, the preset value interval determined based on the non-zero inversion value middle number can better represent the possible interval of each observation signal, so that the observation determined based on the preset value interval can be The signal is better able to represent the flipping of most observed signals.

在一种可选的实施方式中,所述根据所述各个初始观测信号的信号误差从所述初始观测信号组中确定出所述目标观测信号组,包括:In an optional implementation manner, the determining the target observation signal group from the initial observation signal group according to the signal error of each initial observation signal includes:

在所述N个应用场景中的目标应用场景中,选出第二指定数量的信号误差最小的观测信号,得到筛查观测信号组,所述目标应用场景为所述N个应用场景中的任意一个应用场景;In the target application scenario among the N application scenarios, select a second specified number of observation signals with the smallest signal error to obtain a screening observation signal group, and the target application scenario is any of the N application scenarios. an application scenario;

将N个应用场景对应的N个筛查观测信号组取并集得到所述目标观测信号组。The target observation signal group is obtained by unioning the N screening observation signal groups corresponding to the N application scenarios.

在一种可选的实施方式中,所述各个初始观测信号的信号误差通过以下公式确定:In an optional implementation manner, the signal error of each initial observation signal is determined by the following formula:

Figure BDA0002844059340000031
Figure BDA0002844059340000031

Figure BDA0002844059340000032
Figure BDA0002844059340000032

Figure BDA0002844059340000033
Figure BDA0002844059340000033

其中,M表示第i个应用场景中所包含的子场景的数量,Wi,k表示第i个应用场景中的第k个初始观测信号的信号误差,tFi,j表示第i个应用场景中的第j个子场景中单位时间内的信号总翻转量,

Figure BDA0002844059340000042
表示第i个应用场景中的单位时间内的信号总翻转量均值,tfi,j,k表示第i个应用场景中的第j个子场景中的第k个初始观测信号的单位时间内的翻转量,
Figure BDA0002844059340000043
表示第i个应用场景中的第k个初始观测信号的翻转量均值。Among them, M represents the number of sub-scenes contained in the i-th application scene, W i,k represents the signal error of the k-th initial observation signal in the i-th application scene, tF i,j represents the i-th application scene The total signal turnover per unit time in the jth sub-scene in ,
Figure BDA0002844059340000042
Represents the mean value of the total signal turnover per unit time in the i-th application scenario, tf i,j,k represents the reversal per unit time of the k-th initial observation signal in the j-th sub-scene in the i-th application scenario quantity,
Figure BDA0002844059340000043
Indicates the mean value of the flipping amount of the kth initial observation signal in the i-th application scenario.

在一种可选的实施方式中,所述根据所述第二翻转数据计算得到校正参数以及所述目标观测信号组的各个目标观测信号对应的信号权重,包括:In an optional implementation manner, the calculation according to the second flip data to obtain the correction parameter and the signal weight corresponding to each target observation signal of the target observation signal group includes:

根据所述第二翻转数据中的D组第一类翻转数据构建第一矩阵,所述D表示所述指定数量的应用场景中的子场景的数量,所述第一类翻转数据表示目标观测信号组的各个目标观测信号在所述指定数量的应用场景中的各个子场景下的翻转量;Construct a first matrix according to D sets of first-type inversion data in the second inversion data, the D represents the number of sub-scenes in the specified number of application scenarios, and the first-type inversion data represents a target observation signal The turnover amount of each target observation signal of the group under each sub-scene in the specified number of application scenarios;

根据所述第二翻转数据中的D组第二类翻转数据构建第二矩阵,所述第二类翻转数据表示所述目标观测信号组在所述指定数量的应用场景中的每个应用场景下的总翻转量;Constructing a second matrix according to D sets of second-type inversion data in the second inversion data, the second-type inversion data indicating that the target observation signal group is in each application scenario in the specified number of application scenarios The total amount of turnover;

根据所述第一矩阵和所述第二矩阵计算得到所述目标观测信号组对应的信号权重及校正参数。Signal weights and correction parameters corresponding to the target observation signal group are calculated according to the first matrix and the second matrix.

在一种可选的实施方式中,还包括:In an optional embodiment, it also includes:

根据所述各个目标观测信号的所述第二翻转数据计算所述功耗检测模型的模型误差;calculating a model error of the power consumption detection model according to the second flip data of each target observation signal;

判断所述模型误差是否大于预设误差值;judging whether the model error is greater than a preset error value;

若所述模型误差大于预设误差值,则重新选择最新的所述目标观测信号组,以更新所述构建功耗检测模型。If the model error is greater than a preset error value, reselect the latest target observation signal group to update the constructed power consumption detection model.

在一种可选的实施方式中,通过以下公式计算所述功耗检测模型的模型误差:In an optional implementation manner, the model error of the power consumption detection model is calculated by the following formula:

Figure BDA0002844059340000041
Figure BDA0002844059340000041

其中,e表示功耗检测模型的模型误差,D表示仿真所涉及的应用场景的数量,stFi表示第i个场景下的目标观测信号组的总翻转量,etFi表示根据所述功耗检测模型计算得到的第i个场景下的翻转量。Among them, e represents the model error of the power consumption detection model, D represents the number of application scenarios involved in the simulation, stF i represents the total turnover of the target observation signal group in the ith scene, etF i represents The flip amount in the i-th scene calculated by the model.

在上述实施方式中,通过功耗检测模型的模型误差进行计算验证,从而可以提高功耗检测模型的准确性。In the foregoing implementation manners, calculation and verification are performed through model errors of the power consumption detection model, so that the accuracy of the power consumption detection model can be improved.

第二方面,本申请实施例还提供一种功耗检测方法,包括:In the second aspect, the embodiment of the present application also provides a power consumption detection method, including:

获取待检测芯片在目标观测信号组中的各个观测信号在单位时间内的翻转值;Obtain the inversion value of each observation signal of the chip to be detected in the target observation signal group in unit time;

基于第一方面或第一方面的任意一种可选的实施方式提供的方法得到的功耗检测模型,根据所述各个观测信号在单位时间内的翻转值计算得到所述待检测芯片的功耗。Based on the power consumption detection model obtained by the method provided in the first aspect or any optional implementation manner of the first aspect, the power consumption of the chip to be detected is calculated according to the reversal value of each observation signal per unit time .

第三方面,本申请实施例还提供一种功耗检测模型构建装置,包括:In the third aspect, the embodiment of the present application also provides a device for constructing a power consumption detection model, including:

仿真模块,用于将目标功能模块在第一指定数量的应用场景中进行仿真,以得到所述第一指定数量的应用场景中的各个应用场景下的数据信号的第一翻转数据,所述目标功能模块为一芯片设计中的一个功能模块;A simulation module, configured to simulate the target function module in a first specified number of application scenarios, so as to obtain the first flip data of the data signal in each application scenario in the first specified number of application scenarios, the target The functional module is a functional module in a chip design;

筛查模块,用于根据所述第一翻转数据对数据信号进行筛查,以确定目标观测信号组;A screening module, configured to screen data signals according to the first flip data to determine a target observation signal group;

第一确定模块,用于从所述第一翻转数据中,确定出所述目标观测信号组中的各个目标观测信号在所述第一指定数量的应用场景中的各个应用场景下的第二翻转数据;A first determination module, configured to determine, from the first inversion data, the second inversion of each target observation signal in the target observation signal group under each application scenario in the first specified number of application scenarios data;

第一计算模块,用于根据所述第二翻转数据计算得到校正参数以及所述目标观测信号组的各个目标观测信号对应的信号权重;A first calculation module, configured to calculate correction parameters and signal weights corresponding to each target observation signal of the target observation signal group according to the second flip data;

第二确定模块,用于以所述目标观测信号组中的各个目标观测信号的翻转量为自变量,根据所述校正参数及所述信号权重确定出功耗检测模型,所述功耗检测模型用于对芯片的功耗进行计算。The second determination module is configured to use the inversion amount of each target observation signal in the target observation signal group as an argument, and determine a power consumption detection model according to the correction parameter and the signal weight, and the power consumption detection model It is used to calculate the power consumption of the chip.

第四方面,本申请实施例还提供一种功耗检测装置,包括:In a fourth aspect, the embodiment of the present application further provides a power consumption detection device, including:

获取模块,用于获取待检测芯片在目标观测信号组中的各个观测信号在单位时间内的翻转值;The obtaining module is used to obtain the inversion value of each observation signal in the target observation signal group of the chip to be detected in unit time;

第二计算模块,用于基于第一方面或第一方面的任意一种可选的实施方式提供的方法得到的功耗检测模型,根据所述各个观测信号在单位时间内的翻转值计算得到所述待检测芯片的功耗。The second calculation module is used to calculate the power consumption detection model obtained based on the method provided in the first aspect or any optional implementation manner of the first aspect, and calculate the calculated value according to the reversal value of each observed signal within a unit time. Describe the power consumption of the chip to be tested.

第五方面,本申请实施例还提供一种电子设备,包括:处理器、存储器,所述存储器存储有所述处理器可执行的机器可读指令,当电子设备运行时,所述机器可读指令被所述处理器执行时执行上述的方法的步骤。In the fifth aspect, the embodiment of the present application further provides an electronic device, including: a processor and a memory, the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the machine-readable The steps of the above method are performed when the instructions are executed by the processor.

第五方面,本申请实施例还提供一种计算机可读存储介质,该计算机可读存储介质上存储有计算机程序,该计算机程序被处理器运行时执行上述的方法的步骤。In a fifth aspect, the embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is run by a processor, the steps of the above method are executed.

本申请实施例的有益效果是:通过基于观测信号的选择,以及基于选出的目标观测信号组构建出能够计算芯片功耗的功耗检测模型,使芯片功耗的计算不依赖于相关技术人员的经验,基于该功耗检测模型计算的芯片功耗能够更加客观。进一步地,基于该功耗检测模型计算的芯片功耗效率也可以更高。The beneficial effect of the embodiment of the present application is: through the selection based on the observation signal, and based on the selected target observation signal group, a power consumption detection model capable of calculating the power consumption of the chip is constructed, so that the calculation of the power consumption of the chip does not depend on relevant technical personnel Based on our experience, the chip power consumption calculated based on this power consumption detection model can be more objective. Further, the power consumption efficiency of the chip calculated based on the power consumption detection model may also be higher.

附图说明Description of drawings

为了更清楚地说明本申请实施例的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,应当理解,以下附图仅示出了本申请的某些实施例,因此不应被看作是对范围的限定,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他相关的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present application, the accompanying drawings that are required in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present application, and thus It should be regarded as a limitation on the scope, and those skilled in the art can also obtain other related drawings based on these drawings without creative work.

图1为本申请实施例提供的电子设备的方框示意图。FIG. 1 is a schematic block diagram of an electronic device provided by an embodiment of the present application.

图2为本申请实施例提供的功耗检测模型构建方法的流程图。FIG. 2 is a flow chart of a method for constructing a power consumption detection model provided by an embodiment of the present application.

图3为本申请实施例提供的功耗检测模型构建方法的另一实施方式的流程图。FIG. 3 is a flow chart of another implementation of the method for constructing a power consumption detection model provided in the embodiment of the present application.

图4为本申请实施例提供的功耗检测模型构建装置的功能模块示意图。FIG. 4 is a schematic diagram of functional modules of a device for constructing a power consumption detection model provided in an embodiment of the present application.

图5为本申请实施例提供的功耗检测方法的流程图。FIG. 5 is a flowchart of a method for detecting power consumption provided by an embodiment of the present application.

图6为本申请实施例提供的功耗检测装置的功能模块示意图。FIG. 6 is a schematic diagram of functional modules of a power consumption detection device provided by an embodiment of the present application.

具体实施方式Detailed ways

下面将结合本申请实施例中附图,对本申请实施例中的技术方案进行描述。The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.

应注意到:相似的标号和字母在下面的附图中表示类似项,因此,一旦某一项在一个附图中被定义,则在随后的附图中不需要对其进行进一步定义和解释。同时,在本申请的描述中,术语“第一”、“第二”等仅用于区分描述,而不能理解为指示或暗示相对重要性。It should be noted that like numerals and letters denote similar items in the following figures, therefore, once an item is defined in one figure, it does not require further definition and explanation in subsequent figures. Meanwhile, in the description of the present application, the terms "first", "second" and the like are only used to distinguish descriptions, and cannot be understood as indicating or implying relative importance.

芯片的功耗可以分为动态功耗和静态功耗两部分,其中动态功耗与时钟和数据信号的翻转相关,而静态功耗与器件的漏电相关。静态功耗一般占比相对较小,并且可以根据芯片面积和温度进行评估。但是动态功耗与时钟和数据信号的翻转、芯片的功能和芯片运行状态相关。The power consumption of the chip can be divided into dynamic power consumption and static power consumption. The dynamic power consumption is related to the inversion of the clock and data signals, while the static power consumption is related to the leakage of the device. Static power consumption is generally relatively small and can be evaluated based on die area and temperature. However, dynamic power consumption is related to the flipping of clock and data signals, the function of the chip and the operating state of the chip.

为了实现芯片的动态功耗的检测,本申请实施提供了一种功耗检测模型构建方法,能够构建出检测芯片功耗的模型。在本申请实施例提供的方法中,通过功耗仿真,能够对芯片内各个数据信号在各种预期工作场景下的翻转情况进行统计。下面通过几个实施例进行描述。In order to realize the detection of the dynamic power consumption of the chip, the implementation of the present application provides a method for constructing a power consumption detection model, which can construct a model for detecting the power consumption of the chip. In the method provided in the embodiment of the present application, through power consumption simulation, it is possible to make statistics on the inversion of each data signal in the chip under various expected working scenarios. The following describes several embodiments.

实施例一Embodiment one

为便于对本实施例进行理解,首先对执行本申请实施例所公开的功耗检测模型构建方法和功耗检测方法的电子设备进行详细介绍。To facilitate the understanding of this embodiment, an electronic device that executes the power consumption detection model construction method and the power consumption detection method disclosed in the embodiments of the present application is first introduced in detail.

如图1所示,是电子设备的方框示意图。电子设备100可以包括存储器111以及处理器113。本领域普通技术人员可以理解,图1所示的结构仅为示意,其并不对电子设备100的结构造成限定。例如,电子设备100还可包括比图1中所示更多或者更少的组件,或者具有与图1所示不同的配置。As shown in FIG. 1 , it is a schematic block diagram of an electronic device. The electronic device 100 may include a memory 111 and a processor 113 . Those skilled in the art can understand that the structure shown in FIG. 1 is only for illustration, and does not limit the structure of the electronic device 100 . For example, the electronic device 100 may also include more or fewer components than shown in FIG. 1 , or have a different configuration than that shown in FIG. 1 .

上述的存储器111以及处理器113各元件相互之间直接或间接地电性连接,以实现数据的传输或交互。例如,这些元件相互之间可通过一条或多条通讯总线或信号线实现电性连接。上述的处理器113用于执行存储器中存储的可执行模块。The components of the above-mentioned memory 111 and processor 113 are directly or indirectly electrically connected to each other to realize data transmission or interaction. For example, these components can be electrically connected to each other through one or more communication buses or signal lines. The aforementioned processor 113 is used to execute the executable modules stored in the memory.

其中,存储器111可以是,但不限于,随机存取存储器(Random Access Memory,简称RAM),只读存储器(Read Only Memory,简称ROM),可编程只读存储器(ProgrammableRead-Only Memory,简称PROM),可擦除只读存储器(Erasable Programmable Read-OnlyMemory,简称EPROM),电可擦除只读存储器(Electric Erasable Programmable Read-OnlyMemory,简称EEPROM)等。其中,存储器111用于存储程序,所述处理器113在接收到执行指令后,执行所述程序,本申请实施例任一实施例揭示的过程定义的电子设备100所执行的方法可以应用于处理器113中,或者由处理器113实现。Wherein, the memory 111 can be, but not limited to, random access memory (Random Access Memory, referred to as RAM), read-only memory (Read Only Memory, referred to as ROM), programmable read-only memory (ProgrammableRead-Only Memory, referred to as PROM) , Erasable Programmable Read-Only Memory (EPROM for short), Electric Erasable Programmable Read-Only Memory (EEPROM for short), etc. Wherein, the memory 111 is used to store a program, and the processor 113 executes the program after receiving an execution instruction, and the method performed by the electronic device 100 according to the process definition disclosed in any embodiment of the present application can be applied to processing In the device 113, or implemented by the processor 113.

上述的处理器113可能是一种集成电路芯片,具有信号的处理能力。上述的处理器113可以是通用处理器,包括中央处理器(Central Processing Unit,简称CPU)、网络处理器(Network Processor,简称NP)等;还可以是数字信号处理器(digital signalprocessor,简称DSP)、专用集成电路(Application Specific Integrated Circuit,简称ASIC)、现场可编程门阵列(FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。The above-mentioned processor 113 may be an integrated circuit chip, which has a signal processing capability. Above-mentioned processor 113 can be general-purpose processor, comprises central processing unit (Central Processing Unit, be called for short CPU), network processor (Network Processor, be called for short NP) etc.; Can also be digital signal processor (digital signal processor, be called for short DSP) , Application Specific Integrated Circuit (ASIC for short), Field Programmable Gate Array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. Various methods, steps, and logic block diagrams disclosed in the embodiments of the present application may be implemented or executed. A general-purpose processor may be a microprocessor, or the processor may be any conventional processor, or the like.

本实施例中的电子设备100可以用于执行本申请实施例提供的各个方法中的各个步骤。下面通过几个实施例详细描述功耗检测模型构建方法和功耗检测方法的实现过程。The electronic device 100 in this embodiment may be used to execute each step in each method provided in the embodiment of this application. The implementation process of the power consumption detection model construction method and the power consumption detection method will be described in detail below through several embodiments.

实施例二Embodiment two

请参阅图2,是本申请实施例提供的功耗检测模型构建方法的流程图。下面将对图2所示的具体流程进行详细阐述。Please refer to FIG. 2 , which is a flowchart of a method for constructing a power consumption detection model provided by an embodiment of the present application. The specific process shown in FIG. 2 will be described in detail below.

步骤201,将目标功能模块在第一指定数量的应用场景中进行仿真,以得到所述第一指定数量的应用场景中的各个应用场景下的数据信号的第一翻转数据。Step 201: Simulate the target function module in a first specified number of application scenarios to obtain first inversion data of data signals in each application scenario in the first specified number of application scenarios.

上述目标功能模块为一芯片设计中的一个功能模块。上述目标功能模块也可以为一块子系统,或一个芯片。The above-mentioned target function module is a function module in a chip design. The above-mentioned target function module can also be a subsystem or a chip.

可选地,根据目标功能模块的功能的不同,而上述的指定数量的应用场景也可以不同。例如,目标功能模块可以是安全协处理器模块,则指定数量的应用场景可以包括:选择随机数生成场景、对称加密算法加密运算场景、对称加密算法解密运算场景、非对称加密算法加密运算场景、非对称加密算法解密运算场景、哈希运算场景、数据压缩运算场景和数据解压运算场景。Optionally, according to different functions of the target functional module, the above specified number of application scenarios may also be different. For example, the target function module may be a security coprocessor module, and the specified number of application scenarios may include: selecting a random number generation scenario, a symmetric encryption algorithm encryption operation scenario, a symmetric encryption algorithm decryption operation scenario, an asymmetric encryption algorithm encryption operation scenario, Asymmetric encryption algorithm decryption operation scenarios, hash operation scenarios, data compression operation scenarios and data decompression operation scenarios.

示例性地,该目标功能模块对应的应用场景可以分别为S1,S2,...,SN,在应用场景Si中,可以将应用场景Si分为M个子场景Si,j(j=1,2,…,M),其中子场景Si,j中目标功能模块的工作负荷随j按升序排列。Exemplarily, the application scenarios corresponding to the target function modules can be respectively S 1 , S 2 , ..., S N , and in the application scenario S i , the application scenario S i can be divided into M sub-scenes S i,j (j=1,2,...,M), where the workload of the target function module in the sub-scene S i,j is arranged in ascending order with j.

本实施例中,分别对目标功能模块的N*M个子场景Si,j(i=1,2,..,N;j=1,2,…,M)进行功耗仿真,统计得到仿真有效时长为Ti,j(i=1,2,..,N;j=1,2,…,M)。In this embodiment, the power consumption simulation is performed on the N*M sub-scenes S i,j (i=1,2,...,N; j=1,2,...,M) of the target function module respectively, and the simulation is obtained by statistics The valid duration is T i,j (i=1,2,...,N; j=1,2,...,M).

示例性地,上述的第一翻转数据可以包括:目标功能模块在第i个应用场景中的第j个子场景数据信号的信号总翻转量Fi,j(i=1,2,..,N;j=1,2,…,M),以及目标功能模块在第i个应用场景中的第j个子场景中的第k个数据信号的翻转量fi,j,k(i=1,2,..,N;j=1,2,…,M;k=1,2,…,K),其中K表示目标功能模块中数据信号的数量。其中,N、M、K均为大于零的正整数。以上述目标功能模块可以是安全协处理器模块为例,N的取值则可以是8。Exemplarily, the above-mentioned first inversion data may include: the total signal inversion amount F i,j (i=1,2,...,N ; j=1,2,...,M), and the inversion amount f i,j,k (i=1,2 ,...,N; j=1,2,...,M; k=1,2,...,K), where K represents the number of data signals in the target functional module. Wherein, N, M, and K are all positive integers greater than zero. Taking the aforementioned target function module as an example, the value of N may be 8.

本实施例中,根据目标功能模块的功能不同,对应的目标功能模块中观测信号的数量也可以不同。In this embodiment, according to the different functions of the target functional modules, the number of observed signals in the corresponding target functional modules may also be different.

步骤202,根据所述第一翻转数据对数据信号进行筛查,以确定目标观测信号组。In step 202, the data signals are screened according to the first flip data, so as to determine a target observation signal group.

该目标观测信号组中包括多个目标观测信号。The target observation signal group includes a plurality of target observation signals.

由于集成电路设计越来越复杂,功能越来越多,单个功能模块中的逻辑门数目可以达到百万甚至千万门级,因此,需要从众多的数据信号中选择合适的观测信号用于评估模块的总数据翻转数。可选地,则可以通过两轮筛选,逐步筛选出所需的目标观测信号组。As the design of integrated circuits becomes more and more complex and has more and more functions, the number of logic gates in a single functional module can reach millions or even tens of millions of gates. Therefore, it is necessary to select a suitable observation signal from a large number of data signals for evaluation The total number of data rollovers for the block. Optionally, the desired target observation signal group can be gradually screened out through two rounds of screening.

示例性地,步骤202可以包括以下步骤。Exemplarily, step 202 may include the following steps.

步骤2021,根据预设数值区间在所述第一指定数量的应用场景中所使用的数据信号进行初级筛选,以得到初始观测信号组。Step 2021 , perform primary screening on the data signals used in the first specified number of application scenarios according to the preset value range, so as to obtain an initial observation signal group.

该初始观测信号组中包括多个初始观测信号。The initial observation signal group includes a plurality of initial observation signals.

示例性地,指定数量的应用场景的数量以N个应用场景为例。上述步骤2021可以包括步骤a和步骤b。Exemplarily, the number of the specified number of application scenarios takes N application scenarios as an example. The above step 2021 may include step a and step b.

步骤a,在每个所述子场景中筛选出翻转量在所述预设数值区间中的观测信号,得到每个子场景对应的观测信号组。In step a, in each of the sub-scenes, the observation signals whose inversion amount is in the preset value range are screened out to obtain an observation signal group corresponding to each sub-scene.

在一种实施方式中,上述预设数值区间通过以下步骤确定:计算每个所述子场景中的每个数据信号的单位时间翻转量;确定出各个子场景中的各个数据信号的单位时间翻转量中的非零翻转量中间数;根据所述非零翻转量中间数确定出所述预设数值区间。In one embodiment, the preset value range is determined by the following steps: calculating the inversion amount per unit time of each data signal in each sub-scene; determining the inversion per unit time of each data signal in each sub-scene The non-zero intermediate number of inversion amount in the amount; the preset value interval is determined according to the non-zero inversion amount intermediate number.

示例性地,子场景中的每个数据信号的单位时间翻转量可以表示为:Exemplarily, the turnover per unit time of each data signal in the sub-scene can be expressed as:

tfi,j,k=fi,j,k/Ti,jtf i,j,k =f i,j,k /T i,j ;

其中,fi,j,k表示在第i个应用场景中的第j个子场景中的第k个数据信号的翻转量,Ti,j表示在第i个应用场景中的第j个子场景的仿真有效时长,tfi,j,k表示在第i个应用场景中的第j个子场景中的第k个数据信号的单位时间翻转量。Among them, f i,j,k represents the inversion amount of the kth data signal in the jth sub-scene in the i-th application scene, T i,j represents the flipping amount of the j-th sub-scene in the i-th application scene The effective duration of the simulation, tf i,j,k represent the flipping amount per unit time of the k-th data signal in the j-th sub-scene in the i-th application scenario.

可选地,上述的非零翻转量中间数可以是第i个应用场景中的第j个子场景中的K个数据信号的非零翻转量的众数。Optionally, the above-mentioned intermediate number of non-zero inversion amounts may be a mode number of non-zero inversion amounts of the K data signals in the j-th sub-scene in the i-th application scenario.

可选地,上述的非零翻转量中间数可以是第i个应用场景中的第j个子场景中的K个数据信号的非零翻转量的平均值。Optionally, the above-mentioned intermediate number of non-zero inversion amounts may be an average value of non-zero inversion amounts of K data signals in the j-th sub-scene in the i-th application scenario.

可选地,上述的非零翻转量中间数可以是第i个应用场景中的第j个子场景中的K个数据信号的非零翻转量的中位数。例如,该中位数可以表示为:将K个数据信号的单位时间翻转量中的非零翻转量从小到大排序,中位数表示排序在中间位置的数值。Optionally, the above-mentioned intermediate number of non-zero inversion amounts may be a median of non-zero inversion amounts of K data signals in the j-th sub-scene in the i-th application scenario. For example, the median may be expressed as: sort the non-zero inversion amounts per unit time of the K data signals from small to large, and the median represents the value sorted in the middle position.

示例性地,根据非零翻转量中间数确定出预设数值区间可以是:以非零翻转量中间数与波动值的差值作为预设数值区间的小端点,以非零翻转量中间数与波动值的和作为预设数值区间的大端点。Exemplarily, the determination of the preset value interval according to the non-zero inversion amount intermediate number may be: taking the difference between the non-zero inversion amount intermediate number and the fluctuation value as the small endpoint of the preset value interval, and using the non-zero inversion amount intermediate number and The sum of the fluctuation values is used as the maximum endpoint of the preset value range.

在上述实例中,预设数值区间可以表示为:[Mtfi,j-dt,Mtfi,j+dt];In the above example, the preset value range can be expressed as: [Mtf i,j -dt,Mtf i,j +dt];

其中,Mtfi,j表示第i个应用场景中的第j个子场景中的K个数据信号的非零翻转量中间数,dt表示波动值。Wherein, Mtf i,j represents the middle number of non-zero inversion amounts of K data signals in the j-th sub-scene in the i-th application scenario, and dt represents the fluctuation value.

可选地,在确定预设数值区间时所使用的波动值可以按照需求设置。示例性地,该波动值可以取值2、3等值。Optionally, the fluctuation value used when determining the preset value range can be set according to requirements. Exemplarily, the fluctuation value may take values such as 2, 3 and so on.

重复执行步骤a,则可以筛选出应用场景Si的所有子场景Si,j的观测信号组Qi,jBy repeating step a, the observation signal groups Q i ,j of all sub-scenes S i,j of the application scene S i can be filtered out.

步骤b,针对每个应用场景,将应用场景中的各个所述子场景对应的观测信号组取交集得到所述应用场景对应的观测信号组,以得到所述N个应用场景对应的N个观测信号组。Step b, for each application scenario, taking the intersection of the observation signal groups corresponding to each of the sub-scenes in the application scenario to obtain the observation signal groups corresponding to the application scenario, so as to obtain the N observation signal groups corresponding to the N application scenarios signal group.

上述的N个观测信号组作为所述初始观测信号组。The aforementioned N observation signal groups are used as the initial observation signal group.

示例性地,在第i个应用场景中,将M个观测信号组Qi,j取交集,则可以得到一观测信号组PQi。就N个应用场景而言,则可以得到N个应用场景下的N个观测信号组。Exemplarily, in the i-th application scenario, M observation signal groups Q i,j are intersected to obtain an observation signal group PQ i . As far as N application scenarios are concerned, N observation signal groups under N application scenarios can be obtained.

步骤2022,根据所述初始观测信号组确定出各个初始观测信号的信号误差。Step 2022: Determine the signal error of each initial observation signal according to the initial observation signal group.

可选地,针对应用场景Si的初始观测信号组PQi中的初始观测信号Xk,可以以子场景Si,j下初始观测信号Xk的单位时间翻转量tfi,j,k为自变量,以每个子场景Si,j下目标功能模块内总数据翻转数tFi,j为因变量,采用线性回归模型和最小二乘法计算出初始观测信号的信号误差。Optionally, for the initial observation signal X k in the initial observation signal group PQ i of the application scenario S i , the unit time flip tf i,j,k of the initial observation signal X k under the sub-scene S i ,j can be expressed as As the independent variable, the total data flipping number tF i, j in the target function module under each sub-scene S i ,j is used as the dependent variable, and the signal error of the initial observation signal is calculated by using the linear regression model and the least square method.

示例性地,各个初始观测信号的信号误差通过以下公式确定:Exemplarily, the signal error of each initial observation signal is determined by the following formula:

Figure BDA0002844059340000121
Figure BDA0002844059340000121

tFi,j=Fi,j/Ti,jtF i,j =F i,j /T i,j ;

Figure BDA0002844059340000122
Figure BDA0002844059340000122

Figure BDA0002844059340000123
Figure BDA0002844059340000123

其中,M表示第i个应用场景中所包含的子场景的数量,Wi,k表示第i个应用场景中的第k个初始观测信号的信号误差,tFi,j表示第i个应用场景中的第j个子场景中单位时间内的信号总翻转量,

Figure BDA0002844059340000124
表示第i个应用场景中的单位时间内的信号总翻转量均值,tfi,j,k表示第i个应用场景中的第j个子场景中的第k个初始观测信号的单位时间内的翻转量,
Figure BDA0002844059340000125
表示第i个应用场景中的第k个初始观测信号的翻转量均值,Fi,j表示在第i个应用场景中的第j个子场景的信号总翻转量。Among them, M represents the number of sub-scenes contained in the i-th application scene, W i,k represents the signal error of the k-th initial observation signal in the i-th application scene, and tF i,j represents the i-th application scene The total signal turnover per unit time in the jth sub-scene in ,
Figure BDA0002844059340000124
Represents the mean value of the total signal turnover per unit time in the i-th application scenario, tf i,j,k represents the reversal per unit time of the k-th initial observation signal in the j-th sub-scene in the i-th application scenario quantity,
Figure BDA0002844059340000125
Indicates the mean value of the inversion amount of the k-th initial observation signal in the i-th application scenario, and F i,j indicates the total inversion amount of the signal in the j-th sub-scene in the i-th application scenario.

基于上述公式可以计算得到应用场景Si的初始观测信号组PQi中的初始观测信号Xk的信号误差Wi,kThe signal error W i,k of the initial observation signal X k in the initial observation signal group PQ i of the application scenario S i can be calculated based on the above formula.

步骤2023,根据所述各个初始观测信号的信号误差从所述初始观测信号组中确定出所述目标观测信号组。Step 2023: Determine the target observation signal group from the initial observation signal group according to the signal error of each initial observation signal.

在第一种实施方式中,在所述N个应用场景中的第一目标应用场景中,选出第一指定数量的信号误差最小的观测信号,得到筛查观测信号组,将N个应用场景对应的N个筛查观测信号组取并集得到所述目标观测信号组。其中,第一目标应用场景为所述N个应用场景中的任意一个应用场景。In the first embodiment, in the first target application scenario among the N application scenarios, a first specified number of observation signals with the smallest signal error is selected to obtain a screening observation signal group, and the N application scenarios The corresponding N screening observation signal groups are combined to obtain the target observation signal group. Wherein, the first target application scenario is any one of the N application scenarios.

示例性地,可以从各个初始观测信号组中选出误差最小的W个观测信号。示例性地,在每个应用场景对应的观测信号组PQi中选出W个观测信号,以构成目标观测信号组。其中,W为上述的第一指定数量。Exemplarily, W observation signals with the smallest error may be selected from each initial observation signal group. Exemplarily, W observation signals are selected from the observation signal group PQ i corresponding to each application scenario to form a target observation signal group. Wherein, W is the above-mentioned first specified quantity.

在第二种实施方式中,在所述N个应用场景中的第二目标应用场景中,选出第二指定数量的信号误差最小的筛查观测信号组,将N个筛查观测信号组作为目标观测信号组。其中,第二目标应用场景为所述N个应用场景中的任意一个应用场景。In the second embodiment, in the second target application scenario among the N application scenarios, a second specified number of screening observation signal groups with the smallest signal error is selected, and the N screening observation signal groups are used as Target observation signal group. Wherein, the second target application scenario is any one of the N application scenarios.

示例性地,可以从各个初始观测信号组中选出误差最小的W个观测信号。示例性地,在每个应用场景对应的观测信号组PQi中选出W个观测信号,以构成目标观测信号组。其中,W为上述的第二指定数量。Exemplarily, W observation signals with the smallest error may be selected from each initial observation signal group. Exemplarily, W observation signals are selected from the observation signal group PQ i corresponding to each application scenario to form a target observation signal group. Wherein, W is the second specified quantity mentioned above.

可选地,W的取值可以根据仿真过程所使用到的数据信号确定。示例性地,仿真所使用的数据信号越多,对应选取的观测信号也可以越多。当然,W的取值也可以不受仿真所使用的数据信号限制。例如,W取值可以是2、3、4等值。Optionally, the value of W may be determined according to the data signal used in the simulation process. Exemplarily, the more data signals used in the simulation, the more correspondingly selected observation signals may also be. Of course, the value of W may not be limited by the data signal used in the simulation. For example, the value of W may be 2, 3, 4 and so on.

本实施例中,若N个筛查观测信号组中的观测信号均不相同时,则上述的第一种实施方式和第二种实施方式得到的目标观测信号组的观测信号的数量相同。In this embodiment, if the observation signals in the N screening observation signal groups are all different, the number of observation signals in the target observation signal group obtained in the above-mentioned first implementation manner and the second implementation manner is the same.

步骤203,从所述第一翻转数据中,确定出所述目标观测信号组中的各个目标观测信号在所述第一指定数量的应用场景中的各个应用场景下的第二翻转数据。Step 203, from the first inversion data, determine second inversion data of each target observation signal in the target observation signal group in each application scenario in the first specified number of application scenarios.

可选地,该目标观测信号组属于步骤201所进行的仿真所使用到的数字信号中的部分信号。因此,关于目标观测信号组对应的第二翻转数据也属于第一翻转数据的一部分。因此,可以从第一翻转数据中选出目标观测信号组在所述指定数量的应用场景中的各个应用场景下的第二翻转数据。Optionally, the target observation signal group is part of the digital signals used in the simulation performed in step 201 . Therefore, the second inversion data corresponding to the target observation signal group also belongs to a part of the first inversion data. Therefore, the second inversion data in each application scenario of the specified number of application scenarios of the target observation signal group may be selected from the first inversion data.

本实施例中,目标观测信号组的第二翻转数据可以包括第一类翻转数据和第二类翻转数据。In this embodiment, the second inversion data of the target observation signal group may include inversion data of the first type and inversion data of the second type.

示例性地,该第一类翻转数据表示目标观测信号组的各个目标观测信号在所述指定数量的应用场景中的各个子场景下的翻转量。可选地,该第一类翻转数据包括目标观测信号组中的每一个观测信号在每一个子场景下的单位时间内的翻转量。Exemplarily, the first type of inversion data represents the inversion amount of each target observation signal of the target observation signal group in each sub-scene in the specified number of application scenarios. Optionally, the first type of inversion data includes an inversion amount per unit time of each observation signal in the target observation signal group in each sub-scene.

示例性地,第二类翻转数据表示所述目标观测信号组在所述指定数量的应用场景中的每个应用场景下的总翻转量。可选地,该第二类翻转数据也可以包括目标观测信号组中的所有观测信号在每一个子场景下的单位时间内的总翻转量。Exemplarily, the second type of inversion data represents a total inversion amount of the target observation signal group in each application scenario in the specified number of application scenarios. Optionally, the second type of inversion data may also include the total inversion amount per unit time of all observation signals in the target observation signal group in each sub-scene.

步骤204,根据所述第二翻转数据计算得到校正参数以及所述目标观测信号组的各个目标观测信号对应的信号权重。Step 204, calculating correction parameters and signal weights corresponding to each target observation signal of the target observation signal group according to the second flip data.

在一种实施方式中,可以先根据所述第二翻转数据中的D组第一类翻转数据构建第一矩阵。In an implementation manner, the first matrix may first be constructed according to D sets of first-type inversion data in the second inversion data.

其中,D表示所述指定数量的应用场景中的子场景的数量。Wherein, D represents the number of sub-scenes in the specified number of application scenarios.

示例性地,该第一类翻转数据构建的第一矩阵可以表示为:Exemplarily, the first matrix constructed by the first type of flipped data can be expressed as:

Figure BDA0002844059340000141
Figure BDA0002844059340000141

其中,D表示仿真所使用的子场景数量,R表示目标观测信号组中的观测信号的数量,A表示第一矩阵,stfD,R表示第R个观测信号在第D个子场景下的单位时间翻转量,stfi,j表示第j个观测信号在第i个子场景下的单位时间翻转量。Among them, D represents the number of sub-scenes used in the simulation, R represents the number of observation signals in the target observation signal group, A represents the first matrix, stf D, R represents the unit time of the R-th observation signal in the D-th sub-scene Inversion amount, stf i,j represents the unit time inversion amount of the jth observed signal in the i-th sub-scene.

本实施例中,可以根据所述第二翻转数据中的D组第二类翻转数据构建第二矩阵。In this embodiment, the second matrix may be constructed according to D sets of second-type inversion data in the second inversion data.

示例性地,该第二类翻转数据构建第二矩阵可以表示为:Exemplarily, the construction of the second matrix of the second type of flipped data can be expressed as:

Figure BDA0002844059340000151
Figure BDA0002844059340000151

其中,B表示第二矩阵,stFi表示在目标观测信号组在第i个子场景下的单位时间内的总翻转量。Wherein, B represents the second matrix, and stF i represents the total turnover per unit time of the target observation signal group in the ith sub-scene.

本实施例中,根据第一矩阵和第二矩阵可以计算得到所述目标观测信号组对应的信号权重及校正参数。In this embodiment, the signal weights and correction parameters corresponding to the target observation signal group can be calculated according to the first matrix and the second matrix.

示例性地,关于第一矩阵和第二矩阵与信号权重及校正参数关系可以通过以下公式表示:Exemplarily, the relationship between the first matrix and the second matrix, the signal weight and the correction parameter can be expressed by the following formula:

Figure BDA0002844059340000152
Figure BDA0002844059340000152

P=(ATA)-1ATB;P = (A T A) -1 A T B;

其中,P表示信号权重及校正参数矩阵,ri表示第i个目标观测信号对应的信号权重,C表示校正参数。Among them, P represents the signal weight and correction parameter matrix, ri represents the signal weight corresponding to the i-th target observation signal, and C represents the correction parameter.

在另一种实施方式中,可以使用梯度下降法最小化残差函数的方式计算目标观测信号组对应的信号权重及校正参数。In another implementation manner, the signal weights and correction parameters corresponding to the target observation signal group may be calculated by using the gradient descent method to minimize the residual function.

Figure BDA0002844059340000153
Figure BDA0002844059340000153

Figure BDA0002844059340000161
Figure BDA0002844059340000161

Pn=(1+s×ΔJ)×PoP n =(1+s×ΔJ)×P o ;

其中,Pn表示当前更新后的观测组参数,Po表示更新前的观测组参数,s表示递进步长,etFi表示根据当前的功耗检测模型计算得到的第i个场景下的翻转量。上述的当前更新后的观测组参数和更新前的观测组参数中的观测组参数中包括对应状态下的目标观测信号组对应的信号权重及校正参数。Among them, P n represents the current updated observation group parameters, P o represents the observation group parameters before update, s represents the progressive step, etF i represents the turnover amount in the i-th scene calculated according to the current power consumption detection model . The above observation group parameters in the currently updated observation group parameters and the observation group parameters before update include signal weights and correction parameters corresponding to target observation signal groups in corresponding states.

步骤205,以所述目标观测信号组中的各个目标观测信号的翻转量为自变量,根据所述校正参数及所述信号权重确定出功耗检测模型。In step 205, a power consumption detection model is determined according to the calibration parameters and the signal weights by using the inversion amount of each target observation signal in the target observation signal group as an independent variable.

示例性地,上述的功耗检测模型用于对芯片的功耗进行计算。Exemplarily, the above power consumption detection model is used to calculate the power consumption of the chip.

示例性地,可以采用多元一阶模型构建功耗检测模型。Exemplarily, a multivariate first-order model may be used to construct a power consumption detection model.

可选地,可以先以所述目标观测信号组中的各个目标观测信号的翻转量为自变量,根据所述校正参数及所述信号权重构建出总翻转量的计算公式。Optionally, a calculation formula for the total inversion amount may be constructed based on the correction parameters and the signal weights by using the inversion amount of each target observation signal in the target observation signal group as an independent variable.

示例性地,总翻转量的计算公式可以表示为:Exemplarily, the calculation formula of the total turnover amount can be expressed as:

Figure BDA0002844059340000162
Figure BDA0002844059340000162

其中,tF表示根据该总翻转量的计算公式计算得到的待检测芯片的总翻转量,tfi表示第i个目标观测信号在待检测芯片下的单位时间内的翻转量。Among them, tF represents the total flip amount of the chip to be detected calculated according to the calculation formula of the total flip amount, and tf i represents the flip amount of the i-th target observation signal per unit time under the chip to be detected.

本实施例中,根据上述的总翻转量的计算公式可以构建出功耗检测模型。In this embodiment, a power consumption detection model can be constructed according to the above calculation formula of the total turnover amount.

示例性地,该功耗检测模型可以表示为:Exemplarily, the power consumption detection model can be expressed as:

Figure BDA0002844059340000163
Figure BDA0002844059340000163

其中,d表示工艺系数。Among them, d represents the process coefficient.

示例性地,关于工艺系数d具体取值可以按照工艺的单元库进行设定,本申请实施例并不以工艺系数d的取值为限。Exemplarily, the specific value of the process coefficient d can be set according to the cell library of the process, and the embodiment of the present application is not limited to the value of the process coefficient d.

示例性地,还可以使用其它线性模型,或非线性模型构建功耗检测模型。Exemplarily, other linear models or nonlinear models may also be used to construct the power consumption detection model.

基于上述的功耗检测模型可以对需要进行功耗检测芯片进行检测。进一步地,为了提高功耗检测模型的检测准确性,还可以对构建的功耗检测模型进行验证。Based on the above-mentioned power consumption detection model, the chip that needs power consumption detection can be detected. Further, in order to improve the detection accuracy of the power consumption detection model, the constructed power consumption detection model may also be verified.

可选地,如图3所示,本申请实施例中的功耗检测模型构建方法还可以包括:Optionally, as shown in Figure 3, the method for building a power consumption detection model in the embodiment of the present application may further include:

步骤206,根据所述各个目标观测信号的所述第二翻转数据计算所述功耗检测模型的模型误差。Step 206, calculating a model error of the power consumption detection model according to the second flip data of each target observation signal.

示例性地,通过以下公式计算所述功耗检测模型的模型误差:Exemplarily, the model error of the power consumption detection model is calculated by the following formula:

Figure BDA0002844059340000171
Figure BDA0002844059340000171

其中,e表示功耗检测模型的模型误差,D表示仿真所涉及的应用场景的数量,stFi表示第i个场景下的目标观测信号组的总翻转量,etFi表示根据所述功耗检测模型计算得到的第i个场景下的翻转量。Among them, e represents the model error of the power consumption detection model, D represents the number of application scenarios involved in the simulation, stF i represents the total turnover of the target observation signal group in the ith scene, etF i represents The flip amount in the i-th scene calculated by the model.

步骤207,判断所述模型误差是否大于预设误差值。Step 207, judging whether the model error is greater than a preset error value.

若所述模型误差大于预设误差值,则返回步骤202重新选择最新的所述目标观测信号组,再次执行步骤202-步骤205以更新所述构建功耗检测模型。If the model error is greater than the preset error value, return to step 202 to reselect the latest target observation signal group, and perform steps 202-205 again to update the constructed power consumption detection model.

可选地,在重新执行步骤202,对重新选择最新的目标观测信号组时,可以调整每次在子场景中选出的观测信号的数量。Optionally, when step 202 is re-executed and the latest target observation signal group is reselected, the number of observation signals selected in each sub-scene may be adjusted.

若所述模型误差不大于预设误差值,则将当前的功耗检测模型输出,用于对芯片的功耗进行检测。If the model error is not greater than the preset error value, the current power consumption detection model is output to detect the power consumption of the chip.

可选地,上述的预设误差值的取值可以按照需求设置。例如,该预设误差值可以是5%、7%、4%等值。Optionally, the value of the above-mentioned preset error value can be set according to requirements. For example, the preset error value may be 5%, 7%, 4% and so on.

通过本申请实施例中的功耗检测模型构建方法,能够已经确定出的观测信号对芯片的功耗进行检测,相对于现有的观测信号的选取并没有统一的标准,一般是通过设计人员根据个人经验来选取观测信号(例如CPU的cache miss等信号),观测信号的有效性严重依赖于设计人员对芯片设计的理解和个人能力而言,与之相对,本申请实施例提供的观测信号的选取方式更加客观,从而使选出的观测信号也更加可靠。Through the power consumption detection model construction method in the embodiment of the present application, the power consumption of the chip can be detected by the determined observation signal. Compared with the existing observation signal selection, there is no uniform standard. Personal experience is used to select observation signals (such as CPU cache miss and other signals). The effectiveness of observation signals depends heavily on the designer's understanding of chip design and personal ability. In contrast, the observation signal provided by the embodiments of the present application The selection method is more objective, so that the selected observation signal is also more reliable.

进一步地,本申请实施例提供的方法解决了其中估算数据信号翻转量的问题。使用本申请实施例提供的方法可以将动态功耗的估算流程化和标准化,可在提高芯片功耗的估算结果的准确性。进一步地,通过本申请实施例提供的方法对芯片的功耗进行估算可以不需要了解芯片设计的内设计细节,也可以快速的给出准确的功耗估算模型。Further, the method provided by the embodiment of the present application solves the problem of estimating the inversion amount of the data signal. Using the method provided by the embodiment of the present application can streamline and standardize the estimation of dynamic power consumption, and can improve the accuracy of the estimation result of chip power consumption. Furthermore, the method provided by the embodiment of the present application can be used to estimate the power consumption of the chip without knowing the internal design details of the chip design, and can quickly provide an accurate power consumption estimation model.

实施例三Embodiment three

基于同一申请构思,本申请实施例中还提供了与功耗检测模型构建方法对应的功耗检测模型构建装置,由于本申请实施例中的装置解决问题的原理与前述的功耗检测模型构建方法实施例相似,因此本实施例中的装置的实施可以参见上述方法的实施例中的描述,重复之处不再赘述。Based on the same application concept, the embodiment of the present application also provides a power consumption detection model construction device corresponding to the power consumption detection model construction method, because the problem-solving principle of the device in the embodiment of the present application is consistent with the aforementioned power consumption detection model construction method The embodiments are similar, so the implementation of the device in this embodiment can refer to the description in the embodiment of the above method, and the repetition will not be repeated.

请参阅图4,是本申请实施例提供的功耗检测模型构建装置的功能模块示意图。本实施例中的功耗检测模型构建装置中的各个模块用于执行上述方法实施例中的各个步骤。功耗检测模型构建装置包括:仿真模块301、筛查模块302、第一确定模块303、第一计算模块304以及第二确定模块305;其中,Please refer to FIG. 4 , which is a schematic diagram of functional modules of an apparatus for constructing a power consumption detection model provided in an embodiment of the present application. Each module in the device for constructing a power consumption detection model in this embodiment is used to execute each step in the above method embodiment. The device for constructing a power consumption detection model includes: a simulation module 301, a screening module 302, a first determination module 303, a first calculation module 304, and a second determination module 305; wherein,

仿真模块301,用于将目标功能模块在第一指定数量的应用场景中进行仿真,以得到所述第一指定数量的应用场景中的各个应用场景下的数据信号的第一翻转数据,所述目标功能模块为一芯片设计中的一个功能模块;The simulation module 301 is configured to simulate the target function module in a first specified number of application scenarios, so as to obtain the first flip data of the data signal in each application scenario in the first specified number of application scenarios, the The target functional module is a functional module in a chip design;

筛查模块302,用于根据所述第一翻转数据对数据信号进行筛查,以确定目标观测信号组,所述目标观测信号包括多个目标观测信号;A screening module 302, configured to screen data signals according to the first flip data to determine a target observation signal group, where the target observation signals include a plurality of target observation signals;

第一确定模块303,用于从所述第一翻转数据中,确定出所述目标观测信号组中的各个目标观测信号在所述第一指定数量的应用场景中的各个应用场景下的第二翻转数据;The first determination module 303 is configured to determine, from the first flip data, the second value of each target observation signal in the target observation signal group under each application scenario in the first specified number of application scenarios. flip data;

第一计算模块304,用于根据所述第二翻转数据计算得到校正参数以及所述目标观测信号组的各个目标观测信号对应的信号权重;The first calculation module 304 is configured to calculate correction parameters and signal weights corresponding to each target observation signal of the target observation signal group according to the second flip data;

第二确定模块305,用于以所述目标观测信号组中的各个目标观测信号的翻转量为自变量,根据所述校正参数及所述信号权重确定出功耗检测模型,所述功耗检测模型用于对芯片的功耗进行计算。The second determination module 305 is configured to use the inversion amount of each target observation signal in the target observation signal group as an independent variable, and determine a power consumption detection model according to the correction parameter and the signal weight, and the power consumption detection The model is used to calculate the power consumption of the chip.

一种可能的实施方式中,筛查模块302,包括:初始筛选单元、误差确定单元以及信号确定单元。In a possible implementation manner, the screening module 302 includes: an initial screening unit, an error determination unit, and a signal determination unit.

初始筛选单元,用于根据预设数值区间在所述第一指定数量的应用场景中所使用的数据信号进行初级筛选,以得到初始观测信号组;An initial screening unit, configured to perform primary screening on the data signals used in the first specified number of application scenarios according to a preset value interval, so as to obtain an initial observation signal group;

误差确定单元,用于根据所述初始观测信号组确定出各个初始观测信号的信号误差;an error determination unit, configured to determine the signal error of each initial observation signal according to the initial observation signal group;

信号确定单元,用于根据所述各个初始观测信号的信号误差从所述初始观测信号组中确定出所述目标观测信号组。A signal determining unit, configured to determine the target observation signal group from the initial observation signal group according to signal errors of the respective initial observation signals.

一种可能的实施方式中,所述指定数量的应用场景中包括N个应用场景,所述N个应用场景中包括M个子场景;信号确定单元,用于:In a possible implementation manner, the specified number of application scenarios includes N application scenarios, and the N application scenarios include M sub-scenes; the signal determination unit is configured to:

在每个所述子场景中筛选出翻转量在所述预设数值区间中的观测信号,得到每个子场景对应的观测信号组;In each of the sub-scenes, the observation signals whose flipping amount is in the preset value range are screened out to obtain the observation signal group corresponding to each sub-scene;

针对每个应用场景,将应用场景中的各个所述子场景对应的观测信号组取交集得到所述应用场景对应的观测信号组,以得到所述N个应用场景对应的N个观测信号组,所述N个观测信号组为所述初始观测信号组,其中,M和N为大于一的正整数。For each application scenario, taking the intersection of the observation signal groups corresponding to each of the sub-scenes in the application scenario to obtain the observation signal groups corresponding to the application scenarios, so as to obtain the N observation signal groups corresponding to the N application scenarios, The N observation signal groups are the initial observation signal groups, where M and N are positive integers greater than one.

一种可能的实施方式中,本实施例中的功耗检测模型构建装置还包括:数值第二确定模块305,用于:In a possible implementation manner, the device for constructing a power consumption detection model in this embodiment further includes: a second value determination module 305, configured to:

计算每个所述子场景中的每个数据信号的单位时间翻转量;calculating the flipping amount per unit time of each data signal in each of the sub-scenes;

确定出各个子场景中的各个数据信号的单位时间翻转量中的非零翻转量中间数;Determining the non-zero intermediate number of inversion amount per unit time of each data signal in each sub-scene;

根据所述非零翻转量中间数确定出所述预设数值区间。The preset value interval is determined according to the non-zero intermediate number of the flip amount.

一种可能的实施方式中,信号确定单元,用于:In a possible implementation manner, the signal determination unit is configured to:

在所述N个应用场景中的目标应用场景中,选出第二指定数量的信号误差最小的观测信号,得到筛查观测信号组,所述目标应用场景为所述N个应用场景中的任意一个应用场景;In the target application scenario among the N application scenarios, select a second specified number of observation signals with the smallest signal error to obtain a screening observation signal group, and the target application scenario is any of the N application scenarios. an application scenario;

将N个应用场景对应的N个筛查观测信号组取并集得到所述目标观测信号组。The target observation signal group is obtained by unioning the N screening observation signal groups corresponding to the N application scenarios.

一种可能的实施方式中,所述各个初始观测信号的信号误差通过以下公式确定:In a possible implementation manner, the signal error of each initial observation signal is determined by the following formula:

Figure BDA0002844059340000201
Figure BDA0002844059340000201

Figure BDA0002844059340000202
Figure BDA0002844059340000202

Figure BDA0002844059340000203
Figure BDA0002844059340000203

其中,M表示第i个应用场景中所包含的子场景的数量,Wi,k表示第i个应用场景中的第k个初始观测信号的信号误差,tFi,j表示第i个应用场景中的第j个子场景中单位时间内的信号总翻转量,

Figure BDA0002844059340000204
表示第i个应用场景中的单位时间内的信号总翻转量均值,tfi,j,k表示第i个应用场景中的第j个子场景中的第k个初始观测信号的单位时间内的翻转量,
Figure BDA0002844059340000205
表示第i个应用场景中的第k个初始观测信号的翻转量均值。Among them, M represents the number of sub-scenes contained in the i-th application scene, W i,k represents the signal error of the k-th initial observation signal in the i-th application scene, and tF i,j represents the i-th application scene The total signal turnover per unit time in the jth sub-scene in ,
Figure BDA0002844059340000204
Represents the mean value of the total signal turnover per unit time in the i-th application scenario, tf i,j,k represents the reversal per unit time of the k-th initial observation signal in the j-th sub-scene in the i-th application scenario quantity,
Figure BDA0002844059340000205
Indicates the mean value of the flipping amount of the kth initial observation signal in the i-th application scenario.

一种可能的实施方式中,第一计算模块304,用于:In a possible implementation manner, the first computing module 304 is configured to:

根据所述第二翻转数据中的D组第一类翻转数据构建第一矩阵,所述D表示所述指定数量的应用场景中的子场景的数量,所述第一类翻转数据表示目标观测信号组的各个目标观测信号在所述指定数量的应用场景中的各个子场景下的翻转量;Construct a first matrix according to D sets of first-type inversion data in the second inversion data, the D represents the number of sub-scenes in the specified number of application scenarios, and the first-type inversion data represents a target observation signal The turnover amount of each target observation signal of the group under each sub-scene in the specified number of application scenarios;

根据所述第二翻转数据中的D组第二类翻转数据构建第二矩阵,所述第二类翻转数据表示所述目标观测信号组在所述指定数量的应用场景中的每个应用场景下的总翻转量;Constructing a second matrix according to D sets of second-type inversion data in the second inversion data, the second-type inversion data indicating that the target observation signal group is in each application scenario in the specified number of application scenarios The total amount of turnover;

根据所述第一矩阵和所述第二矩阵计算得到所述目标观测信号组对应的信号权重及校正参数。Signal weights and correction parameters corresponding to the target observation signal group are calculated according to the first matrix and the second matrix.

一种可能的实施方式中,本实施例中的功耗检测模型构建装置还包括:误差评估模块,用于:In a possible implementation manner, the device for constructing a power consumption detection model in this embodiment further includes: an error evaluation module, configured to:

根据所述各个目标观测信号的所述第二翻转数据计算所述功耗检测模型的模型误差;calculating a model error of the power consumption detection model according to the second flip data of each target observation signal;

判断所述模型误差是否大于预设误差值;judging whether the model error is greater than a preset error value;

若所述模型误差大于预设误差值,则重新选择最新的所述目标观测信号组,以更新所述构建功耗检测模型。If the model error is greater than a preset error value, reselect the latest target observation signal group to update the constructed power consumption detection model.

一种可能的实施方式中,通过以下公式计算所述功耗检测模型的模型误差:In a possible implementation manner, the model error of the power consumption detection model is calculated by the following formula:

Figure BDA0002844059340000211
Figure BDA0002844059340000211

其中,e表示功耗检测模型的模型误差,D表示仿真所涉及的应用场景的数量,stFi表示第i个场景下的目标观测信号组的总翻转量,etFi表示根据所述功耗检测模型计算得到的第i个场景下的翻转量。Among them, e represents the model error of the power consumption detection model, D represents the number of application scenarios involved in the simulation, stF i represents the total turnover of the target observation signal group in the ith scene, etF i represents The flip amount in the i-th scene calculated by the model.

实施例四Embodiment four

请参阅图5,是本申请实施例提供的功耗检测方法的流程图。下面将对图5所示的具体流程进行详细阐述。Please refer to FIG. 5 , which is a flowchart of a method for detecting power consumption provided by an embodiment of the present application. The specific process shown in FIG. 5 will be described in detail below.

步骤401,获取待检测芯片在目标观测信号组中的各个观测信号在单位时间内的翻转值。Step 401, acquiring the inversion value of each observation signal of the chip to be inspected in the target observation signal group within a unit time.

步骤402,基于功耗检测模型构建方法得到的功耗检测模型,根据所述各个观测信号在单位时间内的翻转值计算得到所述待检测芯片的功耗。Step 402: Based on the power consumption detection model obtained by the power consumption detection model construction method, the power consumption of the chip to be detected is calculated according to the inversion value of each observed signal within a unit time.

在本申请实施例提供的功耗检测方法中,通过使用功耗检测模型对芯片的功耗进行检查,可以提高芯片功耗检测效率。In the power consumption detection method provided in the embodiment of the present application, the detection efficiency of the chip power consumption can be improved by using a power consumption detection model to check the power consumption of the chip.

实施例五Embodiment five

基于同一申请构思,本申请实施例中还提供了与功耗检测方法对应的功耗检测装置,由于本申请实施例中的装置解决问题的原理与前述的功耗检测方法实施例相似,因此本实施例中的装置的实施可以参见上述方法的实施例中的描述,重复之处不再赘述。Based on the same application concept, the embodiment of the present application also provides a power consumption detection device corresponding to the power consumption detection method. For the implementation of the device in the embodiment, reference may be made to the description in the embodiment of the above method, and repeated descriptions will not be repeated.

请参阅图6,是本申请实施例提供的功耗检测装置的功能模块示意图。本实施例中的功耗检测装置中的各个模块用于执行上述方法实施例中的各个步骤。功耗检测装置包括:获取模块501和第二计算模块502;其中,Please refer to FIG. 6 , which is a schematic diagram of functional modules of a power consumption detection device provided in an embodiment of the present application. Each module in the power consumption detecting device in this embodiment is used to execute each step in the above method embodiment. The power consumption detection device includes: an acquisition module 501 and a second calculation module 502; wherein,

获取模块501,用于获取待检测芯片在目标观测信号组中的各个观测信号在单位时间内的翻转值;The obtaining module 501 is used to obtain the inversion value of each observation signal of the chip to be detected in the target observation signal group in unit time;

第二计算模块502,用于基于功耗检测模型构建方法得到的功耗检测模型,根据所述各个观测信号在单位时间内的翻转值计算得到所述待检测芯片的功耗。The second calculation module 502 is configured to calculate the power consumption of the chip to be tested based on the power consumption detection model obtained by the power consumption detection model construction method according to the inversion value of each observation signal within a unit time.

此外,本申请实施例还提供一种计算机可读存储介质,该计算机可读存储介质上存储有计算机程序,该计算机程序被处理器运行时执行上述方法实施例中所述的功耗检测模型构建方法和/或功耗检测方法的步骤。In addition, an embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is run by a processor, the power consumption detection model construction described in the above-mentioned method embodiments is executed. method and/or steps of a power consumption detection method.

本申请实施例所提供的功耗检测模型构建方法和功耗检测方法的计算机程序产品,包括存储了程序代码的计算机可读存储介质,所述程序代码包括的指令可用于执行上述方法实施例中所述的功耗检测模型构建方法或功耗检测方法的步骤,具体可参见上述方法实施例,在此不再赘述。The computer program product of the power consumption detection model building method and the power consumption detection method provided in the embodiments of the present application includes a computer-readable storage medium storing program codes, and the instructions included in the program codes can be used to execute the above method embodiments For the steps of the power consumption detection model building method or the power consumption detection method, please refer to the above method embodiments for details, and details are not repeated here.

在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,也可以通过其它的方式实现。以上所描述的装置实施例仅仅是示意性的,例如,附图中的流程图和框图显示了根据本申请的多个实施例的装置、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或代码的一部分,所述模块、程序段或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现方式中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。In the several embodiments provided in this application, it should be understood that the disclosed devices and methods may also be implemented in other ways. The device embodiments described above are only illustrative. For example, the flowcharts and block diagrams in the accompanying drawings show the architecture, functions and possible implementations of devices, methods and computer program products according to multiple embodiments of the present application. operate. In this regard, each block in a flowchart or block diagram may represent a module, program segment, or part of code that includes one or more Executable instructions. It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks in succession may, in fact, be executed substantially concurrently, or they may sometimes be executed in the reverse order, depending upon the functionality involved. It should also be noted that each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented by a dedicated hardware-based system that performs the specified function or action , or may be implemented by a combination of dedicated hardware and computer instructions.

另外,在本申请各个实施例中的各功能模块可以集成在一起形成一个独立的部分,也可以是各个模块单独存在,也可以两个或两个以上模块集成形成一个独立的部分。In addition, each functional module in each embodiment of the present application may be integrated to form an independent part, each module may exist independently, or two or more modules may be integrated to form an independent part.

所述功能如果以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially 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 Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disc, etc., which can store program codes. . It should be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is a relationship between these entities or operations. There is no such actual relationship or order between them. Furthermore, the term "comprises", "comprises" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article, or apparatus comprising a set of elements includes not only those elements, but also includes elements not expressly listed. other elements of or also include elements inherent in such a process, method, article, or device. Without further limitations, an element defined by the statement "comprising..." does not exclude the presence of additional same elements in the process, method, article or device comprising said element.

以上所述仅为本申请的优选实施例而已,并不用于限制本申请,对于本领域的技术人员来说,本申请可以有各种更改和变化。凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。应注意到:相似的标号和字母在下面的附图中表示类似项,因此,一旦某一项在一个附图中被定义,则在随后的附图中不需要对其进行进一步定义和解释。The above descriptions are only preferred embodiments of the present application, and are not intended to limit the present application. For those skilled in the art, there may be various modifications and changes in the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of this application shall be included within the protection scope of this application. It should be noted that like numerals and letters denote similar items in the following figures, therefore, once an item is defined in one figure, it does not require further definition and explanation in subsequent figures.

以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。The above is only a specific implementation of the application, but the scope of protection of the application is not limited thereto. Anyone familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the application. Should be covered within the protection scope of this application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims (14)

1. The power consumption detection model construction method is characterized by comprising the following steps of:
simulating a target functional module in a first appointed number of application scenes to obtain first turnover data of data signals in each application scene in the first appointed number of application scenes, wherein the target functional module is one functional module in a chip design;
Screening the data signals according to the first overturn data to determine a target observation signal group, wherein the target observation signals comprise a plurality of target observation signals;
determining second overturn data of each target observation signal in the target observation signal group in each application scene in the first appointed number of application scenes from the first overturn data;
calculating to obtain correction parameters and signal weights corresponding to all target observation signals of the target observation signal group according to the second overturn data;
and determining a power consumption detection model by taking the turnover amount of each target observation signal in the target observation signal group as an independent variable according to the correction parameters and the signal weights, wherein the power consumption detection model is used for calculating the power consumption of the chip.
2. The method of claim 1, wherein screening the data signals according to the first flipping data to determine a set of target observed signals comprises:
primary screening is carried out on data signals used in the first specified number of application scenes according to a preset numerical value interval, so that an initial observation signal group is obtained, wherein the initial observation signal group comprises a plurality of initial observation signals;
Determining signal errors of all initial observation signals according to the initial observation signal group;
and determining the target observation signal group from the initial observation signal groups according to the signal errors of the initial observation signals.
3. The method of claim 2, wherein the first specified number of application scenarios includes N application scenarios, and wherein the N application scenarios include M sub-scenarios; the primary screening is performed on the data signals used in the first specified number of application scenarios according to the preset numerical value interval, so as to obtain an initial observation signal group, including:
screening observation signals with turnover quantity in the preset numerical value interval from each sub-scene to obtain an observation signal group corresponding to each sub-scene;
and aiming at each application scene, taking intersections of the observation signal groups corresponding to the sub-scenes in the application scene to obtain N observation signal groups corresponding to the application scene, wherein the N observation signal groups are the initial observation signal groups, and M and N are positive integers larger than one.
4. A method according to claim 3, wherein the predetermined value interval is determined by:
Calculating the turnover amount of each data signal in each sub-scene in unit time;
determining the non-zero intermediate number of the turnover amount of each data signal in each sub-scene in unit time;
and determining the preset numerical value interval according to the non-zero turning quantity intermediate number.
5. A method according to claim 3, wherein said determining said set of target observed signals from said set of initial observed signals based on signal errors of said respective initial observed signals comprises:
selecting a second specified number of observation signals with the minimum signal error from target application scenes in the N application scenes to obtain a screening observation signal group, wherein the target application scene is any one application scene in the N application scenes;
and combining N screening observation signal groups corresponding to the N application scenes to obtain the target observation signal group.
6. The method of claim 2, wherein the signal error of each of the initial observed signals is determined by the following equation:
Figure FDA0002844059330000021
Figure FDA0002844059330000022
Figure FDA0002844059330000023
wherein M represents the number of sub-scenes included in the ith application scene, W i,k Signal error, tF, representing the kth initial observed signal in the ith application scenario i,j Representing the total signal flip amount per unit time in the jth sub-scene in the ith application scene,
Figure FDA0002844059330000031
representing the average value of the total signal turning quantity in unit time in the ith application scene, tf i,j,k Representing the amount of flip per unit time of the kth initial observation signal in the jth sub-scene in the ith application scene, +.>
Figure FDA0002844059330000032
And representing the average value of the turning quantity of the kth initial observation signal in the ith application scene.
7. The method according to claim 1, wherein the calculating, according to the second flip data, a correction parameter and a signal weight corresponding to each target observation signal of the target observation signal group includes:
constructing a first matrix according to D groups of first-class overturn data in the second overturn data, wherein D represents the number of sub-scenes in the appointed number of application scenes, and the first-class overturn data represents the overturn amount of each target observation signal in the target observation signal group in each sub-scene in the appointed number of application scenes;
constructing a second matrix according to D groups of second-class overturn data in the second overturn data, wherein the second-class overturn data represents the total overturn amount of the target observation signal group in each application scene in the appointed number of application scenes;
And calculating to obtain the signal weight and the correction parameter corresponding to the target observation signal group according to the first matrix and the second matrix.
8. The method as recited in claim 1, further comprising:
calculating a model error of the power consumption detection model according to the second turnover data of each target observation signal;
judging whether the model error is larger than a preset error value or not;
and if the model error is larger than a preset error value, reselecting the latest target observation signal group to update the constructed power consumption detection model.
9. The method of claim 8, wherein the model error of the power consumption detection model is calculated by the formula:
Figure FDA0002844059330000033
where e represents a model error of the power consumption detection model, D represents the number of application scenarios involved in the simulation, stF i Representing the total flip amount of the target observation signal group in the ith scene etF i And representing the calculated turning quantity in the ith scene according to the power consumption detection model.
10. A power consumption detection method, comprising:
acquiring turnover values of each observation signal of a chip to be detected in a target observation signal group in unit time;
Based on the power consumption detection model obtained by the method according to any one of claims 1-9, calculating to obtain the power consumption of the chip to be detected according to the turnover value of each observation signal in unit time.
11. A power consumption detection model construction apparatus, characterized by comprising:
the simulation module is used for simulating the target functional module in a first appointed number of application scenes to obtain first turnover data of data signals in each application scene in the first appointed number of application scenes, and the target functional module is one functional module in a chip design;
the screening module is used for screening the data signals according to the first turnover data so as to determine a target observation signal group;
the first determining module is used for determining second turnover data of each target observation signal in the target observation signal group in each application scene in the first appointed number of application scenes from the first turnover data;
the first calculation module is used for calculating and obtaining correction parameters and signal weights corresponding to all target observation signals of the target observation signal group according to the second overturn data;
The second determining module is configured to determine a power consumption detection model according to the correction parameter and the signal weight by using the turnover amount of each target observation signal in the target observation signal group as an independent variable, where the power consumption detection model is used to calculate power consumption of a chip.
12. A power consumption detection apparatus, characterized by comprising:
the acquisition module is used for acquiring the turnover value of each observation signal in the target observation signal group of the chip to be detected in unit time;
the second calculation module is configured to calculate, based on the power consumption detection model obtained by the method according to any one of claims 1 to 9, the power consumption of the chip to be detected according to the turnover value of each observation signal in unit time.
13. An electronic device, comprising: a processor, a memory storing machine-readable instructions executable by the processor, which when executed by the processor perform the steps of the method of any of claims 1 to 10 when the electronic device is run.
14. A computer-readable storage medium, characterized in that it has stored thereon a computer program which, when executed by a processor, performs the steps of the method according to any of claims 1 to 10.
CN202011513448.5A 2020-12-17 2020-12-17 Power consumption detection model construction method, power consumption detection device and electronic equipment Active CN112631849B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011513448.5A CN112631849B (en) 2020-12-17 2020-12-17 Power consumption detection model construction method, power consumption detection device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011513448.5A CN112631849B (en) 2020-12-17 2020-12-17 Power consumption detection model construction method, power consumption detection device and electronic equipment

Publications (2)

Publication Number Publication Date
CN112631849A CN112631849A (en) 2021-04-09
CN112631849B true CN112631849B (en) 2023-05-12

Family

ID=75317857

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011513448.5A Active CN112631849B (en) 2020-12-17 2020-12-17 Power consumption detection model construction method, power consumption detection device and electronic equipment

Country Status (1)

Country Link
CN (1) CN112631849B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116338434A (en) * 2023-04-06 2023-06-27 展讯半导体(成都)有限公司 Average power consumption measuring method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107608844A (en) * 2017-09-25 2018-01-19 郑州云海信息技术有限公司 A kind of method of hardware testing, system, device and computer-readable recording medium
CN110020534A (en) * 2019-03-27 2019-07-16 中国信息通信研究院 For the safety analytical method and system of the encryption equipment with mask combinational circuit
CN110245366A (en) * 2018-03-08 2019-09-17 华为技术有限公司 Dynamic power consumption estimation method, device and system
CN110601692A (en) * 2019-09-11 2019-12-20 江苏芯盛智能科技有限公司 Lookup table circuit, data lookup method, integrated circuit chip, and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8140925B2 (en) * 2007-06-26 2012-03-20 International Business Machines Corporation Method and apparatus to debug an integrated circuit chip via synchronous clock stop and scan
WO2013059987A1 (en) * 2011-10-25 2013-05-02 深圳市海思半导体有限公司 Method of reducing dynamic power consumption and electronic device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107608844A (en) * 2017-09-25 2018-01-19 郑州云海信息技术有限公司 A kind of method of hardware testing, system, device and computer-readable recording medium
CN110245366A (en) * 2018-03-08 2019-09-17 华为技术有限公司 Dynamic power consumption estimation method, device and system
CN110020534A (en) * 2019-03-27 2019-07-16 中国信息通信研究院 For the safety analytical method and system of the encryption equipment with mask combinational circuit
CN110601692A (en) * 2019-09-11 2019-12-20 江苏芯盛智能科技有限公司 Lookup table circuit, data lookup method, integrated circuit chip, and storage medium

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
An Ultra-small, Low-power All-Optical Flip-Flop Memory on a Silicon Chip;Rajesh Kumar等;《OFCNFOEC》;第1-4页 *
Performance Comparison of Flip-Chip-Assembled 5-GHz 0.18-µm CMOS Power Amplifiers on Different Packaging Substrates;Che-Chung Kuo等;《IEEE TRANSACTIONS ON COMPONENTS, PACKAGING AND MANUFACTURING TECHNOLOGY》;第2014-2021页 *
典型公钥密码实现的功耗分析与防护技术研究;许森;《中国博士学位论文全文数据库信息科技辑》;I136-59 *
集成电路低功耗内建自测试技术的研究;王义;《中国博士学位论文全文数据库信息科技辑》;I135-50 *

Also Published As

Publication number Publication date
CN112631849A (en) 2021-04-09

Similar Documents

Publication Publication Date Title
US7107187B1 (en) Method for modeling system performance
CN107992410B (en) Software quality monitoring method and device, computer equipment and storage medium
CN117422195B (en) Water quality assessment method, device, computer equipment and storage medium
CN107895038A (en) A kind of link prediction relation recommends method and device
CN111783883A (en) Abnormal data detection method and device
CN107798245A (en) A kind of software security flaw Forecasting Methodology based on component dependency graph
CN118093447B (en) Software fault positioning method, model training method, electronic equipment and storage medium
CN112926794A (en) Bank loan information prediction method and device
Grbac et al. Stability of Software Defect Prediction in Relation to Levels of Data Imbalance.
CN115795928A (en) Accelerated degradation test data processing method and device based on gamma process
CN112631849B (en) Power consumption detection model construction method, power consumption detection device and electronic equipment
Doan et al. Machine learning applications to load and resistance factors calibration for stability design of caisson breakwater foundations
Tae-Jin Comparative study on the performance attributes of NHPP software reliability model based on Weibull family distribution
JP6192432B2 (en) Risk weighing system
CN114037144A (en) Power grid engineering operation and maintenance cost prediction method and system
Laurent et al. Analytical inference for inspectors’ uncertainty using network-scale visual inspections
CN114091644A (en) A technology risk assessment method and system for artificial intelligence products
CN114529202B (en) Project evaluation method, device, electronic device and storage medium
CN116703216A (en) Service scene scoring method, device, computer equipment and storage medium
CN110008100A (en) Method and device for web page access amount abnormality detection
CN105844376A (en) Method and device for identifying influence degree of factors on service system
CN111210105B (en) Continuous operation performance verification, apparatus, computer device, and storage medium
CN114693469A (en) Regional industry business interest index obtaining method and device based on electric energy data
CN113191877A (en) Data feature acquisition method and system and electronic equipment
Jain et al. Markovian software reliability model for two types of failures with imperfect debugging rate and generation of errors

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant