Power consumption control method and device

Through multi-level load monitoring and state machine control of multi-core processors, precise adjustment of the minimum processing unit is achieved, the power consumption management problem of multi-core processors is solved, and the load perception and control accuracy are improved.

CN120687315APending Publication Date: 2025-09-23SANECHIPS TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410295908.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-03-14
Publication Date
2025-09-23

AI Technical Summary

Technical Problem

There is a trade-off between high performance and high energy efficiency in multi-core processors. Existing power consumption optimization strategies cannot accurately perceive load changes, resulting in improper power consumption management.

Method used

By performing multi-level monitoring on the number of load messages in the multi-core network processor, utilizing a combination of hardware and software, and adjusting the state machine, the minimum processing unit can be turned on and off. The state indication of the state machine can be used to control the on and off state of the minimum processing unit, thereby achieving state adjustment of the minimum processing unit.

Benefits of technology

It achieves precise load perception and power consumption control for multi-core processors, is suitable for various complex designs, and improves control accuracy and processor yield.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120687315A_ABST
    Figure CN120687315A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a power consumption control method and device. The method comprises the following steps: carrying out multi-stage monitoring on the number of load messages in a target system; adjusting a state indication of a first-stage state machine of a monitoring target in the target system according to the number of the load messages, wherein the state indication can indicate the closing number of minimum processing units contained in the monitoring target; and / or configuring the closing number of the minimum processing unit according to the number of the load messages and a configuration algorithm; and adjusting the state indication of the second-stage state machine of the minimum processing unit according to the state indication of the first-stage state machine and / or the configuration result, so as to adjust the opening and closing states of the minimum processing unit, and achieve the adjustment of the working mode of the monitoring target. According to the scheme of the embodiment, the number of the load messages is monitored in a multi-level mode, accurate sensing of the number of the load messages is achieved, the problem of introduction of load time-varying characteristics and uncertainty is solved, power consumption control and chip yield improvement are both considered, and scheme reuse under the condition that the number of micro-engines changes is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of communications, and in particular to a power consumption control method and device. Background Art

[0002] Multi-core processors are chips that integrate multiple processing cores. They can execute multiple tasks in parallel, improving computer system performance. However, there is a trade-off between high performance and high energy efficiency in multi-core processors. Power consumption management, in other words, aims to minimize processor energy consumption while meeting performance requirements. Research on power consumption control methods aims to achieve high energy efficiency while maintaining high chip performance. Summary of the Invention

[0003] Embodiments of the present disclosure provide a method and apparatus for controlling power consumption.

[0004] In a first aspect, an embodiment of the present disclosure provides a power consumption control method, the method comprising:

[0005] Perform multi-level monitoring of the number of load messages in the target system;

[0006] Adjusting a state indication of a first-level state machine of a corresponding monitoring target within the target system according to the number of load messages; the state indication of the first-level state machine can indicate a closed number of minimum processing units included in the monitoring target; and / or configuring the closed number of minimum processing units included in the monitoring target according to the number of load messages and a preset configuration algorithm;

[0007] Adjust the state indication of the second-level state machine of the corresponding minimum processing unit according to the adjusted state indication and / or configuration result of the first-level state machine to adjust the on and off state of the minimum processing unit to achieve the working mode adjustment of the monitoring target.

[0008] In a second aspect, an embodiment of the present disclosure provides a power consumption control device, including:

[0009] A monitoring unit configured to perform multi-level monitoring of the number of load messages in the target system;

[0010] a first-level state machine adjustment unit configured to adjust a state indication of a first-level state machine of a monitoring target corresponding to a corresponding monitoring target within the target system according to the number of load messages; the state indication of the first-level state machine being capable of indicating a closed number of minimum processing units included in the monitoring target; and / or configuring the closed number of minimum processing units included in the monitoring target according to the number of load messages and a preset configuration algorithm;

[0011] The second-level state machine adjustment unit is configured to adjust the state indication of the second-level state machine of the corresponding minimum processing unit according to the adjusted state indication and / or configuration result of the first-level state machine, so as to adjust the on and off state of the minimum processing unit to achieve the working mode adjustment of the monitoring target.

[0012] The disclosed embodiment performs multi-level monitoring on the number of load messages in the target system to achieve accurate perception of the load situation of each level of monitoring target, accurately monitors the load bandwidth in the current business scenario, achieves accurate perception of the number of load messages, solves the problem of time-varying and uncertainty introduced by the load, and makes the response to changes in the load data flow faster and more accurate through the multi-level monitoring mechanism. Furthermore, the state indication of the first-level state machine of the monitoring target corresponding to the corresponding monitoring is adjusted according to the number of load messages and / or the number of closed minimum processing units contained in the monitoring target is configured according to the number of load messages and a preset configuration algorithm, so that the monitoring target to be controlled can be represented by the state indication of the state machine based on the hardware structure, and the monitoring target to be controlled can be determined by a configuration algorithm in software form, which can realize the combination of software and hardware, not only realizing the control of the power consumption of the multi-core network processor chip by controlling the working state adjustment of the micro-engine, but also taking into account the improvement of the yield of the multi-core network processor chip. Based on power consumption considerations, software and / or hardware solutions are used to indicate the number of minimum processing units (MPUs) in the monitoring target to be shut down. This approach can address various complex designs of multi-core processors. Specifically, regardless of the number of microengine clusters, microengine groups, or microengines contained in a multi-core processor, multi-level monitoring can be implemented for each microengine cluster and group. Based on the monitoring results (i.e., load increases or decreases), the number of microengines (MPUs) shut down is controlled based on a state machine, and the number of microengine clusters and groups shut down is controlled accordingly. This allows the number of microengines to be shut down to be adjusted based on the actual number of microengines in a multi-core network processor architecture chip. This approach is applicable to multi-core processor architecture chips of varying complexity, expanding the scope of application of the solution. Furthermore, multi-level state machine control is implemented by adjusting the state indication of the corresponding second-level state machine of the minimum processing unit based on the state indication of the adjusted first-level state machine. Through control of the second-level state machine, accurate control of the on and off states of the minimum processing unit is achieved, improving control accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] In the accompanying drawings of the embodiments of the present disclosure:

[0014] Figure 1 A flow chart of the power consumption control method provided in an embodiment of the present disclosure;

[0015] Figure 2A schematic diagram of the structure of a multi-core network processor in related technology;

[0016] Figure 3 A schematic diagram of a method for multi-level monitoring of the number of load messages in a multi-core network processor provided by an embodiment of the present disclosure;

[0017] Figure 4 A schematic diagram of a state indication of a first state machine provided in an embodiment of the present disclosure;

[0018] Figure 5 A schematic diagram of a state indication of a second state machine provided in an embodiment of the present disclosure;

[0019] Figure 6 A schematic diagram of the state indication of the second-level state machine provided in an embodiment of the present disclosure;

[0020] Figure 7 A block diagram of the power consumption control device provided in an embodiment of the present disclosure;

[0021] Figure 8 This is a schematic diagram of an embodiment of the working process of the power consumption control device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0022] In order to enable those skilled in the art to better understand the technical solution of the present disclosure, the communication perception data processing method and computer-readable storage medium provided by the embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.

[0023] The present disclosure will be described more fully hereinafter with reference to the accompanying drawings, but the illustrated embodiments may be embodied in different forms, and the present disclosure should not be construed as limited to the embodiments set forth below. Rather, these embodiments are provided so that the present disclosure will be thorough and complete and will fully understand the scope of the present disclosure to those skilled in the art.

[0024] The accompanying drawings of the embodiments of the present disclosure are used to provide a further understanding of the embodiments of the present disclosure and constitute a part of the specification. Together with the detailed embodiments, they are used to explain the present disclosure and do not constitute a limitation of the present disclosure. The above and other features and advantages will become more apparent to those skilled in the art by describing the detailed embodiments with reference to the accompanying drawings.

[0025] The present disclosure may be described with reference to plan views and / or cross-sectional views by way of ideal schematic views of the present disclosure. Therefore, the exemplary illustrations may be modified according to manufacturing techniques and / or tolerances.

[0026] In the absence of conflict, the various embodiments of the present disclosure and the various features therein may be combined with each other.

