Working mode switching method and device, chip and electronic equipment

By introducing a storage recovery engine and register group into the chip, the chip can realize data storage and recovery in low-power mode, solving the problems of waste of resource power consumption and signal loss in traditional solutions, and improving fast recovery performance.

CN118625913APending Publication Date: 2024-09-10伟光有限公司(CN)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310234490.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-09
Publication Date
2024-09-10

AI Technical Summary

Technical Problem

When traditional chips switch to low-power mode, resource power consumption is large, and the internal signals of the hardware module are easily lost after powering off, affecting quick recovery performance.

Method used

By introducing a storage recovery engine and register group into the chip, and using the register group for data storage and recovery, the storage and recovery of internal signals of the hardware module is realized, resource power consumption is reduced, and software reconfiguration is not required during switching.

Benefits of technology

It effectively reduces resource power consumption, optimizes the recovery efficiency of the chip, avoids signal loss within the hardware module, and improves rapid recovery capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118625913A
    Figure CN118625913A
Patent Text Reader

Abstract

The invention relates to a working mode switching method and device, a chip and electronic equipment. The method comprises the following steps: in response to a first working mode switching instruction, reading a register group to obtain register data; the first working mode switching instruction is used for indicating the chip to switch out of the first working mode; transmitting the register data to a memory cell coupled to the chip; in response to the second working mode switching instruction, acquiring register data from the storage unit, and writing the register data into the register group; the second working mode switching instruction is used for indicating the chip to switch back to the first working mode; and restoring to the first working mode based on the data of the register block. The resource power consumption can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of chip technology, and in particular to a method, device, chip and electronic device for switching working modes. Background Art

[0002] In order to enable the chip to quickly resume normal operation after exiting low-power mode, the commonly used solution is to put the relevant data of the chip into the power-on area or use registers to maintain it; however, the traditional solution has the problem of wasting resources and power consumption. Summary of the invention

[0003] Based on this, it is necessary to provide a working mode switching method, device, chip and electronic device that can reduce resource power consumption in response to the above technical problems.

[0004] In a first aspect, the present application provides a method for switching a working mode, the method is applied to a chip, the chip includes a register group, and the method includes:

[0005] In response to the first working mode switching instruction, the register group is read to obtain register data; the first working mode switching instruction is used to instruct the chip to switch out of the first working mode;

[0006] transferring register data to a storage unit coupled to the chip;

[0007] In response to the second working mode switching instruction, the register data is obtained from the storage unit and the register data is written into the register group; the second working mode switching instruction is used to instruct the chip to switch back to the first working mode;

[0008] The first working mode is restored based on the data in the register group.

[0009] In one embodiment, the method further comprises:

[0010] In response to the first working mode switching instruction, obtaining first configuration information for configuring the register group;

[0011] The first configuration information includes the number of registers in the register group and the first address of the register group.

[0012] In one embodiment, the first operating mode switching instruction is configured to instruct the chip to switch to a low power consumption mode, and the second operating mode switching instruction is configured to instruct the chip to switch out of the low power consumption mode.

[0013] In a second aspect, the present application further provides a method for switching a working mode, the method being applied to a chip, the chip including a register group and a hardware module connected to the register group, the method comprising:

[0014] In response to the first working mode switching instruction, the register group is read to obtain the working parameter data of the hardware module; the first working mode switching instruction is used to instruct the chip to switch out of the first working mode;

[0015] transmitting the operating parameter data to a storage unit coupled to the chip;

[0016] In response to the second working mode switching instruction, the working parameter data is obtained from the storage unit and written into the register group; the second working mode switching instruction is used to instruct the chip to switch back to the first working mode.

[0017] In one embodiment, the method further comprises:

[0018] In response to the first working mode switching instruction, second configuration information for reading working parameter data from the register group is acquired; the second configuration information includes the address of the register group and the data length of the working parameter data.

[0019] In one embodiment, the register group includes a first register and a second register; the address of the first register is configured as the first address of the register group;

[0020] The steps of reading the register group and obtaining the working parameter data of the hardware module include:

[0021] Execute a first read action for the first register; the first read action is used to instruct the corresponding hardware module to write the working parameter data of the module into the second register;

[0022] When the first reading operation is completed, the working parameter data in the second register is read out in sequence according to a preset reading number; the preset reading number is determined according to the data length.

[0023] In one embodiment, the method further comprises:

[0024] In response to the second working mode switching instruction, third configuration information for writing the working parameter data into the register group is acquired; the third configuration information includes the address of the register group and the data length of the working parameter data.

[0025] In one embodiment, the register group includes a first register and a second register; the address of the first register is configured as the first address of the register group;

[0026] The steps of writing the operating parameter data into the register group include:

[0027] Executing a first write operation for a first register; wherein the first write operation carries a first amount of working parameter data;

[0028] When the first write operation is completed, the remaining working parameter data except the first quantity are sequentially written into the second register according to a preset number of writes; wherein the preset number of writes is determined based on the first quantity and the data length.

[0029] In one embodiment, the chip further includes a selector connected between the register group and the hardware module; the register group further includes a third register; and the method further includes:

[0030] In response to the first working mode switching instruction or the second working mode switching instruction, fourth configuration information is obtained, and a module selection action is performed according to the fourth configuration information; the module selection action is used to instruct the selector to parse the third register to determine the hardware module used to respond to the first read action or the first write action this time;

[0031] The fourth configuration information includes an identifier of the hardware module; and the module selection action includes writing the identifier into the third register.

[0032] In one embodiment, the first operating mode switching instruction is configured to instruct the chip to switch to a low power consumption mode, and the second operating mode switching instruction is configured to instruct the chip to switch out of the low power consumption mode.

[0033] In a third aspect, the present application further provides a working mode switching device, which is applied to a chip, the chip includes a register group, and the device includes:

[0034] A data reading module, used to read the register group and obtain register data in response to a first working mode switching instruction; the first working mode switching instruction is used to instruct the chip to switch out of the first working mode;

[0035] A data transmission module, used to transmit register data to a storage unit coupled to the chip;

[0036] A data writing module, used for acquiring register data from a storage unit and writing the register data into a register group in response to a second working mode switching instruction; the second working mode switching instruction is used for instructing the chip to switch back to the first working mode;

