# Patent

## Title
Power management

## Abstract

According to an embodiment of the invention there may be provided a method for measuring, by a power measurement circuit of a memory controller, a power consumption of a flash memory unit coupled to the memory controller to provide power measurements; wherein the memory controller further may include a read circuit, a write circuit, an erase circuit and a processor.

## Background
BACKGROUND OF THE INVENTION
Flash memory operations such as erasing, programming (writing), and reading involve electrical operations and thus consume power. Flash memory units are widely used in devices, which have strict power consumption constraints, such as laptops and mobile devices. For this reason, it is important for a flash memory controller (that controls the flash memory unit) to be power efficient.
SUMMARY
According to an embodiment of the invention there may be provided a method for measuring, by a power measurement circuit of a memory controller, a power consumption of a flash memory unit coupled to the memory controller to provide power measurements, wherein the memory controller further may include a read circuit, a write circuit, an erase circuit, and a processor.
The power measurement circuit may include a voltmeter, a resistor, a switching circuit, and a power output, wherein method may include providing, via the power output, power to the memory controller, measuring by the voltmeter a voltage developed on the resistor and selectively coupling, by the switching circuit, the resistor to the power output.
According to an embodiment of the invention there may be provided a method for controlling a flash memory unit, the method may include receiving or generating, by a memory controller, power measurements indicative of power consumed by a flash memory unit coupled to the memory controller.
The method may include controlling an operation of at least one of the read circuit, write circuit and the erase circuit in response to the power measurements.
The method may include determining at least one operational parameter in response to the power measurements; wherein at least one of (a) a write operation executed by the write circuit, (b) an erase operation executed by the erase circuit, and (c) a read operation executed by the read circuit may be responsive to the at least one operational parameter.
The method may include determining at least one operational parameter in response to the power measurements so impose a limitation on the power consumption of the flash memory unit.
The method may include determining at least one operational parameter in response to the power measurements so comply with a power consummation constraint related to the power consumption of the flash memory unit and at least one out of a reliability constraint (for example bit error rate BER or any other measure) related to a reliability of content stored in the flash memory unit; a timing constraint (for example programming speed, an erase speed) related to a duration of at least one operation out of a read operation, a programming operation and an erase operation, and a wear constraint (for example weal level) related to a wear level of cells of the flash memory unit.
The method may include evaluating a functionality of the flash memory unit in response to the power measurements.
The method may include applying multiple sets of operational parameters during an obtaining of the power measurement results; may include determining a validity of each set of operational parameters in response to the power measurements.
The method may include disqualifying a set of operational parameters when power measurements obtained when the set of operations were applied by the memory controller indicate of a power consumption that deviates from an allowable power consumption of the flash memory unit.
The method may include disqualifying a set of operational parameters when power measurements obtained when the set of operations were applied by the memory controller indicate that an instruction to perform an operation out of a read operation, write operation and erase operation was not performed.
The method may include evaluating a temperature of the flash memory unit in response to the power measurements and in response to temperature-power mapping information that maps power consumptions and temperature.
The method may include evaluating a wear level of at least one groups of cells of the flash memory unit in response to the power measurements and in response to wear-power mapping information that maps power consumptions and wear levels.
The method may include generating the wear-power mapping information.
The method may include performing memory management operations in response to the power measurements.
The method may include electing groups of flash memory cells to be written by the write circuit in response to the power measurements.
The method may include controlling an operation of at least one of the read circuit, write circuit, and the erase circuit in response to the power measurements and in response to a state of a power supply unit that may be arranged to provide power to at least one out of the memory controller and the flash memory unit.
The method may include defining different tradeoffs between power consumption parameters and other operational parameters at different states of the power supply unit.
The other operational parameters may be selected of a group consisting of (i) a reliability of content stored in the flash memory unit, (ii) a duration of at least one operation out of a read operation, a programming operation and an erase operation, and (iii) a wear resulting from the at least one operation.
The method may include determining, in response to the state of the power supply, whether to write data into a flash memory page of the flash memory unit without buffering the data in a non-volatile buffer.
The method may include measuring power consumptions of multiple flash memory units that may be coupled to the memory controller to provide the power measurements, wherein the multiple flash memory units may include the flash memory unit.
The method may include differentiating between power measurements related to different flash memory units by comparing the power measurements to profiles of power consumptions of the different flash memory units.
The method may include performing input/output operations with different flash memory units in a non-overlapping manner.
According to an embodiment of the invention there may be provided a memory controller, the memory controller may include a read circuit, a write circuit, an erase circuit, a power measurement circuit and a processor; wherein the power measurement circuit may be arranged to measure a power consumption of a flash memory unit coupled to the memory controller to provide power measurements.
The power measurement circuit may include a voltmeter, a resistor, a switching circuit, and a power output, wherein power output may be arranged to provide power to the memory controller, wherein the voltmeter may be arranged to measure a voltage developed on the resistor, wherein the switching circuit may be arranged to selectively couple the resistor to the power output.
The processor may be arranged to control an operation of at least one of the read circuit, write circuit and the erase circuit in response to the power measurements.
The processor may be arranged to determine at least one operational parameter in response to the power measurements; wherein at least one of (a) a write operation executed by the write circuit, (b) an erase operation executed by the erase circuit, and (c) a read operation executed by the read circuit may be responsive to the at least one operational parameter.
The processor may be arranged to determine at least one operational parameter in response to the power measurements so impose a limitation on the power consumption of the flash memory unit.
The processor may be arranged to determine at least one operational parameter in response to the power measurements so comply with a power consummation constraint related to the power consumption of the flash memory unit and at least one out of a reliability constraint related to a reliability of content stored in the flash memory unit; a timing constraint related to a duration of at least one operation out of a read operation, a programming operation and an erase operation, and a wear constraint related to a wear level of cells of the flash memory unit.
The processor may be arranged to evaluate a functionality of the flash memory unit in response to the power measurements.
The memory controller may be arranged to apply multiple sets of operational parameters during an obtaining of the power measurement results; wherein the processor may be arranged to determine a validity of each set of operational parameters in response to the power measurements.
The processor may be arranged to disqualify a set of operational parameters when power measurements obtained when the set of operations were applied by the memory controller indicate of a power consumption that deviates from an allowable power consumption of the flash memory unit.
The processor may be arranged to disqualify a set of operational parameters when power measurements obtained when the set of operations were applied by the memory controller indicate that an instruction to perform an operation out of a read operation, write operation and erase operation was not performed.
The processor may be arranged to evaluate a temperature of the flash memory unit in response to the power measurements and in response to temperature-power mapping information that maps power consumptions and temperature.
The processor may be arranged to evaluate a wear level of at least one groups of cells of the flash memory unit in response to the power measurements and in response to wear-power mapping information that maps power consumptions and wear levels.
The memory controller may be arranged to generate the wear-power mapping information.
The processor may be arranged to perform memory management operations in response to the power measurements.
The memory controller may be arranged to elect groups of flash memory cells to be written by the write circuit in response to the power measurements.
The processor may be arranged to control an operation of at least one of the read circuit, write circuit and the erase circuit in response to the power measurements and in response to a state of a power supply unit that may be arranged to provide power to at least one out of the memory controller and the flash memory unit.
The processor may be arranged to define different tradeoffs between power consumption parameters and other operational parameters at different states of the power supply unit.
The other operational parameters may be selected of a group consisting of (i) a reliability of content stored in the flash memory unit, (ii) a duration of at least one operation out of a read operation, a programming operation and an erase operation, and (iii) a wear resulting from the at least one operation.
The processor may be arranged to determine, in response to the state of the power supply, whether to write data into a flash memory page of the flash memory unit without buffering the data in a non-volatile buffer.
The power measurement circuit may be arranged to measure power consumptions of multiple flash memory units that may be coupled to the memory controller to provide the power measurements, wherein the multiple flash memory units may include the flash memory unit.
The processor may be arranged to differentiate power measurements related to different flash memory units by comparing the power measurements to profiles of power consumptions of the different flash memory units.
The memory controller may be arranged to perform input/output operations with different flash memory units in a non-overlapping manner.
According to an embodiment of the invention there may be provided a non-transitory computer readable medium that stores instructions that once executed by a memory controller cause the memory controller to perform the steps of measuring a power consumption of a flash memory unit coupled to the memory controller to provide power measurements; wherein the memory controller further may include a read circuit, a write circuit, an erase circuit and a processor.
According to an embodiment of the invention, a method that may include measuring a power consumption of a group of flash memory units to provide power measurements may be provided; and determining a usage of the flash memory units of the group in response to the power measurements.
According to an embodiment of the invention there may be provided a non-transitory computer readable medium that stores instructions that once executed by a memory controller cause the memory controller to perform the steps of measuring a power consumption of a group of flash memory units to provide power measurements; and determining a usage of the flash memory units of the group in response to the power measurements.
According to an embodiment of the invention there may be provided a non-transitory computer readable medium that stores instructions that once executed by a memory controller cause the memory controller to perform the steps of receiving or generating, by a memory controller, power measurements indicative of power consumed by a flash memory unit coupled to the memory controller.



