Methods, apparatus and related products for determining frequency offset and frequency adjustment

CN122757084APending Publication Date: 2026-09-15NANJING ILUVATAR COREX TECH CO LTD (DBA ILUVATAR COREX INC NANJING)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610968650.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-01
Publication Date
2026-09-15

Smart Images

  • Figure CN122757084A_ABST
    Figure CN122757084A_ABST
Patent Text Reader

Abstract

This application provides a method, apparatus, and related products for determining frequency offset and frequency adjustment, relating to the processor field. The method includes: setting the processor's operating voltage equal to a first alternative voltage and running a first preset test sample a first preset number of times, while controlling the processor's operating frequency to alternate between an initial frequency and a first target frequency during operation. If the current operation of the first preset test sample is all normal, the first preset voltage is reduced based on the corresponding first alternative voltage to obtain the first alternative voltage for the next operation. This process is repeated until an abnormal operation occurs in one of the first preset test samples. The frequency drift of the processor between the initial frequency and the first target frequency is determined based on the first target voltage. This allows for automatic determination of frequency drift, improving the efficiency of frequency drift determination.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of processors, and more specifically, to a method, apparatus, and related products for determining frequency offset and adjusting frequency. Background Technology

[0002] When adjusting a processor's frequency, the process typically involves moving from the current frequency to the target frequency. However, frequency drift can occur during this adjustment process; that is, while adjusting from the current frequency to the target frequency, the operating frequency may sometimes remain at a higher frequency than the target. To ensure the processor functions correctly, frequency drift must be considered when setting the processor's operating voltage.

[0003] In related technologies, an oscilloscope is usually connected to the processor, and different frequencies are applied to the processor. Technicians then observe the values ​​on the oscilloscope to determine the frequency drift.

[0004] However, manually determining the frequency drift between different frequencies is inefficient and wastes manpower. Summary of the Invention

[0005] The purpose of this application is to provide a method, apparatus, and related products for determining frequency offset and frequency adjustment, so as to solve the problem of low efficiency in determining frequency drift in related technologies.

[0006] This application provides a method for determining frequency offset, including: setting the processor's operating voltage to equal a first alternative voltage and running a first preset test sample a first preset number of times, and controlling the processor's operating frequency to alternate between an initial frequency and a first target frequency during the operation; the initial value of the first alternative voltage is the sum of the voltage corresponding to the higher frequency of the initial frequency and the first target frequency and a set voltage.

[0007] If the operation of the first preset test sample is normal in the current run, the first preset voltage is reduced based on the first alternative voltage corresponding to the current run to obtain the first alternative voltage for the next run. The above process is repeated until there is an abnormal operation of the first preset test sample. The frequency drift of the processor between the initial frequency and the first target frequency is determined according to the first target voltage. The first target voltage is the first alternative voltage corresponding to the previous abnormal operation.

[0008] Considering the mapping relationship between frequency and voltage, in the above embodiment, the alternating switching of the processor's operating frequency between an initial frequency and a first target frequency provides a basis for generating frequency drift. By continuously adjusting the processor's operating voltage, a first alternative voltage is determined to cause abnormal operation in the first preset test sample. At this point, it is evident that the current first alternative voltage cannot reach the minimum operating voltage of the current frequency, thereby determining the minimum operating voltage of the current frequency. Furthermore, based on the mapping relationship between frequency and voltage, the extent of frequency drift can be automatically determined.

[0009] In this way, by automatically determining the amount of frequency drift, there is no need for manual judgment using an oscilloscope, which improves the efficiency of determining frequency drift and reduces labor costs.

[0010] Further, determining the frequency drift of the processor between the initial frequency and the first target frequency based on the first target voltage includes: finding a first alternative frequency corresponding to the first target voltage in a preset frequency-voltage relationship; taking the difference between the first alternative frequency and the second alternative frequency as the frequency drift; the second alternative frequency is the higher frequency between the initial frequency and the first target frequency.

[0011] In the above embodiments, by pre-determining the frequency-voltage relationship, the corresponding first alternative frequency can be obtained simply by finding the first target voltage, which is simple and convenient.

[0012] Furthermore, the voltage corresponding to the higher frequency between the initial frequency and the first target frequency is determined by searching for the voltage corresponding to a second candidate frequency in a preset frequency-voltage relationship; the second candidate frequency is the higher frequency between the initial frequency and the first target frequency.

[0013] In the above embodiments, by pre-determining the frequency-voltage relationship, the corresponding voltage can be obtained simply by finding the higher frequency between the initial frequency and the first target frequency, which is simple and convenient.

[0014] Further, the method for determining frequency offset includes: acquiring parameters to be measured; a set of parameters to be measured includes a frequency to be measured and a voltage to be measured corresponding to the frequency to be measured. A preset test process is performed on the parameters to be measured, the preset test process including: running a second preset test sample with the processor's operating voltage equal to a second alternative voltage, the processor's operating frequency equal to the frequency to be measured corresponding to the set of parameters to be measured, and running the sample a second preset number of times; if the current running condition of the second preset test sample is normal, the second preset voltage is reduced based on the current corresponding second alternative voltage to obtain the second alternative voltage for the next run, and the aforementioned process is repeated until there is an abnormal running condition of the second preset test sample, establishing a correlation between the frequency to be measured and a second target voltage; the initial value of the second alternative voltage is equal to the voltage to be measured corresponding to the set of parameters to be measured; the second target voltage is the second alternative voltage corresponding to the previous abnormal running condition; A new parameter to be measured is determined based on the frequency to be measured corresponding to the parameter to be measured and the second target voltage, and a preset test process is performed on the new parameter to be measured; the set of correlations between different frequencies to be measured and the corresponding second target voltages is the frequency-voltage relationship.

[0015] Considering that the operating frequency typically corresponds to a minimum voltage required for the test sample to operate normally—that is, at a given operating frequency, the operating voltage must be at least greater than or equal to the minimum voltage for the test sample to function correctly—in the above implementation, by continuously lowering the operating voltage and combining this with the operating conditions of the test sample, the minimum voltage at different operating frequencies can be automatically and accurately determined.

[0016] Furthermore, determining new test parameters based on the test frequency and second target voltage corresponding to the test parameters includes: acquiring the test frequency corresponding to the test parameters and the second target voltage corresponding to the test frequency; increasing the test frequency by a first preset frequency to obtain a new test frequency; increasing the second target voltage by a third preset voltage to obtain a test voltage corresponding to the new test frequency; and using the new test frequency and the test voltage corresponding to the new test frequency as a new set of test parameters.

