A clock frequency division method and device

By calculating, dividing and searching the clock frequency information, the optimal frequency division ratio information of the NM type clock structure is obtained, and the problems of high CPU load and low computing efficiency in the prior art are solved, and more efficient clock frequency division is achieved Comparison calculation.

CN114740948BActive Publication Date: 2025-01-17XIAN ZHI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210402386.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-18
Publication Date
2025-01-17
Estimated Expiration
2042-04-18

AI Technical Summary

Technical Problem

The prior art requires traversing a large number of frequency division coefficients in clock frequency division processing, resulting in excessive CPU load and low computational efficiency, and the traversal range of frequency division coefficients cannot be effectively reduced.

Method used

By performing calculation and division processing on the clock frequency information and calculation and search processing, the optimal frequency division ratio information is obtained for setting the NM type clock structure, reducing the traversal range of the frequency division coefficient, and improving the optimal frequency division ratio calculation efficiency.

Benefits of technology

It reduces the CPU load, improves the efficiency of clock frequency division ratio calculation, reduces the traversal range of frequency division coefficients, and improves the real-timeness of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114740948B_ABST
    Figure CN114740948B_ABST
Patent Text Reader

Abstract

The present invention discloses a clock frequency division method and device, the method comprising: obtaining clock frequency information; performing calculation and division processing on the clock frequency information to obtain frequency division ratio area information; the frequency division ratio area information represents the area range of the frequency division coefficient required by the NM type clock structure; performing calculation and search processing on the frequency division ratio area information to obtain the optimal frequency division ratio information; the optimal frequency division ratio information is used to indicate the setting of the NM type clock structure. It can be seen that the present invention can obtain the optimal frequency division ratio information for indicating the setting of the NM type clock structure by performing calculation and division processing and calculation and search processing on the clock frequency information, which is conducive to reducing the traversal range of the frequency division coefficient, improving the calculation efficiency of the optimal frequency division ratio, and thus reducing the CPU load.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data processing, and in particular to a clock frequency division method and device. Background Art

[0002] Since different modules have different clock frequency requirements when running, the clock needs to be divided and multiplied to obtain the clock of the required frequency. At present, the frequency division coefficient is traversed within its value range, and each group of frequency division coefficients is calculated to determine whether the calculated frequency value is closest to the desired clock frequency, so as to obtain the best frequency division ratio and complete the setting of the clock frequency. However, the above method requires a large number of division operations, which makes the CPU load too large and the calculation efficiency low. Therefore, it is particularly important to provide a clock division method and device to reduce the traversal range of the frequency division coefficient, improve the calculation efficiency of the best frequency division ratio, and thus reduce the CPU load. Summary of the invention

[0003] The technical problem to be solved by the present invention is to provide a clock division method and device, which can obtain the optimal division ratio information for indicating the setting of the NM type clock structure by performing calculation division processing and calculation search processing on the clock frequency information, which is beneficial to reducing the traversal range of the division coefficient and improving the efficiency of calculating the optimal division ratio, thereby reducing the CPU load.

[0004] In order to solve the above technical problem, a first aspect of an embodiment of the present invention discloses a clock frequency division method, the method comprising:

[0005] Get clock frequency information;

[0006] Calculating and dividing the clock frequency information to obtain frequency division ratio region information; the frequency division ratio region information represents the region range of the frequency division coefficient required by the NM type clock structure;

[0007] The frequency division ratio region information is calculated and searched to obtain optimal frequency division ratio information; the optimal frequency division ratio information is used to indicate the setting of the NM type clock structure.

[0008] As an optional implementation manner, in the first aspect of the embodiment of the present invention, the calculating and dividing the clock frequency information to obtain the frequency division ratio region information includes:

[0009] Calculating and processing the clock frequency information to obtain frequency ratio information; the frequency ratio information represents the ratio relationship between the parent clock frequency and the expected frequency corresponding to the child clock;

[0010] The preset frequency division range information is divided and processed using the frequency ratio information to obtain frequency division ratio region information.

[0011] As an optional implementation manner, in the first aspect of the embodiment of the present invention, the using the frequency ratio information to divide the preset frequency division range information to obtain the frequency division ratio region information includes:

[0012] Determine whether the frequency ratio information and the preset frequency division range information have an intersection, and obtain a first intersection determination result; the first intersection determination result represents the positional relationship between the slope line corresponding to the frequency ratio information and the frequency division interval corresponding to the frequency division range information;

[0013] When the first intersection judgment result is no, executing a preset first area division strategy, dividing the frequency division range information to obtain frequency division ratio area information;

[0014] When the first intersection judgment result is yes, a preset second area division strategy is executed to divide the frequency division range information to obtain the frequency division ratio area information.

[0015] As an optional implementation manner, in the first aspect of the embodiment of the present invention, executing the preset second area division strategy, dividing the frequency division range information, and obtaining the frequency division ratio area information includes:

[0016] Performing ratio calculation processing on the frequency division range information to obtain frequency division ratio information; the frequency division ratio information includes a first frequency division ratio and / or a second frequency division ratio;

[0017] Matching the frequency ratio information and the frequency division ratio value information to obtain target frequency division ratio value region information; the target frequency division ratio value region information includes L region information values; L is a positive integer greater than or equal to 1 and less than or equal to 2;

[0018] The frequency division ratio region information is determined according to the target frequency division ratio value region information.