BRIEF DESCRIPTION OF THE DRAWINGS
The subject matter regarded as the invention is particularly pointed out and distinctly claimed in the concluding portion of the specification. The invention, however, both as to organization and method of operation, together with objects, features, and advantages thereof, may best be understood by reference to the following detailed description when read with the accompanying drawings in which:
FIG. 1 illustrates a system that include a memory controller, flash memory unit and power supply according to an embodiment of the invention;
FIG. 2 illustrates a system that include a memory controller, flash memory unit and power supply according to an embodiment of the invention;
FIG. 3 illustrates a method according to an embodiment of the invention;
FIG. 4 illustrates a method according to an embodiment of the invention;
FIG. 5 illustrates a method according to an embodiment of the invention; and
FIG. 6 illustrates a method according to an embodiment of the invention.



DETAILED DESCRIPTION OF THE DRAWINGS
In the following detailed description, numerous specific details are set forth in order to provide a thorough understanding of the invention. However, it will be understood by those skilled in the art that the present invention may be practiced without these specific details. In other instances, well-known methods, procedures, and components have not been described in detail so as not to obscure the present invention.
The subject matter regarded as the invention is particularly pointed out and distinctly claimed in the concluding portion of the specification. The invention, however, both as to organization and method of operation, together with objects, features, and advantages thereof, may best be understood by reference to the following detailed description when read with the accompanying drawings.
It will be appreciated that for simplicity and clarity of illustration, elements shown in the figures have not necessarily been drawn to scale. For example, the dimensions of some of the elements may be exaggerated relative to other elements for clarity. Further, where considered appropriate, reference numerals may be repeated among the figures to indicate corresponding or analogous elements.
Because the illustrated embodiments of the present invention may for the most part, be implemented using electronic components and circuits known to those skilled in the art, details will not be explained in any greater extent than that considered necessary as illustrated above, for the understanding and appreciation of the underlying concepts of the present invention and in order not to obfuscate or distract from the teachings of the present invention.
Any reference in the specification to a method should be applied mutatis mutandis to a system capable of executing the method and should be applied mutatis mutandis to a non-transitory computer readable medium that stores instructions that once executed by a computer result in the execution of the method.
Any reference in the specification to a system should be applied mutatis mutandis to a method that may be executed by the system and should be applied mutatis mutandis to a non-transitory computer readable medium that stores instructions that may be executed by the system.
Any reference in the specification to a non-transitory computer readable medium should be applied mutatis mutandis to a system capable of executing the instructions stored in the non-transitory computer readable medium and should be applied mutatis mutandis to method that may be executed by a computer that reads the instructions stored in the non-transitory computer readable medium.
The term “group of flash cells” may include one or more flash memory cells. It may be a page, an erase block, a portion of a page, more than a single page, a portion of an erase block or more that a single erase block.
Erase block is also referred to as a block.
Operational parameters may include any parameter that may affect a manner in which an operation related to a flash memory unit is performed. The operation may be a read operation, a write (program) operation, an erase operation, or a memory management operation.
Measuring the Power Consumed by Flash Memory Unit.
The flash memory unit may be a flash memory chip or multiple flash memory chips. It may be a NAND flash memory unit but this is not necessarily so.
In order to measure the power consumed by the flash memory unit a resistor of a known resistivity may be connected in series between the flash memory unit power supply and the flash memory unit itself. If, for example, the memory controller supplies the power to the flash memory unit via a power output then the resistor may be connected in series to the power output. If there are multiple power outputs for supplying power to one or more flash memory units then one or more resistors can be provided for allowing a measurement of power supplied via the multiple power outputs. One resistor can be allocated for a single power output of more than a single power output. If, the power is supplied not via the memory controller than the memory controller should be coupled to resistors that are serially coupled to the power supply paths or be coupled to voltmeters that measure the voltage developed on the resistors.
It is noted that a resistor that is used for power measurements may be constantly connected to a power path that leads to one or more flash memory units. Alternatively, the resistor may be selectively coupled to the power path using a switching unit. It is further noted that a resistor that is used for power measurements can be dedicated to the power measurements although the power measurements may utilize a resistor that has other roles (for example—it may be an integral part of the power path). It is noted that the resistor may have a complex or only real impedance and that the resistor may be a parasitic resistance.
By measuring the voltage on the resistor it is possible to infer the current running through the resistor and thus also through the flash memory unit as the current I equals a ratio between the voltage V and the resistance R.
Where I is the current in ampere, V is the voltage in volt and R is the known resistivity in Ohm. Such a simple measurement system can be assembled in the laboratory in order to study the power consumption properties of the flash memory unit, but can also be packaged as part of the memory controller to gain many advantages as will be described in the sequel.
FIG. 1 illustrates a system 10 that include a memory controller 100, flash memory unit 20, and power supply 160 according to an embodiment of the invention.
Memory controller 100 may include read circuit 110, write circuit 120, erase circuit 130, power measurement circuit 140 and processor 150. The power measurement circuit 140 is arranged to measure a power consumption of a flash memory unit 20 coupled to the memory controller 100 to provide power measurements.
FIG. 1 illustrates the power measurement circuit 140 as including voltmeter 141, resistor 142, switching circuit 143 and power output 144. Power output 144 is arranged to provide power to flash memory unit 20. Voltmeter 141 is arranged to measure a voltage developed on resistor 142. Switching circuit 143 is arranged to selectively couple resistor 142 to power output 144. The switching circuit 143 may either couple the resistor 142 or a bypass conductor 145.
FIG. 2 illustrates a system 11 that includes power supply 160, memory controller 100, and four flash memory units 20, 30, 40 and 50 according to an embodiment of the invention. Each flash memory unit may include multiple erase blocks, multiple pages per each erase block and the like. Each flash memory unit may include a buffer as well single level cell (SCL) pages and/or multi level cell (MLC) pages.
Memory controller 100 is coupled to multiple flash memory units such as flash memory units 20, 30, 40 and 50. It has four power outputs 144(1)-144(4)—one per each flash memory unit. The memory controller is illustrated as having four power measurement circuits 140(1)-(4). They may include four resistors, four voltmeters, and four switching circuits.
It is noted that the power measurement circuit 140 may have power measurements circuits than flash memory units. In this case one or more power measurement circuit can perform time division multiplexing.
Alternatively, a single resistor can be used for measuring the aggregate power supplied to more than a single power output.
As indicated above—in case of a memory controller connected to several flash memory units, it is possible to either have a different power measuring circuit for each flash memory unit or share the power measuring circuit for all flash memory units which essentially measures the cumulative power on all device. In the latter case, the power consumption per device may be recovered either by:

    
    
        a. During times where power measurements are required, flash memory unit commands are sent to each device in a staggered manner such that flash memory unit operations do not overlap between flash memory units. Thus we can make sure that indeed the power measured is indeed specific to a certain device.
        b. Allow flash memory unit commands to be sent to several flash memory units simultaneously and distinguish between power consumed by each flash memory unit by learning, ahead of time, the particular frequency signature of each flash memory unit. As each flash memory unit power consumption can be characterize as a series of pulses, which occur at a certain clock rate, which is different for each flash memory unit. By learning the clock rate of each flash memory unit, we can indeed differentiate between the power consumed by different flash memory units, even if operations overlap.
    
    