[0017] In the above implementation, it is considered that the voltage change will not be abrupt as the frequency increases. Therefore, determining the new test parameter based on the test frequency corresponding to the test parameter and the second target voltage corresponding to the test frequency makes it easier for the test voltage corresponding to the new test frequency to be closer to the second target voltage corresponding to the new test frequency during subsequent testing, thereby balancing test efficiency and accuracy.

[0018] Furthermore, the first preset test sample is obtained through the following method: acquiring multiple candidate test samples; for each candidate test sample: setting the processor's operating voltage equal to a third candidate voltage, the processor's operating frequency equal to a first set frequency, and running the candidate test sample a third preset number of times; if the current running condition of the candidate test sample is normal operation, reducing the third candidate voltage by a fourth preset voltage based on the current corresponding third candidate voltage to obtain the third candidate voltage for the next run, repeating the aforementioned process until there is a candidate test sample whose running condition is abnormal, and determining the third target voltage as the lowest operating voltage of the candidate test sample; the third target voltage is the third candidate voltage corresponding to the previous abnormal operation. The candidate test sample corresponding to the highest lowest operating voltage is taken as the first preset test sample.

[0019] Considering that it is impossible to predict what kind of programs the processor will actually encounter during operation, the above implementation uses the worst-case program as the test case, that is, the program with the larger voltage drop. This ensures that the measured frequency drift is compatible with most programs during use.

[0020] Furthermore, the method for determining frequency offset also includes: updating the initial frequency and the first target frequency, repeating the aforementioned steps to obtain a first target voltage of the processor between the updated initial frequency and the updated first target frequency; establishing a frequency drift voltage correlation relationship based on the initial frequency, the first target frequency, and the first target voltage, and recording the frequency drift voltage correlation relationship in a preset frequency voltage drift database.

[0021] In the above embodiments, by measuring multiple initial frequencies and first target frequencies, and establishing frequency drift voltage correlation based on the initial frequencies, first target frequencies, and first target voltages, and recording them in a preset frequency voltage drift database, it is convenient to directly use the frequency drift voltage correlation in the future.

[0022] Furthermore, establishing a frequency drift voltage correlation based on the initial frequency, the first target frequency, and the first target voltage includes: for each set of parameters to be established: calculating the difference between the first target frequency and the initial frequency to obtain the sample step frequency; calculating the difference between the first target voltage and the first voltage to be adjusted to obtain the sample step voltage; and using the sum of the sample step voltage and a preset safety voltage as the sample step increment voltage corresponding to the sample step frequency. A set of parameters to be established includes: a first target frequency, an initial frequency, and a first target voltage corresponding to both the first target frequency and the initial frequency; the first voltage to be adjusted is the voltage corresponding to the higher of the initial frequency and the first target frequency. Each sample step frequency and the corresponding sample step increment voltage are used as the frequency drift voltage correlation.

[0023] In the above implementation, considering that the sample step increment voltages corresponding to the same sample step frequency are not significantly different, recording each sample step frequency and the sample step increment voltage corresponding to each sample step frequency can facilitate subsequent frequency and voltage adjustment of the processor based on the step frequency.

[0024] This application provides a frequency adjustment method applied to a frequency modulation and voltage regulation module. The frequency modulation and voltage regulation module is connected to a processor, and the processor includes a phase-locked loop (PLL). The frequency adjustment method includes: acquiring the processor's current frequency, a second target frequency, and a step frequency to be adjusted; the step frequency to be adjusted is less than the difference between the second target frequency and the current frequency; searching for the step increment voltage corresponding to the step frequency to be adjusted in a preset frequency-voltage drift database; and using the sum of the second voltage to be adjusted and the step increment voltage to be adjusted as a first target voltage to be adjusted; the second voltage to be adjusted is the voltage corresponding to the higher of the current frequency and the second target frequency. First, the processor's operating voltage is adjusted to the first target voltage to be adjusted, and then the PLL is used to adjust the processor's operating frequency at least once according to the step frequency to be adjusted, until the processor's operating frequency is adjusted to the second target frequency.

[0025] In the above implementation, during frequency adjustment, the phase-locked loop is not disabled, nor is the clock source switched to the reference clock. Instead, the phase-locked loop is directly used to participate in the processor's frequency adjustment. As a result, during frequency adjustment, the processor can always operate with the high-frequency clock provided by the phase-locked loop, effectively reducing the possibility of the clock frequency used by the processor being too low or even zero due to switching the clock source during the adjustment of the operating frequency. This can reduce the abnormalities that may occur during the processor's frequency and voltage adjustment process.

[0026] This application provides an apparatus for determining frequency offset, comprising: a testing module, configured to run a first preset test sample with the processor's operating voltage equal to a first alternative voltage for a first preset number of times, and during the operation, control the processor's operating frequency to alternately switch between an initial frequency and a first target frequency; the initial value of the first alternative voltage is the sum of the voltage corresponding to the higher of the initial frequency and the first target frequency and a set voltage; and a judging module, configured to, if the current operation of the first preset test sample is normal, reduce the first preset voltage based on the first alternative voltage corresponding to the current operation to obtain the first alternative voltage for the next operation, repeat the aforementioned process until there is an abnormal operation of the first preset test sample, and determine the frequency drift of the processor between the initial frequency and the first target frequency based on the first target voltage; the first target voltage is the first alternative voltage corresponding to the previous abnormal operation.

[0027] This application provides a frequency adjustment device applied to a frequency modulation and voltage regulation module. The frequency modulation and voltage regulation module is connected to a processor, and the processor includes a phase-locked loop (PLL). The frequency adjustment device includes: an acquisition module for acquiring the current frequency, a second target frequency, and a step frequency to be adjusted of the processor; the step frequency to be adjusted is less than the difference between the second target frequency and the current frequency; a search module for searching a preset frequency-voltage drift database for the step voltage increment to be adjusted corresponding to the step frequency to be adjusted; the frequency-voltage drift database is obtained by the above method; a determination module for taking the sum of the second voltage to be adjusted and the step voltage increment to be adjusted as a first target voltage to be adjusted; the second voltage to be adjusted is the voltage corresponding to the higher frequency between the current frequency and the second target frequency; and an adjustment module for first adjusting the operating voltage of the processor to the first target voltage to be adjusted, and then using the PLL to adjust the operating frequency of the processor at least once according to the step frequency to be adjusted, until the operating frequency of the processor is adjusted to the second target frequency.

[0028] This application provides a storage medium storing computer-executable instructions. When the computer-executable instructions are called and executed by a main control processor, the computer-executable instructions cause the main control processor to implement the above-described method for determining frequency offset or the above-described method for frequency adjustment.

