Power gated data retention method and system

By introducing a normally-on power control module into the chip to centrally store the data of the shut-off module, the problem of data loss during power gating is solved, the power supply design cost and complexity are reduced, it is adapted to a variety of application scenarios, and the storage area and power consumption are optimized.

CN119690232BActive Publication Date: 2025-11-25GLENFLY TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411999798.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-11-25
Estimated Expiration
2044-12-31

AI Technical Summary

Technical Problem

Existing power gating schemes are prone to data loss when the module loses power, and traditional methods require an additional low-voltage backup power supply, which increases the cost and complexity of off-chip power supply design, as well as the complexity of low-power implementation.

Method used

The normally open power control module centrally stores the data of the turn-off module, utilizing existing modules without the need for an additional normally open low-voltage holding power supply. Asynchronous communication and clock gating technology are used to simplify the power network design and avoid introducing normally open sub-voltage domains within a single voltage domain.

Benefits of technology

It reduces the cost of power modules and the complexity of backend implementation, reduces design risks, simplifies the low-power verification process, adapts to various application scenarios, and optimizes the area and power consumption of the storage section.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119690232B_ABST
    Figure CN119690232B_ABST
Patent Text Reader

Abstract

The application relates to a power gating time data retention method and system. The method comprises the following steps: sending a power-off request to a turn-off module, the power-off request being used for instructing the turn-off module to return to data to be stored; receiving a data saving request sent by each turn-off module and storing the data to be stored carried by each data saving request into a first retention memory; and returning the data stored in the first retention memory to the corresponding turn-off module in the case of receiving a data recovery signal, wherein the data recovery signal is generated after the turn-off module is powered on again. The method can avoid additional power supply and reduce the complexity of low-power consumption implementation.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the chip technical field, and particularly relates to a power gating time data holding method and system. BACKGROUND

[0002] In the current chip power consumption analysis, the importance of static power consumption is increasing day by day. After entering the nanometer process, the threshold voltage of the transistor is lower and lower, and the gate oxide layer is thinner and thinner. Static power consumption gradually approaches or even surpasses dynamic power consumption, and has become as important as dynamic power consumption.

[0003] Therefore, in the current low-power design, the processing proportion of static power consumption is increasing, and power gating is always the preferred solution for static power consumption optimization. Power gating means the overall power-off of the module. In the current design, many power gating solutions have been realized automatically in hardware, and software and drivers are not easy to perceive. Such power gating solutions often judge that the module is in a completely idle state for a period of time (sometimes supplemented by some flag signals), and then make the module enter the power-off state. At this time, if the following example scenarios occur, 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 does not make a complete register configuration again before the second task starts.

[0005] 2. Data dependency: the second task needs to use some data generated in the running process of the first task.

[0006] Therefore, a holding mechanism is needed to save the data before the module is powered off and to quickly restore the data after the next power-on.

[0007] To store the data that needs to be kept during power-off in the register with the keeping function or in the static random access memory (SRAM) with the deep sleep mode, the module can maintain the data from being lost through an additional low-voltage power supply during power-off, and the kept data can be recovered for normal function logic after the module is powered on again. This scheme usually needs to additionally provide an always-on power supply as an independent low-voltage keeping power supply, and the main purpose of this power supply is to keep the necessary data when the normal working voltage of the module is turned off, but it does not participate in data transmission; at the same time, the traditional scheme as described above usually relies on retention flipflops or static random access memories to achieve the purpose, and from the perspective of space, these are near processing, that is, the always-on keeping unit is additionally attached to the storage unit that needs data keeping within the closable power supply domain, and these retention cells provide a set of control signal ports for keeping and recovering to save the data in the keeping circuit before the module is powered off, and to recover after being powered on.

[0008] However, the traditional method needs an additional low-voltage keeping power supply, which increases the cost of off-chip power supply design and implementation; at the same time, the additional always-on low-voltage power supply increases the complexity of the on-chip power supply network in the back-end implementation, which may prolong the implementation period and increase the design risk. In addition, because the retention cells are scattered in the module, special attention needs to be paid to the isolation analysis and processing between the shutdown part of the module and the retention cells when the module is powered off and the data is kept in the retention cells, so as to avoid the destruction of the kept data by external power-off. Therefore, in fact, a sub power domain that will not be turned off relative to the power domain is introduced into the power domain, which undoubtedly increases the complexity of low-power implementation. SUMMARY

[0009] Therefore, it is necessary to provide a power gating data keeping method and system that can avoid the additional increase of a power supply and reduce the complexity of low-power implementation.

[0010] In a first aspect, the present application provides a power gating data keeping method applied to an always-on power consumption control module, and the method comprises:

[0011] sending a power-off request to the closable module, the power-off request being used to instruct the closable module to return the data to be stored;

[0012] receive the data save request sent by each of the shut-off modules, and store the data carried by each of the data save requests into a first holding memory;

[0013] in the case of receiving the data recovery signal, return the data stored in the first holding memory to the corresponding shut-off module, wherein the data recovery signal is generated after the shut-off module is powered on again.

[0014] In one of the embodiments, the method further comprises:

[0015] in the case of chip power reset, enter a first default state;

[0016] in the first default state, only receive the data save request sent by the shut-off module, and ignore the data recovery signal.

[0017] In one of the embodiments, the receiving the data save request sent by each of the shut-off modules, and storing the data carried by each of the data save requests into a first holding memory comprises:

[0018] receive the data save request sent by the shut-off module, and determine whether the data save request is the last transmission request;

