Frequency point switching method and related device
By configuring the parameter group to be collected into the DDR register group by predicting rules, the problem of long backpressure time during DDR frequency switching is solved, the register structure is simplified, and the switching efficiency of DVFS is improved.
Patent Information
- Application Number
- CN202411372990.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-27
- Publication Date
- 2025-01-07
AI Technical Summary
During the DDR frequency switch, the backpressure time is longer, resulting in a long DVFS delay. This is mainly due to the poor duration during the DDR register switching process. The existing technology requires switching between various sets of registers, which increases the switching time.
The parameter group is configured by predicting rules to gather into at least one second register group, and the target register group is determined according to the frequency switching instruction, and the predicted parameter group is configured in advance before switching, reducing the backpressure time.
The DDR register group structure is simplified, the backpressure time during frequency switching is reduced, and the switching efficiency of DVFS is improved.
Smart Images

Figure CN119271408A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of information processing, and in particular to a frequency switching method and related devices. Background Art
[0002] DDR (Double Data Rate) DVFS (Dynamic voltage and frequency scaling) is a low-power technology widely used in chip design. It achieves the goal of reducing system power consumption without affecting business performance by dynamically adjusting the voltage and frequency of hardware modules.
[0003] When the DDR frequency is switched, DDRC (DDR-MC, Memory Controller, the memory interface is divided into memory control logic), DDR PHY (Physical Interface, physical layer interface) and memory particle DRAM (Dynamic Random Access Memory, dynamic random access memory) have some timing parameters that need to be adjusted. Therefore, access to DDR is not allowed when the frequency is switched. The time when access to DDR is not allowed is called back pressure time.
[0004] In order to reduce the back pressure time, IP vendors use multiple sets of registers for each channel to save the relevant parameters of each frequency point. In some implementations, a set of registers is set for each frequency point, and the number of DRAM registers in a channel is very small, and each DDRC register and PHY register need to share the DRAM register. Therefore, when executing the DVFS process, it is necessary not only to switch between the various sets of registers, but also to switch the DRAM registers connected to the DDR PHY register and the DDRC register from one to another. The switching time required in this process is poor, resulting in a longer back pressure time and a longer DVFS delay. Summary of the invention
[0005] The first aspect of the present application provides a frequency switching method, comprising:
[0006] Controlling the target storage module to perform a task based on a first parameter group configured in the first register group, wherein the first parameter group corresponds to a first frequency point;
[0007] The parameter group set predicted according to the prediction rule is configured to correspond to at least one second register group, wherein the parameter group set includes at least one parameter group, and different parameter groups correspond to different frequency points;
[0008] receiving a frequency switching instruction, wherein the frequency switching instruction is used to control the target storage module to switch the working frequency to a second frequency;
[0009] Based on the frequency points corresponding to the parameter group set including the second frequency point, determining a target register group corresponding to the second frequency point in at least one second register group;
[0010] The target storage module is controlled to execute a task based on a second parameter group configured in the target register group.
[0011] In a possible implementation, the method further includes:
[0012] Based on the frequency corresponding to the parameter group set not including the second frequency, obtaining a target parameter group corresponding to the second frequency;
[0013] configuring the target parameter set to a target second register set, the target second register set belonging to the at least one second register set;
[0014] The target storage module is controlled to execute a task based on the target parameter group in the target second register group.
[0015] In a possible implementation, the determining, based on the frequency corresponding to the parameter group set including the second frequency, a target register set corresponding to the second frequency in at least one second register set includes:
[0016] According to the second frequency indicated by the frequency switching instruction, based on finding the target parameter group corresponding to the second frequency in the configuration record, determining that the parameter group corresponding to the second frequency has been configured to the second register group, the configuration record further including the register group configured by each parameter group;
[0017] A target register group corresponding to the second frequency point is determined in at least one second register group.
[0018] In a possible implementation, after controlling the target storage module to execute the task based on the second parameter group configured in the target register group, the method further includes:
[0019] Obtaining a target application scenario after the target storage module switches the operating frequency point;
[0020] Counting the configuration hit rate in the target application scenario, where the configuration hit rate represents the probability that the parameter group corresponding to the second frequency point is configured to the second register group and is hit by the frequency point switching instruction;
[0021] The target application scenario, the second frequency point, and the configuration hit rate are recorded to obtain a configuration record.
[0022] In a possible implementation, configuring the parameter group set predicted according to the prediction rule to correspond to at least one second register group includes:
[0023] Get the current application scenario of the target storage module;
[0024] Predicting future application scenarios at future moments based on the current application scenarios;
[0025] Determine, based on the configuration record, a set of parameter groups whose configuration hit rate meets the selection condition in future application scenarios;
[0026] The parameter set is configured to at least one second register set.
[0027] In a possible implementation, configuring the parameter group set predicted according to the prediction rule to correspond to at least one second register group includes:
[0028] Get the current application scenario of the target storage module;
[0029] Predicting a future application scenario of the target storage module based on the current application scenario and the work history information of the target storage module;
[0030] Based on the future application scenario of the target storage module, predict at least one frequency point used by the target storage module in the future application scenario;
[0031] The parameter group set corresponding to the at least one frequency point is configured correspondingly to at least one second register group.
[0032] In a possible implementation, configuring the parameter group set predicted according to the prediction rule to correspond to at least one second register group includes:
[0033] According to the address of each register in the second register group, the timing parameters corresponding to each register in the second parameter group are configured to the corresponding register, the second register group includes a first register, a second register and a third register, the first register is used to store the timing parameters of the second frequency point in the control logic, the second register is used to store the timing parameters of the second frequency point in the physical layer interface, and the third register is used to store the timing parameters of the second frequency point in the memory particle.
[0034] In a possible implementation, configuring the parameter group set predicted according to the prediction rule to correspond to at least one second register group includes:
[0035] Determine a third parameter group in the parameter group set predicted according to the prediction rule, wherein the frequency point corresponding to the third parameter group is greater than the first frequency point;
[0036] The third parameter group is configured to the second register group.
[0037] A second aspect of the present application provides a frequency switching device, comprising:
[0038] A control module, used for controlling the target storage module to perform a task based on a first parameter group configured in the first register group, wherein the first parameter group corresponds to a first frequency point;
[0039] A configuration module, used to configure a parameter group set predicted according to the prediction rule to correspond to at least one second register group, wherein the parameter group set includes at least one parameter group, and different parameter groups correspond to different frequency points;
[0040] A receiving module, used for receiving a frequency switching instruction, wherein the frequency switching instruction is used for controlling the target storage module to switch the working frequency to a second frequency;
[0041] a determination module, configured to determine, based on the frequency points corresponding to the parameter group set including the second frequency point, a target register group corresponding to the second frequency point in at least one second register group;
[0042] The execution module is used to control the target storage module to execute the task based on the second parameter group configured in the target register group.
[0043] A third aspect of the present application provides a computer program product, comprising computer-readable instructions. When the computer-readable instructions are executed on an electronic device, the electronic device implements the frequency switching method of the first aspect or any implementation of the first aspect.
[0044] A fourth aspect of the present application provides an electronic device, comprising at least one processor and a memory connected to the processor, wherein:
[0045] The memory is used to store computer programs;
[0046] The processor is used to execute the computer program so that the electronic device can implement the frequency switching method of the first aspect or any implementation manner of the first aspect.
[0047] A fifth aspect of the present application provides a computer storage medium, which carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement the frequency switching method of the first aspect or any implementation of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.
[0049] Figure 1 It is a schematic diagram of the DDR structure in the prior art;
[0050] Figure 2 It is a flow chart of a frequency switching method provided in an embodiment of the present application;
[0051] Figure 3 It is a flowchart of a parameter group reconfiguration process in a second register group based on the frequency corresponding to the parameter group set not including the second frequency provided in an embodiment of the present application;
[0052] Figure 4 is a flowchart of determining a target register group corresponding to the second frequency point in at least one second register group based on the frequency point corresponding to the parameter group set including the second frequency point provided by an embodiment of the present application;
[0053] Figure 5 is a schematic diagram of a configuration record provided in an embodiment of the present application;
[0054] Figure 6 It is a schematic diagram of a process for obtaining a configuration record provided in an embodiment of the present application;
[0055] Figure 7 is another schematic diagram of the configuration record provided in the embodiment of the present application;
[0056] Figure 8 It is a flow chart of configuring a parameter group set obtained by prediction according to a prediction rule to correspond to at least one second register group provided by an embodiment of the present application;
[0057] Fig. 9 Another flowchart of configuring a parameter group set predicted according to a prediction rule to correspond to at least one second register group provided by an embodiment of the present application;
[0058] Fig.10 is a structural schematic diagram of a target storage module provided in an embodiment of the present application;
[0059] Fig.11 is another structural schematic diagram of the target storage module provided in an embodiment of the present application;
[0060] Fig.12 It is another flow chart of configuring the parameter group set obtained by prediction according to the prediction rule to correspond to at least one second register group provided by the embodiment of the present application;
[0061] Fig.13 This is a schematic diagram of an application scenario of a frequency switching method provided by this application;
[0062] Fig.14 It is a structural schematic diagram of a frequency switching device provided in an embodiment of the present application;
[0063] Fig.15 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0064] The following describes the embodiments of the present application in conjunction with the drawings in the embodiments of the present application. The terms used in the implementation method section of the present application are only used to explain the specific embodiments of the present application, and are not intended to limit the present application.
[0065] The embodiments of the present application are described below in conjunction with the accompanying drawings. Those skilled in the art will appreciate that, with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0066] The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and need not be used to describe a specific order or sequential order. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, which is only to describe the distinction mode adopted by the objects of the same attributes when describing in the embodiments of the present application. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, so that the process, method, system, product or equipment comprising a series of units need not be limited to those units, but may include other units that are not clearly listed or inherent to these processes, methods, products or equipment.
[0067] Figure 1This is a schematic diagram of the DDR structure in an implementation method. The structure corresponds to a system that supports n DDR frequencies. For DDRC and DDR PHY, n sets of frequency-related registers (f0~fn-1) and a frequency parameter selection register are designed respectively. The DDR structure supports m DDR channels (channel 0~channel m-1). The values of m and n are positive integers. Accordingly, each DDR channel sets n sets of frequency-related registers corresponding to DDRC, n sets of frequency-related registers corresponding to DDR PHY, and three DRAM registers (f0~f3). The n sets of frequency-related registers are used to store the parameters of n DDR frequencies, and the frequency parameter selection register is used to select which set of frequency registers to use. For a SOC with m DDR channels, 2*m*n sets of frequency-related registers are required. Generally, the value of n is relatively large, such as 5, 10, etc., and needs to be set according to actual conditions.
[0068] In this implementation, n sets of registers need to be set one by one for the n frequency points that DDR can use, resulting in a large hardware interface. Moreover, when switching the frequency point, it is necessary to switch a set of registers corresponding to one frequency point to the registers of another frequency point, for example, from f0 of DDRC, f0 of PHY, and f0 of DRAM to fn-1 of DDRC and fn-1 of PHY, and it is also necessary to switch DRAM from f0 to f1. In this switching process, two switches are required, resulting in a long overall time and a long back pressure time.
[0069] In order to solve the above problems, the present application provides a frequency switching method. The frequency switching method of an embodiment of the present application is described in detail below with reference to the accompanying drawings.
[0070] Figure 2 It is a flow chart of a frequency switching method provided in an embodiment of the present application, which may include steps 201 to 205. These steps are described in detail below.
[0071] 201. Control a target storage module to perform a task based on a first parameter group configured in a first register group, where the first parameter group corresponds to a first frequency point;
[0072] The target storage module is a DDR, which can respond to tasks performed by the electronic device.
[0073] The target storage module may include DDRC (DDR control chip), PHY (Physical Hybrid Interface), and DRAM (memory).
[0074] Among them, each component in the DDR is provided with a register group. In the embodiment of the present application, the register group used by the currently executed task is the first register group, and the remaining register group not used by the currently executed task is the second register group.
[0075] Among them, the registers are set in DDRC, PHY, and DRAM respectively. The parameter group specifically configures the frequency and frequency-related timing parameters of each part to ensure that DDRC, PHY, and DRAM all work at the target frequency at the same time.
[0076] Among them, the number of registers contained in each register group is consistent. A register group can include multiple registers. The number of registers contained in the register group is related to the parameter classification required when the target storage module performs a task. One register is used to configure a type of parameter.
[0077] The target storage module executes the task based on the first parameter group configured in the first register group. The first register group may include multiple registers, specifically several registers required during the operation of the target storage module.
[0078] The first parameter group in the first register group corresponds to a first frequency point, and the target storage module executes the current task based on the first frequency point.
[0079] 202. Configure a parameter group set predicted according to the prediction rule to correspond to at least one second register group, where the parameter group set includes at least one parameter group, and different parameter groups correspond to different frequency points;
[0080] In the process of executing the current task, the parameter group required for the target storage module to execute the task at a future moment can be configured into the remaining unused register group in the target storage module.
[0081] The number of parameter groups in the configured parameter group set is determined based on the number of the second register groups, and the parameter groups are configured in the second register groups in a one-to-one correspondence.
[0082] The predicted parameter group set includes: a parameter group of at least one frequency point, and different frequency points correspond to different parameter groups.
[0083] The different parameter groups include different values of parameters in the parameter groups.
[0084] As an example, there are two register groups in the target storage module. The target storage module uses the parameter group in register group 1 to execute the current task, and register group 2 is configured with a parameter group obtained by prediction.
[0085] As an example, there are three register groups in the target storage module. The target storage module uses the parameter group in register group 1 to perform the current task, and two predicted parameter groups are configured in register groups 2 and 3. For example, the frequencies corresponding to the predicted parameter groups are 55 Hz (Hertz) and 65 Hz, respectively. The parameter group of the 55 Hz frequency point is configured in register group 2, and the parameter group of the 65 Hz frequency point is configured in register group 3.
[0086] In a possible implementation, when the target storage module performs a task based on the first parameter group configured in the first register group, the parameter group required for the target storage module to perform the task at a future moment is predicted and configured in the second register group.
[0087] In one possible implementation, before the target storage module starts to execute a task, the parameter groups corresponding to the frequency points required for the operation of the target storage module are predetermined, and in the process of executing the task based on the first parameter group in the first register group, the parameter groups of the frequency points that may be used at future times are configured in the second register group.
[0088] In a possible implementation, a cache module and a prediction model are provided, wherein the cache module is used to predict the working frequency points and corresponding parameter groups that the target storage module can use. The prediction module is used to set prediction rules, which are used to predict the working frequency points of the target storage module when the target storage module performs a task, and configure the parameter groups of the working frequency points that may be used in the future to the second register group.
[0089] As an example, if the target storage module can use n frequency points during operation, the parameter groups corresponding to the n frequency points are stored in the cache module. During the execution of the task by the target storage module, the prediction module predicts the working frequency points at future moments and configures the predicted parameter groups of each frequency point to each second register group.
[0090] In a possible implementation, the predicted number of frequency points may be greater than the number of the second register groups, or may be the same as the number of the second register groups.
[0091] Wherein, configuring each second register group for each parameter group in the predicted parameter group set respectively is to not affect the target storage module from executing the current task during the task execution based on the first parameter group configured in the first register group.
[0092] In a possible implementation, the future application scenario of the target storage module can be predicted, and then the second parameter group set whose hit rate meets the selection condition in the future application scenario can be determined. Fig. 9The process of predicting a parameter group set according to a prediction rule and configuring it to the second register group is described in detail.
[0093] In a possible implementation, the future application scenario of the target storage module can be predicted, and then the frequency points that may be used in the future application scenario can be predicted, and then the parameter group set corresponding to the frequency points that may be used can be configured to the second register group. Fig. 9 The process of predicting a parameter group set according to a prediction rule and configuring it to the second register group is described in detail.
[0094] In a possible implementation, the parameter group corresponding to each frequency point obtained by prediction may be configured into the second memory set.
[0095] In a possible implementation, the parameter group corresponding to the frequency point greater than the first frequency point among the predicted frequency points is configured into the second register group, and then Fig.13 The process of configuring the second parameter group set to the second register group is described in detail.
[0096] 203. Receive a frequency switching instruction, where the frequency switching instruction is used to control the target storage module to switch the working frequency to a second frequency;
[0097] When a frequency switching instruction for controlling the target storage module to switch the working frequency is received, it is determined that the target switching working frequency is a second frequency, which is different from the first frequency used for the current task execution.
[0098] It is determined whether the parameter group configured in the second register group corresponds to the second frequency point, and if so, step 204 is executed.
[0099] In a possible implementation, if the frequency point corresponding to the parameter group configured in the second register group does not include the second frequency point, it is necessary to reconfigure the parameter group in the second register group. Figure 3 The process of reconfiguring the parameter group in the second register group is described in .
[0100] In a possible implementation, the frequency switching instruction is a DDR DVFS request.
[0101] 204. Based on the fact that the frequency corresponding to the parameter group set includes the second frequency, determine a target register group corresponding to the second frequency in at least one second register group;
[0102] Among them, each parameter group in the parameter group set has been respectively configured to each second register group. Accordingly, it can be determined whether the second frequency point has been pre-configured in the second register group based on whether the frequency points corresponding to each parameter group in the parameter group set include the second frequency point.
[0103] If it is determined that the frequency corresponding to the parameter group set includes the second frequency, it indicates that a parameter group of the second frequency has been configured in a second register group, and the pre-configuration of the task after the frequency switching is hit.
[0104] Correspondingly, a target register group is determined in the at least one second register group, and the target register group is a parameter group that has been configured with the second frequency point.
[0105] As an example, the target storage module has 3 register groups, the target storage module uses the parameter group in register group 1 to perform the current task, register group 2 has been configured with a parameter group of 55Hz frequency, and register group 3 has been configured with a parameter group of 60Hz frequency. The received frequency switching instruction indicates that the target storage module switches the working frequency to 55Hz, and register group 2 is determined to be the target register group.
[0106] In a possible implementation, a configuration record is performed for each register group to obtain a configuration record. It can be determined whether a target parameter group corresponding to the second frequency point has been configured according to the configuration record to determine whether a target register group exists in the second register group. Figure 4 The process of determining the target register bank is described in detail in .
[0107] 205. Control the target storage module to execute the task based on the second parameter group configured in the target register group.
[0108] After the target register group is determined, the target storage module is controlled to switch the adopted register group from the first register group to the target register group, so as to execute the task based on the second parameter group configured in the target register group.
[0109] Among them, the task executed after the target storage module switches the working frequency requires the target storage module to execute the task at the second frequency.
[0110] As an example, the electronic device executes an office software application, and the target storage module uses the first frequency point to execute the task, specifically using the parameter group configured in register group 1 to execute the task. The electronic device starts a game application, and the target storage module uses the second frequency point to execute the task. After receiving the instruction to start the game application, the electronic device system sends a frequency switching instruction to the target storage module, indicating that the working frequency point is switched to the second frequency point. The target storage module uses the parameter group configured in register group 2 to execute the task, and the parameter group configured in register group 2 corresponds to the second frequency point.
[0111] In a possible implementation, after the target register group is determined, a trigger instruction for triggering the target register group is generated to trigger the operation of each register in the target register group and stop triggering each register in the first register group, thereby switching between the first register group and the target register group.
[0112] In one possible implementation, the target storage module has multiple channels. The foregoing content is a method for controlling a register group of a channel. If the target storage module has multiple channels, when switching frequencies, the method provided in the embodiment of the present application can be used to control the register group of each channel.
[0113] In this embodiment, the register group of the target storage module includes a first register group used for the currently executed task and at least one second register group not used for the currently executed task. The target storage module is controlled to execute the task based on the first parameter group configured in the first memory set, the first parameter group corresponding to the first frequency point; the parameter group set predicted according to the prediction rule is configured to at least one second register group, the predicted parameter group set includes parameter groups of one or more frequency points that may be used at a future moment; when a frequency switching instruction for controlling the target storage module to switch the working frequency to the second frequency point is received, if the frequency point corresponding to the predicted parameter group set includes the second frequency point, the target register group corresponding to the second frequency point is determined in the at least one second register group, and the register group used by the target storage module is controlled to switch from the first register group to the target register group, so as to execute the task based on the second parameter group configured in the target register group. In this solution, the number of register groups in the target storage module is limited, the structure of the target storage module is simplified, and the parameter group of the frequency point that can be used at the predicted future moment is configured in advance to each second register group outside the back pressure time. When switching to the working frequency point later, the probability of hitting the second frequency point is increased and the back pressure time is reduced.
[0114] Figure 3 The frequency corresponding to the parameter group set provided in an embodiment of the present application does not include the second frequency. A flow chart of the parameter group reconfiguration process in the second register group may include steps 301 to 303, and these steps are described in detail below.
[0115] 301. Based on the fact that the frequency corresponding to the parameter group set does not include the second frequency, obtain a target parameter group corresponding to the second frequency.
[0116] Among them, each parameter group in the parameter group set has been respectively configured to each second register group, and whether the second frequency point has been pre-configured in the second register group is determined according to whether the frequency points corresponding to each parameter group in the parameter group set include the second frequency point.
[0117] If the frequency point corresponding to the parameter group set does not include the second frequency point, the target parameter group corresponding to the second frequency point needs to be configured in a second register group.
[0118] When it is determined that the frequency points corresponding to the parameter group set do not include the second frequency point, based on the parameter groups of each frequency point stored in the cache module, a target parameter group corresponding to the second frequency point is obtained from the cache module.
[0119] In a possible implementation, multiple frequency points can be predicted, and some of the frequency points are configured in each second register group. After the second frequency point indicated by the frequency switching instruction is subsequently determined, if the second frequency point is predicted but its parameter group is not configured in the second register group, the target second register group can be configured based on the parameter group of the second frequency point stored in the cache module.
[0120] As an example, the prediction module predicts 4 frequency points, among which there are 3 register groups in the target storage module, among which the target storage module currently uses the parameter group in register group 1 to execute the task, and the remaining register groups 2 and 3 are not used. The parameter groups of frequency points 1 and 2 of the 4 frequency points are pre-configured into register groups 2 and 3, and the parameter groups of the remaining frequency points 3 and 4 of the 4 frequency points are not configured into the register group. When the frequency point switching instruction is received, it is determined that the second frequency point indicated by the frequency point switching instruction is frequency point 4, the parameter group of frequency point 4 is obtained from the cache module, and the parameter group of frequency point 4 is configured into a second register group. The pre-configuration for the task is not hit this time.
[0121] In a possible implementation, the DVFS technology may be used to determine the target parameter group corresponding to the second frequency point, and then configure the target parameter group into a second register group.
[0122] 302. Configure the target parameter group to a target second register group, where the target second register group belongs to the at least one second register group;
[0123] After the target parameter group is obtained, the target parameter group is configured into a second register group.
[0124] If there are multiple second register groups, one of them may be determined as the target register group.
[0125] Among them, one of the multiple second register groups can be randomly selected as the target register group.
[0126] The rule for selecting the target register group may also be preset, and the selection rule is not limited in this application. For example, the configured parameter group corresponding to the largest frequency point is selected as the target second register group; or the configured parameter group corresponding to the smallest frequency point is selected as the target second register group.
[0127] 303. Control the target storage module to execute a task based on the target parameter group in the target second register group.
[0128] After configuring the target parameter group to the target second register group, the target storage module is controlled to switch the memory set used from the first register group to the target second register group to execute the task based on the second parameter group configured in the target second register group.
[0129] In a possible implementation, after the target second register group is determined, a trigger instruction for triggering the target second register group is generated to trigger the operation of each register in the target second register group and stop triggering each register in the first register group, thereby implementing switching between the first register group and the target second register group.
[0130] In this embodiment, if the frequency point corresponding to the parameter group set does not include the second frequency point, obtain the target parameter group corresponding to the second frequency point; configure the target parameter group to the target second register group, the target second register group belongs to at least one second register group; control the target storage module to perform the task based on the target parameter group in the target second register group. For the parameter group set predicted and configured to each second target register group, when each frequency point corresponding to the parameter group set does not include the second frequency point, configure the parameter group of the second frequency point for the second register group, so as to perform the task based on the parameter group of the second frequency point configured in the target second register group, thereby ensuring the smooth execution of the task.
[0131] Figure 4 The flowchart provided by the embodiment of the present application is a flowchart of determining a target register group corresponding to the second frequency point in at least one second register group based on the frequency point corresponding to the parameter group set including the second frequency point, which may include steps 401 to 402. These steps are described in detail below.
[0132] 401. According to the second frequency indicated by the frequency switching instruction, based on finding a target parameter group corresponding to the second frequency in the configuration record, it is determined that the parameter group corresponding to the second frequency has been configured to the second register group, and the configuration record further includes the register group configured by each parameter group;
[0133] After each frequency point is predicted, each frequency point can be recorded in the configuration record.
[0134] In a possible implementation, the configuration record also records a parameter group corresponding to a frequency point.
[0135] In a possible implementation, a separate storage area is used in the prediction module to store the parameter group corresponding to each frequency point, and the storage location of the parameter group corresponding to each frequency point can be recorded in the configuration record.
[0136] Correspondingly, after determining that the frequency switching instruction indicates the second frequency, the configuration record is searched to see whether the second frequency exists. If the second frequency exists in the configuration record, it is determined that the parameter group corresponding to the second frequency has been pre-configured to the second register group.
[0137] In a possible implementation, the configuration record may record multiple predicted frequency points. After the parameter groups of some of the frequency points are pre-configured to the register group, the parameter groups of some of the frequency points are not yet configured to the register group. A configuration record bit may be reserved in the configuration record to record the configuration status of each frequency point, whether the frequency point is configured or not configured.
[0138] As an example, the configuration record bit may be 1 to indicate configured, and 0 to indicate unconfigured.
[0139] As an example, 10 frequency points are predicted and there are only 2 second register groups. The parameter group of frequency point 1 and the parameter group of frequency point 2 are respectively configured in two second register groups, and the configured register groups of frequency point 1 and frequency point 2 are recorded in the configuration record, and the configuration record bits are set to 1 respectively. The parameter groups of the remaining 8 frequency points are not configured in the second register group, and their corresponding register groups are empty, and the configuration record position is 0.
[0140] In a possible implementation, the register group configured in the configuration record may be represented by an identifier of the register group or by an address of the register group, which is not limited in the present application.
[0141] If the configuration record records that the second frequency point is not configured to any second register group, then according to Figure 3 After the target second register set is configured in the embodiment, it is recorded in the configuration record that the parameter set of the second frequency point is configured to the target second register set, and the prediction miss is recorded.
[0142] 402. Determine a target register group corresponding to the second frequency point in at least one second register group.
[0143] If the configuration record records the register groups configured with the parameter groups corresponding to the frequencies, the corresponding target register groups can be determined in the second register groups based on the configuration record.
[0144] Figure 5This is a schematic diagram of a configuration record provided by an embodiment of the present application. In the schematic diagram, the configuration record includes 5 predicted frequency points, namely frequency points 1 to 5. The target storage module has 3 register groups, among which register group F0 is used to execute the current task, and the remaining register groups F1 and F2 are idle. The parameter groups of frequency points 2 and 3 are configured in register groups F1 and F2 respectively. Among them, the configuration record position of frequency points 2 and 3 is 1, and the configuration record position of the remaining three frequency points is 0. The configuration record also records the relevant data of the parameter group of each frequency point.
[0145] Figure 6 : is a schematic diagram of an application scenario of a frequency switching method provided by the present application, in which the application scenario is a DVFS process for DDR, wherein the target storage module structure is as follows Figure 5 As shown, the target storage module includes: a cache module, a selection register and a register set, each register set includes three register groups F0-F2.
[0146] In this application scenario, the cache module uses param ctx to store the parameter group of each frequency point.
[0147] This application scenario includes the following steps:
[0148] 601. DDR initialization, saving the parameter group of each frequency point to the cache module;
[0149] 602. During the operation of the system, DDR uses the parameters in register group Fx;
[0150] Among them, the Fx is any one of F0~F2, the register group Fx is used as the working register group, and the register group Fy and the register group Fz are used as backup register groups.
[0151] 603: predicting the frequency point during the system operation, configuring two frequency point parameters to the register group Fy and the register group Fz, and recording the currently used frequency point and the two predicted configured frequency points in the cache module;
[0152] Among them, x≠y≠z, and the values of xyz are 0, 1 and 2. .
[0153] 604: when receiving a frequency switching request from the system, searching in the cache module whether the frequency parameters of the switching request have been configured in two sets of backup register groups;
[0154] The frequency switching request is a DDR DVFS request.
[0155] If it has been configured in the backup register group, execute 605; if it has not been configured in the backup register group, execute 606.
[0156] 605: Execute the DVFS frequency switching process;
[0157] After the DVFS frequency switching process is completed and the new register group is switched, the process returns to step 603 .
[0158] 606: Select Fy from the two backup register groups, and configure the parameters of the requested frequency point to the selected register group Fy;
[0159] During the execution of 606 , the system executes the task without interruption and the system keeps running.
[0160] 607: Execute the DVFS frequency switching process based on the parameters in the register set Fy, and record the currently configured register set in the cache module.
[0161] After the DVFS frequency switching process is completed and the new register group is switched, the process returns to step 603 .
[0162] Among them, since the system will be disconnected during the frequency switching process of DVFS, the duration of the disconnection is the back pressure time. In the application scenario of this frequency switching method, the parameter group configuration corresponding to the frequency is placed before or after the DVFS process, which reduces the disconnection time during the DVFS process. The frequency that the system will use after the frequency switching is predicted and configured in advance. If the frequency to be used is hit, it has been pre-configured in the backup register group, and the register group can be switched directly; if the frequency to be used is not hit, it needs to be configured again. Because the more accurate the prediction, the higher the probability of hitting, and the shorter the back pressure duration of the switch, the higher the switching efficiency of DVFS.
[0163] Moreover, compared with configuring the frequency parameters indicated by the frequency switching instruction into the register group during the DVFS process after receiving the frequency switching instruction, the back pressure time in this solution is shorter.
[0164] In a possible implementation, the result of the response frequency switching instruction after each configuration is completed is recorded, and the predicted frequency, the register group configured by the parameter group corresponding to the predicted frequency, and the configuration hit rate are recorded to generate a configuration record, which provides a basis for the next pre-configuration to further improve the hit rate. Figure 7 The process of obtaining the configuration record is described in detail in .
[0165] In this embodiment, according to the second frequency indicated by the frequency switching instruction, the target parameter group corresponding to the second frequency is determined in the configuration record, and the configuration record also includes the register group configured by each parameter group, and the target register group corresponding to the second frequency is determined in at least one second register group. The configuration record is obtained by pre-configuring the relevant information of each predicted frequency to the register group. When the frequency switching instruction is received, the target parameter group corresponding to the second frequency is determined according to the configuration record, and then the target register group is determined, so that the target register group of the second frequency is determined according to the preset configuration record, which can be realized only by looking up the table. After the table lookup is completed, it can be directly switched to the target register group, which reduces the back pressure duration of the DDR.
[0166] Figure 7 It is a flowchart of obtaining a configuration record provided in an embodiment of the present application, which may include steps 701 to 703. These steps are described in detail below.
[0167] 701. Obtain a target application scenario after the target storage module switches the working frequency point;
[0168] After controlling the target storage module to execute the task based on the second parameter group configured in the target register group, the configuration record may be updated in response to the frequency switching instruction of the second frequency point.
[0169] The configuration record may also be updated in response to the frequency switching instruction of the second frequency point after the target storage module is controlled to execute the task based on the target parameter group in the target second register group.
[0170] Among them, a target application scenario after the target storage module switches the working frequency is obtained, and the parameter group and register group adopted by the target application scenario correspond to the second frequency.
[0171] The second frequency point may be predicted and pre-configured to the second register group; or may be configured to the second register group based on the frequency switching instruction after receiving the frequency switching instruction.
[0172] Among them, the working frequencies used in different application scenarios may be the same or different.
[0173] As an example, when a game application is turned on in an electronic device, game A requires operating frequency a to run, and game B requires operating frequency b to run.
[0174] Correspondingly, the target application scenario corresponding to the working frequency point can be a scene divided according to the category of the application, for example, divided into game scenes, office scenes, and film and television scenes; it can also be a scene divided according to the application opened, for example, divided into game A scene (the scene of opening game A), game B scene (the scene of opening game B), word scene (the scene of opening the word software in the office software), film and television APP (application) C scene (the scene of opening film and television APP C), and film and television APP D scene (the scene of opening film and television APP D).
[0175] In a possible implementation, if the target storage module performs more than one task after switching the frequency point, the target application scenario can be determined based on the tasks performed by the target storage module as a task combination.
[0176] In a possible implementation, if the target storage module performs more than one task after switching the frequency, the target application scenario can be determined based on the task with the largest frequency.
[0177] 702. Count the configuration hit rate in the target application scenario, where the configuration hit rate represents the probability that the parameter group corresponding to the second frequency point is configured to the second register group and is hit by the frequency point switching instruction;
[0178] Among them, for this working frequency switching completion, the configuration hit rate of the target application scenario is counted.
[0179] The configuration hit means that after each second register group is configured based on the predicted parameter group set, the frequency point pre-configured to the second register group includes the second frequency point of the frequency point switching instruction.
[0180] If the frequency points pre-configured in the second register group do not include the second frequency point, all the frequency points pre-configured for the target application scenario are not hit.
[0181] In one possible implementation, the hit rate of the second frequency point for the target application scenario can be improved. Each time the frequency parameter group pre-configured for the target application scenario does not include the second frequency point, the hit rate of the second frequency point for the target application scenario is improved according to the set adjustment gradient.
[0182] Correspondingly, if the pre-configured frequency points do not hit the second frequency point, the hit rate of the pre-configured frequency points for the target application scenario will be reduced.
[0183] Among them, after each switching of the working frequency point, the configuration hit rate of the corresponding target application scenario can be counted.
[0184] Among them, the higher the hit rate, the higher the accuracy of the predicted frequency.
[0185] As an example, the number of configurations and hits of each frequency point for each application scenario may be counted, and the configuration hit rate of the frequency point for the application scenario may be obtained according to the ratio of the hits to the configurations.
[0186] As an example, five frequency points are predicted for application scenario A, namely frequency point 1 to frequency point 5, among which the parameter groups of frequency point 1 and frequency point 2 are respectively configured to two second register groups, and the frequency point indicated by the frequency switching instruction is frequency point 3. Both frequency point 1 and frequency point 2 are not hit. By counting the hit rates of frequency point 1 and frequency point 2 for application scenario A, the hit rate of frequency point 3 for application scenario A can be increased.
[0187] As an example, three frequency points are predicted for application scenario B, namely frequency point 1 to frequency point 3, among which the parameter groups of frequency point 1 and frequency point 2 are respectively configured to two second register groups, and the frequency point indicated by the frequency switching instruction is frequency point 4. Both frequency point 1 and frequency point 2 are not hit, and the hit rate of frequency point 1 and frequency point 2 for application scenario B is counted.
[0188] 703. Record the target application scenario, the second frequency point, and the configuration hit rate to obtain a configuration record.
[0189] Wherein, the configuration record is updated with respect to the target application scenario, the second frequency point and the configuration hit rate to obtain the configuration record after this switching.
[0190] In a possible implementation, each configuration of the second register group is recorded, and each switching of the operating frequency is also recorded.
[0191] The configuration record may include two parts. The first part is used to record the predicted frequency point, the configuration record bit and the configured register group; the second part is used to record the configuration hit rate of each frequency point in each application scenario.
[0192] It should be noted that when a prediction is made for a certain application scenario later, the configuration hit rate in the configuration record can be combined for prediction, and a frequency point with a higher configuration hit rate can be selected to further improve the configuration hit rate.
[0193] The first part of the configuration record can be referenced Figure 5 As shown in the second part, you can refer to Figure 8 .
[0194] Figure 8This is another schematic diagram of the configuration record provided in the embodiment of the present application, in which the configuration record includes 3 frequency points and 2 application scenarios. Among them, the hit rates of frequency points 1 to 3 in application scenario A are 0.10, 0.05, and 0.85 respectively, and the hit rates of frequency points 1 to 3 in application scenario B are 0.70, 0.10, and 0.20 respectively.
[0195] In this embodiment, after the working frequency of the target storage module is switched, the target application scenario after the target storage module switches the working frequency is obtained, and the configuration hit rate of the target application scenario is counted. The configuration hit rate represents the probability that the parameter group corresponding to the second frequency of the switch is configured to the second register group and is hit by the frequency switching instruction. If the second frequency is predicted when the target storage module uses the first frequency to perform the task, and the parameter group corresponding to the second frequency is configured to the second register group, the hit rate of the second frequency for the target application scenario increases. Otherwise, the parameter group corresponding to the second frequency is not pre-configured in the second register group, and the hit rate of the second frequency for the target application scenario decreases. The target application scenario, the second frequency, and the configuration hit rate are recorded to obtain a configuration record. After the working frequency of the target storage module is switched, the configuration hit rate of the second frequency relative to the target application scenario is determined to provide a basis for pre-configuring the second register group next time.
[0196] Fig. 9 It is a flowchart of configuring a parameter group set predicted according to a prediction rule to correspond to at least one second register group provided by an embodiment of the present application, which may include steps 901 to 904, and these steps are described in detail below.
[0197] 901. Obtain a current application scenario of a target storage module;
[0198] When the target storage module uses the first frequency point to perform the task, the current application scenario of the target storage module is determined.
[0199] In a possible implementation, the currently running application information can be obtained through an interface with the operating system of the electronic device, and the current application scenario can be determined based on the application information.
[0200] If there are multiple application programs running in the current system, the one with the largest frequency point is determined as the application for determining the current application scenario.
[0201] If there are multiple applications running in the current system, the multiple applications can be combined to determine an application scenario corresponding to the combination as the current application scenario.
[0202] 902. Predicting a future application scenario at a future time based on the current application scenario;
[0203] The future application scenario at a future moment is predicted based on the current scenario, and the future application scenario is the application scenario of target switching when the frequency switching occurs next time.
[0204] The predicted future application scenarios may be one or more.
[0205] In a possible implementation, the frequency of the default future application scenario is greater than the frequency of the current application scenario. The future application scenario can be predicted in combination with the current application scenario. The current application scenario adopts the first frequency, and the predicted future application scenario is an application scenario that adopts a frequency greater than the first frequency.
[0206] In a possible implementation, the frequency of the default future application scenario is greater than or less than the frequency of the current application scenario. The future application scenario is predicted in combination with the current application scenario. The current application scenario adopts the first frequency. The predicted future application scenarios include adopting an application scenario with a frequency greater than the first frequency and adopting an application scenario with a frequency less than the first frequency. Specifically, an application scenario adjacent to the first frequency and greater than the first frequency can be selected as the future application scenario, and an application scenario adjacent to the first frequency and less than the first frequency can also be selected as the future application scenario.
[0207] 903. Determine, based on the configuration record, a parameter group set whose configuration hit rate in a future application scenario meets a selection condition;
[0208] The configuration record is generated and updated based on the method in the aforementioned embodiment.
[0209] The selection condition may be a specific number of frequency points whose hit rate values are ranked first in future application scenarios, and the specific number is the same as the number of the second register groups.
[0210] As an example, if the number of second register groups in the target storage module is 2, two second parameter group sets corresponding to two frequency points are selected.
[0211] According to the configuration record, for the future application scenario determined in the above step, a specific number of frequency points with top numerical ranking of configuration hit rate in the future application scenario are determined.
[0212] If the future application scenario is unique, the configuration hit rate of each frequency point of the future application scenario is sorted from large to small, and a specific number of frequency points ranked first are determined.
[0213] If the future application scenario is not unique, first sort the configuration hit rate of each future application scenario for each frequency point from large to small, and determine one or more frequency points with the top configuration hit rate for each future application scenario.
[0214] If the future application scenario is not unique, the configuration hit rate of each frequency point of the determined multiple future application scenarios may be sorted from large to small, and a specific number of frequency points ranked first may be determined.
[0215] As an example, the number of second register groups in the target storage module is 2, and the future application scenario is unique. In the configuration hit rate of each frequency point in the future application scenario, the two frequency points ranked first in descending order are selected as the parameter group set that meets the selection conditions.
[0216] As an example, the number of second register groups in the target storage module is 2, and two future application scenarios are determined. Then, the largest one among the configuration hit rate values for each frequency point in each future application scenario is determined as the parameter group set that meets the selection condition.
[0217] As an example, the number of second register groups in the target storage module is 2, and two future application scenarios are determined. Then, the configuration hit rates of the future application scenarios for each frequency point are sorted from large to small, and the two configuration hit rate values ranked first are determined as the parameter group set that meets the selection conditions.
[0218] 904. Configure the parameter group set to at least one second register group.
[0219] The determined parameter group set is configured into the second register group.
[0220] The parameter groups corresponding to the respective frequency points are respectively configured to the corresponding second register groups.
[0221] As an example, the number of second register groups in the target storage module is 2, and the parameter groups corresponding to the two determined frequency points are respectively configured into the corresponding second register groups. The parameter group corresponding to frequency point 1 is configured into one second register group, and the parameter group corresponding to frequency point 2 is configured into another second register group.
[0222] In this embodiment, when the target storage module uses the parameters corresponding to the first frequency point configured in the first register group to perform the task, the current application scenario of the target storage module is obtained; the future application scenario at a future moment is predicted based on the current application scenario; according to the configuration record, a parameter group set whose configuration hit rate meets the selection condition in the future application scenario is determined; and the parameter group set is configured to at least one second register group. Combined with the configuration hit rate of the application scenario for the frequency point, the parameter group is predicted, and the predicted parameter group is configured to the second register group to improve the prediction accuracy.
[0223] Fig.10Another flowchart diagram of configuring a parameter group set predicted according to a prediction rule to correspond to at least one second register group provided in an embodiment of the present application may include steps 1001 to 1004, and these steps are described in detail below.
[0224] 1001. Obtain the current application scenario of the target storage module;
[0225] The process of obtaining the current application scenario may refer to the aforementioned step 901 and will not be described in detail here.
[0226] 1002. Predicting a future application scenario of the target storage module based on the current application scenario and the work history information of the target storage module;
[0227] The work history information of the target storage module may be relevant information about the work of the target storage module in a preset time period.
[0228] The work history information may be obtained from the log of the target storage module.
[0229] As an example, the work history information includes: the frequency points used by the target storage module in a preset time period, the duration of each frequency point, the switching frequency point time, the frequency points used in each application scenario, and other information.
[0230] The duration of the preset time period may be 24 hours, 7 days, 1 month, etc. This application does not limit the value of the preset time period.
[0231] Among them, based on the work history information, the working rules of the target storage module can be summarized, and based on the working rules and the current application scenario, the upcoming future application scenario can be predicted.
[0232] As an example, the target storage module's work history information records that from 9:50 to 10:00 every day, the electronic device starts and starts software E. It is currently 9:58, the electronic device has started, the current application scenario of the target storage module is sleep, and the future application scenario is predicted to be running software E based on the target storage module's work history information.
[0233] 1003. Based on the future application scenario of the target storage module, predict at least one frequency point used by the target storage module in the future application scenario;
[0234] Different application scenarios use different frequencies.
[0235] In a possible implementation, a correspondence between application scenarios and frequency points may be preset, and the correspondence presets at least one frequency point used by each application scenario.
[0236] The number of frequency points used in each application scenario in the corresponding relationship is not less than the number of the second register groups in the target storage module.
[0237] Accordingly, after predicting the future application scenario, the frequency of use of the target storage module in the future application scenario is predicted.
[0238] 1004. Configure the parameter group set corresponding to the at least one frequency point to correspond to at least one second register group.
[0239] After predicting the frequency points used by the target storage module in future application scenarios, a parameter group of the predicted frequency points is obtained.
[0240] The obtained parameter group sets are respectively configured into corresponding second register groups.
[0241] In a possible implementation, after the configuration is completed, the configuration is recorded to obtain a configuration record, specifically recording the second register group of the parameter group configuration of the predicted frequency point and the register group of the predicted frequency point configuration to obtain a configuration record.
[0242] In this embodiment, during the process of the target storage module using the parameter group configured in the first register group to perform a task, the current application scenario of the target storage module is obtained; based on the current application scenario and the work history information of the target storage module, the future application scenario of the target storage module is predicted; based on the future application scenario of the target storage module, at least one frequency point used by the target storage module in the future application scenario is predicted; and the parameter group set corresponding to the at least one frequency point is configured to correspond to at least one second register group, thereby realizing the prediction of future application scenarios and the frequency points used in future application scenarios in combination with the work history information of the target storage module and the current application scenario, thereby improving the accuracy of the configuration.
[0243] The embodiment of the present application provides another process of configuring a parameter group set predicted according to a prediction rule to correspond to at least one second register group.
[0244] According to the address of each register in the second register group, the timing parameters corresponding to each register in the second parameter group are configured to the corresponding register. The second register group includes a first register, a second register and a third register. The first register is used to store the timing parameters of the second frequency point in the control logic, the second register is used to store the timing parameters of the second frequency point in the physical layer interface, and the third register is used to store the timing parameters of the second frequency point in the memory particle.
[0245] After the parameter group set is predicted, each parameter group in the parameter group set is configured into a corresponding second register group.
[0246] Each register group includes a plurality of registers, and the parameter group includes timing parameters corresponding to each register. Accordingly, during configuration, the timing parameters corresponding to each register in the parameter group are configured to the corresponding register.
[0247] The register group includes a DDRC register, a PHY register and a memory particle register, and the memory particle may be a DRAM.
[0248] The address of each register in each register group may be recorded in advance, and when configuring parameters for the register group, the parameters are configured separately according to the recorded addresses of each register.
[0249] The parameter group includes: timing parameters of corresponding frequency points in the control logic, timing parameters of corresponding frequency points in the physical layer interface, and timing parameters of corresponding frequency points in the memory particles.
[0250] Accordingly, the timing parameters of the second frequency point in the control logic are configured to the DDRC register, the timing parameters of the second frequency point in the physical layer interface are configured to the PHY register, and the timing parameters of the second frequency point in the memory particle are configured to the DRAM register.
[0251] The first register group and the second register group have the same structure.
[0252] Fig.11 1 is a structural diagram of a target storage module provided in an embodiment of the present application, wherein the target storage module includes a DDRC, a PHY and a DRAM, and registers respectively set in each DDRC, PHY and DRAM constitute a register set. In the diagram, the target storage module includes a cache module 1101, a prediction module 1102 and a register set 1103 of a path, and the register set includes three register groups 11031~11033, and each register group includes a DDRC register, a PHY register and a DRAM register, wherein f0~f2 are used in the figure to represent the three register groups respectively, and the same identifier is used in each register group to represent the DDRC register, the PHY register and the DRAM register, and a group of register groups in the figure is framed by a dotted line frame.
[0253] Among them, the cache module is used to store the parameter groups and configuration records of all frequency points used by the target storage module; the prediction module is used to predict the frequency points of the target storage module and configure the predicted frequency points into the backup register group; the DDRC register is used to configure the parameters required for DDRC operation; the PHY register is used to configure the parameters required for PHY operation; and the DRAM register is used to configure the parameters required for DRAM operation.
[0254] Fig.121 is another structural diagram of a target storage module provided by an embodiment of the present application, and the target storage module includes M channels. The target storage module includes a cache module 1201, a prediction module 1202, and a register set 1203 of M channels, each register set 1203 includes three register groups, each register group includes a DDRC register, a PHY register, and a DRAM register, wherein f0 to f2 are used in the figure to represent the three register groups, respectively, and the same identifier is used in each register group to represent the DDRC register, the PHY register, and the DRAM register, and a group of register groups in the figure is framed by a dotted line frame.
[0255] The functions of the cache module, prediction module, and registers in the register set can be found in the above Fig.10 The corresponding explanation.
[0256] In a possible implementation, when the register sets of each path use the same frequency point, each path uses the same prediction module.
[0257] In a possible implementation, when the register sets of each channel may use different frequency points, the same prediction module is set for each channel, and the prediction module of each channel predicts the frequency point of its corresponding channel.
[0258] In a possible implementation, the prediction module may be implemented using a register.
[0259] In this embodiment, the DDRC register, the PHY register and the DRAM register are respectively set in one register group. Therefore, when switching the frequency point, it is not necessary to switch the register connection in the register group, thereby reducing the back pressure time.
[0260] In this embodiment, according to the address of each register in the second register group, the timing parameters corresponding to each register in the second parameter group are configured to the corresponding register. The second register group includes a first register, a second register and a third register. The first register is used to store the timing parameters of the second frequency point in the control logic, the second register is used to store the timing parameters of the second frequency point in the physical layer interface, and the third register is used to store the timing parameters of the second frequency point in the memory particle. Each register group includes three registers, and the three registers are used to store the timing parameters of the corresponding frequency point in the control logic, the timing parameters of the corresponding frequency point in the physical layer interface, and the timing parameters of the corresponding frequency point in the memory particle. Accordingly, when the second register is configured according to the parameter group of the second frequency point, each timing parameter in the second frequency point parameter group is configured to each corresponding register in the second register group, thereby realizing the process of configuring the parameter group as the second register group.
[0261] Fig.13It is another flowchart provided by an embodiment of the present application for configuring a parameter group set predicted according to a prediction rule to correspond to at least one second register group, which may include steps 1301 to 1302, and these steps are described in detail below.
[0262] 1301. Determine a third parameter group in the parameter group set predicted according to the prediction rule, wherein a frequency point corresponding to the third parameter group is greater than the first frequency point;
[0263] Among them, multiple frequency points can be predicted according to the prediction rule, some of the multiple frequency points are greater than the first frequency point, and some are less than the first frequency point.
[0264] Among them, a third parameter group is determined in the parameter group set of the multiple frequency points, and the frequency point corresponding to the third parameter group is greater than the first frequency point.
[0265] Among them, when switching to a higher frequency point, the back pressure time is short, there is no lag, and the user experience is better, and the low frequency point does not have high requirements for delay. When switching to a lower frequency point, even if the parameter group not configured in the second register group is reconfigured, it will not cause lag problems. Therefore, it is preferred to configure the parameter group greater than the first frequency point in the predicted frequency point to the second register group.
[0266] If there are multiple second register groups, several frequency points whose corresponding frequency bands are continuously increased may be selected from the predicted multiple frequency points.
[0267] 1302. Configure the third parameter group to the second register group.
[0268] Wherein, based on the third parameter group determined in the aforementioned steps, each parameter in the third parameter group is configured to each register in the second register group to implement the configuration process.
[0269] The configuration process may refer to the process of configuring the parameter group for the second frequency point to the second register group in the aforementioned embodiment, which will not be described in detail in this embodiment.
[0270] In this embodiment, after multiple frequency points are predicted according to the prediction rule, a third parameter group is determined in the parameter group set of multiple frequency points, and the frequency point corresponding to the third parameter group is greater than the first frequency point; the third parameter group is configured to the second register group, and by selecting a higher frequency point and pre-configuring it to the second register group, the time for switching frequencies can be reduced and the user experience can be improved.
[0271] A frequency switching method provided in an embodiment of the present application is introduced above, and a device for executing the above frequency switching method will be introduced below.
[0272] Fig.141 is a schematic diagram of the structure of a frequency switching device provided in an embodiment of the present application. The frequency switching device 1400 includes:
[0273] A control module 1401, configured to control a target storage module to perform a task based on a first parameter group configured in a first register group, where the first parameter group corresponds to a first frequency point;
[0274] A configuration module 1402, configured to configure a parameter group set predicted according to the prediction rule to correspond to at least one second register group, wherein the parameter group set includes at least one parameter group, and different parameter groups correspond to different frequency points;
[0275] The receiving module 1403 is used to receive a frequency switching instruction, where the frequency switching instruction is used to control the target storage module to switch the working frequency to the second frequency;
[0276] A determination module 1404 is configured to determine a target register group corresponding to the second frequency point in at least one second register group based on the frequency point corresponding to the parameter group set including the second frequency point;
[0277] The execution module 1405 is used to control the target storage module to execute the task based on the second parameter group configured in the target register group.
[0278] In a possible implementation, the method further includes:
[0279] A first obtaining module, configured to obtain a target parameter group corresponding to the second frequency point based on the frequency point corresponding to the parameter group set not including the second frequency point;
[0280] Correspondingly, the configuration module is further used to configure the target parameter group to a target second register group, where the target second register group belongs to the at least one second register group;
[0281] The control module is also used to control the target storage module to perform tasks based on the target parameter group in the target second register group.
[0282] In a possible implementation, the determining module includes:
[0283] A first determining unit is configured to determine, based on the second frequency indicated by the frequency switching instruction and the target parameter group corresponding to the second frequency found in the configuration record, that the parameter group corresponding to the second frequency has been configured to the second register group, wherein the configuration record further includes the register group configured by each parameter group;
[0284] The second determining unit is configured to determine a target register group corresponding to the second frequency point in at least one second register group.
[0285] In a possible implementation, the method further includes:
[0286] A second obtaining module is used to obtain a target application scenario after the target storage module switches the working frequency after controlling the target storage module to perform a task based on the second parameter group configured in the target register group;
[0287] A statistical module, used to count the configuration hit rate in the target application scenario, where the configuration hit rate represents the probability that the parameter group corresponding to the second frequency point is configured to the second register group and is hit by the frequency point switching instruction;
[0288] The recording module is used to record the target application scenario, the second frequency point and the configuration hit rate to obtain a configuration record.
[0289] In a possible implementation, the configuration module includes:
[0290] A first obtaining unit, used to obtain a current application scenario of a target storage module;
[0291] A first prediction unit, configured to predict a future application scenario at a future moment based on the current application scenario;
[0292] A third determining unit is used to determine, based on the configuration record, a set of parameter groups whose configuration hit rate meets the selection condition in a future application scenario;
[0293] The first configuration unit is used to configure the parameter group set to at least one second register group.
[0294] In a possible implementation, the configuration module includes:
[0295] A second obtaining unit, used to obtain a current application scenario of a target storage module;
[0296] A second prediction unit, configured to predict a future application scenario of the target storage module based on the current application scenario and the work history information of the target storage module;
[0297] A third prediction unit, configured to predict at least one frequency point used by the target storage module in a future application scenario based on the future application scenario of the target storage module;
[0298] The second configuration unit is used to configure the parameter group set corresponding to the at least one frequency point to the at least one second register group.
[0299] In a possible implementation, the configuration module is specifically used to:
[0300] According to the address of each register in the second register group, the timing parameters corresponding to each register in the second parameter group are configured to the corresponding register. The second register group includes a first register, a second register and a third register. The first register is used to store the timing parameters of the second frequency point in the control logic, the second register is used to store the timing parameters of the second frequency point in the physical layer interface, and the third register is used to store the timing parameters of the second frequency point in the memory particle.
[0301] In a possible implementation, the configuration module includes:
[0302] A fourth determining unit is used to determine a third parameter group in the parameter group set predicted according to the prediction rule, wherein a frequency point corresponding to the third parameter group is greater than the first frequency point;
[0303] The third configuration unit is used to configure the third parameter group to the second register group.
[0304] It should be noted that for the functional explanation of each component in the frequency switching device provided in this embodiment, please refer to the explanation in the aforementioned method embodiment, and no further elaboration will be given in this embodiment.
[0305] In this embodiment, the register group of the target storage module includes a first register group used for the currently executed task and at least one second register group not used for the currently executed task. The target storage module is controlled to execute the task based on the first parameter group configured in the first memory set, the first parameter group corresponding to the first frequency point; the parameter group set predicted according to the prediction rule is configured to at least one second register group, the predicted parameter group set includes parameter groups of one or more frequency points that may be used at a future moment; when a frequency switching instruction for controlling the target storage module to switch the working frequency to the second frequency point is received, if the frequency point corresponding to the predicted parameter group set includes the second frequency point, the target register group corresponding to the second frequency point is determined in the at least one second register group, and the register group used by the target storage module is controlled to switch from the first register group to the target register group, so as to execute the task based on the second parameter group configured in the target register group. In this solution, the number of register groups in the target storage module is limited, the structure of the target storage module is simplified, and the parameter group of the frequency point that can be used at the predicted future moment is configured in advance to each second register group outside the back pressure time. When switching to the working frequency point later, the probability of hitting the second frequency point is increased and the back pressure time is reduced.
[0306] The present application also provides an electronic device in an embodiment. Fig.15As shown, it shows a schematic diagram of the structure of an electronic device suitable for implementing the embodiment of the present application. The electronic device in the embodiment of the present application may include but is not limited to fixed terminals such as mobile phones, laptops, PDAs (personal digital assistants), PADs (tablet computers), desktop computers, etc. Fig.15 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0307] like Fig.15 As shown, the electronic device may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 1501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1502 or a program loaded from a storage device 1508 to a random access memory (RAM) 1503. When the electronic device is powered on, various programs and data required for the operation of the electronic device are also stored in the RAM 1503. The processing device 1501, the ROM 1502, and the RAM 1503 are connected to each other via a bus 1504. An input / output (I / O) interface 1505 is also connected to the bus 1504.
[0308] Typically, the following devices may be connected to the I / O interface 1505: an input device 1506 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 1507 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 1508 including, for example, a memory card, a hard disk, etc.; and a communication device 1509. The communication device 1509 may allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. Although Fig.15 An electronic device having various devices is shown, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0309] An embodiment of the present application also provides a computer program product including computer-readable instructions. When the computer-readable instructions are executed on an electronic device, the electronic device implements any frequency switching method provided in the embodiment of the present application.
[0310] A computer-readable storage medium is also provided in an embodiment of the present application. The storage medium carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement any frequency switching method provided in the embodiment of the present application.
[0311] It should also be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the drawings of the device embodiments provided by the present application, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines.
[0312] Through the description of the above implementation mode, the technicians in the field can clearly understand that the present application can be implemented by means of software plus necessary general hardware, and of course, it can also be implemented by special hardware including special integrated circuits, special CPUs, special memories, special components, etc. In general, all functions completed by computer programs can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be various, such as analog circuits, digital circuits or special circuits. However, for the present application, software program implementation is a better implementation mode in more cases. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a readable storage medium, such as a computer floppy disk, a U disk, a mobile hard disk, a ROM, a RAM, a disk or an optical disk, etc., including a number of instructions to enable a computer device (which can be a personal computer, a training device, or a network device, etc.) to execute the method of each embodiment of the present application.
[0313] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.
[0314] The computer program product includes one or more computer instructions. When the computer program instruction is loaded and executed on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instruction can be stored in a computer-readable storage medium, or transmitted from a computer-readable storage medium to another computer-readable storage medium. For example, the computer instruction can be transmitted from a website site, a computer, a training device, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, training device, or data center. The computer-readable storage medium can be any available medium that a computer can store or a data storage device such as a training device, a data center, etc. that includes one or more available media integration. The available medium can be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)), etc.
Claims
1. A frequency switching method, comprising: Controlling the target storage module to perform a task based on a first parameter group configured in the first register group, wherein the first parameter group corresponds to a first frequency point; The parameter group set predicted according to the prediction rule is configured to correspond to at least one second register group, wherein the parameter group set includes at least one parameter group, and different parameter groups correspond to different frequency points; receiving a frequency switching instruction, wherein the frequency switching instruction is used to control the target storage module to switch the working frequency to a second frequency; Based on the frequency points corresponding to the parameter group set including the second frequency point, determining a target register group corresponding to the second frequency point in at least one second register group; The target storage module is controlled to execute a task based on a second parameter group configured in the target register group.
2. The frequency switching method according to claim 1, further comprising: Based on the frequency corresponding to the parameter group set not including the second frequency, obtaining a target parameter group corresponding to the second frequency; configuring the target parameter set to a target second register set, the target second register set belonging to the at least one second register set; The target storage module is controlled to execute a task based on the target parameter group in the target second register group.
3. The frequency switching method according to claim 1, wherein the frequency corresponding to the parameter group set includes the second frequency, and determining a target register group corresponding to the second frequency in at least one second register group comprises: According to the second frequency indicated by the frequency switching instruction, based on finding the target parameter group corresponding to the second frequency in the configuration record, determining that the parameter group corresponding to the second frequency has been configured to the second register group, the configuration record further including the register group configured by each parameter group; A target register group corresponding to the second frequency point is determined in at least one second register group.
4. The frequency switching method according to claim 3, after the control target storage module performs the task based on the second parameter group configured in the target register group, further comprising: Obtaining a target application scenario after the target storage module switches the operating frequency point; Counting the configuration hit rate in the target application scenario, where the configuration hit rate represents the probability that the parameter group corresponding to the second frequency point is configured to the second register group and is hit by the frequency point switching instruction; The target application scenario, the second frequency point, and the configuration hit rate are recorded to obtain a configuration record.
5. The frequency switching method according to claim 4, wherein the step of configuring the parameter group set predicted according to the prediction rule to correspond to at least one second register group comprises: Get the current application scenario of the target storage module; Predicting future application scenarios at future moments based on the current application scenarios; Determine, based on the configuration record, a set of parameter groups whose configuration hit rate meets the selection condition in future application scenarios; The parameter set is configured to at least one second register set.
6. The frequency switching method according to claim 1, wherein the parameter group set predicted according to the prediction rule is configured to correspond to at least one second register group, comprising: Get the current application scenario of the target storage module; Predicting a future application scenario of the target storage module based on the current application scenario and the work history information of the target storage module; Based on the future application scenario of the target storage module, predict at least one frequency point used by the target storage module in the future application scenario; The parameter group set corresponding to the at least one frequency point is configured correspondingly to at least one second register group.
7. The frequency switching method according to claim 1, wherein the parameter group set predicted according to the prediction rule is configured to correspond to at least one second register group, comprising: According to the address of each register in the second register group, the timing parameters corresponding to each register in the second parameter group are configured to the corresponding register, the second register group includes a first register, a second register and a third register, the first register is used to store the timing parameters of the second frequency point in the control logic, the second register is used to store the timing parameters of the second frequency point in the physical layer interface, and the third register is used to store the timing parameters of the second frequency point in the memory particle.
8. The frequency switching method according to claim 1, wherein the parameter group set predicted according to the prediction rule is configured to correspond to at least one second register group, comprising: Determine a third parameter group in the parameter group set predicted according to the prediction rule, wherein the frequency point corresponding to the third parameter group is greater than the first frequency point; The third parameter group is configured to the second register group.
9. A frequency switching device, comprising: A control module, used for controlling the target storage module to perform a task based on a first parameter group configured in the first register group, wherein the first parameter group corresponds to a first frequency point; A configuration module, used to configure a parameter group set predicted according to the prediction rule to correspond to at least one second register group, wherein the parameter group set includes at least one parameter group, and different parameter groups correspond to different frequency points; A receiving module, used for receiving a frequency switching instruction, wherein the frequency switching instruction is used for controlling the target storage module to switch the working frequency to a second frequency; a determination module, configured to determine, based on the frequency points corresponding to the parameter group set including the second frequency point, a target register group corresponding to the second frequency point in at least one second register group; The execution module is used to control the target storage module to execute the task based on the second parameter group configured in the target register group.
10. A computer program product, comprising computer-readable instructions, which, when executed on an electronic device, enables the electronic device to implement the frequency switching method according to any one of claims 1 to 8.