[0029] This application provides a processor, including: a functional module; a phase-locked loop connected to the functional module for providing a clock signal corresponding to the operating frequency of the functional module; and a frequency and voltage modulation module connected to the phase-locked loop for executing the frequency adjustment method described above.

[0030] This application provides an electronic device including the processor described above.

[0031] The above general description and the description below are exemplary and illustrative only and are not intended to limit this application. Attached Figure Description

[0032] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0033] Figure 1 A flowchart illustrating a method for determining frequency offset provided in an embodiment of this application; Figure 2 A flowchart illustrating a method for determining the minimum operating voltage of candidate test samples, provided in an embodiment of this application; Figure 3 A flowchart illustrating a frequency adjustment method provided in an embodiment of this application; Figure 4 A flowchart illustrating another frequency adjustment method provided in an embodiment of this application; Figure 5 This is a schematic diagram of the structure of a processor provided in an embodiment of this application.

[0034] Figure label: 1: Processor; 2: Functional module; 3: Phase-locked loop; 4: Frequency and voltage regulation module. Detailed Implementation

[0035] The technical solutions in the embodiments of this application will now be described with reference to the accompanying drawings.

[0036] The following explanations are provided for some of the technical terms appearing in this application: A phase-locked loop (PLL) is an electronic circuit commonly used in clock generation, frequency synthesis, signal recovery, frequency modulation and demodulation, and frequency multiplexing applications. A PLL is a feedback system in which a voltage-controlled oscillator (VCO) and a phase comparator are interconnected, allowing the oscillator to maintain a constant phase angle relative to a reference signal. PLLs can be used to generate stable high-frequency output signals from fixed low-frequency signals.

[0037] To address the problem of improving the efficiency of determining frequency drift, embodiments of this application provide a method for determining frequency offset. See also... Figure 1 As shown, Figure 1 This is a basic flowchart illustrating the method for determining frequency offset provided in the embodiments of this application, including: S101, make the processor's operating voltage equal to the first alternative voltage and run the first preset test sample a first preset number of times, and control the processor's operating frequency to alternate between the initial frequency and the first target frequency during the operation.

[0038] In this embodiment, the initial value of the first alternative voltage is the sum of the voltage corresponding to the higher frequency of the initial frequency and the first target frequency, and the set voltage.

[0039] Optionally, a technician can estimate the maximum frequency drift based on experience, estimate the incremental voltage resulting from this maximum frequency drift, and set a set voltage greater than this incremental voltage. The set voltage could be, for example, 80mV, 100mV, etc.

[0040] In this embodiment, the larger the first preset number of times, the more accurate the test results. The first preset number of times can be set by a technician based on experience, for example, 10,000 times.

[0041] In one embodiment, the frequency can be switched once at preset intervals during operation.

[0042] The shorter the preset duration, the more times the frequency switches, and the higher the accuracy of the measured frequency drift. The preset duration can be set by technicians based on experience, for example, 1 millisecond.

[0043] For example, the processor continuously runs the first preset test case repeatedly, and every 1 millisecond, if the current operating frequency of the processor is the initial frequency, the processor's operating frequency is switched from the initial frequency to the first target frequency. If the current operating frequency of the processor is the first target frequency, the processor's operating frequency is switched from the first target frequency to the initial frequency.

[0044] In this embodiment of the application, the first preset test case may be a poor application.

[0045] Alternatively, processors typically have many functional modules that work together. Some applications may only use some of the functional modules within the processor. An application that allows all functional modules to work at the same time as much as possible can be considered a bad application.

[0046] Alternatively, applications with the largest voltage drop (IR drop) can be considered poor applications.

[0047] In one embodiment, the first preset test sample can be obtained by acquiring multiple candidate test samples. For each candidate test sample: the processor's operating voltage is equal to the third candidate voltage, the processor's operating frequency is equal to the first set frequency, and the candidate test sample is run a third preset number of times; if the candidate test sample runs normally in each run, the third candidate voltage is reduced by a fourth preset voltage based on the corresponding third candidate voltage to obtain the third candidate voltage for the next run, and the above process is repeated until there is a candidate test sample that runs abnormally, and the third target voltage is determined as the minimum operating voltage of the candidate test sample.

[0048] The candidate test sample corresponding to the highest minimum operating voltage is used as the first preset test sample.

[0049] The third target voltage is the third alternative voltage corresponding to the previous abnormal operation of the alternative test sample.

[0050] Optionally, the first set frequency can be set by a technician based on experience. For example, the first set frequency can be equal to the initial frequency, the first set frequency can be equal to the first target frequency, or the first set frequency can be equal to the frequency between the initial frequency and the first target frequency.

[0051] Optionally, a technician can set the initial value of the third alternative voltage based on experience; for example, the third alternative voltage may be greater than the minimum voltage of the first set frequency. This allows the processor to operate normally while providing room for voltage adjustment.

[0052] Optionally, the larger the third preset number of times, the more accurate the test results. The third preset number of times can be set by technicians based on experience, for example: 10,000 times.

[0053] Optionally, the smaller the value of the fourth preset voltage, the more accurate the measured minimum operating voltage of the alternative test sample. The fourth preset voltage can be set by technicians based on experience, for example: 5mV.

[0054] Combination Figure 2 As shown, by way of example, this application provides a scheme for determining the lowest operating voltage of an alternative test sample, including: S201, set the processor's operating voltage to the third alternative voltage, the processor's operating frequency to the first set frequency, and run the alternative test sample for the third preset number of times, and then execute S202.

[0055] S202, determine whether the running status of the candidate test samples running for the third preset number of times is normal. If the running status is normal, then execute S203; if there is a running status that is abnormal, then execute S204.

[0056] S203, based on the third alternative voltage corresponding to the current operation, reduce the fourth preset voltage to obtain the third alternative voltage for the next operation, and then execute S201.

[0057] S204, the third target voltage is determined as the lowest operating voltage of the candidate test sample; the third target voltage is the third candidate voltage corresponding to the previous test.

[0058] In some embodiments, the voltage corresponding to the higher frequency between the initial frequency and the first target frequency is determined by searching for the voltage corresponding to the second alternative frequency in a preset frequency-voltage relationship.

[0059] The second alternative frequency is the higher of the initial frequency and the first target frequency.

[0060] The preset frequency-voltage relationship stores the correlation between frequency and voltage. During a search, the frequency that matches the second candidate frequency in the frequency-voltage relationship is found, and the voltage associated with that same frequency is taken as the voltage corresponding to the second candidate frequency.

