CN116997878A - Power budget allocation method and related equipment - Google Patents

Power budget allocation method and related equipment Download PDF

Info

Publication number
CN116997878A
CN116997878A CN202080103358.0A CN202080103358A CN116997878A CN 116997878 A CN116997878 A CN 116997878A CN 202080103358 A CN202080103358 A CN 202080103358A CN 116997878 A CN116997878 A CN 116997878A
Authority
CN
China
Prior art keywords
power
cycle
processor
domain
power consumption
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.)
Pending
Application number
CN202080103358.0A
Other languages
Chinese (zh)
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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Publication of CN116997878A publication Critical patent/CN116997878A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3234Power saving characterised by the action undertaken
    • G06F1/324Power saving characterised by the action undertaken by lowering clock frequency

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Power Sources (AREA)

Abstract

The application discloses a power budget allocation method and related equipment, which are particularly used in the field of battery management, wherein the method comprises the following steps: determining a power consumption of at least one processor core included in each of the plurality of power domains during a first cycle; allocating a power budget to each power domain according to the power consumption of at least one processor core contained in each power domain in a first period, so that each power domain performs frequency adjustment in a second period based on the allocated power budget, wherein the second period is the next period of the first period; by using the method, the power budget can be fully utilized, higher power supply frequency is provided for the cores for data processing, the performance of each core is fully exerted, and the working speed and the working performance of the processor are improved.

Description

一种功率预算的分配方法及相关设备A power budget allocation method and related equipment 技术领域Technical field

本申请实施例涉及电源管理领域,尤其涉及一种功率预算的分配方法及相关设备。Embodiments of the present application relate to the field of power management, and in particular, to a power budget allocation method and related equipment.

背景技术Background technique

随着电子设备配置的不断发展,多核处理器已经广泛应用于计算机和手机领域,多核处理器是指在一个处理器中集成多个计算引擎(处理器核),可以支持多线任务;对于单核处理器而言,多核处理器支持把要处理的数据分解成多个部分分别给予不同的核心寄存器让各个运算器共同运算,提升处理器的运行速率。With the continuous development of electronic equipment configuration, multi-core processors have been widely used in computers and mobile phones. Multi-core processors refer to the integration of multiple computing engines (processor cores) in one processor, which can support multi-thread tasks; for single As for core processors, multi-core processors support decomposing the data to be processed into multiple parts and giving them to different core registers so that each arithmetic unit can work together to increase the operating speed of the processor.

一般的,多核处理器都由多个集成电路稳压电源(integrated voltage regulator,IVR)为其供电,即多核处理器一般包括多个电源域,为了保证处理器多个内核的总功率/电流不超过系统设计所能承受的最大供电功率/电流,就需要在不同电源域之间分配功率预算;在支持超频功能的多核处理器中,通常处理器对处于超频状态的内核来平均分配功率预算,并根据分配结果来确定每个内核所允许达到的最高频率,使得每一个内核在最高频率状态下运行最重负载时所产生的功耗不超过处理器为其分配的功率预算,这样保证整个系统的稳定运行。Generally, multi-core processors are powered by multiple integrated voltage regulators (IVRs). That is, multi-core processors generally include multiple power domains. In order to ensure that the total power/current of multiple cores of the processor is not If the maximum supply power/current that the system design can withstand is exceeded, the power budget needs to be allocated between different power domains; in a multi-core processor that supports overclocking, the processor usually allocates the power budget evenly to the cores in the overclocked state. And based on the allocation results, the maximum frequency allowed for each core is determined, so that the power consumption of each core when running the heaviest load at the highest frequency does not exceed the power budget allocated by the processor, thus ensuring that the entire system stable operation.

受上述最高频率的限制,当每个处理器核所运行的负载小于最重负载时,单个处理器核的功耗将会低于其所能允许的最大功耗,每个处理器核不能完全利用处理器为其分配的功率预算,所有处理器核的功耗也将低于系统所能承受的最大功耗,这样,将导致不能发挥出处理器的最大性能。Limited by the above maximum frequency, when the load running by each processor core is less than the heaviest load, the power consumption of a single processor core will be lower than its maximum allowable power consumption, and each processor core cannot fully Using the power budget allocated by the processor, the power consumption of all processor cores will also be lower than the maximum power consumption that the system can withstand. This will result in the inability to exert the maximum performance of the processor.

发明内容Contents of the invention

本申请实施例提供了一种功率预算的分配方法及相关设备,用于根据处理器中各电源域对应的处理器核的状态来分配功率预算。Embodiments of the present application provide a power budget allocation method and related equipment, which are used to allocate the power budget according to the status of the processor core corresponding to each power domain in the processor.

本申请实施例的第一方面提供一种功率预算的分配方法,包括:The first aspect of the embodiment of the present application provides a power budget allocation method, including:

当处理器为多核处理器时,处理器中包含多个电源域,每个电源域都为至少一个处理器核供电;首先,需要确定每个电源域中的处理器核在第一周期内的功耗,然后根据得到的功耗,把功率预算分配给每个电源域;可以理解的,每个电源域在第一周期内对应的功耗,可以直接或间接的反映该电源域中的处理器核的状态,根据功耗来分配功率预算,可以满足不同处理器核的需求,使得每个电源域可以基于分配到的功率预算进行频率调节。When the processor is a multi-core processor, the processor contains multiple power domains, and each power domain supplies power to at least one processor core; first, it is necessary to determine the power of the processor core in each power domain in the first cycle. Power consumption, and then allocate the power budget to each power domain based on the obtained power consumption; it can be understood that the corresponding power consumption of each power domain in the first cycle can directly or indirectly reflect the processing in that power domain According to the status of the processor core, the power budget is allocated according to the power consumption, which can meet the needs of different processor cores, so that each power domain can adjust the frequency based on the allocated power budget.

在上述设计中,频率控制器通过根据处理器核的功耗来调节为其分配的功率预算,然后再根据功率预算实施控制处理器核的频率,使得功率预算能得到更合理的分配,满足不同处理器核的需求。更进一步的,该种方式还可以根据功率预算来进行频率调节,这样,调节后的处理器核心能够更加符合其运行状态,提高处理器核心的工作效率。In the above design, the frequency controller adjusts the power budget allocated to the processor core according to its power consumption, and then controls the frequency of the processor core according to the power budget, so that the power budget can be more reasonably allocated to meet different needs. processor core requirements. Furthermore, this method can also adjust the frequency according to the power budget. In this way, the adjusted processor core can be more consistent with its operating status and improve the working efficiency of the processor core.

结合本申请实施例的第一方面,在本申请实施例的第一方面的第一种实施方式中:In conjunction with the first aspect of the embodiments of the present application, in the first implementation manner of the first aspect of the embodiments of the present application:

频率控制器可以根据每个电源域所包含的至少一个处理器核在第一周期的实时功耗来分配功率预算,也可以根据每个电源域所包含的至少一个处理器核在第一周期的平均功耗来分配;这样,频率控制器可以通过多种方法来感知处理器核的运行状态,为其分配功率 预算提供了多种方案。The frequency controller may allocate the power budget based on the real-time power consumption of at least one processor core included in each power domain in the first cycle, or may allocate the power budget based on the real-time power consumption of at least one processor core included in each power domain in the first cycle. Allocate based on average power consumption; in this way, the frequency controller can sense the operating status of the processor core through multiple methods and provide multiple solutions for allocating the power budget.

结合本申请实施例的第一方面的第一种实施方式,在本申请实施例的第一方面的第二种实施方式中:In conjunction with the first implementation manner of the first aspect of the embodiments of the present application, in the second implementation manner of the first aspect of the embodiments of the present application:

频率控制器在取得每个电源域所包含的至少一个处理器核在第一周期的功耗时,还可以根据该功耗计算每个电源域所包含的至少一个处理器核在第一周期的负载,然后根据负载来作为分配功率预算的参考,这样,为频率控制器分配预算提供了新的方案。When the frequency controller obtains the power consumption of at least one processor core included in each power domain in the first cycle, it can also calculate the power consumption of at least one processor core included in each power domain in the first cycle based on the power consumption. The load is then used as a reference for allocating the power budget according to the load. This provides a new solution for the frequency controller to allocate the budget.

结合本申请实施例的第一方面的第二种实施方式,在本申请实施例的第一方面的第三种实施方式中:Combined with the second implementation manner of the first aspect of the embodiments of the present application, in the third implementation manner of the first aspect of the embodiments of the present application:

频率控制器在取得每个电源域所包含的至少一个处理器核在第一周期的负载时,还可以根据该负载来预测每个电源域所包含的至少一个处理器核在第二周期的预测负载,然后根据预测负载来作为分配功率预算的参考;可以理解的,每个电源域所包含的至少一个处理器核在第二周期的预测负载,可以直接反应处理器核在第二周期的功率需求,这样,可以使得频率控制器更加合理的为其分配功率预算,提高处理器核的工作性能。When the frequency controller obtains the load of at least one processor core included in each power domain in the first cycle, it can also predict the predicted load of at least one processor core included in each power domain in the second cycle based on the load. The load is then used as a reference for allocating the power budget based on the predicted load; it can be understood that the predicted load of at least one processor core included in each power domain in the second cycle can directly reflect the power of the processor core in the second cycle. In this way, the frequency controller can allocate the power budget more reasonably and improve the performance of the processor core.

结合本申请实施例的第一方面的第三种实施方式,在本申请实施例的第一方面的第四种实施方式中:Combined with the third implementation manner of the first aspect of the embodiments of the present application, in the fourth implementation manner of the first aspect of the embodiments of the present application:

频率控制器在获得所述每个电源域所包含的至少一个处理器核在第一周期的功耗,所述每个电源域所包含的至少一个处理器核在所述第一周期的负载,和所述每个电源域包含的至少一个处理器核在所述第二周期内的预测负载后,可以根据其中的任一项或者多项作为分配功率预算的参考,这样可以更加全面的感知处理器核的运行状态,更合理的为每个电源域分配功率预算。The frequency controller obtains the power consumption of at least one processor core included in each power domain in the first cycle, and the load of the at least one processor core included in each power domain in the first cycle, and the predicted load of at least one processor core included in each power domain in the second cycle, any one or more of them can be used as a reference for allocating power budget, so that more comprehensive perception processing can be achieved The operating status of the processor core can be used to allocate the power budget to each power domain more reasonably.

本申请实施例的第二方面提供一种功率预算的分配方法,包括:The second aspect of the embodiment of the present application provides a power budget allocation method, including:

当处理器为多核处理器时,处理器中包含多个电源域,而每个电源域都为多个处理器核供电;首先,需要确定每个电源域所包含的多个处理器核在第一周期内处于激活状态的处理器核的个数,然后根据每个电源域所包含的多个处理器核在第一周期内处于激活状态的处理器核的个数,将功率预算分配给所述每个电源域;可以理解的,每个电源域中处于激活状态的核的个数越多,则说明处理器核处理数据的任务更重,因此要为其多分配工作裕量,提高其频率;根据处于激活状态的处理器核的个数来分配功率预算,可以满足不同电源域的需求,使得每个电源域可以基于分配到的功率预算在下一周期进行频率调节。When the processor is a multi-core processor, the processor contains multiple power domains, and each power domain supplies power to multiple processor cores. First, it is necessary to determine whether the multiple processor cores contained in each power domain are located in the first power domain. The number of active processor cores in one cycle, and then allocate the power budget to all processor cores contained in each power domain based on the number of active processor cores in the first cycle. Describe each power domain; it can be understood that the more the number of active cores in each power domain, the heavier the processor core's task of processing data, so more work margin should be allocated to it to increase its Frequency; allocating the power budget according to the number of active processor cores can meet the needs of different power domains, so that each power domain can adjust the frequency in the next cycle based on the allocated power budget.

在上述设计中,频率控制器通过根据每个电源域所包含的多个处理器核在第一周期内处于激活状态的处理器核的个数来调节为其分配的功率预算,然后再根据功率预算实施控制处理器核的频率,使得功率预算能得到更合理的分配,满足不同处理器核的需求。更进一步的,该种方式还可以根据功率预算来进行频率调节,这样,调节后的处理器核心能够更加符合其运行状态,提高处理器核的工作效率。In the above design, the frequency controller adjusts the power budget allocated to the multiple processor cores contained in each power domain according to the number of active processor cores in the first cycle, and then adjusts the power budget allocated to it according to the number of active processor cores in each power domain. Budget implementation controls the frequency of the processor core so that the power budget can be allocated more reasonably to meet the needs of different processor cores. Furthermore, this method can also adjust the frequency according to the power budget. In this way, the adjusted processor core can be more consistent with its operating status and improve the working efficiency of the processor core.

