Memory management for power saving
By configuring the retention or non-retention state of the memory unit and optimizing power consumption based on its usage history, the problem in the existing technology that the memory cannot further reduce power consumption in low-power mode is solved, and a balance between data security and power consumption management is achieved. .
Patent Information
- Application Number
- CN202011413947.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2019-12-04
- Filing Date
- 2020-12-03
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2040-12-03
AI Technical Summary
Existing memories cannot further reduce power consumption in low-power modes without losing data.
A system is designed, including multiple writable memory units. Each unit can be configured as a holding state or a non-holding state. The controller configures the unit state according to the memory usage history. Units that have not experienced write access are set to Non-retentive state, the unit undergoing write access is set to the retained state, enabling multiple operating modes to optimize power consumption.
Without losing data, it effectively reduces the power consumption of the memory and provides users with the flexibility to select operating modes through commands, achieving optimal management of power consumption.
Smart Images

Figure CN112904990B_ABST
Abstract
Description
[0001] Priority claim
[0002] This application claims the priority of French Patent Application No. 1913749 filed on December 4, 2019, the contents of which are hereby incorporated herein by reference in their entirety to the maximum extent permitted by law. Technical Field
[0003] This document relates to the field of memory management for the purpose of saving power. Background Art
[0004] The system is configurable in a first mode of operation and a second mode of operation consuming less power, which modes may be selected by means of user commands.
[0005] In the first mode of operation, the memory retains all of its stored data until a subsequent power failure.
[0006] In the second operating mode, the memory does not hold any data, thus achieving power saving.
[0007] There is a need to control the memory so as to further reduce the power consumption of the memory without losing any data stored in the memory. Summary of the invention
[0008] According to a first aspect, a system comprises: a memory, the memory comprising a plurality of writable memory cells, each memory cell being configurable in a retention state and a non-retention state, in which the memory cell is capable of retaining data until the memory cell is subsequently powered off, and in which the memory cell does not retain data and consumes less power than in a first state. The system also comprises a controller configured to: configure any memory cell of the memory that has undergone at least one write access since it was last powered on to a retention state; and configure at least one memory cell of the memory that has not undergone any write access since it was last powered on to a non-retention state.
[0009] The system according to this first aspect may include the following optional features, which may be employed individually or in combination when technically feasible.
[0010] Preferably, the controller is configured to configure any memory cell of the memory which has not undergone any write access since it was last powered up, into a non-retention state.
[0011] Preferably, the memory is configurable in multiple modes. The multiple modes include: a first mode in which any memory cell of the memory that has undergone at least one write access since it was last powered on is in a retention state, and at least one memory cell of the memory that has not undergone any write access since it was last powered on is in a non-retention state; and at least one other mode in which all memory cells of the memory are in the same state.
[0012] Preferably, the multiple modes further include a second mode in which all memory cells are in a retention state. The multiple modes further include a third mode in which all memory cells are in a non-retention state.
[0013] Preferably, the first mode is a mode in which at least one system clock is deactivated.
[0014] Preferably, the system comprises an interface for receiving a user instruction requesting that the memory be configured into one of a plurality of modes.
[0015] Preferably, the controller is configured to not authorize individual configuration of states of memory cells of the memory by means of user commands received by the interface.
[0016] Optionally, the memory is a volatile memory, such as RAM memory.
[0017] Optionally, the system is of system-on-chip (SoC) type.
[0018] According to a second aspect, a method for controlling a memory comprising a plurality of writable memory cells is provided, each memory cell being configurable in a retention state, in which the memory cell is capable of retaining data until the memory cell is subsequently powered off, and in a non-retention state, in which the memory cell does not retain data and consumes less power than in the retention state. The method comprises the steps of: configuring any memory cell of the memory that has undergone at least one write access since it was last powered on to be in the retention state; and configuring at least one memory cell of the memory that has not undergone any write access since it was last powered on to be in the non-retention state. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Other features, objects and advantages of the present invention will appear from the following description, which is illustrative only and not restrictive, and which should be read with reference to the accompanying drawings, in which:
[0020] Figure 1 schematically illustrates a system according to an embodiment;
[0021] Figure 2 Schematically illustrates Figure 1The internal organization of the system's memory;
[0022] Figure 3 is a flow chart of steps performed during a write request of a method according to an embodiment;
[0023] Figure 4 is a flow chart of steps performed during an erase request of a method according to an embodiment; and
[0024] Figure 5 is a flow chart of steps for changing an operating mode of a memory according to a method of an embodiment.
[0025] Similar elements are provided with the same reference numerals throughout the drawings. DETAILED DESCRIPTION
[0026] refer to Figure 1 , a system 1 (such as a system on chip (SoC)) includes at least one storage device 2, a command receiving interface 4 and at least one main circuit module 6.
[0027] The main circuit module 6 is generally a processor configured to execute program codes.
[0028] The storage device 2 includes a memory 8 and a controller 10 for controlling the memory 8 .
[0029] The memory 8 can be written (or even read) by the main circuit module 6 .
[0030] The memory 8 is volatile in the sense that any data stored in the memory will be lost during a power failure of the memory 8. The memory 8 is for example of RAM type.
[0031] refer to Figure 2 The memory 8 includes a plurality of memory cells 8a, 8b, 8c, 8d, and 8e. Each of the memory cells 8a to 8e can be configured to be in a retention state and in a non-retention state.
[0032] In the retention state, the memory cells 8a to 8e are able to retain data until the memory cells are subsequently powered off.
[0033] In the non-retention state, the memory cells 8a to 8e do not retain data, and consume less power than in the retention state of the memory cells.
[0034] Different memory cells 8a to 8e can be configured to one or the other of these states independently of one another. In other words, different memory cells 8a to 8e from the memory 8 can be configured to different states.
[0035] The size of one of the memory units 8a to 8e has a size between 1 kilobyte and 128 kilobytes, for example 64 kilobytes.
[0036] The number of memory cells of the memory 8 is, for example, between 1 and 20 (in Figure 2 In the exemplary embodiment illustrated in FIG. 1 , this number is five). The memory 8 has a total size that is equal to the sum of the respective sizes of its memory cells. For example, this total size is 320 kilobytes.
[0037] The memory 8 is configurable in several operation modes: a first mode referred to as RUN mode; a second mode referred to as STOP mode; and a third mode referred to as STANDBY mode.
[0038] Among the three operation modes mentioned above, the run mode is the mode that consumes the most power. When the memory 8 is in the run mode, all memory cells 8a to 8e of the memory 8 are in a hold state. This run mode is usually used during the execution of a program by the main circuit module 6. In the run mode, all clocks of the system are activated.
[0039] Compared with the operation mode, the standby mode is a low power consumption mode. In the standby mode, all memory cells 8a to 8e of the memory 8 are in a non-holding state. In this mode, power is not directly supplied to the memory 8. Therefore, in this mode, no matter which memory cell data is written, the data cannot be held by the memory 8. In the standby mode, all clocks in the system are deactivated.
[0040] The stop mode is in turn an intermediate mode which consumes less power than the run mode, but which potentially consumes more power than the standby mode. In the stop mode, the memory cells of the memory 8 can be in different states from each other. Thus, in the stop mode, data can be retained by the memory 8, but the retention capacity depends on the memory cell 8a to 8e considered. In the stop mode, at least one clock of the system is deactivated.
[0041] The function of the controller 10 is to configure the memory 8 to one operation mode or another operation mode among the three operation modes of run, stop and standby.
[0042] It should be noted that these operating modes RUN, STOP and STANDBY are operating modes of the memory 8 which can be selected by the user by means of commands transmitted to the system 1 via the command receiving interface 4 .
[0043] For example, the controller 10 is a programmable circuit (FPGA) or a non-programmable circuit (ASIC).
[0044] The function of the controller 10 is to configure the respective states of the memory cells 8 a to 8 e of the memory 8 according to a user command to configure the memory 8 to one of the overall operation modes of the memory 8 , namely, run, stop and standby.
[0045] Unlike the run, stop and standby operating modes of the memory 8, the individual states of the memory cells 8a to 8e of the memory 8 cannot be individually adjusted by user commands. The function of the controller 10 is to adjust these states according to the commands received, and this is done automatically according to the logic explained below.
[0046] The controller 10 includes a plurality of registers 12 including a mode register and a write register.
[0047] The mode register is configured to store the current operation mode of the memory 8 (that is, the most recent operation mode requested by a command received from outside the system 1 via the interface 4 ).
[0048] Furthermore, write registers are associated with the memory cells 8a to 8e, respectively. In other words, each memory cell 8a to 8e is associated with a write register specific to that memory cell (in Figure 2 In the exemplary embodiment illustrated in FIG. 1 , it is assumed that there are five write registers. As will be seen in more detail below, the write register associated with a memory cell 8 a to 8 e indicates whether at least one write to data has occurred in that memory cell since the last power-up of the system 1 .
[0049] For example, writing to a register could store:
[0050] A first value, such as zero, is provided to indicate that no write has occurred in the associated memory cell of the memory cells 8a to 8e since the last power up of the system 1 .
[0051] A second value, such as one, to indicate that at least one write has occurred in the associated memory cell of the memory cells 8a to 8e since the last power up of the system 1 .
[0052] Therefore, the write register can be encoded on a single bit.
[0053] Furthermore, the controller comprises a processing unit 14 configured to process access requests to the memory 8 originating from the main circuit module 6 and to process commands originating from the interface 4 for reconfiguring the memory to a new operating state.
[0054] The processing unit 14 can relay an access request to the memory unit issued by the main circuit module of the system 1 .
[0055] The system 1 may include a plurality of storage devices 2 according to the above description. Each of these devices 2 includes a memory 8 and a controller 10 for specifically controlling the memory 8. In addition, the same number of controllers 10 as memories 8 are present in the system 1.
[0056] When the system 1 comprises several memories, these memories may be of variable size and / or used for different purposes.
[0057] For example, the system 1 may include: a first memory dedicated to storing execution data (particularly an execution stack); a second memory dedicated to storing security data (such as correction codes); and a third memory constituting an extension of the first memory.
[0058] The system 1 described above, and in particular the controller 10, operates in the following manner.
[0059] Initialization of the controller:
[0060] When the system 1 is powered on, the write registers of the controller 10 are all set to zero.
[0061] Furthermore, the mode register is set to a default mode among the different modes available (eg, stop mode).
[0062] Write access:
[0063] When the main circuit module 6 issues a request to write data into the memory 8, the reference Figure 3 Implement the following steps.
[0064] A write request is received by the controller 10 (step 100). A write request typically comprises a write address in the memory 8 and data to be written to the memory 8, these data occupying a size indicated in the write request or a size that can be inferred therefrom.
[0065] The controller 10 determines the memory unit 8a to 8b requested as the target in the memory 8 based on the write request, that is, the memory unit whose content is updated by writing (step 102). This determination 102 can be implemented before writing to the memory 8, during writing to the memory 8, or after writing to the memory 8.
[0066] The write register associated with each memory cell targeted by the write request is set to one by the controller 10 (step 104). For example, the setting to one is performed once the write is valid.
[0067] On the other hand, the write registers of the memory cells in the memory 8 that are not affected by the write request are not modified in step 104 .
[0068] Furthermore, the controller 10 checks the content of the current operation mode of the memory 8 by reading the content of the mode register (step 106).
[0069] In the particular case where the operating mode is the stop mode (step 108), the controller 10 switches each memory cell identified during step 102 to a retention state (step 110).
[0070] On the other hand, the controller 10 does not change the respective states of the memory cells 8a to 8e that are not affected by the write request. Furthermore, if the current operation mode is not the stop mode, the control does not implement step 110.
[0071] Clearing a memory cell:
[0072] When the main circuit module 6 issues an erase request for the data stored in the memory 8, the reference Figure 4 Implement the following steps.
[0073] Such an erase request may be issued for security reasons, for example when unauthorized access to the system or even to the memory 8 is detected.
[0074] An erase request is received by the controller 10 (step 200). The erase request generally includes an erase address and the size of the data to be erased.
[0075] The controller 10 determines, based on the erase request, at least one memory cell of the memory 8 that is requested as a target to be completely erased at the end of the requested erase (step 202). In this context, the phrase "completely erased" means that the memory cell no longer contains any readable data after erasure.
[0076] This determination 202 may be carried out before erasing in the memory 8 , during erasing in the memory 8 , or after erasing in the memory 8 .
[0077] The write register associated with each memory cell 8a to 8e determined during step 202 is set to zero by the controller 10 (step 204). This setting to zero is implemented, for example, once the erase is validated.
[0078] On the other hand, the write registers of the memory cells of the memory 8 which have not been completely cleared by the erase are not modified during step 204 .
[0079] Furthermore, the controller 10 checks the current operating mode of the memory 8 (step 206). In the particular case that the operating mode is the stop mode (step 208), the controller 10 switches each memory cell determined during step 202 to a non-retention state (step 210).
[0080] The controller 10 does not change the corresponding states of the memory cells that are not completely cleared by the erase request. In addition, if the current operation mode is not the stop mode, the controller does not implement step 210.
[0081] Memory configuration in the new operating mode:
[0082] When the interface 4 receives a command for configuring the memory 8 to one of the above-mentioned operating modes (run, stop or standby), then reference is made to Figure 5 Implementation steps.
[0083] The command received by the interface 4 is transmitted to the controller 10 .
[0084] The controller 10 compares the operating mode targeted by the received command with the current operating mode indicated in an internal mode register of the controller (step 302).
[0085] If the two compared patterns are identical, the controller 10 does not process the received command.
[0086] If the two compared patterns are different, the controller 10 determines the target state to which each memory cell of the memory 8 is to be switched based on the received command.
[0087] If the received command requests to configure the memory 8 to the operating mode, the controller 10 switches all memory cells to the retention mode unless they are already in the retention mode (step 304).
[0088] If the received command requests that the memory 8 be configured in the standby mode, the controller 10 switches all memory units to the non-retention mode unless they are already in the non-retention mode (step 306).
[0089] If the received command requests that the memory 8 be configured in stop mode, the controller 10 adopts a better and possibly heterogeneous configuration strategy for the memory cells 8a to 8e. In fact, the controller 10 configures any memory cell of the memory 8 that has undergone at least one write access since its last power-on to a retention state (step 310). Furthermore, during step 310, the controller 10 configures at least one memory cell of the memory 8 that has not undergone any write access since its last power-on to a non-retention state, or even any memory cell that has not undergone such a write access to a non-retention state.
[0090] To apply the strategy, the controller 10 reads the write registers associated with the memory cells 8a to 8e, respectively (step 308). If the write register is zero, this means that no write has occurred in the associated memory cell since the last power-on; therefore, unless the memory cell is already in the non-retention state, the memory cell will switch to the non-retention state. Conversely, if the write register is one, this means that at least one write has occurred in the associated memory cell since the last power-on; therefore, unless the memory cell is already in the retention state, the memory cell will switch to the retention state.
[0091] The strategy implemented by the controller 10 allows to optimally reduce the power consumption of the memory 8 when the memory 8 is in the stop operating mode, without losing the stored data.
[0092] Additionally, it should be noted that the system 1 operates in two configuration levels:
[0093] A high level and a common configuration level (all operating modes of the memory 8), which can be selected by the user of the system 1, and
[0094] Lower level and private configuration levels (corresponding states of the memory cells) which are under the control of the controller 10 but over which the user cannot exert individual control.
[0095] This dual configuration level allows an ideal compromise to be obtained between the versatility of the system 1 and optimal management of power savings.
[0096] Other variants:
[0097] In the above, an embodiment of running the operation mode in which all the memory cells 8 a to 8 e of the memory 8 are in the holding state has been presented.
[0098] Alternatively, the strategy for switching the state of the memory cells that is implemented when the memory 8 is in the stop mode of operation is also implemented when the memory 8 is in the run mode of operation.
Claims
1. A system comprising: A memory comprising a plurality of writable memory cells, wherein the memory is configurable into a plurality of modes, and wherein each writable memory cell is configurable to operate in the following states: a retention state, wherein the writable memory cell will retain data until the memory cell is subsequently powered off; and a non-retention state in which the writable memory cell does not retain data and consumes less power than in the retention state; as well as an interface configured to: receive a user command requesting that the memory be configured as a selected mode among the plurality of modes; The controller is configured as: configuring any writable memory cell of the memory that has undergone at least one write access since the memory was last powered on to be in the retention state; configuring at least one writable memory cell of the memory that has not undergone any write access since the memory was last powered on to be in the non-retention state; and Individual configuration of the states of writable memory cells of the memory by means of user commands received via the interface is not authorized.
2. The system of claim 1, wherein the controller is further configured to configure any writable memory cell of the memory that has not undergone any write access since it was last powered on to be in the non-retention state.
3. The system of claim 1, wherein the plurality of modes comprises: a first mode, wherein any writable memory cell of the memory that has undergone at least one write access since the memory was last powered on is in the retention state, and wherein at least one writable memory cell of the memory that has not undergone any write access since the memory was last powered on is in the non-retention state; and At least one other mode wherein all of said writable memory cells of said memory are in the same state. The system according to claim 3 , wherein the first mode is a mode in which at least one system clock is deactivated.
5. The system of claim 3, wherein the at least one other mode comprises: a second mode, wherein all of said writable memory cells are in said retention state; as well as A third mode, wherein all of the writable memory cells are in the non-retention state. The system according to claim 5 , wherein the first mode is a mode in which at least one system clock is deactivated.
7. The system of claim 1, further comprising a write register for each writable memory cell, wherein the register stores data indicating whether the memory cell has undergone at least one write access since it was last powered on.
8. The system of claim 7, wherein in response to a received write request in the memory, the controller is configured to: identifying a writable memory cell of the writable memory cells that is targeted by the received write request; and The data in the corresponding write register is set to indicate that the memory cell has undergone at least one write access since it was last powered on.
9. The system of claim 8, wherein the controller is further configured to: determining the current operating mode of the memory, and If the current operation mode is a stop mode, configuring each of the identified ones of the writable memory cells to the retention state; and If the current operation mode is not the stop mode, each of the identified ones of the writable memory cells is not configured in the retention state.
10. The system of claim 7, wherein in response to a received erase request in the memory, the controller is configured to: identifying writable memory cells of the writable memory cells to be cleared by the received erase request; and The data in the corresponding write register is set to indicate that the memory cell has not undergone at least one write access since it was last powered on.
11. The system of claim 10, wherein the controller is further configured to: determining the current operating mode of the memory, and If the current operation mode is a stop mode, configuring each of the identified ones of the writable memory cells to the non-retention state; and If the current operation mode is not the stop mode, each of the identified ones of the writable memory cells is not configured in the retention state.
12. The system of claim 1, wherein the memory is a volatile memory.
13. The system of claim 12, wherein the volatile memory is RAM memory.
14. The system of claim 1, wherein the system is of a system-on-chip type.
15. A method for controlling a memory, the memory comprising a plurality of writable memory cells, each memory cell being configurable into a retention state and a non-retention state, wherein the memory cell is capable of retaining data until the memory cell is subsequently powered off, and wherein the memory cell does not retain data and consumes less power than in the retention state; The method comprises the following steps: configuring any memory cell of the memory that has undergone at least one write access since the memory was last powered on to be in the retention state; configuring at least one memory cell of the memory that has not undergone any write access since the memory was last powered on to be in the non-retention state; and Authorization is denied to individually configure states of writable memory cells of the memory by means of a user command requesting configuration of the memory into a selected mode among a plurality of modes.
16. The method according to claim 15, further comprising: Any writable memory cells of the memory that have not undergone any write access since the memory was last powered on are configured to be in the non-retention state.
17. The method according to claim 15, further comprising: Receive user commands; and The various modes include: a first mode, wherein any writable memory cell of the memory that has undergone at least one write access since the memory was last powered on is in the retention state, and wherein at least one writable memory cell of the memory that has not undergone any write access since the memory was last powered on is in the non-retention state; and At least one other mode wherein all of said writable memory cells of said memory are in the same state.
18. The method according to claim 17, further comprising: In the first mode at least one system clock is deactivated.
19. The method of claim 17, wherein the at least one other mode comprises: a second mode, wherein all of said writable memory cells are in said retention state; as well as A third mode, wherein all of the writable memory cells are in the non-retention state.
20. The method of claim 15, further comprising: Data indicating whether the memory cell has undergone at least one write access since it was last powered on is stored in a write register for each writable memory cell.
21. The method according to claim 20, further comprising: receiving a memory write request; identifying a writable memory cell of the writable memory cells that is targeted by the memory write request; as well as The data in the corresponding write register is set to indicate that the memory cell has undergone at least one write access since it was last powered on.
22. The method according to claim 21, further comprising: determining a current operating mode of the memory; if the current operation mode is a stop mode, configuring each of the identified ones of the writable memory cells to the retention state; and If the current operation mode is not the stop mode, each of the identified ones of the writable memory cells is not configured in the retention state.
23. The method of claim 20, further comprising: receiving a memory erase request; identifying writable memory cells among the writable memory cells to be cleared by the memory erase request; as well as The data in the corresponding write register is set to indicate that the memory cell has not undergone at least one write access since it was last powered on.
24. The method according to claim 23, further comprising: determining a current operating mode of the memory; If the current operation mode is a stop mode, configuring each of the identified ones of the writable memory cells to the non-retention state; and If the current operation mode is not the stop mode, each of the identified ones of the writable memory cells is not configured in the retention state.
