Selecting a startup condition of an electronic device corresponding to available power

According to an embodiment, a power control device includes a storage unit, a monitor, a determining unit, and a controller. The storage device stores a look-up table, which includes relationship between needed power consumptions and start-up conditions of an electronic device including a plurality of modules. The start-up condition of the electronic device is determined from the needed power consumption in the look-up table and specifies a power on/off status of the modules in the electronic device. The monitor monitors a voltage or available power supplied by a power source when the electronic device is activated. The determining unit determines a start-up condition corresponding to needed power consumption, which corresponds to the voltage or available power monitored by the monitor, with reference to the table. The controller sets a start-up condition of the electronic device to start up the electronic device in the start-up condition determined by the determining unit.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is based upon and claims the benefit of priority from Japanese Patent Application No. 2012-009288, filed on Jan. 19, 2012; the entire contents of which are incorporated herein by reference.

FIELD

Embodiments described herein relate generally to a control device, a control method, a computer program product, and an electronic device.

BACKGROUND

In the past, various techniques have been proposed to reduce the power consumption of an electronic device. For example, there is a technique in which data in a main memory or a processor is saved in a nonvolatile storage device when there is no input from the outside within a predetermined period of time, and power supply to the main memory or the processor is stopped so as to let an electronic device go into a sleep mode (low power mode). In the technique, when an input (for example, a wakeup event signal of exiting the sleep condition such as a touch operation of a panel or a mouse) is received from the outside in the sleep mode, the data saved in the nonvolatile storage device is returned into the main memory or the processor, and the electronic device is returned to a state before the electronic device goes into the sleep conditions as to restart a process.

In the traditional technique, when exiting the sleep mode, the electronic device goes into the same state as the state before the electronic device goes into the sleep mode, and thus an equivalent of power before the electronic device goes into the sleep mode is necessary. However, depending on states of a power source, the equivalent of the power before the electronic device goes into the sleep mode may not be obtained.

DETAILED DESCRIPTION

According to an embodiment, a power control device includes a storage unit, a monitor, a determining unit, and a controller. The storage device stores therein a look-up table, which includes relationship between needed power consumptions and start-up conditions of an electronic device including a plurality of modules. The start-up condition of the electronic device is determined from the needed power consumption in the look-up table and specifies a power on/off status of the modules included in the electronic device. The monitor monitors a voltage or available power supplied by a power source when the electronic device is activated. The determining unit determines a start-up condition corresponding to the needed power consumption, which corresponds to the voltage or available power monitored by the monitor, with reference to the look-up table. The controller sets a start-up condition of the electronic device to start up the electronic device in the start-up condition determined by the determining unit.

Hereinafter, various embodiments will be described in detail with reference to the accompanying drawings.

FIG. 1is a block diagram illustrating an example of an electronic device100which is a personal computer (PC) for example. As illustrated inFIG. 1, the electronic device100includes a processor10, a main memory20, a nonvolatile storage30, an input device40, a power control device60, a communication device66, a sleep control unit50, and a power source70. Herein, it may be considered that the electronic device100includes a plurality of modules which are individually controlled by power control device60. The module includes a module within the component and a component that may individually control power. For example, a module in a system on chip (SoC) including the processor10, the main memory20, and the nonvolatile storage30may be the module.

The processor10reads data (for example, an OS or application software of the electronic device100) from the main memory20and executes the programs, thereby controlling the entire operation of the electronic device100. The processor10includes a central processing unit (CPU) and registers (not illustrated). In addition, a cache memory (not illustrated), which stores a command or data that is frequent to be accessed by the processor10, is provided between the processor10and the main memory20. In the embodiment, the cache memory includes a first cache storing frequently used data and a secondary cache memory storing an overflow of data from the first cache memory. That is, the cache memory of the embodiment consists of two levels. The first cache memory is placed closer to the processor10in relation to the secondary cache memory.

The nonvolatile storage30consists of nonvolatile memories. The nonvolatile storage30can hold internal data even when power supply to the nonvolatile storage30is stopped.