[0037] The mode recovery module is used to recover to the first working mode based on the data of the register group.

[0038] In a fourth aspect, the present application further provides a working mode switching device, which is applied to a chip, the chip includes a register group and a hardware module connected to the register group, and the device includes:

[0039] A reading module, used to read the register group in response to a first working mode switching instruction to obtain working parameter data of the hardware module; the first working mode switching instruction is used to instruct the chip to switch out of the first working mode;

[0040] A transmission module, used for transmitting the working parameter data to a storage unit coupled to the chip;

[0041] The writing module is used to obtain the working parameter data from the storage unit and write the working parameter data into the register group in response to the second working mode switching instruction; the second working mode switching instruction is used to instruct the chip to switch back to the first working mode.

[0042] In a fifth aspect, the present application further provides a chip, including a register group and a hardware module connected to the register group; the chip further includes a storage recovery engine, the storage recovery engine is respectively connected to the register group and the hardware module;

[0043] The storage recovery engine is used to execute the above-mentioned working mode switching method.

[0044] In one embodiment, the storage recovery engine is connected to the register group and the hardware module respectively through a register access bus.

[0045] In one embodiment, the chip further includes a selector connected to the register group; there are multiple hardware modules, and the selector is connected to each hardware module respectively.

[0046] In a sixth aspect, the present application also provides an electronic device, comprising the above-mentioned chip and a storage unit coupled to the chip.

[0047] In one embodiment, the storage unit is a random access memory.

[0048] In a seventh aspect, the present application also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above method are implemented.

[0049] In an eighth aspect, the present application also provides a computer program product, including a computer program, which implements the steps of the above method when executed by a processor.

[0050] The above-mentioned working mode switching method, device, chip and electronic device can realize the storage and recovery of the internal signals of the register group and the hardware module during the working mode switching of the chip, saving a lot of resource power consumption; wherein, in response to the chip switching out of the first working mode, the register data obtained by reading the register group is stored in the storage unit, and then after the chip switches back to the first working mode, there is no need for the software to be configured again, and the chip can be quickly restored to the working state according to the register data in the register group, thereby optimizing the recovery efficiency and reducing resource power consumption. Furthermore, in response to the chip switching out of the first working mode, the working parameter data is stored in the storage unit through the register group as the transmission channel of the working parameter data of the hardware module, and then after the chip switches back to the first working mode, the hardware module can realize the storage and recovery of the internal signals of the module, and even if there are more internal signals of the module, there is no need to increase the resource power consumption. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] Figure 1 An application environment diagram of a working mode switching method in an embodiment;

[0052] Figure 2 A schematic diagram of a flow chart of a method for switching working modes in an embodiment;

[0053] Figure 3 is a flow chart of a method for switching working modes in another embodiment;

[0054] Figure 4 A schematic diagram of a flow chart of a signal storage step within a hardware module in one embodiment;

[0055] Figure 5 A schematic diagram of the waveform of the read and write signals of a register group in one embodiment;

[0056] Figure 6 A schematic diagram of a flow chart of a signal storage step within a hardware module in one embodiment;

[0057] Figure 7 A schematic diagram of a chip architecture in an embodiment;

[0058] Figure 8 is a structural block diagram of a working mode switching device in one embodiment;

[0059] Fig. 9 is a structural block diagram of a working mode switching device in another embodiment;

[0060] Fig.10 FIG. 4 is a diagram showing the internal structure of an electronic device in one embodiment. DETAILED DESCRIPTION

[0061] 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.

[0062] The terms "first", "second", "third", and "fourth" in the specification and claims of this application and the drawings are used to distinguish different objects rather than to describe a specific order; and the objects described by the terms "first", "second", "third", and "fourth" may also be the same objects, or may contain or have other relationships with each other. The terms "module", "system", and the like used in this specification are used to represent computer-related entities, hardware, firmware, a combination of hardware and software, software, or software in execution.

[0063] It should be noted that when an element is considered to be "connected" to another element, it can be directly connected to another element, or connected to another element through a centering element. In addition, the "connection" in the following embodiments should be understood as "electrical connection", "communication connection", etc. if there is a transmission of electrical signals or data between the connected objects. When used here, the singular forms of "one", "one" and "said / the" may also include plural forms, unless the context clearly indicates another way. It should also be understood that the terms "include / comprise" or "have" etc. specify the existence of stated features, wholes, steps, operations, components, parts or combinations thereof, but do not exclude the possibility of existing or adding one or more other features, wholes, steps, operations, components, parts or combinations thereof.

[0064] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0065] In low-power scenarios, the chip often turns off the power of idle hardware modules to achieve maximum power saving. However, there are some necessary parameter configurations in the hardware modules under working conditions. If the power is turned off, all these internal signals will be lost.

[0066] In order to enable the chip to quickly resume normal operation after exiting low-power mode, there are currently two commonly used solutions: ① Place it in the AON (Always On) area. This solution places the necessary internal signals in the AON area. All signals in this area will not be powered off in low-power mode, and the signals will not be lost. ② Use a register retention unit. This solution requires replacing ordinary registers with retention units. The retention unit is generally composed of two master and slave registers: during normal operation, the master register works, the power supply voltage is high, and the slave register clock is turned off; after entering low-power mode, the slave register works, and the master register writes information to the slave register before powering off; since the voltage of the slave register is low, power saving can be achieved.

[0067] In the above solution 1, if there are a large number of internal signals, the area of ​​the AON region will be too large, and even if it enters the low power mode, it will still cause high power consumption. Therefore, this solution is only applicable to scenarios with a small number of internal signals. In the above solution 2, since the holding unit is composed of two registers, and the power supply voltages of the two registers are different, an isolation unit needs to be inserted between the two. Therefore, the area of ​​the holding unit is large, 20%-50% larger than that of ordinary registers. It is also not applicable when there are a large number of internal signals; in addition, the holding unit requires dual voltage power supply, which will bring difficulties to the design and layout of the internal power supply of the chip.