Adaptive Parameters Optimization
According to an embodiment of the invention there is provided a method that includes adapting operational parameters in view of power measurements.
When taking into account the power measurements an online algorithm executed by the memory controller can produce parameters which provide both fast programming, and low Bit Error Rate (BER) and wear, but also keep the flash memory unit in a regime where it consumes less power during its operations, enabling longer battery life for portable devices which include the flash memory unit.
In order to achieve this goal the power measurements are taken into account by an optimization algorithm. The optimization algorithm calculates a cost function.
The cost to be minimized may be a combination of (a) the power consumed by the flash memory unit while erasing and/or programming and/or reading, and at least one out of (b) measured Bit Error Rate (BER) on all pages, and/or average or max or higher order statistics of the BER values; (c) Busy time when programming all pages, and/or average values of busy time per page type and/or higher order statistics thereof.
Detect Trim Effectiveness, and Range of Active Values
Changing the flash memory unit trims (operational parameters values) may affect the flash memory unit behavior in various manners. These behaviors can be inferred offline and/or online by measuring the power consumed by the flash.
Specific trims may determine the number of erase or program pulses or their amplitude. However, the effect of the trim change may be different outside its range of normal operation, e.g., the number of pulses may have an absolute maximum or minimum. The trim value may also affect a specific behavior, such as the number of program or erase pulses, only through its value masked by some constant, e.g., only the 4 lower bits may determine the number of pulses while the higher bits may be very irrelevant to the flash operation or may affect its behavior otherwise. These kinds of behavior may be inferred by scanning the span of the possible trim values and examining the resulting power consumption profile. Changing the trim value beyond its active range will cause no effect in the power consumption profile. When only the lower bits are active or if there is a different behavior between the upper and lower bits, the power consumption profile will show a periodic behavior when scanned over all possible ranges, etc.
Some trims may have only a limited range of valid values, outside of which the flash memory unit may not behave properly, e.g., it may not be able to erase, program or read successfully, or it may even get stuck and require a reset command or power reset.
There is a need in finding out the valid range per trim; however this range may change during the flash memory unit lifecycle, due to, e.g., temperature changes or flash memory unit aging. The valid range may be found without requiring a full erase, program, read and counting the number of errors, by only erasing and verifying the power consumption profile is similar to that occurring during normal flash operation. Only if the power consumption during the erase operation is valid, programming should be performed and again the power consumption profile should be verified.
In addition, temperature changes may influence the power consumption profile, and thus by measuring the power consumption and comparing the resulting profile to previously recorded profiles at different temperatures, the current temperature at which the flash memory unit operates can be estimated.
Several trims may control the speed with which the flash is erased or programmed, thus allowing, “over clocking” of the flash memory operations. Examining the power consumption profile allows us to infer whether the flash memory unit can operate at a specific over-clocking factor, the limit may be different for different flash memory units, cycle counts and temperatures, without having to perform a full block erase, program and read cycle.
Exploit Correlation Between Power Consumption and Wear
Some flash memory units may exhibit a typical behavior according to which applying more and/or stronger erase and/or program pulses may cause accelerated wear, i.e., the BER may rise faster as the number of P/E cycles increases. The number of pulses and their strength is clearly detectable from the power consumption profile, which can be measured according to our proposal. Thus—a block of flash memory cells will be regarded as having a higher wear level than another block of flash memory cells if it is erased using more programming pulses and/or stronger programming pulses.
Other factors may not be directly linked to the number or amplitude of the pulses but can otherwise be detectable in the power consumption profile, e.g., power consumption between commands or between pulses.
There is provided a method that may find the correlation between the power consumption profile of the flash memory unit and the wear. Once that relation is known, an online algorithm should modify the flash trims in a manner, which will make the power consumption profile strive to resemble a profile, which is known to cause low wear.
The advantage of this method is rooted in the way in which wear has to be measured. Wear is a phenomenon, which describes the deterioration of the flash memory over a relatively large number of P/E cycles. This behavior can be studied offline in the laboratory while designing the product but is very difficult to implement in an online fashion, since the effect of a change can only be measured after a large number of cycles, which also take a long time.
The relationship between wear and power consumption can be studied offline, and the online algorithm may use the received power consumption profile which is available after every cycle. It is noted that the relationship can be augmented in view of online measurements.
According to an embodiment of the invention the wear estimation may start by performing T power measurements.
For set of N possible trims combinations:

    
    
        a. Measure the power consumption profile (possibly per cycle)—resulting in a [N×C×T] matrix. N being the number of profiles, C being the number of cycles. T being the number of power measurements per power profile. The matrix is denoted P.
        b. Measure the wear (defined here as the BER) after a performing a certain number (X) of program erase (P/E) cycles using a constant set of trims, e.g., the flash memory unit default trims, resulting in a vector of N wear values denoted as W.
    
    