The input device40is a device used for various inputs, and may be configured as, for example, a mouse or a keyboard.

The sleep control unit50changes a state of the electronic device100to a sleep mode when a predetermined condition is satisfied. Herein, the predetermined condition indicates that an input through the input device40is not performed for a predetermined period of time. However, the predetermined condition is not limited thereto, and may be arbitrarily set.

In the embodiment, when an input through the input device40is not performed for a predetermined period of time, the sleep control unit50saves data stored in the main memory20or the register inside the processor10into the nonvolatile storage30, and then controls the power source70such that power supply to the main memory20or the processor10is stopped. In this way, a state of the electronic device100, which has a predetermined limited number of modules to be supplied with power, goes into the sleep mode. It may be considered that the sleep mode is a state in which the electronic device100is temporarily stopped. Here, in the embodiment, power supply to the power control device60continues even in the sleep mode. When a process of changing a state to the sleep mode is completed, the sleep control unit50informs the power control device60that changing of a state to the sleep mode is completed. In this way, the power control device60monitors that a state of the electronic device100has gone into to the sleep mode.

The power control device60controls the electronic device100such that an operation is performed according to a state of the power source70. Detailed description of the power control device60will be made below. The function of communication device66is an exchange of data with an external device.

The power source70supplies power to each module included in the electronic device100. For example, the power source70includes a power generation module such as a solar cell, and a battery that saves power generated by the power generation module.

FIG. 2is a block diagram illustrating an example of a functional configuration of the power control device60. As illustrated inFIG. 2, the power control device60includes a storage unit61, a monitor62, a determining unit63, a control unit64, and a receiving unit65.

The storage unit61stores therein a power consumption table (a look-up table) that includes relationship between needed power consumptions and start-up conditions of the electronic device100. The start-up condition of the electronic device100indicates a condition in which the electronic device100starts up, and may include a condition in which an operation is stopped (for example, the sleep mode).FIG. 3is a diagram illustrating an example of the power consumption table. InFIG. 3, a “first condition” given as an example of a start-up condition indicates a condition in which power is supplied to all modules included in the electronic device100and an operating clock of the processor10is set to a normal value. A “second condition” indicates a condition in which power supply to a cache is stopped and an operating clock of the processor10is set to a smaller value than a normal value (a clock is set to a low speed). In the example ofFIG. 3, needed power consumption “X” corresponding to the first condition is set to a greater value than needed power consumption “Y” corresponding to the second condition. Herein, needed power consumption associated with each condition has a fixed value. However, the embodiment is not limited thereto, and needed power consumption associated with each condition has a predetermined range. For example, needed power consumption corresponding to the first condition may be set to a value in a range of X1(<X) to X2(>X), and needed power consumption corresponding to the second condition may be set to a value in a range of Y1(<Y) to Y2(>Y). In conclusion, needed power consumption associated with each condition may have a fixed value, or may have a predetermined range.

Returning back toFIG. 2, description is continued. The monitor62monitors a voltage or available power supplied by the power source70when the electronic device100is activated. As it is described below, the monitor62monitors available power (or alternatively, a voltage) supplied by the power source70when a wakeup event signal of cancelling the sleep mode is received by the receiving unit65. Herein, it may be considered that a time when the electronic device100is activated refers to a point in time at which a signal causing the electronic device100to be changed to an operable state is received by the receiving unit65. The determining unit63determines a start-up condition corresponding to power monitored by the monitor62(available power supplied by the power source70) with reference to the power consumption table stored in the storage unit61. In the example ofFIG. 3, when the power corresponding to the needed power consumption “X” is monitored by the monitor62, the first condition is determined as a start-up condition corresponding to the monitored power. In addition, for example, when the power corresponding to the needed power consumption “Y” is monitored by the monitor62, the second condition is determined as a start-up condition corresponding to the monitored power. In addition, for example, in the power consumption table, when power corresponding to the first condition is set to a value in the range of X1(<X) to X2(>X), and the power corresponding to the power “X” is monitored by the monitor62, a start-up condition corresponding to the monitored power is determined to be the first condition. Similarly, in the power consumption table, when power corresponding to the second condition is set to a value in the range of Y1(<Y) to Y2(>Y), and the power corresponding to the power “Y” is monitored by the monitor62, a start-up condition corresponding to the monitored power is determined to be the second condition. In conclusion, using the power consumption table stored in the storage unit61and power monitored by the monitor62, the determining unit63determines a start-up condition feasible with the monitored power.