[0068] The working mode switching method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown in the figure, taking a chip applied to an electronic device as an example, the chip may include a storage recovery engine (Store Restore Engine) 102, a register group RegBank (Register Bank) 106, and a hardware module (Sub-Module) 108; at the same time, the storage recovery engine 102 is connected to the register group 106 and the hardware module 108 through a register access bus RegBus (Register Access Bus) 104.

[0069] Furthermore, the electronic device may further include a storage unit 110 coupled to the chip; illustratively, the storage unit 110 is connected to the storage recovery engine 102 .

[0070] In the embodiment of the present application, when the chip enters the low power consumption mode, except for the storage unit 110, the storage recovery engine 102, the register access bus 104, the register group 106 and the hardware module 108 are all powered off, that is, the storage recovery engine 102, the register access bus 104, the register group 106 and the hardware module 108 are all in the power-off state. Exemplarily, when the chip exits the low power consumption mode, the storage recovery engine 102, the register access bus 104, the register group 106 and the hardware module 108 are all powered on again.

[0071] Optionally, the number of hardware modules 108 may be one or more; wherein the internal signals of the hardware module may refer to some necessary parameter configurations in the working state of the hardware module, such as working parameter data. The working parameter data may refer to data that is inaccessible to the software module and visible only to the hardware module, such as data representing the hardware action.

[0072] Exemplarily, register group 106 refers to a register group accessible to a software module, for example, registers accessible to a software module (eg, REG n ) is divided into register blocks of different sizes, and each register block is then used as a register of the same group, i.e., a register group. The present application embodiment does not limit the number of registers in the same register group, the number of register blocks in the same register group, and the number of registers divided into the same register block. Exemplarily, in the present application embodiment, a register block may include multiple registers that are consecutive in address. It should be noted that Figure 1 REG1 in the figure may refer to a first register, and REG2 may refer to a second register.

[0073] Optionally, the storage recovery engine 102 is configured to connect to the software module, and the storage recovery engine 102 can respond to the relevant configuration information transmitted by the software module. In the embodiment of the present application, the storage recovery engine can be implemented by hardware, such as hardware that can be controlled by the software module. Regarding the configuration information of the software module, a software module configuration table (Table) can be used. For example, the corresponding address (for example, the address of the storage unit, the first address of the register group and the data length, etc.) can be recorded in the table (Table), and then the storage recovery engine can work according to the table to perform storage and recovery actions.

[0074] For example, the storage recovery engine can be integrated into the chip during the chip production process, and a hardware connection between the storage unit and the storage recovery engine can be established. Optionally, the storage unit can be a random access memory RAM (Random Access Memory), and the embodiment of the present application does not limit the type of the storage unit.

[0075] It should be noted that the software module in the embodiment of the present application may refer to software, and the hardware module may refer to hardware; optionally, the software module and the hardware module may refer to the functional modules divided by the chip. Furthermore, the above-mentioned software modules and hardware modules may be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules may be embedded in or independent of the processor in the electronic device in the form of hardware, or may be stored in the memory in the electronic device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0076] In one embodiment, Figure 2 As shown, a working mode switching method is provided, and the method is applied to Figure 1 The chip in FIG. 1 is used as an example to illustrate the method, which includes the following steps:

[0077] Step 202, in response to a first working mode switching instruction, read a register group to obtain register data; the first working mode switching instruction is used to instruct the chip to switch out of the first working mode;

[0078] Specifically, the chip responds to the first working mode switching instruction and switches out of the first working mode; illustratively, the first working mode switching instruction is configured to instruct the chip to switch to a low power consumption mode. Further, the storage recovery engine in the chip can respond to the first working mode switching instruction and obtain register data by reading the register group.

[0079] Optionally, regarding the register group read by the storage recovery engine in response to the first working mode switching instruction, the registers in the register group are related to the chip operation task. The register data in the embodiment of the present application may include necessary parameters for chip operation, and the necessary parameters for chip operation are related to the functional configuration of the chip, that is, each chip may have different necessary parameters for chip operation; taking the chip for Wi-Fi reception as an example, the chip may have multiple functions, and each function has corresponding configuration parameters, such as enabling, filtering, etc.

[0080] In one embodiment, the method further comprises:

[0081] In response to the first working mode switching instruction, obtaining first configuration information for configuring the register group;

[0082] The first configuration information includes the number of registers in the register group and the first address of the register group.

[0083] Specifically, the first configuration information can be generated by the software module configuration; when the chip switches out of the first operating mode in response to the first operating mode switching instruction, for example, before the chip enters the low power consumption mode, the software module can configure the first configuration information, and the first configuration information may include the address of the register related to the chip running task, that is, the first configuration information contains relevant information of the register that needs to be stored.

[0084] Among them, the address of the register related to the chip running task can be represented by the software module by configuring the number of registers in the register group and the first address of the register group, and then the storage recovery engine can read the corresponding register in the register group according to the first configuration information obtained to obtain the register data.

[0085] Optionally, the registers related to the chip operation task refer to registers storing parameters necessary for chip operation. In the register group of the embodiment of the present application, not all registers need to be stored and restored, and the first configuration information represents the information of the registers in the register group that need to be stored and restored.

[0086] Exemplarily, the storage recovery engine is configured to respond to the first working mode switching instruction, obtain the first configuration information, and then read the register group to obtain the register data. The register group can be divided to obtain blocks (register blocks) containing registers related to the chip running tasks, and then the storage recovery engine is configured to respond to the first working mode switching instruction and read the register block.

[0087] Furthermore, the software module can use the starting address of the register block and the number of registers in the register block as the first configuration information, and then the storage recovery engine responding to the first configuration information can determine the registers that need to be stored and restored based on the starting address of the register block and the number of registers through the offset address.

[0088] In the embodiment of the present application, the registers that need to be stored and restored may refer to the registers in the register group that are required for re-powering on; further, the register group can be divided into different blocks, and the registers that need to be stored and restored can be placed in the same block, thereby forming one or more register blocks; the embodiment of the present application can optimize the transmission efficiency by dividing the required register blocks in the register group, so that the storage recovery engine can read faster, thereby optimizing the storage and recovery efficiency and reducing the waste of resource power consumption.

