Method and system for backing up, restoring and recovering register values
By using multiple non-volatile memory units in the computing system to back up volatile register data, the problem of data loss in volatile registers when power is lost is solved, enabling fast backup and recovery of register values, and improving the reliability of the system. sex.
Patent Information
- Application Number
- CN202011040441.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2020-09-02
- Filing Date
- 2020-09-28
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2040-09-28
AI Technical Summary
In computing systems, volatile registers have the problem of data loss when power is lost. Especially as the number of register data bits increases, it becomes increasingly difficult to use remaining power to quickly back up register data.
Multiple non-volatile memory units are used, each unit corresponds to a register word, and is initially reset to the same value. When power is lost, the register word is determined and the unit value is changed, and the register data is restored when power is restored.
Faster and more reliable register data backup and recovery is achieved, data loss is avoided, and the backup success rate in the event of power loss is improved.
Smart Images

Figure CN112579349B_ABST
Abstract
Description
Background Art
[0001] In general, a computing system includes one or more processors and memory, which includes registers. Typically, registers consist of a small amount of fast storage devices. Registers temporarily store data, instructions, and memory addresses that are frequently used by the CPU. There are various types of registers (each register is used for a specific purpose), including data registers, address registers, program counters, memory data registers, memory buffer registers, etc.
[0002] Registers may be volatile or non-volatile. In the case of volatile registers, a loss of power to the computing system may cause the register to lose its value. One example of avoiding the loss of valuable data stored in a register includes backing up the data value of the register in a non-volatile memory. Typically, backing up a register includes saving a copy of each bit of the register data in a corresponding bit of the non-volatile memory. However, in the event of a power loss, as the number of data bits in the register increases, it becomes increasingly difficult to quickly back up the register data using the remaining power. Summary of the invention
[0003] The disclosed embodiment provides a method for backing up register values, comprising: setting a register configured to store multiple words; setting a non-volatile memory having multiple cells, each cell corresponding to one of the words of the register; setting each cell of the non-volatile memory to an initial reset value; in response to detecting power loss, determining the word stored by the register; and changing the initial reset value of the cell of the non-volatile memory corresponding to the determined word stored by the register to a set value.
[0004] The disclosed embodiment provides a method for restoring and recovering register values, comprising: setting a register configured to store multiple words; setting a non-volatile memory having multiple cells, each cell corresponding to one of the words of the register; in response to detecting power restoration after power loss, identifying the cell with a set value; writing the word corresponding to the identified cell to the register; and resetting the cell of the non-volatile memory to an initial reset value.
[0005] The disclosed embodiment provides a system for backing up and restoring register values, comprising: a first memory configured to store data; a register configured to store a plurality of words, wherein the register is configured to receive the data from the first memory and store the data as one of the plurality of words; a second non-volatile memory having a plurality of cells, each of the plurality of words having a corresponding cell of the register, wherein each of the plurality of cells is set to an initial reset value; a controller, wherein in response to power loss, the controller is configured to: determine the one of the plurality of words stored by the register; and change the initial reset value of the corresponding cell of the register to a set value; and wherein in response to power restoration, the controller is configured to: identify the corresponding cell of the second non-volatile memory having the set value; write the one of the words of the identified corresponding cell to the register; and reset the identified corresponding cell to the initial reset value. BRIEF DESCRIPTION OF THE DRAWINGS
[0006] The various aspects of the present disclosure will be best understood by reading the following detailed description in conjunction with the accompanying drawings. It should be noted that, in accordance with standard practice in the industry, various features are not drawn to scale. In fact, the size of various features may be arbitrarily increased or reduced for clarity of discussion.
[0007] Figure 1 is a block diagram illustrating an example of a fast register backup system using non-volatile memory in accordance with some embodiments.
[0008] Figure 2 is a flow chart illustrating an example of a backup method during a power loss event according to some embodiments.
[0009] Figure 3 is a flow chart illustrating an example of a recovery method during a power-up event according to some embodiments.
[0010] Figure 4 is a schematic diagram of a table showing an example mapping between register values and additional non-volatile memory cell locations according to some embodiments.
[0011] Figure 5a and Figure 5b Example power loss and power recovery operations associated with a fast register backup system are shown in accordance with some embodiments.
[0012] Figure 6 is a flow chart illustrating an example of a combined restore and backup method according to some embodiments.
[0013] Description of Figure Numbers
[0014] 100: Fast register backup system;
[0015] 110: Computing systems;
[0016] 112: register;
[0017] 114: first memory;
[0018] 116: second memory;
[0019] 118: write to controller;
[0020] 120: Recall the controller;
[0021] 200, 300: Flowchart;
[0022] 210, 220, 230, 240, 250, 310, 320, 330, 340, 350, 360: operation;
[0023] 400: table;
[0024] 410: word value;
[0025] 420: unit location;
[0026] 500: Power loss operation;
[0027] 510: Before the power is lost;
[0028] 512, 522, 612, 622: register word value;
[0029] 514, 524, 614, 624: unit number;
[0030] 516, 526, 616, 626: unit data value;
[0031] 520: When power is lost;
[0032] 600: Power-on operation;
[0033] 610: When power is restored;
[0034] 620: After register data is restored;
[0035] 700: Method. DETAILED DESCRIPTION
[0036] The following disclosure provides many different embodiments or examples for implementing the different features of the provided subject matter. Specific examples of components and arrangements are described below to simplify the disclosure. Of course, these are merely examples and are not intended to be limiting. For example, the disclosure may repeat reference numerals and / or letters in various examples. This repetition is for the purpose of simplicity and clarity and does not itself dictate the relationship between the various embodiments and / or configurations discussed.
[0037] Additionally, for ease of description, spatially relative terms, such as "below," "beneath," "lower," "above," "upper," and the like, may be used herein to describe the relationship of one element or feature to another element or feature as illustrated in the figures. Spatially relative terms are intended to encompass different orientations of the device in use or operation in addition to the orientation depicted in the figures. The device may be otherwise oriented (rotated 90 degrees or at other orientations) and the spatially relative descriptors used herein may likewise be interpreted accordingly.
[0038] In general, computing systems use registers to store small amounts of data that need to be quickly accessed by the processor. Registers are often measured by the number of bits they can hold, such as a 4-bit register, an 8-bit register, etc. A computing system may use several different kinds of registers, including but not limited to address registers, user accessible registers, status registers, general purpose registers, instruction registers, memory buffer registers, memory data, registers, and special purpose registers. Registers are usually volatile, but can sometimes be non-volatile.
[0039] Volatile memory is a type of computer storage device that requires power to maintain the stored information. Volatile memory retains data while powered on, but when power is lost, the stored data is lost. In contrast, non-volatile memory circuits (which include flash memory, register RAM, magnetic RAM, Efuse RAM, anti-fuse RAM, etc.) are designed to store data by assuming a state (e.g., a specific charge) that is not affected by the loss of power to the non-volatile memory circuit. Therefore, non-volatile memory can be used to back up important data that is usually stored in volatile memory in order to prevent data loss from occurring. In the case of a computing system with volatile registers, there is a need to back up the register data in non-volatile memory so that the data is not lost in the event of a power loss event.
[0040] Typically, when a computing system loses power or when power becomes unstable, limited remaining power is typically used to record register logs or to back up register logs in non-volatile memory cells. This may mean that only a short period of time is available for updating the non-volatile memory cells. For example, if a 4-bit volatile register is used, each of the 4 bits needs to be recorded in a non-volatile memory in order to save the register data when power is lost. However, the available power may be limited and may not be sufficient to complete the backup operation for all register data bits. Therefore, depending on the volume of the register data bits, the computing device may ultimately fail to complete the backup operation.
[0041] The disclosed embodiments provide a method for backing up data in a faster and more reliable manner. In one embodiment, additional non-volatile memory is added, and each cell number (cell number) / position in the additional non-volatile memory corresponds to a register data word value. Initially, the data bits in the additional non-volatile memory are reset to the same value, such as all zeros or all ones. When power is lost, the cell number / position corresponding to the data value of the register is found, and the data in the cell position is reversed. When power is restored, the data bits of the additional non-volatile memory can be searched to obtain the cell number / position corresponding to the reversed value. Therefore, the obtained cell number / position can be used to identify the corresponding word value, which is then used to restore the register data value when power is restored.
[0042] Figure 1 1 is a block diagram illustrating an example of a fast backup system using non-volatile memory. In one example, a hardware implementation of the fast register backup system 100 includes a computing system 110 including a register 112, a first memory 114, a second memory 116, a write controller 118, and a recall controller 120. In some embodiments, the first memory 114 and the second memory 116 are non-volatile memories, while other configurations are within the scope of the present disclosure.
[0043] In one example, register 112 is configured to store a small amount of data that needs to be quickly accessed by the processor of computing system 110. Register size can vary and is usually measured in the number of bits that can be stored in the register. For example, a register that stores n bits of information (i.e., a 4-bit word) will be considered an n-bit register. Register size can vary and can include 4-bit registers, 8-bit registers, 16-bit registers, 32-bit registers, etc. Register data is usually stored as binary numbers, meaning 0 and 1. However, other systems (such as hexadecimal systems) can also be used to store data. In some examples, register 112 may include but is not limited to address registers, user accessible registers, status registers, general registers, instruction registers, memory buffer registers, memory data, registers, and special registers. Registers are usually volatile, but sometimes they may also be non-volatile. In one example, register 112 is directly or indirectly connected to first non-volatile memory 114 and second non-volatile memory 116, write controller 118, and recall controller 120.
[0044] In one example, the first memory 114 is a non-volatile memory connected to the register 112. However, in other examples of the fast backup system 100, the first non-volatile memory 114 may not be connected to the register 112 or may not be included in the computing system 110 at all. The first non-volatile memory 114 is used to store any type of data within the computing system 110. The register 112 can access the first non-volatile memory 114 to move data into the register 112 itself based on what the register is configured to do and the needs of the processor at the time. For example, if a processor configured as part of the computing system 110 is processing data located in the first non-volatile memory 114, and the processor needs to access the data frequently, the data can be extracted from the first non-volatile memory 114 and stored in the register 112. After the processor finishes processing the data, the processed data address can be removed from the register 112 and stored back in the first non-volatile memory 114.
[0045] In one example, the fast backup system 100 includes a second non-volatile memory 116. The second non-volatile memory 116 is allocated by the computing system 110 to store a backup of the data from the register 112 in the event of a power loss. The size of the second non-volatile memory 116 may vary depending on the size of the register 112. In the case of a binary system, for an n-bit register, the size of the second non-volatile memory 116 is 2 nFor example, for a 4-bit register, the computing system 110 allocates 16 bits of the nonvolatile memory as the second nonvolatile memory 116. All cells in the second nonvolatile memory 116 are reset to an initial reset value. The initial reset value may be 0 or 1.
[0046] In one example, the fast backup system 100 includes one or more memory controllers. Typically, a memory controller is a digital circuit that manages the flow of data to and from a computer's memory, which in this case includes registers 112, a first non-volatile memory 114, and a second non-volatile memory 116. In one example, the fast backup system 100 includes a write controller 118 and a recall controller 120.
[0047] In one example, the controller includes a write controller 118 and a recall controller 120. The write controller 118 is used to check whether the register 112 has any updated data that needs to be backed up. In addition, the write controller 118 is also used to perform a programming process, specifically, to set the data bits in the second non-volatile memory 116 when power is lost.
[0048] In one example, recall controller 120 is configured to update register 112 with the backup data when power is restored to the computing system. The process of updating register 112 may include searching second non-volatile memory 116 to identify cells with predetermined values or indicators, reverse mapping the cells with the identified cells to the data values of the registers before power was lost, and updating register 116 with the restored data values. Figure 4 The process of mapping and reverse mapping additional nonvolatile memory cells to data values of registers is described in detail.
[0049] Figure 2 2 is a flow chart 200 illustrating an example of a backup method using a fast backup system during a power loss event. Initially, during example operation 210, the fast backup system 100 detects a power loss event. The power loss event may include any interruption of power to the computing system 110, including a complete loss of power to the computing system 110 or an instability in power to the computing system 110. In example operation 220, upon detecting a power loss event, the write controller 118 checks the data in the register 112 to see if the register data has any updates that would benefit from a backup.
[0050] In example operation 230, upon determining based on operation 220 that there is an update to register data that needs to be backed up, the write controller 118 analyzes the register data and determines a word value associated with the register data. In one example, the word value of the n data bits can be the decimal equivalent of the n bits together. For example, for a 4-bit register containing a 4-bit word with the following binary bits: "1001" (4th bit: 1; 3rd bit: 0; 2nd bit: 0 and 1st bit 1), the example word value would be 9. The word value of the register is determined in operation 230 in order to identify additional non-volatile memory cells to be used in the backup process. With regard to Figure 4 An example mapping between word values of register data and non-volatile memory cells that back up the register data is discussed in more detail.
[0051] In example operation 240, the identified second non-volatile memory cell corresponding to the word value of the register data is set to a set value. In the example shown, the set value is the reciprocal of the initial reset value at which all non-volatile memory cells are set. In the case of a binary system, if each of the cells of the second non-volatile memory 116 is set to an initial reset value of 1, then when backing up the register data, the cell mapped to the register word value is set to a set value of 0 (the reciprocal of the initial reset value of 1). Similarly, if the initial reset value is set to 0, then the set value (which is the reciprocal of the initial reset value) is 1. In a binary system, the initial reset value of the additional non-volatile memory can be 0 or 1. The backup process is configured to mark the additional non-volatile memory cells in a manner that easily identifies the word value of the register 112.
[0052] Since each possible word value associated with the register data is mapped to a corresponding one of the cells of the second non-volatile memory 116, only one bit of the second non-volatile memory 116 needs to be set in order to completely back up the register data. In this case, the size of the register is not important. Regardless of the size of the register, only one bit needs to be set in order to back up the register data using the fast backup system. Updating only one bit during the backup process makes the fast backup system faster than traditional backup methods, which require backing up every bit of the register. Therefore, in a traditional backup system, for a 4-bit register, 4 bits of the non-volatile memory need to be updated; for an 8-bit register, 8 bits of the non-volatile memory need to be updated, and so on. Since the fast backup system only needs to update 1 bit during a power loss event, the fast backup system is also more reliable because the probability of completing the backup process before power is completely lost is increased.
[0053] After completing operation 240, the fast backup process is completed and the fast backup method during power loss 200 ends in operation 250. In addition, if the write controller 118 determines that the register has not been updated, and / or the register data does not need to be backed up, then the fast backup method during power loss 200 also ends in operation 250. Step 250 ends the backup process initiated when a power loss event is detected.
[0054] Figure 3 3 is a flow chart 300 illustrating an example of a method of restoring data during a power up event. Initially, during example operation 310, the fast backup system 100 detects a power up event. The power up event may include restoring power to the fast backup system 100 after a period of complete power loss, or restoring stable power to the fast backup system 100 after a period of unstable power.
[0055] In example operation 320, upon detection of a power-on event in operation 310, the recall controller 120 searches the second non-volatile memory 116 and identifies cells having data values set to set values. If none of the cells of the second non-volatile memory 116 are set to set values, the register data is not backed up for any number of reasons including: the register 112 is not updated and therefore does not need to be backed up, or the fast backup system 100 does not have enough time to complete the backup process. If none of the cells of the second non-volatile memory 116 are set to set values, the recall controller ends the method of restoring the register data in operation 360. Otherwise, the recall controller proceeds to the next operation in the flowchart 300.
[0056] In example operation 330, the recall controller uses the Figure 4 The reverse mapping process is described in more detail to obtain the word value of the register 112 based on the cells with set values in the second non-volatile memory 116. Subsequently, in example operation 340, the data values of the individual bits of the register 112 are restored using the identified word value of the register 112.
[0057] In example operation 350, once register 112 is restored, the data values of all cells of second non-volatile memory 116 are reset to the initial reset value. The reset process is completed to prepare the cells of second non-volatile memory 116 for rapid backup in the event of another power loss event. After resetting the data values of the additional non-volatile memory cells, the method for restoring register data ends in example operation 360.
[0058] Figure 44 is a table 400 showing an example mapping between register word values and additional non-volatile memory cell locations for a 4-bit register. In a binary system, each data bit can have a data value of 0 or 1. For 4 data bits (i.e., a 4-bit word), the data values can range from "0000" to "1111". In general, for 4 data bits, there are 24 or 16 possible combinations of word values. An 8-bit register includes at least 256 possible combinations of word values, and therefore at least 256 additional non-volatile memory cells may be required. Similarly, a 16-bit register includes at least 65536 possible combinations of word values, and therefore at least 65536 additional non-volatile cells may be required.
[0059] For the current example of a 4-bit register, all 16 possible word values are listed on the left hand side of the table, under "4-bit Register Word Value" 410. The corresponding 16 additional non-volatile memory cell locations 420 that map to each of the word values listed on the left hand side of the table are listed on the corresponding right hand side cells of the table. For example, the word value 1001 maps to cell location "9". In the example mapping table 400, each word value 410 maps to a cell location 420 that corresponds to the decimal equivalent of the word value itself. In other words, "0000" maps to "0", "0011" maps to "3", "1101 maps to "13", etc. However, the mapping between register word values and additional non-volatile cell locations need not correspond to equivalent decimal values as in the example. For example, "0000" may be mapped to "15", or "0000" may be mapped to "2", or any other cell location, as long as the mapping information is stored and can be retrieved and used by the fast backup system 100 as needed. During power-up, the same mapping table 400 can be used to reversely map cell locations of additional non-volatile memory with set values to word values of registers.
[0060] Figure 5a and Figure 5b An example power loss operation 500 and an example power up operation 600 associated with a fast backup of a 4-bit register are shown, where the register has a word value of "1010". Specifically, Figure 5a Register word value 512, register word value 522 and corresponding additional non-volatile cell number 514, cell number 524 and cell data value 516, cell data value 526 are shown as they existed before power was lost 510 and when power was detected 520. Before power was lost 510, register word value 512 was "1010". For this example, the 16 additional non-volatile memory cells corresponding to the 4-bit registers are all reset to an initial reset value of "1". In other examples, the initial reset value may be "0" instead of "1".
[0061] For this example, the register word value is mapped to a corresponding additional non-volatile cell having a cell number or position that is the decimal equivalent of the register word value. Figure 4 As discussed, in different examples, the mapping scheme may be different. When power is lost 520, the register word value 522 loses its data value. The fast backup system 100 uses the mapping scheme to find the cell number 524 that corresponds to the decimal equivalent of the register word value "1010". In this case, the decimal equivalent of "1010" is "10". Therefore, the data value of the additional non-volatile memory cell number "10" is changed from the initial reset value "1" to the set value "0". The data values of the rest of the cells in the additional non-volatile memory remain at "1".
[0062] Figure 5b Register word value 612, register word value 622 and corresponding additional non-volatile cell number 614, cell number 624 and cell data value 616, cell data value 626 are shown as they exist at the time 610 when power is restored and after restoration of the register data value is complete 620. At power restoration 610, register word value 612 is empty because the register lost its data value when power was lost and is still awaiting restoration. Similarly, at power restoration 610, cell number "10" of the additional non-volatile memory is still at "0".
[0063] After detecting power restoration, the fast backup system 100 uses the recall controller 120 to search the cells of the additional nonvolatile memory for cells having a data value set to a set value of "0". In this case, the cell number "10" of the additional nonvolatile memory cell is identified as a cell having a data value of 616 "0". The recall controller 120 then uses the information about Figure 4 The reverse mapping method discussed converts the cell number to identify the word value corresponding to the identified cell number. In this example, it is determined that the identified cell number "10" corresponds to the word value "1010", and the register word value 622 is restored accordingly. After the register word value 622 is restored to its original value "1010", the data values 626 of all cells in the additional non-volatile memory are set back to the initial reset value "1". Therefore, at time 620, the register 622 and the additional non-volatile memory cell 626 are fully restored to their original values, as seen at time 510.
[0064] Figure 6 Shows the combination discussed above Figure 2 and Figure 3Another example method 700 of various aspects of the method depicted in FIG. At operation 310, the fast backup system 100 detects a power-on event. The power-on event may include restoring power to the fast backup system 100 after a period of complete power loss, or restoring stable power to the fast backup system 100 after a period of unstable power.
[0065] When a power-on event is detected in operation 310, the recall controller 120 searches the second non-volatile memory 116 and identifies cells having data values set to set values. In example operation 330, the recall controller uses, for example, a combination of Figure 4 The described reverse mapping process obtains the word value of the register 112 based on the cells with set values in the second non-volatile memory 116. Subsequently, in example operation 340, the data values of the individual bits of the register 112 are restored using the identified word value of the register 112.
[0066] In example operation 350, once register 112 is restored, the data values of all cells of second non-volatile memory 116 are reset to the initial reset value. The reset process is completed to prepare the cells of second non-volatile memory 116 for rapid backup in the event of another power loss event. After resetting the data values of the additional non-volatile memory cells, the method for restoring register data ends in example operation 360.
[0067] In operation 210, fast backup system 100 detects a power loss event. A power loss event may include any interruption of power to computing system 110, including a complete loss of power to computing system 110 or an instability in power to computing system 110. In example operation 220, upon detecting a power loss event, write controller 118 checks the data in registers 112 to see if the register data has any updates that would benefit from being backed up.
[0068] In example operation 230, upon determining that there is an update to the register data that needs to be backed up based on operation 220, the write controller 118 analyzes the register data and determines a word value associated with the register data. In one example, the word value of the n data bits may be the decimal equivalent of the n bits together. The word value of the register is determined in operation 230 in order to identify additional non-volatile memory cells to be used in the backup process.
[0069] In example operation 240, the identified second non-volatile memory cell corresponding to the word value of the register data is set to a set value. In the example shown, the set value is the reciprocal of the initial reset value at which all non-volatile memory cells are set. In the case of a binary system, if each of the cells of the second non-volatile memory 116 is set to an initial reset value of 1, then when backing up the register data, the cell mapped to the register word value is set to a set value of 0 (the reciprocal of the initial reset value of 1). Similarly, if the initial reset value is set to 0, then the set value (which is the reciprocal of the initial reset value) is 1. In a binary system, the initial reset value of the additional non-volatile memory can be 0 or 1. The backup process is configured to mark the additional non-volatile memory cells in a manner that easily identifies the word value of the register 112.
[0070] Since each possible word value associated with the register data is mapped to a corresponding one of the cells of the second non-volatile memory 116, only one bit of the second non-volatile memory 116 needs to be set to a set value in order to completely back up the register data. In this case, the size of the register is not important. Regardless of the size of the register, only one bit needs to be set in order to back up the register data using the fast backup system. Updating only one bit during the backup process makes the fast backup system faster than traditional backup methods, which require backing up every bit of the register. Therefore, in a traditional backup system, for a 4-bit register, 4 bits of the non-volatile memory need to be updated; for an 8-bit register, 8 bits of the non-volatile memory need to be updated, and so on. Since the fast backup system only needs to update 1 bit during a power loss event, the fast backup system is also more reliable because the probability of completing the backup process before power is completely lost is increased.
[0071] The method then returns to operation 310 regarding sensing of power-up. If write controller 118 determines that registers have not been updated in operation 220, and / or that register data does not need to be backed up, the fast backup method also returns to operation 310 during power loss 200 to determine a power-up event.
[0072] According to some embodiments, a method for quickly backing up register values upon power loss is disclosed. The method includes: providing a register configured to store a plurality of words; and providing a non-volatile memory having a plurality of cells, wherein each cell corresponds to one of the words of the register. Each cell of the non-volatile memory is set to an initial reset value. In response to detecting a power loss, the word stored by the register is determined; and the initial reset value of the cell of the non-volatile memory corresponding to the determined word stored by the register is changed to a set value.
[0073] According to some embodiments, the aforementioned method further comprises: in response to detecting power restoration, identifying the cell having the set value; writing the word corresponding to the identified cell to the register; and resetting the cell of the non-volatile memory to the initial reset value. According to some embodiments, in response to detecting the power loss by the recall controller, each cell of the non-volatile memory is set to an initial value. According to some embodiments, each of the plurality of words comprises n bits, and wherein n is an integer equal to or greater than 0. According to some embodiments, the plurality of words comprises 2 n According to some embodiments, the plurality of units comprises 2 n According to some embodiments, the aforementioned method further comprises: determining whether the register has been updated since the power loss was detected. According to some embodiments, the cell of the non-volatile memory is reset to the initial reset value by a write controller.
[0074] According to another embodiment, a method for quickly restoring and recovering register values upon power restoration is disclosed. The method includes: providing a register configured to store a plurality of words; and providing a non-volatile memory having a plurality of cells, each cell corresponding to one of the words of the register. In response to detecting power restoration after power loss, identifying the cell with a set value; and writing the word corresponding to the identified cell to the register. The cell of the non-volatile memory is then reset to an initial reset value.
[0075] According to some embodiments, the aforementioned method further comprises: in response to detecting a power loss, determining the word stored by the register; changing the initial reset value of the cell of the non-volatile memory corresponding to the determined word stored by the register to the set value. According to some embodiments, the cell of the non-volatile memory is reset to the initial reset value by a write controller. According to some embodiments, each of the plurality of words comprises n bits, and wherein the plurality of words comprises 2 n words, and the plurality of units comprises 2 n According to some embodiments, the aforementioned method further comprises: recognizing that the register has been updated since the power loss. According to some embodiments, in response to detecting the power loss by the recall controller, each cell of the non-volatile memory is set to an initial value.
[0076] According to other embodiments, a system for quickly backing up and restoring register values upon power loss and subsequent power restoration is disclosed. The system includes: a first memory configured to store data; and a register configured to store a plurality of words. The register is configured to receive the data from the first memory and store the data as one of the plurality of words. A second non-volatile memory has a plurality of cells. Each of the plurality of words has a corresponding cell of the register, and each of the plurality of cells is reset to an initial reset value. In response to power loss, a controller is configured to: determine the one of the plurality of words stored by the register; and change the initial reset value of the corresponding cell of the register to a set value. In response to power restoration, the controller is configured to: identify the corresponding cell of the second non-volatile memory having the set value; write the one of the words of the identified corresponding cell to the register; and reset the identified corresponding cell to the initial reset value.
[0077] According to some embodiments, in response to detecting the power restoration, the controller is further configured to write the one of the words of the identified corresponding unit to the first memory. According to some embodiments, each of the stored multiple words has n bits, where n is an integer equal to or greater than 0, and wherein the multiple words contain 2 n words, and wherein the second non-volatile memory comprises 2 n According to some embodiments, the first memory is a non-volatile memory. According to some embodiments, the controller includes: a recall controller configured to change the initial reset value of the corresponding cell of the register to the set value in response to the power loss; and a write controller configured to identify the corresponding cell of the second non-volatile memory with the set value in response to the power restoration, and write the one of the words of the identified corresponding cell to the register. According to some embodiments, the write controller is further configured to identify whether the register has been updated since the power loss.
[0078] The foregoing summarizes the features of several embodiments so that those skilled in the art can better understand the various aspects of the present disclosure. Those skilled in the art will appreciate that they can readily use the present disclosure as a basis for designing or modifying other processes and structures for implementing the same purposes and / or achieving the same advantages of the embodiments described herein. Those skilled in the art will also recognize that such equivalent constructions do not depart from the spirit and scope of the present disclosure, and those skilled in the art may make various changes, substitutions, and modifications herein without departing from the spirit and scope of the present disclosure.
Claims
1. A method for backing up register values, include: Set up registers configured to store multiple words; A non-volatile memory having a plurality of cells is provided, wherein the cell number or position of each cell corresponds to a register data word value in the word of the register; Setting each cell of the nonvolatile memory to an initial reset value; In response to detecting a power loss, determining the word stored by the register; and The initial reset value of the cell of the nonvolatile memory corresponding to the determined word stored by the register is changed to a set value.
2. The method according to claim 1, further comprising: include: In response to detecting power restoration, identifying the unit having the set value; writing the word corresponding to the identified cell into the register; and The cells of the nonvolatile memory are reset to the initial reset values.
3. The method according to claim 1, in, In response to detecting the power loss by a recall controller, each cell of the nonvolatile memory is set to the set value. 4 . The method of claim 1 , wherein each of the plurality of words comprises n bits, and wherein n is an integer equal to or greater than 0. 5 .
5. The method according to claim 1, wherein the plurality of words comprises 2 n Words.
6. The method according to claim 1, wherein the plurality of units comprises 2 n units.
7. The method of claim 1, further comprising determining whether the register has been updated since the power loss was detected.
8. The method of claim 1, wherein the cells of the nonvolatile memory are reset to the initial reset value by a write controller.
9. A method for restoring and recovering register values, include: Set up registers configured to store multiple words; A non-volatile memory having a plurality of cells is provided, wherein the cell number or position of each cell corresponds to a register data word value in the word of the register; In response to detecting restoration of power after a power loss, identifying the unit having a set value; writing the word corresponding to the identified location to the register; and The cells of the nonvolatile memory are reset to initial reset values.
10. The method according to claim 9, further comprising: include: In response to detecting a power loss, determining the word stored by the register; The initial reset value of the cell of the nonvolatile memory corresponding to the determined word stored by the register is changed to the set value.
11. The method of claim 9, wherein the cells of the nonvolatile memory are reset to the initial reset value by a write controller.
12. The method of claim 9, wherein each of the plurality of words comprises n bits, and wherein the plurality of words comprises 2 n words, and the plurality of units comprises 2 n units.
13. The method according to claim 9, further comprising: include: It is recognized that the register has been updated since the power was lost.
14. The method according to claim 9, in, In response to detecting the power loss by a recall controller, each cell of the nonvolatile memory is set to the set value.
15. A system for backing up and restoring register values, include: a first memory configured to store data; a register configured to store a plurality of words, wherein the register is configured to receive the data from the first memory and to store the data as one of the plurality of the words; a second non-volatile memory having a plurality of cells, a cell number or position of each cell corresponding to a register data word value in the word of the register, wherein each cell of the plurality of cells is set to an initial reset value; A controller, wherein in response to a loss of power, the controller is configured to: determining the one of the plurality of words stored by the register; and changing the initial reset value of the corresponding unit of the register to a set value; and Wherein in response to power restoration, the controller is configured to: identifying the corresponding cell of the second nonvolatile memory having the set value; writing said one of said words of the identified corresponding cell to said register; and The identified corresponding cell is reset to the initial reset value.
16. The system of claim 15, in response to detecting the power restoration, the controller is further configured to write the one of the words of the identified corresponding cell to the first memory.
17. The system of claim 15, wherein each of the plurality of words stored has n bits, wherein n is an integer equal to or greater than 0, wherein the plurality of words comprises 2 n words, and wherein the second non-volatile memory comprises 2 n units.
18. The system of claim 15, wherein the first memory is a non-volatile memory.
19. The system of claim 15, wherein the controller include: a recall controller configured to change the initial reset value of the corresponding cell of the register to the set value in response to the power loss; as well as A write controller is configured to identify the corresponding cell of the second nonvolatile memory having the set value in response to the power restoration, and write the one of the words of the identified corresponding cell to the register.
20. The system of claim 19, wherein the write controller is further configured to identify whether the register has been updated since the power was lost.
