Power consumption control method, system and electronic device
By broadcasting sleep requests in a multi-core heterogeneous system and generating internal sleep instructions, the problem of power consumption control of different hardware domains and modules in a multi-core heterogeneous system is solved, and efficient resource utilization and flexible power consumption management are achieved.
Patent Information
- Application Number
- CN202411864205.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-17
- Publication Date
- 2025-04-01
- Estimated Expiration
- 2044-12-17
AI Technical Summary
In multi-core heterogeneous systems, the prior art cannot effectively control the power consumption of different hardware domains and modules, resulting in unused domains and modules still generating power consumption and causing waste of resources.
By responding to the sleep request of each first hardware domain through the second hardware domain, the sleep request is broadcast to interrupt the interaction process between the other hardware domain and the first hardware domain or the target module, an internal sleep instruction is generated to stop running, and to control the power off.
It realizes power consumption control for different hardware domains and modules, avoids resource waste, is suitable for multiple scenarios, and provides flexible power consumption management strategies.
Smart Images

Figure CN119322558B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of device control technology, and in particular to a power consumption control method, system and electronic device. Background Art
[0002] At present, in more and more fields, multi-core heterogeneous system-on-chip (SOC) is used to replace the solution of multiple SOCs running multiple systems.
[0003] Among them, multi-core heterogeneous SOC will be hard-isolated into multiple domains, and multiple systems will run in multiple domains. However, users have different frequencies and durations for systems and modules in different domains. Currently, all domains and modules are controlled according to the same power consumption strategy, which causes the phenomenon that non-running domains and modules still generate power consumption, resulting in resource waste. Summary of the invention
[0004] The purpose of the embodiments of the present application is to provide a power consumption control method, system and electronic device.
[0005] In a first aspect, an embodiment of the present application provides a power consumption control method, which is applied to a multi-core heterogeneous system, including:
[0006] In the case where the first hardware domain meets the sleep condition, generating a sleep request and transmitting the sleep request to the second hardware domain, wherein the sleep condition at least includes that a target module in the first hardware domain triggers a sleep mechanism or receives an external sleep instruction;
[0007] Responding to the sleep request through the second hardware domain, broadcasting the sleep request, so that other hardware domains interrupt the interaction process with the first hardware domain or the target module;
[0008] generating an internal sleep instruction, so that the first hardware domain controls the first hardware domain or the target module to stop running according to the internal sleep instruction;
[0009] Controlling the first hardware domain or the target module to power off through the second hardware domain;
[0010] The second hardware domain can communicate with the first hardware domain via an inter-core communication mechanism.
[0011] In a possible implementation manner, determining whether the first hardware domain meets the sleep condition includes:
[0012] Monitoring, by means of a first central processor of the first hardware domain, operation information of each module in the first hardware domain, wherein the operation information at least includes whether the module is used by a user, a duration of not being used by a user, and historical information of the module being used by a user;
[0013] Based on the operation information of each module, it is determined whether the first hardware domain meets the sleep condition.
[0014] In a possible implementation manner, after obtaining the operation information of each module in the first hardware domain, the method includes:
[0015] If the first hardware domain does not meet the sleep condition, transmitting the operation information to the second hardware domain;
[0016] Based on the operation information of each module, determining the power consumption control strategy of the module or the first hardware domain through the second hardware domain;
[0017] Based on the power consumption control strategy, the operating state of the module or the first hardware domain is adjusted.
[0018] In a possible implementation, the generating an internal sleep instruction includes:
[0019] Receiving the interaction processing result returned by the other hardware domain;
[0020] If the interaction processing result indicates that the interaction process between the other hardware domain and the first hardware domain or the target module is completed and interrupted, an internal sleep instruction is generated for the first hardware domain or the target module.
[0021] In a possible implementation manner, before controlling the first hardware domain or the target module to be powered off through the second hardware domain, the method includes:
[0022] Responding to the internal sleep instruction by the first hardware domain, stopping the operation of the first hardware domain or the target module;
[0023] A feedback instruction is generated and transmitted to the second hardware domain.
[0024] In a possible implementation manner, controlling the first hardware domain or the target module to power off by using the second hardware domain includes:
[0025] After the second hardware domain receives the feedback instruction, the power management chip is controlled to stop supplying power to the first hardware domain or the target module.
[0026] In a possible implementation manner, after controlling the first hardware domain or the target module to be powered off through the second hardware domain, the method includes:
[0027] Determining common resources associated with the first hardware domain or the target module, the common resources at least including memory, bandwidth, and external devices occupied by the first hardware domain or the target module;
[0028] The common resource is released so that the other hardware domains or other modules can use the common resource.
[0029] In a possible implementation manner, after controlling the first hardware domain or the target module to be powered off through the second hardware domain, the method includes:
[0030] Obtaining a wake-up request, wherein the wake-up request includes a hardware domain to be awakened or a module to be awakened;
[0031] Based on the inter-core communication mechanism, the association between the hardware domain to be awakened or the module to be awakened and the public resource is restored through the second hardware domain, and the power management chip is controlled to start supplying power to the hardware domain to be awakened or the module to be awakened;
[0032] The hardware domain to be awakened or the module to be awakened is run based on the sleep data stored in the communication module included in the second hardware domain, wherein the sleep data is real-time data when the first hardware domain or the target module is powered off.
[0033] In a second aspect, an embodiment of the present application further provides a power consumption control system, including a first hardware domain, a second hardware domain, and other hardware domains, wherein the first hardware domain and the second hardware domain can communicate through an inter-core communication mechanism, and the other hardware domains and the second hardware domain can communicate through an inter-core communication mechanism;
[0034] The first hardware domain determines whether a sleep condition is satisfied, and if satisfied, generates a sleep request and transmits the sleep request to the second hardware domain, wherein the sleep condition at least includes that a target module in the first hardware domain triggers a sleep mechanism or receives an external sleep instruction;
[0035] The second hardware domain responds to the sleep request and broadcasts the sleep request so that other hardware domains interrupt the interaction process with the first hardware domain or the target module; generates an internal sleep instruction so that the first hardware domain controls the first hardware domain or the target module to stop running according to the internal sleep instruction; and controls the first hardware domain or the target module to power off.
[0036] In a third aspect, an embodiment of the present application further provides an electronic device, comprising: a processor and a memory, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate via a bus, and when the machine-readable instructions are executed by the processor, the steps of the power consumption control method as described in any one of the above claims are performed.
[0037] In a fourth aspect, an embodiment of the present application further provides a storage medium, wherein a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of any one of the power consumption control methods described above are executed.
[0038] In the power consumption control method provided in the embodiment of the present application, the second hardware domain responds to each sleep request of the first hardware domain, that is, broadcasts the sleep request, so that the other hardware domain interrupts the interaction process with the first hardware domain or the target module, and generates an internal sleep instruction, so that the first hardware domain or the target module stops running, and then controls the stopped first hardware domain or the target module to power off. In other words, the second hardware domain can control the power consumption of the first hardware domain or the target module in a targeted manner, such as whether to sleep and whether to power off, etc., for the sleep requests of different first hardware domains. The power consumption control can better meet the actual needs of the first hardware domain or the target module, and can be applied to a variety of scenarios; and the first hardware domain can perform power consumption control on one or more modules in the first hardware domain, so that power consumption control can be more flexible, effectively avoiding waste of resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solutions in the present application or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0040] Figure 1 A flow chart of a power consumption control method provided by the present application is shown;
[0041] Figure 2 A flowchart of determining whether a first hardware domain meets a sleep condition in a power consumption control method provided by the present application is shown;
[0042] Figure 3 A flow chart showing another power consumption control method provided by the present application is shown;
[0043] Figure 4 A flowchart of generating an internal sleep instruction in a power consumption control method provided by the present application is shown;
[0044] Figure 5 A flowchart of waking up a hardware domain to be awakened or a module to be awakened in a power consumption control method provided by the present application is shown;
[0045] Figure 6 A schematic diagram of the structure of a power consumption control system provided by the present application is shown;
[0046] Figure 7 A schematic structural diagram of an electronic device provided by the present application is shown. DETAILED DESCRIPTION
[0047] Various aspects and features of the present application are described herein with reference to the accompanying drawings.
[0048] It should be understood that various modifications may be made to the embodiments of the present application. Therefore, the above description should not be considered as limiting, but only as an example of an embodiment. Other modifications within the scope and spirit of the present application will occur to those skilled in the art.
[0049] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the present application and, together with the general description of the present application given above and the detailed description of the embodiments given below, serve to explain the principles of the present application.
[0050] These and other characteristics of the present application will become apparent from the following description of a preferred form of embodiment given as a non-limiting example with reference to the accompanying drawings.
[0051] It should also be understood that, although the present application has been described with reference to some specific examples, those skilled in the art will be able to implement many other equivalent forms of the present application that have the features described in the claims and are therefore within the scope of protection defined thereby.
[0052] The above and other aspects, features and advantages of the present application will become more apparent in view of the following detailed description when taken in conjunction with the accompanying drawings.
[0053] Specific embodiments of the present application are described hereinafter with reference to the accompanying drawings; however, it should be understood that the embodiments applied for are merely examples of the present application, which may be implemented in a variety of ways. Well-known and / or repeated functions and structures are not described in detail to avoid unnecessary or redundant details that obscure the present application. Therefore, the specific structural and functional details applied for herein are not intended to be limiting, but merely serve as a basis and representative basis for the claims to teach those skilled in the art to use the present application in a variety of ways with substantially any suitable detailed structure.
[0054] This specification may use the phrases "in one embodiment," "in another embodiment," "in yet another embodiment," or "in other embodiments," all of which may refer to one or more of the same or different embodiments according to the present application.
[0055] It should be noted that the application scenario of the embodiment of the present application is the field of using multi-core heterogeneous system-on-chip (System OnChip, SOC), such as the field of intelligent vehicle-mounted chips, server data processing field, etc. Among them, a multi-core heterogeneous system may include two or more hardware domains, and a hardware domain is a collection of a group of resources, that is, a processor can be set in each hardware domain to form a processor core with different architectures, and the hardware domains composed of the interrupt controller, clock controller, power controller and memory of each processor core are hard-isolated. It can be understood that multi-core heterogeneity is a difference at the hardware level, not a difference in operating systems. Of course, since the processor cores of different hardware domains are heterogeneous, the systems running in different hardware domains can be the same or different.
[0056] Based on this, an embodiment of the present application provides a power consumption control method. On the basis of realizing inter-core communication between multi-core heterogeneous cores, the power consumption control method responds to the sleep request of each first hardware domain through the second hardware domain, so as to control the power consumption of the first hardware domain or the target module in a targeted manner, such as whether to sleep and whether to power off, etc., for the sleep requests of different first hardware domains. The power consumption control can better meet the actual needs of the first hardware domain or the target module, and can be applicable to a variety of scenarios; and the first hardware domain can perform power consumption control on one or more modules in the first hardware domain, so that power consumption control can be performed more flexibly, effectively avoiding waste of resources.
[0057] To facilitate understanding of the present application, a power consumption control method provided by the present application is first introduced in detail.
[0058] like Figure 1 As shown, it is a flow chart of the power consumption control method provided in an embodiment of the present application, wherein the specific steps include S101-S104.
[0059] S101, when a first hardware domain meets a sleep condition, generating a sleep request and transmitting the sleep request to a second hardware domain, wherein the sleep condition at least includes that a target module in the first hardware domain triggers a sleep mechanism or receives an external sleep instruction.
[0060] Optionally, a processor of the first hardware domain, such as a central processing unit (CPU), can monitor in real time whether the first hardware domain meets the sleep condition, where the sleep condition at least includes that the target module in the first hardware domain triggers the sleep mechanism or receives an external sleep instruction. The target module is any functional module in the first hardware domain, such as an interrupt controller, a clock controller, and a power controller, etc., or a peripheral module connected to the first hardware domain, such as a display, WIFI, and a camera, etc., and the number of the target modules can be one or more.
[0061] Here, the sleep mechanism may include usage time, usage status, and user historical usage information; the received external sleep instruction may be for the target module or for the first hardware domain. For example, before the user currently needs to leave the computer screen, in order to prevent information leakage, it generates a sleep instruction for the display so that the display stops running and no longer displays content.
[0062] If it is determined that the first hardware domain meets the sleep condition, a sleep request is generated and transmitted to the second hardware domain.
[0063] Optionally, the second hardware domain can communicate with the first hardware domain through an inter-core communication mechanism, for example, through a maibox mechanism suitable for transmitting instructions, through a shared memory mechanism suitable for sharing data, etc. Considering that the shared memory mechanism needs to be set by the privileged hardware domain during the startup phase, the embodiment of the present application preferably adopts the maibox mechanism to achieve inter-core communication, and since the communication module for implementing the maibox mechanism is inherent in the multi-core heterogeneous SOC, the embodiment of the present application can achieve inter-core communication between different hardware domains without relying on external chips, which is convenient and low-cost.
[0064] S102: Respond to the sleep request through the second hardware domain and broadcast the sleep request, so that other hardware domains interrupt the interaction process with the first hardware domain or the target module.
[0065] As one example, after the sleep request is transmitted to the second hardware domain and the second hardware domain receives the sleep request, the sleep request is responded to by the second hardware domain. Optionally, the sleep request is broadcasted so that other hardware domains can obtain the sleep request.
[0066] Here, the first hardware domain, the second hardware domain and other hardware domains form a network. The first hardware domain, the second hardware domain and other hardware domains can broadcast information so that hardware domains other than themselves can obtain the broadcast information, thereby realizing communication within the network. Compared with the point-to-point communication mode (such as the second hardware domain transmitting the sleep request to each other hardware domain separately through the inter-core communication mechanism), transmitting information (such as the sleep request) in the form of broadcasting can not only improve communication efficiency, but also reduce communication resources.
[0067] Of course, in actual applications, the sleep request may also be transmitted in a point-to-point communication mode, that is, the second hardware domain responds to the sleep request to transmit the sleep request to each other hardware domain respectively.
[0068] In an embodiment of the present application, after other hardware domains obtain the sleep request, they can interrupt the interaction process with the first hardware domain or the target module based on the sleep request, thereby avoiding problems such as data loss or other hardware domain operation failures caused by directly controlling the first hardware domain or the target module to stop running.
[0069] S103, generating an internal sleep instruction, so that the first hardware domain controls the first hardware domain or the target module to stop running according to the internal sleep instruction.
[0070] Optionally, after the second hardware domain determines the interaction process between other hardware domain interrupts and the first hardware domain or the target module, an internal sleep instruction is further generated and transmitted to the first hardware domain. The internal sleep instruction is used to feedback the sleep request of the first hardware domain, that is, to instruct the first hardware domain to execute the sleep program.
[0071] After receiving the internal sleep instruction, the first hardware domain controls the first hardware domain or the target module to stop running according to the internal sleep instruction to complete the sleep program.
[0072] S104: Control the first hardware domain or the target module to power off through the second hardware domain.
[0073] Optionally, the second hardware domain is used to determine whether the first hardware domain or the target module has stopped running, and if so, the first hardware domain or the target module is controlled to be powered off. Optionally, a first power consumption management module is provided in the first hardware domain, and a power-off instruction is generated by the second hardware domain and transmitted to the first hardware domain, and the first hardware domain responds to the power-off instruction through its power consumption management module to control the first hardware domain or the target module to be powered off.
[0074] When the target module is a peripheral module, the target module is powered off by using an application program interface (API) between the first hardware domain and the peripheral module.
[0075] In another example, a second power consumption management module is provided in the second hardware domain, and the second power consumption management module can control the power chips of the electronic devices belonging to the first hardware domain, the second hardware domain and other hardware domains, and further can control the power on / off of the first hardware domain and its modules and other hardware domains and their modules.
[0076] In the power consumption control method provided in the embodiment of the present application, the second hardware domain responds to each sleep request of the first hardware domain, that is, broadcasts the sleep request, so that the other hardware domain interrupts the interaction process with the first hardware domain or the target module, and generates an internal sleep instruction, so that the first hardware domain or the target module stops running, and then controls the stopped first hardware domain or the target module to power off. In other words, the second hardware domain can control the power consumption of the first hardware domain or the target module in a targeted manner, such as whether to sleep and whether to power off, etc., for the sleep requests of different first hardware domains. The power consumption control can better meet the actual needs of the first hardware domain or the target module, and can be applied to a variety of scenarios; and the first hardware domain can perform power consumption control on one or more modules in the first hardware domain, so that power consumption control can be more flexible, effectively avoiding waste of resources.
[0077] Furthermore, the power consumption control method provided in the present application can also be applied to the scenario where multiple hardware domains and / or multiple modules request to sleep at the same time, that is, it has a wide range of adaptability.
[0078] As one example, Figure 2 A flow chart for determining whether a first hardware domain meets a sleep condition is shown, wherein specific steps include S201 and S202.
[0079] S201, monitoring the operation information of each module in the first hardware domain through the first central processor of the first hardware domain, the operation information at least including whether it is used by the user, the duration of not being used by the user, and the historical information of use by the user.
[0080] S202: Determine whether the first hardware domain meets a sleep condition based on the operation information of each module.
[0081] Optionally, since the function of the central processor of the electronic device is mainly to read all operation instructions, decode the instructions and execute the instructions, that is, it is the computing core and control core of the electronic device. Based on this, in the embodiment of the present application, the first central processor of the first hardware domain monitors its own operation information and the operation information of each module in the first hardware domain in real time to ensure that the monitored operation information is relatively comprehensive.
[0082] The operation information includes at least whether it is used by the user, the duration of not being used by the user, and the historical information of being used by the user. For example, for a peripheral module associated with the first hardware domain, such as a display, its operation information can be monitored to include that it is currently being used by the user and that the duration of being used by the user is 35 minutes; for a power controller, its operation information can be monitored to include that the electronic device is currently connected to an external power source, and the historical information of the user's use in the current period indicates that the frequency of the user using the power controller in the current period is N, etc.
[0083] After obtaining the operation information of each module, determine whether the first hardware domain meets the sleep condition based on the operation information of each module. Optionally, for different modules, determine whether they meet the sleep condition. For example, if the operation information of the display is that it is not currently used by the user, and the duration of not being used by the user is 20 minutes, further compare the duration with the trigger sleep duration corresponding to the display. If the duration is greater than or equal to the trigger sleep duration, it is determined that the first hardware domain meets the sleep condition; if the operation information of the power controller is that the current electronic device is connected to an external power supply, and the frequency of the user using the power controller in the current time period (such as 15:00-17:00) is 1, and 1 is less than N, then it is determined that the first hardware domain meets the sleep condition.
[0084] Figure 3 A flow chart of another power consumption control method is shown, wherein the specific steps include S301-S303.
[0085] S301 : When the first hardware domain does not meet the sleep condition, transmit the operation information to the second hardware domain.
[0086] S302: Based on the operation information of each module, determine the power consumption control strategy of the module or the first hardware domain through the second hardware domain.
[0087] S303: Adjust the operating state of the module or the first hardware domain based on the power consumption control strategy.
[0088] As one example, after obtaining the operation information of each module in the first hardware domain, and referring to Figure 2 The method flow chart shows that after determining whether the first hardware domain meets the sleep condition, if the first hardware domain does not meet the sleep condition, it indicates that there is no need to control the first hardware domain or any module to stop running and power off. At this time, in order to reasonably control the power consumption of the first hardware domain and each module, the operation information is transmitted to the second hardware domain.
[0089] After receiving the operation information, the second hardware domain analyzes and processes the operation information through the second hardware domain to determine the power consumption control strategy of the module or the first hardware domain. The power consumption control strategy includes at least: 1. For modules whose usage frequency is lower than the first threshold, adjust their operation status; if the operation information indicates that the currently running module includes a secondary display screen (here, the user uses the vehicle-mounted system, and the scenario includes the main display screen and the secondary display screen), according to the historical information of user use, it is determined that the usage frequency of the secondary display screen is low. At this time, the operation status of the secondary display screen can be adjusted to reduce the power consumption of the secondary display screen and thus reduce the power consumption of the first hardware domain. Adjusting the operation status of the secondary display screen can include lowering its display brightness, turning off its backlight, etc.; for another example, the operation information indicates that the currently running module includes WIFI. According to the historical information of user use, it is determined that the user has not used WIFI during the time period of 00:00-06:00. At this time, WIFI can be adjusted to stop running and power off. 2. Adjust the operating status of the central processor of the hardware domain; for the hardware domain as a whole, after obtaining the operating information of each module thereof, determine the user's demand for the hardware domain based on the historical information of the user's use of the hardware domain, that is, determine the frequency of the user's use of the hardware domain. If the frequency of the user's use of the hardware domain is less than or equal to the second threshold, it indicates that the user's frequency of using the modules in the hardware domain is low, and the operating demand for the central processor of the hardware domain is low. At this time, the central processor is down-clocked to reduce the power consumption of the hardware domain. 3. Adjust the operating status of the hardware domain; also for the hardware domain as a whole, determine the usage of the hardware domain in each time period based on the historical information of the user's use. For example, in the time period of 00:00-06:00, the hardware domain to which the audio in the vehicle system belongs has not been used. At this time, the hardware domain can be adjusted to sleep in the time period of 00:00-06:00. Of course, other power consumption control strategies can also be set according to actual needs, and the embodiments of the present application do not specifically limit this.
[0090] After determining the power consumption control strategy of the module or the first hardware domain, the operation state of the module or the first hardware domain is adjusted based on the power consumption control strategy to reasonably control the power consumption of the first hardware domain and each module, thereby effectively avoiding resource waste.
[0091] As one example, Figure 4 A flow chart of generating an internal sleep instruction is shown, wherein specific steps include S401 and S402.
[0092] S401, receiving the interaction processing results returned by other hardware domains.
[0093] S402: If the interaction processing result indicates that the interaction process between the other hardware domain and the first hardware domain or the target module is interrupted, an internal sleep instruction is generated for the first hardware domain or the target module.
[0094] As one example, after broadcasting the sleep request of the first hardware domain, the interaction processing results returned by other hardware domains are received, wherein a receiving duration can be set, and the receiving duration is determined by the number of other hardware domains, the response speed of each other hardware domain, etc. The receiving duration can ensure that the feedback of each other hardware domain is received without wasting processing resources.
[0095] It is worth noting that the second hardware domain and other hardware domains, as well as the first hardware domain and other hardware domains, also use the maibox mechanism to achieve inter-core communication. In other words, the embodiment of the present application does not require the provision of an external chip, and the inter-core communication between the hardware domains can be achieved through the communication module (set as the maibox mechanism) of the multi-core heterogeneous SOC itself.
[0096] Identify the interaction processing results returned by other hardware domains, where the interaction processing results at least include whether the interaction process with the first hardware domain or the target module is interrupted, whether the data generated by the interaction process with the first hardware domain or the target module is saved, etc. If the interaction processing result indicates that the interaction process between the other hardware domain and the first hardware domain or the target module is completely interrupted and the generated data is completely saved, that is, the operation of other hardware domains will not be affected if the first hardware domain or the target module stops running, then an internal sleep instruction for the first hardware domain or the target module is generated, and the internal sleep instruction is used to instruct the first hardware domain or the target module to sleep.
[0097] In another example, after generating the internal sleep instruction and before controlling the first hardware domain or the target module to power off through the second hardware domain, the first hardware domain responds to the internal sleep instruction. Optionally, the first central processor of the first hardware domain can stop running the first hardware domain or the target module according to the internal sleep, and generate a feedback instruction and transmit the feedback instruction to the second hardware domain, so that the second hardware domain controls the power management chip to stop supplying power to the first hardware domain or the target module after receiving the feedback instruction, further ensuring that powering off the first hardware domain or the target module will not cause data loss or other hardware domain operation failures.
[0098] Considering that when the first hardware domain or target module is running, it is configured with a certain memory, bandwidth and external devices. After the first hardware domain or target module is powered off by controlling the second hardware domain, in order to avoid resource waste caused by the memory, bandwidth and external devices being unable to be used by other hardware domains, in an embodiment of the present application, after controlling the first hardware domain or target module to power off, public resources associated with the first hardware domain or target module are further determined, and the public resources at least include the memory, bandwidth and external devices occupied by the first hardware domain or target module, and the public resources are pre-configured for the first hardware domain or target module before it runs.
[0099] After determining the common resources, determine the common resources that can be released. For example, for the memory, determine the total storage area and the used area associated with the first hardware domain or the target module. The unused area in the total storage area is the common resource that can be released. For the external devices, determine that the external devices associated with the first hardware domain or the target module include a display. In this case, the display is the common resource that can be released, etc.
[0100] Release common resources so that other hardware domains or other modules can use common resources. Among them, other modules can be modules other than the target module in the first hardware domain, or modules in other hardware domains. It is worth noting that when releasing common resources, part of the common resources can be released, such as unused areas in the total storage area, and part of the unused areas can be released to prevent the first hardware domain or the target module from being awakened and generating data to be stored, resulting in data loss or failure to operate due to lack of available storage area.
[0101] After the first hardware domain or target module is powered off by the second hardware domain, once the user needs the first hardware domain or target module, the user can perform a wake-up operation on the first hardware domain or target module to switch the first hardware domain or target module to a running state. Figure 5 A flow chart of waking up a hardware domain to be awakened or a module to be awakened is shown, wherein specific steps include S501-S503.
[0102] S501, obtaining a wake-up request, where the wake-up request includes a hardware domain to be awakened or a module to be awakened.
[0103] S502, based on the inter-core communication mechanism, restore the association between the hardware domain to be awakened or the module to be awakened and the common resource through the second hardware domain, and control the power management chip to start supplying power to the hardware domain to be awakened or the module to be awakened.
[0104] S503: Running the hardware domain to be awakened or the module to be awakened based on the sleep data stored in the communication module included in the second hardware domain, where the sleep data is real-time data when the first hardware domain or the target module is powered off.
[0105] Optionally, after the user performs a wake-up operation on the first hardware domain or the target module, the first hardware domain or the second hardware domain responds to the wake-up operation to obtain a wake-up request, wherein the wake-up request includes the hardware domain to be awakened or the module to be awakened.
[0106] Based on the inter-core communication mechanism, the association between the hardware domain to be awakened or the module to be awakened and the public resources is restored through the second hardware domain. In an example, it is determined through the second hardware domain whether the public resources released when the hardware domain to be awakened or the module to be awakened is in sleep mode are used. If not, the released public resources are directly associated with the hardware domain to be awakened or the module to be awakened. If yes, the available public resources are re-acquired and associated with the hardware domain to be awakened or the module to be awakened for use by the hardware domain to be awakened or the module to be awakened.
[0107] At the same time, the power management chip is controlled by the second hardware domain to start supplying power to the hardware domain to be awakened or the module to be awakened. The second hardware domain can control the power supply of each hardware domain including the first hardware domain and other hardware domains. After obtaining the wake-up request, a power supply instruction can be generated. Based on the inter-core communication mechanism, the power supply instruction is transmitted to the awakening hardware domain or the module to be awakened for power supply, and the power management chip is controlled to start supplying power to the hardware domain to be awakened or the module to be awakened, so that the hardware domain to be awakened or the module to be awakened can start running.
[0108] Optionally, when the association between the hardware domain to be awakened or the module to be awakened and the public resources is restored through the second hardware domain, the association between the hardware domain to be awakened or the module to be awakened and the public resources is restored through the second hardware domain based on the inter-core communication mechanism, and the power management chip is controlled to start supplying power to the hardware domain to be awakened or the module to be awakened, and a wake-up instruction can be sent to wake up the hardware domain to be awakened or the module to be awakened. That is, when waking up the dormant hardware domain or module, the wake-up operation can be implemented without relying on other external chips. Based on the inter-core communication mechanism, such as the maibox mechanism adopted in the embodiment of the present application, higher wake-up efficiency and lower wake-up cost are achieved.
[0109] When the hardware domain to be awakened or the module to be awakened starts running, the hardware domain to be awakened or the module to be awakened is run based on the sleep data stored in the communication module included in the second hardware domain. The sleep data is the real-time data when the first hardware domain or the target module is powered off. The sleep data includes but is not limited to the data and operation mode generated by its own operation, the data and interaction mode generated by the interactive process with other hardware domains, etc. Similarly, storing the sleep data in the communication module can quickly obtain the sleep data to wake up the hardware domain to be awakened or the module to be awakened, compared with storing it in other memories, which is convenient and efficient.
[0110] Based on the same inventive concept, the second aspect of the present application also provides a power consumption control system corresponding to a power consumption control method. Since the principle of solving the problem by the power consumption control system in the present application is similar to the above-mentioned power consumption control method of the present application, the implementation of the power consumption control system can refer to the implementation of the method, and the repeated parts will not be repeated.
[0111] Figure 6 A schematic diagram of the structure of a power consumption control system provided in an embodiment of the present application is shown. It can be seen from the figure that the power consumption control system includes a first hardware domain 601, a second hardware domain 602, and other hardware domains 603. The first hardware domain 601 and the second hardware domain 602 can communicate through an inter-core communication mechanism, and the other hardware domains 603 and the second hardware domain 602 can communicate through an inter-core communication mechanism;
[0112] The first hardware domain 601 determines whether a sleep condition is satisfied, and if so, generates a sleep request and transmits the sleep request to the second hardware domain 602, wherein the sleep condition at least includes that a target module in the first hardware domain 601 triggers a sleep mechanism or receives an external sleep instruction;
[0113] The second hardware domain 602 responds to the sleep request and broadcasts the sleep request so that other hardware domains 603 interrupt the interaction process with the first hardware domain 601 or the target module; generates an internal sleep instruction so that the first hardware domain 601 controls the first hardware domain 601 or the target module to stop running according to the internal sleep instruction; and controls the first hardware domain 601 or the target module to power off.
[0114] In yet another embodiment, when determining whether the sleep condition is met, the first hardware domain 601 includes:
[0115] The first hardware domain 601 monitors the operation information of each module in the first hardware domain 601 through the first central processor, and the operation information at least includes whether it is used by the user, the duration of not being used by the user, and the historical information of being used by the user;
[0116] Based on the operation information of each module, it is determined whether a sleep condition is met.
[0117] In yet another embodiment, when the first hardware domain 601 does not meet the sleep condition, the first hardware domain 601 transmits the operation information to the second hardware domain 602;
[0118] The second hardware domain 602 determines the power consumption control strategy of the module or the first hardware domain 601 based on the operation information of each module; and adjusts the operation state of the module or the first hardware domain 601 based on the power consumption control strategy.
[0119] In yet another embodiment, when the second hardware domain 602 generates an internal sleep instruction, it includes:
[0120] The second hardware domain 602 receives the interaction processing result returned by the other hardware domain 603;
[0121] If the interaction processing result indicates that the interaction process between the other hardware domain 603 and the first hardware domain 601 or the target module is interrupted, an internal sleep instruction is generated for the first hardware domain 601 or the target module.
[0122] In yet another embodiment, before the second hardware domain 602 controls the first hardware domain 601 or the target module to power off, the method includes:
[0123] The first hardware domain 601 responds to the internal sleep instruction, stops running the first hardware domain 601 or the target module; generates a feedback instruction and transmits the feedback instruction to the second hardware domain 602.
[0124] In another embodiment, when the second hardware domain 602 controls the first hardware domain 601 or the target module to power off, the method includes:
[0125] The second hardware domain 602 controls the power management chip to stop supplying power to the first hardware domain 601 or the target module in response to the received feedback instruction;
[0126] In another embodiment, after the first hardware domain 601 or the target module is powered off by controlling the second hardware domain 602, the second hardware domain 602 determines the common resources associated with the first hardware domain 601 or the target module, and the common resources at least include the memory, bandwidth and external devices occupied by the first hardware domain 601 or the target module; and releases the common resources so that the other hardware domains 603 or other modules can use the common resources.
[0127] In another embodiment, after the second hardware domain 602 controls the first hardware domain 601 or the target module to be powered off, it includes: the second hardware domain 602 obtains a wake-up request, and the wake-up request includes the hardware domain to be awakened or the module to be awakened; based on the inter-core communication mechanism, the association between the hardware domain to be awakened or the module to be awakened and the public resources is restored, and the power management chip is controlled to start supplying power to the hardware domain to be awakened or the module to be awakened; based on the sleep data stored in the communication module included in the second hardware domain 602, the hardware domain to be awakened or the module to be awakened is run, and the sleep data is real-time data when the first hardware domain 601 or the target module is powered off.
[0128] The second hardware domain of the embodiment of the present application responds to the sleep request of each first hardware domain, that is, broadcasts the sleep request, so that the other hardware domain interrupts the interaction process with the first hardware domain or the target module, and generates an internal sleep instruction to stop the first hardware domain or the target module from running, and then controls the stopped first hardware domain or the target module to power off. In other words, the second hardware domain can control the power consumption of the first hardware domain or the target module in a targeted manner, such as whether to sleep and whether to power off, etc., for the sleep requests of different first hardware domains. The power consumption control can better meet the actual needs of the first hardware domain or the target module, and can be applied to a variety of scenarios; and the first hardware domain can control the power consumption of one or more modules in the first hardware domain, and can control the power consumption more flexibly, effectively avoiding waste of resources.
[0129] An embodiment of the present application provides a storage medium, which is a computer-readable medium and stores a computer program. When the computer program is executed by a processor, the method provided by any embodiment of the present application is implemented, including the following steps S11 to S14:
[0130] S11, generating a sleep request and transmitting the sleep request to the second hardware domain when the first hardware domain meets the sleep condition, wherein the sleep condition at least includes that a target module in the first hardware domain triggers a sleep mechanism or receives an external sleep instruction;
[0131] S12, responding to the sleep request through the second hardware domain, broadcasting the sleep request, so that other hardware domains interrupt the interaction process with the first hardware domain or the target module;
[0132] S13, generating an internal sleep instruction, so that the first hardware domain controls the first hardware domain or the target module to stop running according to the internal sleep instruction;
[0133] S14: Controlling the first hardware domain or the target module to power off through the second hardware domain, wherein the second hardware domain can communicate with the first hardware domain through an inter-core communication mechanism.
[0134] An embodiment of the present application provides an electronic device. The structural diagram of the electronic device can be as follows: Figure 7 As shown, at least a memory 701 and a processor 702 are included, the memory 701 stores a computer program, and the processor 702 implements the method provided by any embodiment of the present application when executing the computer program on the memory 701. Exemplarily, the steps of the electronic device computer program are as follows S21 to S24:
[0135] S21, generating a sleep request and transmitting the sleep request to the second hardware domain when the first hardware domain meets the sleep condition, wherein the sleep condition at least includes that a target module in the first hardware domain triggers a sleep mechanism or receives an external sleep instruction;
[0136] S22, responding to the sleep request through the second hardware domain, broadcasting the sleep request, so that other hardware domains interrupt the interaction process with the first hardware domain or the target module;
[0137] S23, generating an internal sleep instruction, so that the first hardware domain controls the first hardware domain or the target module to stop running according to the internal sleep instruction;
[0138] S24: Controlling the first hardware domain or the target module to power off through the second hardware domain, wherein the second hardware domain can communicate with the first hardware domain through an inter-core communication mechanism.
[0139] In the power consumption control method provided in the embodiment of the present application, the second hardware domain responds to each sleep request of the first hardware domain, that is, broadcasts the sleep request, so that the other hardware domain interrupts the interaction process with the first hardware domain or the target module, and generates an internal sleep instruction, so that the first hardware domain or the target module stops running, and then controls the stopped first hardware domain or the target module to power off. In other words, the second hardware domain can control the power consumption of the first hardware domain or the target module in a targeted manner, such as whether to sleep and whether to power off, etc., for the sleep requests of different first hardware domains. The power consumption control can better meet the actual needs of the first hardware domain or the target module, and can be applied to a variety of scenarios; and the first hardware domain can perform power consumption control on one or more modules in the first hardware domain, so that power consumption control can be more flexible, effectively avoiding waste of resources.
[0140] It should be understood that in the embodiments of the present application, the processor may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc.
[0141] It should also be understood that the memory mentioned in the embodiments of the present invention may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM) and direct RAM bus random access memory (DR RAM).
[0142] It should be noted that when the processor is a general-purpose processor, DSP, ASIC, FPGA or other programmable logic device, discrete gate or transistor logic device, discrete hardware component, the memory (storage module) is integrated in the processor.
[0143] It should be noted that the memory described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0144] In addition to the data bus, the bus may also include a power bus, a control bus, a status signal bus, etc. However, for the sake of clarity, various buses are marked as buses in the figure.
[0145] It should also be understood that the first, second, third, fourth and various numerical numbers involved in this document are only distinctions made for the convenience of description and are not intended to limit the scope of the present application.
[0146] It should be understood that the term "and / or" in this article is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0147] In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in a processor or an instruction in the form of software. The steps of the method disclosed in conjunction with the embodiment of the present application can be directly embodied as a hardware processor for execution, or a combination of hardware and software modules in a processor for execution. The software module can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor reads the information in the memory and completes the steps of the above method in conjunction with its hardware. To avoid repetition, it is not described in detail here.
[0148] In various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0149] Those skilled in the art will appreciate that the various illustrative logical blocks (ILBs) and steps described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or in a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0150] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0151] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0152] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0153] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk), etc.
[0154] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A power consumption control method, applied to a multi-core heterogeneous system, comprising: In the case where the first hardware domain meets the sleep condition, generating a sleep request and transmitting the sleep request to the second hardware domain, wherein the sleep condition at least includes that a target module in the first hardware domain triggers a sleep mechanism or receives an external sleep instruction; Responding to the sleep request through the second hardware domain, broadcasting the sleep request, so that other hardware domains interrupt the interaction process with the first hardware domain or the target module; wherein the other hardware domains are hardware domains other than the first hardware domain and the second hardware domain; generating an internal sleep instruction, so that the first hardware domain controls the first hardware domain or the target module to stop running according to the internal sleep instruction; Controlling the first hardware domain or the target module to power off through the second hardware domain; The second hardware domain can communicate with the first hardware domain via an inter-core communication mechanism.
2. The power consumption control method according to claim 1, determining whether the first hardware domain meets the sleep condition comprises: Monitoring, by means of a first central processor of the first hardware domain, operation information of each module in the first hardware domain, wherein the operation information at least includes whether the module is used by a user, a duration of not being used by a user, and historical information of the module being used by a user; Based on the operation information of each module, it is determined whether the first hardware domain meets the sleep condition.
3. The power consumption control method according to claim 2, after obtaining the operation information of each module in the first hardware domain, comprising: If the first hardware domain does not meet the sleep condition, transmitting the operation information to the second hardware domain; Based on the operation information of each module, determining the power consumption control strategy of the module or the first hardware domain through the second hardware domain; Based on the power consumption control strategy, the operating state of the module or the first hardware domain is adjusted.
4. The power consumption control method according to claim 1, wherein generating an internal sleep instruction comprises: Receiving the interaction processing result returned by the other hardware domain; If the interaction processing result indicates that the interaction process between the other hardware domain and the first hardware domain or the target module is completed and interrupted, an internal sleep instruction is generated for the first hardware domain or the target module.
5. The power consumption control method according to claim 1, before controlling the first hardware domain or the target module to power off through the second hardware domain, comprising: Responding to the internal sleep instruction by the first hardware domain, stopping the operation of the first hardware domain or the target module; A feedback instruction is generated and transmitted to the second hardware domain.
6. The power consumption control method according to claim 5, wherein the controlling the first hardware domain or the target module to power off by the second hardware domain comprises: After the second hardware domain receives the feedback instruction, the power management chip is controlled to stop supplying power to the first hardware domain or the target module.
7. The power consumption control method according to any one of claims 1 to 6, after controlling the first hardware domain or the target module to be powered off by the second hardware domain, comprising: Determining common resources associated with the first hardware domain or the target module, the common resources at least including memory, bandwidth, and external devices occupied by the first hardware domain or the target module; The common resource is released so that the other hardware domains or other modules can use the common resource.
8. The power consumption control method according to claim 7, after controlling the first hardware domain or the target module to be powered off by the second hardware domain, comprising: Obtaining a wake-up request, wherein the wake-up request includes a hardware domain to be awakened or a module to be awakened; Based on the inter-core communication mechanism, the association between the hardware domain to be awakened or the module to be awakened and the public resource is restored through the second hardware domain, and the power management chip is controlled to start supplying power to the hardware domain to be awakened or the module to be awakened; The hardware domain to be awakened or the module to be awakened is run based on the sleep data stored in the communication module included in the second hardware domain, wherein the sleep data is real-time data when the first hardware domain or the target module is powered off.
9. A power consumption control system, comprising a first hardware domain, a second hardware domain and other hardware domains, wherein the first hardware domain and the second hardware domain can communicate with each other through an inter-core communication mechanism, and the other hardware domains and the second hardware domain can communicate with each other through an inter-core communication mechanism; The first hardware domain determines whether a sleep condition is satisfied, and if so, generates a sleep request and transmits the sleep request to the second hardware domain, wherein: The sleep condition at least includes that the target module in the first hardware domain triggers a sleep mechanism or receives an external sleep instruction; The second hardware domain responds to the sleep request and broadcasts the sleep request to cause other hardware domains to interrupt the interaction process with the first hardware domain or the target module; wherein the other hardware domains are hardware domains other than the first hardware domain and the second hardware domain; an internal sleep instruction is generated to cause the first hardware domain to control the first hardware domain or the target module to stop running according to the internal sleep instruction; and the first hardware domain or the target module is controlled to power off.
10. An electronic device comprising: A processor and a memory, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate via a bus, and when the machine-readable instructions are executed by the processor, the steps of the power consumption control method as described in any one of claims 1 to 8 are performed.
Citation Information
Patent Citations
Method for controlling low power consumption of industrial vehicle-mounted display screen and industrial vehicle-mounted display device
CN109857237A
Vehicle control method and device and storage medium
CN116684847A