[0019] in the case of the data save request being the last transmission request, store the data carried by the data save request into a first holding memory, and enter a preparation state; wherein in the preparation state, the always-on power consumption control module is used for waiting for the data recovery signal;

[0020] in the case of the data save request not being the last transmission request, store the data carried by the data save request into a first holding memory, enter a first save state, and continue to receive the next data save request sent by the shut-off module until the data save request is the last transmission request, and enter the preparation state; wherein in the first save state, the always-on power consumption control module is used for receiving each data save request sent by the shut-off module.

[0021] In one of the embodiments, the in the case of receiving the data recovery signal, return the stored data to the corresponding shut-off module comprises:

[0022] in the case of receiving the data recovery signal, being in the preparation state, and the data returned to the shut-off module being the last data, return the stored data to the corresponding shut-off module;

[0023] In a case where the data recovery signal is received and the power-off module is in the preparation state and the data returned to the power-off module is the last piece of data, the first default state is entered;

[0024] The method further includes:

[0025] In a case where the data recovery signal is received and the power-off module is in the first default state, the data recovery signal is ignored.

[0026] In a second aspect, the application further provides a data retention method for power gating, applied to a power-off module, and the method includes:

[0027] receiving a power-off request sent by a power consumption control module that is always on;

[0028] determining data to be stored based on the power-off request, and generating a data retention request based on the data to be stored, and sending the data retention request to the power consumption control module that is always on, the data retention request being used to instruct the power consumption control module that is always on to store the data to be stored in a first retention memory;

[0029] In a case where power is supplied again, data sent by the power consumption control module that is always on is received, the data being sent by the power consumption control module that is always on in a case where a data recovery signal is received.

[0030] In one of the embodiments, after the power consumption control module that is always on sends the power-off request, the method further includes:

[0031] entering a storage judgment state, and judging whether the data to be stored needs to be stored in the power consumption control module that is always on before power-off;

[0032] in a case where the data to be stored does not need to be stored in the power consumption control module that is always on, jumping to a second default state; in the second default state, the power-off module is used to receive a power-off request sent by the power consumption control module that is always on;

[0033] in a case where the data to be stored needs to be stored in the power consumption control module that is always on, jumping to a second storage state;

[0034] The determination of the data to be stored based on the power-off request includes:

[0035] In the second storage state, the data to be stored is determined.

[0036] In one of the embodiments, the method further includes:

[0037] In the case that the switchable module is in normal operation, 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 power-gated data holding system, comprising: a power-on power consumption control module and at least one switchable module;

[0039] The power-on power consumption control module is configured to perform the power-gated data holding method.

[0040] In one embodiment, the power-on power consumption control module comprises:

[0041] A first holding memory configured to store the to-be-stored data sent by each switchable module;

[0042] A first holding control unit configured to store the to-be-stored data sent by each switchable module in the first holding memory, and read data from the first holding memory and transmit the read data to the corresponding power-on switchable module.

[0043] In one embodiment, the first holding memory comprises 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.

[0044] In one embodiment, the power-on power consumption control module comprises a local clock, which is the working clock of the first holding memory and the first holding control unit, and is turned off in the case that there is no to-be-stored data storage and data recovery.

[0045] In one embodiment, the switchable module comprises:

[0046] A normal operation unit configured to control the normal operation of the switchable module;

[0047] A second holding control unit comprising a second holding memory, configured to store the to-be-stored data generated by the normal operation unit in the case that the switchable module is in normal operation, and configured to allow the normal operation unit to read the data stored in the second holding memory;

[0048] The second holding control unit is further configured to establish a communication path with the first holding control unit, and perform to-be-stored data storage and data reading based on the communication path.

[0049] In one of the embodiments, the communication path comprises at least one of an existing configuration path and a retention path, the existing configuration path being a path for configuring configuration information of the power-off module; the retention path is used for sending a power-down 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 data recovery process, the data sent by the first retention control unit is sent to the second retention control unit.

[0050] In one of the embodiments, the retention path is an asynchronous transmission path.

[0051] In one of the embodiments, the second retention memory comprises 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 SRAM.

[0052] The power gating data retention method and system send a power-down request to the power-off module, the power-down request being used for instructing the power-off module to return data to be stored; receive a data saving request sent by each power-off module, and store the data to be stored carried by each data saving request into a first retention memory; in a data recovery process, return the stored data to the corresponding power-off module, wherein the always-on power consumption control module is an existing module, and no additional always-on low-voltage retention power supply is needed for data power-down retention, thereby saving the cost of the power module, reducing the complexity of the back-end implementation of the power network, and further reducing the design risk and the product design implementation cycle; in the present application, the data of each power-off module is stored in the first retention memory, thereby avoiding the case of introducing an always-on sub-voltage domain (sub power domain) in an additional voltage domain (the sub-voltage domain introduced by retention), which means that no additional isolation analysis and processing is needed for the internal single voltage domain, thereby reducing the complexity of low-power implementation and verification, and the simplified low-power scheme reduces the risk of system problems and also reduces the overall cycle of chip design implementation and verification. BRIEF DESCRIPTION OF DRAWINGS

[0053] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related art, the drawings needed to be used in the description of the embodiments of the present application or the related art will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other related drawings can also be obtained without creative labor.

[0054] Figure 1A structure diagram of a data retention system in a power gating mode in an embodiment;

[0055] Figure 2 A flowchart of a data retention method in a power gating mode in an embodiment;