Online Phase:
The expected wear of a set of trims according to the power consumption profile they induce is calculated:

    
    
        a. Measure the current power consumption profile p.
        b. Set w=0;
        c. Set c as the current number of cycles;
        d. For each n of the possible N trims sets;
        e. Calculate the correlation between p and the profile saved in P for the current cycle; w=w+W(n)*corr(p, P(n,c))
    
    


Algorithm decision (two possible algorithms):

    
    
        a. The expected wear w may be incorporated in a general online adaptive algorithm, which takes other factors in account as well and appropriately weigh the expected wear relatively to memory performance, number of errors, power consumption etc.
        b. If the reducing wear is the main goal and other factors are of less importance, choose the set of trims for which for this number of cycles, P(n,c) is minimal.
    
    


System Power Management
Devices which use flash memory may have several flash memory units, each able to store and retain data. Each unit has its own power consumption values, which may also vary with the amount of P/E cycles performed.
Power consumption may play an important role when performing many kinds of system level decisions, including the ones described below.
Memory controller management operations, such as cleaning, merging and others perform operations directly on the flash memory and thus may interfere with the speed with which the user is able to program or read from the flash memory, since it is busy performing management initiated operations. For this reason, system management operations are best performed at idle times.
There are provided various considerations and strategies, which take into account system level decisions and flash memory power consumption.
Standard wear leveling dictates that all the available memory blocks (on all memory units if several are available) should strive to have a similar number of P/E cycles to maintain smooth performance over time. However, under strict power consumption constraints, e.g., a mobile device unplugged and/or with little remaining battery time, it is suggested to alleviate the wear leveling constraints and use the flash memory blocks which consume less power more frequently.
Similarly, to allow for overall wear leveling, the flash memory blocks, which consume more power, should be advanced faster during periods when the flash memory unit is plugged in.
Extremely strict power consumption regimes may even dictate a full shutdown of some of the strongest power consuming flash memory blocks.
Note that in this case waking them up will cost additional time and power when needed. For this reason, data that is read frequently should be stored in the less power consuming memory blocks.
In a more general formalization, we have a score s defining the relative requirements from the next cycle scaling between 0 for maximum performance and 1 for minimum power consumption. All the flash memory blocks in the system are given a score:




  
    S
    =
    
      
        1
        2
      
      ⁢
      
        (
        
          1
          -
          
            
              p
              -
              
                p
                min
              
            
            
              
                p
                max
              
              -
              
                p
                min
              
            
          
          +
          
            
              c
              -
              
                c
                min
              
            
            
              
                c
                max
              
              -
              
                c
                min
              
            
          
        
        )
      
    
  
  ,




Where p is the performance measured in the last cycle on this block, c is the latest total power consumption, and p_min, p_max, c_min, c_max are the respective minimum and maximum performance and power consumption values for all the memory blocks in the system.
When required to perform a cycle with requirement score equal to s, we choose the block with the closest value S.




  
    
      
        arg
        ⁢
        
          
        
        ⁢
        min
      
      
        i
        =
        0
      
    
    
      N
      -
      1
    
  
  ⁢
  
    
    
      
        S
        i
      
      -
      s
    
    
  