[0027] The terms used in this disclosure are only used to describe specific embodiments and are not intended to limit the disclosure. As used in this disclosure, the term "and / or" includes any and all combinations of one or more related enumerated items. As used in this disclosure, the singular forms "a" and "the" are also intended to include plural forms, unless the context clearly indicates otherwise. As used in this disclosure, the terms "comprising" and "made of" specify the presence of the features, wholes, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or groups thereof.

[0028] Unless otherwise defined, all terms (including technical and scientific terms) used in this disclosure have the same meanings as those commonly understood by those skilled in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and this disclosure, and will not be interpreted as having an idealized or overly formal meaning unless expressly defined in this disclosure.

[0029] The present disclosure is not limited to the embodiments shown in the drawings, but includes modifications of the configurations formed based on the manufacturing process. Therefore, the regions illustrated in the drawings have schematic properties, and the shapes of the regions shown in the drawings illustrate the specific shapes of the regions of the elements, but are not intended to be limiting.

[0030] Power consumption optimization for multi-core network processors can be achieved by comprehensively considering both hardware and software optimization techniques. These techniques are generally categorized into two main categories: static power consumption optimization and dynamic power consumption optimization. Static optimization methods primarily reduce chip power consumption during the design phase through methods such as power management, data compression, and low-power model design. Dynamic optimization methods primarily adjust the overall system power consumption based on load conditions during chip operation. Common control methods include dynamic scheduling algorithms, power-aware task partitioning, power-aware load migration, and power-aware cache management. However, current common power consumption optimization strategies face several challenges:

[0031] 1. Challenges Brought by Load Uncertainty: The load in a multi-core processor system is time-varying and uncertain. Current solutions cannot accurately perceive and schedule the load.

[0032] 2. Challenges brought by chip design complexity: The design complexity of multi-core processors continues to increase, and power consumption optimization needs to be comprehensively considered while ensuring that functions and performance are not affected.

[0033] The disclosed embodiment performs multi-level monitoring of the number of load messages in a multi-core network processor to achieve accurate perception of the load conditions of each level of monitoring target, accurately monitors the load bandwidth in the current business scenario, achieves precise perception of the number of load messages, solves the problem of time-varying and uncertainty-introduced loads, and makes the response to changes in load data streams faster and more accurate through a multi-level monitoring mechanism. Furthermore, the state indication of the first-level state machine of the corresponding monitoring target is adjusted according to the number of load messages and / or the number of minimum processing units contained in the monitoring target is configured to be closed according to the number of load messages and a preset configuration algorithm, so that the state indication of the state machine based on the hardware structure can represent the monitoring target to be controlled, and the monitoring target to be controlled can be determined by a configuration algorithm in software form, which can realize the combination of software and hardware, not only realizing the control of the power consumption of the multi-core network processor chip by controlling the working state adjustment of the micro-engine, but also taking into account the improvement of the yield of the multi-core network processor chip. Based on power consumption considerations, software and / or hardware solutions are used to indicate the number of minimum processing units (MPUs) in the monitoring target to be shut down. This approach can address various complex designs of multi-core processors. Specifically, regardless of the number of microengine clusters, microengine groups, or microengines contained in a multi-core processor, multi-level monitoring can be implemented for each microengine cluster and group. Based on the monitoring results (i.e., load increases or decreases), the number of microengines (MPUs) shut down is controlled based on a state machine, and the number of microengine clusters and groups shut down is controlled accordingly. This allows the number of microengines to be shut down to be adjusted based on the actual number of microengines in a multi-core network processor architecture chip. This approach is applicable to multi-core processor architecture chips of varying complexity, expanding the scope of application of the solution. Furthermore, multi-level state machine control is implemented by adjusting the state indication of the corresponding second-level state machine of the minimum processing unit based on the state indication of the adjusted first-level state machine. Through control of the second-level state machine, accurate control of the on and off states of the minimum processing unit is achieved, improving control accuracy.

[0034] The power consumption control method of the embodiment of the present disclosure can be executed by hardware, software, or a combination of hardware and software, and can be executed by any electronic device such as a terminal device or a server. The terminal device may include but is not limited to: an in-vehicle device, a user equipment (UE), a mobile device, a computing device, a wearable device, etc., for example, including but not limited to a cellular phone, a cordless phone, a personal digital assistant (PDA), a portable computer, etc. The voltage drop processing method can be implemented by a processor calling a computer-readable program instruction stored in a memory, or can be implemented by a server;

[0035] The embodiments of the present disclosure may be applicable to, but not limited to, multi-core RTC (real-time clock) architecture-based and network processor chips based on parallel processing architecture in the communications field.

[0036] The following is a detailed introduction to the embodiments of the present disclosure.

[0037] The present disclosure provides a method for controlling power consumption. Figure 1 As shown, the method may include steps S11-S13:

[0038] S11. Perform multi-level monitoring on the number of load messages in the target system.