结合本申请实施例的第二方面,在本申请实施例的第二方面的第一种实施方式中:In conjunction with the second aspect of the embodiments of the present application, in the first implementation manner of the second aspect of the embodiments of the present application:

频率控制器还可以确定多个电源域中每个电源域所包含的多个处理器核在第一周期的功耗,然后根据每个电源域所包含的多个处理器核在第一周期内处于激活状态的处理器核的个数和所述多个电源域中每个电源域所包含的多个处理器核在第一周期的功耗,将功率 预算分配给所述每个电源域;这样,频率控制器可以根据多个电源域中每个电源域所包含的多个处理器核在第一周期内处于激活状态的处理器核的个数和所述多个电源域中每个电源域所包含的多个处理器核在第一周期的功耗作为分配功率预算的参考,更加全面的感知处理器核的运行状态,更合理的为每个电源域分配功率预算。The frequency controller can also determine the power consumption of multiple processor cores included in each power domain in the first cycle, and then determine the power consumption of the multiple processor cores included in each power domain in the first cycle. The number of processor cores in the activated state and the power consumption of the multiple processor cores included in each of the multiple power domains in the first cycle, allocate the power budget to each of the power domains; In this way, the frequency controller can determine the number of processor cores that are activated in the first cycle according to the number of processor cores included in each power domain in the multiple power domains and the number of processor cores in each power domain in the multiple power domains. The power consumption of multiple processor cores included in the domain in the first cycle is used as a reference for allocating power budgets, allowing a more comprehensive perception of the operating status of the processor cores and a more reasonable allocation of power budgets for each power domain.

本申请实施例的第三方面提供一种频率控制器,包括:A third aspect of the embodiment of the present application provides a frequency controller, including:

确定单元,用于确定多个电源域中每个电源域所包含的至少一个处理器核在第一周期的功耗;a determining unit configured to determine the power consumption in the first cycle of at least one processor core included in each power domain of the plurality of power domains;

分配单元,用于根据所述每个电源域所包含的至少一个处理器核在第一周期的功耗,将功率预算分配给所述每个电源域;An allocation unit configured to allocate a power budget to each power domain based on the power consumption of at least one processor core included in each power domain in the first cycle;

调节单元,用于根据分配的功率预算在第二周期内对所述每个电源域进行频率调节,所述第二周期为所述第一周期的下一个周期。An adjustment unit, configured to perform frequency adjustment on each power domain in a second period according to the allocated power budget, where the second period is the next period of the first period.

结合本申请实施例的第三方面,在本申请实施例的第三方面的第一种实施方式中:In conjunction with the third aspect of the embodiments of the present application, in the first implementation manner of the third aspect of the embodiments of the present application:

所述每个电源域所包含的至少一个处理器核在第一周期的功耗为所述每个电源域所包含的至少一个处理器核在第一周期的实时功耗或者平均功耗。The power consumption of the at least one processor core included in each power domain in the first cycle is the real-time power consumption or the average power consumption of the at least one processor core included in each power domain in the first cycle.

结合本申请实施例的第三方面的第一种实施方式,在本申请实施例的第三方面的第二种实施方式中:In combination with the first implementation manner of the third aspect of the embodiments of the present application, in the second implementation manner of the third aspect of the embodiments of the present application:

所述频率控制器还包括计算单元;The frequency controller also includes a calculation unit;

所述计算单元,用于根据所述每个电源域所包含的至少一个处理器核在第一周期的功耗,计算所述每个电源域所包含的至少一个处理器核在所述第一周期的负载。The calculation unit is configured to calculate the power consumption of at least one processor core included in each power domain in the first cycle based on the power consumption of the at least one processor core included in each power domain in the first cycle. cycle load.

结合本申请实施例的第三方面的第二种实施方式,在本申请实施例的第三方面的第三种实施方式中:Combined with the second implementation manner of the third aspect of the embodiments of the present application, in the third implementation manner of the third aspect of the embodiments of the present application:

所述计算单元,还用于根据所述每个电源域所包含的至少一个处理器核在所述第一周期的负载,预测所述每个电源域包含的至少一个处理器核在所述第二周期内的预测负载。The computing unit is further configured to predict, based on the load of at least one processor core included in each power domain in the first cycle, the at least one processor core included in each power domain in the first period. Forecasted load over the second period.

结合本申请实施例的第三方面的第三种实施方式,在本申请实施例的第三方面的第四种实施方式中:In combination with the third implementation manner of the third aspect of the embodiments of the present application, in the fourth implementation manner of the third aspect of the embodiments of the present application:

所述分配单元,具体用于根据所述每个电源域所包含的至少一个处理器核在第一周期的功耗,所述每个电源域所包含的至少一个处理器核在所述第一周期的负载,和所述每个电源域包含的至少一个处理器核在所述第二周期内的预测负载中的任意一项,将功率预算分配给所述每个电源域。The allocation unit is specifically configured to calculate the power consumption of at least one processor core included in each power domain in the first cycle according to the power consumption of the at least one processor core included in each power domain in the first cycle. The power budget is allocated to each power domain based on any one of the load of the cycle and the predicted load of at least one processor core included in each power domain in the second cycle.

本申请实施例的第四方面提供一种频率控制器,包括:The fourth aspect of the embodiment of the present application provides a frequency controller, including:

确定单元,用于确定多个电源域中每个电源域所包含的多个处理器核在第一周期内处于激活状态的处理器核的个数;a determining unit configured to determine the number of processor cores that are active in the first cycle among the multiple processor cores included in each power domain of the plurality of power domains;

分配单元,用于根据所述每个电源域所包含的多个处理器核在第一周期内处于激活状态的处理器核的个数,将功率预算分配给所述每个电源域;An allocation unit configured to allocate the power budget to each power domain according to the number of processor cores in the activated state of the plurality of processor cores included in each power domain in the first cycle;

调节单元,用于根据分配的功率预算在第二周期内对所述每个电源域进行频率调节,所述第二周期为所述第一周期的下一个周期。An adjustment unit, configured to perform frequency adjustment on each power domain in a second period according to the allocated power budget, where the second period is the next period of the first period.

结合本申请实施例的第四方面,在本申请实施例的第四方面的第一种实施方式中:In conjunction with the fourth aspect of the embodiments of the present application, in the first implementation manner of the fourth aspect of the embodiments of the present application:

所述确定单元,还用于确定所述多个电源域中每个电源域所包含的多个处理器核在第一周期的功耗;The determining unit is also used to determine the power consumption in the first cycle of the multiple processor cores included in each of the multiple power domains;

所述分配单元,用于根据所述每个电源域所包含的多个处理器核在第一周期内处于激活状态的处理器核的个数和所述多个电源域中每个电源域所包含的多个处理器核在第一周期的功耗,将功率预算分配给所述每个电源域。The allocating unit is configured to determine the number of processor cores in the activated state within the first cycle of the multiple processor cores included in each power domain and the number of processor cores included in each power domain in the multiple power domains. Contains the power consumption of multiple processor cores in the first cycle, and allocates the power budget to each of the power domains.

本申请实施例的第五方面提供一种处理器,包括:A fifth aspect of the embodiment of the present application provides a processor, including:

所述处理器包括处理器核、功耗检测器、功耗控制器和频率调节器;所述功耗检测器和所述频率调节器分别于所述功耗控制器相连;The processor includes a processor core, a power consumption detector, a power consumption controller and a frequency regulator; the power consumption detector and the frequency regulator are respectively connected to the power consumption controller;

所述功耗检测器,用于检测确定多个电源域中每个电源域所包含的至少一个处理器核在第一周期的功耗;The power consumption detector is used to detect and determine the power consumption of at least one processor core included in each power domain in the plurality of power domains in the first cycle;

所述功耗控制器,用于根据所述每个电源域所包含的至少一个处理器核在第一周期的功耗,将功率预算分配给所述每个电源域;The power consumption controller is configured to allocate a power budget to each power domain based on the power consumption of at least one processor core included in each power domain in the first cycle;

所述频率调节器,用于根据分配的功率预算在第二周期内对所述每个电源域进行频率调节,其中,所述第二周期为所述第一周期的下一个周期。The frequency adjuster is configured to adjust the frequency of each power domain in a second period according to the allocated power budget, where the second period is the next period of the first period.

结合本申请实施例的第五方面,在本申请实施例的第五方面的第一种实施方式中:In conjunction with the fifth aspect of the embodiments of the present application, in the first implementation manner of the fifth aspect of the embodiments of the present application:

所述每个电源域所包含的至少一个处理器核在第一周期的功耗为所述每个电源域所包含的至少一个处理器核在第一周期的实时功耗或者平均功耗。The power consumption of the at least one processor core included in each power domain in the first cycle is the real-time power consumption or the average power consumption of the at least one processor core included in each power domain in the first cycle.

结合本申请实施例的第五方面的第一种实施方式,在本申请实施例的第五方面的第二种实施方式中:In combination with the first implementation manner of the fifth aspect of the embodiments of the present application, in the second implementation manner of the fifth aspect of the embodiments of the present application:

所述功耗控制器还用于根据所述每个电源域所包含的至少一个处理器核在第一周期的功耗,计算所述每个电源域所包含的至少一个处理器核在所述第一周期的负载。The power consumption controller is also configured to calculate the power consumption of at least one processor core included in each power domain in the first cycle based on the power consumption of the at least one processor core included in each power domain. first cycle load.

结合本申请实施例的第五方面的第二种实施方式,在本申请实施例的第五方面的第三种实施方式中:Combined with the second implementation manner of the fifth aspect of the embodiments of the present application, in the third implementation manner of the fifth aspect of the embodiments of the present application:

所述功耗控制器还用于根据所述每个电源域所包含的至少一个处理器核在所述第一周期的负载,预测所述每个电源域包含的至少一个处理器核在所述第二周期内的预测负载。The power consumption controller is further configured to predict, based on the load of at least one processor core included in each power domain in the first cycle, the at least one processor core included in each power domain in the said first period. Forecasted load during the second period.

结合本申请实施例的第五方面的第三种实施方式,在本申请实施例的第五方面的第四种实施方式中:In combination with the third implementation manner of the fifth aspect of the embodiments of the present application, in the fourth implementation manner of the fifth aspect of the embodiments of the present application:

所述功耗控制器具体用于根据所述每个电源域所包含的至少一个处理器核在第一周期的功耗,所述每个电源域所包含的至少一个处理器核在所述第一周期的负载,和所述每个电源域包含的至少一个处理器核在所述第二周期内的预测负载中的任意一项,将功率预算分配给所述每个电源域。The power consumption controller is specifically configured to calculate the power consumption of at least one processor core included in each power domain in the first cycle according to the power consumption of the at least one processor core included in each power domain in the first cycle. A power budget is allocated to each power domain based on any one of the load in one cycle and the predicted load in the second cycle of at least one processor core included in each power domain.

本申请实施例的第六方面提供一种处理器,包括:A sixth aspect of the embodiment of the present application provides a processor, including:

所述处理器包括处理器核、功耗控制器和频率调节器;所述频率调节器分别于所述功耗控制器相连;The processor includes a processor core, a power consumption controller and a frequency regulator; the frequency regulator is respectively connected to the power consumption controller;

所述功耗控制器,确定多个电源域中每个电源域所包含的多个处理器核在第一周期内处于激活状态的处理器核的个数;根据所述每个电源域所包含的多个处理器核在第一周期内处于激活状态的处理器核的个数,将功率预算分配给所述每个电源域;The power consumption controller determines the number of processor cores that are active in the first cycle among the multiple processor cores contained in each power domain of the plurality of power domains; according to the number of processor cores contained in each power domain The number of processor cores in the active state of the multiple processor cores in the first cycle, and allocate the power budget to each power domain;

所述频率调节器,用于根据分配的功率预算在第二周期内对所述每个电源域进行频率调节,其中,所述第二周期为所述第一周期的下一个周期。The frequency adjuster is configured to adjust the frequency of each power domain in a second period according to the allocated power budget, where the second period is the next period of the first period.

