Data retention method and system during power gating
By centrally storing the data to be stored in the normally open power consumption control module, the problem of adding a low-voltage holding power supply in traditional power gating solutions is solved, and data retention and rapid recovery are achieved, reducing design complexity and cost.
Patent Information
- Application Number
- CN202411999798.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2044-12-31
AI Technical Summary
In low-power designs, traditional power gating solutions require additional low-voltage retention power, increasing design complexity and cost while at the same time risk of data loss.
By centrally storing the data to be stored in the normally open power consumption control module, the need for additional power supply is avoided and the complexity of low power consumption is simplified.
This enables data to be kept and data recovery quickly after the module is powered on without adding additional power, reducing design risks and implementation cycles.
Smart Images

Figure CN119690232A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of chip technology, and in particular to a method and system for data retention during power gating. Background Art
[0002] In today's chip power consumption analysis, the importance of static power consumption is increasing day by day. After entering the nanoscale process, the threshold voltage of transistors is getting lower and lower, the gate-level oxide layer is getting thinner and thinner, and the static power consumption is gradually approaching or even surpassing the dynamic power consumption, and has become an issue as important as dynamic power consumption.
[0003] Therefore, in the current low-power design, the processing of static power consumption accounts for an increasingly large proportion. Power gating is always the preferred solution for optimizing static power consumption. Power gating means powering off the entire module. In the current design, many power gating solutions have achieved hardware automation, which is not easy for software and drivers to perceive. This power gating solution is often that the hardware determines that the module is in a completely idle state for a period of time (sometimes supplemented by some flag signals), and then the module will enter the power-off state. At this time, if a scenario similar to the following example occurs, the task will fail due to data loss:
[0004] 1. Register context reuse: There is a time interval between the two tasks issued by the software and some register contexts are reused, and the software will not perform a complete register configuration again before the second task starts.
[0005] 2. Data dependency: The next task needs to use some data generated during the previous task.
[0006] Then a retention mechanism is needed to store (save) the data before the module loses power and wait for quick recovery (restore) after the next power-on.
[0007] In order to store the data that needs to be retained after power failure in a register with a retention function or a static random access memory (SRAM) with a deep sleep mode, the module can maintain the data without loss through an additional low-voltage power supply when the power is off, and the retained data can be restored for normal functional logic after the module is powered on again. This solution usually requires an additional normally open power supply as an independent low-voltage retention power supply. The main purpose of this power supply is to maintain the necessary data when the normal working voltage of the module is turned off, but it will not participate in data transmission; at the same time, traditional solutions such as the above are usually implemented with the help of retention registers (Retetion flipflop) or static random access memory. From a spatial perspective, these are all local processing, that is, additional normally open (always on) retention cells will be attached to the storage cells that need to retain data within the power domain that can be turned off. In addition to the function of storing data in general storage cells, these retention cells also provide a set of control signal ports for retention recovery to save data to the retention circuit before the module loses power and restore it after power is turned on.
[0008] However, the traditional method requires an additional low-voltage retention power supply, which increases the cost of off-chip power supply design and implementation; at the same time, the additional normally open low-voltage power supply increases the complexity of the back-end on-chip power supply network, which may extend the implementation cycle and increase the design risk. In addition, because the retention cells are scattered inside the module, when the module is powered off and the data is retained in the retention cell, special attention needs to be paid to the isolation analysis and processing between the shutdown part in the module and the retention cell to avoid external power failure from destroying the retained data. Therefore, in fact, a sub-power domain that will not be shut down relative to the power domain is introduced into a power domain, which undoubtedly increases the complexity of low-power implementation. Summary of the invention
[0009] Based on this, it is necessary to provide a data retention method and system during power gating that can avoid adding an additional power supply and reduce the complexity of low power consumption implementation in order to address the above technical problems.
[0010] In a first aspect, the present application provides a data retention method during power gating, which is applied to a normally-on power consumption control module, and the method includes:
[0011] Sending a power-off request to the shut-off module, wherein the power-off request is used to instruct the shut-off module to return the data to be stored;
[0012] Receiving data saving requests sent by each of the switchable modules, and centrally storing the to-be-stored data carried by each of the data saving requests in a first holding memory;
[0013] In the case of receiving a data recovery signal, the data stored in the first holding memory is returned to the corresponding switchable module, wherein the data recovery signal is generated after the switchable module is powered on again.
[0014] In one embodiment, the method further comprises:
[0015] When the chip is powered on and reset, it enters the first default state;
[0016] In the first default state, only the data saving request sent by the shut-down module is received, and the data recovery signal is ignored.
[0017] In one embodiment, the receiving of the data saving requests sent by the switchable modules and centrally storing the to-be-stored data carried by the data saving requests in the first holding memory includes:
[0018] receiving a data saving request sent by the switchable module, and determining whether the data saving request is the last transmission request;
[0019] In the case where the data saving request is the last transmission request, the data to be stored carried by the data saving request is centrally stored in the first holding memory, and a ready state is entered; wherein in the ready state, the normally open power consumption control module is used to wait for the data recovery signal;
[0020] When the data save request is not the last transmission request, the data to be stored carried by the data save request is centrally stored in the first retention memory, entering the first saving state, and continuing to receive the next data save request sent by the shutoff module until the data save request is the last transmission request, entering the ready state; wherein, in the first saving state, the normally open power consumption control module is used to receive each data save request sent by the shutoff module.
[0021] In one embodiment, when a data recovery signal is received, returning the stored data to the corresponding switchable module includes:
[0022] When receiving a data recovery signal and being in a ready state, and the data returned to the switchable module is not the last data, returning the stored data to the corresponding switchable module;
[0023] When a data recovery signal is received and the device is in a ready state, and the data returned to the switchable module is the last data, the device enters a first default state;
[0024] The method further comprises:
[0025] When a data recovery signal is received and the device is in the first default state, the data recovery signal is ignored.
[0026] In a second aspect, the present application further provides a data retention method during power gating, which is applied to a switchable module, and the method comprises:
[0027] receiving a power-off request sent by a normally-on power consumption control module;
[0028] Determine the data to be stored based on the power-off request, generate a data save request based on the data to be stored, and send the data save request to the normally-on power consumption control module, wherein the data save request is used to instruct the normally-on power consumption control module to centrally store the data to be stored in a first holding memory;
[0029] When the power is turned on again, the data sent by the normally-on power consumption control module is received, wherein the data is sent by the normally-on power consumption control module when the data recovery signal is received.
[0030] In one embodiment, after receiving the power-off request sent by the normally-on power consumption control module, the method further includes:
[0031] Entering a storage determination state, and determining whether it is necessary to store the data to be stored in the normally-on power consumption control module before powering off;
[0032] In the case where it is not necessary to store the data to be stored in the normally-on power consumption control module, jump to the second default state; wherein, in the second default state, the power-off module is used to receive a power-off request sent by the normally-on power consumption control module;
[0033] In the case where the data to be stored needs to be stored in the normally-on power consumption control module, jumping to the second storage state;
[0034] The determining the data to be stored based on the power-off request includes:
[0035] In the second storage state, data to be stored is determined.
[0036] In one embodiment, the method further comprises:
[0037] When the switchable module operates normally, the intermediate data generated by the switchable module is stored in a local second holding memory, and the stored intermediate data is read from the second holding memory and processed.
[0038] A data retention system during power gating, the system comprising: a normally open power consumption control module and at least one switchable module;
[0039] The normally-on power consumption control module is used to execute the above-mentioned data retention method during power gating.
[0040] In one embodiment, the normally-on power consumption control module includes:
[0041] A first holding memory, used for centrally storing the data to be stored sent by each of the shutdown modules;
[0042] The first holding control unit is used to store the data to be stored sent by each of the shut-off modules into the first holding memory, read data from the first holding memory, and transmit the read data to the corresponding powered-on shut-off module.
[0043] In one embodiment, the first retention memory includes a first register and a first SRAM, wherein the first register is a non-retention register, and the first SRAM is a non-low power consumption SRAM.
[0044] In one of the embodiments, the normally-on power consumption control module includes a local clock, which is a working clock of the first retention memory and the first retention control unit, and is turned off when there is no storage of data to be stored and data recovery.
[0045] In one embodiment, the switchable module includes:
[0046] A conventional working unit, used for controlling the shut-down module to work normally;
[0047] A second holding control unit, comprising a second holding memory, for storing the to-be-stored data generated by the conventional working unit when the switchable module works normally, and for allowing the conventional working unit to read the data stored in the second holding memory;
[0048] The second holding control unit is further used to establish a communication path with the first holding control unit, and store and read the data to be stored based on the communication path.
[0049] In one embodiment, the communication path includes at least one of an existing configuration path and a retention path, the existing configuration path is an existing path for configuring the configuration information of the shut-off module; the retention path is used to send the prepare-to-power-off request sent by the first retention control unit to the second retention control unit; in the process of storing data to be stored, the data to be stored sent by the second retention control unit is sent to the first retention control unit; and in the process of data recovery, the data sent by the first retention control unit is sent to the second retention control unit.
[0050] In one embodiment, the holding path is an asynchronous transmission path.
[0051] In one embodiment, the second retention memory includes a second register and a second SRAM, wherein the second register is a non-retention register, and the second SRAM is a non-low power consumption SRAM.
[0052] The above-mentioned data retention method and system during power gating send a power-off request to the switchable module, and the power-off request is used to instruct the switchable module to return the data to be stored; receive the data saving request sent by each of the switchable modules, and store the data to be stored carried by each of the data saving requests in a first retention memory, and return the stored data to the corresponding switchable module during the data recovery process, wherein the normally open power consumption control module is an existing module, and there is no need to add an additional normally open low-voltage retention power supply for power-off retention of data, which saves the cost of the power supply module and reduces the complexity of the back-end power supply network, thereby reducing the design risk and reducing the design implementation cycle of the product; in the present application, the data of each switchable module is centrally stored in the first retention memory, which avoids the situation of introducing an additional normally open sub-power domain (sub-power domain introduced by retention) in a voltage domain, which means that there is no need to perform additional isolation analysis and processing on a single voltage domain, reducing the complexity of low-power implementation and verification, and this simplified low-power solution will reduce the risk of system problems and can also reduce the overall cycle of chip design implementation verification. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0054] Figure 1A structural diagram of a data retention system during power gating in one embodiment;
[0055] Figure 2 A schematic flow chart of a method for data retention during power gating in one embodiment;
[0056] Figure 3 A state machine control diagram of a normally-on power consumption control module in one embodiment;
[0057] Figure 4 A schematic flow chart of a data retention method during power gating in another embodiment;
[0058] Figure 5 FIG. 4 is a state machine control diagram of a shut-down module in one embodiment. DETAILED DESCRIPTION
[0059] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0060] The data retention system during power gating provided in an embodiment of the present application includes: a normally-on power consumption control module and at least one switchable module.
[0061] The normally open power consumption control module is a normally open module already in the chip, usually a power module or a clock control module. The normally open power consumption control module is used to implement a data retention method when power gating is performed, so as to centrally save the data in different turn-off modules, thereby avoiding the need for an additional power supply.
[0062] Among them, the normally-open power consumption control module can save the retention data of each turnable module, that is, all retention data are centrally managed in the normally-open power consumption control module, so that the retention data from as many turnable modules that are turned on and off at the same time can be packaged into the SRAM of a few first retention memories, which is convenient for power consumption management and area optimization of this part of the circuit.
[0063] The holding unit is no longer retained inside each shut-down module, so each shut-down module can be completely shut down as a whole, without having to pay attention to the local isolation processing within the module, thereby simplifying the power domain configuration of a single module and the low-power strategy configuration within the module, reducing the complexity of low-power verification, simulation and implementation.
[0064] In one of the optional embodiments, the normally-on power consumption control module includes: a first holding memory and a first holding control unit. The first holding memory is used to centrally store the data to be stored sent by each shutdown module. The first holding control unit is used to store the data to be stored sent by each switchable module to the first holding memory, and read the data from the first holding memory, and transmit the read data to the corresponding powered-on switchable module.
[0065] The normally-on power management unit (PMU) is responsible for managing power consumption related matters and is a module that will not shut down the power supply. In addition to the normal working logic part (normal logic), it also includes a first retention memory and a first retention control unit.
[0066] The first retention memory is used to centrally store the data that needs to be retained of all the switchable parts. The first retention memory may include a plurality of SRAMs (Static Random-Access Memory, SRAM) and a plurality of registers.
[0067] Since the area of the holding register is usually increased by about 20% to 50% compared with the ordinary register, the area of the SRAM with the holding function is generally increased by about 5% to 10% relative to the same ordinary SRAM. In one optional embodiment, the first holding memory includes a first register and a first SRAM, wherein the first register is a non-holding register and the first SRAM is a non-low-power SRAM. Among them, the non-holding register is an ordinary register, and the first SRAM is also an ordinary SRAM.
[0068] The first retention control unit (PMU retention control module) is responsible for processing the retention transmission logic (including storage logic and recovery logic) through the shutoff module (PSO module), and is responsible for saving the data to be retained sent by the shutoff module in the first retention memory for data preservation, and reading data from the first retention memory and transmitting it to the shutoff module for data recovery.
[0069] In one of the optional embodiments, the normally-on power consumption control module includes a local clock, which is a working clock of the first retention memory and the first retention control unit, and the local clock is turned off when there is no storage of data to be stored and data recovery.
[0070] In the above embodiment, by adding clock gating to the normally open power consumption control module locally, the clock related to the maintenance logic is turned off when data storage and data recovery are not needed, thereby further reducing dynamic power consumption.
[0071] In one of the optional embodiments, the switchable module includes: a normal working unit and a second holding control unit.
[0072] in Figure 1 Schematic diagrams of four types of switchable modules are given in FIG. 1 , among which the switchable module PSO E gives the current special holding path transmission structure, and the other switchable modules PSO are used to illustrate the possible application scenarios of the holding path.
[0073] The conventional working unit is used to control the normal operation of the switchable module, for example, the operation before the switchable module is powered off, which is not specifically limited here.
[0074] The second holding control unit includes a second holding memory, which is used to store the data to be stored generated by the regular working unit when the switchable module works normally, and is used for the regular working unit to read the data stored in the second holding memory. The second holding control unit is also used to establish a communication path with the first holding control unit, and store the data to be stored and read the data based on the communication path.
[0075] Wherein, when the shutoff module works normally, the intermediate data generated during the work can be stored in the second retention memory to facilitate data retention during power-on and power-off, and when working normally, if the intermediate data is needed, the data is directly read from this part. It should be noted that the second retention control unit can also determine whether the shutoff module needs to save data when it is powered off, that is, to retain data, based on whether valid data is stored in the second retention memory. If valid data is stored, it is determined that the data needs to be saved, otherwise it is determined that the data does not need to be saved.
[0076] When the shutoff module needs to retain data, the second retention control unit sends the data to be stored in the second retention memory to the normally open power consumption control module for data preservation, and after the shutoff module is powered on, receives the data sent by the normally open power consumption control module for data recovery.
[0077] For ease of understanding, combined Figure 1 , the above-mentioned transmission signals are described as follows:
[0078] In the normally-on power consumption control module, data is read from the first retention memory Retention mem via the Ret_Read path and is sent to the first retention control unit PMU retention control for transmission.
[0079] The Ret_Write path is a path used by the first retention control unit PMU retention control to store the data obtained from the disconnectable module PSO into the first retention memory Retention mem.
[0080] The above-mentioned Ret_Read path and Ret_Write path are both standard handshake communications.
[0081] In the disconnectable module PSO E, the Write path includes the normal register configuration path of the disconnectable module, and also includes the storage path for the intermediate data that needs to be retained and restored. Through this, the hardware will directly store all the data that needs to be retained and restored in the second retention memory reg / ram part of the second retention controller PSO retention control during normal operation.
[0082] The Read path is a path for obtaining the required information when the PSO of the shutdown module works normally.
[0083] In the implementation, based on the clock condition of the entire module, the Write path and the Read path can adopt at least one of the two modes of direct transmission and handshake transmission.
[0084] The Special retention Path between the normally open power control module and the shutoff module is generally implemented with the help of four-phase asynchronous handshakes or two-phase asynchronous handshakes with an even number of transmissions. The channel data bandwidth is generally selected as an integer multiple of the physical register bit width. Among them, Preq is the power-down preparation request issued by the normally open power control module PMU to the shutoff module PSO, notifying the shutoff module PSO to start the save process. Save_path is the storage data path of the Special retention Path, which is initiated by the shutoff module PSO and responded by the normally open power control module PMU. Restore_path is the recovery data path of the Special retention Path, which is initiated by the normally open power control module PMU and responded by the shutoff module PSO.
[0085] In one of the optional embodiments, the communication path includes at least one of an existing configuration path and a retention path, the existing configuration path is an existing path for configuring configuration information of a shut-down module; the retention path is used to send a prepare-to-power-off request sent by a first retention control unit to a second retention control unit; in the process of storing data to be stored, the data to be stored sent by the second retention control unit is sent to the first retention control unit; and in the process of data recovery, the data sent by the first retention control unit is sent to the second retention control unit.
[0086] Continue to combine Figure 1 There are two types of paths between the shut-down module and the normally open power consumption control module. One is the existing configuration path (Setup Path), and the other is the retention path (Special Retention Path). Both paths can be used to retain data in the shut-down module. Optionally, the communication path includes at least one of the existing configuration path and the retention path. The two types of paths can be used to meet the data retention and recovery requirements of all shut-down modules. Figure 1 Not all turnable modules require two complete channels. Some turnable modules do not need to maintain data themselves, so there is no need to establish a communication channel with the normally open power consumption control module. For example Figure 1 The switchable module PSO C in the system.
[0087] One thing that needs to be noted is that in the chip, many modules already have register configuration paths, which are used to configure the working background (context) of the module and read the working status of the module and other information. With the help of the readability and writability of this configuration path itself, the data retention and recovery requirements of the module's configuration registers can be easily realized. This requirement is mainly because some configuration registers will not be reconfigured on the driver side / software side, so when the module hardware is powered off autonomously (not relying on software drive), it is also necessary to automatically retain these data. This path reuses the existing configuration path to avoid additional logic overhead. However, this path itself has certain limitations. It cannot fully access all the registers of the module. Therefore, in this embodiment, an additional special retention path is added to provide retention and recovery functions for the remaining storage parts except the configuration registers.
[0088] In one of the optional embodiments, the holding path is an asynchronous transmission path.
[0089] In one optional embodiment, the second retention memory includes a second register and a second SRAM, wherein the second register is a non-retention register, and the second SRAM is a non-low power consumption SRAM.
[0090] Among them, the storage module part (including the first retention memory and the second retention memory) in this application will inevitably introduce additional gate counts, because it finds another space in the normally open power consumption control module to store the data originally in the switchable module. However, the registers in the original switchable module that need to retain power-off data are retention registers, which usually increase the area of ordinary registers by about 20% to 50%. At the same time, SRAM with retention function will generally increase the area by about 5% to 10% relative to the same ordinary SRAM. In view of this, this application has made the following optimization adjustments in terms of the number of gates / power consumption of the storage module:
[0091] First, the holding registers in the shutdown module are converted back to ordinary registers, and the SRAM that supports low-power control is converted back to ordinary SRAM, thereby reducing the area overhead of this part of the shutdown module;
[0092] Ordinary SRAM and registers are directly used in the normally-on power consumption control module PMU to store data that needs to be retained when the shut-down module is powered off, and there is no need to use devices that support low power consumption functions.
[0093] The data in the registers / SRAMs that are switched on and off are packed into a single common SRAM for unified storage. When the amount of data to be stored is large, the single SRAM itself will have a smaller area than the configuration of multiple discrete SRAMs plus registers.
[0094] The normally-on power consumption control module PMU does not have high performance requirements, and the maintenance path uses asynchronous transmission implementation, so the normally-on power consumption control module PMU can operate at a lower clock frequency and voltage as a whole; the lower operating frequency will optimize the physical unit with a smaller area, ultimately reducing the area and cutting power consumption.
[0095] Finally, by adding clock gating to the normally open power consumption control module PMU, the clock related to the maintenance recovery logic can be turned off when storage and recovery are not needed, further reducing dynamic power consumption.
[0096] In some optional embodiments, the present application also provides a chip, including the above-mentioned power gating data retention system.
[0097] In the above embodiment, the data inside the shutoff module can be efficiently stored in a normally-on module, thereby avoiding many complex low-power implementation details; and the shutoff module is given the ability to independently choose whether to store, and at the same time, the first hold controller in the PMU can also automatically filter out unnecessary redundant / invalid recovery operations to save power-on and power-off preparation time. These two points together make the present application well adapted to various chip application scenarios, regardless of whether the shutoff module needs to be saved / restored, or whether it will dynamically decide whether to save / restore based on the current task configuration, it can be perfectly adapted.
[0098] This application does not need to add an additional normally open low-voltage holding power supply for data power-off retention, which saves the cost of the power module and reduces the complexity of the back-end power supply network, thereby reducing the design risk and shortening the product design implementation cycle;
[0099] In addition, the present application avoids the situation where an additional normally-on sub-power domain (sub-power domain introduced by retention) is introduced into a power domain, which means that there is no need to perform additional isolation analysis and processing within a single power domain, reducing the complexity of low-power implementation and verification. This simplified low-power solution will reduce the risk of system problems and can also reduce the overall cycle of chip design implementation and verification.
[0100] Third, the special retention channel design of the present application can be adapted to almost all application scenarios, and can easily help designers avoid all invalid / redundant save / restore actions, providing a highly efficient retention function.
[0101] Fourth, the present application also optimizes the area and power consumption of the storage part from multiple aspects, so that the impact of the present application on the chip area is reduced to an extremely low level.
[0102] In an exemplary embodiment, Figure 2 As shown, a data retention method during power gating is provided, and the method is applied to Figure 1 The normally open power consumption control module in the embodiment is taken as an example to illustrate, including the following steps 202 to 206. Among them:
[0103] S202: Send a power-off request to the shut-off module, where the power-off request is used to instruct the shut-off module to return the data to be stored.
[0104] Among them, before each shutoff module is ready to power off after running for a period of time, the normally-on power consumption control module sends a power-off request to the corresponding shutoff module, so that the shutoff module can determine whether to perform the data retention process based on the power-off request, that is, whether there is data to be stored, and whether the data to be stored needs to be sent to the normally-on power consumption control module for storage.
[0105] In other embodiments, a normally-on power consumption control module can provide power to each switchable module.
[0106] S204: receiving data saving requests sent by each switchable module, and centrally storing the to-be-stored data carried by each data saving request into the first holding memory.
[0107] Among them, the normally-on power consumption control module is in the first default state IDLE after the system starts, that is, the idle state, which means that there is no data that needs to be restored at this time. The normally-on power consumption control module is waiting for a new data save request from the shut-down module. After the normally-on power consumption control module sends a power-off request to the shut-down module, if there is data to be stored that needs to be saved, the shut-down module sends a data save request to the normally-on power consumption control module.
[0108] It should be noted that since the number relationship between the normally-on power consumption control modules and the shutoff modules is a one-to-many relationship, and the design allows the opening and closing times of multiple shutoff modules to overlap, that is, they are supported to be switched on and off independently, the normally-on power consumption control module and each shutoff module in this application are designed to communicate asynchronously and not interfere with each other.
[0109] After receiving the data saving request sent by the switchable module, the normally-on power consumption control module saves the data to be stored carried in the data saving request to the first retention memory. Optionally, each switchable module shares a first retention memory, that is, the data to be stored in the first retention memory of each switchable module is stored continuously, which can be indexed by the switchable module identifier.
[0110] S206: When a data recovery signal is received, the data stored in the first holding memory is returned to the corresponding switchable module, wherein the data recovery signal is generated after the switchable module is powered on again.
[0111] The data recovery signal is generated by the normally-on power consumption control module. When the shutoff module needs to be awakened again, the normally-on power consumption control module PMU will first restore the power, clock, isolation, reset and other states of the shutoff module to normal. Then the normally-on power consumption control module PMU will receive a data recovery signal restore_start from itself. The data recovery signal indicates that the shutoff module is ready and can start to determine whether to restore data to the shutoff module.
[0112] In the case where it is determined that the switchable module can perform data recovery, the corresponding switchable module returns the data stored in the first holding memory, so that the switchable module can operate normally after power-on.
[0113] The normally-on power consumption control module in the data retention method during the above-mentioned power gating is an existing module, and there is no need to add an additional normally-on low-voltage retention power supply for power-off retention of data, which saves the cost of the power supply module and reduces the complexity of the back-end power supply network, thereby reducing the design risk and shortening the product design implementation cycle; in the present application, the data of each turn-off module is centrally stored in the first retention memory, which avoids the situation where an additional normally-on sub-power domain (sub-power domain introduced by retention) is introduced into a voltage domain, which means that there is no need for additional isolation analysis and processing within a single voltage domain, reducing the complexity of low-power implementation and verification, and this simplified low-power solution will reduce the risk of system problems and can also reduce the overall cycle of chip design implementation and verification.
[0114] For ease of understanding, Figure 3 As shown, Figure 3 1 is a state machine control diagram of a normally-on power consumption control module in an embodiment, wherein the normally-on power consumption control module includes a first default state IDLE, a first save state, a restore state, and a ready state.
[0115] In one of the optional embodiments, the method further includes: when the chip is powered on and reset, entering a first default state IDLE; in the first default state IDLE, only receiving data to be stored in the shut-down module and ignoring a data recovery signal.
[0116] In the first default state IDLE, the normally-on power consumption control module PMU can only respond to data saving requests, that is, receive data to be stored, and automatically ignore / skip data recovery signals.
[0117] For example, after the chip is powered on and reset, the normally open power consumption control module PMU is in the first default state IDLE. For the switchable modules that are turned off by default after the chip is started, since it is actually the first time to be powered on, the normally open power consumption control module PMU will automatically skip this meaningless recovery process. In the subsequent processing process, the normally open power consumption control module PMU is in the first default state IDLE, and only receives the data to be stored of the corresponding switchable modules, and ignores the data recovery signals of these switchable modules.
[0118] In one of the optional embodiments, a data save request sent by each shutoff module is received, and the data to be stored carried by each data save request is stored in a first retention memory, including: receiving a data save request sent by the shutoff module, and determining whether the data save request is the last transmission request; if the data save request is the last transmission request, the data to be stored carried by the data save request is stored in the first retention memory, and entering a ready state; wherein in the ready state, a normally open power consumption control module is used to wait for a data recovery signal; if the data save request is not the last transmission request, the data to be stored carried by the data save request is stored in the first retention memory, entering a first saving state, and continuing to receive the next data save request sent by the shutoff module until the data save request is the last transmission request, and then entering a ready state; wherein, in the first saving state, a normally open power consumption control module is used to receive each data save request sent by the shutoff module.
[0119] Among them, in the first default state IDLE, when the first data save request arrives, if the data save request is also the last data save request required by the shut-down module during this power-off process, that is, save_last ==1 at this time, then the normally open power consumption control module PMU will jump from the first default state IDLE to the ready state DREADY, otherwise it will jump from the first default state IDLE to the first save state SAVE.
[0120] The first save state SAVE is the state of the normally open power consumption control module when the switchable module sends multiple data save requests to the normally open power consumption control module. That is to say, the first save state SAVE is the state of processing multiple data save requests, which means that multiple consecutive data save requests sent by the switchable module in the single power-off preparation are being processed.
[0121] In the first holding state SAVE, a data save request sent by the shutoff module can be received. When the last data save request (not the first) of the shutoff module is received by the normally open power consumption control module PMU, the normally open power consumption control module PMU jumps to the ready state DREADY.
[0122] In some optional embodiments, the method for determining whether it is the last data saving request includes at least one of the following:
[0123] The shut-down module directly sends the last flag information (the last data save request identifier) to the normally-on power consumption control module PMU. The last flag information is generated by the shut-down module.
[0124] The normally-on power consumption control module PMU generates data internally, and in this method, the normally-on power consumption control module PMU and the switchable module need to predefine the number of data storage requests for each fixed transmission.
[0125] In one of the optional embodiments, when a data recovery signal is received, the stored data is returned to the corresponding shutoff module, including: when the data recovery signal is received and the system is in a ready state, and the data returned to the shutoff module is not the last data, the stored data is returned to the corresponding shutoff module; when the data recovery signal is received and the system is in a ready state, and the data returned to the shutoff module is the last data, the first default state IDLE is entered; the above method also includes: when the data recovery signal is received and the system is in the first default state, the data recovery signal is ignored.
[0126] The ready state is a state in which the data of the shut-down module has been stored. Next, when encountering a power-on trigger signal of the shut-down module, the normally-on power consumption control module PMU will automatically jump to the recovery state to start the data recovery process.
[0127] The recovery state is the state where the normally open power control module PMU is restoring data for the shut-down module. The last data recovery request will generate a restore_last flag by the normally open power control module PMU itself. The restore_last flag is used to indicate that it is the last restored data, and the restore_last flag is used in conjunction with the response returned by the shut-down module to finally generate Figure 3 The restore_ack_last signal in the restore_ack_last signal indicates that the last data recovery request has been responded to by the switchable module, thereby triggering the state of the special holding path to jump to the first default state IDLE, and starting to wait for the data preservation request when the switchable module is powered off next time.
[0128] In an exemplary embodiment, Figure 4 As shown, a data retention method during power gating is provided, and the method is applied to Figure 1 The switchable module in the example is used as an example to illustrate, including the following steps 402 to 406. Among them:
[0129] S402: Receive a power-off request sent by a normally-on power consumption control module.
[0130] S404: Determine the data to be stored based on the power-off request, generate a data save request based on the data to be stored, and send the data save request to the normally-on power consumption control module. The data save request is used to instruct the normally-on power consumption control module to centrally store the data to be stored in the first retention memory.
[0131] The specific definition of the power-off request can be found above. In the power-off module PSO, it is necessary to add interface logic with the controller for all registers and SRAMs that need to be retained after power-off. The method adopted in this application is to put these registers and SRAMs in a submodule (reg / mem) for unified management in the power-off module during design, and place this submodule inside the second retention controller PSO retention to facilitate retention recovery operations. The core of the second retention controller inside the power-off module is also a state machine, which can be combined with Figure 5 shown.
[0132] After the shutoff module has been powered on and working for a certain period of time, it can receive a power-off request sent by the normally-on power consumption control module. Based on the power-off request, it can be determined whether data needs to be saved. When data needs to be saved, the data to be stored is obtained from the second retention memory, and a data save request is generated based on the data to be stored. The data save request is sent to the normally-on power consumption control module, so that the data to be stored are centrally stored in the first retention memory of the normally-on power consumption control module.
[0133] S406: When the power is turned on again, receiving data sent by the normally-on power consumption control module, the data is sent by the normally-on power consumption control module when receiving a data recovery signal.
[0134] The data recovery process of the shut-down module is a passive response to the control of the normally-on power consumption control module. The shut-down module only needs to passively and unconditionally complete the reception and response of the recovery data without any other special processing.
[0135] In one of the optional embodiments, after receiving a power-off request sent by a normally-on power consumption control module, it also includes: entering a storage judgment state, and judging whether it is necessary to store the data to be stored in the normally-on power consumption control module before powering off; if it is not necessary to store the data to be stored in the normally-on power consumption control module, jumping to a second default state; wherein, in the second default state, the power-off module is used to receive a power-off request sent by the normally-on power consumption control module; if it is necessary to store the data to be stored in the normally-on power consumption control module, jumping to the second storage state; determining the data to be stored based on the power-off request, including: determining the data to be stored in the second storage state.
[0136] Among them, the second default state is the state of each shut-off module after the system is started, and it can also be an idle state. In the second default state, the shut-off module waits to receive a power-off request (preq'snegedge) sent by the normally-open power consumption control module. After receiving the power-off request, the shut-off module will jump to the storage judgment state SAVE_JUDGE.
[0137] Among them, in the storage judgment state SAVE_JUDGE, the shutdown module will judge whether it is necessary to store the data in the normally open power consumption control module PMU before the power failure based on its own current task context. If the judgment result is that fail is not needed, it will return to the second default state IDLE; if pass is needed, it will jump to the second save state SAVE.
[0138] In one of the optional embodiments, whether it is necessary to store data in the normally-on power consumption control module PMU before the power failure is determined based on the value of the status register generated inside the shutoff module itself, and this value is autonomously configured by the shutoff module based on the specific scenario of the current task.
[0139] In the second saving state SAVE, the switchable module starts to send a data saving request to the normally open power consumption control module PMU, and the normally open power consumption control module PMU starts to save data based on the state machine described in the previous section.
[0140] In one of the optional embodiments, the method further includes: when the shutoff module operates normally, storing the intermediate data generated by the shutoff module in a local second holding memory, reading the stored intermediate data from the second holding memory, and processing the intermediate data.
[0141] This embodiment is a process of normal operation of the switchable module, for example, the operation before the switchable module is powered off, which is not specifically limited here.
[0142] Wherein, when the switchable module works normally, the intermediate data generated during the work can be stored in the second retention memory to facilitate data retention during power-on and power-off, and when working normally, if the intermediate data is needed, the data is directly read from the part. It should be noted that the second retention control unit can also determine whether the switchable module needs to save data when it is powered off, that is, to retain the data, based on whether there is data stored in the second retention memory.
[0143] For ease of understanding, a complete implementation example of the workflow for maintaining a path is provided, wherein for convenience, the states in the state machine of the normally-on power consumption control module PMU are referred to as PMU_IDLE, PMU_SAVE, PMU_DREADY, and PMU_RESTORE, and the state machine states in the shutoff module are referred to as PSO_IDLE, PSO_SAVE_JUDGE, and PSO_SAVE, and it is assumed that the shutoff module is in a power-off state after the chip is started.
[0144] In this embodiment, the workflow of the pathway is described starting from chip startup:
[0145] A. After the entire chip is powered on and reset, the normally open power consumption control module PMU state machine is in the PMU_IDLE state. For the module that is turned off after the default chip is started, when it is powered on for the first time, the normally open power consumption control module PMU will automatically skip this meaningless data recovery process.
[0146] B. After that, when the switchable module is ready to power off after running for a period of time, the switchable module receives a power-off request (preq_negedge) from the normally open power consumption control module PMU, and the switchable module enters the PSO_SAVE_JUDGE state. In this state, the switchable module will check whether it needs to store data in the normally open power consumption control module PMU through the hold path. If not, the switchable module jumps back to PSO_IDLE, otherwise the switchable module jumps to PSO_SAVE.
[0147] If the shutoff module jumps to the PSO_SAVE state, the shutoff module starts to initiate a data save request for this round to the normally open power consumption control module PMU. After receiving the data save request, the normally open power consumption control module PMU will first determine whether the data save request is a single transmission. If so, the normally open power consumption control module PMU will jump from PMU_IDLE to PMU_DREADY state and complete the storage of this round of data. If not, the normally open power consumption control module PMU will jump to PMU_SAVE state and start receiving multiple data save requests transmitted by the shutoff module until the normally open power consumption control module PMU receives the last data save request of this round, and its state will jump from PMU_SAVE to PMU_DREADY; at this time, after the shutoff module receives the response to the last data save request sent to the normally open power consumption control module PMU, it jumps back to the PSO_IDLE state; at this point, the data save process of this round ends, and the shutoff module can continue the subsequent power-off process until the power-off is completed.
[0148] If the shutoff module jumps back to the PSO_IDLE state directly, it means that the shutoff module has independently determined that it does not need to maintain the data on this path. The result is that the shutoff module has not sent a data save request to the normally open power consumption control module PMU during this power-off process. Then the state of the normally open power consumption control module PMU will remain unchanged in the PMU_IDLE state.
[0149] C. When the shut-down module needs to be awakened again, the normally open power control module PMU will first restore the power, clock, isolation, reset and other states of the shut-down module to normal. Then the normally open power control module PMU will receive a restore_start signal from itself, indicating that the shut-down module is ready and can start to determine whether to restore the data of the shut-down module. Specifically:
[0150] The normally open power consumption control module PMU is already in the PMU_DREADY state, that is, it has undergone the data preservation process during the last power failure. Then it will jump to the PMU_RESTORE state and start this round of data recovery until the normally open power consumption control module PMU receives the response to the last data recovery request it issued (from the shut-down module). Then it jumps back to the PMU_IDLE state and starts waiting for the next data preservation request from the shut-down module.
[0151] If the normally-on power consumption control module PMU is in the PMU_IDLE state, it means that no data storage was performed when the last power-off module was powered off, so there is no need to restore data when powered on this time, and the data recovery process is automatically skipped.
[0152] If the switchable module is in the power-on state by default after the chip is started, the above process can start directly from B.
[0153] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0154] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0155] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0156] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A data retention method during power gating, characterized in that: Applied to a normally-on power consumption control module, the method comprises: Sending a power-off request to the shut-off module, wherein the power-off request is used to instruct the shut-off module to return the data to be stored; Receiving data saving requests sent by each of the switchable modules, and centrally storing the to-be-stored data carried by each of the data saving requests in a first holding memory; In case of receiving a data recovery signal, the data stored in the first holding memory is returned to the corresponding switchable module, wherein the data recovery signal is generated after the switchable module is powered on again.
2. The method according to claim 1, characterized in that The method further comprises: When the chip is powered on and reset, it enters the first default state; In the first default state, only the data saving request sent by the shut-down module is received, and the data recovery signal is ignored.
3. The method according to claim 1, characterized in that The receiving the data saving request sent by each of the switchable modules, and centrally storing the to-be-stored data carried by each of the data saving requests into the first holding memory, comprises: receiving a data saving request sent by the switchable module, and determining whether the data saving request is the last transmission request; In the case where the data saving request is the last transmission request, the data to be stored carried by the data saving request is centrally stored in the first holding memory, and a ready state is entered; wherein in the ready state, the normally open power consumption control module is used to wait for the data recovery signal; When the data save request is not the last transmission request, the data to be stored carried by the data save request is centrally stored in the first retention memory, entering the first saving state, and continuing to receive the next data save request sent by the shutoff module until the data save request is the last transmission request, entering the ready state; wherein, in the first saving state, the normally open power consumption control module is used to receive each data save request sent by the shutoff module.
4. The method according to claim 3, characterized in that The step of returning the stored data to the corresponding switchable module upon receiving the data recovery signal comprises: When a data recovery signal is received and the device is in a ready state, and the data returned to the switchable module is not the last data, the stored data is returned to the corresponding switchable module; When a data recovery signal is received and the device is in a ready state, and the data returned to the switchable module is the last data, the device enters a first default state; The method further comprises: When a data recovery signal is received and the device is in the first default state, the data recovery signal is ignored.
5. A data retention method during power gating, characterized in that: Applied to a switchable module, the method comprises: receiving a power-off request sent by a normally-on power consumption control module; Determine the data to be stored based on the power-off request, generate a data save request based on the data to be stored, and send the data save request to the normally-on power consumption control module, wherein the data save request is used to instruct the normally-on power consumption control module to centrally store the data to be stored in a first holding memory; When the power is turned on again, the data sent by the normally-on power consumption control module is received, wherein the data is sent by the normally-on power consumption control module when the data recovery signal is received.
6. The method according to claim 5, characterized in that After receiving the power-off request sent by the normally-on power consumption control module, the method further includes: Entering a storage determination state, and determining whether it is necessary to store the data to be stored in the normally-on power consumption control module before powering off; In the case where it is not necessary to store the data to be stored in the normally-on power consumption control module, jump to the second default state; wherein, in the second default state, the power-off module is used to receive a power-off request sent by the normally-on power consumption control module; In the case where the data to be stored needs to be stored in the normally-on power consumption control module, jumping to the second storage state; The determining the data to be stored based on the power-off request includes: In the second storage state, data to be stored is determined.
7. The method according to claim 5, characterized in that The method further comprises: When the switchable module operates normally, the intermediate data generated by the switchable module is stored in a local second holding memory, and the stored intermediate data is read from the second holding memory and processed.
8. A data retention system during power gating, characterized in that: The system comprises: a normally-on power consumption control module and at least one switchable module; The normally-on power consumption control module is used to execute the data retention method during power gating as described in any one of claims 1 to 4.
9. The system according to claim 8, characterized in that The normally open power consumption control module includes: A first holding memory, used for centrally storing the data to be stored sent by each of the shutdown modules; The first holding control unit is used to store the data to be stored sent by each of the shut-off modules into the first holding memory, read data from the first holding memory, and transmit the read data to the corresponding powered-on shut-off module.
10. The system according to claim 9, characterized in that The first holding memory includes a first register and a first SRAM, wherein the first register is a non-holding register, and the first SRAM is a non-low power consumption SRAM.
11. The system according to claim 9, characterized in that The normally-on power consumption control module includes a local clock, which is a working clock of the first retention memory and the first retention control unit, and is turned off when there is no storage of data to be stored and no data recovery.
12. The system according to claim 9, characterized in that The switchable module comprises: A conventional working unit, used for controlling the shut-down module to work normally; A second holding control unit, comprising a second holding memory, for storing the to-be-stored data generated by the conventional working unit when the switchable module works normally, and for allowing the conventional working unit to read the data stored in the second holding memory; The second holding control unit is further used to establish a communication path with the first holding control unit, and store and read the data to be stored based on the communication path.
13. The system according to claim 12, characterized in that The communication path includes at least one of an existing configuration path and a retention path, wherein the existing configuration path is an existing path for configuring the configuration information of the shut-off module; the retention path is used to send the prepare-to-power-off request sent by the first retention control unit to the second retention control unit; in the process of storing data to be stored, the data to be stored sent by the second retention control unit is sent to the first retention control unit; and in the process of data recovery, the data sent by the first retention control unit is sent to the second retention control unit.
14. The system according to claim 13, characterized in that The holding path is an asynchronous transmission path.
15. The system according to claim 14, characterized in that The second holding memory includes a second register and a second SRAM, wherein the second register is a non-holding register, and the second SRAM is a non-low power consumption SRAM.
Citation Information
Patent Citations
System on chip with always-on processor which reconfigures soc and supports memory-only communication mode
CN106462217A
Memory chip and control method thereof
CN111552365A
Chip low-power-consumption system, low-power-consumption management method, control device and storage medium
CN114442788A
Power gating method and system-on-chip
CN116400795A
Electronic device and control method thereof
CN116594494A