[0019] As an optional implementation manner, in the first aspect of the embodiment of the present invention, the calculating and searching the frequency division ratio region information to obtain the optimal frequency division ratio information includes:

[0020] Selecting a frequency division point for the frequency division ratio region information to obtain information on a frequency division point to be selected; the information on a frequency division point to be selected includes a plurality of frequency division points to be selected;

[0021] Calculating and processing the to-be-selected frequency division point information and the frequency ratio information to obtain calculated value information;

[0022] The optimal frequency division ratio information is screened out from the calculated value information according to a preset frequency division ratio selection rule.

[0023] As an optional implementation manner, in the first aspect of the embodiment of the present invention, the selecting of a frequency division point for the frequency division ratio region information to obtain the to-be-selected frequency division point information includes:

[0024] Determining frequency division intersection information according to the frequency ratio information;

[0025] The frequency division ratio region information is traversed and processed starting from the frequency division intersection point information to obtain the frequency division point information to be selected.

[0026] As an optional implementation manner, in the first aspect of the embodiment of the present invention, the calculating and searching the frequency division ratio region information to obtain the optimal frequency division ratio information includes:

[0027] The target frequency division ratio search strategy is screened out from a preset frequency division ratio search strategy set using the frequency division ratio region information; the frequency division ratio search strategy set includes a plurality of frequency division ratio search strategies; the frequency division ratio search strategy is related to the positional relationship between the slope line corresponding to the frequency ratio information and the frequency division interval corresponding to the frequency division range information;

[0028] The target frequency division ratio search strategy is executed to obtain the optimal frequency division ratio information.

[0029] A second aspect of an embodiment of the present invention discloses a clock frequency division device, the device comprising:

[0030] An acquisition module, used to acquire clock frequency information;

[0031] A first processing module is used to calculate and divide the clock frequency information to obtain frequency division ratio area information; the frequency division ratio area information represents the area range of the frequency division coefficient required by the NM type clock structure;

[0032] The second processing module is used to calculate and search the frequency division ratio area information to obtain the optimal frequency division ratio information; the optimal frequency division ratio information is used to indicate the setting of the NM type clock structure.

[0033] As an optional implementation, in a second aspect of the embodiment of the present invention, the first processing module includes a first processing submodule and a second processing submodule, wherein:

[0034] The first processing submodule is used to calculate and process the clock frequency information to obtain frequency ratio information; the frequency ratio information represents the ratio relationship between the parent clock frequency and the expected frequency corresponding to the child clock;

[0035] The second processing submodule is used to divide the preset frequency division range information by using the frequency ratio information to obtain frequency division ratio region information.

[0036] As an optional implementation, in the second aspect of the embodiment of the present invention, the second processing submodule divides the preset frequency division range information using the frequency ratio information to obtain the frequency division ratio region information in the following specific manner:

[0037] Determine whether the frequency ratio information and the preset frequency division range information have an intersection, and obtain a first intersection determination result; the first intersection determination result represents the positional relationship between the slope line corresponding to the frequency ratio information and the frequency division interval corresponding to the frequency division range information;

[0038] When the first intersection judgment result is no, executing a preset first area division strategy, dividing the frequency division range information to obtain frequency division ratio area information;

[0039] When the first intersection judgment result is yes, a preset second area division strategy is executed to divide the frequency division range information to obtain the frequency division ratio area information.

[0040] As an optional implementation, in the second aspect of the embodiment of the present invention, the second processing submodule executes a preset second area division strategy to divide the frequency division range information, and the specific manner of obtaining the frequency division ratio area information is:

[0041] Performing ratio calculation processing on the frequency division range information to obtain frequency division ratio information; the frequency division ratio information includes a first frequency division ratio and / or a second frequency division ratio;

[0042] Matching the frequency ratio information and the frequency division ratio value information to obtain target frequency division ratio value region information; the target frequency division ratio value region information includes L region information values; L is a positive integer greater than or equal to 1 and less than or equal to 2;

[0043] The frequency division ratio region information is determined according to the target frequency division ratio value region information.

[0044] As an optional implementation, in the second aspect of the embodiment of the present invention, the second processing module performs calculation and search processing on the frequency division ratio region information to obtain the optimal frequency division ratio information in the following specific manner:

[0045] Selecting a frequency division point for the frequency division ratio region information to obtain information on a frequency division point to be selected; the information on a frequency division point to be selected includes a plurality of frequency division points to be selected;

[0046] Calculating and processing the to-be-selected frequency division point information and the frequency ratio information to obtain calculated value information;

[0047] The optimal frequency division ratio information is screened out from the calculated value information according to a preset frequency division ratio selection rule.

[0048] As an optional implementation manner, in the second aspect of the embodiment of the present invention, the second processing module selects a frequency division point for the frequency division ratio region information, and obtains the information of the to-be-selected frequency division point in a specific manner as follows:

[0049] Determining frequency division intersection information according to the frequency ratio information;

[0050] The frequency division ratio region information is traversed and processed starting from the frequency division intersection point information to obtain the frequency division point information to be selected.

[0051] As an optional implementation, in the second aspect of the embodiment of the present invention, the second processing module performs calculation and search processing on the frequency division ratio region information to obtain the optimal frequency division ratio information in the following specific manner:

[0052] The target frequency division ratio search strategy is screened out from a preset frequency division ratio search strategy set using the frequency division ratio region information; the frequency division ratio search strategy set includes a plurality of frequency division ratio search strategies; the frequency division ratio search strategy is related to the positional relationship between the slope line corresponding to the frequency ratio information and the frequency division interval corresponding to the frequency division range information;

[0053] The target frequency division ratio search strategy is executed to obtain the optimal frequency division ratio information.

[0054] The third aspect of the present invention discloses another clock frequency division device, the device comprising:

[0055] A memory storing executable program code;

[0056] a processor coupled to the memory;

[0057] The processor calls the executable program code stored in the memory to execute part or all of the steps in the clock frequency division method disclosed in the first aspect of the embodiment of the present invention.

[0058] The fourth aspect of the present invention discloses a computer storage medium, which stores computer instructions. When the computer instructions are called, they are used to execute some or all of the steps in the clock division method disclosed in the first aspect of the embodiment of the present invention.

[0059] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:

[0060] In an embodiment of the present invention, clock frequency information is obtained; the clock frequency information is calculated and divided to obtain frequency division ratio region information; the frequency division ratio region information represents the region range of the frequency division coefficient required by the NM type clock structure; the frequency division ratio region information is calculated and searched to obtain the optimal frequency division ratio information; the optimal frequency division ratio information is used to indicate the setting of the NM type clock structure. It can be seen that the present invention can obtain the optimal frequency division ratio information for indicating the setting of the NM type clock structure by calculating and dividing the clock frequency information and calculating and searching the clock frequency information, which is beneficial to reducing the traversal range of the frequency division coefficient, improving the calculation efficiency of the optimal frequency division ratio, and thus reducing the CPU load. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0062] Figure 1 It is a flowchart of a clock frequency division method disclosed in an embodiment of the present invention;

[0063] Figure 2 It is a flowchart diagram of another clock frequency division method disclosed in an embodiment of the present invention;

[0064] Figure 3 It is a structural schematic diagram of a clock frequency division device disclosed in an embodiment of the present invention;

[0065] Figure 4 It is a structural schematic diagram of another clock frequency division device disclosed in an embodiment of the present invention;

[0066] Figure 5 It is a structural schematic diagram of another clock frequency division device disclosed in an embodiment of the present invention. DETAILED DESCRIPTION

[0067] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0068] The terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, device, product or equipment that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or equipment.

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

[0070] The present invention discloses a clock frequency division method and device, which can obtain the optimal frequency division ratio information for indicating the setting of the NM type clock structure by performing calculation division processing and calculation search processing on the clock frequency information, which is beneficial to reduce the traversal range of the frequency division coefficient, improve the calculation efficiency of the optimal frequency division ratio, and thus reduce the CPU load. The following is a detailed description.

[0071] Embodiment 1

[0072] See also Figure 1 , Figure 1 is a flow chart of a clock frequency division method disclosed in an embodiment of the present invention. Figure 1 The clock frequency division method described is applied to a clock management system, such as a local server or cloud server for clock frequency division management, and the embodiments of the present invention do not limit this. Figure 1 As shown, the clock division method may include the following operations:

[0073] 101. Obtain clock frequency information.

[0074] 102. Calculate and divide the clock frequency information to obtain frequency division ratio region information.

[0075] In the embodiment of the present invention, the frequency division ratio region information represents the region range of the frequency division coefficient required by the NM type clock structure.

[0076] 103. Calculate and search the frequency division ratio region information to obtain optimal frequency division ratio information.

[0077] In the embodiment of the present invention, the above-mentioned optimal frequency division ratio information is used to indicate setting of an NM type clock structure.

[0078] Optionally, the clock frequency information includes a parent clock frequency and / or an expected frequency, which is not limited in the embodiment of the present invention.

[0079] Optionally, the above-mentioned optimal division ratio information includes a target clock frequency, and / or a target multiplication coefficient, and / or a target division coefficient, which is not limited in this embodiment of the present invention.

[0080] Optionally, the target clock frequency is a candidate clock frequency that is not greater than and is closest to the expected frequency relative to other candidate clock frequencies.

[0081] Optionally, the clock frequency division method mentioned above is a method for traversing the value range of the multiplication coefficient and the division coefficient of the clock and then calculating the optimal frequency division ratio. The calculation complexity is increased from 0(n 2 ) is reduced to 0(n), the computing efficiency can be improved by at least 85%, which can effectively improve the real-time performance of the system.

[0082] Optionally, the above clock frequency division method can be applied to any product that needs to divide the clock.

[0083] It can be seen that the clock division method described in the embodiment of the present invention can obtain the optimal division ratio information for indicating the setting of the NM type clock structure by performing calculation division processing and calculation search processing on the clock frequency information, which is beneficial to reducing the traversal range of the division coefficient and improving the efficiency of calculating the optimal division ratio, thereby reducing the CPU load.

[0084] In an optional embodiment, the clock frequency information is calculated and divided in the above step 102 to obtain the frequency division ratio region information, including:

[0085] Calculating and processing the clock frequency information to obtain frequency ratio information; the frequency ratio information represents the ratio relationship between the parent clock frequency and the expected frequency corresponding to the child clock;

[0086] The preset frequency division range information is divided and processed using the frequency ratio information to obtain the frequency division ratio region information.

[0087] Optionally, the frequency ratio information includes the frequency ratio and / or a slope line corresponding to the frequency ratio, which is not limited in this embodiment of the present invention.