Memory management operations may not be performed during times when the power consumption constraints are strict, e.g., mobile device unplugged and/or battery power running low.
During these periods it is preferable to lose on some system merits such as write amplification in order to avoid power consuming memory operations, which were not specifically required by the user.
In detail, all required writes should be first directed to the controller buffers, which do not require any flash memory unit operations. When the buffers are full they should be written to free SLC blocks, trying to avoid the additional folding to TLC pages.
Only if the system runs out of SLC blocks, which is not likely, since it is not likely the device will be required to perform many write operations under tight power consumption constraints, should the SLC blocks be folded into TLC blocks and freed up to receive the next write commands. Adversely, when the device is plugged into a power outlet, the memory buffers should be freed by writing them to SLC blocks and SLC blocks should be freed by folding their content into TLC blocks, so they can be free for the next period of operation without an external power source.
Extreme power consumption constraint mode—unlike standard power consumption constraint mode (unplugged from a power outlet), there are extreme cases when the battery is running extremely low and the device might unexpectedly shut down at any moment. In this mode we should not trust the memory buffers, which cannot retain data during system shut down. In this mode the writes will be performed directly to SLC blocks, and all data already written to buffers should also be quickly moved to SLC blocks.
Another advantage for managing power consumption at the system level is to curb the short time max power consumption.
On a flash memory unit, a good portion of the power is consumed in pulses. For example, during programming or erase operations, the memory controller applied different programming or erase pulses. At the initiation of each such pulse, power is consumed causing large max to average power differences. In case of a system containing several flash memory units, these power spike may coincide, causing much larger over power spikes. The timing of these power spikes may depend on the internal device clock and the synchronization between the dies. By measuring power, it is possible to learn the internal clock on each die and time the flash memory unit commands to each die in a manner that makes sure that the power spikes are not synchronized and thus limit the max power requirements.
FIG. 3 illustrates method 300 according to an embodiment of the invention.
Method 300 may start by stage 310 of measuring, by a power measurement circuit of a memory controller, a power consumption of a flash memory unit coupled to the memory controller to provide power measurements. The memory controller may also include a read circuit, a write circuit, an erase circuit, and a processor.
The power measurement circuit may include a voltmeter, a resistor, a switching circuit, and a power output. Stage 310 may include stage 311 of selectively coupling, by the switching circuit, the resistor to the power output, stage 312 of providing, via the power output, power to the memory controller and stage 313 of measuring by the voltmeter a voltage developed on the resistor.
Although stage 310 referred to measuring a power consumption of a single flash memory unit. It is noted that stage 310 may be applied form multiple flash memory units.
The power measurements can provide information about power consumption at different points of time. For example—it may indicate when power pulses occurred and what was the intensity of these pulses.
Accordingly, stage 310 may include stage 314 of measuring power consumptions of multiple flash memory units that are coupled to the memory controller to provide the power measurements.
Stage 314 may include stage 315 of differentiating between power measurements related to different flash memory units by comparing the power measurements to profiles of power consumptions of the different flash memory units.
Stage 314 may include stage 316 of measuring power measurements of flash memory units that are activated at a non-overlapping manner (time division multiplexing). Thus, the memory controller may perform input/output operations with different flash memory units in a non-overlapping manner and perform power measurements during these non-overlapping IO operations.
Stage 310 may be followed by stage 320 of controlling an operation of at least one of the read circuit, write circuit and the erase circuit in response to the power measurements.
FIG. 4 illustrates method 400 according to an embodiment of the invention.
Method 400 may start by stage 410 of receiving or generating, by a memory controller, power measurements indicative of power consumed by a flash memory unit coupled to the memory controller.
In case of generating the power measurements then stage 410 may include stage 310 of method 300. In case of receiving the power measurements then the power measurements can be generated a unit other than the memory controller. This unit may be a power measurement circuit that is not included in the memory controller. For example—the power measurements may be performed by a power management circuit that is arranged to control the power consumption of a system that includes the memory controller and the flash memory unit.
It is noted that stage 410 may include receiving or generating power measurements indicative of power consumed by multiple flash memory unit coupled to the memory controller. For simplicity of explanation the following will refer to a single flash memory unit.
Stage 410 may be followed by stage 420 of controlling an operation of at least one of the read circuit, write circuit and the erase circuit in response to the power measurements.
Examples of stage 420 are illustrated in the section titled “Adaptive parameters optimization.”
Stage 420 may include at least one of the following stages:

    
    
        a. Determining (421) at least one operational parameter in response to the power measurements; wherein at least one of (a) a write operation executed by the write circuit, (b) an erase operation executed by the erase circuit, and (c) a read operation executed by the read circuit is responsive to the at least one operational parameter. Non-limiting examples of operational parameter include an initial voltage value in a programming/erase operation, a step size in a programming/erase operation, a stop value in a programming/erase operation, a number of programming pulses.
        b. Determining (422) at least one operational parameter in response to the power measurements so impose a limitation on the power consumption of the flash memory unit. The limitation may be a maximal allowable power consumption, a required minimal power consumption (minimizing the power consumption).
        c. Applying (423) the at least one operational parameter (Set during stage 421 or 422) during at least one out of a read operation, a write operation and an erase operation.
        d. Performing (424) memory management operations in response to the power measurements.
        e. Stage 424 may include electing (425) groups of flash memory cells (page, block, and the like) to be written by the write circuit in response to the power measurements. For example—more write operations may be aimed to groups of flash memory cells of lower power consumption.
        f. Determining (426) at least one operational parameter in response to the power measurements so comply with a power consummation constraint related to the power consumption of the flash memory unit and at least one out of a reliability constraint related to a reliability of content stored in the flash memory unit; a timing constraint related to a duration of at least one operation out of a read operation, a programming operation and an erase operation, and a wear constraint related to a wear level of cells of the flash memory unit.
    
    


Stage 410 may be followed by stage 430 of evaluating a functionality of the flash memory unit in response to the power measurements.
The power measurements received or generated during stage 410 may be obtained during multiple time periods during which the flash memory unit was configured according to multiple sets of operational parameters. In this case stage 410 may be followed by stage 440 of determining a validity of each set of operational parameters in response to the power measurements.
Examples of stages 430 and 440 are provided in the section titled “Detect trim effectiveness, and range of active values.”
Stage 440 may include:

    
    
        a. Disqualifying (441) a set of operational parameters when power measurements obtained when the set of operations were applied by the memory controller indicate of a power consumption that deviates from an allowable power consumption of the flash memory unit.
        b. Disqualifying (442) a set of operational parameters when power measurements obtained when the set of operations were applied by the memory controller indicate that an instruction to perform an operation out of a read operation, write operation and erase operation was not performed.
    
    