[0039] In the embodiment of the present disclosure, Figure 2 As shown, the target system may include but is not limited to a multi-core network processor, and the multi-core network processor may include but is not limited to a plurality of micro-engine clusters A, each micro-engine cluster A including a plurality of micro-engine groups (such as Figure 2 As shown in FIG micro-engine group B1, micro-engine group B2, micro-engine group Bn, n is a positive integer), each micro-engine group includes a plurality of micro-engines (such as Figure 2 The microengine C1, microengine C2, and microengine Cm are shown, where m is a positive integer. A microengine is the smallest processing unit in each microengine group. The multi-core network processor may further include a first interactive bus D1 and a second interactive bus D2. After a message is sent to each microengine cluster A of the multi-core network processor, it is scheduled and distributed via the first interactive bus D1. The message is then sent to each microengine group B based on the business scenario or load flow. Then, within the microengine group B, the message is further scheduled and distributed via the second interactive bus D2. The complete message is sent to the designated microengine, which then processes the message according to the microcode instruction and sends it to the next network node.

[0040] In the embodiment of the present disclosure, the power consumption control method of the embodiment of the present disclosure can be implemented based on the power consumption control device 700, and the power consumption control device 700 can be configured with an independent clock source E.

[0041] In the embodiment of the present disclosure, the multi-level monitoring may include but is not limited to: first-level monitoring and second-level monitoring; the monitoring targets of the first-level monitoring may include micro-engine clusters, and the monitoring targets of the second-level monitoring may include micro-engine groups.

[0042] In the embodiment of the present disclosure, the first level of monitoring is to use the micro-engine group in the micro-engine cluster as the control unit to monitor the number of messages entering the entire micro-engine cluster in real time; the second level of monitoring is to use the micro-engines in the micro-engine group as the control unit to monitor the number of messages entering the entire micro-engine group in real time. This can accurately monitor the load bandwidth in the current business scenario, achieve accurate perception of the number of load messages, solve the problems introduced by load time variability and uncertainty, and through the two-level monitoring mechanism, make the response to changes in load data flow faster and more accurate.

[0043] In the embodiment of the present disclosure, the number of load messages may include a first number of load messages and a second number of load messages; the first number of load messages refers to the number of monitored messages entering the entire microengine cluster, and the second number of load messages refers to the number of monitored messages entering the entire microengine group.

[0044] In the embodiment of the present disclosure, Figure 3 As shown, performing multi-level monitoring on the number of load messages in the target system may include steps S21-S22:

[0045] S21, performing first-level monitoring on the number of first load messages of each micro-engine cluster, and performing second-level monitoring on the number of second load messages of each micro-engine group;

[0046] S22. Collect the number of first load messages and the number of second load messages at every preset counting period.

[0047] In the embodiment of the present disclosure, the number of load messages in the target system is monitored at multiple levels, and obtaining the monitoring results of each level of monitoring can be achieved through hardware.

[0048] In the embodiment of the present disclosure, for example, first-level monitoring and second-level monitoring can be performed through an inbound and outbound packet statistics unit of a hardware structure. The inbound and outbound packet statistics unit may include a first inbound and outbound packet statistics unit and a second inbound and outbound packet statistics unit (the hardware structures of the first inbound and outbound packet statistics unit and the second inbound and outbound packet statistics unit may be the same), wherein the first inbound and outbound packet statistics unit performs first-level monitoring on the number of first load messages of each micro-engine cluster, and the second inbound and outbound packet statistics unit performs second-level monitoring on the number of second load messages of each micro-engine group.

[0049] In the embodiments of the present disclosure, the hardware structure of each incoming and outgoing packet statistics unit can be implemented using an existing structure or a combination of existing structures. The detailed structure of the incoming and outgoing packet statistics unit is not limited herein.

[0050] In an embodiment of the present disclosure, for example, a timer unit in a hardware structure can collect the first and second load message quantities at predetermined count intervals. The timer unit can count according to a predetermined count step and generate a control signal (timer_vld) when the total count reaches a predetermined count interval. Based on the control signal, the first and second load message quantities are collected for subsequent adjustment of the operating mode of the monitoring target.

[0051] In the embodiments of the present disclosure, the hardware structure of the timer unit can be implemented using an existing structure or a combination of existing structures. The detailed structure of the timer unit is not limited here.

[0052] In the embodiment of the present disclosure, the first inbound and outbound packet statistics unit and the second inbound and outbound packet statistics unit work independently. Therefore, the first load message number and the second load message number are also calculated separately. The first load message number is obtained based on the control signal generated by the first inbound and outbound packet statistics unit, and the second load message number is obtained based on the control signal generated by the second inbound and outbound packet statistics unit.

[0053] In the embodiment of the present disclosure, the first-level monitoring of the number of first load messages of each micro-engine cluster includes:

[0054] Monitor the incoming and outgoing messages of each micro-engine cluster;

[0055] Each time a message enters the micro-engine cluster, the total first load message count corresponding to the micro-engine cluster is increased by 1. Each time a message is sent out of the micro-engine cluster, the total first load message count corresponding to the micro-engine cluster is reduced by 1. The total first load message count is used as the number of first load messages corresponding to the micro-engine cluster.

[0056] In the embodiment of the present disclosure, the second-level monitoring of the number of second load messages of each micro-engine group includes:

[0057] Monitor the incoming and outgoing messages of each micro-engine group;

[0058] Every time a message enters the micro-engine group, the total second load message count corresponding to the micro-engine group is increased by 1. Every time a message is sent out from the micro-engine group, the total second load message count corresponding to the micro-engine group is reduced by 1, and the total second load message count is used as the number of second load messages corresponding to the micro-engine group.

[0059] In the embodiment of the present disclosure, any inbound and outbound packet statistics unit (for example, the first inbound and outbound packet statistics unit or the second inbound and outbound packet statistics unit) uses the complete message (including the first fragment, the middle fragment, and the tail fragment) as the message counting unit, and the total load message count obtained is subsequently used to indicate the working state switching of the micro engine (i.e., the on and off state switching).

[0060] In the embodiment of the present disclosure, through the design of a two-level monitoring mechanism, hierarchical monitoring and control can be achieved with the micro-engine group as the basic control unit and the micro-engine as the basic control unit.

[0061] S12. Adjust the status indication of the first-level state machine of the corresponding monitoring target in the target system according to the number of load messages; the status indication of the first-level state machine can indicate the closed number of minimum processing units contained in the monitoring target; and / or, configure the closed number of minimum processing units contained in the monitoring target according to the number of load messages and a preset configuration algorithm.

[0062] In an embodiment of the present disclosure, adjusting the state indication of the first-level state machine of the corresponding monitoring target according to the number of load messages includes:

[0063] Checking whether the number of payload packets meets one or more preset thresholds;

[0064] When the number of load messages meets any number threshold, the state indication of the first-level state machine corresponding to the monitoring target is adjusted.

[0065] In the disclosed embodiments, since the number of payload messages includes a first payload message number and a second payload message number, corresponding quantity thresholds can be set for each of the first and second payload message numbers. Furthermore, these quantity thresholds can be one or more, and can be single-level or multi-level, with each level of quantity thresholds including at least one quantity threshold. The quantity thresholds corresponding to the first and second payload message numbers are not specifically defined herein and can be defined based on different business scenarios and actual needs.

[0066] In an embodiment of the present disclosure, the quantity threshold may include a first quantity threshold and a second quantity threshold; when adjusting the status indication of the first-level state machine of the corresponding monitoring target according to the number of load messages, the first load message number can be compared with the first threshold, and the second load message number can be compared with the second threshold.

[0067] In the disclosed embodiment, multi-level monitoring includes first-level monitoring and second-level monitoring. The monitoring targets of the first-level monitoring may include the microengine clusters, and the monitoring targets of the second-level monitoring may include the microengine groups. For these two levels of monitoring targets, the first-level state machine may include two state machines: a first state machine and a second state machine. Each microengine cluster corresponds to a first state machine, and each microengine group corresponds to a second state machine.

[0068] In an embodiment of the present disclosure, a state indication of a first state machine is used to indicate a first operating state of a microengine group in a microengine cluster. The first operating state includes whether each microengine group in the microengine cluster is on or off. The first operating state may indicate the number of microengine groups that are off. Wherein, a microengine group being off means that all microengines in the microengine group are off. Therefore, the state indication of the first state machine may be used to indicate the number of microengine groups in the microengine cluster that are off.

[0069] In an embodiment of the present disclosure, the state indication of the second state machine is used to indicate the second operating state of the microengines in a microengine group; the first operating state includes turning on or off each microengine in the microengine group, and the second operating state can indicate the number of microengines that are turned off; therefore, the state indication of the second state machine can be used to indicate the number of microengines in a microengine group that are turned off.

[0070] In an embodiment of the present disclosure, when the number of load messages meets any number threshold, adjusting the state indication of the first-level state machine corresponding to the monitoring target includes:

[0071] When the number of first load messages meets any first number threshold, the state indication of the first state machine corresponding to the monitored microengine cluster is adjusted and / or the state indication of the second state machine of one or more microengine groups included in the monitored microengine cluster is adjusted.

[0072] In the embodiment of the present disclosure, since the first number of load messages is the number of load messages of a microengine cluster, in order to reasonably reduce the power consumption of the entire microengine cluster, the comparison result of the first number of load messages with the first number threshold can be used as a start condition for adjusting the first-level state machine. That is, the state indication of the first state machine and / or the second state machine in the microengine cluster is adjusted based on the congestion situation of the entire microengine cluster.

[0073] In an embodiment of the present disclosure, the comparison result between the number of first load packets and a first quantity threshold is used as a starting condition for adjusting the first-level state machine. When adjusting the state indication of the first state machine and / or the second state machine, the first quantity threshold can be divided into one or more levels, and each level of quantity thresholds can include one or more quantity thresholds. The following describes an embodiment of the present disclosure using an example in which the first quantity threshold is divided into multiple levels, and each level of quantity thresholds includes multiple quantity thresholds.

[0074] In the embodiment of the present disclosure, the first quantity threshold may include a first magnitude threshold, a second magnitude threshold, and a third magnitude threshold; wherein any one of the first magnitude thresholds is higher than any one of the second magnitude thresholds; and any one of the second magnitude thresholds is higher than any one of the second magnitude thresholds. When comparing the first load message quantity with the first quantity threshold, the comparison may be performed sequentially from a higher magnitude threshold (a magnitude threshold higher than the magnitude threshold) to a lower magnitude threshold (a magnitude threshold lower than the magnitude threshold) based on the load change, or sequentially from a lower magnitude threshold to a higher magnitude threshold. For example, when the first load message quantity of the microengine cluster gradually decreases, the first load message quantity may be compared sequentially from a higher magnitude threshold to a lower magnitude threshold.

[0075] In an embodiment of the present disclosure, different levels of adjustment strength can be set for different magnitude thresholds. For example, first and second levels of adjustment strength (or adjustment quantity) can be set, and the status indication adjustment strength corresponding to the first level can be equal to or higher than the status indication adjustment strength corresponding to the second level.

[0076] In the embodiment of the present disclosure, taking into account both power consumption and processing performance, for example, when the number of first load messages gradually decreases, when the number of first load messages first drops to a high-level threshold, a higher level of regulation intensity (such as the first level) can be set, that is, more micro-engine groups or micro-engines can be shut down at the beginning, and when the number of first load messages gradually drops to a low-level threshold, a lower level of regulation intensity (such as the second level) can be set, that is, the number of shut-down micro-engines is gradually reduced, and fewer micro-engine groups or micro-engines can be shut down.

[0077] In the embodiment of the present disclosure, an embodiment of the present disclosure is given below for different magnitude thresholds and different adjustment intensity levels.

[0078] In an embodiment of the present disclosure, when the number of first load messages meets any first number threshold, adjusting a state indication of a first state machine corresponding to a monitored micro-engine cluster and / or adjusting a state indication of a second state machine of one or more micro-engine groups included in the monitored micro-engine cluster includes:

[0079] When one or more first quantity thresholds are the first magnitude thresholds, and when the number of first load packets reaches any one of the one or more first quantity thresholds, adjusting, within a preset first level, a state indication of a first state machine corresponding to the monitored micro-engine cluster to a state indication corresponding to the first quantity threshold;

[0080] When one or more first quantity thresholds are second magnitude thresholds, and when the number of first load messages reaches any one of the one or more first quantity thresholds, adjusting a state indication of a first state machine corresponding to a monitored micro-engine cluster to a state indication corresponding to the first quantity threshold within a preset second level, wherein the state indicated by the adjusted state indication of the first state machine includes at least one micro-engine group that is not shut down, obtaining a second load message number corresponding to the at least one micro-engine group that is not shut down, and when the second load message number meets any one of the second quantity thresholds, adjusting a state indication of a second state machine of the corresponding micro-engine group, wherein the state indicated by the adjusted state indication of the second state machine includes at least one micro-engine that is not shut down;

[0081] When one or more of the first quantity thresholds are third magnitude thresholds, when the number of first load messages reaches any one of the one or more first quantity thresholds, obtain the second load message number corresponding to at least one micro-engine group that is not shut down, and when the second load message number meets any one of the second quantity thresholds, adjust the state indication of the second state machine of the corresponding micro-engine group, wherein the state indicated by the state indication of the adjusted second state machine includes at least one micro-engine that is not shut down.

[0082] In the disclosed embodiment, the above-described embodiment scheme sets three levels of level thresholds (a first level threshold, a second level threshold, and a third level threshold), and performs a first level adjustment when the number of first load messages reaches the first level threshold. Within this first level, only the state indication of the first state machine is adjusted. The first level threshold includes multiple different number thresholds, each number threshold corresponding to a state indication of the first state machine. Within this first level, when the number of first load messages reaches a certain number threshold, the first state machine is adjusted to the state indication corresponding to the certain number threshold. Since the state indication of the first state machine is used to indicate the first operating state of a microengine group in a microengine cluster, adjusting only the state indication of the first state machine means adjusting only the number of microengine groups that are shut down. That is, within the first level threshold, the microengines can be shut down as a group based on the number of first load messages, without considering which microengines within a microengine group should be shut down or enabled. Instead, the entire group is considered.

[0083] In an embodiment of the present disclosure, a second level of adjustment is performed when the number of first load messages reaches a second level threshold. Within this second level, both the state indication of the first state machine and the state indication of the second state machine can be adjusted. The second level threshold can also include multiple different number thresholds, each number threshold corresponding to a state indication of the first state machine. Within this second level, when the number of first load messages reaches a certain number threshold, the first state machine is adjusted to the state indication corresponding to that number threshold. When adjusting the state indication of the second state machine, the state indication of the second state machine indicates the second operating state of the microengines in a microengine group. Adjusting the state indication of the second state machine refers to adjusting the number of microengines in the microengine group that are shut down. That is, the number of shut down microengines is adjusted accordingly based on the different number thresholds reached by the number of second load messages. It should be noted that to ensure the operating performance of the microengine cluster, all microengines in some microengine groups can be shut down based on power consumption considerations, while at least one microengine in at least one microengine group remains in an operating state. In this embodiment, the adjustment of the state indication of the first state machine is combined with the adjustment of the state indication of the second state machine, thereby adding detailed adjustment and improving control accuracy based on the adjustment of the state indication of the first state machine.

[0084] In the embodiment of the present disclosure, when the number of first load messages reaches the third magnitude threshold, only the state indication of the second state machine of the micro-engine group that is not shut down can be adjusted, that is, only detailed adjustment is performed, further improving the control accuracy.

[0085] In an embodiment of the present disclosure, when the number of second load messages meets any second number threshold, adjusting the state indication of the second state machine of the corresponding micro-engine group includes:

[0086] When the number of the second load messages reaches any one of the one or more second number thresholds, the state indication of the second state machine corresponding to the monitored micro-engine group is adjusted to the state indication corresponding to the second number threshold.

[0087] In the embodiment of the present disclosure, the state indication of the second state machine is adjusted based on the number of second load messages, and the adjustment principle is the same as the adjustment principle of the state indication of the first state machine. In the adjustment process, adjustment can also be performed according to different magnitude thresholds. Different magnitude thresholds can also include one or more second quantity thresholds, and different second quantity thresholds correspond to different adjustment levels to distinguish different adjustment strengths. It should be noted that since the adjustment of the state indication of the second state machine only involves the adjustment of the number of micro-engines in a micro-engine group, the set second quantity threshold can be set without distinguishing the magnitude threshold, and only multiple second quantity thresholds need to be set, and each second quantity threshold can be corresponded to the corresponding state to simplify the solution.

[0088] In the embodiment of the present disclosure, the mediation scheme of the first state machine and the second state machine is described below through detailed embodiments.

[0089] In the embodiment of the present disclosure, Figure 4 As shown, a micro-engine cluster contains four micro-engine groups as an example. Figure 4The indication in is the state indication of the first state machine. Among them, the mode_00 state corresponds to the four micro-engine groups being fully turned on, the mode_01 state corresponds to the closing of one micro-engine group, the mode_10 state corresponds to the closing of two micro-engine groups, and the mode_11 state corresponds to the closing of three micro-engine groups. When the first state machine receives the control signal timer_vld and obtains the first load message quantity pkt_cnt1, it detects which of the preset multi-level thresholds the first load message quantity pkt_cnt1 matches. Assuming that the current first load message quantity pkt_cnt1 is in a decreasing state, when the first load message quantity pkt_cnt1 matches the first level threshold (including the quantity thresholds mode_00_off_cfg and mode_01_off_cfg, mode_00_off_cfg is the quantity threshold corresponding to mode_00, mode_01_off_cfg is the quantity threshold corresponding to mode_01, and mode_00_off_cfg is greater than mode_01_off_cfg), for example, first mode_0 1_off_cfg<pkt_cnt1<mode_00_off_cfg. At this time, the number of first load messages pkt_cnt1 first matches the number threshold of mode_00_off_cfg within the first magnitude threshold, that is, pkt_cnt1<mode_00_off_cfg. At this time, the first state machine first converts the state indication to mode_00 based on the signal condition of timer_vld (received control signal) &&pkt_cnt1<mode_00_off_cfg, that is, indicates that the four micro-engine groups are fully turned on. If the number of first payload packets, pkt_cnt1, continues to decrease, it will reach the mode_01_off_cfg threshold within the first magnitude threshold, i.e., enter the pkt_cnt1 < mode_01_off_cfg state. At this point, the first state machine, based on the signal condition that timer_vld && pkt_cnt1 < mode_01_off_cfg, will switch the state indication to mode_01, indicating that a micro-engine group is shut down. As can be seen from the above, within the first magnitude threshold, the regulation strength is relatively small, and the regulation strength varies according to the different quantity thresholds reached.When the number of first load messages pkt_cnt1 continues to decrease, the number of first load messages pkt_cnt1 will match the number threshold within the second magnitude threshold (in this embodiment, the number threshold within the second magnitude threshold includes only one number threshold, namely, the number threshold of mode_10_off_cfg), that is, it enters the pkt_cnt1<mode_10_off_cfg state. At this time, the first state machine will convert the state indication to mode_10 based on the signal condition of timer_vld&&pkt_cnt1<mode_10_off_cfg, that is, it indicates to shut down the two micro-engine groups, thereby increasing the regulation strength. If the number of first load packets pkt_cnt1 continues to decrease, the number of first load packets pkt_cnt1 will match a number threshold within the third magnitude threshold (in this embodiment, the number threshold within the third magnitude threshold also includes only one number threshold, namely, mode_11_off_cfg), thus entering the pkt_cnt1 < mode_11_off_cfg state. At this point, based on the signal condition that timer_vld && pkt_cnt1 < mode_11_off_cfg, the first state machine switches the state indication to mode_11, indicating that the three micro-engine groups are shut down, further increasing the regulation strength. It should be noted that to ensure the performance of the micro-engine cluster, some micro-engine groups may be shut down based on power consumption considerations, but not all micro-engine groups. At least one micro-engine group remains in operation (whether the micro-engines within the at least one micro-engine group are fully or partially operational depends on the actual business scenario and is not limited here).

[0090] In the embodiment of the present disclosure, when shutting down a micro-engine group, an idle micro-engine group may be shut down first, that is, the micro-engine group with fewer load messages is shut down first.

[0091] In the embodiment of the present disclosure, the above content describes an embodiment of the adjustment process of the first state machine when the number of first load packets pkt_cnt1 gradually decreases. The following provides an embodiment of the adjustment process of the first state machine when the number of first load packets pkt_cnt1 gradually increases.

[0092] In the embodiment of the present disclosure, Figure 4For example, assuming that the current number of first load messages pkt_cnt1 is in a state of gradually increasing from 0, the number of first load messages pkt_cnt1 will first match the number threshold within the third magnitude threshold (in this embodiment, the number threshold within the third magnitude threshold includes only one number threshold, namely, the number threshold of mode_11_on_cfg), that is, enter the pkt_cnt1>mode_11_on_cfg state. At this time, the first state machine will maintain the state indication in the mode_11 state based on the signal condition of pkt_cnt1>mode_11_on_cfg (based on the above embodiment, in other embodiments, if it is not in mode_11 at the beginning, it will switch based on the initial state), that is, instruct to shut down the three micro-engine groups. When the number of first load messages pkt_cnt1 continues to increase, the number of first load messages pkt_cnt1 will match the number threshold within the second magnitude threshold (in this embodiment, the number threshold within the second magnitude threshold also includes only one number threshold, namely, the number threshold of mode_10_on_cfg), that is, it enters the pkt_cnt1>mode_10_on_cfg state. At this time, the first state machine will switch the state indication to mode_10 based on the signal condition of pkt_cnt1>mode_10_on_cfg, that is, it indicates to shut down the two micro-engine groups, thereby increasing the regulation strength. When the number of first payload packets pkt_cnt1 continues to increase, the number of first payload packets pkt_cnt1 will match the first magnitude threshold (including the number thresholds mode_00_on_cfg and mode_01_on_cfg, mode_00_on_cfg is the number threshold corresponding to mode_00, mode_01_on_cfg is the number threshold corresponding to mode_01, and mode_00_on_cfg is greater than mode_01_on_cfg). For example, First, mode_01_on_cfg<pkt_cnt1<mode_00_on_cfg. At this time, the number of first load messages pkt_cnt1 first matches the number threshold of mode_01_on_cfg within the first magnitude threshold, that is, pkt_cnt1>mode_01_on_cfg. At this time, the first state machine first converts the state indication to mode_01 based on the signal condition of pkt_cnt1>mode_01_on_cfg, that is, instructs to shut down a micro-engine group.When the number of first load messages pkt_cnt1 continues to increase, the number of first load messages pkt_cnt1 will match the mode_00_on_cfg quantity threshold within the first magnitude threshold, that is, enter the pkt_cnt1>mode_00_on_cfg state. At this time, the first state machine will convert the state indication to mode_00 based on the signal condition of pkt_cnt1>mode_00_on_cfg, that is, indicate that all four micro-engine groups are fully turned on.

[0093] In the embodiment of the present disclosure, Figure 5 As shown, a micro-engine group contains four micro-engines as an example. Figure 5The indication in FIG represents the state of the second state machine. The mode_000 state corresponds to all four microengines in a microengine group being enabled, the mode_001 state corresponds to one microengine in the microengine group being disabled, the mode_010 state corresponds to two microengines in the microengine group being disabled, the mode_011 state corresponds to three microengines in the microengine group being disabled, and the mode_100 state corresponds to four microengines in the microengine group being disabled. When the second state machine receives the control signal timer_vld and obtains the second load message quantity pkt_cnt2, it detects whether the second load message quantity pkt_cnt2 matches one of a plurality of preset second quantity thresholds. Assuming that the current second load message quantity pkt_cnt2 is in a decreasing state, if the second load message quantity pkt_cnt2 first matches the second quantity threshold mode_000_off_cfg, that is, pkt_cnt2<mode_000_off_cfg, then the second state machine will convert the state indication to mode_000 based on the signal condition of timer_vld (received control signal) &&pkt_cnt2<mode_000_off_cfg, that is, indicate that all four micro engines are fully turned on. When the second load message number pkt_cnt2 continues to decrease, the second load message number pkt_cnt2 will match the second number threshold of mode_001_off_cfg, that is, enter the pkt_cnt2<mode_001_off_cfg state. At this time, the second state machine will switch the state indication to mode_001 based on the signal condition of timer_vld&&pkt_cnt2<mode_001_off_cfg, that is, indicate to shut down a micro engine. When the number of second load messages pkt_cnt2 continues to decrease, the number of second load messages pkt_cnt2 will match the second number threshold of mode_010_off_cfg, that is, enter the pkt_cnt2<mode_010_off_cfg state. At this time, the second state machine will switch the state indication to mode_010 based on the signal condition of timer_vld&&pkt_cnt2<mode_010_off_cfg, that is, instruct to shut down the two micro engines, thereby increasing the regulation strength.When the number of second load messages pkt_cnt2 continues to decrease, the number of second load messages pkt_cnt2 will match the second number threshold of mode_011_off_cfg, that is, enter the pkt_cnt2<mode_011_off_cfg state. At this time, the second state machine will switch the state indication to mode_011 based on the signal condition of timer_vld&&pkt_cnt2<mode_011_off_cfg, that is, instruct to shut down the three micro engines, further increasing the regulation strength. When the number of second load messages pkt_cnt2 continues to decrease, the number of second load messages pkt_cnt2 will match the second number threshold of mode_100_off_cfg, that is, enter the pkt_cnt2<mode_100_off_cfg state. At this time, it can be determined whether to continue state adjustment based on the working conditions of other micro-engine groups. If at least one micro-engine group is still working, the second state machine will switch the state indication to mode_100 based on the signal condition of timer_vld&&pkt_cnt2<mode_100_off_cfg, that is, instruct to shut down four micro-engines, further increasing the adjustment strength.

[0094] In the embodiment of the present disclosure, it is important to note that if it is detected that all other micro-engine groups have been shut down and only the last micro-engine group is left working, the second state machine corresponding to the last micro-engine group will no longer be adjusted after adjusting to the mode_011 state, and the mode_100 state will not appear, ensuring that at least one micro-engine remains in the working state. That is, in this case, the state indication of the second state machine can only be adjusted to mode_011.

[0095] In the embodiment of the present disclosure, when shutting down a micro-engine, an idle micro-engine may be shut down first, that is, the micro-engine with fewer load messages is shut down first.

[0096] In the embodiment of the present disclosure, Figure 5For example, assuming that the current second load message number pkt_cnt2 is in a state of gradually increasing from 0, the second load message number pkt_cnt2 will first match the second number threshold of mode_100_on_cfg, that is, enter the pkt_cnt2>mode_100_on_cfg state. At this time, the second state machine will maintain the state indication in mode_100 or mode_011 based on the signal condition of pkt_cnt2>mode_100_on_cfg (based on the above embodiment, in other embodiments, if it is not in mode_100 or mode_011 at the beginning, it will switch based on the initial state), that is, instruct to shut down three or four micro engines. If the second load message number pkt_cnt2 continues to increase, it will match the mode_011_on_cfg threshold, i.e., enter the pkt_cnt2>mode_011_on_cfg state. At this point, the second state machine will transition its state indication to mode_011 or remain in mode_011 based on the pkt_cnt2>mode_011_on_cfg signal condition, indicating that the three microengines are shut down, thus increasing the regulation strength. If the second load message number pkt_cnt2 continues to increase, it will match the mode_010_on_cfg threshold, i.e., enter the pkt_cnt2>mode_010_on_cfg state. At this point, the second state machine will transition its state indication to mode_010 based on the pkt_cnt2>mode_010_on_cfg signal condition, indicating that the two microengines are shut down. If the second load message number pkt_cnt2 continues to increase, the second load message number pkt_cnt2 will match the second number threshold of mode_001_on_cfg, that is, pkt_cnt2>mode_001_on_cfg. At this time, the second state machine will switch the state indication to mode_001 based on the signal condition of pkt_cnt2>mode_001_on_cfg, that is, instructing to shut down one microengine. If the second load message number pkt_cnt2 continues to increase, the second load message number pkt_cnt2 will match the second number threshold of mode_000_on_cfg, that is, enter the pkt_cnt2>mode_000_on_cfg state. At this time, the second state machine will switch the state indication to mode_000 based on the signal condition of pkt_cnt2>mode_000_on_cfg, that is, instructing to turn on all four microengines.

[0097] In the disclosed embodiments, the above-described embodiments enable the first state machine and the second state machine to perform state transitions based on the number of load messages. If the number of load messages decreases to a corresponding threshold within a certain period of time, a mode transition is performed, switching each microengine group (via the first state machine) or microengine (via the second state machine) to an off state. Once the number of load messages increases to a corresponding threshold, a mode transition is immediately performed, switching each microengine group (via the first state machine) or microengine (via the second state machine) to an on state. If the number of microengines in the chip changes, the state machine (the first state machine and / or the second state machine) can be modified based on actual needs to adjust the number of off microengines corresponding to different states, fully demonstrating the reusability of the disclosed embodiments.

[0098] In the embodiment of the present disclosure, after the state indication of the first-level state machine is adjusted, a clock gated off request clock_off_en may be sent to instruct the second-level state machine to adjust the state indication.

[0099] In the embodiments of the present disclosure, the above solutions are all implemented based on hardware, for example, a clock switching indication unit and a first-level state machine (including a first state machine and a second state machine) based on a hardware structure.

[0100] In an embodiment of the present disclosure, the clock switching indication unit can be a unit for acquiring control signals and the number of load messages. The clock switching indication unit can be set to acquire the control signal generated by the timer unit in each counting cycle, and control the first-level state machine according to the control signal to adjust the state indication of the first-level state machine of the corresponding monitoring target according to the number of load messages.

[0101] In the embodiments of the present disclosure, the detailed hardware structures of the clock switching indication unit and the first-level state machine are not limited.

[0102] In the embodiment of the present disclosure, configuring the shutdown number of minimum processing units included in the monitoring target according to the number of load messages and a preset configuration algorithm is a monitoring target working state adjustment method implemented based on software.

[0103] In an embodiment of the present disclosure, the configuration algorithm may include but is not limited to: directly corresponding the range of different load message numbers to different micro-engine groups and / or the number of micro-engines to be shut down, and based on the corresponding relationship, implementing software configuration of the number of minimum processing units to be shut down to obtain corresponding configuration results.

[0104] In the embodiment of the present disclosure, the software solution can be implemented by relying on a control chip. The control chip may include:

[0105] one or more processors;

[0106] A memory having one or more programs stored thereon, wherein when the one or more programs are executed by one or more processors, the one or more processors configure the shutdown number of the minimum processing units included in the monitoring target according to the number of load messages and a preset configuration algorithm;

[0107] One or more input / output (I / O) interfaces are connected between the processor and the memory and configured to implement information exchange between the processor and the memory.

[0108] In the disclosed embodiments, either the hardware adjustment solution or the software adjustment solution can be used, or both can be implemented together. Compared to a single hardware adjustment solution or a single software adjustment solution, the combined implementation of both solutions not only controls the power consumption of the multi-core network processor chip by controlling the operating state switching of the micro-engine cores, but also improves the yield of the multi-core network processor chip.

[0109] S13. Adjust the state indication of the second-level state machine of the corresponding minimum processing unit according to the state indication and / or configuration result of the adjusted first-level state machine to adjust the on and off states of the minimum processing unit to adjust the working mode of the monitoring target.

[0110] In the embodiment of the present disclosure, the minimum processing unit may be a microengine, and each microengine may correspond to a second-level state machine.

[0111] In the embodiment of the present disclosure, after the state indication of the first-level state machine is adjusted through the above-mentioned step S12, the state indication of the second-level state machine can be adjusted based on the state indication and / or configuration result of the adjusted first-level state machine in step S13.

[0112] In the embodiment of the present disclosure, the second-level state machine of each microengine is used to adjust the on or off state of the microengine.

[0113] In the embodiment of the present disclosure, adjusting the state indication of the second-level state machine of the corresponding minimum processing unit according to the adjusted state indication and / or configuration result of the first-level state machine may include:

[0114] Determining, based on the state indication and / or configuration result of the adjusted first-level state machine, a monitoring target for which an operating mode adjustment is required, and one or more minimum processing units in the monitoring target for which a state adjustment is required;

[0115] Based on a preset gated clock off request, when the minimum processing unit is in a working state, the state indication of the second-level state machine of the minimum processing unit is adjusted to the clock off state to shut down the minimum processing unit; or, when the minimum processing unit is in a shut-down state, the state indication of the second-level state machine of the minimum processing unit is adjusted to the clock on state to turn on the minimum processing unit; wherein the clock off state and the clock on state refer to the shut-down state and the on state of the clock corresponding to the minimum processing unit.

[0116] In the embodiment of the present disclosure, the following describes how to adjust the state indication of the second-level state machine of the microengine through a detailed embodiment.

[0117] In the embodiment of the present disclosure, Figure 6The figure shows a schematic diagram of the state indications of the second-level state machine. After adjusting the state indication of the first-level state machine in step S12, a gated clock off request (clock_off_en) can be sent to instruct the second-level state machine to adjust its state indication. If the state indication of the second-level state machine is initially in the working state, upon receiving the gated clock off request (clock_off_en), the state enters the schedule_dis state (which can be called the pre-disablement state, which can be a configured intermediate state). At this time, the arb_req (grant signal) is pulled low, and the mask of the corresponding message scheduling ready signal is pulled low, and authorization begins to stop. Next, the state enters the schedule_null (which can be a configured standby state) and schedule_ack (which can be another configured standby state) in sequence to wait (for example, waiting for processing of unprocessed messages). At this time, it can be determined whether authorization is still available. If the current unit no longer authorizes, a grand signal (grant limit) can be sent after all messages are processed. Based on this grand signal, the state enters the pkt_empty state (empty packet state). In the pkt_empty state, if the clock gated shutdown request clock_off_en is no longer valid, for example, a new message suddenly enters, the system enters the schedule_en state (starting working state). In the pkt_empty state, if the clock gated shutdown request clock_off_en continues to be valid, a pkt_is_empty signal (empty packet signal) can be sent. If there is no message being processed in the pipeline at this time, the system enters the clk_off state (clock off state) and shuts down (or shuts down) the clock of the corresponding micro-engine. This indicates that the current micro-engine has been shut down, and then enters the sleep state (sleep state). This state serves as a transition state until the corresponding clock gated shutdown request clock_off_en is pulled up, then the system enters the clk_on state (clock on state) and turns on the clock of the corresponding micro-engine. This indicates that the current micro-engine has been restarted, and then enters the schedule_en state. At this time, the clock is authorized to be turned on, and then the system enters the working state for normal operation. When entering the clk_off state, a clk_gate_en signal (regarded as a clock control signal) may be issued to control the shut-down action of the corresponding clock of the micro-engine.

[0118] In the embodiment of the present disclosure, the various states in the second-level state machine described above are only one embodiment of the present disclosure. In other embodiments, other states may be set as long as the micro-engine can be turned off and on.

[0119] In the embodiment of the present disclosure, the state indication adjustment of the second-level state machine can be implemented based on a hardware structure, for example, based on a clock switching control unit and a second state machine.

[0120] The clock switching control unit can be configured to receive the clock switching indication unit and the first-level state machine of the hardware structure, or the clock shutdown request valid signal sent after the control chip implemented based on the software adjusts the status indication of the first-level state machine, and controls the second-level state machine (for example, it can be a third state machine, which is the state machine corresponding to each micro-engine) to adjust the status indication of the second-level state machine of the corresponding minimum processing unit according to the clock shutdown request valid signal and the status indication of the adjusted first-level state machine, so as to adjust the on and off status of the minimum processing unit and realize the adjustment of the working mode of the monitored target.

[0121] The embodiment of the present disclosure also provides a power consumption control device 700, such as Figure 7 Shown, including:

[0122] Monitoring module 701, configured to perform multi-level monitoring of the number of load messages in the target system;

[0123] A first adjustment module 702 is configured to adjust a state indication of a first-level state machine of a corresponding monitoring target within a target system according to the number of load messages; the first-level state machine is used to indicate the number of minimum processing units included in the monitoring target to be closed; and / or configure the number of minimum processing units included in the monitoring target to be closed according to the number of load messages and a preset configuration algorithm;

[0124] The second adjustment module 703 is configured to adjust the state indication of the second-level state machine of the corresponding minimum processing unit according to the state indication and / or configuration result of the adjusted first-level state machine, so as to adjust the on and off states of the minimum processing unit and realize the adjustment of the working mode of the monitoring target.

[0125] In an embodiment of the present disclosure, the target system includes a multi-core network processor, the multi-core network processor includes multiple microengine clusters, each microengine cluster includes multiple microengine groups, and each microengine group includes multiple microengines; the multi-level monitoring includes: first-level monitoring and second-level monitoring; the monitoring targets of the first-level monitoring include the microengine clusters, and the monitoring targets of the second-level monitoring include the microengine groups; the number of load messages includes a first load message number and a second load message number;

[0126] The monitoring module 701 includes: an inbound and outbound packet statistics unit 7011 and a timer unit 7012;

[0127] The inbound and outbound packet statistics unit 7011 is configured to perform a first-level monitoring of the number of first load packets of each micro-engine cluster and a second-level monitoring of the number of second load packets of each micro-engine group;

[0128] The timer unit 7012 is configured to collect the number of first load messages and the number of second load messages every preset counting period.

[0129] In the embodiment of the present disclosure, the first adjustment module 702 includes: a clock switching indication unit 7021 and a first-level state machine 7022;

[0130] The clock switching indication unit 7021 is configured to collect the control signal generated by the timer unit 7012 in each counting cycle, and controls the first-level state machine 7022 to adjust the state indication of the first-level state machine of the corresponding monitoring target according to the number of load messages according to the control signal.

[0131] In the embodiment of the present disclosure, the first adjustment module 702 includes: a control chip 7023; the control chip 7023 includes:

[0132] one or more processors;

[0133] A memory having one or more programs stored thereon, wherein when the one or more programs are executed by one or more processors, the one or more processors configure the shutdown number of the minimum processing units included in the monitoring target according to the number of load messages and a preset configuration algorithm;

[0134] One or more input / output (I / O) interfaces are connected between the processor and the memory and configured to implement information exchange between the processor and the memory.

[0135] In the embodiment of the present disclosure, the second adjustment module 703 includes: a clock switching control unit 7031 and a second-level state machine 7032;

[0136] The clock switching control unit 7031 is configured to receive a clock shutdown request valid signal sent by the first adjustment module 702 after the adjustment of the status indication of the first-level state machine is completed, and control the second-level state machine of the corresponding minimum processing unit to adjust the status indication according to the clock shutdown request valid signal and the status indication of the adjusted first-level state machine, and / or receive a clock shutdown request valid signal sent by the first adjustment module 702 after obtaining the configuration result, and control the second-level state machine 7032 of the corresponding minimum processing unit to adjust the status indication according to the clock shutdown request valid signal and the configuration result, so as to adjust the on and off status of the minimum processing unit and realize the adjustment of the working mode of the monitoring target.

[0137] In the embodiments of the present disclosure, any of the aforementioned method embodiments can be applied to actual examples of the device and will not be described in detail here.

[0138] In the embodiment of the present disclosure, Figure 8As shown, the following is an embodiment of the working process of the power consumption control device 700 of the present disclosure: first, the clock source E of the power consumption control device 700 is started, the power consumption control device is started, the inbound and outbound packet statistics unit 7011 counts the number of load messages, the timer unit 7012 counts and sends a control signal when the timing cycle is reached, and the number of load messages is collected. Based on the number of load messages, the number of minimum processing units of the monitored target can be adjusted by hardware, that is, the clock switching indication unit 7021 obtains the number of load messages and the control signal, and instructs the first-level state machine 7022 to adjust the state indication. The first-level state machine 7022 adjusts the state indication to adjust the number of closed minimum processing units; based on the number of load messages, the number of minimum processing units of the monitored target can also be adjusted by software configuration, that is, based on the preset program, the control chip 7023 configures the number of closed minimum processing units according to the number of load messages and the control signal; hardware adjustment and software configuration can also be implemented together. The clock switching control unit 7031 receives the gated clock off request clock_off_en sent by the first-level state machine 7022 and / or the control chip 7023, and based on the signal instructs the second-level state machine 7032 to adjust the state indication. The second-level state machine 7032 adjusts the state indication and sends a clk_gate_en signal to control the corresponding clock to be turned off, thereby turning off the corresponding micro engine.

[0139] Those skilled in the art will appreciate that all or some of the functional modules / units disclosed above may be implemented as software, firmware, hardware, or a suitable combination thereof.

[0140] In hardware implementations, the division between functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be performed by several physical components in cooperation.

[0141] Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit (CPU), a digital signal processor, or a microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium). As is well known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, random access memory (RAM, more specifically SDRAM, DDR, etc.), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory (FLASH) or other disk storage; compact disc (CD-ROM), digital versatile disc (DVD) or other optical disc storage; magnetic cassettes, tapes, disk storage or other magnetic storage; any other medium that can be used to store desired information and can be accessed by a computer. Furthermore, as is well known to those skilled in the art, communication media typically embodies computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.