[0061] S102, if the current first preset test sample is running normally, reduce the first preset voltage based on the current first alternative voltage to obtain the first alternative voltage for the next run, repeat the above process until there is a first preset test sample that is running abnormally, and determine the frequency drift of the processor between the initial frequency and the first target frequency based on the first target voltage.

[0062] In this embodiment of the application, the first target voltage is the first alternative voltage corresponding to the previous abnormal operation of the first preset test sample.

[0063] Optionally, the smaller the value of the first preset voltage, the more accurate the measured first target voltage. The first preset voltage can be set by a technician based on experience, for example, 5mV.

[0064] In some embodiments, the operation status of the first preset test sample can be determined as normal or abnormal by: obtaining the operation result after running the first preset test sample; comparing the operation result with the preset result; if the operation result is the same as the preset result, the operation status of the first preset test sample is considered to be normal; if the operation result is different from the preset result, the operation status of the first preset test sample is considered to be abnormal.

[0065] Optionally, the preset results can be determined in advance by technicians through testing and stored in a designated location on the processor. Each time the processor runs the first preset test case, it records the result of that test case. This result is compared with the preset result in the designated location to obtain the running status of that first preset test case.

[0066] In some embodiments, determining the frequency drift of the processor between the initial frequency and the first target frequency based on the first target voltage may involve: finding a first alternative frequency corresponding to the first target voltage in a preset frequency-voltage relationship; and using the difference between the first alternative frequency and the second alternative frequency as the frequency drift.

[0067] During the search, the voltage that is the same as the first target voltage in the frequency-voltage relationship is searched, and the frequency associated with the same voltage is taken as the first candidate frequency corresponding to the first target voltage.

[0068] Frequency-voltage relationships can be constructed by technicians through manual experiments or automatically.

[0069] In some embodiments, a set of parameters to be measured includes a frequency to be measured and a voltage to be measured corresponding to that frequency. The frequency-voltage relationship can be constructed as follows: acquire the parameters to be measured, and perform a preset test procedure on the parameters to be measured. After performing the test procedure, determine new parameters to be measured based on the frequency to be measured corresponding to the parameters to be measured and a second target voltage, and perform a preset test procedure on the new parameters to be measured. The set of correlations between different frequencies to be measured and their corresponding second target voltages constitutes the frequency-voltage relationship.

[0070] The preset test process includes: setting the processor's operating voltage to equal the second alternative voltage, the processor's operating frequency to equal the frequency to be tested corresponding to the set of parameters to be tested, and running the second preset test sample a second preset number of times; if the current second preset test sample runs normally, the second preset voltage is reduced based on the current corresponding second alternative voltage to obtain the second alternative voltage for the next run, and the above process is repeated until there is a second preset test sample that runs abnormally, thus establishing the correlation between the frequency to be tested and the second target voltage.

[0071] The initial value of the second alternative voltage is equal to the voltage to be measured corresponding to the parameter to be measured calculated in the preset test process.

[0072] The second target voltage is the second alternative voltage corresponding to the previous abnormal operation of the second preset test sample.

[0073] Optionally, the second preset test sample is the same as the first preset test sample. Of course, the second preset test sample can also be determined by filtering the first preset test sample.

[0074] Optionally, the larger the second preset number of tests, the more accurate the test results. The second preset number of tests can be set by technicians based on experience, for example, 10,000 tests.

[0075] Optionally, the smaller the value of the second preset voltage, the more accurate the measured second target voltage. The second preset voltage can be set by a technician based on experience, for example, 5mV.

[0076] In one embodiment, determining a new test parameter based on the test frequency and the second target voltage corresponding to the test parameter includes: acquiring the test frequency corresponding to the test parameter and the second target voltage corresponding to the test frequency; increasing a first preset frequency based on the test frequency to obtain a new test frequency; increasing a third preset voltage based on the second target voltage to obtain a test voltage corresponding to the new test frequency; and using the new test frequency and the test voltage corresponding to the new test frequency as a new set of test parameters.

[0077] Optionally, a technician may determine the first preset frequency based on the frequency value commonly used by the processor. A third preset voltage may be determined by the technician based on experience.

[0078] For example, assuming the first preset frequency is 25 MHz, the third preset voltage can be 40 mV. Assuming the first preset frequency is 50 MHz, the third preset voltage can be 60 mV.

[0079] Considering that the processor's operating frequency and operating voltage have upper limits, if the new test frequency is greater than the set upper limit frequency, or the test voltage corresponding to the new test frequency is greater than the set upper limit voltage, then the determination of the new test parameter will stop.

[0080] For example, the upper frequency limit can be set by the technician based on the maximum frequency that the processor can support, such as 1500MHz. The upper voltage limit can be set by the technician based on the maximum voltage that the processor can support, such as 1.1V.

[0081] For example, suppose a set of parameters to be measured includes a frequency of 500MHz and a voltage of 700mV. The processor operates at a voltage of 700mV and a frequency of 500MHz, and a second preset test case is run 10,000 times. If all 10,000 runs of the second preset test case are normal, the voltage is reduced by 5mV from 700mV to obtain a new voltage of 695mV. The processor operates at a voltage of 695mV and a frequency of 500MHz, and the second preset test case is run 10,000 times. If all 10,000 runs of the second preset test case are normal, the voltage is reduced by 5mV from 695mV to obtain a new voltage of 690mV. The processor operates at a voltage of 690mV and a frequency of 500MHz, and the second preset test case is run 10,000 times. Repeat the aforementioned process until the operating voltage of the control processor equals 605mV and the operating frequency of the control processor equals 500MHz, and run the second preset test case 10,000 times. If there is any abnormal operation during the 10,000 runs of the second preset test case, then when the chip's test frequency is 500MHz, the second target voltage is 610mV.

[0082] Assume the first preset frequency is 25MHz and the third preset voltage is 40mV. Increasing the target frequency of 500MHz by 25MHz yields a new target frequency of 525MHz. Increasing the second target voltage corresponding to this target frequency by 40mV yields a new target voltage of 650MHz. Using the target frequency of 525MHz and the target voltage of 650MHz as a new set of test parameters, the above test procedure is executed.

[0083] In another embodiment, the frequency-voltage relationship can be constructed by acquiring multiple sets of parameters to be measured and performing a preset test procedure for each set of parameters. The set of correlations between the measured frequency and the corresponding second target voltage constitutes the frequency-voltage relationship.

[0084] At this point, technicians directly set the voltage to be measured corresponding to the frequency in each set of parameters to be measured. Since all the parameters to be measured are known from the beginning, multiple sets of parameters can be measured in parallel, improving testing efficiency. Furthermore, the testing processes of different sets of parameters do not affect each other; even if there is an anomaly in the testing process of one set of parameters, it will not affect the testing process of other parameters.