[0056] Figure 3 A state machine control diagram of a normally-on power consumption control module in an embodiment;

[0057] Figure 4 A flowchart of a data retention method in a power gating mode in another embodiment;

[0058] Figure 5 A state machine control diagram of a switch-off module in an embodiment. DETAILED DESCRIPTION

[0059] In order to make the purposes, technical solutions and advantages of the present application clearer, the present application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and not used to limit the present application.

[0060] The data retention system in a power gating mode provided by the embodiments of the present application comprises a normally-on power consumption control module and at least one switch-off module.

[0061] The normally-on power consumption control module is a normally-on module already existing in a chip, and is usually a power module or a clock control module. The normally-on power consumption control module is used to execute a data retention method in a power gating mode to centrally save data in different switch-off modules, thereby avoiding the need to additionally increase a power supply.

[0062] The normally-on power consumption control module can save the retention data of each switch-off module, that is, all the retention data are centrally managed in the normally-on power consumption control module. In this way, the retention data from as many normally-on and normally-off switch-off modules as possible can be packed in a few first retention memories (sram), which facilitates power consumption management and area optimization of this part of circuit.

[0063] The retention unit is no longer reserved in each switch-off module, so each switch-off module can be completely turned off as a whole, and there is no need to pay attention to local isolation processing in the module, thereby simplifying the power domain configuration of a single module and the low-power consumption strategy configuration in the module, and reducing the complexity of low-power consumption verification, simulation and implementation.

[0064] In one of the optional embodiments, the always-on power management module comprises a first retention memory and a first retention control unit. The first retention memory is used to store the data to be stored sent by each shutdown module. The first retention control unit is used to store the data to be stored sent by each shutdown module to the first retention memory, and read the data from the first retention memory and transmit the read data to the corresponding powered-on shutdown module.

[0065] The always-on power management module (PMU) is responsible for managing power consumption related matters, and is a module that will not be powered off. In addition to the normal logic, the first retention memory and the first retention control unit are also included in the always-on power management module.

[0066] The first retention memory is used to store the data to be stored sent by each shutdown module. The first retention memory can include a plurality of sram (Static Random-Access Memory, SRAM) and a plurality of registers.

[0067] The retention register is generally about 20% to 50% larger than the normal register, and the SRAM with the retention function is also about 5% to 10% larger than the normal sram. In one of the optional embodiments, the first retention memory comprises 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 SRAM. The non-retention register is a normal register, and the first SRAM is also a normal SRAM.

[0068] The first retention control unit (PMU retention control) is responsible for processing the retention transmission logic (including saving logic and recovery logic) of the shutdown module (PSO module), and storing the data to be stored sent by the shutdown module in the first retention memory for data saving, and reading the data from the first retention memory and transmitting the data to the shutdown module for data recovery.

[0069] In one of the optional embodiments, the always-on power management module comprises a local clock, which is the working clock of the first retention memory and the first retention control unit, and the local clock is turned off when there is no data to be stored and data recovery.

[0070] In the above embodiment, the clock gating is added to the always-on power consumption control module, and the clock related to the holding logic is turned off when the data storage and data recovery are not needed, so as to further reduce the dynamic power consumption.

[0071] In one of the optional embodiments, the switchable module comprises a normal working unit and a second holding control unit.

[0072] In the above embodiment, the clock gating is added to the always-on power consumption control module, and the clock related to the holding logic is turned off when the data storage and data recovery are not needed, so as to further reduce the dynamic power consumption. Figure 1 The schematic diagrams of four switchable modules are shown in FIG. 4, wherein the switchable module PSO E shows 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 normal working unit is used to control the normal working of the switchable module. For example, the working before the switchable module is powered off, which is not limited herein.

[0074] The second holding control unit comprises a second holding memory, which is used to store the data to be stored generated by the normal working unit when the switchable module is normally working, and is used for the normal 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 to store and read the data to be stored based on the communication path.

[0075] In the above embodiment, the intermediate data generated during the normal working of the switchable module can be stored in the second holding memory, so as to facilitate the data holding during the power-on and power-off, and the intermediate data can be directly read from the part when needed during the normal working. It should be noted that the second holding control unit can also determine whether the data needs to be saved when the switchable module is powered off, i.e. data holding, based on whether there is valid data stored in the second holding memory. That is, if there is valid data stored in the second holding memory, it is determined that the data needs to be saved, otherwise it is determined that the data does not need to be saved.

[0076] The second holding control unit sends the data to be stored in the second holding memory to the always-on power consumption control module for data saving when the switchable module needs data holding, and receives the data sent by the always-on power consumption control module after the switchable module is powered on for data recovery.

[0077] For the convenience of understanding, the above-mentioned transmission signals are described with reference to FIG. 4. Figure 1 The above-mentioned transmission signals are described as follows.

[0078] In the always-on power consumption control module, the data is read from the first holding memory Retention mem by the Ret_Read path and transmitted by the first holding control unit PMU retention control.

[0079] The Ret_Write path is used for the first retention control unit PMU to store data obtained from the disconnectable module PSO into the first retention memory Retention mem.

[0080] The Ret_Read path and the Ret_Write path are both standard handshake communication.

[0081] In the disconnectable module PSO E, the Write path includes the register configuration path of the disconnectable module and the storage path of the intermediate data requiring the retention recovery process, so that the hardware directly stores all the data requiring the retention recovery into the second retention memory reg / ram part of the second retention control PSO retention control during normal operation.