[0142] The present disclosure has disclosed example embodiments, and although specific terms are employed, they are used and should be interpreted only in a general illustrative sense and not for purposes of limitation. In some instances, it will be apparent to those skilled in the art that, unless otherwise expressly indicated, features, characteristics, and / or elements described in conjunction with a particular embodiment may be used alone or in combination with features, characteristics, and / or elements described in conjunction with other embodiments. Therefore, it will be understood by those skilled in the art that various changes in form and detail may be made without departing from the scope of the present disclosure as set forth in the appended claims.

Claims

1. A power consumption control method, characterized in that: The method comprises: Perform multi-level monitoring of the number of load messages in the target system; Adjusting a state indication of a first-level state machine of a corresponding monitoring target within the target system according to the number of load messages; the state indication of the first-level state machine can indicate a closed number of minimum processing units included in the monitoring target; and / or configuring the closed number of minimum processing units included in the monitoring target according to the number of load messages and a preset configuration algorithm; According to the adjusted state indication and / or configuration result of the first-level state machine, the state indication of the second-level state machine of the corresponding minimum processing unit is adjusted to adjust the on and off states of the minimum processing unit to achieve the working mode adjustment of the monitoring target.

2. The power consumption control method according to claim 1, wherein: The target system includes a multi-core network processor, the multi-core network processor includes a plurality of micro-engine clusters, each of the micro-engine clusters includes a plurality of micro-engine groups, and each of the micro-engine groups includes a plurality of micro-engines; The multi-level monitoring includes: first-level monitoring and second-level monitoring; the monitoring target of the first-level monitoring includes the micro-engine cluster, and the monitoring target of the second-level monitoring includes the micro-engine group; the number of load messages includes a first load message number and a second load message number; The multi-level monitoring of the number of load messages in the target system includes: Performing first-level monitoring on the number of first load messages of each micro-engine cluster, and performing second-level monitoring on the number of second load messages of each micro-engine group; The number of the first load messages and the number of the second load messages are collected at every preset counting period.