[0089] As described above, before the chip enters the low-power module mode, the software module can configure the first address of the register group and the number of registers in the register group through the first configuration information, and then the storage recovery engine can read the register group through the register access bus to quickly obtain the register data. The whole process has high transmission efficiency and reduces the waste of power consumption resources.

[0090] Step 204, transferring the register data to a storage unit coupled to the chip.

[0091] Specifically, after acquiring the register data, the storage recovery engine can write the register data to a storage unit coupled to the chip, and then when the chip switches out of the first operating mode (for example, enters a low power consumption mode), the storage unit can be used to store the register data.

[0092] Taking the storage unit as a random access memory RAM, and the first working mode switching instruction configured to instruct the chip to switch to a low power consumption mode as an example, before the chip enters the low power consumption module mode, the software module can configure the first configuration information of the register group (for example, the first address of the register block to be stored and the number of registers in the register block). Then the storage recovery engine can read the register group through the register access bus, and write the obtained register data to the random access memory RAM, and then the random access memory RAM can keep the storage of the register data when the chip enters the low power consumption mode, avoiding the problem of data loss after the register group is powered off.

[0093] Step 206, in response to the second working mode switching instruction, obtain register data from the storage unit and write the register data into the register group; the second working mode switching instruction is used to instruct the chip to switch back to the first working mode.

[0094] Specifically, the chip switches back to the first working mode in response to the second working mode switching instruction. Taking the first working mode switching instruction as an example, where the first working mode switching instruction is configured to instruct the chip to switch to a low power mode, and the second working mode switching instruction is configured to instruct the chip to switch out of a low power mode, when the chip exits the low power mode, the storage recovery engine in the chip reads the register data from the storage unit and writes it to a register group (for example, a register block), which not only restores the register group to the working state before the chip enters the low power mode, but also enables the chip to obtain the register data by reading the register group.

[0095] After the chip exits the low-power module mode, the storage recovery engine can write the register data into the register group through the register access bus so that the chip can quickly obtain the register data. The whole process has high transmission efficiency and reduces the waste of power consumption resources.

[0096] Step 208: restore to the first working mode based on the data in the register group.

[0097] Specifically, taking the case where the first working mode switching instruction is configured to instruct the chip to switch to the low power mode and the second working mode switching instruction is configured to instruct the chip to switch out of the low power mode as an example, when the chip exits the low power mode, the storage recovery engine of the chip writes the register data into the register group, thereby restoring the register group to the working state before the chip enters the low power mode, so that the chip can quickly resume normal operation after exiting the low power mode. Among them, when the chip exits the low power mode, the storage recovery engine is powered on again.

[0098] The above working mode switching method can store and restore the register group, so that the software module does not need to be reconfigured after the chip exits the low power mode, and the chip recovery speed is fast. By dividing the register group into blocks, the storage and recovery efficiency is optimized and the waste of power consumption resources is reduced. Among them, through the storage recovery engine, the register data of the register block can be stored in a storage unit (such as RAM) before entering the low power mode, and quickly restored to the working state after exiting the low power mode, optimizing the transmission efficiency.

[0099] In one embodiment, Figure 3 As shown, a working mode switching method is provided, and the method is applied to Figure 1 The storage recovery engine in the example is used to illustrate the process, which includes the following steps:

[0100] Step 302, in response to a first working mode switching instruction, read a register group to obtain working parameter data of a hardware module; the first working mode switching instruction is used to instruct the chip to switch out of the first working mode;

[0101] Specifically, the chip responds to the first working mode switching instruction and switches out of the first working mode; illustratively, the first working mode switching instruction is configured to instruct the chip to switch to a low power consumption mode. Further, the storage recovery engine in the chip can respond to the first working mode switching instruction and obtain the working parameter data of the hardware module by reading the register group.

[0102] Among them, the storage and recovery of internal signals of the hardware module (for example, working parameter data) in the embodiment of the present application is achieved by transferring in the register group. Exemplarily, the storage and recovery of internal signals of the hardware module are completed through the corresponding registers in the register group.

[0103] Exemplarily, in an embodiment of the present application, the corresponding registers in the register group may refer to registers in the register group that are not related to the chip running tasks, that is, when the chip enters a low power mode, the corresponding registers in the register group are configured as registers in the register group that do not need to be stored and restored.

[0104] In one embodiment, the first working mode switching instruction is configured to instruct the chip to switch to the low power mode, and the second working mode switching instruction is configured to instruct the chip to switch out of the low power mode. In the embodiment of the present application, when the chip enters the low power mode, the register group will enter the power-off state as the register group to which it belongs is powered off.

[0105] In the above, the pre-storage of the internal signal of the hardware module is realized through the register group. As a signal transmission mechanism, the software module can directly read the internal signal of the hardware module through this mechanism, thereby not causing more register consumption in the register group.

[0106] Step 304, transmitting the operating parameter data to a storage unit coupled to the chip;

[0107] Specifically, in response to the first working mode switching instruction, the storage recovery engine acquires the working parameter data of the hardware module from the register group before the chip enters the low power consumption mode, and then transmits the working parameter data to the storage unit;

[0108] Furthermore, the storage unit is used to maintain and store the working parameter data of the hardware module when the chip enters the low power consumption mode and the hardware module and the register group are powered off. Exemplarily, the storage unit may be a random access memory RAM.

[0109] Step 306, in response to the second working mode switching instruction, obtain the working parameter data from the storage unit and write the working parameter data into the register group; the second working mode switching instruction is used to instruct the chip to switch back to the first working mode.

[0110] Specifically, in response to the second working mode switching instruction, the chip switches back to the first working mode. Taking the first working mode switching instruction as an example, in which the first working mode switching instruction is configured to instruct the chip to switch to a low power consumption mode, and the second working mode switching instruction is configured to instruct the chip to switch out of a low power consumption mode, in response to the chip exiting the low power consumption mode, the storage recovery engine writes the working parameter data obtained from the storage unit into the register group, thereby enabling the hardware module to obtain the working parameter data from the register group, so as to restore the chip to the working state before entering the low power consumption mode based on the working parameter data.

[0111] In the embodiment of the present application, the recovery of the internal signal of the hardware module (for example, the working parameter data) is realized by transferring in the register group. For example, the storage and recovery of the internal signal of the hardware module are completed through the corresponding register in the register group. When the chip exits the low power mode, the storage recovery engine is powered on again.