[0082] The Read path is the path for obtaining the required information during normal operation of the disconnectable module PSO.

[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 direct transmission mode and the handshake transmission mode.

[0084] The retention path Special retention Path between the always-on power consumption control module and the disconnectable module is generally implemented by means of four asynchronous handshakes or even-numbered transmission of two-phase asynchronous handshakes, and the channel data bandwidth is generally selected as an integer multiple of the physical register bit width. Among them, Preq is the request for the disconnectable module PSO to prepare for power-off sent by the always-on power consumption control module PMU, which informs the disconnectable module PSO to start the save process. Save_path is the storage data path of the retention path Special retention Path, which is initiated by the disconnectable module PSO and responded by the always-on power consumption control module PMU. Restore_path is the recovery data path of the retention path Special retention Path, which is initiated by the always-on power consumption control module PMU and responded by the disconnectable module PSO.

[0085] In one of the optional embodiments, the communication path includes at least one of a setup path and a special retention path, the setup path being a path for configuring the configuration information of the shutdownable module, the special retention path being a path for sending the power-down preparation request sent by the first retention control unit to the second retention control unit, sending the data to be stored sent by the second retention control unit to the first retention control unit in the process of storing the data to be stored, and sending the data sent by the first retention control unit to the second retention control unit in the data recovery process.

[0086] Continuing to combine Figure 1 There are two types of paths between the shutdownable module and the always-on power consumption control module, one is a setup path and the other is a special retention path, and both of them can be used for data retention of the shutdownable module. Alternatively, the communication path can include at least one of the setup path and the special retention path, and all the data retention and recovery requirements of the shutdownable module can be met by the two types of paths. Continuing to combine Figure 1 Not all shutdownable modules need complete two types of paths, and even some shutdownable modules do not need data retention, and therefore no communication path needs to be established between the shutdownable module and the always-on power consumption control module, for example Figure 1 the shutdownable module PSOC in the above.

[0087] It should be noted that in a chip, many modules already have a register setup path for configuring the working context of the module and reading the working status of the module, and the data retention and recovery requirements of the configuration register of the module can be easily met by the readability and writability of the setup path. This requirement is mainly because some configuration registers will not be repeatedly configured at the driver / software end, and therefore the data needs to be automatically retained when the module hardware is powered off autonomously (without relying on software drivers). The path reuses the existing setup path, avoiding additional logic overhead. However, the path itself has certain limitations, and it cannot completely access all registers of the module, and therefore a special retention path is additionally added in this embodiment to provide the retention and recovery function of the remaining storage part other than the configuration register.

[0088] In one of the optional embodiments, the special retention path is an asynchronous transmission path.

[0089] In one of the optional embodiments, the second retention memory includes a second register and a second SRAM, the second register being a non-retention register, and the second SRAM being a non-low-power SRAM.

[0090] In the application, the storage module part (including the first holding memory and the second holding memory) inevitably introduces additional gate count, because it stores the data originally in the existing data in the off module in the always-on power consumption control module in a space, but the original off module needs to do the register for power down data retention for holding register, which is usually about 20% ~ 50% larger than the area of the ordinary register, and the SRAM with holding function generally has about 5% ~ 10% area increase than the same ordinary SRAM. In view of this, the storage module gate count / power consumption is optimized as follows:

[0091] First, the holding register in the off module is replaced with an ordinary register, and the SRAM supporting low-power control is replaced with an ordinary SRAM, thereby reducing the area overhead of the off module.

[0092] The ordinary SRAM and register in the always-on power consumption control module PMU are used to store the data that needs to be retained when the off module is powered off, and there is no need to use devices supporting low-power function.

[0093] The data in the always-on and always-off register / SRAM is packaged into a single ordinary SRAM for unified storage. When the amount of data to be stored is large, a single SRAM itself has smaller area than multiple discrete SRAM plus register configuration.

[0094] The always-on power consumption control module PMU has low performance requirements, and the holding path uses an asynchronous transmission implementation, so the always-on power consumption control module PMU can work at a lower clock frequency and voltage. Lower working frequency can optimize the physical unit with smaller area, thereby reducing the area and power consumption.

[0095] Finally, by adding clock gating to the always-on power consumption control module PMU, the clock related to the holding and restoring logic can be turned off when storage and restoration are not needed, further reducing dynamic power consumption.

[0096] In some optional embodiments, the application also provides a chip comprising the above power gating data holding system.

[0097] In the above embodiments, the data in the off-able module can be efficiently stored in a normally-on module, thereby avoiding many complex low-power implementation details; the off-able module is given the ability to autonomously select whether to perform storage, and the first retention 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 make the application well adapted to various application scenarios of a chip, whether the off-able module needs to be saved / restored or whether it dynamically decides whether to be saved / restored according to the current task configuration.

[0098] The application does not need an additional normally-on low-voltage retention power supply for data power-down retention, thereby saving the cost of the power supply module and reducing the complexity of the back-end implementation of the power supply network, thereby reducing the design risk and shortening the product design and implementation cycle.

[0099] In addition, the application avoids the introduction of a normally-on sub-voltage domain (sub power domain) in a power domain (a sub-voltage domain introduced by retention), which means that no additional isolation analysis and processing is required for a single power domain, thereby reducing the complexity of low-power implementation and verification. Such a simplified low-power scheme reduces the risk of system failure and also reduces the overall cycle of chip design and implementation verification.

[0100] Third, the special retention channel design of the application can be adapted to almost all application scenarios and can easily help designers avoid all invalid / redundant save / restoration actions to provide efficient retention functions.

[0101] Fourth, the application also optimizes the area and power consumption of the storage part from multiple aspects, so that the impact of the application on the chip area is extremely low.

[0102] In an exemplary embodiment, as shown in Figure 2 , a power gating data retention method is provided. The method is applied to a normally-on power consumption control module in Figure 1 , and includes the following steps 202 to 206. Among them:

[0103] S202: Send a power-down request to the off-able module, the power-down request being used to instruct the off-able module to return the data to be stored.

[0104] Wherein, before each offable module is powered off after running for a period of time, the always-on power consumption control module sends a power-off request to the corresponding offable module, so that the offable module can judge whether to perform the data holding 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 always-on power consumption control module for storage.

[0105] In other embodiments, the always-on power consumption control module can provide power to each offable module.

[0106] S204: Receive the data storage request sent by each offable module, and store the data to be stored carried by each data storage request in the first holding memory.

[0107] Wherein, the always-on power consumption control module is in a first default state IDLE, that is, an idle state, after the system is started, which means that there is no data to be recovered at this time, and the always-on power consumption control module waits for a new data storage request from the offable module. After the always-on power consumption control module sends a power-off request to the offable module, if there is data to be stored, the offable module sends a data storage request to the always-on power consumption control module.

[0108] It should be noted that since the number of always-on power consumption control modules and offable modules is in a one-to-many relationship, and the design allows the opening and closing times of multiple offable modules to overlap, that is, they are independently switched on and off. Therefore, the always-on power consumption control module and each offable module in this application are designed for asynchronous communication and do not interfere with each other.

[0109] After the always-on power consumption control module receives the data storage request sent by the offable module, the data to be stored carried by the data storage request is stored in the first holding memory. Optionally, each offable module shares a first holding memory, that is, the data to be stored in the first holding memory by each offable module is stored continuously, which can be indexed by the offable module identifier.

[0110] S206: In the case of receiving a data recovery signal, return the data stored in the first holding memory to the corresponding offable module, wherein the data recovery signal is generated after the offable module is powered on again.

[0111] The data recovery signal is generated by the always-on power control module. When the off-on module needs to be woken up again, the always-on power control module PMU restores the power, clock, isolation, reset, and other states of the off-on module to normal, and then the always-on power control module PMU receives a data recovery signal restore_start signal from itself, which represents that the off-on module is ready and can start to judge whether to perform data recovery.

[0112] In the case where it is determined that the off-on module can perform data recovery, the corresponding off-on module returns the data stored in the first retention memory, so that the off-on module can normally operate after power-on.

[0113] The always-on power control module in the above power gating data retention method is an existing module, and no additional always-on low-voltage retention power supply is needed for data power failure retention, which saves the cost of the power module and reduces the complexity of the back-end implementation of the power network, thereby reducing the design risk and shortening the product design and implementation cycle. In the present application, the data of each off-on module is stored in the first retention memory, which avoids the introduction of an always-on sub-voltage domain (sub power domain) in an additional voltage domain (introduced by retention), which means that no additional isolation analysis and processing is needed for a single voltage domain, reducing the complexity of low-power implementation and verification. Such a simplified low-power solution reduces the risk of system failure and also reduces the overall cycle of chip design and implementation verification.

[0114] For ease of understanding, in combination with Figure 3 , as shown in Figure 3 is a state machine control diagram of the always-on power control module in an embodiment, which includes a first default state IDLE, a first save state, a recovery state, and a preparation state.

[0115] In one of the optional embodiments, the above method further includes: in the case of chip power-on reset, entering the first default state IDLE; in the first default state IDLE, only receiving the to-be-stored data of the off-on module, and ignoring the data recovery signal.

[0116] In the first default state IDLE, the always-on power control module PMU can only respond to the data save request, that is, receive the to-be-stored data, while automatically ignoring / skipping the data recovery signal.

[0117] For example, after the chip is powered on and reset, the always-on power consumption control module PMU is in the first default state IDLE. For the default off module, since it is powered on for the first time, the always-on power consumption control module PMU will automatically skip the meaningless recovery process. In the subsequent processing process, the always-on power consumption control module PMU is in the first default state IDLE, and only receives the to-be-stored data of the corresponding off module, and ignores the data recovery signal of the off module.

[0118] In one of the optional embodiments, the data saving request sent by each off module is received, and the to-be-stored data carried by each data saving request is stored in the first holding memory, including: receiving the data saving request sent by the off module, and determining whether the data saving request is the last transmission request; in the case that the data saving request is the last transmission request, the to-be-stored data carried by the data saving request is stored in the first holding memory, and the preparation state is entered; wherein in the preparation state, the always-on power consumption control module is used for waiting for the data recovery signal; in the case that the data saving request is not the last transmission request, the to-be-stored data carried by the data saving request is stored in the first holding memory, the first saving state is entered, and the next data saving request sent by the off module is continuously received until the data saving request is the last transmission request, and the preparation state is entered; wherein, in the first saving state, the always-on power consumption control module is used for receiving each data saving request sent by the off module.

[0119] In the first default state IDLE, when the first data saving request arrives, if the data saving request is also the last data saving request required by the off module in this power-off process at the same time, that is, save_last == 1 at this time, the always-on power consumption control module PMU will jump from the first default state IDLE to the preparation state DREADY, otherwise, it will jump from the first default state IDLE to the first saving state SAVE.

[0120] The first saving state SAVE is the state of the always-on power consumption control module when the off module sends multiple data saving requests to the always-on power consumption control module. That is, the first holding state SAVE is the processing state of multiple data saving requests, which represents that the continuous multiple data saving requests of the off module in the single power-off preparation are being processed.

[0121] In the first holding state SAVE, the data saving request sent by the off module can be received. When the last data saving request (not the first) of the off module is received by the always-on power consumption control module PMU, the always-on power consumption control module PMU jumps to the preparation state DREADY.

[0122] In some optional embodiments, the method for determining whether it is the last data save request comprises at least one of the following:

[0123] The last flag information (last data save request identification) generated by the shutdownable module is directly sent to the always-on power consumption control module PMU.

[0124] The last flag information is generated by the always-on power consumption control module PMU itself, and in this mode, the always-on power consumption control module PMU and the shutdownable module need to be pre-defined with the number of data save requests for each fixed transmission.

[0125] In one optional embodiment, in the case of receiving a data recovery signal, the stored data is returned to the corresponding shutdownable module, comprising: in the case of receiving a data recovery signal, being in a preparation state, and the returned data to the shutdownable module being non-last data, the stored data is returned to the corresponding shutdownable module; in the case of receiving a data recovery signal, being in a preparation state, and the returned data to the shutdownable module being last data, entering a first default state IDLE; the above method further comprises: in the case of receiving a data recovery signal and being in a first default state, ignoring the data recovery signal.

[0126] The preparation state is a state in which the data of the shutdownable module has been stored, and next time when the power-on trigger signal of the shutdownable module is encountered, the always-on power consumption control module PMU will automatically jump into a recovery state to start the data recovery process.

[0127] The recovery state is a state in which the always-on power consumption control module PMU is recovering data for the shutdownable module, wherein the last data recovery request will generate a restore_last flag by the always-on power consumption control module PMU itself, and the restore_last flag is used to represent the last recovery data, and the restore_last flag cooperates with the response returned by the shutdownable module to finally generate a restore_ack_last signal in Figure 3 The restore_ack_last signal indicates that the last data recovery request has been responded by the shutdownable module, thereby triggering the state of the special holding path to jump to the first default state IDLE to start waiting for the next data save request of the shutdownable module when it is powered off.

[0128] In one exemplary embodiment, as shown in Figure 4 , a data retention method during power gating is provided, and the method is applied to the shutdownable module in Figure 1 for example, comprising the following steps 402 to 406. Wherein:

[0129] S402: receiving a power down request sent by the always-on power consumption control module.

[0130] S404: determining the data to be stored based on the power down request, and generating a data save request based on the data to be stored, and sending the data save request to the always-on power consumption control module, the data save request being used to instruct the always-on power consumption control module to store the data to be stored in the first retention memory.

[0131] Wherein, the specific limitation of the power down request can be seen in the above, in the PSO, all registers and SRAMs to be powered down and retained need to be added with interface logic of the controller, the way adopted in the present application is to place all these registers and SRAMs in a sub-module (reg / mem) for unified management at the design time, and place this sub-module in the second retention controller PSO retention, so as to facilitate the retention recovery operation. The second retention controller core in the PSO is also a state machine, which can be combined with the specific description of the state machine shown in the above. Figure 5

[0132] Wherein, the PSO can receive the power down request sent by the always-on power consumption control module after being powered on and working for a certain time, based on the power down request, it can be judged whether data saving is needed, and when data saving is needed, the data to be stored is obtained from the second retention memory, a data save request is generated based on the data to be stored, and the data save request is sent to the always-on power consumption control module, so as to store the data to be stored in the first retention memory of the always-on power consumption control module.

[0133] S406: in the case of power on again, receiving data sent by the always-on power consumption control module, the data being sent by the always-on power consumption control module in the case of receiving the data recovery signal.

[0134] Wherein, the data recovery process of the PSO is a passive response to the control of the always-on power consumption control module, the PSO only needs to passively and unconditionally complete the receiving and responding of the recovery data, without other special processing.

[0135] ​In one of the optional embodiments, after receiving the power-down request sent by the always-on power consumption control module, the method further comprises: entering a storage judgment state, and judging whether the to-be-stored data needs to be stored to the always-on power consumption control module before power-down; in the case that the to-be-stored data does not need to be stored to the always-on power consumption control module, jumping to a second default state; wherein, in the second default state, the power-off module is configured to receive the power-down request sent by the always-on power consumption control module; in the case that the to-be-stored data needs to be stored to the always-on power consumption control module, jumping to a second storage state; and determining the to-be-stored data based on the power-down request, comprising: in the second storage state, determining the to-be-stored data.

[0136] In the second default state, the power-off module waits to receive the power-down request sent by the always-on power consumption control module (preq’s negedge), and after receiving the power-down request, the power-off module jumps to the storage judgment state SAVE JUDGE.

[0137] In the storage judgment state SAVE JUDGE, the power-off module judges whether the data needs to be stored to the always-on power consumption control module PMU before the current power-down based on the current task context of the power-off module, and if the judgment result is fail, the power-off module returns to the second default state IDLE; and if the judgment result is pass, the power-off module jumps to the second storage state SAVE.

[0138] In one of the optional embodiments, the judgment of whether the data needs to be stored to the always-on power consumption control module PMU before the current power-down is determined based on the value of a state register generated by the power-off module itself, and the value is autonomously configured by the power-off module based on the specific scenario of the current task.

[0139] In the second storage state SAVE, the power-off module starts to send a data storage request to the always-on power consumption control module PMU, and the always-on power consumption control module PMU starts to store the data based on the state machine described in the previous section.

[0140] In one of the optional embodiments, the method further comprises: in the case that the power-off module is normally working, storing the intermediate data generated by the power-off module to a local second holding memory, and reading the stored intermediate data from the second holding memory and processing the intermediate data.

[0141] In this embodiment, the power-off module is normally working. For example, the working before the power-off module is not powered off, which is not specifically limited herein.

[0142] In the case that the switchable module is in normal operation, the intermediate data generated by the operation can be stored in the second holding memory to facilitate data holding during power-on and power-off, and in the case of normal operation, if intermediate data is needed, the data is directly read from the part. One point that needs to be explained is that the second holding control unit can also determine whether the switchable module needs to save data during power-off based on whether data is stored in the second holding memory, that is, to perform data holding.

[0143] For the convenience of understanding, a complete embodiment of the working process of the holding path is given, wherein for the convenience, the states in the state machine of the always-on power consumption control module PMU are referred to as PMU_IDLE, PMU_SAVE, PMU_DREADY and PMU_RESTORE, the state machine states in the switchable module are referred to as PSO_IDLE, PSO_SAVE_JUDGE and PSO_SAVE, and it is assumed that the switchable module is in a power-off state after the chip starts.

[0144] The working process of the path in this embodiment is described from the start of the chip start:

[0145] A. After the entire chip is powered on and reset, the always-on power consumption control module PMU state machine is in the PMU_IDLE state. For the module that is off by default after the chip starts, the always-on power consumption control module PMU will automatically skip the meaningless data recovery process when it is powered on for the first time.

[0146] B. Then, when the switchable module runs for a period of time before power-off, the switchable module receives the power-off request (preq_negedge) sent by the always-on 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 go through the holding path to store data to the always-on power consumption control module PMU. If not, the switchable module jumps back to PSO_IDLE, otherwise the switchable module jumps to PSO_SAVE;

[0147] If the off-switchable module jumps to the PSO_SAVE state, the off-switchable module starts to send a data saving request to the always-on power consumption control module PMU. After receiving the data saving request, the always-on power consumption control module PMU first determines whether the data saving request is single transmission. If yes, the always-on power consumption control module PMU jumps from the PMU_IDLE state to the PMU_DREADY state and completes the storage of the current round of data. If no, the always-on power consumption control module PMU jumps to the PMU_SAVE state and starts to receive multiple data saving requests sent by the off-switchable module until the always-on power consumption control module PMU receives the last data saving request of the current round. Then, the always-on power consumption control module PMU jumps from the PMU_SAVE state to the PMU_DREADY state. At this time, the off-switchable module jumps back to the PSO_IDLE state after receiving the response of the last data saving request sent to the always-on power consumption control module PMU. Thus, the current round of data saving process ends, and the off-switchable module can continue the subsequent power-off process until the power-off is completed.

[0148] If the off-switchable module directly jumps back to the PSO_IDLE state, it indicates that the off-switchable module autonomously determines that it does not need to perform data retention on the current path. As a result, the off-switchable module does not send a data saving request to the always-on power consumption control module PMU during the current power-off process, and the state machine of the always-on power consumption control module PMU remains in the PMU_IDLE state without change.

[0149] C. When the off-switchable module needs to be woken up again, the always-on power consumption control module PMU first restores the power supply, clock, isolation, and reset states of the off-switchable module to normal. Then, the always-on power consumption control module PMU receives a restore_start signal from itself, indicating that the off-switchable module is ready and can start to determine whether to perform data recovery on the off-switchable module. Specifically:

[0150] If the always-on power consumption control module PMU is in the PMU_DREADY state, it means that the data saving process was performed during the last power-off. Then, the always-on power consumption control module PMU jumps to the PMU_RESTORE state and starts the current round of data recovery. When the always-on power consumption control module PMU receives the response of the last data recovery request sent by itself (from the off-switchable module), it jumps back to the PMU_IDLE state and starts to wait for the next data saving request from the off-switchable module.

[0151] If the always-on power consumption control module PMU is in the PMU_IDLE state, it means that the data storage was not performed during the last power-off of the off-switchable module. Therefore, the data recovery process is automatically skipped during the current power-on.

[0152] If the shutoff module is in a power-on state by default after the chip is powered on, the above flow can start directly at B.

[0153] It should be understood that, although the steps in the flowcharts involved in the above embodiments are shown in sequence according to the arrows, the steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, the execution of the steps is not strictly limited in sequence, and the steps can be executed in other sequences. Moreover, at least part of the steps in the flowcharts involved in the above embodiments can include multiple steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution sequence of the steps or stages is not necessarily sequential, but can be executed in rotation or alternation with at least part of other steps or steps or stages in other steps.

[0154] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when executed, can include the processes of the above-mentioned embodiment methods. Any reference to 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. The non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical storage, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. The volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration but not limitation, the RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The database involved in the embodiments provided in the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without being limited thereto. The processor involved in the embodiments provided in the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., without being limited thereto.

[0155] The technical features of the above embodiments can be combined in any manner. To make the description concise, not all possible combinations of the technical features in the above embodiments are described, but as long as the combinations of the technical features do not exist contradictions, they should be considered as the scope of the present application.

[0156] The above-described embodiments are merely illustrative of several embodiments of the present application, which are described in more detail and in a specific manner, but should not be construed as limiting the scope of the patent of the present application. It should be noted that, for those of ordinary skill in the art, several modifications 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 should be subject to the appended claims.

Claims

1. A method for retaining data during power gating, characterized in that, The method, applied to a normally-on power consumption control module, includes: Send a power-down request to the turn-off module, the power-down request being used to instruct the turn-off module to return the data to be stored; Receiving data save requests sent by each of the power-offable modules and centrally storing the data to be stored carried by each data save request into a first holding memory includes: receiving data save requests sent by the power-offable modules and determining whether the data save request is the last transmission request; if the data save request is the last transmission request, centrally storing the data to be stored carried by the data save request into the first holding memory and entering a preparation state; wherein in the preparation state, the normally open power control module is used to wait for a data recovery signal; if the data save request is not the last transmission request, centrally storing the data to be stored carried by the data save request into the first holding memory, entering a first save state, and continuing to receive the next data save request sent by the power-offable modules until the data save request is the last transmission request, then entering a preparation state; wherein in the first save state, the normally open power control module is used to receive each data save request sent by the power-offable modules. Upon receiving a data recovery signal, the data stored in the first holding memory is returned to the corresponding turn-off module, wherein the data recovery signal is generated after the turn-off module is powered on again.

2. The method according to claim 1, characterized in that, The method further includes: When the chip is powered on and reset, it enters the first default state; In the first default state, only the data save request sent by the shut-off module is received, and the data recovery signal is ignored.

3. The method according to claim 1, characterized in that, Upon receiving a data recovery signal, returning the stored data to the corresponding turn-off module includes: If a data recovery signal is received and the device is in a ready state, and the data returned to the shut-off module is not the last data, the device returns the stored data to the corresponding shut-off module. Upon receiving a data recovery signal, being in a ready state, and returning the last data record to the shut-off module, the system enters the first default state. The method further includes: If a data recovery signal is received and the system is in the first default state, the data recovery signal is ignored.

4. A method for retaining data during power gating, characterized in that, Applied to a turn-off module, the method includes: Receive a power-down request from the normally open power control module; Based on the power-down request, the system determines the data to be stored and generates a data save request based on the data to be stored. The data save request is then sent to the normally open power control module. The data save request instructs the normally open power control module to centrally store the data to be stored in the first holding memory. This includes: receiving the data save request sent by the power-off module and determining whether the data save request is the last transmission request; if the data save request is the last transmission request, centrally storing the data to be stored carried by the data save request in the first holding memory and entering a preparation state; wherein in the preparation state, the normally open power control module waits for a data recovery signal; if the data save request is not the last transmission request, centrally storing the data to be stored carried by the data save request in the first holding memory, entering a first save state, and continuing to receive the next data save request sent by the power-off module until the data save request is the last transmission request, at which point it enters a preparation state; wherein in the first save state, the normally open power control module receives each data save request sent by the power-off module. Upon power-on, the system receives data sent by the normally open power control module, which is sent by the normally open power control module upon receiving a data recovery signal.

5. The method according to claim 4, characterized in that, After receiving the power-down request from the normally open power control module, the method further includes: Enter the storage judgment state and determine whether the data to be stored needs to be stored to the normally open power control module before power-off; If it is not necessary to store the data to be stored in the normally open power control module, the system jumps to the second default state; wherein, in the second default state, the shut-off module is used to receive a power-down request sent by the normally open power control module. When it is necessary to store the data to be stored in the normally open power control module, the system switches to the second storage state. The step of determining the data to be stored based on the power-down request includes: In the second storage state, the data to be stored is determined.

6. The method according to claim 4, characterized in that, The method further includes: When the shut-off module is working normally, the intermediate data generated by the shut-off module is stored in the local second holding memory, and the stored intermediate data is read from the second holding memory and processed.

7. A power-gated data retention system, characterized in that, The system includes: a normally open power control module and at least one turn-off module; The normally open power control module is used to perform the power gating data retention method according to any one of claims 1 to 3.

8. The system according to claim 7, characterized in that, The normally open power consumption control module includes: The first holding memory is used to centrally store 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 turn-off modules into the first holding memory, and to read data from the first holding memory and transmit the read data to the corresponding powered-on turn-off module.

9. The system according to claim 8, 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 SRAM.

10. The system according to claim 8, characterized in that, The normally open power consumption control module includes a local clock, which is the operating clock of the first holding memory and the first holding control unit. The local clock is turned off when there is no data to be stored or data recovery.

11. The system according to claim 8, characterized in that, The shut-off module includes: A standard working unit is used to control the normal operation of the shut-off module; The second holding control unit includes a second holding memory, used to store data to be stored generated by the regular working unit when the shut-off module is working normally, and 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 to store and retrieve data to be stored based on the communication path.

12. The system according to claim 11, characterized in that, The communication path includes at least one of an existing configuration path and a hold path. The existing configuration path is an existing path used to configure the configuration information of the shut-off module. The hold path is used to send the power-down request sent by the first hold control unit to the second hold control unit; during the storage of data to be stored, the data to be stored sent by the second hold control unit to the first hold control unit; and during the data recovery process, the data sent by the first hold control unit to the second hold control unit.

13. The system according to claim 12, characterized in that, The holding path is an asynchronous transmission path.

14. The system according to claim 13, 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 SRAM.

Citation Information

Patent Citations

  • Memory chip and control method thereof

    CN111552365A