结合本申请实施例的第六方面,在本申请实施例的第六方面的第一种实施方式中:In conjunction with the sixth aspect of the embodiments of the present application, in the first implementation manner of the sixth aspect of the embodiments of the present application:

所述处理器还包括功耗检测器,所述功耗检测器与所述功耗控制器相连;The processor also includes a power consumption detector, and the power consumption detector is connected to the power consumption controller;

所述功耗,用于确定所述多个电源域中每个电源域所包含的多个处理器核在第一周期的功耗;The power consumption is used to determine the power consumption of multiple processor cores included in each of the multiple power domains in the first cycle;

所述功耗控制器,具体用于根据所述每个电源域所包含的多个处理器核在第一周期内处于激活状态的处理器核的个数和所述多个电源域中每个电源域所包含的多个处理器核在第一周期的功耗,将功率预算分配给所述每个电源域。The power consumption controller is specifically configured to determine the number of processor cores that are active in the first cycle and the number of processor cores included in each power domain. The power consumption in the first cycle of the multiple processor cores included in the power domain is allocated to each power domain.

本申请实施例的第七方面提供一种电子设备,该电子设备包括如上述第五方面或第六方面任意所述的处理器。A seventh aspect of the embodiments of the present application provides an electronic device, which includes the processor described in any of the fifth or sixth aspects.

本申请的上述方面或其它方面将在以下的实施例中进行具体介绍。The above aspects or other aspects of the present application will be specifically introduced in the following embodiments.

附图说明Description of the drawings

图1为本申请实施例提供的一个处理器的核心功率分布表;Figure 1 is a core power distribution table of a processor provided by an embodiment of the present application;

图2为本申请实施例提供的一种多核处理器的结构示意图;Figure 2 is a schematic structural diagram of a multi-core processor provided by an embodiment of the present application;

图3为本申请实施例提供的一种功率裕量分配方法的流程示意图;Figure 3 is a schematic flowchart of a power margin allocation method provided by an embodiment of the present application;

图4为本申请实施例提供的另一种功率裕量分配方法的流程示意图;Figure 4 is a schematic flow chart of another power margin allocation method provided by an embodiment of the present application;

图5为本申请实施例提供的一种频率控制器的结构示意图;Figure 5 is a schematic structural diagram of a frequency controller provided by an embodiment of the present application;

图6为本申请实施例提供的另一种频率控制器的结构示意图;Figure 6 is a schematic structural diagram of another frequency controller provided by an embodiment of the present application;

图7为本申请实施例提供的另一种频率控制器的结构示意图;Figure 7 is a schematic structural diagram of another frequency controller provided by an embodiment of the present application;

图8为本申请实施例提供的另一种频率控制器的结构示意图。FIG. 8 is a schematic structural diagram of another frequency controller provided by an embodiment of the present application.

具体实施方式Detailed ways

本申请实施例提供了一种功率预算的分配方法及相关设备,用于根据处理器中各电源域对应的处理器核的状态来分配功率预算。Embodiments of the present application provide a power budget allocation method and related equipment, which are used to allocate the power budget according to the status of the processor core corresponding to each power domain in the processor.

下面将结合本申请中的附图,对本申请中的技术方案进行详细地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。The technical solutions in this application will be described in detail below with reference to the accompanying drawings in this application. Obviously, the described embodiments are only some of the embodiments of this application, rather than all of the embodiments.

本申请所公开的各个实施例可以应用于具有超频功能的电子设备中。在本申请一些实施例中,电子设备可以是具有处理器(诸如中央处理器(central processing unit,CPU))的计算机设备,例如台式计算机。还应当理解的是,在本申请其他一些实施例中,电子设备也可以是具有处理器的便携式电子设备,诸如手机、平板电脑、具备无线通讯功能的可穿戴设备(如智能手表)、车载设备等。便携式电子设备的示例性实施例包括但不限于搭载 或者其它操作系统的便携式电子设备。 Various embodiments disclosed in this application may be applied to electronic devices with overclocking functions. In some embodiments of the present application, the electronic device may be a computer device having a processor (such as a central processing unit (CPU)), such as a desktop computer. It should also be understood that in other embodiments of the present application, the electronic device may also be a portable electronic device with a processor, such as a mobile phone, a tablet computer, a wearable device with wireless communication functions (such as a smart watch), or a vehicle-mounted device. wait. Exemplary embodiments of portable electronic devices include, but are not limited to, carrying Or portable electronic devices with other operating systems.

多核处理器是指在一枚处理器中集成有两个或多个完整的计算引擎(处理器核),此时处理器能支持系统总线上的多个处理器核,由总线控制器提供所有总线控制信号和命令信号。随着对处理器处理数据的性能要求越来越高,若仅仅提高单核芯片的速度将会因为工作频率过高而产生过多热量,同时半导体技术的发展也限制着单核芯片频率的提供,因此多核处理器应运而生。多核处理器的架构体现了“分治法”的理念,即对需要处理的任务 进行划分,将划分的多个任务安排给多个内核进行处理,这样,一个处理器就可以在特定时钟周期内执行更多的任务,多核技术能够使处理器并行处理任务,且多核系统更易于扩充,能够在更纤巧的外形中融入更强大的处理性能,所用的功耗更低、功耗产生的热量更少;多核处理器已经成为处理器发展的必然产物。Multi-core processor refers to the integration of two or more complete computing engines (processor cores) in one processor. At this time, the processor can support multiple processor cores on the system bus, and the bus controller provides all Bus control signals and command signals. As the performance requirements for processors to process data are getting higher and higher, if you only increase the speed of a single-core chip, too much heat will be generated due to the high operating frequency. At the same time, the development of semiconductor technology also limits the frequency of single-core chips. , so multi-core processors came into being. The architecture of multi-core processors embodies the concept of "divide and conquer", that is, dividing the tasks that need to be processed and assigning multiple divided tasks to multiple cores for processing. In this way, one processor can complete the task within a specific clock cycle. Perform more tasks. Multi-core technology allows the processor to process tasks in parallel, and the multi-core system is easier to expand. It can incorporate more powerful processing performance into a slimmer form factor, consume less power, and generate more heat. Few; multi-core processors have become an inevitable product of processor development.

处理器核超频技术(inter turbo boost)是指当启动一个运行程序后,处理器会自动加速到合适的频率,以保证程序流畅运行;应对复杂应用时,处理器可自动提高运行主频以提速,对性能要求更高的任务进行处理;当进行工作任务切换时,处理器会立刻处于节电状态。这样既保证了能源的有效利用,又使程序速度大幅提升。通俗理解为自动超频,处理器会根据当前的任务量自动调整处理器主频,从而重任务时发挥最大的性能。该技术的主旨在于,在不超过最大功率的前提下,尽量挖掘处理器的性能潜力。Processor core overclocking technology (inter turbo boost) means that when a running program is started, the processor will automatically accelerate to an appropriate frequency to ensure that the program runs smoothly; when dealing with complex applications, the processor can automatically increase the running frequency to increase speed. , to process tasks with higher performance requirements; when switching tasks, the processor will immediately be in a power-saving state. This not only ensures the effective use of energy, but also greatly increases the program speed. Popularly understood as automatic overclocking, the processor will automatically adjust the processor frequency according to the current workload, so as to maximize performance during heavy tasks. The purpose of this technology is to maximize the performance potential of the processor without exceeding the maximum power.

在对多核处理器进行供电时,通常情况下都采用区域独立供电的方式,即将处理器划分为多个电源域,每个电源域都为其独立供电,而超频turbo技术允许将一些处理器内核,的电力加至其它处理器核,让个别处理器核以更高的频率运行,只要保证处理器消耗的总功率/电流不超过系统设计所能承受的最大供电功率/电流即可。因此需要在多个电源域之间合理分配功率预算,并且需要根据分配的功率预算制定处于turbo状态的内核所允许达到的最高频率。When powering multi-core processors, regional independent power supply is usually adopted, that is, the processor is divided into multiple power domains, and each power domain supplies power independently. Overclocking turbo technology allows some processor cores to be powered , the power is added to other processor cores to allow individual processor cores to run at higher frequencies, as long as the total power/current consumed by the processor does not exceed the maximum power supply/current that the system design can withstand. Therefore, the power budget needs to be reasonably allocated among multiple power domains, and the highest frequency allowed for the core in the turbo state needs to be formulated based on the allocated power budget.

现有技术中,一般是为每一个电源域平均分配功率预算,即每个电源域所分配的功率预算是相同的,然后在每一个电源域中间,再根据每个电源域可承受的最重负载,确定其中处理器核的最大频率;可以理解的,每个电源域中的处理器核运行频率都受该最大频率限制,即处理器核处于超频状态时,提升后的工作频率也不能超过该最大频率。In the existing technology, the power budget is generally allocated equally to each power domain, that is, the power budget allocated to each power domain is the same, and then in the middle of each power domain, the power budget is allocated according to the heaviest load that each power domain can bear. Load, determine the maximum frequency of the processor core; it is understandable that the operating frequency of the processor core in each power domain is limited by the maximum frequency, that is, when the processor core is in an overclocked state, the increased operating frequency cannot exceed the maximum frequency.

图1为本申请实施例提供一个处理器的核心功率分布表,其中,该处理器包括16个内核和32个线程;可以理解的,第一列中,没有处理器核处于超频状态,第二列中,有一个处理器核处于超频状态,依次类推;示例性的,在第九列数据中,在该状态下,有8个处于turbo状态的处理器核的功耗都在14W到14.5W左右,明显低于第二列数据中单个处理器核处于turbo时18.34W的功耗。同时,在8个处理器核处于turbo状态时,处理器的总功耗为122.87W,又明显低于第11列数据中10个处理器核处于turbo状态时处理器的峰值功耗144.49W。显然,这种分配功率裕量的方式,使得每个处于turbo状态的内核因为受最大频率的限制,很多情况下不能充分使用功率预算,也不能发挥每个核心的最大性能。因此需要重新制定分配功率预算的方式,提高turbo功能的性能。Figure 1 provides a core power distribution table of a processor according to an embodiment of the present application. The processor includes 16 cores and 32 threads. It can be understood that in the first column, no processor core is in an overclocked state, and in the second column In the column, there is one processor core in the overclocking state, and so on; for example, in the ninth column of data, in this state, the power consumption of 8 processor cores in the turbo state is between 14W and 14.5W. Around 18.34W, which is significantly lower than the 18.34W power consumption of a single processor core in turbo in the second column of data. At the same time, when 8 processor cores are in turbo state, the total power consumption of the processor is 122.87W, which is significantly lower than the peak power consumption of 144.49W when 10 processor cores are in turbo state in the 11th column of data. Obviously, this way of allocating power margin means that each core in the turbo state is limited by the maximum frequency. In many cases, the power budget cannot be fully used, and the maximum performance of each core cannot be exerted. Therefore, it is necessary to reformulate the way of allocating power budget to improve the performance of turbo function.

有鉴于此,本申请提供一种功率预算的分配方法,用以根据处理器核的功耗来调节为其分配的功率预算,然后再根据功率预算实施控制处理器核的频率,使得功率预算能得到更合理的分配,满足不同处理器核的需求。更进一步的,该种方式还可以根据功率预算来进行频率调节,这样,调节后的处理器核心能够更加符合其运行状态,提高处理器核心的工作效率。In view of this, this application provides a power budget allocation method to adjust the power budget allocated to the processor core according to its power consumption, and then controls the frequency of the processor core according to the power budget, so that the power budget can Get a more reasonable allocation to meet the needs of different processor cores. Furthermore, this method can also adjust the frequency according to the power budget. In this way, the adjusted processor core can be more consistent with its operating status and improve the working efficiency of the processor core.

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。The technical solutions in the embodiments of the present invention will be described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention.

本申请实施例中的术语“系统”和“网络”可被互换使用。“至少一个”是指一个或 者多个,“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B的情况,其中A,B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一项(个)”或其类似表达,是指的这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a,b,或c中的至少一项(个),可以表示:a,b,c,a-b,a-c,b-c,或a-b-c,其中a,b,c可以是单个,也可以是多个。The terms "system" and "network" in the embodiments of this application may be used interchangeably. "At least one" means one or more, and "plurality" means two or more. "And/or" describes the association of associated objects, indicating that there can be three relationships, for example, A and/or B, which can mean: A exists alone, A and B exist simultaneously, and B exists alone, where A, B can be singular or plural. The character "/" generally indicates that the related objects are in an "or" relationship. "At least one of the following" or similar expressions thereof refers to any combination of these items, including any combination of a single item (items) or a plurality of items (items). For example, at least one of a, b, or c can mean: a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, c can be single or multiple .