3. The power consumption control method according to claim 2, wherein: The first-level monitoring of the number of first load messages of each micro-engine cluster includes: monitoring incoming and outgoing messages of each of the micro-engine clusters; Each time a message enters the micro-engine cluster, the total first load message count corresponding to the micro-engine cluster is increased by 1. Each time a message is sent out of the micro-engine cluster, the total first load message count corresponding to the micro-engine cluster is reduced by 1. The total first load message count is used as the number of first load messages corresponding to the micro-engine cluster.

4. The power consumption control method according to claim 2, wherein: The performing second-level monitoring on the number of second load messages of each micro-engine group includes: Monitoring incoming and outgoing messages of each micro-engine group; Each time a message enters the micro-engine group, the total second load message count corresponding to the micro-engine group is increased by 1. Each time a message is sent out from the micro-engine group, the total second load message count corresponding to the micro-engine group is reduced by 1. The total second load message count is used as the number of second load messages corresponding to the micro-engine group.

5. The power consumption control method according to claim 1, wherein: The adjusting the state indication of the first-level state machine of the corresponding monitoring target in the target system according to the number of the load messages includes: Detecting whether the number of the load messages meets one or more preset number thresholds; When the number of the load messages meets any one of the number thresholds, the state indication of the first-level state machine corresponding to the monitoring target is adjusted.