Stage 410 may be followed by stage 450 of evaluating a temperature of the flash memory unit in response to the power measurements and in response to temperature-power mapping information that maps power consumptions and temperature.
Stage 410 may be followed by stage 460 of evaluating a wear level of at least one groups of cells of the flash memory unit in response to the power measurements and in response to wear-power mapping information that maps power consumptions and wear levels. The power measurements can provide a power consumption profile of the flash memory unit. The power consumption profile can be compared to power consumption profiled represented in the wear-power mapping information to find a matching power consumption profile. The wear level of the matching power consumption profile is assumed to be the wear level of the group of flash cells that were programmed, erased, or read while the power measurements were taken.
Non-limiting examples of stage 460 can be found in the section titled “Exploit correlation between power consumption and wear.”
It is noted that method 400 may include generating the wear-power mapping information. This may include performing power measurements related to a group of flash memory cells of which the wear level is known of measured in manner that differ from an analysis of the power measurements. For example—the wear level can be estimated in response to the duration of programming, to the reliability of data stored in the group of the flash memory cells, to a combination of P/E cycle and timing information indicative of retention periods, and the like.
According to an embodiment of the invention the controlling (420) of the operation of at least one of the read circuit, write circuit and the erase circuit can be responsive to the power measurements and to the outcome of one or more stage out of stages 430, 440, 450 and 460. For example, the controlling may be responsive to at least one out of the wear level of one or more groups of flash memory cells, to the temperature of the flash memory unit, to a functionality of the flash memory unit, to a validity of one or more sets of operational parameters. For example—if a set of operational parameters is disqualified then the flash memory unit may be operated using other (non-disqualified) sets of operational parameters.
FIG. 5 illustrates method 500 according to an embodiment of the invention.
Method 500 may start by stage 510 of receiving or generating, by a memory controller, (a) power measurements indicative of power consumed by a flash memory unit coupled to the memory controller, and (b) information about a state of a power supply unit that is arranged to provide power to at least one out of the memory controller and the flash memory unit. The state of the power supply unit may be the fullness of the power supply.
It is noted that stage 510 may include receiving or generating power measurements indicative of power consumed by multiple flash memory unit coupled to the memory controller. For simplicity of explanation the following will refer to a single flash memory unit.
Stage 510 may be followed by stage 520 of controlling an operation of at least one of the read circuit, write circuit and the erase circuit in response to the power measurements and in response to the state of the power supply.
Non-limiting examples of stage 520 are illustrated in the section titled “System power management.”
Stage 520 may include defining (521) different tradeoffs between power consumption parameters and other operational parameters at different states of the power supply unit.
The operational parameters may include at least one out of a reliability of content stored in the flash memory unit, a duration of at least one operation out of a read operation, a programming operation and an erase operation and wear resulting from the at least one operation.
Stage 520 may include determining (522), in response to the state of the power supply, whether to write data into a flash memory page of the flash memory unit without buffering the data in a non-volatile buffer.
Binning of Produced Flash Memory Units According to their Power Consumption.
In the normal process of producing large batches of flash memory units, the produced units vary in many aspects, e.g., different bad blocks, different speeds, different number of errors per block etc. The manufacturer then adjusts the trims for each unit to achieve a smaller variance in overall behavior, but still some variance remains.
There is provided a method in which the flash memory units may be binned according to their power consumption. The heavier power consumers may be directed to less power constrained applications, e.g., SSD for storage servers, while the least power consuming units should be used in products where power consumption is critical, e.g., hand-held mobile devices. To this end the power consumption profile should be measured after the manufacturing process is complete and the units should be binned according to the integral over the power consumption profile when performing a standard set of operations idle time, erase, program and read.
Assuming the above binning is performed, it is not as crucial to keep the power consumption variance low. Units, which were randomly produced with lower power consumption, may be beneficial for power constrained products and thus their trims should not be tempered to be made similar to the batch average. In fact, they may even be altered to make these units consume even less power.
Since the power consumption may change with the number of P/E cycles, the binning process above should cycle the devices to different cycle values up to the maximal demanded by their specs and bin the devices using the power consumption characteristics in all cycles. For example, some products are expected to reach a lower number of P/E cycles during their life and thus should get the units with the respective power consumption up to this cycle. Other products may have strict power consumption constraints at start of life, and more relaxed in the end of life.
FIG. 6 illustrates method 600 according to an embodiment of the invention.
Method 600 may start by stage 610 of measuring a power consumption of a group of flash memory units to provide power measurements.
Stage 610 may be followed by stage 620 of determining a usage of the flash memory units of the group in response to the power measurements.
The invention may also be implemented in a computer program for running on a computer system, at least including code portions for performing steps of a method according to the invention when run on a programmable apparatus, such as a computer system or enabling a programmable apparatus to perform functions of a device or system according to the invention. The computer program may cause the storage system to allocate disk drives to disk drive groups.
A computer program is a list of instructions such as a particular application program and/or an operating system. The computer program may for instance include one or more of a subroutine, a function, a procedure, an object method, an object implementation, an executable application, an applet, a servlet, a source code, an object code, a shared library/dynamic load library, and/or other sequence of instructions designed for execution on a computer system.
The computer program may be stored internally on a non-transitory computer readable medium. All or some of the computer program may be provided on computer readable media permanently, removably or remotely coupled to an information processing system. The computer readable media may include, for example and without limitation, any number of the following magnetic storage media including disk and tape storage media; optical storage media such as compact disk media (e.g., CD-ROM, CD-R, etc.) and digital video disk storage media; nonvolatile memory storage media including semiconductor-based memory units such as FLASH memory, EEPROM, EPROM, ROM; ferromagnetic digital memories; MRAM; volatile storage media including registers, buffers or caches, main memory, RAM, etc.
A computer process typically includes an executing (running) program or portion of a program, current program values and state information, and the resources used by the operating system to manage the execution of the process. An operating system (OS) is the software that manages the sharing of the resources of a computer and provides programmers with an interface used to access those resources. An operating system processes system data and user input, and responds by allocating and managing tasks and internal system resources as a service to users and programs of the system.
The computer system may for instance include at least one processing unit, associated memory and a number of input/output (I/O) devices. When executing the computer program, the computer system processes information according to the computer program and produces resultant output information via I/O devices.
In the foregoing specification, the invention has been described with reference to specific examples of embodiments of the invention. It will, however, be evident that various modifications and changes may be made therein without departing from the broader spirit and scope of the invention as set forth in the appended claims.
Moreover, the terms “front,” “back,” “top,” “bottom,” “over,” “under” and the like in the description and in the claims, if any, are used for descriptive purposes and not necessarily for describing permanent relative positions. It is understood that the terms so used are interchangeable under appropriate circumstances such that the embodiments of the invention described herein are, for example, capable of operation in other orientations than those illustrated or otherwise described herein.
The connections as discussed herein may be any type of connection suitable to transfer signals from or to the respective nodes, units, or devices, for example via intermediate devices. Accordingly, unless implied or stated otherwise, the connections may for example be direct connections or indirect connections. The connections may be illustrated or described in reference to being a single connection, a plurality of connections, unidirectional connections, or bidirectional connections. However, different embodiments may vary the implementation of the connections. For example, separate unidirectional connections may be used rather than bidirectional connections and vice versa. In addition, plurality of connections may be replaced with a single connection that transfers multiple signals serially or in a time multiplexed manner. Likewise, single connections carrying multiple signals may be separated out into various different connections carrying subsets of these signals. Therefore, many options exist for transferring signals.
Although specific conductivity types or polarity of potentials have been described in the examples, it will be appreciated that conductivity types and polarities of potentials may be reversed.
Each signal described herein may be designed as positive or negative logic. In the case of a negative logic signal, the signal is active low where the logically true state corresponds to a logic level zero. In the case of a positive logic signal, the signal is active high where the logically true state corresponds to a logic level one. Note that any of the signals described herein may be designed as either negative or positive logic signals. Therefore, in alternate embodiments, those signals described as positive logic signals may be implemented as negative logic signals, and those signals described as negative logic signals may be implemented as positive logic signals.
Furthermore, the terms “assert” or “set” and “negate” (or “deassert” or “clear”) are used herein when referring to the rendering of a signal, status bit, or similar apparatus into its logically true or logically false state, respectively. If the logically true state is a logic level one, the logically false state is a logic level zero. Moreover, if the logically true state is a logic level zero, the logically false state is a logic level one.
Those skilled in the art will recognize that the boundaries between logic blocks are merely illustrative and that alternative embodiments may merge logic blocks or circuit elements or impose an alternate decomposition of functionality upon various logic blocks or circuit elements. Thus, it is to be understood that the architectures depicted herein are merely exemplary, and that in fact many other architectures may be implemented which achieve the same functionality.
Any arrangement of components to achieve the same functionality is effectively “associated” such that the desired functionality is achieved. Hence, any two components herein combined to achieve a particular functionality may be seen as “associated with” each other such that the desired functionality is achieved, irrespective of architectures or intermedial components. Likewise, any two components so associated can also be viewed as being “operably connected,” or “operably coupled,” to each other to achieve the desired functionality.
Furthermore, those skilled in the art will recognize that boundaries between the above described operations merely illustrative. The multiple operations may be combined into a single operation, a single operation may be distributed in additional operations and operations may be executed at least partially overlapping in time. Moreover, alternative embodiments may include multiple instances of a particular operation, and the order of operations may be altered in various other embodiments.
Also for example, in one embodiment, the illustrated examples may be implemented as circuitry located on a single integrated circuit or within a same device. Alternatively, the examples may be implemented as any number of separate integrated circuits or separate devices interconnected with each other in a suitable manner.
Also for example, the examples, or portions thereof, may implemented as soft or code representations of physical circuitry or of logical representations convertible into physical circuitry, such as in a hardware description language of any appropriate type.
Also, the invention is not limited to physical devices or units implemented in non-programmable hardware but can also be applied in programmable devices or units able to perform the desired device functions by operating in accordance with suitable program code, such as mainframes, minicomputers, servers, workstations, personal computers, notepads, personal digital assistants, electronic games, automotive and other embedded systems, cell phones and various other wireless devices, commonly denoted in this application as ‘computer systems’.
However, other modifications, variations and alternatives are also possible. The specifications and drawings are, accordingly, to be regarded in an illustrative rather than in a restrictive sense.
In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word ‘comprising’ does not exclude the presence of other elements or steps then those listed in a claim. Furthermore, the terms “a” or “an,” as used herein, are defined as one or more than one. Also, the use of introductory phrases such as “at least one” and “one or more” in the claims should not be construed to imply that the introduction of another claim element by the indefinite articles “a” or “an” limits any particular claim containing such introduced claim element to inventions containing only one such element, even when the same claim includes the introductory phrases “one or more” or “at least one” and indefinite articles such as “a” or “an.” The same holds true for the use of definite articles. Unless stated otherwise, terms such as “first” and “second” are used to arbitrarily distinguish between the elements such terms describe. Thus, these terms are not necessarily intended to indicate temporal or other prioritization of such elements. The mere fact that certain measures are recited in mutually different claims does not indicate that a combination of these measures cannot be used to advantage.
While certain features of the invention have been illustrated and described herein, many modifications, substitutions, changes, and equivalents will now occur to those of ordinary skill in the art. It is, therefore, to be understood that the appended claims are intended to cover all such modifications and changes as fall within the true spirit of the invention.