[0085] Considering that exhaustively measuring all possible frequencies and testing each one would take too long, we can measure the second target voltage corresponding to multiple frequencies and determine the second target voltage corresponding to the unmeasured frequencies through fitting. For example, the least squares method can be used for fitting.

[0086] Considering that the voltage-frequency mapping curve is not linear, meaning that the curve trend is not fixed throughout the entire operating range, piecewise fitting can be used to determine the relationship between frequency and voltage as accurately as possible.

[0087] For example, suppose the frequency-voltage relationship is stored in tabular form, as shown in Tables 1 and 2, both of which are frequency-voltage relationship mapping tables. As shown in Table 1, assuming the frequency to be measured is 500MHz, the corresponding second target voltage is 610mV. As shown in Table 2, assuming the frequency to be measured is 1100MHz, the corresponding second target voltage is 720mV.

[0088] Table 1

[0089] Table 2

[0090] For example, assume the initial frequency is F1, the first target frequency is F2, and the initial value of the first alternative voltage is Vtest. The processor's operating voltage is set to Vtest, and the processor continuously runs the first preset test case. During the continuous running of the first preset test case, the processor switches its operating frequency every 1 millisecond, alternating between the initial frequency F1 and the first target frequency F2.

[0091] During the repeated execution of the first preset test case by the processor, every 10,000 runs of the first preset test case, if all 10,000 runs are normal, the voltage Vtest is decreased by 5mV to obtain a new Vtest. If any abnormal operation occurs during the 10,000 runs of the first preset test case, the voltage Vtest is increased by 5mV to obtain the first target voltage.

[0092] Find the first candidate frequency corresponding to the first target voltage in the preset frequency-voltage relationship, and take the difference between the first candidate frequency and the second candidate frequency as the frequency drift.

[0093] After determining the frequency drift, the correlation between at least some of the frequency drift-related parameters can be stored so that the corresponding correlation can be directly used in the subsequent frequency and voltage adjustment process of the chip.

[0094] In some embodiments, the method for determining frequency offset further includes: updating the initial frequency and the first target frequency, repeating the foregoing steps, obtaining a first target voltage of the processor between the updated initial frequency and the updated first target frequency; establishing a frequency drift voltage correlation relationship based on the initial frequency, the first target frequency, and the first target voltage, and recording the frequency drift voltage correlation relationship in a preset frequency voltage drift database.

[0095] Optionally, any two frequencies to be measured can be used as the updated initial frequency and the updated first target frequency.

[0096] In one embodiment, the set of parameters to be established includes: a first target frequency, an initial frequency, and a first target voltage corresponding to both the first target frequency and the initial frequency. The first voltage to be adjusted is the voltage corresponding to the higher of the initial frequency and the first target frequency.

[0097] Establishing a frequency drift voltage correlation based on the initial frequency, first target frequency, and first target voltage includes: for each set of parameters to be established: calculating the difference between the first target frequency and the initial frequency to obtain the sample step frequency; calculating the difference between the first target voltage and the first voltage to be adjusted to obtain the sample step voltage; and using the sum of the sample step voltage and the preset safety voltage as the sample step increment voltage corresponding to that sample step frequency. The frequency drift voltage correlation is established by relating each sample step frequency to the corresponding sample step increment voltage.

[0098] For safety reasons, a certain voltage margin is usually reserved for the voltage that needs to be adjusted; this margin is called the safety voltage. The safety voltage can be set by technicians based on experience, and is typically set to 50mV.

[0099] In this way, by directly adding a safety voltage when designing the frequency drift voltage correlation, the safety voltage does not need to be calculated separately during the subsequent frequency and voltage regulation process of the chip, which can reduce the amount of calculation.

[0100] For example, a frequency-voltage drift database can be created based on the step frequencies that may be used in subsequent chip frequency and voltage modulation processes. For instance, suppose the subsequent step frequencies to be adjusted might be 25MHz, 50MHz, 75MHz, and 100MHz. Considering that, generally, the higher the chip's operating frequency, the higher the operating voltage, and the increasing trend is higher than the frequency, the initial frequency can be 1275MHz, and the first target frequency can be 1300MHz, thus establishing the sample step increment voltage corresponding to 25MHz. The initial frequency can be 1250MHz, and the first target frequency can be 1300MHz, thus establishing the sample step increment voltage corresponding to 50MHz. The initial frequency can be 1225MHz, and the first target frequency can be 1300MHz, thus establishing the sample step increment voltage corresponding to 75MHz. The initial frequency can be set to 1200MHz, and the first target frequency to 1300MHz, thereby establishing the sample step increment voltage corresponding to 100MHz.

[0101] For convenience, the sample step increment voltage corresponding to the largest adjustable step frequency can be used directly in subsequent frequency and voltage modulation. Assuming the largest adjustable step frequency is 100MHz, then only the sample step increment voltage of 1200MHz-1300MHz needs to be measured.

[0102] In another embodiment, establishing a frequency drift voltage correlation based on the initial frequency, the first target frequency, and the first target voltage includes: using the correspondence between the initial frequency, the first target frequency, and the first target voltage as the frequency drift voltage correlation.

[0103] Thus, the frequency drift was determined by the change in voltage. Therefore, the change in voltage itself can reflect the voltage increment corresponding to the frequency drift. So, in the subsequent frequency and voltage adjustment process of the chip, the sum of the first target voltage and the safety voltage can be used directly.

[0104] This application also provides a frequency adjustment method, which can be used to adjust the operating frequency of a processor.

[0105] In this embodiment, the processor controls its operating frequency via a clock signal, which is provided by a phase-locked loop (PLL). In the embodiments of this application, the processor type includes, but is not limited to, various processors that use a PLL as their clock source, such as GPGPU (General-Purpose computing on Graphics Processing Units), GPU (Graphics Processing Unit), CPU (central processing unit), and NPU (Neural Processing Unit). The specific type is not limited herein.

[0106] In the embodiments of this application, the frequency adjustment method can be applied to a frequency modulation and voltage regulation module, which can be a control module independent of the processor. For example, the frequency modulation and voltage regulation module can be an MCU (Microcontroller Unit). The frequency modulation and voltage regulation module can communicate with the processor to obtain the processor's status and adjust the operating voltage and operating frequency.

[0107] In some embodiments, the frequency and voltage regulation module may also be part of the processor. For example, the power management module of the processor may be used to implement the function of the frequency and voltage regulation module provided in this application, so as to implement the frequency adjustment method using the power management module.