[0112] Taking the storage and recovery of the internal signals of the hardware module through the corresponding registers in the register group as an example, the storage recovery engine is configured to respond to the first working mode switching instruction and execute an access (reading action) to the corresponding register in the register group, and the hardware module is configured to respond to the reading action and write the internal signal (working parameter data) of this module into the corresponding register in the register group, so that the storage recovery engine can read the working parameter data, that is, before the chip enters the low power mode, the corresponding register in the register group acts as a bridge element to read the internal signal from the hardware module and write it into the storage unit.

[0113] Furthermore, the storage recovery engine is configured to execute an access (write action) to a corresponding register in the register group in response to a second operating mode switching instruction, and the hardware module is configured to respond to the write action to obtain operating parameter data, that is, when the chip exits the low power consumption mode, the corresponding register in the register group acts as a bridge element to write the internal signal from the storage unit to the hardware module.

[0114] As described above, the register group not only implements the storage and recovery of the internal signals of the hardware module, but also serves as a signal transmission mechanism, so that the software module can directly read or write the internal signals of the hardware module through this mechanism, thereby not causing more register consumption in the register group.

[0115] Through the register group, the embodiment of the present application realizes the storage and recovery of the internal signals of the hardware module, and there is no need to increase resource consumption even if there are many internal signals of the hardware module. The embodiment of the present application solves the problem of the loss of internal signals of the hardware module after power off, saves a lot of power consumption compared to the traditional solution of placing it in the AON area, and saves a lot of resources compared to the traditional solution of using the retention unit.

[0116] In one embodiment, the method further comprises:

[0117] In response to the first working mode switching instruction, second configuration information for reading working parameter data from the register group is acquired; the second configuration information includes the address of the register group and the data length of the working parameter data.

[0118] Specifically, the chip switches out of the first working mode in response to the first working mode switching instruction; illustratively, the first working mode switching instruction is configured to instruct the chip to switch to the low power consumption mode. Further, the storage recovery engine in the chip can obtain the second configuration information of the software module configuration before the chip enters the low power consumption mode in response to the first working mode switching instruction.

[0119] The second configuration information may include the address of the register group and the data length of the working parameter data. Before the chip enters the low power mode, the software module may configure the second configuration information and transmit it to the storage recovery engine. The storage recovery engine may respond to the received second configuration information and read the working parameter data of the hardware module from the register group, wherein the action of the storage recovery engine reading the register group may be understood as the storage recovery engine accessing the corresponding register in the register group. Exemplarily, when the hardware module detects that the storage recovery engine accesses the corresponding register in the register group, the internal signal (working parameter data) of this module is written into the corresponding register in the register group.

[0120] Furthermore, the storage recovery engine can write the working parameter data into the storage unit. When the chip enters the low power mode, the storage unit can keep storing the working parameter data, thereby realizing the storage of the internal signals of the hardware module, and thus realizing the recovery of the internal signals of the hardware module when the chip exits the low power mode.

[0121] In one embodiment, the register group includes a first register and a second register; the address of the first register is configured as the first address of the register group;

[0122] like Figure 4 As shown, the steps of reading the register group and obtaining the working parameter data of the hardware module include:

[0123] Step 402, executing a first read operation for the first register; the first read operation is used to instruct the corresponding hardware module to write the working parameter data of the module into the second register;

[0124] Step 404, when the first reading operation is completed, the working parameter data in the second register is read out in sequence according to a preset reading number; the preset reading number is determined according to the data length.

[0125] Specifically, the register group may include two registers, namely, a first register (REG1) in the register group that is not related to the chip operation task, and a second register (REG2) in the register group that is not related to the chip operation task; further, the address of the register group in the second configuration information may refer to the address of the first register, and the address of the first register is configured by the software module as the first address of the register group. In addition, the software module also uses the data length of the working parameter data to be stored as part of the second configuration information.

[0126] Exemplarily, before the chip enters the low power mode, the software module configures the address of the first register (REG1) as the first address of the register group (RegBank), and configures the length of the data to be stored (i.e., the length of the internal signal) LEN. The storage recovery engine receives the second configuration information and can perform the first read operation according to the second configuration information.

[0127] It should be noted that when there are a large number of hardware modules, the corresponding hardware module that responds to the first read action may refer to the hardware module determined by selection, and then cooperate with the register group, so that the embodiment of the present application can cope with the situation where there are a large number of internal chip signals.

[0128] Among them, the storage recovery engine can access the bus through the register, and regard the first read action for the first register (REG1) completed according to the address of the first register as the first read action, and after completing the first read action, read the working parameter data in the second register (REG2) in sequence according to the preset number of reads; optionally, the preset number of reads is determined according to the data length, for example, it can be LEN times.

[0129] like Figure 5 As shown in the waveform, the storage recovery engine can read REG1 once and REG2 LEN times, and then the storage recovery engine reads REG1 to indicate the start of storage of the internal signal, and reads REG2 to obtain the internal signal. After the hardware module detects the register access bus (RegBus) reading REG1, it can continuously write the internal signal of this module into REG2.

[0130] As described above, by setting the first register (REG1) and the second register (REG2), the storage of the internal signal of the hardware module can be realized. At the same time, the first register (REG1) and the second register (REG2) are also used as a signal transmission mechanism, so that the software module can directly read the internal signal of the hardware module through this mechanism without causing more consumption of registers in the register group.

[0131] In one embodiment, the method further comprises:

[0132] In response to the second working mode switching instruction, third configuration information for writing the working parameter data into the register group is acquired; the third configuration information includes the address of the register group and the data length of the working parameter data.

[0133] Specifically, in response to the second working mode switching instruction, it is determined that the chip switches to the first working mode, and then the third configuration information of the software module configuration can be obtained, for example, the third configuration information transmitted by the receiving software module can be received; wherein the third configuration information may include the address of the register group and the data length of the working parameter data

[0134] In the embodiment of the present application, the recovery of the internal signal of the hardware module (for example, working parameter data) is achieved by transferring in the register group. Exemplarily, the recovery of the internal signal of the hardware module is completed through the corresponding register in the register group.