6. The power consumption control method according to claim 5, characterized in that: The target system includes a multi-core network processor, the multi-core network processor includes a plurality of micro-engine clusters, each of the micro-engine clusters includes a plurality of micro-engine groups, and each of the micro-engine groups includes a plurality of micro-engines; The multi-level monitoring includes: first-level monitoring and second-level monitoring; the monitoring target of the first-level monitoring includes the micro-engine cluster, and the monitoring target of the second-level monitoring includes the micro-engine group; the number of load messages includes a first number of load messages and a second number of load messages; the number threshold includes a first number threshold and a second number threshold; the first-level state machine includes: a first state machine and a second state machine; When the number of the load messages meets any one of the number thresholds, adjusting the state indication of the first-level state machine corresponding to the monitoring target includes: When the number of the first load messages meets any one of the first number thresholds, adjusting a state indication of a first state machine corresponding to the monitored microengine cluster and / or adjusting a state indication of a second state machine of one or more microengine groups included in the monitored microengine cluster; The state indication of the first state machine is used to indicate the number of shut down microengine groups in a microengine cluster, and the state indication of the second state machine is used to indicate the number of shut down microengines in a microengine group.

7. The power consumption control method according to claim 6, wherein: The first quantity threshold comprises a first magnitude threshold, a second magnitude threshold, and a third magnitude threshold; When the number of the first load messages meets any one of the first number thresholds, adjusting the state indication of the first state machine corresponding to the monitored micro-engine cluster and / or adjusting the state indication of the second state machine of one or more micro-engine groups included in the monitored micro-engine cluster includes: When one or more of the first quantity thresholds are the first magnitude thresholds, and when the number of the first load messages reaches any one of the one or more first quantity thresholds, adjusting a state indication of a first state machine corresponding to the monitored microengine cluster to a state indication corresponding to the first quantity threshold within a preset first level; When one or more of the first quantity thresholds are the second magnitude thresholds, and when the number of the first load messages reaches any one of the one or more first quantity thresholds, adjusting the state indication of the first state machine corresponding to the monitored micro-engine cluster to the state indication corresponding to the first quantity threshold within a preset second level, wherein the state indicated by the adjusted state indication of the first state machine includes at least one micro-engine group that is not shut down, obtaining the second load message number corresponding to the at least one micro-engine group that is not shut down, and when the second load message number meets any one of the second quantity thresholds, adjusting the state indication of the second state machine of the corresponding micro-engine group, wherein the state indicated by the adjusted state indication of the second state machine includes at least one micro-engine that is not shut down; When one or more of the first quantity thresholds are the third magnitude thresholds, and when the number of the first load messages reaches any one of the one or more first quantity thresholds, obtaining the number of the second load messages corresponding to at least one of the micro-engine groups that is not shut down, and when the number of the second load messages meets any one of the second quantity thresholds, adjusting the state indication of the second state machine of the corresponding micro-engine group, wherein the state indicated by the adjusted state indication of the second state machine includes at least one micro-engine that is not shut down; Among them, any quantity threshold in the first magnitude threshold is higher than any quantity threshold in the second magnitude threshold; any quantity threshold in the second magnitude threshold is higher than any quantity threshold in the second magnitude threshold; the status indication adjustment strength corresponding to the first level is higher than or equal to the status indication adjustment strength corresponding to the second level.