[0108] Assume the frequency-voltage drift database stores the sample step frequency and the corresponding sample step increment voltage. Combined with... Figure 3 As shown in the embodiments of this application, a frequency adjustment method is also provided, applied to a frequency modulation and voltage regulation module. The frequency modulation and voltage regulation module is connected to a processor, and the processor includes a phase-locked loop. The frequency adjustment method includes: S301, obtain the processor's current frequency, second target frequency, and step frequency to be adjusted.

[0109] The step frequency to be adjusted is less than the difference between the second target frequency and the current frequency.

[0110] S302, search for the step increment voltage corresponding to the step frequency to be adjusted in the preset frequency-voltage drift database.

[0111] S303, the sum of the second adjustable voltage and the adjustable step increment voltage is taken as the first target adjustable voltage.

[0112] The second voltage to be adjusted is the voltage corresponding to the higher of the current frequency and the second target frequency.

[0113] S304: First, adjust the processor's operating voltage to the first target voltage to be adjusted. Then, use a phase-locked loop to adjust the processor's operating frequency at least once according to the step frequency to be adjusted, until the processor's operating frequency is adjusted to the second target frequency.

[0114] For example, if the voltage is set to 100mV, the initial value of the processor's first alternative voltage is 790mV + 100mV, which is 890mV. The processor's initial frequency is 1200MHz, and the first target frequency is 1300MHz. The processor's operating voltage is controlled to be 890mV, and the operating frequency cycles between 1200MHz and 1300MHz. 10,000 first preset test cases are run. If all 10,000 runs of the first preset test cases are normal, the first alternative voltage is reduced by 5mV to obtain a new first alternative voltage. This process is repeated until 10,000 runs of the first preset test cases are run. If any abnormal operation occurs during the 10,000 runs of the first preset test cases, the previous first alternative voltage value is used as the first target voltage. Assume the first target voltage at this point is 880mV.

[0115] The first candidate frequency corresponding to 880mV is found to be 1475MHz in the preset frequency-voltage relationship. At this time, the frequency drift = 1475MHz - 1300MHz = 175MHz. Assuming the safety voltage is 50mV, the sample step increment voltage is 880mV - 790mV + 50mV = 140mV.

[0116] To ensure the chip functions correctly during frequency and voltage adjustment, the following logic is followed: The chip's operating voltage is increased to the first target voltage to be adjusted, and the processor's operating frequency is adjusted until the second target frequency, F4, is reached. The first target voltage to be adjusted is the sum of the operating voltage corresponding to the higher of the current frequency (F3) and the second target frequency (F4) and 140mV. After frequency adjustment, the base voltage corresponding to the second target frequency (F4) is found in a preset frequency-voltage relationship, and the processor's operating voltage is adjusted to this base voltage, thus ending the frequency and voltage adjustment process.

[0117] Assume the frequency-voltage drift database stores the correspondence between the initial frequency, the first target frequency, and the first target voltage. Combined with... Figure 4 As shown in the embodiments of this application, a frequency adjustment method is also provided, applied to a frequency modulation and voltage regulation module. The frequency modulation and voltage regulation module is connected to a processor, and the processor includes a phase-locked loop. The frequency adjustment method includes: S401, obtain the processor's current frequency and the second target frequency.

[0118] S402, search for the first target voltage corresponding to the current frequency and the second target frequency in the preset frequency and voltage drift database.

[0119] S403, the sum of the first target voltage and the preset safety voltage is used as the second target voltage to be adjusted.

[0120] S404: First, adjust the processor's operating voltage to the second target voltage to be adjusted. Then, use a phase-locked loop to adjust the processor's operating frequency at least once according to a preset frequency adjustment step size until the processor's operating frequency is adjusted to the second target frequency. The preset frequency adjustment step size is less than the difference between the second target frequency and the current frequency.

[0121] Based on the same inventive concept, embodiments of this application provide a device for determining frequency offset, including: a testing module and a judgment module.

[0122] The testing module is used to run a first preset test sample with the processor's operating voltage equal to a first alternative voltage for a first preset number of times, and to control the processor's operating frequency to alternate between the initial frequency and the first target frequency during the operation. The judgment module is used to determine the frequency drift of the processor between the initial frequency and the first target frequency if the current operation of the first preset test sample is normal. If the current operation of the first preset test sample is normal, the first preset voltage is reduced based on the current first alternative voltage to obtain the first alternative voltage for the next operation. This process is repeated until an abnormal operation occurs in one of the first preset test samples. Based on the first target voltage, the frequency drift of the processor between the initial frequency and the first target frequency is determined.

[0123] In some embodiments, the determination module is configured to determine the frequency drift of the processor between the initial frequency and the first target frequency based on the first target voltage by: searching for a first alternative frequency corresponding to the first target voltage in a preset frequency-voltage relationship; taking the difference between the first alternative frequency and the second alternative frequency as the frequency drift; the second alternative frequency is the higher frequency between the initial frequency and the first target frequency.

[0124] In some embodiments, the test module is used to determine the voltage corresponding to the higher frequency between the initial frequency and the first target frequency by searching for the voltage corresponding to a second candidate frequency in a preset frequency-voltage relationship; the second candidate frequency is the higher frequency between the initial frequency and the first target frequency.

[0125] In some embodiments, the apparatus for determining frequency offset further includes: a construction module for acquiring parameters to be measured; a set of parameters to be measured includes a frequency to be measured and a voltage to be measured corresponding to the frequency to be measured. A preset test process is performed on the parameters to be measured, new parameters to be measured are determined based on the frequency to be measured corresponding to the parameters to be measured and a second target voltage, and a preset test process is performed on the new parameters to be measured; the set of correlations between different frequencies to be measured and the corresponding second target voltage is a frequency-voltage relationship.

[0126] In some embodiments, the construction module is used to determine new test parameters based on the test frequency and the second target voltage corresponding to the test parameter in the following manner: obtaining the test frequency corresponding to the test parameter and the second target voltage corresponding to the test frequency; increasing the first preset frequency based on the test frequency to obtain a new test frequency; increasing the third preset voltage based on the second target voltage to obtain the test voltage corresponding to the new test frequency; and taking the new test frequency and the test voltage corresponding to the new test frequency as a new set of test parameters.

[0127] In some embodiments, the apparatus for determining frequency offset further includes: a test sample screening module, configured to acquire multiple candidate test samples; for each candidate test sample: the candidate test sample whose processor operating voltage is equal to a third candidate voltage, whose processor operating frequency is equal to a first preset frequency, and which has been run a third preset number of times; if the current running condition of the candidate test sample is normal operation, a fourth preset voltage is reduced based on the current corresponding third candidate voltage to obtain the third candidate voltage for the next run, and the aforementioned process is repeated until there is a candidate test sample whose running condition is abnormal, and the third target voltage is determined as the lowest operating voltage of the candidate test sample; the third target voltage is the third candidate voltage corresponding to the previous abnormal operation. The candidate test sample corresponding to the highest lowest operating voltage is used as the first preset test sample.