## Claims

1. A method for power measurements of a flash memory unit, the method comprises measuring, by a power measurement circuit of a memory controller, a power consumption of a flash memory unit coupled to the memory controller to provide power measurements;
wherein the memory controller further comprises a read circuit, a write circuit, an erase circuit and a processor;
wherein the power measurement circuit comprises a voltmeter, a resistor, a switching circuit and a power output;
wherein method further comprises:
providing, via the power output, power to the memory controller;
measuring by the voltmeter a voltage developed on the resistor; and
selectively coupling, by the switching circuit, the resistor to the power output.

2. A method for controlling a flash memory unit, the method comprises:
receiving or generating, by a memory controller, power measurements indicative of power consumed by a flash memory unit coupled to the memory controller;
wherein at least one of the following is true:
(i) the method comprises applying multiple sets of operational parameters during an obtaining of the power measurement results; and determining a validity of each set of operational parameters in response to the power measurements; and
(ii) the method comprises evaluating a wear level of at least one group of cells of the flash memory unit in response to the power measurements and in response to wear-power mapping information that maps power consumptions and wear levels.

3. The method according to claim 2 comprising controlling an operation of at least one of the read circuit, the write circuit and the erase circuit in response to the power measurements.

4. The method according to claim 2 comprising determining the at least one operational parameter in response to the power measurements; wherein the at least one of (a) a write operation executed by the write circuit, (b) an erase operation executed by the erase circuit, and (c) a read operation executed by the read circuit is responsive to the at least one operational parameter.