8. The power consumption control method according to claim 7, wherein: When the number of the second load messages meets any one of the second number thresholds, adjusting the state indication of the second state machine of the corresponding micro-engine group includes: When the number of the second load messages reaches any one of the one or more second number thresholds, the state indication of the second state machine corresponding to the monitored micro-engine group is adjusted to the state indication corresponding to the second number threshold.

9. The power consumption control method according to claim 1, wherein: The adjusting the state indication of the second-level state machine of the corresponding minimum processing unit according to the adjusted state indication and / or configuration result of the first-level state machine includes: Determining, according to the adjusted state indication and / or configuration result of the first-level state machine, a monitoring target for which an operating mode adjustment is required, and one or more minimum processing units in the monitoring target for which a state adjustment is required; Based on a preset gated clock shutdown request, when the minimum processing unit is in a working state, the state indication of the second-level state machine of the minimum processing unit is adjusted to the clock shutdown state to shut down the minimum processing unit; or, when the minimum processing unit is in a shutdown state, the state indication of the second-level state machine of the minimum processing unit is adjusted to the clock on state to turn on the minimum processing unit; wherein, the clock off state and the clock on state refer to the off state and on state of the clock corresponding to the minimum processing unit.

10. A power consumption control device, characterized in that: include: A monitoring module configured to perform multi-level monitoring of the number of load messages in the target system; a first adjustment module configured to adjust a state indication of a first-level state machine of a corresponding monitoring target within the target system according to the number of load messages; the state indication of the first-level state machine being capable of indicating a closed number of minimum processing units included in the monitoring target; and / or configuring the closed number of minimum processing units included in the monitoring target according to the number of load messages and a preset configuration algorithm; The second adjustment module is configured to adjust the state indication of the second-level state machine of the corresponding minimum processing unit according to the state indication and / or configuration result of the adjusted first-level state machine, so as to adjust the on and off state of the minimum processing unit and realize the adjustment of the working mode of the monitoring target.