以及,除非有特别说明,本申请实施例提及“第一”、“第二”等序数词是用于对多个对象进行区分,不用于限定多个对象的优先级或者重要程度。例如,第一时刻、第二时刻,只是为了区分不同的时刻,而并不是表示这两个时刻的优先级或者重要程度等的不同。Furthermore, unless otherwise specified, the ordinal numbers such as "first" and "second" mentioned in the embodiments of this application are used to distinguish multiple objects and are not used to limit the priority or importance of multiple objects. For example, the first moment and the second moment are just to distinguish different moments, but do not indicate the difference in priority or importance of the two moments.

图2示例性示出本申请实施例提供的一种处理器200的结构示意图。如图2所示,处理器200可以包括至少一个处理器核心,例如处理器核心20、处理器核心21、处理器核心22和处理器核心23。处理器200中还可以包括非核心部件,例如通用单元(包括计数器、译码器和信号发生器等)、加速器单元、输入/输出控制单元、接口单元、内部存储器和外部缓存器等。其中,各个处理器核心和非核心部件之间可以通过通信总线(图2中未进行示意)进行连接,以实现数据的传输操作。FIG. 2 exemplarily shows a schematic structural diagram of a processor 200 provided by an embodiment of the present application. As shown in FIG. 2 , the processor 200 may include at least one processor core, such as processor core 20 , processor core 21 , processor core 22 and processor core 23 . The processor 200 may also include non-core components, such as general-purpose units (including counters, decoders, signal generators, etc.), accelerator units, input/output control units, interface units, internal memories, external buffers, etc. Among them, each processor core and non-core components can be connected through a communication bus (not shown in Figure 2) to realize data transmission operations.

应理解,上述处理器200可以是一个芯片。例如,该处理器200可以是现场可编程门阵列(field programmable gate array,FPGA),可以是专用集成芯片(application specific integrated circuit,ASIC),还可以是系统芯片(system on chip,SoC),还可以是中央处理器(central processor unit,CPU),还可以是网络处理器(network processor,NP),还可以是数字信号处理电路(digital signal processor,DSP),还可以是微控制器(micro controller unit,MCU),还可以是可编程控制器(programmable logic device,PLD)或其他集成芯片。应注意,本申请实施例中的处理器200还可以是一种集成电路芯片,具有信号的处理能力。例如,上述的处理器100可以是通用处理器、数字信号处理器(DSP)、专用集成电路(ASIC)、现场可编程门阵列(FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。It should be understood that the above-mentioned processor 200 may be a chip. For example, the processor 200 may be a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on chip (SoC), or It can be a central processor unit (CPU), a network processor (NP), a digital signal processor (DSP), or a microcontroller Unit, MCU), can also be a programmable logic device (PLD) or other integrated chip. It should be noted that the processor 200 in the embodiment of the present application may also be an integrated circuit chip with signal processing capabilities. For example, the above-mentioned processor 100 can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, Discrete hardware components. A general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.