[0088] It can be seen that the clock division method described in the embodiment of the present invention can obtain the division ratio area information by calculating and dividing the clock frequency information, which is beneficial to reducing the traversal range of the division coefficient and improving the efficiency of calculating the optimal division ratio, thereby reducing the CPU load.

[0089] In another optional embodiment, the frequency ratio information is used to divide the preset frequency division range information to obtain the frequency division ratio region information, including:

[0090] Determine whether the frequency ratio information and the preset frequency division range information have an intersection, and obtain a first intersection determination result; the first intersection determination result represents the positional relationship between the slope line corresponding to the frequency ratio information and the frequency division interval corresponding to the frequency division range information;

[0091] When the first intersection judgment result is no, executing a preset first area division strategy, dividing the frequency division range information, and obtaining frequency division ratio area information;

[0092] When the first intersection judgment result is yes, a preset second area division strategy is executed to divide the frequency division range information to obtain frequency division ratio area information.

[0093] Optionally, the above-mentioned frequency division ratio region information includes a first N value, and / or a second N value, and / or a first M value, and / or a second M value, which is not limited in this embodiment of the present invention.

[0094] Furthermore, the first N value is less than or equal to the second N value.

[0095] Furthermore, the first M value is less than or equal to the second M value.

[0096] Optionally, the first N value, the second N value, the first M value, and the second M value are selected by a register corresponding to the clock.

[0097] Optionally, the above-mentioned frequency division ratio area information also includes a first area point, and / or a second area point, and / or a third area point, and / or a fourth area point, which is not limited in this embodiment of the present invention.

[0098] Optionally, the first area point includes a first N value and a first M value.

[0099] Optionally, the second area point includes a second N value and a first M value.

[0100] Optionally, the third area point includes a first N value and a second M value.

[0101] Optionally, the fourth area point includes a second N value and a second M value.

[0102] Optionally, the first intersection judgment result is whether or not a slope line corresponding to the frequency ratio does not intersect with a frequency division region corresponding to the frequency division range information.

[0103] Optionally, by screening the above-mentioned frequency division ratio region information, the candidate frequency division regions for matching with the expected frequency can be narrowed down to reduce the number of traversals and the traversal range, improve calculation efficiency, and reduce CPU load.

[0104] In this optional implementation, as an optional implementation, the above-mentioned implementation of the preset first area division strategy, dividing the frequency division range information, and obtaining the frequency division ratio area information in a specific manner is:

[0105] The frequency division region corresponding to the frequency division range information is determined as the frequency division ratio region information.

[0106] Optionally, the slope line corresponding to the above-mentioned frequency ratio does not intersect with the frequency division area corresponding to the above-mentioned frequency division range information, including that the frequency ratio is less than the ratio of the second N value to the first M value, and / or, the slope line corresponding to the frequency ratio does not intersect with the frequency division area corresponding to the above-mentioned frequency division range information, including that the frequency ratio is greater than the ratio of the first N value to the second M value.

[0107] Optionally, the first intersection judgment result is that a slope line corresponding to the frequency ratio intersects with a frequency division area corresponding to the frequency division range information.

[0108] Optionally, the slope line corresponding to the frequency ratio intersects the frequency division area corresponding to the frequency division range information to obtain a frequency ratio greater than or equal to the ratio of the second N value to the first M value, and less than or equal to the ratio of the first N value to the second M value.

[0109] It can be seen that the clock division method described in the embodiment of the present invention can select a region division strategy to divide the division range information to obtain the division ratio region information by judging and analyzing whether there is an intersection between the frequency ratio information and the division range information, which is beneficial to reducing the traversal range of the division coefficient and improving the efficiency of calculating the optimal division ratio, thereby reducing the CPU load.

[0110] In yet another optional embodiment, the above-mentioned execution of the preset second area division strategy to divide the frequency division range information to obtain the frequency division ratio area information includes:

[0111] Performing ratio calculation processing on the frequency division range information to obtain frequency division ratio information; the frequency division ratio information includes a first frequency division ratio and / or a second frequency division ratio;

[0112] Matching the frequency ratio information and the frequency division ratio value information to obtain target frequency division ratio value region information; the target frequency division ratio value region information includes L region information values; L is a positive integer greater than or equal to 1 and less than or equal to 2;

[0113] The frequency division ratio region information is determined according to the target frequency division ratio value region information.

[0114] Optionally, the first frequency division ratio value represents a numerical value corresponding to an intersection point of a slope line corresponding to the frequency ratio and a line segment formed by the first area point and the third area point, or a numerical value corresponding to an intersection point of a slope line corresponding to the frequency ratio and a line segment formed by the first area point and the second area point.

[0115] Optionally, the second frequency division ratio value represents the numerical value corresponding to the intersection point of the slope line corresponding to the frequency ratio and the line segment formed by the second area point and the fourth area point, or the numerical value corresponding to the intersection point of the slope line corresponding to the frequency ratio and the line segment formed by the third area point and the fourth area point.

[0116] It can be seen that the clock division method described in the embodiment of the present invention can perform comprehensive processing such as ratio calculation processing and matching processing on the division range information to obtain the division ratio area information, which is more conducive to reducing the traversal range of the division coefficient and improving the efficiency of calculating the optimal division ratio, thereby reducing the CPU load.

[0117] In yet another optional embodiment, the above-mentioned calculation and search processing of the frequency division ratio region information to obtain the optimal frequency division ratio information includes:

[0118] Selecting a frequency division point for the frequency division ratio region information to obtain information on a frequency division point to be selected; the information on the frequency division point to be selected includes a plurality of frequency division points to be selected;

[0119] Calculate and process the selected frequency division point information and the frequency ratio information to obtain calculated value information;

[0120] The optimal frequency division ratio information is screened out from the calculated value information according to the preset frequency division ratio selection rule.

[0121] Optionally, the above-mentioned frequency division points to be selected include a first frequency division value to be selected and a second frequency division value to be selected.

[0122] Optionally, the first selected frequency division value is a positive integer.

[0123] Optionally, the second selected frequency division value is a positive integer.

[0124] Optionally, the above-mentioned candidate frequency division points represent all candidate multiplication coefficients and candidate division coefficients in the candidate frequency division region that may be used to indicate setting of an NM type clock structure.

[0125] Optionally, the above-mentioned calculated value information includes several distance values.

[0126] In this optional embodiment, as an optional implementation manner, the specific manner of calculating and processing the selected frequency division point information and the frequency ratio information to obtain the calculated value information is as follows:

[0127] For any frequency division point to be selected, the distance from the frequency division point to be selected to the slope line corresponding to the frequency ratio is calculated to obtain the distance value corresponding to the frequency division point to be selected.

[0128] Optionally, the above-mentioned calculated value information includes several area values.

[0129] In this optional embodiment, as another optional implementation manner, the specific manner of calculating and processing the selected frequency division point information and the frequency ratio information to obtain the calculated value information is as follows:

[0130] For any frequency division point to be selected, the area of ​​a triangle formed by the frequency division point to be selected, the first frequency division ratio and the second frequency division ratio is calculated to obtain an area value corresponding to the frequency division point to be selected.

[0131] Optionally, the above-mentioned calculated value information includes several calculated values.

[0132] In this optional embodiment, as another optional implementation, the specific method of selecting the best frequency division ratio information from the calculated value information according to the preset frequency division ratio selection rule is as follows:

[0133] Sort all the calculated values ​​in the above calculated value information from small to large to obtain a calculated value sequence;

[0134] Selecting a plurality of top calculated values ​​from the above-mentioned calculated value sequence to obtain candidate calculated value information; the above-mentioned candidate calculated value information includes a plurality of candidate calculated values;

[0135] Determine whether the above candidate calculated value information matches 1, and obtain the candidate determination result;

[0136] When the alternative judgment result is yes, determining the alternative calculated value information as the optimal frequency division ratio information;

[0137] When the alternative judgment result is no, the alternative calculation value with the smallest first to-be-selected frequency division value corresponding to the alternative calculation value is selected from the above-mentioned alternative calculation value information as the target calculation value;

[0138] According to the above target calculation value, the optimal frequency division ratio information is determined.

[0139] It can be seen that the clock division method described in the embodiment of the present invention can obtain the optimal division ratio information by performing comprehensive processing such as division point selection, calculation processing and screening processing on the division ratio area information, which is more conducive to reducing the traversal range of the division coefficient and improving the efficiency of calculating the optimal division ratio, thereby reducing the CPU load.

[0140] In yet another optional embodiment, the above-mentioned selecting a frequency division point for the frequency division ratio region information to obtain the to-be-selected frequency division point information includes:

[0141] Determine the frequency division intersection point information according to the frequency ratio information;

[0142] The frequency division ratio region information is traversed and processed starting from the frequency division intersection point information to obtain the frequency division point information to be selected.

[0143] Optionally, the frequency division intersection point in the above-mentioned frequency division intersection point information represents the first intersection point of a slope line corresponding to the frequency ratio and a frequency division area corresponding to the above-mentioned frequency division ratio area information.

[0144] It can be seen that the clock division method described in the embodiment of the present invention can obtain the selected division point information by comprehensive processing of the frequency ratio information, which is more conducive to reducing the traversal range of the division coefficient and improving the calculation efficiency of the optimal division ratio, thereby reducing the CPU load.

[0145] Embodiment 2

[0146] See also Figure 2 , Figure 2 FIG. 1 is a flow chart of another clock frequency division method disclosed in an embodiment of the present invention. Figure 2 The clock frequency division method described is applied to a clock management system, such as a local server or cloud server for clock frequency division management, and the embodiments of the present invention do not limit this. Figure 2 As shown, the clock division method may include the following operations:

[0147] 201. Obtain clock frequency information.

[0148] 202. Calculate and divide the clock frequency information to obtain frequency division ratio region information.

[0149] 203. Filter out a target frequency division ratio search strategy from a preset frequency division ratio search strategy set by using the frequency division ratio region information.

[0150] In the embodiment of the present invention, the above-mentioned frequency division ratio search strategy set includes several frequency division ratio search strategies.

[0151] In the embodiment of the present invention, the frequency division ratio search strategy is related to the positional relationship between the slope line corresponding to the frequency ratio information and the frequency division interval corresponding to the frequency division range information.

[0152] 204. Execute the target frequency division ratio search strategy to obtain the optimal frequency division ratio information.

[0153] In the embodiment of the present invention, for the specific technical details and technical terminology of step 201-step 202, reference can be made to the detailed description of step 101-step 102 in embodiment 1, and the embodiment of the present invention will not be repeated here.