[0135] Taking the first working mode switching instruction configured to instruct the chip to switch to low power mode, and the second working mode switching instruction configured to instruct the chip to switch out of low power mode as an example, when the chip exits the low power mode, the storage recovery engine is powered on again, and the storage recovery engine is configured to respond to the third configuration information transmitted by the software module, and write the working parameter data obtained from the storage unit into the corresponding register in the register group according to the third configuration information; then, after the hardware module monitors that the storage recovery engine performs the write action, it determines that the working parameter data can be obtained from the corresponding register in the register group, thereby reading the register group. For example, after the hardware module detects that the storage recovery engine performs a write action for accessing the corresponding register in the register group, it will continuously obtain data from the corresponding register in the register group. The embodiment of the present application realizes the recovery of internal signals based on the corresponding register in the register group.

[0136] In one embodiment, the register group includes a first register and a second register; the address of the first register is configured as the first address of the register group;

[0137] like Figure 6 As shown, the steps of writing the working parameter data into the register group include:

[0138] Step 602, performing a first write operation on a first register; wherein the first write operation carries a first amount of working parameter data;

[0139] Step 604, when the first write operation is completed, the remaining working parameter data except the first quantity is sequentially written into the second register according to a preset number of writes; wherein the preset number of writes is determined based on the first quantity and the data length.

[0140] Specifically, the register group may include two registers, namely, a first register (REG1) in the register group that is not related to the chip running task, and a second register (REG2) in the register group that is not related to the chip running task; further, the address of the register group in the third configuration information may refer to the address of the first register, and the address of the first register is configured by the software module as the first address of the register group. In addition, the software module also takes the data length of the working parameter data as part of the third configuration information.

[0141] Exemplarily, when the chip exits the low power mode, the software module configures the address of the first register (REG1) as the first address of the register group (RegBank), and configures the data length of the working parameter data (i.e., the length of the internal signal) LEN. The storage recovery engine receives the above configuration information and performs the first write action according to the above configuration information.

[0142] The storage recovery engine may access the bus through the register, and take the first write action for the first register (REG1) completed according to the address of the first register as the first write action, and after completing the first write action, write the remaining working parameter data except the first quantity into the second register (REG2) in sequence according to the preset write times; optionally, the first quantity may be 1, and the preset write times is determined based on the first quantity and the data length of the working parameter data, and the preset write times may be LEN-1;

[0143] Combination Figure 5 As shown in the waveform, the storage recovery engine can write REG1 once and LEN-1 times REG2, and then the storage recovery engine writes REG1 to indicate that the internal signal recovery starts and carries the first data at the same time, and writes REG2 to carry the rest of the data. After the hardware module detects the register access bus (RegBus) write REG1 action, it can continuously obtain data from the first register (REG1) and the second register (REG2).

[0144] It should be noted that when there are a large number of hardware modules, the corresponding hardware module that responds to the first write action may refer to the hardware module determined by selection, and then cooperate with the register group, so that the embodiment of the present application can cope with the situation where there are a large number of internal chip signals.

[0145] As described above, by setting the first register (REG1) and the second register (REG2), the recovery of the internal signal of the hardware module can be achieved. At the same time, the first register (REG1) and the second register (REG2) are also used as a signal transmission mechanism, so that the software module can directly write the internal signal of the hardware module through this mechanism without causing more consumption of registers in the register group.

[0146] In an embodiment of the present application, the corresponding registers in the register group serve as a bridge element that reads the internal signal from the hardware module and then writes it into the storage unit before the chip enters the low power mode. The corresponding registers in the register group not only realize the storage and recovery of the internal signal of the hardware module, but also serve as a signal transmission mechanism, so that the software module can directly read or write the internal signal of the hardware module through this mechanism, thereby avoiding more register consumption in the register group.

[0147] Through the corresponding registers in the register group, the embodiment of the present application realizes the storage and recovery of the internal signals of the hardware module, and there is no need to increase resource consumption even if there are many internal signals of the hardware module. The embodiment of the present application solves the problem of the loss of internal signals of the hardware module after power off, saves a lot of power consumption compared to the traditional solution of placing it in the AON area, and saves a lot of resources compared to the traditional solution of using the retention unit.

[0148] In one embodiment, the chip further includes a selector connected between the register group and the hardware module; the register group further includes a third register; and the method further includes:

[0149] In response to the first working mode switching instruction or the second working mode switching instruction, fourth configuration information is obtained, and a module selection action is performed according to the fourth configuration information; the module selection action is used to instruct the selector to parse the third register to determine the hardware module used to respond to the first read action or the first write action this time;

[0150] The fourth configuration information includes an identifier of the hardware module; and the module selection action includes writing the identifier into the third register.

[0151] Specifically, if Figure 7 As shown, when the internal signals of multiple hardware modules (for example, m) need to be stored and restored, another register can be selected in the register group as the corresponding register. Optionally, the register group also includes a third register (REG3) in the register group that is not related to the chip running task.

[0152] Exemplarily, the third register (REG3) may be used as a chip select register.

[0153] like Figure 7 As shown, the chip may also include a selector MUX (Multiplexer) connected between the register group and each hardware module; wherein the input end and the output end of the selector MUX may both be bidirectional; further, the control end of the selector MUX may be connected to the storage recovery engine.

[0154] The storage recovery engine may respond to the fourth configuration information transmitted by the software module and perform a module selection action according to the fourth configuration information, and then the selector MUX may access and parse the third register under the triggering of the module selection action, thereby determining the hardware module for responding to the first read action and the first write action in each hardware module. The fourth configuration information may include an identifier of the hardware module, and the storage recovery engine may write the identifier of the hardware module into the third register for the selector MUX to perform parsing.

[0155] Exemplarily, the software module has a higher configuration priority for the fourth configuration information than the second configuration information and the third configuration information; optionally, the software module has a higher priority for the transmission order of the fourth configuration information than the second configuration information and the third configuration information.

[0156] In the embodiment of the present application, a third register (REG3) is added as a chip select register. Before the storage recovery engine accesses the first register (REG1) and the second register (REG2), the third register (REG3) is first written to select a certain hardware module. At this time, the storage recovery engine can parse the third register (REG3) through the selector MUX and select one from multiple hardware modules to store and recover internal signals.