11. The power consumption control device according to claim 10, wherein: The target system includes a multi-core network processor, the multi-core network processor includes a plurality of micro-engine clusters, each of the micro-engine clusters includes a plurality of micro-engine groups, and each of the micro-engine groups includes a plurality of micro-engines; The multi-level monitoring includes: first-level monitoring and second-level monitoring; the monitoring target of the first-level monitoring includes the micro-engine cluster, and the monitoring target of the second-level monitoring includes the micro-engine group; the number of load messages includes a first load message number and a second load message number; The monitoring module includes: a timer unit and an inbound and outbound packet statistics unit; The inbound and outbound packet statistics unit is configured to perform a first-level monitoring on the number of first load messages of each micro-engine cluster and a second-level monitoring on the number of second load messages of each micro-engine group; The timer unit is configured to collect the number of the first load messages and the number of the second load messages every preset counting period.

12. The power consumption control device according to claim 11, wherein: The first adjustment module includes: a clock switching indication unit and a first-level state machine; The clock switching indication unit is configured to collect the control signal generated by the timer unit in each counting cycle, and control the first-level state machine to adjust the state indication of the first-level state machine of the corresponding monitoring target according to the number of load messages according to the control signal.

13. The power consumption control device according to claim 10 or 11, characterized in that: The first adjustment module includes: a control chip; the control chip includes: one or more processors; a memory having one or more programs stored thereon, wherein when the one or more programs are executed by the one or more processors, the one or more processors configure the number of minimum processing units included in the monitoring target to be shut down according to the number of load messages and a preset configuration algorithm; One or more input / output (I / O) interfaces are connected between the processor and the memory and configured to implement information interaction between the processor and the memory.

14. The power consumption control device according to claim 10, wherein: The second adjustment module includes: a clock switching control unit and a second-level state machine; The clock switching control unit is configured to receive a clock shutdown request valid signal sent after the first adjustment module completes adjusting the status indication of the first-level state machine, and control the second-level state machine of the corresponding minimum processing unit to adjust the status indication according to the clock shutdown request valid signal and the adjusted status indication of the first-level state machine, and / or receive a clock shutdown request valid signal sent after the first adjustment module obtains the configuration result, and control the second-level state machine of the corresponding minimum processing unit to adjust the status indication according to the clock shutdown request valid signal and the configuration result, so as to adjust the on and off status of the minimum processing unit and realize the adjustment of the working mode of the monitoring target.