[0128] In some embodiments, the apparatus for determining frequency offset further includes: an update module, configured to update the initial frequency and the first target frequency, repeat the aforementioned steps, obtain a first target voltage of the processor between the updated initial frequency and the updated first target frequency; establish a frequency drift voltage correlation relationship based on the initial frequency, the first target frequency, and the first target voltage, and record the frequency drift voltage correlation relationship in a preset frequency voltage drift database.

[0129] In some embodiments, the update module is configured to establish a frequency drift voltage correlation based on an initial frequency, a first target frequency, and a first target voltage in the following manner: for each set of parameters to be established: calculate the difference between the first target frequency and the initial frequency to obtain a sample step frequency; calculate the difference between the first target voltage and the first voltage to be adjusted to obtain a sample step voltage; use the sum of the sample step voltage and a preset safety voltage as the sample step increment voltage corresponding to the sample step frequency; a set of parameters to be established includes: a first target frequency, an initial frequency, and a first target voltage corresponding to both the first target frequency and the initial frequency; the first voltage to be adjusted is the voltage corresponding to the higher of the initial frequency and the first target frequency; and use each sample step frequency and the sample step increment voltage corresponding to each sample step frequency as a frequency drift voltage correlation.

[0130] Based on the same inventive concept, this application provides a frequency adjustment device applied to a frequency modulation and voltage regulation module. The frequency modulation and voltage regulation module is connected to a processor, and the processor includes a phase-locked loop. The frequency adjustment device includes an acquisition module, a search module, a determination module, and an adjustment module.

[0131] The system includes: an acquisition module for acquiring the processor's current frequency, a second target frequency, and a step frequency to be adjusted; the step frequency to be adjusted is less than the difference between the second target frequency and the current frequency; a search module for searching the preset frequency-voltage drift database for the step increment voltage to be adjusted corresponding to the step frequency to be adjusted; a determination module for using the sum of the second voltage to be adjusted and the step increment voltage to be adjusted as the first target voltage to be adjusted; the second voltage to be adjusted is the voltage corresponding to the higher of the current frequency and the second target frequency; and an adjustment module for first adjusting the processor's operating voltage to the first target voltage to be adjusted, and then using a phase-locked loop to adjust the processor's operating frequency at least once according to the step frequency to be adjusted, until the processor's operating frequency is adjusted to the second target frequency.

[0132] Based on the same inventive concept, this application provides a processor in its embodiments. Please refer to [link / reference needed]. Figure 5 , Figure 5 This is a schematic diagram of a processor provided in one embodiment of this application. The processor 1 provided in this embodiment includes: a functional module 2, a phase-locked loop 3, and a frequency and voltage modulation module 4.

[0133] Functional module 2 is the main working module of the processor, and it may include the processing core, video memory and various computing units.

[0134] Phase-locked loop 3 is used to provide a clock signal for the operation of functional module 2.

[0135] Frequency and voltage regulation module 4 is used to adjust the frequency of the phase-locked loop output clock signal and the processor's operating voltage. Specifically, it can be implemented as various power management modules or power chips.

[0136] In the embodiments of this application, the frequency modulation and voltage regulation module 4 is used to execute the frequency adjustment method provided in the foregoing embodiments.

[0137] Based on the same inventive concept, this application also provides an electronic device, which may include the processor 1 provided in the foregoing embodiments.

[0138] The electronic device includes, but is not limited to, computers, servers, industrial control computers, and other devices that include processors, and is not restricted in this regard.

[0139] This application provides a computer program product, which includes a computer program that, when executed by a main control processor, implements the above-described method for determining frequency offset.

[0140] The technical solutions of this application embodiment can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes one or more instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in this application embodiment. The aforementioned storage medium can be a non-transitory storage medium, including various media capable of storing program code such as USB flash drives, portable hard drives, read-only memory, random access memory, magnetic disks, or optical disks, or it can be a transient storage medium.

[0141] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and there may be other division methods in actual implementation. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed.

[0142] In the embodiments provided in this application, it should be understood that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of the embodiments of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data used can be interchanged where appropriate for the embodiments of the present application described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. Unless otherwise stated, the term "a plurality of" means two or more.

[0143] The above descriptions are merely embodiments of this application and are not intended to limit the scope of protection of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application. Furthermore, the above embodiments can be combined with each other to form new embodiments without conflict.

Claims

1. A method of determining a frequency offset, characterized by, include: The processor's operating voltage is equal to the first alternative voltage, and a first preset test sample is run for a first preset number of times. During the operation, the processor's operating frequency is controlled to alternate between an initial frequency and a first target frequency. The initial value of the first alternative voltage is the sum of the voltage corresponding to the higher of the initial frequency and the first target frequency and a set voltage. If the operation of the first preset test sample is normal in the current run, the first preset voltage is reduced based on the first alternative voltage corresponding to the current run to obtain the first alternative voltage for the next run. The above process is repeated until there is an abnormal operation of the first preset test sample. The frequency drift of the processor between the initial frequency and the first target frequency is determined according to the first target voltage. The first target voltage is the first alternative voltage corresponding to the previous abnormal operation.

2. The method of claim 1, wherein, Determining the frequency drift of the processor between the initial frequency and the first target frequency based on the first target voltage includes: Find the first candidate frequency corresponding to the first target voltage in the preset frequency-voltage relationship; The difference between the first candidate frequency and the second candidate frequency is taken as the frequency drift; the second candidate frequency is the higher of the initial frequency and the first target frequency.

3. The method according to claim 1, characterized in that, The voltage corresponding to the higher frequency between the initial frequency and the first target frequency is determined in the following manner: The voltage corresponding to the second candidate frequency is found in the preset frequency-voltage relationship; the second candidate frequency is the higher frequency between the initial frequency and the first target frequency.