[0157] As described above, the embodiment of the present application realizes the storage and recovery of the internal signals of the hardware module by configuring the corresponding registers in the register group. Even if there are many internal signals in the module, there is no need to increase resource consumption. The embodiment of the present application unifies the storage and recovery mechanism of the register group and the internal signals of the hardware module. It can not only store and restore the register group and optimize the storage and recovery efficiency, but also solve the problem of the loss of the internal signal of the hardware module after power off. Compared with putting it in the AON area, it saves a lot of power consumption and saves a lot of resources compared with using the retention unit.

[0158] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned 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 does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can 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 to be 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.

[0159] Based on the same inventive concept, the embodiment of the present application also provides a working mode switching device for implementing the working mode switching method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the embodiments of one or more working mode switching devices provided below can refer to the limitations of the working mode switching method above, and will not be repeated here.

[0160] In one embodiment, Figure 8As shown, a working mode switching device 800 is provided. The device 800 is applied to a chip. The chip includes a register group. The device 800 includes:

[0161] The data reading module 801 is used to read the register group and obtain register data in response to the first working mode switching instruction; the first working mode switching instruction is used to instruct the chip to switch out of the first working mode;

[0162] A data transmission module 802, used to transmit register data to a storage unit coupled to the chip;

[0163] The data writing module 803 is used to obtain register data from the storage unit and write the register data into the register group in response to the second working mode switching instruction; the second working mode switching instruction is used to instruct the chip to switch back to the first working mode;

[0164] The mode recovery module 804 is used to recover to the first working mode based on the data of the register group.

[0165] In one embodiment, the apparatus 800 further includes:

[0166] The first configuration information acquisition module is used to obtain first configuration information for configuring the register group in response to the first working mode switching instruction; wherein the first configuration information includes the number of registers in the register group and the first address of the register group.

[0167] In one embodiment, the first operating mode switching instruction is configured to instruct the chip to switch to a low power consumption mode, and the second operating mode switching instruction is configured to instruct the chip to switch out of the low power consumption mode.

[0168] Based on the same inventive concept, the embodiment of the present application also provides a working mode switching device for implementing the working mode switching method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the embodiments of one or more working mode switching devices provided below can refer to the limitations of the working mode switching method above, and will not be repeated here.

[0169] In one embodiment, Fig. 9 As shown, a working mode switching device 900 is provided. The device 900 is applied to a chip. The chip includes a register group and a hardware module connected to the register group. The device 900 includes:

[0170] The reading module 901 is used to read the register group in response to the first working mode switching instruction to obtain the working parameter data of the hardware module; the first working mode switching instruction is used to instruct the chip to switch out of the first working mode;

[0171] A transmission module 902, used to transmit the operating parameter data to a storage unit coupled to the chip;

[0172] The writing module 903 is used to obtain the working parameter data from the storage unit and write the working parameter data into the register group in response to the second working mode switching instruction; the second working mode switching instruction is used to instruct the chip to switch back to the first working mode.

[0173] In one embodiment, the apparatus 900 further includes:

[0174] The second configuration information acquisition module is used to obtain second configuration information for reading the working parameter data from the register group in response to the first working mode switching instruction; the second configuration information includes the address of the register group and the data length of the working parameter data.

[0175] In one embodiment, the register group includes a first register and a second register; the address of the first register is configured as the first address of the register group;

[0176] The reading module 901 is used to perform the first reading action on the first register; the first reading action is used to instruct the corresponding hardware module to write the working parameter data of this module into the second register; and when the first reading action is completed, the working parameter data in the second register is read out in sequence according to the preset number of readings; the preset number of readings is determined according to the data length.

[0177] In one embodiment, the apparatus 900 further includes:

[0178] The third configuration information acquisition module is used to respond to the second working mode switching instruction to acquire third configuration information used to write the working parameter data into the register group; the third configuration information includes the address of the register group and the data length of the working parameter data.

[0179] In one embodiment, the register group includes a first register and a second register; the address of the first register is configured as the first address of the register group;

[0180] A write module 903 is used to perform an initial write operation on a first register; wherein the initial write operation carries a first quantity of working parameter data; upon completion of the initial write operation, the remaining working parameter data except the first quantity are sequentially written into a second register according to a preset number of writes; wherein the preset number of writes is determined based on the first quantity and the data length.

[0181] In one embodiment, the chip further includes a selector connected between the register group and the hardware module; the register group further includes a third register; and the apparatus 900 further includes:

[0182] a fourth configuration information acquisition module, configured to acquire fourth configuration information in response to the first working mode switching instruction or the second working mode switching instruction, and to perform a module selection action according to the fourth configuration information; the module selection action is used to instruct the selector to parse the third register to determine the hardware module used to respond to the first read action or the first write action this time;

[0183] The fourth configuration information includes an identifier of the hardware module; and the module selection action includes writing the identifier into the third register.

[0184] In one embodiment, the first operating mode switching instruction is configured to instruct the chip to switch to a low power consumption mode, and the second operating mode switching instruction is configured to instruct the chip to switch out of the low power consumption mode.

[0185] Each module in the above-mentioned working mode switching device can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.

[0186] In one embodiment, a chip is provided, comprising a register group and a hardware module connected to the register group; the chip further comprises a storage recovery engine, the storage recovery engine being connected to the register group and the hardware module respectively;

[0187] The storage recovery engine is used to execute the above-mentioned working mode switching method.

[0188] In one embodiment, the storage recovery engine is connected to the register group and the hardware module respectively through a register access bus.

[0189] In one embodiment, the chip further includes a selector connected to the register group; there are multiple hardware modules, and the selector is connected to each hardware module respectively.

[0190] In one embodiment, an electronic device is provided, comprising the chip as described above, and further comprising a storage unit coupled to the chip.

[0191] In one embodiment, the storage unit is a random access memory.

[0192] In one embodiment, an electronic device is provided. The electronic device may be a terminal, and its internal structure diagram may be as follows: Fig.10As shown. The electronic device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. Among them, the processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the electronic device is used to exchange information between the processor and an external device. The communication interface of the electronic device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a working mode switching method is implemented. The display unit of the electronic device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the electronic device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the electronic device housing, or an external keyboard, touchpad or mouse.