5. The method according to claim 2 comprising determining at least one operational parameter in response to the power measurements to impose a limitation on the power consumption of the flash memory unit.

6. The method according to claim 2 comprising determining at least one operational parameter in response to the power measurements to comply with a power consummation constraint related to the power consumption of the flash memory unit and at least one out of: a reliability constraint related to a reliability of content stored in the flash memory unit; a timing constraint related to a duration of at least one operation out of a read operation, a programming operation and an erase operation, and a wear constraint related to a wear level of cells of the flash memory unit.

7. The method according to claim 2 comprising evaluating a functionality of the flash memory unit in response to the power measurements.

8. The method according to claim 2 comprising applying the multiple sets of operational parameters during the obtaining of the power measurement results; and determining the validity of each set of operational parameters in response to the power measurements.

9. The method according to claim 8 comprising disqualifying a set of operational parameters when power measurements obtained when the set of operations were applied by the memory controller indicate of a power consumption that deviates from an allowable power consumption of the flash memory unit.

10. The method according to claim 8 comprising disqualifying a set of operational parameters when power measurements obtained when the set of operations were applied by the memory controller indicate that an instruction to perform an operation out of a read operation, write operation and erase operation was not performed.

11. The method according to claim 2 comprising evaluating a temperature of the flash memory unit in response to the power measurements and in response to temperature-power mapping information that maps power consumptions and temperature.

12. The method according to claim 2 comprising evaluating the wear level of the at least one group of cells of the flash memory unit in response to the power measurements and in response to the wear-power mapping information that maps power consumptions and wear levels.

13. The method according to claim 12 comprising generating the wear-power mapping information.

14. The method according to claim 2 comprising performing memory management operations in response to the power measurements.

15. The method according to claim 2 comprising electing groups of flash memory cells to be written by the write circuit in response to the power measurements.

16. The method according to claim 2 comprising controlling an operation of at least one of the read circuit, the write circuit and the erase circuit in response to the power measurements and in response to a state of a power supply unit that is arranged to provide power to at least one out of the memory controller and the flash memory unit.

17. The method according to claim 16 comprising defining different tradeoffs between power consumption parameters and other operational parameters at different states of the power supply unit.

18. The method according to claim 17 wherein other operational parameters are selected of a group consisting of (i) a reliability of content stored in the flash memory unit, (ii) a duration of at least one operation out of a read operation, a programming operation and an erase operation, and (iii) a wear resulting from the at least one operation.

19. The method according to claim 16 comprising determining, in response to the state of the power supply, whether to write data into a flash memory page of the flash memory unit without buffering the data in a non-volatile buffer.

20. The method according to claim 2 comprising measuring power consumptions of multiple flash memory units that are coupled to the memory controller to provide the power measurements; wherein the multiple flash memory units comprise the flash memory unit.

21. The method according to claim 20 comprising differentiating between power measurements related to different flash memory units by comparing the power measurements to profiles of power consumptions of the different flash memory units.

22. The method according to claim 20 comprising performing input/output operations with different flash memory units in a non-overlapping manner.

23. A memory controller, the memory controller comprises a read circuit, a write circuit, an erase circuit, a power measurement circuit and a processor; wherein the power measurement circuit is arranged to measure a power consumption of a flash memory unit coupled to the memory controller to provide power measurements; and wherein at least one of the following is true:
(i) the memory controller is configured to apply multiple sets of operational parameters during an obtaining of the power measurement results; and determine a validity of each set of operational parameters in response to the power measurements; and
(ii) the power measurement circuit comprises a voltmeter, a resistor, a switching circuit and a power output, wherein memory controller is configured to provide, via the power output, power; wherein the voltmeter is configured to measure a voltage developed on the resistor; and wherein the switching circuit is configured to selectively couple the resistor to the power output.

24. A non-transitory computer readable medium that stores instructions that once executed by a memory controller cause the memory controller to perform the steps of measuring a power consumption of a flash memory unit coupled to the memory controller to provide power measurements; wherein the memory controller further comprises a read circuit, a write circuit, an erase circuit and a processor; wherein at least one of the following is true:
(i) the non-transitory computer readable medium stores instructions that once executed by the memory controller cause the memory controller to apply multiple sets of operational parameters during an obtaining of the power measurement results; and determine a validity of each set of operational parameters in response to the power measurements; and
(ii) the non-transitory computer readable medium stores instructions that once executed by the memory controller cause the memory controller to evaluate a wear level of at least one groups of cells of the flash memory unit in response to the power measurements and in response to wear-power mapping information that maps power consumptions and wear levels.

25. A memory controller that comprises a read circuit, a write circuit, an erase circuit, a power measurement circuit and a processor; wherein the power measurement circuit is arranged to measure a power consumption of a flash memory unit coupled to the memory controller to provide power measurements; wherein the power measurement circuit comprises a voltmeter, a resistor, a switching circuit and a power output, wherein power output is to provide power to the memory controller, wherein the voltmeter is arranged to measure a voltage developed on the resistor; wherein the switching circuit is arranged to selectively couple the resistor to the power output.