The control unit64sets a start-up condition to start up the electronic device100in the star-up condition determined by the determining unit63. For example, when the start-up condition determined by the determining unit63is the first condition, the control unit64controls the power source70such that power is supplied to the entire modules included in the electronic device100, and sets an operating clock of the processor10to a normal value. In addition, when the start-up condition determined by the determining unit63is the second condition, the control unit64controls the power source70such that power supply to the cache is stopped, and power is supplied to each module other than the cache, and sets an operating clock of the processor10to a smaller value than the normal value.

Specifically, the power control device60(the control unit64) commands the power source70to supply a voltage value to the processor10and the main memory20depending on a type of condition (start-up condition stored in the power consumption table) determined by the determining unit63, and commands the power source70to supply a voltage value to the communication device66so that the communication device66operates. Further, the power control device60reports an operating clock when activating the processor10, and an operating clock of a clock supplied to the main memory20. Herein, depending on conditions, power that is necessary to use the communication device66is not enough. In this case, the power control device60requests the power source70not to supply power to the communication device66.

The receiving unit65receives a wakeup event signal of cancelling the sleep mode. In the embodiment, when a user operates the input device40(including a touch operation), the input device40sends a signal corresponding to the operation to the power control device60. In the embodiment, the signal from the input device40is the wakeup event signal. However, the embodiment is not limited thereto, and the wakeup event signal may be arbitrarily set.

When a signal is received from the input device40in the sleep mode, the power control device60changes a condition of the electronic device100from the sleep mode to a start up condition corresponding to available power supplied by the power source70at the point in time (this process is referred to as “change process”).FIG. 4is a flowchart illustrating an example of the change process performed by the power control device60. Hereinafter, the change process will be described in detail with reference toFIG. 4.

As illustrated inFIG. 4, when a wakeup event signal (for example, an input signal from the input device40) is received by the receiving unit65(Yes in step S1), the monitor62monitors available power (or alternatively, a voltage) supplied by the power source70at this point in time (step S2). That is, the monitor62monitors available power supplied by the power source70at a point in time when the wakeup event signal is received. Subsequently, the determining unit63determines a start-up condition corresponding to the power monitored in step S2by using the power monitored in step S2and a power consumption table stored in the storage unit61(step S3). In other words, the determining unit63determines a start-up condition feasible with available power supplied by the power source70at a point in time when the wakeup event signal is received. Subsequently, the control unit64sets a start-up condition of the electronic device100to start up the electronic device100in the start-up condition which is determined in step S3(step S4).

Specifically, according to the determined condition, the power control device60(control unit64) informs the power source70of a voltage supplied to the processor10and the main memory20, and commands an operating clock when the processor10is activated, and a frequency of a clock supplied to the main memory20. For example, in the start-up condition determined in step S3, when power enough to perform communication using the communication device66is present, the power source70is commanded to supply power to the communication device66so as to operate the communication device66. On the other hand, when power that is necessary to communicate using the communication device66is not enough, the power source70is commanded not to supply power to the communication device66. That is, in this case, when returning from the sleep mode, the electronic device100is activated without communicating with an external device.

As described in the foregoing, when a wakeup event signal is received in the sleep mode, the power control device60according to the embodiment controls the electronic device100to operate in a start-up condition feasible with available power supplied by the power source70at a point in time when the wakeup event signal is received. Accordingly, it is possible to operate the electronic device100within a range of available energy (power). That is, according to the embodiment, after exiting the sleep mode, the electronic device100may be set to an appropriate operating state (condition).