4. The method according to claim 2 or 3, characterized in that, The method further includes: Acquire the parameters to be measured; a set of the parameters to be measured includes a frequency to be measured and the voltage to be measured corresponding to the frequency to be measured. A preset test process is performed on the parameters to be tested. The preset test process includes: running a second preset test sample with the processor's operating voltage equal to a second alternative voltage and the processor's operating frequency equal to the frequency to be tested corresponding to the set of parameters to be tested, and running the sample a second preset number of times; if the current running condition of the second preset test sample is normal, the second preset voltage is reduced based on the second alternative voltage corresponding to the current running condition to obtain the second alternative voltage for the next running condition, and the above process is repeated until there is a second preset test sample that is running abnormally, thus establishing a correlation between the frequency to be tested and the second target voltage; the initial value of the second alternative voltage is equal to the voltage to be tested corresponding to the set of parameters to be tested; the second target voltage is the second alternative voltage corresponding to the previous abnormal running condition; New test parameters are determined based on the test frequency and the second target voltage corresponding to the test parameters, and a preset test process is performed for the new test parameters. The set of correlations between different frequencies to be measured and the corresponding second target voltage is called the frequency-voltage relationship.

5. The method according to claim 4, characterized in that, New parameters to be measured are determined based on the frequency to be measured corresponding to the parameter to be measured and the second target voltage, including: Obtain the frequency to be measured corresponding to the parameter to be measured and the second target voltage corresponding to the frequency to be measured; A new frequency to be measured is obtained by increasing the first preset frequency based on the frequency to be measured. Based on the second target voltage, a third preset voltage is increased to obtain a new test voltage corresponding to the test frequency; The new frequency to be measured and the corresponding voltage to be measured are used as a new set of parameters to be measured.

6. The method according to claim 1, characterized in that, The first preset test case is obtained in the following way: Obtain multiple alternative test cases; For each of the alternative test cases: the alternative test case in which the processor's operating voltage is equal to the third alternative voltage, the processor's operating frequency is equal to the first preset frequency, and the test case is run a third preset number of times; If the current operation of the candidate test sample is normal, the fourth preset voltage is reduced based on the current third candidate voltage to obtain the third candidate voltage for the next operation. The above process is repeated until there is a candidate test sample that is operating abnormally. The third target voltage is then determined as the lowest operating voltage of the candidate test sample. The third target voltage is the third candidate voltage corresponding to the previous abnormal operation. The candidate test sample corresponding to the highest of the minimum operating voltages is used as the first preset test sample.

7. The method according to claim 1, characterized in that, The method further includes: Update the initial frequency and the first target frequency, repeat the aforementioned steps, and obtain the first target voltage of the processor between the updated initial frequency and the updated first target frequency; A frequency drift voltage correlation is established based on the initial frequency, the first target frequency, and the first target voltage, and the frequency drift voltage correlation is recorded in a preset frequency voltage drift database.

8. The method according to claim 7, characterized in that, Establishing a frequency drift voltage correlation based on the initial frequency, the first target frequency, and the first target voltage includes: For each set of parameters to be established: calculate the difference between the first target frequency and the initial frequency to obtain the sample step frequency; calculate the difference between the first target voltage and the first voltage to be adjusted to obtain the sample step voltage; use the sum of the sample step voltage and the preset safety voltage as the sample step increment voltage corresponding to the sample step frequency; a set of parameters to be established includes: a first target frequency, an initial frequency, and a first target voltage corresponding to both the first target frequency and the initial frequency; the first voltage to be adjusted is the voltage corresponding to the higher frequency between the initial frequency and the first target frequency; The frequency drift voltage is defined as the correlation between the sample step frequency and the sample step increment voltage corresponding to each sample step frequency.

9. A frequency adjustment method, characterized in that, The method is applied to a frequency modulation and voltage regulation module, which is connected to a processor, the processor including a phase-locked loop; the frequency adjustment method includes: The processor's current frequency, second target frequency, and adjustable step frequency are obtained; the adjustable step frequency is less than the difference between the second target frequency and the current frequency. The step increment voltage corresponding to the step frequency to be adjusted is searched in a preset frequency-voltage drift database; the frequency-voltage drift database is obtained by the method described in claim 8 above; The sum of the second voltage to be adjusted and the step increment voltage to be adjusted is taken as the first target voltage to be adjusted; the second voltage to be adjusted is the voltage corresponding to the higher frequency between the current frequency and the second target frequency; First, adjust the processor's operating voltage to the first target voltage to be adjusted. Then, use the phase-locked loop to adjust the processor's operating frequency at least once according to the adjustable step frequency, until the processor's operating frequency is adjusted to the second target frequency.

10. A device for determining frequency offset, characterized in that, include: The test module is used to make the processor's operating voltage equal to the first alternative voltage and run the first preset test sample a first preset number of times, and during the operation, control the processor's operating frequency to alternate between the initial frequency and the first target frequency; The initial value of the first alternative voltage is the sum of the voltage corresponding to the higher frequency of the initial frequency and the first target frequency, and the set voltage; The judgment module is used to determine the frequency drift of the processor between the initial frequency and the first target frequency if the current operation of the first preset test sample is normal. The first preset voltage is reduced based on the first candidate voltage corresponding to the current operation to obtain the first candidate voltage for the next operation. The above process is repeated until there is an abnormal operation of the first preset test sample. The first target voltage is the first candidate voltage corresponding to the previous abnormal operation.

11. A frequency adjustment device, characterized in that, An application is made in a frequency modulation and voltage regulation module, the frequency modulation and voltage regulation module being connected to a processor, the processor including a phase-locked loop; the frequency adjustment device includes: The acquisition module is used to acquire the current frequency, the second target frequency, and the step frequency to be adjusted of the processor; the step frequency to be adjusted is less than the difference between the second target frequency and the current frequency; The lookup module is used to search for the step increment voltage corresponding to the step frequency to be adjusted in a preset frequency-voltage drift database; the frequency-voltage drift database is obtained by the method described in claim 8 above; The determining module is used to take the sum of the second adjustable voltage and the adjustable step increment voltage as the first target adjustable voltage; the second adjustable voltage is the voltage corresponding to the higher frequency between the current frequency and the second target frequency; The adjustment module is used to first adjust the processor's operating voltage to the first target voltage to be adjusted, and then use the phase-locked loop to adjust the processor's operating frequency at least once according to the step frequency to be adjusted, until the processor's operating frequency is adjusted to the second target frequency.

12. A storage medium, characterized in that, The storage medium stores computer-executable instructions. When the computer-executable instructions are called and executed by the main control processor, the computer-executable instructions cause the main control processor to implement the method for determining frequency offset as described in any one of claims 1 to 8, or to implement the frequency adjustment method as described in claim 9.

13. A processor, characterized in that, include: Functional modules; A phase-locked loop, connected to the functional module, is used to provide the functional module with a clock signal corresponding to its operating frequency; A frequency and voltage adjustment module, connected to the phase-locked loop, is used to execute the frequency adjustment method as described in claim 9.

14. An electronic device, characterized in that, Includes the processor as described in claim 13.