This application is based upon and claims the benefit of priority of the prior Japanese Patent Application No. 2016-047620, filed on Mar. 10, 2016, the entire contents of which are incorporated herein by reference.
The embodiments discussed herein are related to an information processing apparatus and a switching control method.
In an information processing apparatus represented by a smartphone, a wearable device, and the like, it is important to suppress the power consumption by a memory, serving as a component, in order to suppress the standby power consumption. Currently, a volatile memory, such as a dynamic random access memory (DRAM), is mainly used as a main memory. While a DRAM is high speed and inexpensive, the standby power consumption for retaining data is high.
Thus, a nonvolatile memory, such as a magneto resistive random access memory (MRAM), or the like, may conceivably be used as a main memory in place of a DRAM. However, in the case of an MRAM, power consumption during operation is higher than that of the DRAM.
However, since the current consumption of an MRAM is high in the operation state, the power consumption of an MRAM during operation (the operating power consumption) is higher than a DRAM. Accordingly, while simply replacing a DRAM with an MRAM may yield a power consumption reduction effect illustrated by (1) in some cases, but may conversely increase the power consumption due to the increase in the operation power consumption illustrated by (2).
For this reason, there is a technique in which, a nonvolatile memory is provided in addition to a volatile memory such as a DRAM, memory access requests are monitored, and a determination is accordingly made as to which of the volatile memory or the nonvolatile memory is operated as the main memory, based on the monitoring result.
Also, there is a technique that enables reduction in the power consumption of a mobile device by providing the mobile device with a control unit that controls the power supply to a memory unit that has to be refreshed and to an external memory unit that is capable of storing and retaining data without depending on the power supply.
Related-art techniques are disclosed in Japanese Laid-open Patent Publication Nos. 2014-232525 and 2004-199339.
According to an aspect of the invention, an information processing apparatus includes a volatile memory, a nonvolatile memory, and a processor coupled to the volatile memory and the nonvolatile memory, the processor configured to make a selection of the volatile memory or the nonvolatile memory to be supplied power, based on a first difference between power consumption of the volatile memory and power consumption of the nonvolatile memory during standby, and a second difference between power consumption of the volatile memory and power consumption of the nonvolatile memory during an operation state, and switch between the volatile memory and the nonvolatile memory to be supplied power on the basis of the selection and whether the volatile memory or the nonvolatile memory being used currently by the processor.
The object and advantages of the invention will be realized and attained by means of the elements and combinations particularly pointed out in the claims.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory and are not restrictive of the invention, as claimed.
When a volatile memory and a nonvolatile memory are used as a main memory, which memory is better used for lowering the power consumption differs depending on the operation state of an information processing apparatus. Accordingly, switching between the volatile memory and the nonvolatile memory to lower the power consumption according to the operation state of the information processing apparatus becomes an issue.
In the following, a detailed description will be given of an information processing apparatus, a switching control method, and a switching control program according to embodiments of the present disclosure with reference to the drawings. In this regard, the embodiments will not limit the disclosed technique.
First, a description will be given of a configuration of a smartphone according to a first embodiment.
The BBAP 2 is a processor for baseband and applications, and is an arithmetic processing unit that performs communication processing, information processing, and the like. The DRAM 3 is a volatile memory and stores programs to be executed by the BBAP 2, intermediate results of the execution, and the like. The MRAM 4 is a nonvolatile memory and stores programs to be executed by the BBAP 2, intermediate results of the execution, and the like in the same manner as the DRAM 3. The DRAM 3 and the MRAM 4 operate as the main memory and are used being switched by the BBAP 2.
The PMU 5 opens and closes the switch 12 based on an instruction from the BBAP 2 so as to perform on-off control of the DRAM 3 and the MRAM 4. The NAND flash 6 is a nonvolatile memory that stores programs and data. The programs stored in the NAND flash 6 are read into the DRAM 3 or the MRAM 4 and are executed by the BBAP 2.
The VS 7 is a device that inputs and outputs sound. The DTP 8 is a display device that displays a screen and includes a touch panel that accepts a user's operation on the screen. The sensor 9 is a device that measures temperature, and the like. The RF unit 10 is a module that performs wireless communication with a base station. The memory power source 11 is a device that supplies power to the memories. The switch 12 turns on and off the power to the DRAM 3 or the MRAM 4 under the control of the PMU 5.
Next, a description will be given of switching between the DRAM 3 and the MRAM 4.
As illustrated in
In
The reason for this is because as CT becomes larger, the standby period becomes longer compared with the operation period, and thus the power consumption becomes lower in the case in which the MRAM 4 is used. Accordingly, this enables power consumption of the smartphone 1 to be lowered by using the DRAM 3 when CT≦X, and using the MRAM 4 when CT>X.
Further, the value of X is larger when the activity is high, compared with the case in which the activity is low. The reason for this is that when the activity is high, there are many accesses to the main memory, making the operation power consumption high. Thus, in order to make the amount of increase in operation energy equal to the amount of decrease in standby energy, the standby period becomes longer.
Thus, smartphone 1 uses the DRAM 3 in the state in which (1)≦(2), and uses the MRAM 4 in the state in which (1)>(2). Namely, X is the value of CT when (1)=(2).
Next, a description will be given of the functional configuration of a switching control unit that switches between the DRAM 3 and the MRAM 4.
The storage unit 20a includes an allocation information storage unit 21 and a mode determination information storage unit 22. The control unit 20b includes an initialization unit 30, a monitoring unit 31, an X-point determination unit 32, a mode determination unit 33, a power source setting unit 34, and a swap unit 35. The control unit 20b is a processor, for example a central processing unit (CPU), or the like.
The allocation information storage unit 21 stores information regarding the allocation of the main memory to the DRAM 3 or the MRAM 4.
The memory area name is a name for identifying each memory area of the main memory. The determination result indicates a result of the determination as to which of the DRAM 3 or the MRAM 4 is better used for the memory area in order to lower the power consumption. “CT≦X” represents a determination result stating that the DRAM 3 is better used, and “CT>X” represents a determination result stating that the MRAM 4 is better used.
The allocation destination indicates whether the DRAM 3 is allocated to the memory area or the MRAM 4 is allocated to the memory area. “DRAM” represents that the DRAM 3 is allocated, and “MRAM” represents that the MRAM 4 is allocated. For example, in the memory area identified by “memory area #00”, it is determined that the DRAM 3 is better used, and thus the DRAM 3 is allocated.
The mode determination information storage unit 22 stores information for determining which of the DRAM use mode in which the DRAM 3 is used for the main memory or the MRAM use mode in which the MRAM 4 is used for the main memory is selected.
The DRAM operation power consumption data represents the operation power consumption of the DRAM 3. “@Activity=100%” indicates that the data is for the case in which the activity is 100%. The DRAM data retention power consumption data represents the power consumed for retaining data in the DRAM 3. “@Stand-by” indicates that the data is for the state in which the DRAM 3 is not operating.
The MRAM operation power consumption data represents the operation power consumption of the MRAM 4. The activity data represents the activity of the main memory. The activity data is data for each memory area. The operation period is the operation period of the smartphone 1. The standby period is the standby period of the smartphone 1. The mode determination information storage unit 22 may store the cycle time in place of the standby period.
The DRAM operation power consumption data, the DRAM data retention power consumption data, and the MRAM operation power consumption data are values that are obtained from the data sheets or values obtained by measurement and are fixed values. The activity data, the operation period, and the standby period are values obtained by monitoring the smartphone 1 and are variable values.
The initialization unit 30 performs initialization for switching control when the smartphone 1 is started. Specifically, the initialization unit 30 initializes the determination result and the allocation destination in the allocation information storage unit 21 to the DRAM use mode, and performs the initial setting of the activity data, the operation period, and the standby period in the mode determination information storage unit 22.
When the smartphone 1 is in the operation state, the monitoring unit 31 monitors CT and the activity, and writes the monitoring result in the mode determination information storage unit 22. The monitoring unit 31 monitors CT by monitoring the operation period and the standby period of the smartphone 1.
The X-point determination unit 32 performs X-point determination when the smartphone 1 is in the operation state. Here, the X-point determination represents comparing CT and X to determine if CT≦X or CT>X. CT is calculated from the operation period and the standby period of the smartphone 1.
As illustrated in
The mode determination unit 33 determines whether or not the currently used mode matches the determined mode when the smartphone 1 changes from the operation state to the standby state. Here, the currently used mode represents the memory currently allocated as the memory area, and is either the DRAM use mode or the MRAM use mode. The determined mode is the memory use mode based on the determination result by the X-point determination unit 32, and is either the DRAM use mode or the MRAM use mode.
If the currently used mode dose not match the determined mode, the mode determination unit 33 instructs the power source setting unit 34 and the swap unit 35 to perform memory switching processing. In this regard, the processing of the X-point determination unit 32 and the mode determination unit 33 is performed for each memory area.
The power source setting unit 34 sets the power sources to the DRAM 3 and the MRAM 4 to be turned on or off using the switch 12 based on the instruction from the mode determination unit 33.
As illustrated in
Namely, the DRAM in use is powered on all the time, and the unused DRAM is powered off all the time. Also, the MRAM in use is powered on during operation, and is powered off during standby. The unused MRAM is powered off all the time.
Also, as illustrated in
The swap unit 35 copies data of either one of the DRAM 3 or the MRAM 4 to the other based on an instruction from the mode determination unit 33. Namely, when the mode is changed from the DRAM use mode to the MRAM use mode, the swap unit 35 copies the data of the DRAM 3 to the MRAM 4, and when the mode is changed from the MRAM use mode to the DRAM use mode, the swap unit 35 copies the data of the MRAM 4 to the DRAM 3.
Next, a description will be given of the processing flow by the switching control unit 20.
The switching control unit 20 then determines whether or not the smartphone 1 is in operation (step S3). When the smartphone 1 is in operation, the switching control unit 20 performs the memory power source setting for operation period (step S4). In this regard, if the memory power source setting for the operation period is already set, nothing is performed. The switching control unit 20 then monitors the CT and the activity (step S5), and performs X-point determination (step S6). The switching control unit 20 then writes the determination result in the allocation information storage unit 21, and the processing returns to step S3.
When the smartphone 1 is not in operation, the switching control unit 20 determines whether or not the currently used mode and the determined mode are different (step S7). If they match, the processing proceeds to step S11. On the other hand, if the currently used mode and the determined mode are different, the switching control unit 20 turns on the power to the DRAM 3 and the MRAM 4 (step S8), and performs a swap between the DRAM 3 and the MRAM 4 (step S9). The switching control unit 20 then updates the determination result and the allocation destination in the allocation information storage unit 21 (step S10).
The switching control unit 20 then performs the memory power source setting for the standby period (step S11). In this regard, if the memory power source setting for the standby period has already been performed, nothing is performed. The processing of the switching control unit 20 returns to step S3.
In this manner, the switching control unit 20 is capable of allocating the DRAM 3 or the MRAM 4 to the main memory in order to lower the power consumption of the smartphone 1, by monitoring the CT and the activity, and performing the X-point determination. In this regard, in
Next, a description will be given of an example of the switching operation.
As illustrated in
Then, when it is determined that CT>X in the operation state, a memory swap is performed from the DRAM 3 to the MRAM 4 before going into the standby state, and the power consumption rises to the value corresponding to the swap operation (5). In the standby state, the power consumption decreases to the value corresponding to the MRAM standby, which is lower than the DRAM standby (3). When the state goes into the operation state, the power consumption rises the value corresponding to the MRAM operation, which is higher than the DRAM operation (4). In the following, as long as CT>X, the MRAM 4 is used.
Then, as illustrated in
Next, a description will be given of advantageous effect of the switching control according to the first embodiment.
For example, during Long Term Evolution (LTE) standby state, the operation period is about 30 milliseconds (msec) and the cycle time is 1.28 sec, making CT about 40, which is larger than X. The switching control unit 20 thereby determines the MRAM 4 to be used enabling the power consumption lowered by about 3 milliwatts (mW). This corresponds to a reduction of 1.5 milliamperes (mA) for the battery current. Assuming the total current of about 8 milliamperes (mA), including the current for the processor, this is reduced to 6.5 mA, and in case of a 3000 milliampere-hour (mAh) battery, the battery duration is extended from 375 hours to 460 hours, longer by 20% or more.
Also, when a sound signal with a bandwidth (BW) of 5 megahertz (MHz) is processed, the operation period is about 30 msec and the cycle time is about 100 msec, making CT of about 3, which is smaller than X. The switching control unit 20 thereby determines the DRAM 3 to be used, thus no increase in the power consumption over the current level will result. Simply replacing the DRAM 3 with the MRAM 4 would have increased about 10 to 20 mW of power consumption.
As described above, in the first embodiment, the X-point determination unit 32 compares CT and X in order to determine which of the DRAM 3 or the MRAM 4 to use. Namely, the X-point determination unit 32 compares the amount of reduction in standby energy with the amount of increase in operation energy if the DRAM 3 is replaced with the MRAM 4, in order to determine which of the DRAM 3 or the MRAM 4 to use. The mode determination unit 33 then determines whether or not the currently used mode and the determination result by the X-point determination unit 32 match. If they do not match, the power source setting unit 34 and the swap unit 35 perform processing called for in a memory switching.
The switching control unit 20 is thereby enabled to perform memory switching such that the amount of reduction in standby energy becomes larger than the amount of increase in operation energy when the DRAM 3 is replaced with the MRAM 4. This thereby enabled the power consumption of the smartphone 1 to be lowered.
In addition, in the first embodiment, the X-point determination unit 32 determines which of the DRAM 3 or the MRAM 4 to use based on the activity and CT. This enables the switching control unit 20 to control memory switching by monitoring the activity and CT.
In addition, in the first embodiment, when the MRAM 4 is used, the power source setting unit 34 turns off the power to the MRAM 4 in the standby state. This enables the switching control unit 20 to lower the power consumption of the smartphone 1.
Further, in the first embodiment, the switching control unit 20 performs memory switching at the time the operation state changes to the standby state, thereby enabling the influence to the operation of the smartphone 1 to be reduced.
In the above-described first embodiment, a description has been given of the case in which the DRAM 3 is used when CT≦X, and the MRAM 4 is used when CT>X. However, if CT fluctuates in the vicinity of X, switching between the DRAM 3 and the MRAM 4 occurs frequently.
Here, the number of times used indicates the number of times the same main memory use mode has been used in a row. The switching control unit 20 then writes the created initial data in the mode determination information storage unit 22. In this regard, the number of times of used is stored for each memory area in the mode determination information storage unit 22.
The switching control unit 20 then determines whether or not the smartphone 1 is in operation (step S13). If the smartphone 1 is in operation, the switching control unit 20 performs the memory power source setting for the operation period (step S14). The switching control unit 20 then monitors CT and the activity (step S15), and performs the X-point determination (step S16). The switching control unit 20 then writes the determination result in the allocation information storage unit 21, and the processing returns to step S13.
On the other hand, if the smartphone 1 is not in operation, the switching control unit 20 determines whether or not the currently used mode and the determined mode are different (step S17). Then, if they are different, the switching control unit 20 determines whether or not the currently used mode has been continuously used at least n times or more in the operation state (step S18). Here, n is a positive integer that indicates a threshold value of the number of times in which the currently used mode is to be continuously used.
If the currently used mode has been used at least n times or more in the operation state, the switching control unit 20 turns on the power to the DRAM 3 and the MRAM 4 (step S19), and performs a swap between the DRAM 3 and the MRAM 4 (step S20). The switching control unit 20 then updates the determination result and the allocation destination in the allocation information storage unit 21 (step S21), and initializes the number of times used to 1 (step S22). The switching control unit 20 then performs the memory power source setting for the standby period (step S23), and the processing returns to step S13.
In addition, if the number of continuous use in the operation state in the currently used mode is less than n times (step S18, No), or the currently used mode matches the determined mode (step S17, No), the switching control unit 20 adds 1 to the number of times used (step S24), and the processing proceeds to step S23.
Furthermore, in place of the number of times n of the continuous operation state, the number of seconds m after swapping may be used. In
As described above, in the second embodiment, the switching control unit 20 is enabled to avoid an increase in the power consumption when CT fluctuates in the vicinity of X, by performing control such that switching between the DRAM 3 and the MRAM 4 is suppressed until the currently used mode is used continuously at least n times or more in the operation state.
In place of the number of times n of the continuous operation state or the number of seconds m after swapping, it is possible to avoid an increase in the power consumption by a hysteresis determination method when CT fluctuates in the vicinity of X. Thus in a third embodiment, a description will be given of the case in which an increase in the power consumption when CT fluctuates in the vicinity of X is avoided by the hysteresis determination method.
Namely, when CT>Xd, the switching control unit 20 performs switching to the MRAM 4, and when CT≦Xm, the switching control unit 20 performs switching to the DRAM 3. For example, Xd is 1.1 times X, and Xm is 0.9 times X.
In this manner, by applying the switching determination point Xd>X when the DRAM is used and applying the switching determination point Xm<X when the MRAM is used, the switching control unit 20 is capable of exerting control such that the switching does not easily occur by the fluctuation of CT.
The switching control unit 20 then determines whether or not the smartphone 1 is in operation (step S33). When the smartphone 1 is in operation, the switching control unit 20 performs the memory power source setting for operation period (step S34). The switching control unit 20 then monitors CT and the activity (step S35).
The switching control unit 20 then determines whether or not the DRAM 3 is currently used (step S36). If the DRAM 3 is currently used, the switching control unit 20 performs the X-point determination using Xd (step S37). On the other hand, if the MRAM 4 is currently used, the switching control unit 20 performs the X-point determination using Xm (step S38). Then the switching control unit 20 writes the determination result in the allocation information storage unit 21, and the processing returns to step S33.
On the other hand, if the smartphone 1 is not in operation, the switching control unit 20 determines whether or not the currently used mode and the determined mode are different (step S39). If they match, the processing proceeds to step S43. On the other hand, if the currently used mode and the determined mode are different, the switching control unit 20 turns on the power to the DRAM 3 and the MRAM 4 (step S40), and performs a swap between the DRAM 3 and the MRAM 4 (step S41). The switching control unit 20 then updates the determination result and the allocation destination in the allocation information storage unit 21 (step S42). The switching control unit 20 then performs the memory power source setting for the standby period (step S43), and the processing returns to step S33.
As described above, in the third embodiment, the switching control unit 20 performs the switching control by the hysteresis determination method. This enables the switching control unit 20 to avoid the increase in the power consumption when the CT fluctuates in the vicinity of X.
Note that, in the first to the third embodiments, descriptions have been given of the smartphone 1. However, the present disclosure is not limited thereto. For example, it is possible to apply the present disclosure to the other information processing apparatuses, such as a wearable device, and the like, in the same manner.
Also, in the first to the third embodiments, the descriptions have been given of the case in which the smartphone 1 includes the DRAM 3 and the MRAM 4. However, the present disclosure is not limited thereto. It is possible to apply the present disclosure to the case in which another volatile memory is included in place of the DRAM 3, or the case in which another nonvolatile memory is included in place of the MRAM 4, in the same manner.
All examples and conditional language recited herein are intended for pedagogical purposes to aid the reader in understanding the invention and the concepts contributed by the inventor to furthering the art, and are to be construed as being without limitation to such specifically recited examples and conditions, nor does the organization of such examples in the specification relate to a showing of the superiority and inferiority of the invention. Although the embodiments of the present invention have been described in detail, it should be understood that the various changes, substitutions, and alterations could be made hereto without departing from the spirit and scope of the invention.
Number | Date | Country | Kind |
---|---|---|---|
2016-047620 | Mar 2016 | JP | national |