[0154] In this optional embodiment, as an optional implementation, the above-mentioned target frequency division ratio search strategy is executed to obtain the optimal frequency division ratio information in a specific manner as follows:

[0155] According to the second region point, the optimal frequency division ratio information is determined.

[0156] In this optional embodiment, as another optional implementation, the specific method of executing the target frequency division ratio search strategy to obtain the optimal frequency division ratio information is as follows:

[0157] According to the third region point, the optimal frequency division ratio information is determined.

[0158] In this optional embodiment, as an optional implementation mode, the above-mentioned target frequency division ratio search strategy is executed to obtain the optimal frequency division ratio information in a specific manner as follows:

[0159] According to the first region point, the optimal frequency division ratio information is determined.

[0160] It can be seen that the clock division method described in the embodiment of the present invention can obtain the optimal division ratio information for indicating the setting of the NM type clock structure by calculating, dividing, screening and searching the clock frequency information, which is beneficial to reducing the traversal range of the division coefficient and improving the efficiency of calculating the optimal division ratio, thereby reducing the CPU load.

[0161] Embodiment 3

[0162] See also Figure 3 , Figure 3 : is a schematic diagram of the structure of a clock frequency division device disclosed in an embodiment of the present invention. Figure 3 The described device can be applied to a clock management system, such as a local server or a cloud server for clock frequency division management, and the embodiments of the present invention are not limited thereto. Figure 3 As shown, the device may include:

[0163] An acquisition module 301 is used to acquire clock frequency information;

[0164] The first processing module 302 is used to calculate and divide the clock frequency information to obtain frequency division ratio area information; the frequency division ratio area information represents the area range of the frequency division coefficient required by the NM type clock structure;

[0165] The second processing module 303 is used to calculate and search the frequency division ratio region information to obtain the optimal frequency division ratio information; the optimal frequency division ratio information is used to indicate the setting of the NM type clock structure.

[0166] It can be seen that implementation Figure 3The described clock frequency division device can obtain the optimal frequency division ratio information for indicating the setting of the NM type clock structure by performing calculation division processing and calculation search processing on the clock frequency information, which is beneficial to reducing the traversal range of the frequency division coefficient, improving the efficiency of calculating the optimal frequency division ratio, and thus reducing the CPU load.

[0167] In another optional embodiment, Figure 4 As shown, the first processing module 302 includes a first processing submodule 3021 and a second processing submodule 3022, wherein:

[0168] The first processing submodule 3021 is used to calculate and process the clock frequency information to obtain frequency ratio information; the frequency ratio information represents the ratio relationship between the parent clock frequency and the expected frequency corresponding to the child clock;

[0169] The second processing submodule 3022 is used to divide the preset frequency division range information by using the frequency ratio information to obtain frequency division ratio region information.

[0170] It can be seen that implementation Figure 4 The described clock frequency division device can obtain frequency division ratio region information by calculating and dividing the clock frequency information, which is beneficial to reducing the traversal range of the frequency division coefficient, improving the calculation efficiency of the optimal frequency division ratio, and thus reducing the CPU load.

[0171] In yet another optional embodiment, Figure 4 As shown, the second processing submodule 3021 divides the preset frequency division range information using the frequency ratio information, and obtains the frequency division ratio region information in the following specific manner:

[0172] Determine whether the frequency ratio information and the preset frequency division range information have an intersection, and obtain a first intersection determination result; the first intersection determination result represents the positional relationship between the slope line corresponding to the frequency ratio information and the frequency division interval corresponding to the frequency division range information;

[0173] When the first intersection judgment result is no, executing a preset first area division strategy, dividing the frequency division range information, and obtaining frequency division ratio area information;

[0174] When the first intersection judgment result is yes, a preset second area division strategy is executed to divide the frequency division range information to obtain frequency division ratio area information.

[0175] It can be seen that implementation Figure 4The described clock frequency division device can select a region division strategy to divide the frequency division range information to obtain the frequency division ratio region information by judging and analyzing whether there is an intersection between the frequency ratio information and the frequency division range information, which is beneficial to reducing the traversal range of the frequency division coefficient, improving the efficiency of calculating the optimal frequency division ratio, and thus reducing the CPU load.

[0176] In yet another optional embodiment, Figure 4 As shown, the second processing submodule 3022 executes the preset second area division strategy to divide the frequency division range information, and the specific method of obtaining the frequency division ratio area information is as follows:

[0177] Performing ratio calculation processing on the frequency division range information to obtain frequency division ratio information; the frequency division ratio information includes a first frequency division ratio and / or a second frequency division ratio;

[0178] Matching the frequency ratio information and the frequency division ratio value information to obtain target frequency division ratio value region information; the target frequency division ratio value region information includes L region information values; L is a positive integer greater than or equal to 1 and less than or equal to 2;

[0179] The frequency division ratio region information is determined according to the target frequency division ratio value region information.

[0180] It can be seen that the implementation Figure 4 The described clock frequency division device can perform comprehensive processing such as ratio calculation processing and matching processing on the frequency division range information to obtain the frequency division ratio area information, which is more conducive to reducing the traversal range of the frequency division coefficient, improving the calculation efficiency of the optimal frequency division ratio, and thus reducing the CPU load.

[0181] In yet another optional embodiment, Figure 4 As shown, the second processing module 303 performs calculation and search processing on the frequency division ratio region information to obtain the optimal frequency division ratio information in the following specific manner:

[0182] Selecting a frequency division point for the frequency division ratio region information to obtain information on a frequency division point to be selected; the information on the frequency division point to be selected includes a plurality of frequency division points to be selected;

[0183] Calculate and process the selected frequency division point information and the frequency ratio information to obtain calculated value information;

[0184] The optimal frequency division ratio information is screened out from the calculated value information according to the preset frequency division ratio selection rule.

[0185] It can be seen that the implementation Figure 4 The described clock frequency division device can obtain the optimal frequency division ratio information by performing comprehensive processing such as frequency division point selection, calculation processing and screening processing on the frequency division ratio area information, which is more conducive to reducing the traversal range of the frequency division coefficient, improving the efficiency of calculating the optimal frequency division ratio, and thus reducing the CPU load.

[0186] In yet another optional embodiment, Figure 4 As shown, the second processing module 303 selects the frequency division point for the frequency division ratio region information, and obtains the information of the frequency division point to be selected in the specific manner as follows:

[0187] Determine the frequency division intersection point information according to the frequency ratio information;

[0188] The frequency division ratio region information is traversed and processed starting from the frequency division intersection point information to obtain the frequency division point information to be selected.

[0189] It can be seen that implementation Figure 4 The described clock frequency division device can obtain the information of the selected frequency division point by comprehensive processing of the frequency ratio information, which is more conducive to reducing the traversal range of the frequency division coefficient, improving the calculation efficiency of the optimal frequency division ratio, and thus reducing the CPU load.

[0190] In yet another optional embodiment, Figure 4 As shown, the second processing module 303 performs calculation and search processing on the frequency division ratio region information to obtain the optimal frequency division ratio information in the following specific manner:

[0191] The target frequency division ratio search strategy is selected from a preset frequency division ratio search strategy set by using the frequency division ratio region information; the frequency division ratio search strategy set includes a plurality of frequency division ratio search strategies; the frequency division ratio search strategy is related to the positional relationship between the slope line corresponding to the frequency ratio information and the frequency division interval corresponding to the frequency division range information;

[0192] Execute the target division ratio search strategy to obtain the optimal division ratio information.

[0193] It can be seen that implementation Figure 4 The described clock frequency division device can obtain the optimal frequency division ratio information for indicating the setting of the NM type clock structure by performing calculation division processing, screening processing and search processing on the clock frequency information, which is beneficial to reducing the traversal range of the frequency division coefficient, improving the efficiency of calculating the optimal frequency division ratio, and thus reducing the CPU load.

[0194] Embodiment 4

[0195] See also Figure 5 , Figure 5 is a schematic diagram of the structure of another clock frequency division device disclosed in an embodiment of the present invention. Figure 5 The described device can be applied to a clock management system, such as a local server or a cloud server for clock frequency division management, and the embodiments of the present invention are not limited thereto. Figure 5 As shown, the device may include:

[0196] A memory 401 storing executable program codes;

[0197] a processor 402 coupled to the memory 401;

[0198] The processor 402 calls the executable program code stored in the memory 401 to execute the steps in the clock frequency division method described in the first or second embodiment.

[0199] Embodiment 5

[0200] An embodiment of the present invention discloses a computer-readable storage medium storing a computer program for electronic data exchange, wherein the computer program enables a computer to execute the steps in the clock frequency division method described in the first or second embodiment.

[0201] Embodiment 6

[0202] An embodiment of the present invention discloses a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to enable a computer to execute the steps in the clock division method described in Embodiment 1 or Embodiment 2.

[0203] The device embodiments described above are only illustrative, wherein the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, i.e., they may be located in one place, or they may be distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative work.