As an modification, when the electronic device100is operating (or in an operable state), the power control device60may monitor available power supplied by the power source70at predetermined intervals, and set the start-up condition of the electronic device100to start up the electronic device100in the start-up condition feasible with the monitored power. In this case, the control by the power control device60is referred to as a condition control, andFIG. 5is a flowchart illustrating an example of the condition control.

As illustrated inFIG. 5, first, the monitor62monitors available power (or alternatively, a voltage) supplied by the power source70at this point in time (step S10). Subsequently, the determining unit63determines a start-up condition corresponding to the monitored power by using the power monitored in step S10and a power consumption table stored in the storage unit61(step S11). In other words, the determining unit63determines a start-up condition feasible with available power supplied by the power source70at this point in time. Subsequently, the control unit64sets a start-up condition of the electronic device100to start up the electronic device100in the start-up condition which is determined in step S11(step S12).

Specifically, according to the determined condition, the power control device60(control unit64) informs the power source70of a voltage supplied to the processor10and the main memory20, and commands an operating clock when the processor10is activated, and a frequency of a clock supplied to the main memory20. For example, in the start-up condition determined in step S11, when power enough to perform communication using the communication device66is present, the power source70is commanded to supply power to the communication device66so as to operate the communication device66. On the other hand, when power that is necessary to communicate using the communication device66is not enough, the power source70is commanded not to supply power to the communication device66. The power control device60repeatedly performs the above-described condition control at predetermined intervals.

In addition, for example, the processor10may perform a checking process of checking a current condition of the electronic device100at predetermined intervals. In this way, the processor10may not inquire the power control device60about the current condition of the electronic device100. In addition, for example, the power control device60informs the processor10of a changed condition each time the electronic device100is changed to a determined condition. In this case, the processor10may perform the above-described checking process.

The above-described power control device60has a central processing unit (CPU), a ROM, a RAM, and a communication I/F device. A function of each of the above-described units (the monitor62, the determining unit63, the control unit64, and the receiving unit65) is implemented by a program, which is stored in a ROM. In addition, the invention is not limited thereto, and at least some of the functions of the respective units (the monitor62, the determining unit63, the control unit64, and the receiving unit65) may be implemented by a separate circuit (hardware).

Further, in the above-described embodiment, the power control device60and the processor10are constructed on separate chips. However, the invention is not limited thereto. For example, the above-described embodiment is implemented by using a system on chip (SoC) which includes the power control device60and the processor10.

In addition, a program executed by the above-described power control device60may be stored in a computer connected to a network such as the Internet, and be provided by downloading the program via the network. In addition, a program executed by the above-described power control device60may be provided or distributed via a network such as the Internet. In addition, a program executed by the power control device60according to the embodiments and modifications may be incorporated into a ROM in advance, and be provided.

The above-described embodiment may be applied, for example, when an available power of a battery is decreasing due to a self-discharge, or when an equivalent of power before the state change to the sleep mode may not be generated since a solar cell is being used. In particular, since a power generation of the solar cell varies in response to an external environment, it may be more likely to fail to obtain an equivalent of an available power before the state goes into the sleep mode. The above-described embodiment is effective in such a case.

In addition, for example, in a case where an available power (available power supplied by the power source70) which is present at a point in time when an electronic device is to be returned from the sleep mode is less than power before the electronic device goes into the sleep mode, and the available power is exhausted when a returning process of returning the electronic device100from the sleep mode is ended or when the returning process is being performed, the electronic device100may be in an inoperative state. The above-described embodiment is also effective in such a case.

Further, a type or the number of conditions stored in the power consumption table may be arbitrarily set. For example, the sleep mode and the power may be associated with each other in the power consumption table. In this configuration, when the power monitored by the monitor62indicates a sufficiently small value in step S2ofFIG. 4, and the sleep mode is determined in step S3ofFIG. 4as a condition associated with the power monitored in step S2, the electronic device100returns to the sleep mode again (step S4ofFIG. 4).