Electronic device and control method
Patent Information
- Application Number
- TW114104338
- Authority / Receiving Office
- TW · TW
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2025-02-06
- Publication Date
- 2026-08-16
- Estimated Expiration
- 2045-02-05
Smart Images

Figure TWG2TA001072061_001 
Figure TWG2TA001072061_002 
Figure TWG2TA001072061_003
Abstract
Description
Technical Field
[0001] This invention relates to a power consumption control technology, and more particularly to an electronic device and control method. Prior Technology
[0002] Electronic devices (such as embedded controllers (ECs) or Super I / O (SIO) chips) typically have a sleep mode. Firmware controls when the electronic device enters sleep mode. When the electronic device is in sleep mode, the clock is temporarily stopped, thus saving power.
[0003] In addition to sleep mode, electronic devices can also be in standby / idle mode. However, if tasks are only executed sequentially after the standby state ends, it may result in wasted power consumption and resources.
[0004] Therefore, how to operate tasks efficiently and with low power consumption is an issue worth solving. Summary of the Invention
[0005] To address the aforementioned technical problems, this disclosure proposes an electronic device and control method to resolve the issues.
[0006] The embodiments disclosed herein provide an electronic device comprising: at least one hardware module; and a control module electrically connected to the at least one hardware module, configured to: determine a duration of a standby state, wherein the duration corresponds to a specific period; and perform at least one operation based on the duration, wherein the at least one operation comprises: identifying a plurality of tasks associated with a first schedule, wherein the plurality of tasks includes a first task and at least one second task, and the first task cannot be executed in the standby state; and when it is determined that the specific period is available for executing the at least one second task, determining a second schedule for the plurality of tasks, and controlling the at least one hardware module to execute the at least one second task according to the second schedule, wherein: according to the first schedule, the at least one second task is executed after the specific period, and according to the second schedule, the at least one second task is executed during the specific period.
[0007] The disclosed embodiments further provide a control method applicable to an electronic device, wherein the electronic device includes at least one hardware module and a control module, and the control method includes: determining a time length of a standby state through the control module, wherein the time length corresponds to a specific period; and performing at least one operation through the control module according to the time length, wherein the at least one operation includes: identifying a plurality of tasks associated with a first schedule, wherein the plurality of tasks includes a first task and at least one second task, and the first task cannot be executed in the standby state; and when it is determined that the specific period can be used to execute the at least one second task, determining a second schedule for the plurality of tasks, and controlling the at least one hardware module to execute the at least one second task according to the second schedule, wherein: according to the first schedule, the at least one second task is executed after the specific period, and according to the second schedule, the at least one second task is executed within the specific period.
[0008] Based on the above, the electronic device and control method disclosed herein can effectively utilize standby / idle periods, thereby reducing overall standby time and overall power consumption. Simple Explanation of the Diagram
[0009] The accompanying drawings are provided to enable those skilled in the art to further understand the invention, and are incorporated in and constitute a part of this specification. The drawings illustrate exemplary embodiments of the invention and are used, together with the specification, to explain the principles of the invention. Figure 1 is a block diagram of an electronic device according to an embodiment of this disclosure; Figure 2 is a block diagram of a control module according to an embodiment of this disclosure; Figure 3 is a timing diagram illustrating the execution order of multiple tasks; Figure 4 is a timing diagram showing the adjusted execution order of a plurality of tasks according to an embodiment of this disclosure; Figure 5 is a flowchart illustrating a control method according to an embodiment of this disclosure; and Figure 6 is a schematic flowchart of a control method according to an embodiment of this disclosure. Implementation
[0010] This disclosure provides an electronic device and control method to solve the problems mentioned in the background art. To make the features and advantages of this disclosure more apparent, specific embodiments of the invention are described in detail below with reference to the accompanying drawings. The following description contains specific information relating to exemplary embodiments of the invention. The accompanying drawings and detailed description are exemplary embodiments only. However, this disclosure is not limited to these exemplary embodiments. Other variations and embodiments of this disclosure will occur to those skilled in the art. Unless otherwise stated, the same or corresponding elements in the drawings are indicated by the same or corresponding reference numerals. Furthermore, the drawings and illustrations in this disclosure are generally not drawn to scale and are not intended to correspond to actual relative dimensions.
[0011] The following disclosure provides many different embodiments or examples to implement the various features of this invention. The following disclosure describes specific examples of the various components and their arrangements to simplify the explanation. Of course, these specific examples are not intended to be limiting. For example, if the disclosed embodiment describes a first feature formed on or above a second feature, it indicates that it may include embodiments where the first and second feature are in direct contact, or embodiments where an additional feature is formed between the first and second feature, so that the first and second feature may not be in direct contact.
[0012] It is worth noting that additional operational steps may be performed before, during, or after the method, and in other embodiments of the method, some operational steps may be replaced or omitted.
[0013] Furthermore, spatially related terms may be used, such as "below," "lower," "above," "above," "higher," and similar terms. These spatially related terms are used to facilitate the description of the relationship between one or more elements or features in the diagram and another element or feature(s). These spatially related terms encompass different orientations of the device in use or operation, as well as the orientations described in the diagram. When the device is turned to different orientations (rotated 90 degrees or other orientations), the spatially related adjectives used will also be interpreted according to the orientation after the turn.
[0014] In the instruction manual, the terms "about," "approximately," and "roughly" usually indicate within 20%, 10%, 5%, 3%, 2%, 1%, or 0.5% of a given value or range. The given quantity is an approximate quantity; that is, even without specific mention of "about," "approximately," or "roughly," the meaning of "about," "approximately," or "roughly" can still be implied.
[0015] Figure 1 is a block diagram of an electronic device according to an embodiment of this disclosure. Referring to Figure 1, the electronic device (or component, circuit) 10 includes at least one hardware module 102 and a control module 104. The control module 104 is electrically connected to the at least one hardware module 102. For example, the electronic device 10 may be an embedded controller (EC) or a Super I / O (SIO) chip, but this disclosure is not limited thereto. The at least one hardware module 102 may include a central processing unit (CPU), a direct memory access (DMA), and at least one of other functional modules (or intellectual property (IP)), but this disclosure is not limited thereto.
[0016] As described above, the control module 104 is used to determine (e.g., estimate) the duration of a standby (or idle) state (in which the electronic device 10 or central processing unit is located), wherein the duration corresponds to a specific period. It is worth noting that the duration of the standby state can be actively (pre-determined) by firmware, and the control module 104 can passively determine the duration of the standby state.
[0017] Based on the time duration, the control module 104 performs at least one operation. The at least one operation includes: identifying a plurality of (pending or backlogged) tasks associated with a first schedule, wherein the plurality of tasks includes a first task and at least one second task, and that the first task cannot be executed in the standby state (i.e., the standby state is unavailable for executing the first task). For example, the first task can only be executed after the standby state has ended.
[0018] The at least one operation further includes: when it is determined that the specific period is available for performing the at least one second task, determining a second schedule for the plurality of tasks, and controlling the at least one hardware module 102 to perform the at least one second task according to the second schedule. In other words, the at least one hardware module 102 performs the at least one second task according to the second schedule instead of the first schedule.
[0019] According to the first schedule (and the first task), the at least one second task is executed after the specific period (i.e., according to the first schedule, the at least one second task cannot be executed within the specific period). According to the second schedule, the at least one second task is executed within the specific period.
[0020] In other words, at least one second task associated with the first schedule is postponed. Compared to the first schedule, the at least one second task associated with the second schedule has an earlier execution order.
[0021] In some embodiments, the first schedule may indicate that at least one second execution order of the at least one second task is later than a first execution order of the first task. The second schedule may indicate that the at least one second execution order of the at least one second task is earlier than the first execution order of the first task. In some embodiments, the first schedule may indicate that the first execution order is an earliest execution order. The second schedule may indicate that one of the at least one second execution order is the earliest execution order. That is, the plurality of tasks associated with the first schedule cannot be executed during that particular period.
[0022] In some embodiments, the operation of performing the at least one operation may include, depending on the duration, performing the at least one operation when the duration is not less than a threshold (e.g., 3 seconds). That is, the specific time period may have fragmented time, so the control module 104 decides to process the backlog of tasks. When the duration is less than the threshold, the at least one operation is disabled. That is, the specific time period may not have fragmented time, so the control module 104 decides not to process the backlog of tasks. In some embodiments, the threshold may be (pre-determined) by the control module 104.
[0023] It is worth noting that when the duration is not higher than a second threshold, the electronic device 10 or the central processing unit is in the standby state, wherein the second threshold is higher than the threshold. When the duration is higher than the second threshold, the electronic device 10 or the central processing unit (triggered by firmware) is in the sleep state.
[0024] In some embodiments, the control module 104 may determine the duration of the standby state based on at least one associated information (or condition, parameter) of the standby state. The at least one associated information may include at least one of the following: a previous duration of the standby state (e.g., statistically or averaged), and a function type called by the electronic device 10 (or central processing unit) before entering the standby state. Each function type may correspond to its respective duration. For example, a function type associated with "reading data from FLASH and submitting it to a CHIP SET" may correspond to 300 nanoseconds (ns).
[0025] In some embodiments, the at least one operation may further include: determining that a specific period is available for executing the at least one second task when the total time length of the at least one second task is not greater than the total time length. In some embodiments, the at least one operation may further include: determining that a specific period is not available for executing the fourth task when the time length of a fourth task (not shown in the figure) among the plurality of tasks is greater than the total time length. Determining that a specific period is not available for executing the fifth task when the total time length of a fifth task (not shown in the figure) and the at least one second task is greater than the total time length. In some embodiments, the first schedule indicates that a fourth execution order of the fourth task is later than the first execution order of the first task. The control module 104 does not adjust the fourth execution order of the fourth task.
[0026] In some embodiments, the first task may have a higher priority (i.e., a primary task). The at least one second task may have a lower priority (i.e., a secondary task). In some embodiments, the specific period may be located between two adjacent tasks with a higher priority.
[0027] In some embodiments, the first task may be driven or triggered by a firmware. The at least one second task may be driven or triggered by the at least one hardware module. In some embodiments, the specific period may be located between two adjacent tasks driven by the firmware.
[0028] In some embodiments, the control module 104 may be further configured to: determine whether the electronic device 10 or the central processing unit is in the standby state based on at least one hardware status signal from the at least one hardware module. For example, the at least one status signal may include at least one of a program counter, a status bit, a nested vectored interrupt controller (NVIC), and other hardware states, but this disclosure is not limited thereto. In some embodiments, when it is determined that the electronic device 10 or the central processing unit is in the standby state, the control module 104 may determine the duration of the standby state.
[0029] In some embodiments, the execution time of the first task is fixed. That is, even though the first schedule is adjusted to the second schedule, the control module 104 does not adjust (or is unable to adjust) the execution time of the first task. In some embodiments, the execution time may be determined by firmware. For example, the execution time is after the end of a specific period.
[0030] Figure 2 is a block diagram of a control module according to an embodiment of this disclosure. Please refer to Figure 2. The control module 104 may include: a scheduling / dispatch module 2042 and a monitor module 2044. The scheduling module 2042 may be electrically connected to the at least one hardware module 102. The monitor module 2044 may be electrically connected to the scheduling module 2042 and the at least one hardware module 102. The monitor module 2044 may be used to: determine the duration of the standby state; and, based on the duration, enable or start the scheduling module 2042 (e.g., by sending a trigger signal). When enabled, the scheduling module 2042 may perform at least one operation (e.g., control the at least one hardware module 102 to perform an operation).
[0031] In some embodiments, the control module 104 may further include a storage module 2046. The storage module may be electrically connected to the monitoring module 2044. The storage module may store at least one associated information of the standby state and at least one of the time duration. The monitoring module 2044 may access / read / load the at least one associated information from the storage module to determine the time duration of the standby state. For example, the storage module may include at least one of a memory and a register, but this disclosure is not limited thereto. The memory may be non-volatile memory (NVM).
[0032] Figure 3 is a timing diagram illustrating the execution order of multiple tasks. Referring to Figure 3, the horizontal axis represents the time axis, and tasks M1 to M5 are associated with the first schedule. Task M1 is executed first, and the (preset) execution order of tasks M2 to M5 is {M2, M3, M4, M5}.
[0033] For example, tasks M1 and M2 can be driven by firmware (also known as primary tasks), while tasks M3 through M5 can be driven by hardware (also known as secondary tasks). The firmware can control the electronic device (e.g., the central processing unit) to remain in standby mode for a specific period between the execution of task M1 and the start of task M2 (e.g., because the length of this specific period does not exceed a threshold). Task M1 can take 700 ns and consume 1 nW / ns of power. Task M2 can take 550 ns and consume 1 nW / ns of power. Task M3 can take 100 ns and consume 1 nW / ns of power. Task M4 can take 150 ns and consume 1 nW / ns of power. Task M5 can take 350 ns and consume 1 nW / ns of power. The specific standby period of the electronic device (e.g., the central processing unit) can be 300 ns. The idle time power consumption during this specific period can be 0.5 nW / ns.
[0034] Task M2, driven by firmware, cannot be executed in standby mode (i.e., cannot be executed within a specific period). Therefore, tasks M3 to M5, scheduled after task M2, are correspondingly shelved (i.e., cannot be executed within a specific period). In other words, the specific period is not being used effectively.
[0035] In this case, the total time consumed is: 700ns + 300ns + 550ns + 100ns + 150ns + 350ns = 2150ns, and the total power consumption is: 1850*1 + 300*0.5 = 2000nW.
[0036] Figure 4 is a timing diagram illustrating the adjusted execution order of a plurality of tasks according to an embodiment of this disclosure. An electronic device (e.g., control module 104, monitoring module 2044) can determine / estimate the duration of a specific period of standby state of the electronic device (e.g., central processing unit) as 300 ns. The electronic device (e.g., control module 104, scheduling module 2042) can identify that task M1 is executed first, and that the (preset) execution order of tasks M2 to M5 is {M2, M3, M4, M5}.
[0037] To effectively utilize a specific period, electronic devices (e.g., control module 104, monitoring module 2044) can determine whether the specific period can be used to execute at least one of the postponed tasks M3 to M5. The total duration of tasks M3 and M4 (100 + 150 = 250 ns) is shorter than the duration of the specific period (300 ns). Therefore, the electronic devices (e.g., control module 104, scheduling module 2042) can determine that the specific period can be used to execute tasks M3 and M4, and can adjust the execution order of tasks M2 to M5 to {M3, M4, M2, M5}, so that tasks M3 and M4 are executed earlier (i.e., reducing the number of postponed tasks), meaning tasks M1 to M5 are associated with the second schedule. It is worth noting that the duration of task M5 (350 ns) is longer than the duration of the specific period (300 ns). Therefore, the electronic devices (e.g., control module 104, scheduling module 2042) can further determine that the specific period cannot be used to execute task M5.
[0038] In this case, the total time consumed is: 700ns + 100ns + 150ns + 50ns + 550ns + 350ns = 1900ns, and the total power consumption is: 1850*1 + 50*0.5 = 1875nW.
[0039] Therefore, according to the embodiments disclosed herein, the standby / idle period is effectively utilized, reducing the overall standby time (from 300ns to 50ns), thereby reducing the overall power consumption (from 2000nW to 1875nW).
[0040] Based on the above embodiments, the following control method can be obtained (e.g., summarized as follows). Figure 5 is a schematic flowchart of a control method according to an embodiment of this disclosure. This control method is applicable to an electronic device, wherein the electronic device includes a control module and at least one hardware module. This control method includes the following steps:
[0041] In step S502, the duration of the standby state is determined by the control module, where the duration corresponds to a specific period, and then step S504 is executed.
[0042] In step S504, a plurality of tasks associated with the first schedule are identified through the control module, wherein the plurality of tasks include a first task and at least one second task, and then step S506 is executed.
[0043] In step S506, the control module determines whether the time length is lower than a threshold. If the time length is lower than the threshold, step S508 is executed. If the time length is not lower than the threshold, step S510 is executed.
[0044] In step S508, at least one second task is executed according to the first schedule via at least one hardware module (e.g., triggered / controlled by the control module). Furthermore, multiple tasks are also executed according to the first schedule. That is, the control module decides / considers not to preprocess backlogged tasks.
[0045] In step S510, the control module determines whether a specific period can be used to execute at least one second task. That is, the control module decides / considers the possibility of processing backlogged tasks in advance. If the specific period cannot be used to execute at least one second task, step S512 is executed. If the specific period can be used to execute at least one second task, step S514 is executed.
[0046] In step S512, at least one second task is executed according to the first schedule via at least one hardware module (e.g., triggered / controlled by a control module). Furthermore, a plurality of tasks are also executed according to the first schedule.
[0047] In step S514, the control module determines the second schedule for the plurality of tasks, and then step S516 is executed.
[0048] In step S516, at least one second task is executed according to the second schedule via at least one hardware module (e.g., triggered / controlled by a control module) so that at least one second task is executed within a specific period. Furthermore, a plurality of tasks are also (instead) executed according to the second schedule.
[0049] Based on the above embodiments, the following control method can be obtained (e.g., summarized as follows). Figure 6 is a schematic flowchart of a control method according to an embodiment of this disclosure. This control method is applicable to an electronic device, wherein the electronic device includes a control module and at least one hardware module, and the control module includes a monitoring module and a scheduling module. This control method includes the following steps:
[0050] In step S602, the duration of the standby state is determined by the monitoring module, where the duration corresponds to a specific period, and then step S604 is executed.
[0051] In step S604, the monitoring module determines whether the time length is lower than a threshold. If the time length is lower than the threshold, step S606 is executed. If the time length is not lower than the threshold, step S610 is executed.
[0052] In step S606, the scheduling module identifies a plurality of tasks associated with the first schedule, wherein the plurality of tasks includes the first task and at least one second task, and then step S608 is executed. That is, the monitoring module decides / considers not to process the backlog of tasks in advance and disables the scheduling module.
[0053] In step S608, at least one second task is executed according to the first schedule via at least one hardware module (e.g., triggered / controlled by a control module). Furthermore, a plurality of tasks are also executed according to the first schedule.
[0054] In step S610, the scheduling module identifies a plurality of tasks associated with the first schedule, wherein the plurality of tasks includes the first task and at least one second task, and then step S612 is executed. That is, the monitoring module decides / considers the possibility of processing the backlog of tasks in advance and enables the scheduling module.
[0055] In step S612, the scheduling module determines whether a specific period is available to execute at least one second task. If the specific period is not available to execute at least one second task, step S614 is executed. If the specific period is available to execute at least one second task, step S616 is executed.
[0056] In step S614, at least one second task is executed according to the first schedule via at least one hardware module (e.g., triggered / controlled by a control module). Furthermore, a plurality of tasks are also executed according to the first schedule.
[0057] In step S616, a second schedule for multiple tasks is determined through the scheduling module, and then step S618 is executed.
[0058] In step S618, at least one second task is executed according to the second schedule via at least one hardware module (e.g., triggered / controlled by a control module) so that at least one second task is executed within a specific period. Furthermore, a plurality of tasks are also (instead) executed according to the second schedule.
[0059] In summary, the electronic device and control method disclosed herein can effectively utilize standby / idle periods, thereby reducing overall standby time and overall power consumption.
[0060] Although this application has disclosed the above embodiments, it is not intended to limit the disclosure. Any modifications and alterations made by those skilled in the art to the above embodiments without departing from the spirit and scope of the disclosure shall still fall within the scope of the technology protected by the disclosure. Therefore, the scope of protection of the disclosure shall be determined by the scope of the patent application.
[0061] 10: Electronic devices 102: At least one hardware module 104: Control Module 2042: Scheduling Module 2044: Monitoring Module 2046: Storage Module M1, M2, M3, M4, M5: Tasks S502, S504, S506, S508, S510, S512, S514, S516: Steps S602, S604, S606, S608, S610, S612, S614, S616, S618: Steps
Claims
1. An electronic device comprising: at least one hardware module; and a control module electrically connected to the at least one hardware module, configured to: determine a duration of a standby state, wherein the duration corresponds to a specific period; and perform at least one operation based on the duration, wherein the at least one operation comprises: identifying a plurality of tasks associated with a first schedule, wherein the plurality of tasks includes a first task and at least one second task, and the first task cannot be executed in the standby state; and when it is determined that the specific period is available for executing the at least one second task, determining a second schedule for the plurality of tasks, and controlling the at least one hardware module to execute the at least one second task according to the second schedule, wherein: The first task has a higher priority and the at least one second task has a lower priority. According to the first schedule, the at least one second task is executed after the specific period, and according to the second schedule, the at least one second task is executed within the specific period.
2. The electronic device as described in claim 1, wherein: The first schedule indicates that at least one second execution order of the at least one second task is later than a first execution order of the first task, and the second schedule indicates that the at least one second execution order of the at least one second task is earlier than the first execution order of the first task.
3. The electronic device as claimed in claim 1, wherein the operation of performing the at least one operation according to the duration of time includes: performing the at least one operation when the duration of time is not less than a threshold; and disabling the at least one operation when the duration of time is less than the threshold.
4. The electronic device as claimed in claim 1, wherein the control module determines the duration of the standby state based on at least one piece of associated information of the standby state, wherein the at least one piece of associated information includes at least one of the following: a previous duration of the standby state, and a function type called by the electronic device before entering the standby state.
5. The electronic device as claimed in claim 1, wherein the control module comprises: a scheduling module electrically connected to the at least one hardware module for: performing the at least one operation when enabled; and a monitoring module electrically connected to the scheduling module and the at least one hardware module for: determining the duration of the standby state; and enabling the scheduling module based on the duration.
6. The electronic device as claimed in claim 5, wherein the control module further comprises: a storage module electrically connected to the monitoring module for: storing at least one of the associated information of the standby state and at least one of the time length.
7. The electronic device as claimed in claim 1, wherein the at least one operation further comprises: determining that a particular period is available for performing the at least one second task when the total duration of the at least one second task is not greater than the duration.
8. The electronic device as claimed in claim 1, wherein: The first task is driven by a firmware, and the at least one second task is driven by the at least one hardware module.
9. The electronic device as claimed in claim 1, wherein the control module is further configured to: determine whether the electronic device is in the standby state based on at least one hardware status signal from the at least one hardware module.
10. A control method applicable to an electronic device, wherein the electronic device includes at least one hardware module and a control module, and the control method includes: determining a duration of a standby state via the control module, wherein the duration corresponds to a specific period; and performing at least one operation via the control module according to the duration, wherein the at least one operation includes: identifying a plurality of tasks associated with a first schedule, wherein the plurality of tasks includes a first task and at least one second task, and the first task cannot be executed in the standby state; and when it is determined that the specific period is available for executing the at least one second task, determining a second schedule for the plurality of tasks, and controlling the at least one hardware module to execute the at least one second task according to the second schedule, wherein: The first task has a higher priority and the at least one second task has a lower priority. According to the first schedule, the at least one second task is executed after the specific period, and according to the second schedule, the at least one second task is executed within the specific period.