[0204] Through the specific description of the above embodiments, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on such an understanding, the above technical solution can be essentially or partly contributed to the prior art in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, and the storage medium includes a read-only memory (ROM), a random access memory (RAM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable rewritable read-only memory (EEPROM), a compact disc (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.

[0205] Finally, it should be noted that the clock division method and device disclosed in the embodiments of the present invention only disclose the preferred embodiments of the present invention, which are only used to illustrate the technical solution of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, it should be understood by those skilled in the art that the technical solutions described in the aforementioned embodiments can still be modified, or some of the technical features therein can be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A clock frequency division method, characterized in that: The method comprises: Get clock frequency information; Calculating and dividing the clock frequency information to obtain frequency division ratio region information; the frequency division ratio region information represents the region range of the frequency division coefficient required by the NM type clock structure; Calculating and searching the frequency division ratio region information to obtain optimal frequency division ratio information; the optimal frequency division ratio information is used to indicate setting the NM type clock structure; The calculating and dividing the clock frequency information to obtain the frequency division ratio region information includes: Calculating and processing the clock frequency information to obtain frequency ratio information; the frequency ratio information represents the ratio relationship between the parent clock frequency and the expected frequency corresponding to the child clock; Using the frequency ratio information, the preset frequency division range information is divided and processed to obtain frequency division ratio region information; The using the frequency ratio information to divide the preset frequency division range information to obtain the frequency division ratio region information includes: Determine whether the frequency ratio information and the preset frequency division range information have an intersection, and obtain a first intersection determination result; the first intersection determination result represents the positional relationship between the slope line corresponding to the frequency ratio information and the frequency division interval corresponding to the frequency division range information; When the first intersection judgment result is no, executing a preset first area division strategy, dividing the frequency division range information to obtain frequency division ratio area information; When the first intersection judgment result is yes, executing a preset second area division strategy, dividing the frequency division range information to obtain the frequency division ratio area information; The executing of the preset second area division strategy to divide the frequency division range information to obtain the frequency division ratio area information includes: Performing ratio calculation processing on the frequency division range information to obtain frequency division ratio information; the frequency division ratio information includes a first frequency division ratio and / or a second frequency division ratio; Matching the frequency ratio information and the frequency division ratio value information to obtain target frequency division ratio value area information; the target frequency division ratio value area information includes L area information values; L is a positive integer greater than or equal to 1 and less than or equal to 2; determining the frequency division ratio area information according to the target frequency division ratio value area information; The step of calculating and searching the frequency division ratio region information to obtain the optimal frequency division ratio information includes: Selecting a frequency division point for the frequency division ratio region information to obtain information on a frequency division point to be selected; the information on a frequency division point to be selected includes a plurality of frequency division points to be selected; Calculating and processing the to-be-selected frequency division point information and the frequency ratio information to obtain calculated value information; Filtering out the best frequency division ratio information from the calculated value information according to a preset frequency division ratio selection rule; The step of selecting a frequency division point for the frequency division ratio region information to obtain information of a frequency division point to be selected includes: Determining frequency division intersection information according to the frequency ratio information; The frequency division ratio region information is traversed and processed starting from the frequency division intersection point information to obtain the frequency division point information to be selected.

2. The clock frequency division method according to claim 1, characterized in that: The step of calculating and searching the frequency division ratio region information to obtain the optimal frequency division ratio information includes: The target frequency division ratio search strategy is screened out from a preset frequency division ratio search strategy set using the frequency division ratio region information; the frequency division ratio search strategy set includes a plurality of frequency division ratio search strategies; the frequency division ratio search strategy is related to the positional relationship between the slope line corresponding to the frequency ratio information and the frequency division interval corresponding to the frequency division range information; The target frequency division ratio search strategy is executed to obtain the optimal frequency division ratio information.

3. A clock frequency dividing device, characterized in that: The device comprises: An acquisition module, used to acquire clock frequency information; A first processing module is used to calculate and divide the clock frequency information to obtain frequency division ratio area information; the frequency division ratio area information represents the area range of the frequency division coefficient required by the NM type clock structure; A second processing module is used to calculate and search the frequency division ratio area information to obtain the best frequency division ratio information; the best frequency division ratio information is used to indicate the setting of the NM type clock structure; The first processing module includes a first processing submodule and a second processing submodule, wherein: The first processing submodule is used to calculate and process the clock frequency information to obtain frequency ratio information; the frequency ratio information represents the ratio relationship between the parent clock frequency and the expected frequency corresponding to the child clock; The second processing submodule is used to divide the preset frequency division range information by using the frequency ratio information to obtain frequency division ratio region information; The second processing submodule divides the preset frequency division range information using the frequency ratio information to obtain the frequency division ratio region information in the following specific manner: Determine whether the frequency ratio information and the preset frequency division range information have an intersection, and obtain a first intersection determination result; the first intersection determination result represents the positional relationship between the slope line corresponding to the frequency ratio information and the frequency division interval corresponding to the frequency division range information; When the first intersection judgment result is no, executing a preset first area division strategy, dividing the frequency division range information to obtain frequency division ratio area information; When the first intersection judgment result is yes, executing a preset second area division strategy, dividing the frequency division range information to obtain the frequency division ratio area information; The second processing submodule executes a preset second area division strategy to divide the frequency division range information, and obtains the frequency division ratio area information in a specific manner as follows: Performing ratio calculation processing on the frequency division range information to obtain frequency division ratio information; the frequency division ratio information includes a first frequency division ratio and / or a second frequency division ratio; Matching the frequency ratio information and the frequency division ratio value information to obtain target frequency division ratio value region information; the target frequency division ratio value region information includes L region information values; L is a positive integer greater than or equal to 1 and less than or equal to 2; Determining the frequency division ratio region information according to the target frequency division ratio value region information; The specific method in which the second processing module performs calculation and search processing on the frequency division ratio region information to obtain the optimal frequency division ratio information is: Selecting a frequency division point for the frequency division ratio region information to obtain information on a frequency division point to be selected; the information on a frequency division point to be selected includes a plurality of frequency division points to be selected; Calculating and processing the to-be-selected frequency division point information and the frequency ratio information to obtain calculated value information; Filtering out the best frequency division ratio information from the calculated value information according to a preset frequency division ratio selection rule; The specific method in which the second processing module selects a frequency division point from the frequency division ratio region information to obtain the information of the to-be-selected frequency division point is: Determining frequency division intersection information according to the frequency ratio information; The frequency division ratio region information is traversed and processed starting from the frequency division intersection point information to obtain the frequency division point information to be selected.

4. A clock frequency dividing device, characterized in that: The device comprises: A memory storing executable program code; a processor coupled to the memory; The processor calls the executable program code stored in the memory to execute the clock division method as described in any one of claims 1-2.

5. A computer storage medium, characterized in that: The computer storage medium stores computer instructions, and when the computer instructions are called, they are used to execute the clock frequency division method according to any one of claims 1-2.

Citation Information

Patent Citations

  • Method and system for configuring clock of audio equipment

    CN101847993A

  • Method of generating a clock, and semiconductor device

    CN104954015A