Power consumption management method and device, electronic equipment, medium, product and chip
By adjusting the power consumption state in response to instructions in the cache, the flexibility and efficiency of cache power consumption management are solved, and power consumption optimization and efficient reading and writing operations are achieved under different requirements.
Patent Information
- Application Number
- CN202510556975.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-29
- Publication Date
- 2025-08-15
AI Technical Summary
With the improvement of processor performance, the memory performance is slower, resulting in the memory access speed lags behind the processor's calculation speed. Memory performance limits the performance of processor performance, and the proportion of cache power consumption continues to increase in system-level chips, and it is difficult for existing technology to effectively manage cache power consumption.
By sending a second instruction to the storage area in response to the first instruction, adjusting its power consumption state to limit or restore data reading and writing, flexibly managing the power consumption state of the storage area, and awakening the target sub-region or storage unit only when needed for read and write operations.
Reduce the power consumption of the storage area when no data is required, improve the flexibility and efficiency of power consumption management, and ensure that the read and write operations can be performed normally when needed.
Smart Images

Figure CN120491798A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of power consumption management technology, and in particular to a power consumption management method, device, electronic device, medium, product, and chip. Background Art
[0002] While processor performance has rapidly increased, memory performance has improved at a relatively slow pace, causing memory access speeds to lag behind processor computational speeds. This has led to memory performance limiting processor performance. A cache is a type of memory that allows for high-speed data exchange. Setting up a cache prioritizes data exchange with the processor over memory, reducing the processor's access frequency to memory and improving processor access speed. Cache configuration is a crucial factor in the high performance of modern computer systems. With the continuous advancement of integrated circuit technology, the complexity of cache control logic and the size of the storage area are increasing, and the proportion of cache power consumption in system-on-chip (SoC) systems is also increasing. Summary of the Invention
[0003] To overcome the problems existing in the related art, the present disclosure provides a power consumption management method, device, electronic device, medium, product and chip.
[0004] According to a first aspect of an embodiment of the present disclosure, a method for managing power consumption is provided, including:
[0005] In response to the first instruction and the storage area being in the first power consumption state, sending a second instruction to the storage area;
[0006] The first instruction is used to request waking up the storage area, and the second instruction is used to instruct to adjust the power consumption state of the storage area to a second power consumption state; when the storage area is in the first power consumption state, data reading and data writing of the storage area are restricted, and when the storage area is in the second power consumption state, data reading and data writing of the storage area are restored.
[0007] In this embodiment, in response to the first instruction and the storage area being in the first power consumption state, the control unit sends a second instruction to the storage area to adjust the power consumption state of the storage area to the second power consumption state. When there is no need to read data from the storage area or write data to the storage area, the storage area can be in the first power consumption state to reduce the power consumption of the storage area. When there is a need to read data from the storage area or write data to the storage area, the power consumption state of the storage area can be adjusted to the second power consumption state so that read operations and write operations can be performed normally on the storage area.
[0008] In some exemplary embodiments of the present disclosure, the storage area includes multiple sub-areas, and the second instruction is associated with one or more target sub-areas among the multiple sub-areas;
[0009] In response to the first instruction and the storage area being in the first power consumption state, sending the second instruction to the storage area includes:
[0010] Based on the target sub-region being in the first power consumption state, in response to the first instruction, the second instruction is sent to the target sub-region to instruct the power consumption state of the target sub-region to be adjusted to the second power consumption state.
[0011] In this embodiment, only the power consumption state of the target sub-area involved in the first instruction is adjusted to the second power consumption state, and the sub-area not involved in the first instruction can continue to be in the first power consumption state, which can reduce the power consumption of the storage area as much as possible and improve the flexibility of power consumption management.
[0012] In some exemplary embodiments of the present disclosure, the storage area includes a first sub-area; wherein the first sub-area is used to store identification information;
[0013] The sending the second instruction to the target sub-area in response to the first instruction based on the target sub-area being in the first power consumption state includes:
[0014] Based on the first sub-region being in the first power consumption state, in response to the first instruction, the second instruction is sent to the first sub-region to instruct the power consumption state of the first sub-region to be adjusted to the second power consumption state.
[0015] In this embodiment, the power consumption state of the first sub-area can be adjusted to the second power consumption state independently, and other sub-areas can continue to be in the first power consumption state, which can reduce the power consumption of the storage area as much as possible and improve the flexibility of power consumption management.
[0016] In some exemplary embodiments of the present disclosure, the storage area further includes a second sub-area; wherein the second sub-area is used to store data, and the identification information is associated with the data stored in the second sub-area;
[0017] The sending the second instruction to the target sub-area in response to the first instruction based on the target sub-area being in the first power consumption state includes:
[0018] Based on the second sub-area being in the first power consumption state, in response to the target tag matching the identification information, sending the second instruction to the second sub-area to instruct the power consumption state of the second sub-area to be adjusted to the second power consumption state;
[0019] The target tag is used to indicate the location of the data desired to be read or written in the second sub-area.
[0020] In this embodiment, the power consumption state of the second sub-area can be adjusted to the second power consumption state alone, and other sub-areas can continue to be in the first power consumption state, which can reduce the power consumption of the storage area as much as possible and improve the flexibility of power consumption management.
[0021] In some exemplary embodiments of the present disclosure, the storage area further includes a second sub-area; wherein the second sub-area is used to store data, the second sub-area includes a plurality of storage units, the identification information includes a plurality of tags, and the storage units correspond to the tags one-to-one;
[0022] The sending the second instruction to the target sub-area in response to the first instruction based on the target sub-area being in the first power consumption state includes:
[0023] Based on the target storage unit being in the first power consumption state, in response to the target tag matching the tag corresponding to the target storage unit, sending the second instruction to the target storage unit to instruct the power consumption state of the target storage unit to be adjusted to the second power consumption state;
[0024] The target tag is used to indicate the location of the target storage unit where the data desired to be read or written is located.
[0025] In this embodiment, the power consumption state of the target storage unit can be adjusted to the second power consumption state separately, and other sub-areas or storage units can continue to be in the first power consumption state, which can reduce the power consumption of the storage area as much as possible and improve the flexibility of power consumption management.
[0026] In some exemplary embodiments of the present disclosure, the power consumption management method further includes:
[0027] sending a third instruction in response to the power consumption state of the target sub-region or the target storage unit of the storage region being adjusted to the second power consumption state;
[0028] The third instruction is used to notify the input queue and the command queue that the target sub-area or target storage unit of the storage area is in the second power consumption state.
[0029] In this embodiment, the control unit sends the third instruction so that the input queue and the command queue can promptly know that the power consumption state of the target sub-region or target storage unit of the storage region has been adjusted to the second power consumption state.
[0030] In some exemplary embodiments of the present disclosure, the power consumption management method further includes:
[0031] sending a switching instruction in response to a continuous time period during which a target sub-area or a target storage unit of the storage area has not been accessed meeting a first threshold;
[0032] The switching instruction is used to instruct to switch the power consumption state of the target sub-region or the target storage unit of the storage region from the second power consumption state to the first power consumption state.
[0033] In this embodiment, the power consumption state of a target sub-region or a target storage unit of a storage region that has not been accessed for a long time can be switched to the first power consumption state in a timely manner to reduce the power consumption of the storage region as much as possible.
[0034] In some exemplary embodiments of the present disclosure, the power consumption management method further includes:
[0035] sending a fourth instruction in response to the power consumption state of the target sub-region or the target storage unit of the storage region being switched from the second power consumption state to the first power consumption state;
[0036] The fourth instruction is used to notify the input queue and the command queue that the target sub-area or target storage unit of the storage area is in the first power consumption state.
[0037] In this embodiment, the control unit sends the fourth instruction so that the input queue and the command queue can promptly know that the power consumption state of the target sub-region or target storage unit of the storage region has been adjusted to the first power consumption state.
[0038] According to a second aspect of an embodiment of the present disclosure, a method for managing power consumption is provided, including:
[0039] Based on the storage area being in the first power consumption state, in response to receiving the fifth instruction, sending the first instruction;
[0040] Among them, the fifth instruction is used to instruct to read data from the storage area or write data to the storage area, the first instruction is used to request the control unit to wake up the storage area, the storage area is in the first power consumption state, and data reading and data writing of the storage area are restricted.
[0041] In this embodiment, when data does not need to be read from or written to the storage area, the storage area may be in a first power consumption state to reduce power consumption of the storage area. When an external device needs to read data from or write data to the storage area, the input queue, based on the storage area being in the first power consumption state and receiving a fifth instruction from the external device, may send a first instruction to the control unit to request the control unit to wake up the storage area so as to perform a read operation or a write operation on the storage area.
[0042] In some exemplary embodiments of the present disclosure, the power consumption management method further includes:
[0043] In response to receiving the third instruction, forwarding the fifth instruction to the command queue;
[0044] Among them, the third instruction is sent by the control unit, and the third instruction is used to notify the input queue and the command queue that the target sub-area or target storage unit of the storage area is in the second power consumption state, and the target sub-area or target storage unit of the storage area is in the second power consumption state, and resume data reading and data writing of the target sub-area or target storage unit of the storage area.
[0045] In this embodiment, when the input queue learns through the third instruction that it can perform read and write operations on the target sub-area or target storage unit of the storage area, it promptly forwards the fifth instruction from the external device to the command queue so that the command queue can execute the fifth instruction.
[0046] In some exemplary embodiments of the present disclosure, the power consumption management method further includes:
[0047] forwarding the fifth instruction to a command queue in response to receiving the fifth instruction based on the storage area being in the second power consumption state;
[0048] When the storage area is in the second power consumption state, data reading and data writing of the storage area are resumed.
[0049] In this embodiment, when the input queue learns that the read operation and the write operation can be performed on the storage area, the fifth instruction from the external device is forwarded to the command queue in a timely manner, so that the command queue can execute the fifth instruction.
[0050] In some exemplary embodiments of the present disclosure, sending the first instruction in response to receiving the fifth instruction based on the storage area being in the first power consumption state includes:
[0051] Based on receiving the fourth instruction, in response to receiving the fifth instruction, sending the first instruction;
[0052] The fourth instruction is sent by the control unit, and is used to notify the input queue and the command queue that the target sub-area or target storage unit of the storage area is in the first power consumption state.
[0053] In this embodiment, the input queue knows that the target sub-area or target storage unit of the storage area is in the first power consumption state based on the fourth instruction sent by the control unit. When the external device needs to read data from the target sub-area or target storage unit of the storage area or write data to the target sub-area or target storage unit of the storage area, it can send a first instruction to the control unit to request the control unit to wake up the target sub-area or target storage unit of the storage area.
[0054] In some exemplary embodiments of the present disclosure, the storage area includes a first sub-area and a second sub-area, the first sub-area is used to store identification information, and the second sub-area is used to store data, and the power consumption management method further includes:
[0055] Based on the first sub-region being in the second power consumption state, in response to receiving a sixth instruction, sending the first instruction to the control unit;
[0056] The first sub-area is in the second power consumption state, and data reading and data writing of the first sub-area are restored. The sixth instruction is sent by the command queue to indicate that the second sub-area or the target storage unit in the second sub-area needs to be awakened.
[0057] In this embodiment, the input queue responds to the instruction of the command queue and requests the control unit to wake up the second sub-area or the target storage unit in the second sub-area to resume data reading or data writing in the second sub-area or the target storage unit in the second sub-area.
[0058] According to a third aspect of an embodiment of the present disclosure, a method for managing power consumption is provided, including:
[0059] sending a sixth instruction to the input queue in response to receiving the fifth instruction based on the target sub-region of the storage region being in the first power consumption state;
[0060] Among them, the fifth instruction is sent by the input queue, the fifth instruction is used to instruct to read data from the storage area or write data to the storage area, and the sixth instruction is used to indicate that the target sub-area needs to be awakened, and the target sub-area is in the first power consumption state, limiting data reading and data writing of the target sub-area.
[0061] In this embodiment, when the command queue receives an instruction to read data from or write data to a storage area, and the target sub-area is in a power consumption state that limits data reading and data writing, an instruction requesting to wake up the target sub-area is sent to the input queue to resume data reading or data writing in the target sub-area.
[0062] In some exemplary embodiments of the present disclosure, the storage area includes a first sub-area and a second sub-area, the first sub-area is used to store identification information, the identification information includes a plurality of tags, the second sub-area is used to store data, the second sub-area includes a plurality of storage cells, the storage cells correspond one-to-one to the tags, the fifth instruction includes a target tag, the target tag is used to indicate a location of data to be read or written in the second sub-area or a location of a target storage cell where the data to be read or written is located;
[0063] The method of sending a sixth instruction to an input queue in response to receiving a fifth instruction based on the target sub-region of the storage region being in a first power consumption state comprises:
[0064] sending the sixth instruction in response to the target tag matching the tag corresponding to the target storage unit, based on the first sub-area being in the second power consumption state and the second sub-area or the target storage unit being in the first power consumption state;
[0065] The sixth instruction is used to indicate that the second sub-area or the target storage unit needs to be awakened, and the first sub-area is in the second power consumption state, and data reading and data writing of the first sub-area are resumed.
[0066] In this embodiment, when data needs to be read from or written to the second sub-region or target storage unit, and the second sub-region or target storage unit is in a power consumption state that limits data reading and writing, the command queue sends a command requesting the second sub-region or target storage unit to the input queue to wake up the second sub-region or target storage unit, thereby resuming data reading or writing in the second sub-region or target storage unit. Furthermore, power consumption management can be performed for the entire second sub-region or for each storage unit individually, providing great flexibility in power consumption management.
[0067] In some exemplary embodiments of the present disclosure, the power consumption management method further includes:
[0068] Based on the fact that both the first sub-area and the second sub-area are in the second power consumption state, or based on the fact that both the first sub-area and the target storage unit are in the second power consumption state, in response to receiving the fifth instruction, a data read or data write operation is performed on the second sub-area or the target storage unit.
[0069] In this embodiment, when the second sub-region or the target memory cell is in the second power consumption state, a data read or data write operation expected by the external device is performed on the second sub-region or the target memory cell.
[0070] In some exemplary embodiments of the present disclosure, the power consumption management method further includes:
[0071] In response to receiving the fifth instruction and the target tag not matching any of the tags, performing a data read or data write operation on a preset memory.
[0072] In this embodiment, when the cache to which the storage unit belongs does not contain the data that the fifth instruction expects to read or write, a data read or data write operation is performed on the preset memory to read the required data or write the data into the preset memory.
[0073] In some exemplary embodiments of the present disclosure, the power consumption management method further includes:
[0074] receiving a third instruction, where the third instruction is sent by the control unit and is used to notify the input queue and the command queue that the target sub-region or the target storage unit of the storage region is in the second power consumption state;
[0075] or,
[0076] A fourth instruction is received, where the fourth instruction is sent by the control unit, and the fourth instruction is used to notify the input queue and the command queue that the target sub-area or target storage unit of the storage area is in the first power consumption state.
[0077] In this embodiment, the command queue can promptly learn the power consumption status of the target sub-region or the target storage unit according to the instruction sent by the control unit.
[0078] In some exemplary embodiments of the present disclosure, the power consumption management method further includes:
[0079] sending a seventh instruction to a control unit based on that the first sub-area is in the second power consumption state and the second sub-area or the target storage unit is in the first power consumption state;
[0080] The seventh instruction is used to indicate that the second sub-area or the target storage unit needs to be awakened.
[0081] In this embodiment, the command queue directly requests the control unit to wake up the second sub-area or the target storage unit, thereby reducing the logic complexity of power consumption control.
[0082] According to a fourth aspect of an embodiment of the present disclosure, a power consumption management device is provided, including:
[0083] a control unit configured to send a second instruction to the storage area in response to the first instruction and the storage area being in the first power consumption state;
[0084] The first instruction is used to request waking up the storage area, and the second instruction is used to instruct the power consumption state of the storage area to be adjusted to a second power consumption state; when the storage area is in the first power consumption state, data reading and data writing of the storage area are restricted, and when the storage area is in the second power consumption state, data reading and data writing of the storage area are restored.
[0085] In this embodiment, when data does not need to be read from or written to the storage area, the storage area can be in the first power consumption state to reduce the power consumption of the storage area. When data needs to be read from or written to the storage area, the power consumption state of the storage area can be adjusted to the second power consumption state so that read and write operations can be performed normally on the storage area.
[0086] According to a fifth aspect of an embodiment of the present disclosure, a power consumption management device is provided, including:
[0087] an input queue configured to send the first instruction in response to receiving the fifth instruction based on the memory region being in the first power consumption state;
[0088] Among them, the fifth instruction is used to instruct to read data from the storage area or write data to the storage area, the first instruction is used to request the control unit to wake up the storage area, the storage area is in the first power consumption state, and data reading and data writing of the storage area are restricted.
[0089] In this embodiment, when data does not need to be read from or written to the storage area, the storage area may be in the first power consumption state to reduce power consumption of the storage area. When data needs to be read from or written to the storage area, based on the storage area being in the first power consumption state and receiving the fifth instruction, a first instruction may be sent to the control unit to request the control unit to wake up the storage area so as to perform read operations and write operations on the storage area.
[0090] According to a sixth aspect of an embodiment of the present disclosure, a power consumption management device is provided, including:
[0091] a command queue configured to send a sixth instruction to the input queue in response to receiving the fifth instruction based on the target sub-region of the storage region being in the first power consumption state;
[0092] Among them, the fifth instruction is sent by the input queue, the fifth instruction is used to instruct to read data from the storage area or write data to the storage area, and the sixth instruction is used to indicate that the target sub-area needs to be awakened, and the target sub-area is in the first power consumption state, limiting data reading and data writing of the target sub-area.
[0093] In this embodiment, when an instruction to read data from a storage area or write data to a storage area is received, when the target sub-area is in a power consumption state that limits data reading and data writing, an instruction requesting to wake up the target sub-area is sent to the input queue to resume data reading or data writing in the target sub-area.
[0094] According to a seventh aspect of the embodiments of the present disclosure, there is provided an electronic device, including:
[0095] processor;
[0096] a memory for storing processor-executable instructions;
[0097] The processor is configured to execute the power consumption management method as described in the first aspect of the present disclosure, or the power consumption management method as described in the second aspect of the present disclosure, or the power consumption management method as described in the third aspect of the present disclosure.
[0098] According to the eighth aspect of an embodiment of the present disclosure, a non-temporary computer-readable storage medium is provided. When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform the power consumption management method as described in the first aspect of the present disclosure, or the power consumption management method as described in the second aspect of the present disclosure, or the power consumption management method as described in the third aspect of the present disclosure.
[0099] According to the ninth aspect of the embodiments of the present disclosure, a computer program product is provided, which includes computer instructions, and the computer instructions are stored in a computer-readable storage medium; a processor of an electronic device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the electronic device executes the power consumption management method as described in the first aspect of the present disclosure, or the power consumption management method as described in the second aspect of the present disclosure, or the power consumption management method as described in the third aspect of the present disclosure.
[0100] According to the tenth aspect of an embodiment of the present disclosure, a chip is provided, comprising a processor and an input / output interface, wherein the input / output interface is used to receive signals from other devices outside the chip and transmit them to the processor or send signals from the processor to other devices outside the chip, and the processor is used to implement the power consumption management method as described in the first aspect of the present disclosure, the power consumption management method as described in the second aspect of the present disclosure, or the power consumption management method as described in the third aspect of the present disclosure through logic circuits or execution code instructions.
[0101] The above method of the present disclosure has the following beneficial effects:
[0102] When a storage area is in a power consumption state that limits data reading and writing to the storage area, in response to a first instruction requesting to wake up the storage area, a second instruction is sent to instruct the storage area to adjust the power consumption state of the storage area to a power consumption state that resumes data reading and writing to the storage area. When there is no need to read data from or write data to the storage area, the storage area can be in a low power consumption state that limits data reading and writing to the storage area to reduce the power consumption of the storage area. When there is a need to read data from or write data to the storage area, the power consumption state of the storage area can be adjusted to a high power consumption state that resumes data reading and writing to the storage area so that read operations and write operations can be performed normally on the storage area.
[0103] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0104] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0105] Figure 1 The figure is a flowchart showing a method for managing power consumption according to an exemplary embodiment.
[0106] Figure 2 It is a flowchart showing another method for managing power consumption according to an exemplary embodiment.
[0107] Figure 3 It is a flowchart showing another method for managing power consumption according to an exemplary embodiment.
[0108] Figure 4 It is a flowchart showing another method for managing power consumption according to an exemplary embodiment.
[0109] Figure 5It is a flowchart showing another method for managing power consumption according to an exemplary embodiment.
[0110] Figure 6 It is a flowchart showing another method for managing power consumption according to an exemplary embodiment.
[0111] Figure 7 It is a flowchart showing another method for managing power consumption according to an exemplary embodiment.
[0112] Figure 8 It is a flowchart showing another method for managing power consumption according to an exemplary embodiment.
[0113] Figure 9 It is a flowchart showing another method for managing power consumption according to an exemplary embodiment.
[0114] Figure 10 It is a flowchart showing another method for managing power consumption according to an exemplary embodiment.
[0115] Figure 11 It is a flowchart showing another method for managing power consumption according to an exemplary embodiment.
[0116] Figure 12 The figure is a block diagram showing a power consumption management device according to an exemplary embodiment.
[0117] Figure 13 is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0118] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all possible embodiments consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
[0119] While processor performance has rapidly increased, memory performance has been slower to improve. This has resulted in memory access speeds lagging behind processor computation speeds, limiting processor performance. Cache refers to storage that enables high-speed data exchange. Setting up cache to prioritize data exchange with the processor over memory reduces the processor's access frequency to memory and improves processor access speed. Cache configuration is a crucial factor in the high performance of modern computer systems.
[0120] With the continuous advancement of integrated circuit technology, the complexity of cache control logic and the area of storage areas are also increasing, and the proportion of cache power consumption in SOC is also increasing. In related technologies, power consumption management is only performed on specific storage units in the cache, or power consumption management of the cache is only performed at the software level, such as through algorithm optimization, resource management, and system-level control. None of the methods in related technologies can enable the cache storage area to enter a power consumption state that limits data reading and data writing in the storage area in a timely manner, or enter a power consumption state that restores data reading and data writing in the storage area in a timely manner.
[0121] In order to manage the power consumption of a cached storage area, the present disclosure provides a method for managing power consumption. In the method for managing power consumption provided by the present disclosure, when the storage area is in a power consumption state that limits data reading and data writing of the storage area, in response to a first instruction requesting to wake up the storage area, a second instruction is sent to instruct that the power consumption state of the storage area be adjusted to a power consumption state that restores data reading and data writing of the storage area. In the case where there is no need to read data from the storage area or write data to the storage area, the storage area can be in a low power consumption state that limits data reading and data writing of the storage area to reduce the power consumption of the storage area. In the case where data needs to be read from the storage area or written to the storage area, the power consumption state of the storage area can be adjusted to a high power consumption state that restores data reading and data writing of the storage area so that read operations and write operations can be performed normally on the storage area.
[0122] In an exemplary embodiment, Figure 1 As shown, this embodiment shows a power consumption management method that can be applied to the cache of an electronic device. The electronic device can specifically be a smart device such as a mobile phone, tablet computer, notebook computer, smart robot, smart wearable device, etc. In addition, the electronic device is also provided with various hardware resources and an energy storage device that provides power for the operation of various hardware resources. The cache can be any cache of the electronic device, such as a first-level cache, a second-level cache, a third-level cache, etc.
[0123] Cache includes Figure 1 The input queue in the cache receives and temporarily stores original access requests from the processor or other hardware modules, prevents the processor from being blocked due to cache busyness, and merges repeated requests for the same address. The cache also includes Figure 1The storage area in the memory area may include an identification storage sub-area and a data storage sub-area, the identification storage sub-area is used to store identification information, and the data storage sub-area is used to store data. The storage area may include one or more cache lines, the part of a cache line belonging to the data storage sub-area is a storage unit, the storage unit is used to store actual data, and the part belonging to the identification storage sub-area is used to store tags, and the tags are used to identify the location of the actual data. Multiple cache lines can be divided into one or more cache line groups. A read request or a write request to the storage area includes a target tag, index information, and offset information. The index information is used to determine the cache line group in the storage area, and the target tag is used to compare with all tags stored in the determined cache line group. If there is a tag that matches the target tag among all the tags stored in the determined cache line group, it means that the data corresponding to the read command or write command is stored in the storage area. If there is no tag that matches the target tag among all the tags stored in the determined cache line group, it means that the data corresponding to the read command or write command is not stored in the storage area, and the read command or write command needs to be forwarded to the next level cache or memory to execute the read command or write command. The cache also includes Figure 1 The control unit is used to manage the power consumption of the storage area.
[0124] like Figure 1 As shown, the power consumption management method shown in this embodiment includes:
[0125] S101: An input queue sends a first instruction to a control unit.
[0126] The first instruction is used to request waking up the storage area. Requesting to wake up the storage area is a request to adjust the power consumption state of the storage area from the first power consumption state to the second power consumption state. When the storage area is in the first power consumption state, data reading and writing to the storage area are restricted. When the storage area is in the second power consumption state, data reading and writing to the storage area are restored. When data needs to be read from or written to the storage area, the storage area needs to be placed in the second power consumption state.
[0127] In the embodiment of the present disclosure, the power consumption of the storage area in the first power consumption state is less than the power consumption of the storage area in the second power consumption state.
[0128] S102 - S103 : In response to the first instruction and the storage area being in the first power consumption state, the control unit sends a second instruction to the storage area.
[0129] The control unit stores power consumption status information of the storage area. The power consumption status information is used to represent the power consumption status of the storage area. In some examples, the value of the indicator field in the power consumption status information is 1, indicating that the storage area is in a first power consumption state. The value of the indicator field in the power consumption status information is 0, indicating that the storage area is in a second power consumption state. The power consumption status information can also use other methods to represent the power consumption status of the storage area, which is not limited here. The control unit can determine the power consumption status of the storage area based on the power consumption status information of the storage area stored in it.
[0130] In response to receiving the first instruction and the storage area being in the first power consumption state, the control unit sends a second instruction to the storage area, wherein the second instruction is used to instruct the storage area to adjust its power consumption state to the second power consumption state.
[0131] The storage area may adjust its power consumption state to a second power consumption state in response to the second instruction.
[0132] In this embodiment, in response to the first instruction and the storage area being in the first power consumption state, the control unit sends a second instruction to the storage area to adjust the power consumption state of the storage area to the second power consumption state. When there is no need to read data from the storage area or write data to the storage area, the storage area can be in the first power consumption state to reduce the power consumption of the storage area. When there is a need to read data from the storage area or write data to the storage area, the power consumption state of the storage area can be adjusted to the second power consumption state so that read operations and write operations can be performed normally on the storage area.
[0133] In some possible embodiments, the storage area includes a plurality of sub-areas. In some examples, the storage area includes an identification storage sub-area and a data storage sub-area, the identification storage sub-area is used to store identification information, and the data storage sub-area is used to store data.
[0134] The second instruction is associated with one or more target sub-areas in the multiple sub-areas. In the case where the storage area includes multiple sub-areas, the first instruction can be used to request to wake up one or more sub-areas, and these one or more sub-areas are referred to as target sub-areas. In some examples, the first instruction is used to request to wake up the identification storage sub-area, then the identification storage sub-area is the target sub-area, and the second instruction is associated with the identification storage sub-area. In other examples, the first instruction is used to request to wake up the data storage sub-area, then the data storage sub-area is the target sub-area, and the second instruction is associated with the data storage sub-area. In other examples, the first instruction is used to request to wake up the identification storage sub-area and the data storage sub-area, then both the identification storage sub-area and the data storage sub-area are the target sub-areas, and the second instruction is associated with the identification storage sub-area and the data storage sub-area.
[0135] S102 - S103 include: based on the target sub-region being in the first power consumption state, in response to the first instruction, sending a second instruction to the target sub-region to instruct to adjust the power consumption state of the target sub-region to the second power consumption state.
[0136] The control unit may store power consumption status information of each sub-area of the storage area. The power consumption status information is used to characterize the power consumption status of the corresponding sub-area. In some examples, the value of the indicator field in the power consumption status information is 1, indicating that the corresponding sub-area is in the first power consumption state. The value of the indicator field in the power consumption status information is 0, indicating that the corresponding sub-area is in the second power consumption state. The power consumption status information may also use other methods to characterize the power consumption status of the corresponding sub-area, which is not limited here. The control unit may determine the power consumption status of the corresponding sub-area based on the power consumption status information of the sub-area of the storage area stored therein.
[0137] In response to receiving the first instruction and the target sub-area being in the first power consumption state, the control unit sends a second instruction to the target sub-area to instruct the target sub-area to adjust the power consumption state of the target sub-area to the second power consumption state.
[0138] In response to the second instruction, the target sub-region may adjust its power consumption state to the second power consumption state.
[0139] In this embodiment, only the power consumption state of the target sub-area involved in the first instruction is adjusted to the second power consumption state, and the sub-area not involved in the first instruction can continue to be in the first power consumption state, which can reduce the power consumption of the storage area as much as possible and improve the flexibility of power consumption management.
[0140] In some possible embodiments, the storage area includes a first sub-area. The first sub-area is used to store identification information, and the identification information can be associated with data stored in the storage area. The first sub-area can be an identification storage sub-area.
[0141] When the storage area includes a first sub-area, the first instruction may be used to request waking up the first sub-area.
[0142] Based on the target sub-area being in the first power consumption state, in response to the first instruction, a second instruction is sent to the target sub-area, including: based on the first sub-area being in the first power consumption state, in response to the first instruction, a second instruction is sent to the first sub-area to instruct the power consumption state of the first sub-area to be adjusted to the second power consumption state.
[0143] The control unit may store power consumption status information of the first sub-area, and the power consumption status information is used to characterize the power consumption status of the first sub-area. In some examples, the value of the indicator field in the power consumption status information is 1, indicating that the first sub-area is in the first power consumption state, and the value of the indicator field in the power consumption status information is 0, indicating that the first sub-area is in the second power consumption state. The power consumption status information may also use other methods to characterize the power consumption status of the first sub-area, which is not limited here. The control unit may determine the power consumption status of the first sub-area based on the power consumption status information of the first sub-area stored therein.
[0144] In response to receiving the first instruction and the first sub-region being in the first power consumption state, the control unit sends a second instruction to the first sub-region to instruct the power consumption state of the first sub-region to be adjusted to the second power consumption state.
[0145] The first sub-region may adjust its power consumption state to the second power consumption state in response to the second instruction.
[0146] In this embodiment, the power consumption state of the first sub-area can be adjusted to the second power consumption state independently, and other sub-areas can continue to be in the first power consumption state, which can reduce the power consumption of the storage area as much as possible and improve the flexibility of power consumption management.
[0147] In some possible embodiments, the storage area further includes a second sub-area. The second sub-area is used to store data, and the identification information stored in the first sub-area is associated with the data stored in the second sub-area. The second sub-area may be a data storage sub-area.
[0148] In the case that the storage area includes a second sub-area, the first instruction may be used to request waking up the second sub-area.
[0149] Based on the target sub-area being in the first power consumption state, in response to the first instruction, a second instruction is sent to the target sub-area, including: based on the second sub-area being in the first power consumption state, in response to the target tag matching the identification information, a second instruction is sent to the second sub-area to instruct the power consumption state of the second sub-area to be adjusted to the second power consumption state.
[0150] The control unit may store power consumption status information of the second sub-area, and the power consumption status information is used to characterize the power consumption status of the second sub-area. In some examples, the value of the indicator field in the power consumption status information is 1, indicating that the second sub-area is in the first power consumption state, and the value of the indicator field in the power consumption status information is 0, indicating that the second sub-area is in the second power consumption state. The power consumption status information may also use other methods to characterize the power consumption status of the second sub-area, which is not limited here. The control unit may determine the power consumption status of the second sub-area based on the power consumption status information of the second sub-area stored therein.
[0151] The target tag is used to indicate the location of the data desired to be read or written in the second sub-area. In response to the target tag matching the identification information, data needs to be read from the location in the second sub-area associated with the identification information or data needs to be written to the location in the second sub-area associated with the identification information. At this time, the second sub-area needs to be woken up first so that the second sub-area is in the second power consumption state.
[0152] In response to the target tag matching the identification information and the second sub-area being in the first power consumption state, the control unit sends a second instruction to the second sub-area to instruct the power consumption state of the second sub-area to be adjusted to the second power consumption state.
[0153] The second sub-region may adjust its power consumption state to the second power consumption state in response to the second instruction.
[0154] In this embodiment, the power consumption state of the second sub-area can be adjusted to the second power consumption state alone, and other sub-areas can continue to be in the first power consumption state, which can reduce the power consumption of the storage area as much as possible and improve the flexibility of power consumption management.
[0155] In some possible embodiments, the storage area further includes a second sub-area, the second sub-area is used to store data, the second sub-area includes multiple storage units, the identification information stored in the first sub-area includes multiple tags, and the storage units correspond to the tags one-to-one.
[0156] In the case that the second sub-region of the storage region includes a plurality of storage units, the first instruction may be used to request waking up any one of the storage units, which is referred to as a target storage unit.
[0157] Based on the target sub-area being in the first power consumption state, in response to the first instruction, a second instruction is sent to the target sub-area, including: based on the target storage unit being in the first power consumption state, in response to the target tag matching the tag corresponding to the target storage unit, a second instruction is sent to the target storage unit to instruct the power consumption state of the target storage unit to be adjusted to the second power consumption state.
[0158] The control unit may store power consumption status information of the target storage unit, and the power consumption status information is used to characterize the power consumption status of the target storage unit. In some examples, the value of the indicator field in the power consumption status information is 1, indicating that the target storage unit is in a first power consumption state, and the value of the indicator field in the power consumption status information is 0, indicating that the target storage unit is in a second power consumption state. The power consumption status information may also use other methods to characterize the power consumption status of the target storage unit, which is not limited here. The control unit may determine the power consumption status of the target storage unit based on the power consumption status information of the target storage unit stored therein.
[0159] The target tag is used to indicate the location of the target storage unit where the data desired to be read or written is located. In response to the target tag matching the tag corresponding to the target storage unit, data needs to be read from the target storage unit or written to the target storage unit. At this time, the target storage unit needs to be awakened first so that the target storage unit is in the second power consumption state.
[0160] In response to the target tag matching the tag corresponding to the target storage unit and the target storage unit being in the first power consumption state, the control unit sends a second instruction to the target storage unit to instruct the power consumption state of the target storage unit to be adjusted to the second power consumption state.
[0161] The target storage unit may adjust its power consumption state to a second power consumption state in response to the second instruction.
[0162] In this embodiment, the power consumption state of the target storage unit can be adjusted to the second power consumption state separately, and other sub-areas or storage units can continue to be in the first power consumption state, which can reduce the power consumption of the storage area as much as possible and improve the flexibility of power consumption management.
[0163] In some possible embodiments, such as Figure 2 As shown in Figure 1, the cache includes an input queue and a control unit, as well as a command queue. The command queue manages the underlying operations (such as reads, writes, and flushes) that the cache controller needs to perform, maximizing cache bandwidth utilization through merging, reordering, or priority scheduling, allowing the processor to continue executing after issuing a request without waiting for the operation to complete.
[0164] like Figure 2 As shown, the power consumption management method shown in this embodiment includes:
[0165] S201 - S203 : In response to the power consumption state of the target sub-region or the target storage unit of the storage region being adjusted to the second power consumption state, the control unit sends a third instruction to the input queue and the command queue.
[0166] S202 and S203 are executed in no particular order.
[0167] The third instruction is used to notify the input queue and the command queue that the target sub-region or the target storage unit of the storage region is in the second power consumption state.
[0168] In some examples, the control unit adjusts the power consumption state of a target sub-region or a target storage unit of the storage area to a second power consumption state in response to the input queue and the command queue issuing a request to obtain the power consumption state of the target sub-region or the target storage unit. The input queue and the command queue can know through the third instruction that the target sub-region or the target storage unit of the storage area is in the second power consumption state.
[0169] In other examples, the control unit actively sends a third instruction to the input queue and the command queue in response to the power consumption state of the target sub-area or target storage unit of the storage area being adjusted to the second power consumption state, so that the input queue and the command queue can know through the third instruction that the target sub-area or target storage unit of the storage area is in the second power consumption state.
[0170] In this embodiment, the control unit sends the third instruction so that the input queue and the command queue can promptly know that the power consumption state of the target sub-region or target storage unit of the storage region has been adjusted to the second power consumption state.
[0171] In some possible embodiments, such as Figure 3 As shown, the power consumption management method shown in this embodiment includes:
[0172] S301-S302: In response to a continuous time period in which a target sub-region or a target storage unit of a storage region has not been accessed meeting a first threshold, the control unit sends a switching instruction to the target sub-region or the target storage unit of the storage region.
[0173] The switching instruction is used to instruct to switch the power consumption state of the target sub-region or the target storage unit of the storage region from the second power consumption state to the first power consumption state.
[0174] The first threshold value can be set based on actual needs and is not limited here. The continuous non-access duration refers to the duration during which no operation is performed in the target sub-region or target storage unit of the storage area. The continuous non-access duration meeting the first threshold value can be the continuous non-access duration reaching the first threshold value.
[0175] Before S301 , the power consumption management method may further include: based on the target sub-region or target storage unit of the storage region being accessed, setting the continuous time duration of non-access to 0.
[0176] The power consumption management method in this embodiment may further include: in response to the target sub-area or target storage unit of the storage area not being accessed continuously not satisfying a first threshold, the control unit increasing the continuous non-access duration by a first preset value. The first preset value may be the duration of a period during which the control unit detects whether the target sub-area or target storage unit of the storage area has not been accessed continuously.
[0177] In this embodiment, the power consumption state of a target sub-region or a target storage unit of a storage region that has not been accessed for a long time can be switched to the first power consumption state in a timely manner to reduce the power consumption of the storage region as much as possible.
[0178] In some possible embodiments, such as Figure 4As shown, the power consumption management method shown in this embodiment includes:
[0179] S401-S403, in response to the target sub-region or target storage unit of the storage region switching its power consumption state from the second power consumption state to the first power consumption state, the control unit sends a fourth instruction to the input queue and the command queue.
[0180] S402 and S403 are executed in no particular order.
[0181] The fourth instruction is used to notify the input queue and the command queue that the target sub-region or the target storage unit of the storage region is in the first power consumption state.
[0182] In some examples, the control unit switches the power consumption state of a target sub-area or a target storage unit of the storage area from the second power consumption state to the first power consumption state, and when the input queue and the command queue issue a request to obtain the power consumption state of the target sub-area or the target storage unit, the control unit sends a fourth instruction to the input queue and the command queue. The input queue and the command queue can know through the fourth instruction that the target sub-area or the target storage unit of the storage area is in the first power consumption state.
[0183] In other examples, the control unit actively sends a fourth instruction to the input queue and the command queue in response to the power consumption state of the target sub-area or target storage unit of the storage area switching from the second power consumption state to the first power consumption state, so that the input queue and the command queue can know through the fourth instruction that the target sub-area or target storage unit of the storage area is in the first power consumption state.
[0184] In this embodiment, the control unit sends the fourth instruction so that the input queue and the command queue can promptly know that the power consumption state of the target sub-region or target storage unit of the storage region has been adjusted to the first power consumption state.
[0185] In an exemplary embodiment, Figure 5 As shown, this embodiment shows a power consumption management method that can be applied to the cache of an electronic device. The electronic device can specifically be a smart device such as a mobile phone, tablet computer, notebook computer, smart robot, smart wearable device, etc. In addition, the electronic device is also provided with various hardware resources and an energy storage device that provides power for the operation of various hardware resources. The cache can be any cache of the electronic device, such as a first-level cache, a second-level cache, a third-level cache, etc.
[0186] Figure 5 The external device in this context can be any device that can read data from or write data to the cache. For example, the external device is a processor, which can be a central processing unit (CPU), graphics processing unit (GPU), neural network processor (NPU), data processor (DPU), tensor processor (TPU), or intelligent processor. The external device can also be the cache level above the cache.
[0187] like Figure 5 As shown, the power consumption management method shown in this embodiment includes:
[0188] S501: The external device sends a fifth instruction to an input queue.
[0189] The fifth instruction is used to instruct to read data from the storage area or write data to the storage area. The external device sends the fifth instruction to the input queue to indicate that the external device expects to read data from the storage area or write data to the storage area.
[0190] S502 - S503 : Based on the storage area being in the first power consumption state, the input queue sends the first instruction to the control unit in response to receiving the fifth instruction.
[0191] The first instruction is used to request the control unit to wake up the storage area, the storage area is in a first power consumption state, and data reading and data writing of the storage area are restricted.
[0192] The input queue may store power consumption status information of the storage area, and the power consumption status information of the storage area stored in the input queue may come from the control unit. The power consumption status information is used to characterize the power consumption status of the storage area. In some examples, the value of the indicator field in the power consumption status information is 1, indicating that the storage area is in a first power consumption state, and the value of the indicator field in the power consumption status information is 0, indicating that the storage area is in a second power consumption state. The power consumption status information may also use other methods to characterize the power consumption status of the storage area, which is not limited here. The input queue may determine the power consumption status of the storage area based on the power consumption status information of the storage area stored in it.
[0193] In response to receiving the fifth instruction, the input queue learns that the external device desires to read data from or write data to the storage area. At this time, if the storage area is in the first power consumption state, data cannot be read from or written to the storage area. The input queue needs to send a first instruction to the control unit to request the control unit to wake up the storage area.
[0194] In this embodiment, when data does not need to be read from or written to the storage area, the storage area may be in a first power consumption state to reduce power consumption of the storage area. When an external device needs to read data from or write data to the storage area, the input queue, based on the storage area being in the first power consumption state and receiving a fifth instruction from the external device, may send a first instruction to the control unit to request the control unit to wake up the storage area so as to perform a read operation or a write operation on the storage area.
[0195] In some possible embodiments, such as Figure 6As shown, the power consumption management method shown in this embodiment includes:
[0196] S601: The control unit sends a third instruction to an input queue.
[0197] The third instruction is sent by the control unit, and the third instruction is used to notify the input queue and the command queue that the target sub-area or target storage unit of the storage area is in the second power consumption state, and the target sub-area or target storage unit of the storage area is in the second power consumption state, and resume data reading and data writing of the target sub-area or target storage unit of the storage area.
[0198] The control unit sends a third instruction to the input queue to notify the input queue that the target sub-region or target storage unit of the storage region is in the second power consumption state and can perform read and write operations on the target sub-region or target storage unit of the storage region.
[0199] S602 - S603 : In response to receiving the third instruction, the input queue forwards the fifth instruction to the command queue.
[0200] When the input queue receives the third instruction and learns that read operations and write operations can be performed on the target sub-area or target storage unit of the storage area, it forwards the fifth instruction to the command queue. The command queue can execute the fifth instruction to enable the external device to read data from the target sub-area or target storage unit of the storage area or write data to the target sub-area or target storage unit of the storage area.
[0201] In this embodiment, when the input queue learns through the third instruction that it can perform read and write operations on the target sub-area or target storage unit of the storage area, it promptly forwards the fifth instruction from the external device to the command queue so that the command queue can execute the fifth instruction.
[0202] In some possible embodiments, such as Figure 7 As shown, the power consumption management method shown in this embodiment includes:
[0203] S701: The external device sends a fifth instruction to an input queue.
[0204] The fifth instruction is used to instruct to read data from the storage area or write data to the storage area. The external device sends the fifth instruction to the input queue to indicate that the external device expects to read data from the storage area or write data to the storage area.
[0205] S702 - S703 : Based on the storage area being in the second power consumption state, the input queue forwards the fifth instruction to the command queue in response to receiving the fifth instruction.
[0206] The storage area is in the second power consumption state, and data reading and data writing of the storage area are resumed.
[0207] The input queue may store power consumption status information of the storage area, and the power consumption status information of the storage area stored in the input queue may come from the control unit. The power consumption status information is used to characterize the power consumption status of the storage area. In some examples, the value of the indicator field in the power consumption status information is 1, indicating that the storage area is in a first power consumption state, and the value of the indicator field in the power consumption status information is 0, indicating that the storage area is in a second power consumption state. The power consumption status information may also use other methods to characterize the power consumption status of the storage area, which is not limited here. The input queue may determine the power consumption status of the storage area based on the power consumption status information of the storage area stored in it.
[0208] In response to receiving the fifth instruction, the input queue learns that the external device desires to read data from or write data to the storage area. At this point, if the storage area is in the second power consumption state, data can be read from or written to the storage area. The input queue promptly forwards the fifth instruction from the external device to the command queue so that the command queue can execute the fifth instruction.
[0209] In this embodiment, when the input queue learns that the read operation and the write operation can be performed on the storage area, the fifth instruction from the external device is forwarded to the command queue in a timely manner, so that the command queue can execute the fifth instruction.
[0210] In some possible embodiments, S502 - S503 include: based on receiving the fourth instruction, in response to receiving the fifth instruction, sending the first instruction.
[0211] The fourth instruction is sent by the control unit, and the fourth instruction is used to notify the input queue and the command queue that the target sub-area or the target storage unit of the storage area is in the first power consumption state.
[0212] The input queue learns through the fourth instruction sent by the control unit that the target sub-area or target storage unit of the storage area is in a power consumption state where data reading and data writing are stopped. In response to receiving the fifth instruction sent by the external device, the input queue learns that the external device expects to read data from the target sub-area or target storage unit of the storage area or write data to the target sub-area or target storage unit of the storage area. At this time, the input queue sends a first instruction to the control unit to request the control unit to wake up the target sub-area or target storage unit of the storage area.
[0213] In this embodiment, the input queue knows that the target sub-area or target storage unit of the storage area is in the first power consumption state based on the fourth instruction sent by the control unit. When the external device needs to read data from the target sub-area or target storage unit of the storage area or write data to the target sub-area or target storage unit of the storage area, it can send a first instruction to the control unit to request the control unit to wake up the target sub-area or target storage unit of the storage area.
[0214] In some possible embodiments, the storage area includes a first sub-area and a second sub-area, the first sub-area is used to store identification information, and the second sub-area is used to store data. The identification information stored in the first sub-area may be associated with the data stored in the second sub-area.
[0215] like Figure 8 As shown, the power consumption management method shown in this embodiment includes:
[0216] S801: The command queue sends the sixth instruction to the input queue.
[0217] The sixth instruction is sent by the command queue and is used to indicate that the second sub-area or a target storage unit in the second sub-area needs to be awakened.
[0218] The fifth instruction may include a target tag, which is used to indicate the location of the data expected to be read or written in the second sub-region or the location of the target storage unit where the data expected to be read or written is located. The command queue may compare the target tag with the identification information stored in the first sub-region. When the target tag matches the identification information stored in the first sub-region, it indicates that there is data in the second sub-region that the fifth instruction expects to read or write. At this time, it is necessary to read data from or write data to the second sub-region or the target storage unit in the second sub-region where the data is stored. When the second sub-region or the target storage unit in the second sub-region is in the first power consumption state, the command queue sends the sixth instruction to the input queue, indicating that the input queue needs to wake up the second sub-region or the target storage unit in the second sub-region.
[0219] The command queue may store power consumption status information of the second sub-region or the target storage unit in the second sub-region, and the power consumption status information of the second sub-region or the target storage unit in the second sub-region stored in the command queue may come from the control unit. The power consumption status information is used to characterize the power consumption status of the second sub-region or the target storage unit in the second sub-region. In some examples, the value of the indicator field in the power consumption status information is 1, indicating that the second sub-region or the target storage unit in the second sub-region is in the first power consumption state, and the value of the indicator field in the power consumption status information is 0, indicating that the second sub-region or the target storage unit in the second sub-region is in the second power consumption state. The power consumption status information may also characterize the power consumption status of the storage area in other ways, which are not limited here. The command queue may determine the power consumption status of the second sub-region or the target storage unit in the second sub-region based on the power consumption status information of the second sub-region or the target storage unit in the second sub-region stored therein.
[0220] S802 - S803 : Based on the first sub-region being in the second power consumption state, the input queue sends the first instruction to the control unit in response to receiving the sixth instruction.
[0221] The input queue may store power consumption status information of the first sub-area, and the power consumption status information of the first sub-area stored in the input queue may come from the control unit. The power consumption status information is used to characterize the power consumption status of the first sub-area. In some examples, the value of the indicator field in the power consumption status information is 1, indicating that the first sub-area is in the first power consumption state, and the value of the indicator field in the power consumption status information is 0, indicating that the first sub-area is in the second power consumption state. The power consumption status information may also be used to characterize the power consumption state of the storage area in other ways, which are not limited here. The input queue may determine the power consumption status of the first sub-area based on the power consumption status information of the first sub-area stored therein. When the first sub-area is in the second power consumption state, data reading and data writing of the first sub-area are restored. At this time, the identification information stored in the first sub-area may be read for comparison with the target tag to determine whether the identification information matches the target tag.
[0222] After receiving the sixth instruction, the input queue sends the first instruction to the control unit to request the control unit to wake up the second sub-area or the target storage unit in the second sub-area.
[0223] In this embodiment, the input queue responds to the instruction of the command queue and requests the control unit to wake up the second sub-area or the target storage unit in the second sub-area to resume data reading or data writing in the second sub-area or the target storage unit in the second sub-area.
[0224] In an exemplary embodiment, Figure 9As shown, this embodiment shows a power consumption management method that can be applied to the cache of an electronic device. The electronic device can specifically be a smart device such as a mobile phone, tablet computer, notebook computer, smart robot, smart wearable device, etc. In addition, the electronic device is also provided with various hardware resources and an energy storage device that provides power for the operation of various hardware resources. The cache can be any cache of the electronic device, such as a first-level cache, a second-level cache, a third-level cache, etc.
[0225] like Figure 9 As shown, the power consumption management method shown in this embodiment includes:
[0226] S901: The input queue sends the fifth instruction to the command queue.
[0227] The fifth instruction is sent by the input queue, and is used to instruct to read data from the storage area or write data to the storage area. The fifth instruction may be sent by an external device to the input queue, and the input queue forwards the fifth instruction to the command queue.
[0228] The fifth instruction may include a target tag, which indicates the location of the data to be read or written in the target sub-region of the storage area. The command queue may compare the target tag with the identification information stored in the storage area. If the target tag matches the identification information, the storage area contains the data to be read or written by the fifth instruction. The sub-region storing the data is called the target sub-region. In this case, data needs to be read from or written to the target sub-region.
[0229] S902 - S903 : Based on the target sub-region of the storage region being in the first power consumption state, the command queue sends a sixth instruction to the input queue in response to receiving the fifth instruction.
[0230] The sixth instruction is used to indicate that the target sub-region needs to be woken up.
[0231] The command queue may store power consumption status information of the target sub-area, and the power consumption status information of the target sub-area stored in the command queue may come from the control unit. The power consumption status information is used to characterize the power consumption status of the target sub-area. In some examples, the value of the indicator field in the power consumption status information is 1, indicating that the target sub-area is in a first power consumption state, and the value of the indicator field in the power consumption status information is 0, indicating that the target sub-area is in a second power consumption state. The power consumption status information may also characterize the power consumption status of the target sub-area in other ways, which are not limited here. The command queue may determine the power consumption status of the target sub-area based on the power consumption status information of the target sub-area stored therein.
[0232] The target sub-region is in a first power consumption state, and data reading and data writing in the target sub-region are restricted.
[0233] When the target sub-area is in the first power consumption state, in response to receiving the fifth instruction and needing to read data from or write data to the target sub-area, the command queue sends a sixth instruction to the input queue, indicating that the input queue needs to wake up the target sub-area.
[0234] The command queue can send the fifth instruction back to the input queue while sending the sixth instruction to the input queue to prevent the fifth instruction from occupying the command queue. The input queue can send the fifth instruction to the command queue again for processing after the target sub-region is awakened.
[0235] In this embodiment, when the command queue receives an instruction to read data from or write data to a storage area, and the target sub-area is in a power consumption state that limits data reading and data writing, an instruction requesting to wake up the target sub-area is sent to the input queue to resume data reading or data writing in the target sub-area.
[0236] In some possible embodiments, the storage area includes a first sub-area and a second sub-area, the first sub-area is used to store identification information, the identification information includes multiple tags, the second sub-area is used to store data, the second sub-area includes multiple storage units, the storage units correspond one-to-one to the tags, and the fifth instruction includes a target tag, the target tag is used to indicate the location of the data to be read or written in the second sub-area or the location of the target storage unit where the data to be read or written is located.
[0237] S902-S903, including:
[0238] Based on the first sub-region being in the second power consumption state and the second sub-region or the target memory unit being in the first power consumption state, in response to the target tag matching the tag corresponding to the target memory unit, sending a sixth instruction.
[0239] The sixth instruction is used to indicate that the second sub-region or the target storage unit needs to be awakened, the first sub-region is in the second power consumption state, and data reading and data writing of the first sub-region are resumed.
[0240] The input queue may store power consumption state information of the first sub-region, and the input queue may determine the power consumption state of the first sub-region based on the power consumption state information of the first sub-region stored therein. When the first sub-region is in the second power consumption state, the tag stored in the first sub-region may be read for comparison with the target tag to determine whether there is a tag that matches the target tag. The storage unit that matches the target tag is called the target storage unit, which stores the data that the fifth instruction intends to read or write.
[0241] The input queue may store power consumption status information of the second sub-region or target storage unit, and the input queue may determine the power consumption status of the second sub-region or target storage unit based on the power consumption status information of the second sub-region or target storage unit stored therein. When the second sub-region or target storage unit is in the first power consumption state, data reading and data writing to the second sub-region or target storage unit are restricted. At this time, the command queue sends a sixth instruction to the input queue, indicating that the input queue needs to wake up the second sub-region or target storage unit.
[0242] In this embodiment, when data needs to be read from or written to the second sub-region or target storage unit, and the second sub-region or target storage unit is in a power consumption state that limits data reading and writing, the command queue sends a command requesting the second sub-region or target storage unit to the input queue to wake up the second sub-region or target storage unit, thereby resuming data reading or writing in the second sub-region or target storage unit. Furthermore, power consumption management can be performed for the entire second sub-region or for each storage unit individually, providing great flexibility in power consumption management.
[0243] In some possible embodiments, the power consumption management method includes: based on the first sub-area and the second sub-area being in the second power consumption state, or based on the first sub-area and the target storage unit being in the second power consumption state, in response to receiving a fifth instruction, performing a data reading or data writing operation on the second sub-area or the target storage unit.
[0244] When the first sub-area is in the second power consumption state, the tags stored in the first sub-area may be read for comparison with the target tags to determine whether there is a tag that matches the target tag.
[0245] When the second sub-region is in the second power consumption state, a read operation or a write operation can be performed on the second sub-region. At this time, the fifth instruction is executed to perform a data read operation or a data write operation on the second sub-region.
[0246] When the target storage unit is in the second power consumption state, a read operation or a write operation can be performed on the target storage unit. At this time, the fifth instruction is executed to perform a data read operation or a data write operation on the target storage unit.
[0247] In this embodiment, when the second sub-region or the target memory cell is in the second power consumption state, a data read or data write operation expected by the external device is performed on the second sub-region or the target memory cell.
[0248] In some possible embodiments, the method for managing power consumption further includes: in response to receiving the fifth instruction and the target tag not matching any tag, performing a data reading or data writing operation on a preset memory.
[0249] When the target tag in the fifth instruction does not match any tag stored in the storage area, it means that the storage area does not store the data that the fifth instruction expects to read or write. At this time, a data read or data write operation is performed on the preset memory.
[0250] The preset memory may be a cache memory of a lower level than the cache memory to which the storage unit in this embodiment belongs, or a memory of the electronic device. The access speed of the preset memory may be slower than the access speed of the cache memory to which the storage unit in this embodiment belongs.
[0251] In this embodiment, when the cache to which the storage unit belongs does not contain the data that the fifth instruction expects to read or write, a data read or data write operation is performed on the preset memory to read the required data or write the data into the preset memory.
[0252] In some possible embodiments, the power consumption management method further includes: receiving a third instruction, which is sent by the control unit, and the third instruction is used to notify the input queue and the command queue that the target sub-area or target storage unit of the storage area is in the second power consumption state; or, receiving a fourth instruction, which is sent by the control unit, and the fourth instruction is used to notify the input queue and the command queue that the target sub-area or target storage unit of the storage area is in the first power consumption state.
[0253] In this embodiment, the command queue can promptly learn the power consumption status of the target sub-region or the target storage unit according to the instruction sent by the control unit.
[0254] In some possible embodiments, the power consumption management method further includes: sending a seventh instruction to the control unit based on the first sub-area being in the second power consumption state and the second sub-area or the target storage unit being in the first power consumption state.
[0255] The seventh instruction is used to indicate that the second sub-region or the target storage unit needs to be awakened.
[0256] In this embodiment, when it is necessary to wake up the second sub-area or the target storage unit, the command queue does not send the sixth instruction to the input queue, instructing the input queue to request the control unit to wake up the second sub-area or the target storage unit, but directly sends the seventh instruction to the control unit, requesting the control unit to wake up the second sub-area or the target storage unit.
[0257] In this embodiment, the command queue directly requests the control unit to wake up the second sub-area or the target storage unit, thereby reducing the logic complexity of power consumption control.
[0258] In an exemplary embodiment, a power consumption management method is described that can be applied to a cache in an electronic device. Specifically, the electronic device can be a smart device such as a mobile phone, tablet computer, laptop, smart robot, or smart wearable device. Furthermore, the electronic device is provided with various hardware resources and an energy storage device that provides power for the operation of the various hardware resources. The cache can be any cache in the electronic device, such as a level 1 cache, a level 2 cache, or a level 3 cache.
[0259] like Figure 10 As shown, the power consumption management method shown in this embodiment includes:
[0260] S1001: The external device sends a fifth instruction to an input queue.
[0261] S1002 - S1003 : Based on the first sub-region being in the first power consumption state, the input queue sends a first instruction to the control unit in response to receiving a fifth instruction.
[0262] S1004 - S1005 : Based on the first sub-region being in the first power consumption state, the control unit sends a second instruction to the first sub-region in response to the first instruction.
[0263] S1006-S1008: In response to the power consumption state of the first sub-region being adjusted to the second power consumption state, the control unit sends a third instruction to the input queue and the command queue. S1007 and S1008 are executed in no particular order.
[0264] S1009 - S1010 , in response to receiving the third instruction, the input queue forwards the fifth instruction to the command queue.
[0265] S1011 - S1012 : The command queue reads identification information stored in the first sub-region based on the first sub-region being in the second power consumption state.
[0266] S1013 - S1014 : In response to the target tag not matching the tag in the identification information, the command queue performs a data read or data write operation on the preset memory.
[0267] S1015 - S1016 , based on the target storage unit being in the first power consumption state and in response to the target tag matching the tag corresponding to the target storage unit, the command queue sends a sixth instruction to the input queue.
[0268] S1017 - S1018 : Based on the first sub-region being in the second power consumption state, the input queue sends the first instruction to the control unit in response to receiving the sixth instruction.
[0269] S1019-S1020. Based on the target storage unit being in the first power consumption state, the control unit sends a second instruction to the target storage unit in response to the target tag matching the tag corresponding to the target storage unit.
[0270] S1021-S1023: In response to the target storage unit adjusting its power consumption state to the second power consumption state, the control unit sends a third instruction to the input queue and the command queue. S1022 and S1023 are executed in no particular order.
[0271] S1024 - S1025 , in response to the target storage unit adjusting its power consumption state to the second power consumption state, the input queue forwards the fifth instruction to the command queue.
[0272] S1026 - S1027 : Based on the fact that both the first sub-region and the target storage unit are in the second power consumption state, the command queue performs a data read or data write operation on the target storage unit in response to receiving the fifth instruction.
[0273] In this embodiment, the first sub-region and the target storage unit can be awakened respectively during different stages of executing the fifth instruction, thereby improving the flexibility of power consumption management.
[0274] In an exemplary embodiment, a power consumption management method is described that can be applied to a cache in an electronic device. Specifically, the electronic device can be a smart device such as a mobile phone, tablet computer, laptop, smart robot, or smart wearable device. Furthermore, the electronic device is provided with various hardware resources and an energy storage device that provides power for the operation of the various hardware resources. The cache can be any cache in the electronic device, such as a level 1 cache, a level 2 cache, or a level 3 cache.
[0275] like Figure 11 As shown, the power consumption management method shown in this embodiment includes:
[0276] S1101 - S1102 : In response to a continuous time period in which a target sub-region or a target storage unit of a storage region has not been accessed meeting a first threshold, the control unit sends a switching instruction to the target sub-region or the target storage unit of the storage region.
[0277] S1103 - S1105 , in response to the target sub-region or target storage unit of the storage region switching its power consumption state from the second power consumption state to the first power consumption state, the control unit sends a fourth instruction to the input queue and the command queue.
[0278] In this embodiment, the power consumption state of a target sub-region or a target storage unit of a storage region that has not been accessed for a long time can be switched to the first power consumption state in a timely manner to reduce the power consumption of the storage region as much as possible.
[0279] Figure 12The figure is a block diagram showing a power consumption management device according to an exemplary embodiment. Figure 12 The power consumption management device includes a cache 121 , an external device 122 , and a preset memory 123 . The cache 121 includes an input queue 1211 , a command queue 1212 , a control unit 1213 , and a storage area 1214 . Figure 12 The cache 121, external device 122, preset memory 123, input queue 1211, command queue 1212, control unit 1213 and storage area 1214 are the cache, external device, preset memory, input queue, command queue, control unit and storage area in the above method embodiment.
[0280] In an exemplary embodiment, a power consumption management device is shown, comprising: Figure 12 The control unit 1213 and storage area 1214 in the embodiment of the present invention are configured to send a second instruction to the storage area 1214 in response to the first instruction and the storage area 1214 being in the first power consumption state. The first instruction is used to request that the storage area 1214 be awakened, and the second instruction is used to instruct the storage area 1214 to adjust its power consumption state to the second power consumption state. When the storage area 1214 is in the first power consumption state, data reading and data writing to the storage area 1214 are restricted, and when the storage area 1214 is in the second power consumption state, data reading and data writing to the storage area 1214 are resumed.
[0281] In this embodiment, when data does not need to be read from or written to the storage area, the storage area can be in the first power consumption state to reduce the power consumption of the storage area. When data needs to be read from or written to the storage area, the power consumption state of the storage area can be adjusted to the second power consumption state so that read and write operations can be performed normally on the storage area.
[0282] In some possible embodiments, the storage area 1214 includes multiple sub-areas, and the second instruction is associated with one or more target sub-areas among the multiple sub-areas.
[0283] The control unit 1213 is further configured to send a second instruction to the target sub-area in response to the first instruction based on the target sub-area being in the first power consumption state, to instruct the target sub-area to adjust its power consumption state to the second power consumption state.
[0284] In some possible embodiments, the storage area 1214 includes a first sub-area. The first sub-area is used to store identification information.
[0285] The control unit 1213 is further configured to send a second instruction to the first sub-region in response to the first instruction based on the first sub-region being in the first power consumption state, to instruct the first sub-region to adjust the power consumption state to the second power consumption state.
[0286] In some possible embodiments, the storage area 1214 further includes a second sub-area. The second sub-area is used to store data, and the identification information is associated with the data stored in the second sub-area.
[0287] The control unit 1213 is further configured to send a second instruction to the second sub-area based on the second sub-area being in the first power consumption state and in response to the target tag matching the identification information, to instruct the second sub-area to adjust the power consumption state of the second sub-area to the second power consumption state.
[0288] The target tag is used to indicate the location of data desired to be read or written in the second sub-area.
[0289] In some possible embodiments, the storage area 1214 further includes a second sub-area. The second sub-area is used to store data, the second sub-area includes a plurality of storage units, the identification information includes a plurality of tags, and the storage units correspond to the tags one-to-one.
[0290] The control unit 1213 is also configured to send a second instruction to the target storage unit to instruct the power consumption state of the target storage unit to be adjusted to the second power consumption state in response to the target tag matching the tag corresponding to the target storage unit based on the target storage unit being in the first power consumption state.
[0291] The target tag is used to indicate the location of the target storage unit where the data desired to be read or written is located.
[0292] In some possible embodiments, the power consumption management device further includes: Figure 12 The control unit 1213 is further configured to send a third instruction in response to the power consumption state of the target sub-region or target storage unit of the storage region 1214 being adjusted to the second power consumption state.
[0293] The third instruction is used to notify the input queue 1211 and the command queue 1212 that the target sub-region or the target storage unit of the storage region 1214 is in the second power consumption state.
[0294] In some possible embodiments, the control unit 1213 is further configured to send a switching instruction in response to a continuous time period during which the target sub-area or target storage unit of the storage area 1214 has not been accessed meeting a first threshold.
[0295] The switching instruction is used to instruct to switch the power consumption state of the target sub-region or the target storage unit of the storage region 1214 from the second power consumption state to the first power consumption state.
[0296] In some possible embodiments, the control unit 1213 is further configured to send a fourth instruction in response to the power consumption state of the target sub-region or target storage unit of the storage region 1214 being switched from the second power consumption state to the first power consumption state.
[0297] The fourth instruction is used to notify the input queue 1211 and the command queue 1212 that the target sub-region or the target storage unit of the storage region 1214 is in the first power consumption state.
[0298] In an exemplary embodiment, a power consumption management device is shown, comprising: Figure 12 Input queue 1211, control unit 1213, and storage area 1214 are included. Input queue 1211 is configured to send a first instruction in response to receiving a fifth instruction based on storage area 1214 being in a first power consumption state. The fifth instruction is used to instruct to read data from or write data to storage area 1214. The first instruction is used to request control unit 1213 to wake up storage area 1214. Storage area 1214 is in the first power consumption state, and data reading and writing of storage area 1214 are restricted.
[0299] In this embodiment, when data does not need to be read from or written to the storage area, the storage area may be in the first power consumption state to reduce power consumption of the storage area. When data needs to be read from or written to the storage area, based on the storage area being in the first power consumption state and receiving the fifth instruction, a first instruction may be sent to the control unit to request the control unit to wake up the storage area so as to perform read operations and write operations on the storage area.
[0300] In some possible embodiments, the power consumption management device further includes: Figure 12 The input queue 1211 is further configured to forward a fifth instruction to the command queue 1212 in response to receiving the third instruction.
[0301] The third instruction is sent by the control unit 1213, and the third instruction is used to notify the input queue 1211 and the command queue 1212 that the target sub-area or target storage unit of the storage area 1214 is in the second power consumption state, and the target sub-area or target storage unit of the storage area 1214 is in the second power consumption state, and the data reading and data writing of the target sub-area or target storage unit of the storage area 1214 are resumed.
[0302] In some possible embodiments, the input queue 1211 is further configured to forward the fifth instruction to the command queue 1212 in response to receiving the fifth instruction based on the storage area 1214 being in the second power consumption state.
[0303] The storage area 1214 is in the second power consumption state, and data reading and data writing in the storage area 1214 are resumed.
[0304] In some possible embodiments, the input queue 1211 is further configured to send the first instruction in response to receiving the fifth instruction based on receiving the fourth instruction.
[0305] The fourth instruction is sent by the control unit 1213 , and is used to notify the input queue 1211 and the command queue 1212 that the target sub-region or target storage unit of the storage region 1214 is in the first power consumption state.
[0306] In some possible embodiments, the storage area 1214 includes a first sub-area and a second sub-area, wherein the first sub-area is used to store identification information, and the second sub-area is used to store data.
[0307] The input queue 1211 is further configured to send the first instruction to the control unit in response to receiving the sixth instruction based on the first sub-region being in the second power consumption state.
[0308] The first sub-region is in the second power consumption state, and data reading and data writing of the first sub-region are resumed. The sixth instruction is sent by the command queue 1212 to indicate that the second sub-region or the target storage unit in the second sub-region needs to be awakened.
[0309] In an exemplary embodiment, a power consumption management device is shown, comprising: Figure 12 Input queue 1211, command queue 1212, and storage area 1214 are included. Command queue 1212 is configured to send a sixth instruction to input queue 1211 in response to receiving the fifth instruction based on the target sub-area of storage area 1214 being in the first power consumption state. The fifth instruction is sent by input queue 1211 and is used to instruct data to be read from or written to storage area 1214. The sixth instruction is used to indicate that the target sub-area needs to be awakened, and the target sub-area is in the first power consumption state, and data reading and data writing to the target sub-area are restricted.
[0310] In this embodiment, when an instruction to read data from a storage area or write data to a storage area is received, when the target sub-area is in a power consumption state that limits data reading and data writing, an instruction requesting to wake up the target sub-area is sent to the input queue to resume data reading or data writing in the target sub-area.
[0311] In some possible embodiments, the storage area 1214 includes a first sub-area and a second sub-area. The first sub-area is used to store identification information, the identification information including multiple tags, the second sub-area is used to store data, the second sub-area includes multiple storage cells, and the storage cells correspond one to one with the tags. The fifth instruction includes a target tag, which is used to indicate the location of the data to be read or written in the second sub-area or the location of the target storage cell where the data to be read or written is located.
[0312] The command queue 1212 is further configured to send a sixth instruction in response to the target tag matching the tag corresponding to the target storage unit, based on the first sub-region being in the second power consumption state and the second sub-region or the target storage unit being in the first power consumption state.
[0313] The sixth instruction is used to indicate that the second sub-region or the target storage unit needs to be awakened, the first sub-region is in the second power consumption state, and data reading and data writing of the first sub-region are resumed.
[0314] In some possible embodiments, the command queue 1212 is also configured to perform a data read or data write operation on the second sub-area or the target storage unit in response to receiving a fifth instruction based on the first sub-area and the second sub-area being in the second power consumption state, or based on the first sub-area and the target storage unit being in the second power consumption state.
[0315] In some possible embodiments, the power consumption management device further includes: Figure 12 The command queue 1212 is further configured to, in response to receiving the fifth instruction and the target tag not matching any tag, perform a data read or data write operation on the preset memory 123.
[0316] In some possible embodiments, the power consumption management device further includes: Figure 12 The control unit 1213 in the command queue 1212 is further configured to receive the third instruction or receive the fourth instruction.
[0317] The third instruction is sent by the control unit 1213 , and is used to notify the input queue 1211 and the command queue 1212 that the target sub-region or target storage unit of the storage region 1214 is in the second power consumption state.
[0318] The fourth instruction is sent by the control unit 1213 , and is used to notify the input queue 1211 and the command queue 1212 that the target sub-region or target storage unit of the storage region 1214 is in the first power consumption state.
[0319] In some possible embodiments, the command queue 1212 is further configured to send a seventh instruction to the control unit 1213 based on the first sub-area being in the second power consumption state and the second sub-area or the target storage unit being in the first power consumption state.
[0320] The seventh instruction is used to indicate that the second sub-region or the target storage unit needs to be awakened.
[0321] Figure 13 is a block diagram of an electronic device 1300 according to an exemplary embodiment.
[0322] Reference Figure 13 , the electronic device 1300 may include one or more of the following components: a processing component 1302 , a memory 1304 , a power component 1306 , a multimedia component 1308 , an audio component 1310 , an input / output (I / O) interface 1312 , a sensor component 1314 , and a communication component 1316 .
[0323] The processing component 1302 generally controls the overall operation of the electronic device 1300, such as operations associated with display, phone calls, data communications, camera operation, and recording operations. The processing component 1302 may include one or more processors 1320 to execute instructions to perform all or part of the steps of the above-described method for managing power consumption. In addition, the processing component 1302 may include one or more modules to facilitate interaction between the processing component 1302 and other components. For example, the processing component 1302 may include a multimedia module to facilitate interaction between the multimedia component 1308 and the processing component 1302.
[0324] The memory 1304 is configured to store various types of data to support operations on the electronic device 1300. Examples of such data include instructions for any application or method operating on the electronic device 1300, contact data, phone book data, messages, pictures, videos, etc. The memory 1304 can be implemented by any type of volatile or non-volatile storage device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk.
[0325] The power supply component 1306 provides power to the various components of the electronic device 1300. The power supply component 1306 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 1300.
[0326] The multimedia component 1308 includes a screen that provides an output interface between the electronic device 1300 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, slides, and gestures on the touch panel. The touch sensor can not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 1308 includes a front camera and / or a rear camera. When the electronic device 1300 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have a focal length and optical zoom capability.
[0327] The audio component 1310 is configured to output and / or input audio signals. For example, the audio component 1310 includes a microphone (MIC), which is configured to receive external audio signals when the electronic device 1300 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal can be further stored in the memory 1304 or transmitted via the communication component 1316. In some embodiments, the audio component 1310 also includes a speaker for outputting audio signals.
[0328] I / O interface 1312 provides an interface between processing component 1302 and peripheral interface modules, such as a keyboard, click wheel, buttons, etc. These buttons may include, but are not limited to, a home button, volume buttons, a start button, and a lock button.
[0329] Sensor assembly 1314 includes one or more sensors for providing various aspects of the status assessment of electronic device 1300. For example, sensor assembly 1314 can detect the open / closed state of electronic device 1300, the relative positioning of components, such as the display and keypad of electronic device 1300. Sensor assembly 1314 can also detect changes in the position of electronic device 1300 or a component of electronic device 1300, the presence or absence of user contact with electronic device 1300, the orientation or acceleration / deceleration of electronic device 1300, and changes in the temperature of electronic device 1300. Sensor assembly 1314 can include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 1314 can also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 1314 can also include an accelerometer, a gyroscope, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0330] The communication component 1316 is configured to facilitate wired or wireless communication between the electronic device 1300 and other devices. The electronic device 1300 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 1316 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 1316 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0331] In an exemplary embodiment, the electronic device 1300 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above-mentioned power consumption management method.
[0332] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 1304 including instructions, and the instructions can be executed by the processor 1320 of the electronic device 1300 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0333] A non-transitory computer-readable storage medium, when instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to execute the power consumption management method provided by an embodiment of the present disclosure.
[0334] A computer program product includes computer instructions stored in a computer-readable storage medium; a processor of an electronic device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the electronic device executes the power consumption management method provided in an embodiment of the present disclosure.
[0335] A chip includes a processor and an input / output interface, wherein the input / output interface is used to receive signals from other devices outside the chip and transmit them to the processor or send signals from the processor to other devices outside the chip, and the processor implements the power consumption management method provided by the embodiments of the present disclosure through logic circuits or executing code instructions.
[0336] Other embodiments of the present disclosure will readily occur to those skilled in the art after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, with the true scope and spirit of the present disclosure being indicated by the following claims.
[0337] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes can be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A method for managing power consumption, characterized in that: include: In response to the first instruction and the storage area being in the first power consumption state, sending a second instruction to the storage area; The first instruction is used to request waking up the storage area, and the second instruction is used to instruct to adjust the power consumption state of the storage area to a second power consumption state; when the storage area is in the first power consumption state, data reading and data writing of the storage area are restricted, and when the storage area is in the second power consumption state, data reading and data writing of the storage area are restored.
2. The power consumption management method according to claim 1, characterized in that: The storage area includes a plurality of sub-areas, and the second instruction is associated with one or more target sub-areas among the plurality of sub-areas; In response to the first instruction and the storage area being in the first power consumption state, sending the second instruction to the storage area includes: Based on the target sub-region being in the first power consumption state, in response to the first instruction, the second instruction is sent to the target sub-region to instruct the power consumption state of the target sub-region to be adjusted to the second power consumption state.
3. The method for managing power consumption according to claim 2, wherein: The storage area includes a first sub-area; wherein the first sub-area is used to store identification information; The sending the second instruction to the target sub-area in response to the first instruction based on the target sub-area being in the first power consumption state includes: Based on the first sub-region being in the first power consumption state, in response to the first instruction, the second instruction is sent to the first sub-region to instruct the power consumption state of the first sub-region to be adjusted to the second power consumption state.
4. The method for managing power consumption according to claim 3, wherein: The storage area further includes a second sub-area; wherein the second sub-area is used to store data, and the identification information is associated with the data stored in the second sub-area; The sending the second instruction to the target sub-area in response to the first instruction based on the target sub-area being in the first power consumption state includes: Based on the second sub-area being in the first power consumption state, in response to the target tag matching the identification information, sending the second instruction to the second sub-area to instruct the power consumption state of the second sub-area to be adjusted to the second power consumption state; The target tag is used to indicate the location of the data desired to be read or written in the second sub-area.
5. The method for managing power consumption according to claim 3, wherein: The storage area further includes a second sub-area; wherein the second sub-area is used to store data, the second sub-area includes a plurality of storage units, the identification information includes a plurality of tags, and the storage units correspond to the tags one by one; The sending the second instruction to the target sub-area in response to the first instruction based on the target sub-area being in the first power consumption state includes: Based on the target storage unit being in the first power consumption state, in response to the target tag matching the tag corresponding to the target storage unit, sending the second instruction to the target storage unit to instruct the power consumption state of the target storage unit to be adjusted to the second power consumption state; The target tag is used to indicate the location of the target storage unit where the data desired to be read or written is located.
6. The method for managing power consumption according to any one of claims 1 to 5, characterized in that: The power consumption management method further includes: sending a third instruction in response to the power consumption state of the target sub-region or the target storage unit of the storage region being adjusted to the second power consumption state; The third instruction is used to notify the input queue and the command queue that the target sub-area or target storage unit of the storage area is in the second power consumption state.
7. The method for managing power consumption according to claim 1, wherein: The power consumption management method further includes: sending a switching instruction in response to a continuous time period during which a target sub-area or a target storage unit of the storage area has not been accessed meeting a first threshold; The switching instruction is used to instruct to switch the power consumption state of the target sub-region or the target storage unit of the storage region from the second power consumption state to the first power consumption state.
8. The method for managing power consumption according to claim 7, wherein: The power consumption management method further includes: sending a fourth instruction in response to the power consumption state of the target sub-region or the target storage unit of the storage region being switched from the second power consumption state to the first power consumption state; The fourth instruction is used to notify the input queue and the command queue that the target sub-area or target storage unit of the storage area is in the first power consumption state.
9. A method for managing power consumption, characterized in that: include: Based on the storage area being in the first power consumption state, in response to receiving the fifth instruction, sending the first instruction; Among them, the fifth instruction is used to instruct to read data from the storage area or write data to the storage area, the first instruction is used to request the control unit to wake up the storage area, the storage area is in the first power consumption state, and data reading and data writing of the storage area are restricted.
10. The method for managing power consumption according to claim 9, wherein: The power consumption management method further includes: In response to receiving the third instruction, forwarding the fifth instruction to the command queue; Among them, the third instruction is sent by the control unit, and the third instruction is used to notify the input queue and the command queue that the target sub-area or target storage unit of the storage area is in the second power consumption state, and the target sub-area or target storage unit of the storage area is in the second power consumption state, and resume data reading and data writing of the target sub-area or target storage unit of the storage area.
11. The method for managing power consumption according to claim 9, wherein: The power consumption management method further includes: forwarding the fifth instruction to a command queue in response to receiving the fifth instruction based on the storage area being in the second power consumption state; When the storage area is in the second power consumption state, data reading and data writing of the storage area are resumed.
12. The method for managing power consumption according to claim 9, wherein: The sending of the first instruction in response to receiving the fifth instruction based on the storage area being in the first power consumption state includes: Based on receiving the fourth instruction, in response to receiving the fifth instruction, sending the first instruction; The fourth instruction is sent by the control unit, and is used to notify the input queue and the command queue that the target sub-area or target storage unit of the storage area is in the first power consumption state.
13. The method for managing power consumption according to claim 9, wherein: The storage area includes a first sub-area and a second sub-area, the first sub-area is used to store identification information, and the second sub-area is used to store data. The power consumption management method further includes: Based on the first sub-region being in the second power consumption state, in response to receiving a sixth instruction, sending the first instruction to the control unit; The first sub-area is in the second power consumption state, and data reading and data writing of the first sub-area are restored. The sixth instruction is sent by the command queue to indicate that the second sub-area or the target storage unit in the second sub-area needs to be awakened.
14. A method for managing power consumption, characterized in that: include: sending a sixth instruction to the input queue in response to receiving the fifth instruction based on the target sub-region of the storage region being in the first power consumption state; Among them, the fifth instruction is sent by the input queue, the fifth instruction is used to instruct to read data from the storage area or write data to the storage area, and the sixth instruction is used to indicate that the target sub-area needs to be awakened, and the target sub-area is in the first power consumption state, limiting data reading and data writing of the target sub-area.
15. The method for managing power consumption according to claim 14, wherein: The storage area includes a first sub-area and a second sub-area, the first sub-area is used to store identification information, the identification information includes a plurality of tags, the second sub-area is used to store data, the second sub-area includes a plurality of storage cells, the storage cells correspond one-to-one to the tags, the fifth instruction includes a target tag, the target tag is used to indicate a location of data to be read or written in the second sub-area or a location of a target storage cell where the data to be read or written is located; The method of sending a sixth instruction to an input queue in response to receiving a fifth instruction based on the target sub-region of the storage region being in a first power consumption state comprises: sending the sixth instruction in response to the target tag matching the tag corresponding to the target storage unit, based on the first sub-area being in the second power consumption state and the second sub-area or the target storage unit being in the first power consumption state; The sixth instruction is used to indicate that the second sub-area or the target storage unit needs to be awakened, and the first sub-area is in the second power consumption state, and data reading and data writing of the first sub-area are resumed.
16. The method for managing power consumption according to claim 15, wherein: The power consumption management method further includes: Based on the fact that both the first sub-area and the second sub-area are in the second power consumption state, or based on the fact that both the first sub-area and the target storage unit are in the second power consumption state, in response to receiving the fifth instruction, a data read or data write operation is performed on the second sub-area or the target storage unit.
17. The method for managing power consumption according to claim 15, wherein: The power consumption management method further includes: In response to receiving the fifth instruction and the target tag not matching any of the tags, performing a data read or data write operation on a preset memory.
18. The method for managing power consumption according to claim 15, wherein: The power consumption management method further includes: receiving a third instruction, where the third instruction is sent by the control unit and is used to notify the input queue and the command queue that the target sub-region or the target storage unit of the storage region is in the second power consumption state; or, A fourth instruction is received, where the fourth instruction is sent by the control unit, and the fourth instruction is used to notify the input queue and the command queue that the target sub-area or target storage unit of the storage area is in the first power consumption state.
19. The method for managing power consumption according to claim 15, wherein: The power consumption management method further includes: sending a seventh instruction to a control unit based on that the first sub-area is in the second power consumption state and the second sub-area or the target storage unit is in the first power consumption state; The seventh instruction is used to indicate that the second sub-area or the target storage unit needs to be awakened.
20. A power consumption management device, characterized in that: include: a control unit configured to send a second instruction to the storage area in response to the first instruction and the storage area being in the first power consumption state; The first instruction is used to request waking up the storage area, and the second instruction is used to instruct the power consumption state of the storage area to be adjusted to a second power consumption state; when the storage area is in the first power consumption state, data reading and data writing of the storage area are restricted, and when the storage area is in the second power consumption state, data reading and data writing of the storage area are restored.
21. A power consumption management device, characterized in that: include: an input queue configured to send the first instruction in response to receiving the fifth instruction based on the memory region being in the first power consumption state; Among them, the fifth instruction is used to instruct to read data from the storage area or write data to the storage area, the first instruction is used to request the control unit to wake up the storage area, the storage area is in the first power consumption state, and data reading and data writing of the storage area are restricted.
22. A power consumption management device, characterized in that: include: a command queue configured to send a sixth instruction to the input queue in response to receiving the fifth instruction based on the target sub-region of the storage region being in the first power consumption state; Among them, the fifth instruction is sent by the input queue, the fifth instruction is used to instruct to read data from the storage area or write data to the storage area, and the sixth instruction is used to indicate that the target sub-area needs to be awakened, and the target sub-area is in the first power consumption state, limiting data reading and data writing of the target sub-area.
23. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to execute the power consumption management method according to any one of claims 1 to 8, or the power consumption management method according to any one of claims 9 to 13, or the power consumption management method according to any one of claims 14 to 19.
24. A non-transitory computer-readable storage medium, characterized in that When the instructions in the storage medium are executed by the processor of the electronic device, the electronic device is enabled to execute the power consumption management method as described in any one of claims 1 to 8, or the power consumption management method as described in any one of claims 9 to 13, or the power consumption management method as described in any one of claims 14 to 19.
25. A computer program product, characterized in that The computer program product includes computer instructions, which are stored in a computer-readable storage medium; a processor of an electronic device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the electronic device performs the power consumption management method according to any one of claims 1 to 8, or the power consumption management method according to any one of claims 9 to 13, or the power consumption management method according to any one of claims 14 to 19.
26. A chip, characterized in that: It includes a processor and an input / output interface, the input / output interface is used to receive signals from other devices outside the chip and transmit them to the processor or send signals from the processor to other devices outside the chip, the processor is used to implement the power consumption management method according to any one of claims 1 to 8, or the power consumption management method according to any one of claims 9 to 13, or the power consumption management method according to any one of claims 14 to 19 through logic circuits or execution code instructions.
Citation Information
Cited By
Memory access method, chip and electronic equipment
CN120894224A