可以理解,本申请实施例中的存储器(例如内部存储器和外部缓存器)可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(read-only memory,ROM)、可编程只读存储器(programmable ROM,PROM)、可擦除可编程只读存储器(erasable PROM,EPROM)、电可擦除可编程只读存储器(electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(random access memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(static RAM,SRAM)、动态随机存取存储器(dynamic RAM,DRAM)、同步动态随机存取存储器(synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(double data rate SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(direct rambus RAM,DR RAM)。应注意,本文 描述的方法的存储器旨在包括但不限于这些和任意其它适合类型的存储器。It can be understood that the memory (such as internal memory and external cache) in the embodiments of the present application may be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. Among them, the non-volatile memory can be read-only memory (ROM), programmable ROM (PROM), erasable programmable read-only memory (erasable PROM, EPROM), electrically removable memory. Erase programmable read-only memory (electrically EPROM, EEPROM) or flash memory. Volatile memory may be random access memory (RAM), which is used as an external cache. By way of illustration, but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (double data rate SDRAM, DDR SDRAM), enhanced synchronous dynamic random access memory (enhanced SDRAM, ESDRAM), synchronous link dynamic random access memory (synchlink DRAM, SLDRAM) ) and direct memory bus random access memory (direct rambus RAM, DR RAM). It should be noted that memory for the methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

本申请实施例中,继续参照图2所示,处理器中还可以包括频率控制器24,每个处理器核心中还可以设置有频率调节器,频率控制器24可以与每个处理器核心中的频率调节器通信连接。如此,在控制每个处理器核心的超频调节时,频率控制器24可以向该处理器核心的频率调节器发送频率控制指令,以使该处理器核心的频率调节器根据频率控制指令调节该处理器核心的频率,例如调节为大于厂商设置的最大频率。In the embodiment of the present application, continuing to refer to FIG. 2 , the processor may further include a frequency controller 24 , and each processor core may also be provided with a frequency regulator. The frequency controller 24 may be connected to each processor core. frequency regulator communication connection. In this way, when controlling the overclocking adjustment of each processor core, the frequency controller 24 can send a frequency control instruction to the frequency adjuster of the processor core, so that the frequency adjuster of the processor core adjusts the processing according to the frequency control instruction. The frequency of the processor core, for example, is adjusted to be greater than the maximum frequency set by the manufacturer.

需要说明的是,图2只是一种示例性地说明,在其它可能的示例中,也可以只在一个或几个处理器核心中设置频率调节器,如此,频率控制器24可以仅对设置有频率调节器的处理器核心的频率进行控制。或者,还可以在非核心部件中设置频率调节器,如此,频率控制器24不仅可以对处理器核心的频率进行控制,也可以对非核心部件的频率进行控制。当然,此处所述的非核心部件是指按照设定的频率工作的部件。It should be noted that FIG. 2 is only an illustrative illustration. In other possible examples, the frequency regulator can also be set in only one or several processor cores. In this way, the frequency controller 24 can only be set for The frequency regulator controls the frequency of the processor core. Alternatively, a frequency adjuster can also be provided in a non-core component. In this way, the frequency controller 24 can not only control the frequency of the processor core, but also control the frequency of the non-core component. Of course, the non-core components mentioned here refer to components that work at a set frequency.

下面以控制一个处理器核心的频率为例介绍本申请中的功率预算的分配方法,针对于控制其它处理器核心或非处理器核心则不再进行赘述。The power budget allocation method in this application will be introduced below by taking controlling the frequency of one processor core as an example. Controlling other processor cores or non-processor cores will not be described again.

基于图2所示意的处理器,图3示例性示出本申请实施例提供的一种功率预算的分配方法对应的流程示意图,该方法适用于频率控制器,例如图2所示意的频率控制器24。本申请实施例中,频率控制器可以按照周期方式执行功率预算的分配方法,图3示例性介绍频率控制器的一次频率控制过程,如图3所示,该方法包括:Based on the processor shown in Figure 2, Figure 3 exemplarily shows a flow chart corresponding to a power budget allocation method provided by an embodiment of the present application. This method is suitable for a frequency controller, such as the frequency controller shown in Figure 2 twenty four. In the embodiment of the present application, the frequency controller can perform the power budget allocation method in a periodic manner. Figure 3 exemplarily introduces the primary frequency control process of the frequency controller. As shown in Figure 3, the method includes:

301、频率控制器确定多个电源域中每个电源域所包含的至少一个处理器核在第一周期的功耗。301. The frequency controller determines the power consumption in the first cycle of at least one processor core included in each power domain of the plurality of power domains.

本申请实施例中,处理器的供电方式可以是pre-core供电方式,即每一个电源域中只包括一个处理器内核,每个处理器内核都是为其独立供电的;还可以是pre-die供电方式,每一个电源域中包括多个处理器内核,处理器为属于同一个电源域的多个处理器共同供电;这样,器核工作状态的参考。由数学公式可以得知:Wi=Pi/(Fi Vi2);其中,Wi为负载,Pi为功耗,Fi为内核对应的供电频率,Vi为电压域对应的供电电压。即当处理器获取到第一周期对应的功耗时,同时需要获取第一周期内每个内核对应的电源域的供电电压和供电频处理器则可以为多个处理器核划分多个电源域,每个电源域都包括至少一个处理器核。In the embodiment of the present application, the power supply mode of the processor may be a pre-core power supply mode, that is, each power domain only includes one processor core, and each processor core is independently powered for it; it may also be a pre-core power supply mode. In the die power supply mode, each power domain includes multiple processor cores, and the processor supplies power to multiple processors belonging to the same power domain; in this way, the core working status is a reference. It can be known from the mathematical formula: Wi=Pi/(Fi Vi2); where Wi is the load, Pi is the power consumption, Fi is the power supply frequency corresponding to the core, and Vi is the power supply voltage corresponding to the voltage domain. That is, when the processor obtains the power consumption corresponding to the first cycle, it also needs to obtain the power supply voltage and power supply frequency of the power domain corresponding to each core in the first cycle. The processor can divide multiple power domains for multiple processor cores. , each power domain includes at least one processor core.

频率控制器需要预先确定好周期来分配功率预算;由于为每个电源域平均分配固定的功率裕量会使得每个电源域的所能达到的最大频率受到该固定功率预算的限制,而最大供电频率将进而导致不能充分发挥每个核心的最大性能;因此频率控制器需要根据每个电池域实时状态,来对功率裕量进行更合理的分配,示例性的,处理器可以确定一个分配的周期,监控一个周期内每个电源域的状态,然后根据该状态来分配下一周期内的分配,可以理解的,还可以多个周期分配一次功率预算,具体不做限定。The frequency controller needs to predetermine the period to allocate the power budget; since evenly allocating a fixed power margin to each power domain will make the maximum frequency that each power domain can achieve be limited by the fixed power budget, and the maximum power supply The frequency will in turn result in the inability to fully utilize the maximum performance of each core; therefore, the frequency controller needs to make a more reasonable allocation of power margin according to the real-time status of each battery domain. For example, the processor can determine an allocated period. , monitor the status of each power domain in one cycle, and then allocate the allocation in the next cycle based on the status. It is understandable that the power budget can also be allocated once in multiple cycles, and there is no specific limit.

示例性的,频率控制器可以通过功耗检测器来获取每个电源域的功耗,利用功耗来感知每个电源域的状态,为其分配合理的功率预算;可以理解的,功耗控制器可以检测一个周期内每一个电源域对应的平均功耗,也可以获取实时功耗,具体不做限定。For example, the frequency controller can obtain the power consumption of each power domain through a power consumption detector, use the power consumption to sense the status of each power domain, and allocate a reasonable power budget to it; it is understandable that power consumption control The device can detect the average power consumption corresponding to each power domain within a cycle, and can also obtain real-time power consumption, with no specific limitations.

可以理解的,当一个电源域只包括一个处理器核时,功耗控制器获取到的每个电源域 的功耗则为该处理器核的功耗;当一个电源域包括多个处理器核时,功耗控制器获取到的每个电源域的功耗则为该电源域中所有处理器核的总功耗。It can be understood that when a power domain only includes one processor core, the power consumption of each power domain obtained by the power consumption controller is the power consumption of the processor core; when a power domain includes multiple processor cores When , the power consumption of each power domain obtained by the power consumption controller is the total power consumption of all processor cores in the power domain.

302、频率控制器根据所述每个电源域所包含的至少一个处理器核在第一周期的功耗,计算所述每个电源域所包含的至少一个处理器核在所述第一周期的负载。302. The frequency controller calculates the power consumption of at least one processor core included in each power domain in the first cycle based on the power consumption of the at least one processor core included in each power domain in the first cycle. load.

频率控制器还利用功耗来确定每个电源域在第一周期内的负载,利用负载来作为处理率,然后根据上述公式计算每个内核在第一周期内的负载,再将该负载作为对第二周期内的功率预算进行分配的参考项。The frequency controller also uses the power consumption to determine the load of each power domain in the first cycle, uses the load as the processing rate, and then calculates the load of each core in the first cycle according to the above formula, and then uses this load as the The reference item for allocating the power budget in the second period.

303、频率控制器根据所述每个电源域所包含的至少一个处理器核在所述第一周期的负载,预测所述每个电源域包含的至少一个处理器核在所述第二周期内的预测负载。303. The frequency controller predicts the load of at least one processor core included in each power domain in the second cycle based on the load of the at least one processor core included in each power domain in the second cycle. predicted load.

频率控制器在确定好每个电源域在第一周期内的负载后,还可以利用负载来预测每个电源域在第二周期内的预测负载,由于每个电源域在第二周期内的预测负载更能直接反应每个电源域在第二周期内的工作频率需求,因此根据预测负载来对第二周期内的功率预算进行分配,可以使得分配的功率预算更加合理。After the frequency controller determines the load of each power domain in the first cycle, it can also use the load to predict the predicted load of each power domain in the second cycle. The load can more directly reflect the operating frequency requirements of each power domain in the second cycle. Therefore, allocating the power budget in the second cycle based on the predicted load can make the allocated power budget more reasonable.

304、频率控制器根据所述每个电源域所包含的至少一个处理器核在第一周期的功耗,所述每个电源域所包含的至少一个处理器核在所述第一周期的负载,和所述每个电源域包含的至少一个处理器核在所述第二周期内的预测负载中的任意一项或多项,将功率预算分配给所述每个电源域。304. The frequency controller determines the load of at least one processor core included in each power domain in the first cycle based on the power consumption of the at least one processor core included in each power domain in the first cycle. , and any one or more of the predicted load of at least one processor core included in each power domain in the second period, allocate a power budget to each power domain.

在第一种可选的方式中,频率控制器可以根据每个电源域所包含的至少一个处理器核在第一周期的功耗,来为每个电源域分配功率预算;示例性的,可根据以下公式来进行功率预算的分配:In a first optional manner, the frequency controller can allocate a power budget to each power domain based on the power consumption of at least one processor core included in each power domain in the first cycle; for example, the frequency controller can The power budget is allocated according to the following formula:

PB i=(P i/P total)*PB total PB i =(P i /P total )*PB total

其中,PB i为系统为第i个电源域分配的功率裕量,P i为第i个电源域对应的第一周期内的功耗,P total为所有电源域对应的功耗之和,PB total为系统所提供的功率预算的总量;可以理解的,电源域在第一周期内的功耗越高,则说明该电源域进行的数据处理工作量越大,则需要为其分配更多的功率预算,提高其内部处理器核的频率,这样就可以提高处理器核的处理速度,充分发挥处理器核的性能。 Among them, PB i is the power margin allocated by the system to the i-th power domain, Pi is the power consumption in the first cycle corresponding to the i-th power domain, P total is the sum of power consumption corresponding to all power domains, PB total is the total amount of power budget provided by the system; it can be understood that the higher the power consumption of the power domain in the first cycle, the greater the data processing workload performed by the power domain, and more data needs to be allocated to it. According to the power budget, the frequency of its internal processor core is increased, so that the processing speed of the processor core can be increased and the performance of the processor core can be fully utilized.

在第二种可选的方式中,频率控制器可以根据每个电源域所包含的至少一个处理器核在所述第一周期的负载,来为每个电源域分配功率预算;示例性的,可根据以下公式来进行功率预算的分配:In a second optional manner, the frequency controller may allocate a power budget to each power domain based on the load of at least one processor core included in each power domain in the first cycle; for example, The power budget can be allocated according to the following formula:

PB i=(A i/A total)*PB total PB i =(A i /A total )*PB total

其中,PB i为系统为第i个电源域分配的功率裕量,A i为第i个电源域对应的第一周期内的负载,A total为所有电源域对应的负载总和,PB total为系统所提供的功率预算总量;可以理解的,电源域在第一周期内对应的负载越大,则说明该电源域进行的数据处理工作量越大,则需要为其分配更多的功率预算,提高其内部处理器核的频率,这样就可以提高处理器核的处理速度,充分发挥处理器核的性能。 Among them, PB i is the power margin allocated by the system to the i-th power domain, A i is the load in the first cycle corresponding to the i-th power domain, A total is the total load corresponding to all power domains, and PB total is the system The total amount of power budget provided; it can be understood that the greater the load corresponding to the power domain in the first cycle, the greater the data processing workload performed by the power domain, and more power budget needs to be allocated to it. Increasing the frequency of its internal processor core can increase the processing speed of the processor core and give full play to the performance of the processor core.

在第三种可选的方式中,频率控制器可以根据每个电源域包含的至少一个处理器核在所述第二周期内的预测负载,来为每个电源域分配功率预算;示例性的,其所用的公式和 上述第二种可选方式中的公式类似,但A i则变为第i个电源域对应的第二周期内的预测负载,A total为所有电源域对应的预测负载总和,PB total为系统所提供的功率预算总量;可以理解的,预测负载能直接反应各电源域在第二周期内的功率需求,电源域在第二周期内对应的预测负载越大,则说明该电源域将要进行的数据处理工作量越大,则需要为其分配更多的功率预算,提高其内部处理器核的频率,这样就可以提高处理器核的处理速度,充分发挥处理器核的性能。 In a third optional manner, the frequency controller may allocate a power budget to each power domain based on the predicted load of at least one processor core included in each power domain during the second period; exemplary , the formula used is similar to the formula in the second optional method above, but A i becomes the predicted load in the second cycle corresponding to the i-th power domain, and A total is the sum of predicted loads corresponding to all power domains. , PB total is the total power budget provided by the system; it can be understood that the predicted load can directly reflect the power demand of each power domain in the second cycle. The larger the predicted load corresponding to the power domain in the second cycle, the greater the predicted load. The greater the data processing workload that this power domain will perform, the more power budget needs to be allocated to it and the frequency of its internal processor core should be increased. This can increase the processing speed of the processor core and give full play to the capabilities of the processor core. performance.

在第四种可选的方式中,频率控制器可以根据每个电源域所包含的至少一个处理器核在所述第一周期的负载和每个电源域包含的至少一个处理器核在所述第二周期内的预测负载,来为每个电源域分配功率预算,具体的,可以计算二者的指数加权移动平均值EWMA值,根据每个电源域对应的EWMA值,分配功率预算;这样可以结合处理器核的实施状态和预测状态,更合理的分配功率预算。In a fourth optional manner, the frequency controller may be based on the load of at least one processor core included in each power domain in the first cycle and the load of at least one processor core included in each power domain in the first period. The predicted load in the second cycle is used to allocate the power budget to each power domain. Specifically, the exponentially weighted moving average EWMA value of the two can be calculated, and the power budget is allocated based on the EWMA value corresponding to each power domain; this way Combined with the implementation status and predicted status of the processor core, the power budget is allocated more reasonably.

具体的,每个电源域所包含的至少一个处理器核在第一周期的功耗,每个电源域所包含的至少一个处理器核在所述第一周期的负载,和每个电源域包含的至少一个处理器核在所述第二周期内的预测负载可以任意组合,频率控制器可以任意选择一项或多项作为分配功率预算的依据,具体不做限定。Specifically, the power consumption of at least one processor core included in each power domain in the first cycle, the load of at least one processor core included in each power domain in the first cycle, and the power consumption of at least one processor core included in each power domain in the first cycle. The predicted load of at least one processor core in the second period can be combined in any combination, and the frequency controller can arbitrarily select one or more items as the basis for allocating the power budget, and there is no specific limit.

305、频率控制器根据分配的功率预算在第二周期内对所述每个电源域进行频率调节。305. The frequency controller adjusts the frequency of each power domain in the second cycle according to the allocated power budget.

可以理解的,所述第二周期为所述第一周期的下一个周期。当频率控制器为每一个电源域分配好功率裕量后,就根据分配好的功率裕量,调整每个处理器核对应的电源域中的供电电压,然后根据功率预算和供电电压,确定内核对应的最大供电频率,同时根据最大供电频率来不断调整内核对应的工作频率。It can be understood that the second period is the next period of the first period. After the frequency controller allocates power margin to each power domain, it adjusts the power supply voltage in the power domain corresponding to each processor core according to the allocated power margin, and then determines the core based on the power budget and power supply voltage. The corresponding maximum power supply frequency, and the corresponding operating frequency of the core is continuously adjusted according to the maximum power supply frequency.

本申请提供一种功率预算的分配方法,用以根据处理器核的功耗来调节为其分配的功率预算,然后再根据功率预算实施控制处理器核的频率,使得功率预算能得到更合理的分配,满足不同处理器核的需求。更进一步的,该种方式还可以根据功率预算来进行频率调节,这样,调节后的处理器核心能够更加符合其运行状态,提高处理器核心的工作效率。This application provides a power budget allocation method to adjust the power budget allocated to the processor core according to its power consumption, and then controls the frequency of the processor core according to the power budget, so that the power budget can be more reasonable. Allocation to meet the needs of different processor cores. Furthermore, this method can also adjust the frequency according to the power budget. In this way, the adjusted processor core can be more consistent with its operating status and improve the working efficiency of the processor core.

基于图2所示的处理器,图4示例性示出本申请实施例提供的另一种功率预算的分配方法对应的流程示意图,该方法适用于频率控制器,例如图2所示意的频率控制器24。本申请实施例中,处理器的供电方式是pre-die供电方式,即每一个电源域中包括多个处理器内核,处理器为属于同一个电源域的多个处理器共同供电;如图4所示,该方法包括:Based on the processor shown in Figure 2, Figure 4 exemplarily shows a flow chart corresponding to another power budget allocation method provided by an embodiment of the present application. This method is suitable for a frequency controller, such as the frequency control shown in Figure 2 Device 24. In the embodiment of this application, the power supply mode of the processor is a pre-die power supply mode, that is, each power domain includes multiple processor cores, and the processor supplies power to multiple processors belonging to the same power domain; as shown in Figure 4 As shown, the method includes:

401、频率控制器确定多个电源域中每个电源域所包含的多个处理器核在第一周期内处于激活状态的处理器核的个数。401. The frequency controller determines the number of processor cores that are active in the first cycle among the multiple processor cores included in each power domain of the multiple power domains.

在本实施例中,处理器的每个电源域包括多个处理器核,多个处理器核是集体供电的;可以理解的,当处理器核处于激活(超频)状态时,就需要为其提高供电频率,提高内核的性能。示例性的,处理器可以根据每个电源域在当前周期内处于激活状态的内核个数,为每个电源域分配下一周期内的功率裕量,电源域中处于激活状态的内核的个数越多,该电源域所需要分配的功率裕量就越多。In this embodiment, each power domain of the processor includes multiple processor cores, and the multiple processor cores are collectively powered. It can be understood that when the processor core is in an activated (overclocking) state, it is necessary to Increase the power supply frequency and improve the performance of the core. For example, the processor can allocate the power margin in the next cycle to each power domain according to the number of cores in the active state in each power domain in the current cycle. The number of cores in the power domain in the active state is The more, the more power margin needs to be allocated to that power domain.

402、频率控制器确定多个电源域中每个电源域所包含的多个处理器核在第一周期的功耗。402. The frequency controller determines the power consumption in the first cycle of the multiple processor cores included in each power domain of the multiple power domains.

可以理解的,频率控制器仍然可以将每个电源域所包含的多个处理器核在第一周期的功耗,作为分配功率裕量的条件,具体的,该步骤与图3所示实施例中的步骤301类似,具体不做限定。It can be understood that the frequency controller can still use the power consumption of the multiple processor cores included in each power domain in the first cycle as a condition for allocating power margin. Specifically, this step is the same as the embodiment shown in Figure 3 Step 301 in is similar and is not specifically limited.

403、频率控制器根据所述每个电源域所包含的多个处理器核在第一周期内处于激活状态的处理器核的个数和/或所述多个电源域中每个电源域所包含的多个处理器核在第一周期的功耗,将功率预算分配给所述每个电源域。403. The frequency controller adjusts the frequency according to the number of processor cores that are activated in the first cycle among the multiple processor cores included in each power domain and/or the frequency of each power domain in the multiple power domains. Contains the power consumption of multiple processor cores in the first cycle, and allocates the power budget to each of the power domains.

示例性的,在第一种实施方式中,可以根据以下公式来进行功率预算的分配:For example, in the first implementation, the power budget can be allocated according to the following formula:

PB i=(N i/N total)*PB total PB i =(N i /N total )*PB total

其中,PB i为系统为第i个电源域分配的功率裕量,N i为第i个电源域中处于激活状态的处理器的个数,N total为所有电源域对应的处于激活状态的处理器核个数的总和,PB total为系统所提供的功率预算总量。示例性的,在第二种实施方式中,频率控制器可以根据每个电源域所包含的多个处理器核在第一周期内处于激活状态的处理器核的个数和所述多个电源域中每个电源域所包含的多个处理器核在第一周期的功耗,来进行功率预算的分配;即将功率预算分为两部分PB totalA和PB totalB,其中PB totalA用于根据电源域对应平均功耗来进行功率预算的分配,PB totalB用于根据电源域中处于激活状态的内核的个数来进行分配,最后将二者分配的功率预算相加,得到最终分配给电源域的功率预算。 Among them, PB i is the power margin allocated by the system to the i-th power domain, Ni is the number of active processors in the i-th power domain, and N total is the active processing corresponding to all power domains. The total number of processor cores, PB total is the total power budget provided by the system. For example, in the second implementation, the frequency controller may adjust the frequency according to the number of processor cores that are active in the first cycle and the plurality of power supplies. The power consumption of multiple processor cores included in each power domain in the domain in the first cycle is used to allocate the power budget; that is, the power budget is divided into two parts: PB totalA and PB totalB , where PB totalA is used to calculate the power budget according to the power domain. The power budget is allocated corresponding to the average power consumption. PB totalB is used to allocate according to the number of active cores in the power domain. Finally, the power budgets allocated by the two are added together to obtain the final power allocated to the power domain. Budget.

具体的,功率预算的计算公式还可以有多种,只要满足为电源域分配的功率预算与电源域对应的功耗越大,或者激活状态的内核的个数越多呈正相关即可,具体形式不做限定。Specifically, there are many formulas for calculating the power budget, as long as the power budget allocated to the power domain is positively correlated with the greater the power consumption corresponding to the power domain, or the greater the number of activated cores, the specific form is No restrictions.

404、频率控制器根据分配的功率预算在第二周期内对所述每个电源域进行频率调节。404. The frequency controller adjusts the frequency of each power domain in the second cycle according to the allocated power budget.

可以理解的,该步骤与图3所示实施例中的步骤305类似,在此不做赘述。It can be understood that this step is similar to step 305 in the embodiment shown in FIG. 3 and will not be described again.

根据前述方法,图5为本申请实施例提供的频率控制器500的结构示意图,该频率控制器500可以为芯片或电路,比如可设置于处理器中的芯片或电路。该频率控制器500可以对应上述方法中的频率控制器24。该频率控制器500可以实现如图3中所示的任一项或任多项对应的方法的步骤。如图5所示,该频率控制器500可以包括监测电路501和控制电路502。进一步的,该频率控制器500还可以包括总线系统,监测电路501和控制电路502可以通过总线系统连接。且,监测电路501还可以通过总线系统与每个处理器核心的功耗检测器连接,控制电路502还可以通过总线系统与每个处理器核心的频率调节器连接。According to the foregoing method, FIG. 5 is a schematic structural diagram of a frequency controller 500 provided by an embodiment of the present application. The frequency controller 500 may be a chip or a circuit, such as a chip or circuit that may be disposed in a processor. The frequency controller 500 may correspond to the frequency controller 24 in the above method. The frequency controller 500 can implement any one or any corresponding steps of the method shown in FIG. 3 . As shown in FIG. 5 , the frequency controller 500 may include a monitoring circuit 501 and a control circuit 502 . Further, the frequency controller 500 may also include a bus system, and the monitoring circuit 501 and the control circuit 502 may be connected through the bus system. Moreover, the monitoring circuit 501 can also be connected to the power consumption detector of each processor core through the bus system, and the control circuit 502 can also be connected to the frequency regulator of each processor core through the bus system.

本申请实施例中,监测电路501可以确定多个电源域中每个电源域所包含的至少一个处理器核在第一周期的功耗,并发送给控制电路502。对应的,控制电路502可以根据所述每个电源域所包含的至少一个处理器核在第一周期的功耗,将功率预算分配给所述每个电源域,并根据分配的功率预算控制频率调节器进行频率调节。In this embodiment of the present application, the monitoring circuit 501 may determine the power consumption of at least one processor core included in each of the multiple power domains in the first cycle, and send it to the control circuit 502 . Correspondingly, the control circuit 502 may allocate a power budget to each power domain based on the power consumption of at least one processor core included in each power domain in the first cycle, and control the frequency according to the allocated power budget. The regulator performs frequency adjustment.

根据前述方法,图6为本申请实施例提供的另一种频率控制器600的结构示意图,该频率控制器600可以为芯片或电路,比如可设置于处理器中的芯片或电路。该频率控制器600可以对应上述方法中的频率控制器24。该频率控制器600可以实现如图4中所示的任一项或任多项对应的方法的步骤。如图6所示,该频率控制器600可以包括监测电路601和控制电路602。进一步的,该频率控制器600还可以包括总线系统,监测电路601和控制电路602可以通过总线系统连接。且,监测电路601还可以通过总线系统与每个处理器 核心的功耗检测器连接,控制电路602还可以通过总线系统与每个处理器核心的频率调节器连接。According to the foregoing method, FIG. 6 is a schematic structural diagram of another frequency controller 600 provided by an embodiment of the present application. The frequency controller 600 may be a chip or a circuit, such as a chip or circuit that may be disposed in a processor. The frequency controller 600 may correspond to the frequency controller 24 in the above method. The frequency controller 600 can implement any one or any number of corresponding method steps as shown in FIG. 4 . As shown in FIG. 6 , the frequency controller 600 may include a monitoring circuit 601 and a control circuit 602 . Further, the frequency controller 600 may also include a bus system, and the monitoring circuit 601 and the control circuit 602 may be connected through the bus system. Moreover, the monitoring circuit 601 can also be connected to the power consumption detector of each processor core through the bus system, and the control circuit 602 can also be connected to the frequency regulator of each processor core through the bus system.

本申请实施例中,监测电路601可以确定确定多个电源域中每个电源域所包含的多个处理器核在第一周期内处于激活状态的处理器核的个数,并发送给控制电路602。对应的,控制电路602可以每个电源域所包含的多个处理器核在第一周期内处于激活状态的处理器核的个数,将功率预算分配给所述每个电源域,并根据分配的功率预算控制频率调节器进行频率调节。In this embodiment of the present application, the monitoring circuit 601 may determine the number of processor cores that are active in the first cycle among the multiple processor cores included in each power domain in the multiple power domains, and send it to the control circuit. 602. Correspondingly, the control circuit 602 may allocate the power budget to each power domain according to the number of processor cores included in each power domain that are in the active state in the first cycle, and according to the allocation The power budget control frequency regulator performs frequency regulation.

根据前述方法,图7为本申请实施例提供的另一种频率控制器700的结构示意图,该频率控制器700可以为芯片或电路,比如可设置于处理器中的芯片或电路。该频率控制器700可以对应上述方法中的频率控制器24。该频率控制器700可以实现如上图3中所示的任一项或任多项对应的方法的步骤。如图7所示,该频率控制器700可以包括确定单元701、分配单元702和调节单元703。According to the foregoing method, FIG. 7 is a schematic structural diagram of another frequency controller 700 provided by an embodiment of the present application. The frequency controller 700 may be a chip or a circuit, such as a chip or circuit that may be disposed in a processor. The frequency controller 700 may correspond to the frequency controller 24 in the above method. The frequency controller 700 can implement any one or any corresponding steps of the method shown in Figure 3 above. As shown in FIG. 7 , the frequency controller 700 may include a determination unit 701 , a distribution unit 702 and an adjustment unit 703 .

确定单元701,用于确定多个电源域中每个电源域所包含的至少一个处理器核在第一周期的功耗。The determining unit 701 is used to determine the power consumption of at least one processor core included in each power domain in the plurality of power domains in the first cycle.

分配单元702,用于根据所述每个电源域所包含的至少一个处理器核在第一周期的功耗,将功率预算分配给所述每个电源域。The allocation unit 702 is configured to allocate a power budget to each power domain based on the power consumption of at least one processor core included in each power domain in the first cycle.

调节单元703,用于根据分配的功率预算在第二周期内对所述每个电源域进行频率调节,所述第二周期为所述第一周期的下一个周期。The adjustment unit 703 is configured to adjust the frequency of each power domain in a second period according to the allocated power budget, and the second period is the next period of the first period.

在一个可选的实施方式中,所述每个电源域所包含的至少一个处理器核在第一周期的功耗为所述每个电源域所包含的至少一个处理器核在第一周期的实时功耗或者平均功耗。In an optional implementation, the power consumption of at least one processor core included in each power domain in the first cycle is the power consumption of the at least one processor core included in each power domain in the first cycle. Real-time power consumption or average power consumption.

在一个可选的实施方式中,所述频率控制器700还包括计算单元704。In an optional implementation, the frequency controller 700 further includes a calculation unit 704.

所述计算单元704,用于根据所述每个电源域所包含的至少一个处理器核在第一周期的功耗,计算所述每个电源域所包含的至少一个处理器核在所述第一周期的负载。The calculation unit 704 is configured to calculate the power consumption of at least one processor core included in each power domain in the first cycle based on the power consumption of the at least one processor core included in each power domain in the first cycle. one cycle of load.

在一个可选的实施方式中,所述计算单元704,还用于根据所述每个电源域所包含的至少一个处理器核在所述第一周期的负载,预测所述每个电源域包含的至少一个处理器核在所述第二周期内的预测负载。In an optional implementation, the computing unit 704 is further configured to predict, based on the load of at least one processor core included in each power domain in the first cycle, that each power domain contains The predicted load of at least one processor core during the second period.

在一个可选的实施方式中,所述分配单元702,具体用于根据所述每个电源域所包含的至少一个处理器核在第一周期的功耗,所述每个电源域所包含的至少一个处理器核在所述第一周期的负载,和所述每个电源域包含的至少一个处理器核在所述第二周期内的预测负载中的任意一项,将功率预算分配给所述每个电源域。In an optional implementation, the allocating unit 702 is specifically configured to calculate the power consumption of at least one processor core included in each power domain according to the power consumption in the first cycle. The power budget is allocated to any one of the load of at least one processor core in the first period and the predicted load of at least one processor core included in each power domain in the second period. Describe each power domain.

可以理解的是,上述频率控制器700中各个单元的功能可以参考相应方法实施例的实现,此处不再赘述。It can be understood that the functions of each unit in the above frequency controller 700 can be implemented with reference to the corresponding method embodiment, and will not be described again here.

应理解,以上频率控制器700的单元的划分仅仅是一种逻辑功能的划分,实际实现时应理解,以上频率控制器700的单元的划分仅仅是一种逻辑功能的划分,实际实现时可以全部或部分集成到一个物理实体上,也可以物理上分开。本申请实施例中,获取单元701可以由上述图5的监测电路501实现,确定单元702和调节单元703可以由上述图5的控制电路502实现。It should be understood that the above division of the units of the frequency controller 700 is only a division of logical functions. During actual implementation, it should be understood that the above division of the units of the frequency controller 700 is only a division of logical functions. In actual implementation, all of them can be or partially integrated into a physical entity, or physically separate. In this embodiment of the present application, the acquisition unit 701 can be implemented by the monitoring circuit 501 of FIG. 5 , and the determination unit 702 and the adjustment unit 703 can be implemented by the control circuit 502 of FIG. 5 .

根据前述方法,图8为本申请实施例提供的另一种频率控制器800的结构示意图,该频率控制器800可以为芯片或电路,比如可设置于处理器中的芯片或电路。该频率控制器800可以对应上述方法中的频率控制器24。该频率控制器800可以实现如上图4中所示的任一项或任多项对应的方法的步骤。如图8所示,该频率控制器800可以包括确定单元801、分配单元802和调节单元803。According to the foregoing method, FIG. 8 is a schematic structural diagram of another frequency controller 800 provided by an embodiment of the present application. The frequency controller 800 may be a chip or a circuit, such as a chip or circuit that may be disposed in a processor. The frequency controller 800 may correspond to the frequency controller 24 in the above method. The frequency controller 800 can implement any one or more of the corresponding method steps shown in Figure 4 above. As shown in FIG. 8 , the frequency controller 800 may include a determination unit 801 , a distribution unit 802 and an adjustment unit 803 .

确定单元801,用于确定多个电源域中每个电源域所包含的多个处理器核在第一周期内处于激活状态的处理器核的个数。The determining unit 801 is used to determine the number of processor cores that are in an activated state in the first cycle among the multiple processor cores included in each power domain of the multiple power domains.

分配单元802,用于根据所述每个电源域所包含的多个处理器核在第一周期内处于激活状态的处理器核的个数,将功率预算分配给所述每个电源域。The allocation unit 802 is configured to allocate the power budget to each power supply domain according to the number of processor cores in the activated state of the plurality of processor cores included in each power supply domain in the first cycle.

调节单元803,用于根据分配的功率预算在第二周期内对所述每个电源域进行频率调节,所述第二周期为所述第一周期的下一个周期。The adjustment unit 803 is configured to adjust the frequency of each power domain in a second period according to the allocated power budget, and the second period is the next period of the first period.

在一个可选的实施方式中,所述确定单元801,还用于确定所述多个电源域中每个电源域所包含的多个处理器核在第一周期的功耗;In an optional implementation, the determining unit 801 is also used to determine the power consumption in the first cycle of multiple processor cores included in each of the multiple power domains;

所述分配单元802,用于根据所述每个电源域所包含的多个处理器核在第一周期内处于激活状态的处理器核的个数和所述多个电源域中每个电源域所包含的多个处理器核在第一周期的功耗,将功率预算分配给所述每个电源域。The allocating unit 802 is configured to calculate the number of processor cores that are activated in the first cycle according to the number of processor cores included in each power domain and each power domain in the multiple power domains. The power consumption of the included multiple processor cores in the first cycle is allocated to the power budget of each power domain.

可以理解的是,上述频率控制器800中各个单元的功能可以参考相应方法实施例的实现,此处不再赘述。It can be understood that the functions of each unit in the above frequency controller 800 can be implemented with reference to the corresponding method embodiment, and will not be described again here.

应理解,以上频率控制器800的单元的划分仅仅是一种逻辑功能的划分,实际实现时可以全部或部分集成到一个物理实体上,也可以物理上分开。本申请实施例中,获取单元801可以由上述图6的监测电路601实现,确定单元802和调节单元803可以由上述图6的控制电路602实现。It should be understood that the above division of the units of the frequency controller 800 is only a division of logical functions. In actual implementation, they can be fully or partially integrated into a physical entity, or they can also be physically separated. In this embodiment of the present application, the acquisition unit 801 can be implemented by the monitoring circuit 601 of FIG. 6 , and the determination unit 802 and the adjustment unit 803 can be implemented by the control circuit 602 of FIG. 6 .

根据本申请实施例提供的方法,本申请还提供一种计算机程序产品,该计算机程序产品包括:计算机程序代码,当该计算机程序代码在计算机上运行时,使得该计算机执行图1至图4所示实施例中任意一个实施例的方法。According to the method provided by the embodiment of the present application, the present application also provides a computer program product. The computer program product includes: computer program code. When the computer program code is run on a computer, it causes the computer to execute the steps shown in Figures 1 to 4. The method of any one of the embodiments is shown.

根据本申请实施例提供的方法,本申请还提供一种计算机可读存储介质,该计算机可读介质存储有程序代码,当该程序代码在计算机上运行时,使得该计算机执行图1至图5所示实施例中任意一个实施例的方法。According to the method provided by the embodiment of the present application, the present application also provides a computer-readable storage medium. The computer-readable medium stores program code. When the program code is run on a computer, it causes the computer to execute Figures 1 to 5 The method of any of the embodiments shown.

在本说明书中使用的术语“部件”、“模块”、“系统”等用于表示计算机相关的实体、硬件、固件、硬件和软件的组合、软件、或执行中的软件。例如,部件可以是但不限于,在处理器上运行的进程、处理器、对象、可执行文件、执行线程、程序和/或计算机。通过图示,在计算设备上运行的应用和计算设备都可以是部件。一个或多个部件可驻留在进程和/或执行线程中,部件可位于一个计算机上和/或分布在两个或更多个计算机之间。此外,这些部件可从在上面存储有各种数据结构的各种计算机可读介质执行。部件可例如根据具有一个或多个数据分组(例如来自与本地系统、分布式系统和/或网络间的另一部件交互的二个部件的数据,例如通过信号与其它系统交互的互联网)的信号通过本地和/或远程进程来通信。The terms "component", "module", "system", etc. used in this specification are used to refer to computer-related entities, hardware, firmware, a combination of hardware and software, software, or software in execution. For example, a component may be, but is not limited to, a process, a processor, an object, an executable file, a thread of execution, a program and/or a computer running on a processor. Through the illustrations, both applications running on the computing device and the computing device may be components. One or more components can reside in a process and/or thread of execution and a component can be localized on one computer and/or distributed between two or more computers. Additionally, these components can execute from various computer-readable media having various data structures stored thereon. A component may, for example, be based on a signal having one or more data packets (eg, data from two components interacting with another component, a local system, a distributed system, and/or a network, such as the Internet, which interacts with other systems via signals) Communicate through local and/or remote processes.

本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各种说明性逻辑块(illustrative logical block)和步骤(step),能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those of ordinary skill in the art will appreciate that the various illustrative logical blocks and steps described in connection with the embodiments disclosed herein can be implemented as electronic hardware, or a combination of computer software and electronic hardware. accomplish. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Skilled artisans may implement the described functionality using different methods for each specific application, but such implementations should not be considered beyond the scope of this application.

所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, devices and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be described again here.

在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined or can be integrated into another system, or some features can be ignored, or not implemented. On the other hand, the coupling or direct coupling or communication connection between each other shown or discussed may be through some interfaces, and the indirect coupling or communication connection of the devices or units may be in electrical, mechanical or other forms.

所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or they may be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。In addition, each functional unit in each embodiment of the present application can be integrated into one processing unit, each unit can exist physically alone, or two or more units can be integrated into one unit.

所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。If the functions are implemented in the form of software functional units 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 existing technology or the part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including Several instructions are used to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of this application. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk and other media that can store program code. .

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

Claims (22)

一种功率预算的分配方法,其特征在于,所述方法包括:A power budget allocation method, characterized in that the method includes: 确定多个电源域中每个电源域所包含的至少一个处理器核在第一周期的功耗;Determine the power consumption in the first cycle of at least one processor core included in each power domain in the plurality of power domains; 根据所述每个电源域所包含的至少一个处理器核在第一周期的功耗,将功率预算分配给所述每个电源域,以使得所述每个电源域在第二周期内基于分配到的功率预算进行频率调节,所述第二周期为所述第一周期的下一个周期。According to the power consumption of at least one processor core included in each power domain in the first cycle, the power budget is allocated to each power domain, so that each power domain in the second cycle is based on the allocation. Frequency adjustment is performed according to the obtained power budget, and the second period is the next period of the first period. 根据权利要求1所述的方法,其特征在于,所述每个电源域所包含的至少一个处理器核在第一周期的功耗为所述每个电源域所包含的至少一个处理器核在第一周期的实时功耗或者平均功耗。The method of claim 1, wherein the power consumption of at least one processor core included in each power domain in the first cycle is Real-time power consumption or average power consumption in the first cycle. 根据权利要求2所述的方法,其特征在于,所述方法还包括:The method of claim 2, further comprising: 根据所述每个电源域所包含的至少一个处理器核在第一周期的功耗,计算所述每个电源域所包含的至少一个处理器核在所述第一周期的负载。Calculate the load of at least one processor core included in each power domain in the first cycle based on the power consumption of the at least one processor core included in each power domain in the first cycle. 根据权利要求3所述的方法,其特征在于,所述方法还包括:The method of claim 3, further comprising: 根据所述每个电源域所包含的至少一个处理器核在所述第一周期的负载,预测所述每个电源域包含的至少一个处理器核在所述第二周期内的预测负载。According to the load of the at least one processor core included in each power domain in the first cycle, the predicted load of the at least one processor core included in each power domain in the second cycle is predicted. 根据权利要求4所述的方法,其特征在于,所述根据所述每个电源域所包含的至少一个处理器核在第一周期的功耗,将功率预算分配给所述每个电源域,包括:The method of claim 4, wherein the power budget is allocated to each power domain based on the power consumption of at least one processor core included in each power domain in the first cycle, include: 根据所述每个电源域所包含的至少一个处理器核在第一周期的功耗,所述每个电源域所包含的至少一个处理器核在所述第一周期的负载,和所述每个电源域包含的至少一个处理器核在所述第二周期内的预测负载中的任意一项或多项,将功率预算分配给所述每个电源域。According to the power consumption of at least one processor core included in each power domain in the first cycle, the load of the at least one processor core included in each power domain in the first cycle, and the Allocate a power budget to each power domain based on any one or more of the predicted loads of at least one processor core included in each power domain in the second period. 一种功率预算的分配方法,其特征在于,所述方法包括:A power budget allocation method, characterized in that the method includes: 确定多个电源域中每个电源域所包含的多个处理器核在第一周期内处于激活状态的处理器核的个数;Determine the number of processor cores that are active in the first cycle among the multiple processor cores included in each power domain in the multiple power domains; 根据所述每个电源域所包含的多个处理器核在第一周期内处于激活状态的处理器核的个数,将功率预算分配给所述每个电源域,以使得所述每个电源域在第二周期内基于分配到的功率预算进行频率调节,所述第二周期为所述第一周期的下一个周期。According to the number of processor cores in the active state of the multiple processor cores included in each power domain in the first cycle, a power budget is allocated to each power domain such that each power supply domain The domain performs frequency adjustment based on the allocated power budget in a second period, which is a period next to the first period. 根据权利要求6所述的方法,其特征在于,所述方法还包括:The method of claim 6, further comprising: 确定所述多个电源域中每个电源域所包含的多个处理器核在第一周期的功耗;Determine the power consumption in the first cycle of multiple processor cores included in each of the multiple power domains; 所述根据所述每个电源域所包含的多个处理器核在第一周期内处于激活状态的处理器核的个数,将功率预算分配给所述每个电源域,包括:Allocating a power budget to each power domain based on the number of processor cores that are active in the first cycle among the multiple processor cores included in each power domain includes: 根据所述每个电源域所包含的多个处理器核在第一周期内处于激活状态的处理器核的个数和所述多个电源域中每个电源域所包含的多个处理器核在第一周期的功耗,将功率预算分配给所述每个电源域。According to the number of processor cores that are activated in the first cycle and the number of processor cores included in each of the multiple power domains. In the first cycle of power consumption, a power budget is allocated to each of the power domains. 一种频率控制器,其特征在于,包括:A frequency controller, characterized by including: 确定单元,用于确定多个电源域中每个电源域所包含的至少一个处理器核在第一周期 的功耗;Determining unit, used to determine the power consumption in the first cycle of at least one processor core included in each power domain in the plurality of power domains; 分配单元,用于根据所述每个电源域所包含的至少一个处理器核在第一周期的功耗,将功率预算分配给所述每个电源域;An allocation unit configured to allocate a power budget to each power domain based on the power consumption of at least one processor core included in each power domain in the first cycle; 调节单元,用于根据分配的功率预算在第二周期内对所述每个电源域进行频率调节,所述第二周期为所述第一周期的下一个周期。An adjustment unit, configured to perform frequency adjustment on each power domain in a second period according to the allocated power budget, where the second period is the next period of the first period. 根据权利要求8所述的频率控制器,其特征在于,所述每个电源域所包含的至少一个处理器核在第一周期的功耗为所述每个电源域所包含的至少一个处理器核在第一周期的实时功耗或者平均功耗。The frequency controller according to claim 8, wherein the power consumption of at least one processor core included in each power domain in the first cycle is The real-time power consumption or average power consumption of the core in the first cycle. 根据权利要求9所述的频率控制器,其特征在于,所述频率控制器还包括计算单元;The frequency controller according to claim 9, characterized in that the frequency controller further includes a calculation unit; 所述计算单元,用于根据所述每个电源域所包含的至少一个处理器核在第一周期的功耗,计算所述每个电源域所包含的至少一个处理器核在所述第一周期的负载。The calculation unit is configured to calculate the power consumption of at least one processor core included in each power domain in the first cycle based on the power consumption of the at least one processor core included in each power domain in the first cycle. cycle load. 根据权利要求10所述的频率控制器,其特征在于,The frequency controller according to claim 10, characterized in that: 所述计算单元,还用于根据所述每个电源域所包含的至少一个处理器核在所述第一周期的负载,预测所述每个电源域包含的至少一个处理器核在所述第二周期内的预测负载。The computing unit is further configured to predict, based on the load of at least one processor core included in each power domain in the first cycle, the at least one processor core included in each power domain in the first period. Forecasted load over the second period. 根据权利要求8至11任一项所述的频率控制器,其特征在于,The frequency controller according to any one of claims 8 to 11, characterized in that, 所述分配单元,具体用于根据所述每个电源域所包含的至少一个处理器核在第一周期的功耗,所述每个电源域所包含的至少一个处理器核在所述第一周期的负载,和所述每个电源域包含的至少一个处理器核在所述第二周期内的预测负载中的任意一项,将功率预算分配给所述每个电源域。The allocation unit is specifically configured to calculate the power consumption of at least one processor core included in each power domain in the first cycle according to the power consumption of the at least one processor core included in each power domain in the first cycle. The power budget is allocated to each power domain based on any one of the load of the cycle and the predicted load of at least one processor core included in each power domain in the second cycle. 一种频率控制器,其特征在于,所述频率控制器包括:A frequency controller, characterized in that the frequency controller includes: 确定单元,用于确定多个电源域中每个电源域所包含的多个处理器核在第一周期内处于激活状态的处理器核的个数;a determining unit configured to determine the number of processor cores that are active in the first cycle among the multiple processor cores included in each power domain of the plurality of power domains; 分配单元,用于根据所述每个电源域所包含的多个处理器核在第一周期内处于激活状态的处理器核的个数,将功率预算分配给所述每个电源域;An allocation unit configured to allocate the power budget to each power domain according to the number of processor cores in the activated state of the plurality of processor cores included in each power domain in the first cycle; 调节单元,用于根据分配的功率预算在第二周期内对所述每个电源域进行频率调节,所述第二周期为所述第一周期的下一个周期。An adjustment unit, configured to perform frequency adjustment on each power domain in a second period according to the allocated power budget, where the second period is the next period of the first period. 根据权利要求13所述的频率控制器,其特征在于,The frequency controller according to claim 13, characterized in that: 所述确定单元,还用于确定所述多个电源域中每个电源域所包含的多个处理器核在第一周期的功耗;The determining unit is also used to determine the power consumption in the first cycle of the multiple processor cores included in each of the multiple power domains; 所述分配单元,用于根据所述每个电源域所包含的多个处理器核在第一周期内处于激活状态的处理器核的个数和所述多个电源域中每个电源域所包含的多个处理器核在第一周期的功耗,将功率预算分配给所述每个电源域。The allocating unit is configured to determine the number of processor cores in the activated state within the first cycle of the multiple processor cores included in each power domain and the number of processor cores included in each power domain in the multiple power domains. Contains the power consumption of multiple processor cores in the first cycle, and allocates the power budget to each of the power domains. 一种处理器,其特征在于,所述处理器包括处理器核、功耗检测器、功耗控制器和频率调节器;所述功耗检测器和所述频率调节器分别于所述功耗控制器相连;A processor, characterized in that the processor includes a processor core, a power consumption detector, a power consumption controller and a frequency regulator; the power consumption detector and the frequency regulator are respectively located in the power consumption The controller is connected; 所述功耗检测器,用于检测确定多个电源域中每个电源域所包含的至少一个处理器核在第一周期的功耗;The power consumption detector is used to detect and determine the power consumption of at least one processor core included in each power domain in the plurality of power domains in the first cycle; 所述功耗控制器,用于根据所述每个电源域所包含的至少一个处理器核在第一周期的功耗,将功率预算分配给所述每个电源域;The power consumption controller is configured to allocate a power budget to each power domain based on the power consumption of at least one processor core included in each power domain in the first cycle; 所述频率调节器,用于根据分配的功率预算在第二周期内对所述每个电源域进行频率调节,其中,所述第二周期为所述第一周期的下一个周期。The frequency adjuster is configured to adjust the frequency of each power domain in a second period according to the allocated power budget, where the second period is the next period of the first period. 根据权利要求15所述的处理器,其特征在于,所述每个电源域所包含的至少一个处理器核在第一周期的功耗为所述每个电源域所包含的至少一个处理器核在第一周期的实时功耗或者平均功耗。The processor of claim 15, wherein the power consumption of the at least one processor core included in each power domain in the first cycle is Real-time power consumption or average power consumption in the first cycle. 根据权利要求16所述的处理器,其特征在于,所述功耗控制器还用于根据所述每个电源域所包含的至少一个处理器核在第一周期的功耗,计算所述每个电源域所包含的至少一个处理器核在所述第一周期的负载。The processor according to claim 16, wherein the power consumption controller is further configured to calculate the power consumption of each processor core according to the power consumption of at least one processor core included in each power domain in the first cycle. The load of at least one processor core included in each power domain during the first cycle. 根据权利要求17所述的处理器,其特征在于,所述功耗控制器还用于根据所述每个电源域所包含的至少一个处理器核在所述第一周期的负载,预测所述每个电源域包含的至少一个处理器核在所述第二周期内的预测负载。The processor of claim 17, wherein the power consumption controller is further configured to predict the power consumption of the at least one processor core included in each power domain in the first cycle. The predicted load of at least one processor core included in each power domain during the second period. 根据权利要求17所述的处理器,其特征在于,所述功耗控制器具体用于根据所述每个电源域所包含的至少一个处理器核在第一周期的功耗,所述每个电源域所包含的至少一个处理器核在所述第一周期的负载,和所述每个电源域包含的至少一个处理器核在所述第二周期内的预测负载中的任意一项,将功率预算分配给所述每个电源域。The processor according to claim 17, characterized in that the power consumption controller is specifically configured to calculate each power consumption according to the power consumption of at least one processor core included in each power domain in the first cycle. Any one of the load of at least one processor core included in the power domain in the first cycle and the predicted load of at least one processor core included in each power domain in the second cycle will be A power budget is allocated to each power domain. 一种处理器,其特征在于,所述处理器包括处理器核、功耗控制器和频率调节器;所述频率调节器分别于所述功耗控制器相连;A processor, characterized in that the processor includes a processor core, a power consumption controller and a frequency regulator; the frequency regulator is respectively connected to the power consumption controller; 所述功耗控制器,确定多个电源域中每个电源域所包含的多个处理器核在第一周期内处于激活状态的处理器核的个数;根据所述每个电源域所包含的多个处理器核在第一周期内处于激活状态的处理器核的个数,将功率预算分配给所述每个电源域;The power consumption controller determines the number of processor cores that are active in the first cycle among the multiple processor cores contained in each power domain of the plurality of power domains; according to the number of processor cores contained in each power domain The number of processor cores in the active state of the multiple processor cores in the first cycle, and allocate the power budget to each power domain; 所述频率调节器,用于根据分配的功率预算在第二周期内对所述每个电源域进行频率调节,其中,所述第二周期为所述第一周期的下一个周期。The frequency adjuster is configured to adjust the frequency of each power domain in a second period according to the allocated power budget, where the second period is the next period of the first period. 根据权利要求20所述的处理器,其特征在于,所述处理器还包括功耗检测器,所述功耗检测器与所述功耗控制器相连;The processor according to claim 20, wherein the processor further includes a power consumption detector, and the power consumption detector is connected to the power consumption controller; 所述功耗,用于确定所述多个电源域中每个电源域所包含的多个处理器核在第一周期的功耗;The power consumption is used to determine the power consumption of multiple processor cores included in each of the multiple power domains in the first cycle; 所述功耗控制器,具体用于根据所述每个电源域所包含的多个处理器核在第一周期内处于激活状态的处理器核的个数和所述多个电源域中每个电源域所包含的多个处理器核在第一周期的功耗,将功率预算分配给所述每个电源域。The power consumption controller is specifically configured to determine the number of processor cores that are active in the first cycle and the number of processor cores included in each power domain. The power consumption in the first cycle of the multiple processor cores included in the power domain is allocated to each power domain. 一种电子设备,其特征在于,包括若权利要求15至21任一项所述的处理器。An electronic device, characterized by comprising the processor according to any one of claims 15 to 21.
CN202080103358.0A 2020-08-31 2020-08-31 Power budget allocation method and related equipment Pending CN116997878A (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/112688 WO2022041251A1 (en) 2020-08-31 2020-08-31 Power budget allocation method and related device

Publications (1)

Publication Number Publication Date
CN116997878A true CN116997878A (en) 2023-11-03

Family

ID=80354381

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202080103358.0A Pending CN116997878A (en) 2020-08-31 2020-08-31 Power budget allocation method and related equipment

Country Status (2)

Country Link
CN (1) CN116997878A (en)
WO (1) WO2022041251A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN119248464A (en) * 2024-02-28 2025-01-03 荣耀终端有限公司 Power consumption allocation method and terminal

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115357111A (en) * 2022-08-05 2022-11-18 深圳市航顺芯片技术研发有限公司 Control system, method, chip and electronic device

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8984313B2 (en) * 2012-08-31 2015-03-17 Intel Corporation Configuring power management functionality in a processor including a plurality of cores by utilizing a register to store a power domain indicator
US9360906B2 (en) * 2013-05-01 2016-06-07 Advanced Micro Devices, Inc. Power management for multiple compute units
US9625971B2 (en) * 2014-01-10 2017-04-18 Taiwan Semiconductor Manufacturing Company, Ltd. System and method of adaptive voltage frequency scaling
CN105765957A (en) * 2014-03-28 2016-07-13 联发科技股份有限公司 Method and related apparatus for system power control in an electronic device
KR102670999B1 (en) * 2016-12-28 2024-05-30 삼성전자주식회사 Application processor performing dynamic voltage and frequency scaling operation, computing system including the same, and operation method of thereof
CN114816033A (en) * 2019-10-17 2022-07-29 华为技术有限公司 Frequency modulation method and device of processor and computing equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN119248464A (en) * 2024-02-28 2025-01-03 荣耀终端有限公司 Power consumption allocation method and terminal

Also Published As

Publication number Publication date
WO2022041251A1 (en) 2022-03-03

Similar Documents

Publication Publication Date Title
US11579934B2 (en) Scheduler for amp architecture with closed loop performance and thermal controller
US10649935B2 (en) Deferred inter-processor interrupts
GB2544609B (en) Granular quality of service for computing resources
CN110795238B (en) Load calculation method, device, storage medium and electronic equipment
TW201339820A (en) Adaptive voltage scaling using a serial interface
CN104798034B (en) For the method for coordinate frequency, processor and system
US12164355B2 (en) Apparatus and method to reduce standby power for systems in battery mode with a connected bus powered device
CN104049716A (en) Computer energy-saving method and system combined with temperature sensing
KR101655030B1 (en) Dynamic voltage frequency scaling method using slack-distribution based on task-characteristics, execution program thereof method and recorded medium of the program
WO2022099477A1 (en) Power consumption control method and device
CN116997878A (en) Power budget allocation method and related equipment
Xiang et al. Run-time management for multicore embedded systems with energy harvesting
US20150363212A1 (en) Minimizing performance loss on workloads that exhibit frequent core wake-up activity
Lin et al. ARM platform for performance and power efficiency—Hardware and software perspectives
US10539995B2 (en) Performance boosting method and system of semiconductor device
US9529403B2 (en) Method and apparatus for providing telemetry for power management functions
US12222790B2 (en) Power management for Universal Serial Bus (USB) type-C port
US20240061492A1 (en) Processor performing dynamic voltage and frequency scaling, electronic device including the same, and method of operating the same
TW201541803A (en) Portable electronic apparatus and charging control method thereof
WO2013073013A1 (en) Power control device, electronic computer and power control method
WO2016058149A1 (en) Method for predicting utilization rate of processor, processing apparatus and terminal device
CN104657327B (en) The multicore architecture of shared interruption for low-power consumption application
WO2019117962A1 (en) Power control circuitry
US20210057420A1 (en) Method of controlling performance boosting of semiconductor device and semiconductor device performing the method

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