[0193] Those skilled in the art will understand that Fig.10 The structure shown in the figure is merely a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the electronic device to which the scheme of the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0194] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned power consumption mode recovery method are implemented.

[0195] In one embodiment, a computer program product is provided, comprising a computer program, wherein when the computer program is executed by a processor, the steps of the above-mentioned power consumption mode recovery method are implemented.

[0196] 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, 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 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), magnetoresistive 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, etc., but are not limited to this.

[0197] The technical features of the above embodiments may be arbitrarily combined. 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 specification.

[0198] 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 method for switching working modes, characterized in that: The method is applied to a chip, the chip includes a register group, and the method includes: In response to a first working mode switching instruction, the register group is read to obtain register data; the first working mode switching instruction is used to instruct the chip to switch out of the first working mode; transferring the register data to a storage unit coupled to the chip; In response to a second working mode switching instruction, acquiring the register data from the storage unit and writing the register data into the register group; the second working mode switching instruction is used to instruct the chip to switch back to the first working mode; The first working mode is restored based on the data in the register group.

2. The method according to claim 1, characterized in that The method further comprises: In response to the first working mode switching instruction, obtaining first configuration information for configuring the register group; The first configuration information includes the number of registers in the register group and the first address of the register group.

3. The method according to claim 1 or 2, characterized in that: The first operating mode switching instruction is configured to instruct the chip to switch to a low power consumption mode, and the second operating mode switching instruction is configured to instruct the chip to switch out of the low power consumption mode.

4. A method for switching working modes, characterized in that: The method is applied to a chip, the chip includes a register group and a hardware module connected to the register group, and the method includes: In response to a first working mode switching instruction, the register group is read to obtain working parameter data of the hardware module; the first working mode switching instruction is used to instruct the chip to switch out of the first working mode; transmitting the operating parameter data to a storage unit coupled to the chip; In response to a second operating mode switching instruction, the operating parameter data is obtained from the storage unit and the operating parameter data is written into the register group; the second operating mode switching instruction is used to instruct the chip to switch back to the first operating mode.

5. The method according to claim 4, characterized in that The method further comprises: In response to the first working mode switching instruction, second configuration information for reading the working parameter data from the register group is acquired; the second configuration information includes the address of the register group and the data length of the working parameter data.

6. The method according to claim 5, characterized in that The register group includes a first register and a second register; the address of the first register is configured as the first address of the register group; The step of reading the register group to obtain the working parameter data of the hardware module includes: Execute a first read operation for the first register; the first read operation is used to instruct the corresponding hardware module to write the working parameter data of the module into the second register; When the first reading operation is completed, the working parameter data in the second register is read out in sequence according to a preset number of readings; the preset number of readings is determined according to the data length.

7. The method according to claim 4, characterized in that The method further comprises: In response to the second working mode switching instruction, third configuration information for writing the working parameter data into the register group is acquired; the third configuration information includes the address of the register group and the data length of the working parameter data.

8. The method according to claim 7, characterized in that The register group includes a first register and a second register; the address of the first register is configured as the first address of the register group; The step of writing the operating parameter data into the register group comprises: Performing a first write operation on the first register; wherein the first write operation carries a first amount of the working parameter data; When the first write operation is completed, the remaining working parameter data except the first number are sequentially written into the second register according to a preset number of writes; wherein the preset number of writes is determined based on the first number and the data length.

9. The method according to claim 6 or 8, characterized in that: The chip also includes a selector connected between the register group and the hardware module; The register group further includes a third register; and the method further includes: In response to the first working mode switching instruction or the second working mode switching instruction, acquiring fourth configuration information, and executing a module selection action according to the fourth configuration information; The module selection action is used to instruct the selector to parse the third register to determine the hardware module used to respond to the first read action or the first write action this time; The fourth configuration information includes an identifier of a hardware module; and the module selection action includes writing the identifier into the third register.

10. The method according to claim 4, characterized in that The first operating mode switching instruction is configured to instruct the chip to switch to a low power consumption mode, and the second operating mode switching instruction is configured to instruct the chip to switch out of the low power consumption mode.

11. A working mode switching device, characterized in that: The device is applied to a chip, the chip includes a register group, and the device includes: A data reading module, configured to read the register group and obtain register data in response to a first working mode switching instruction; the first working mode switching instruction is used to instruct the chip to switch out of the first working mode; A data transmission module, used for transmitting the register data to a storage unit coupled to the chip; a data writing module, configured to obtain the register data from the storage unit and write the register data into the register group in response to a second working mode switching instruction; the second working mode switching instruction is used to instruct the chip to switch back to the first working mode; A mode recovery module is used to recover to the first working mode based on the data of the register group.

12. A working mode switching device, characterized in that: The device is applied to a chip, the chip includes a register group and a hardware module connected to the register group, and the device includes: A reading module, configured to read the register group in response to a first working mode switching instruction to obtain working parameter data of the hardware module; the first working mode switching instruction is used to instruct the chip to switch out of the first working mode; A transmission module, used for transmitting the operating parameter data to a storage unit coupled to the chip; A writing module is used to obtain the working parameter data from the storage unit and write the working parameter data into the register group in response to a second working mode switching instruction; the second working mode switching instruction is used to instruct the chip to switch back to the first working mode.

13. A chip, characterized in that: The chip comprises a register group and a hardware module connected to the register group; the chip further comprises a storage recovery engine, and the storage recovery engine is respectively connected to the register group and the hardware module; Wherein, the storage recovery engine is used to execute the working mode switching method described in any one of claims 1 to 10.

14. The chip according to claim 13, characterized in that: The storage recovery engine is connected to the register group and the hardware module respectively through a register access bus.

15. The chip according to claim 13, characterized in that: The chip further includes a selector connected to the register group; there are multiple hardware modules, and the selector is connected to each of the hardware modules respectively.

16. An electronic device, characterized in that: The chip comprises any one of claims 13 to 15, and further comprises a storage unit coupled to the chip.

17. The electronic device according to claim 16, characterized in that: The storage unit is a random access memory.

18. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 10 are implemented.

19. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 10 are implemented.