Frequency modulation method, device and equipment for a general-purpose processor
By detecting service scheduling information and calculating the core main frequency, and adjusting the working frequency of the general processor, the problem of high power consumption of the general processor in the communication protocol baseband processing is solved, and precise energy-saving effects are achieved.
Patent Information
- Application Number
- CN202110507866.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-05-10
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2041-05-10
AI Technical Summary
In the prior art, general-purpose processors consume high power and have large electricity bills when performing communication protocol baseband processing. The existing energy-saving strategy monitors a long load time and does not comply with the business model of communication protocol baseband processing.
By detecting the service scheduling information, calculate the core main frequency required for the processing time to reach the first time limit, and adjust the operating frequency of the general processor according to the core main frequency to achieve accurate consumption reduction.
Improve the accuracy of the consumption reduction strategy, reduce power consumption, and achieve energy saving effect.
Smart Images

Figure CN115328293B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of mobile communication technologies, and in particular, to a frequency modulation method, apparatus, and device for a general-purpose processor. Background Art
[0002] When performing communication protocol baseband processing, using a general-purpose processor has both advantages such as flexible development and convenient debugging compared to using a dedicated communication chip, and disadvantages such as higher power consumption and larger size. Especially the power consumption problem is more prominent in the 5G era.
[0003] The general-purpose processor itself has the function of energy conservation and consumption reduction. The common means is to adjust the core frequency of the CPU core or the uncore frequency according to the load of the Central Processing Unit (CPU). When the CPU load is low, the power consumption is reduced by reducing the frequency. Even when there is no load at all, it will enter the sleep mode, that is, running at the lowest frequency.
[0004] The current technology mainly adjusts the energy-saving strategy according to the CPU load, and there are two disadvantages:
[0005] First: The monitoring load time is long. Usually, the load for seconds or minutes or more needs to be monitored before predicting the energy-saving strategy for the next period of time, which does not conform to the service model of the communication protocol baseband processing with a granularity of 1 ms or 500 us.
[0006] Second: It belongs to a prediction and estimation scheme. That is, the premise of the scheme design is that it is considered that the load is slowly changing and has a certain pattern. The subsequent processing load is estimated based on the previous processing load, so as to adjust the energy-saving strategy. However, this method does not conform well to the characteristic that there is basically no correlation between each processing granularity in the communication protocol baseband processing process. Summary of the Invention
[0007] Embodiments of the present invention provide a frequency modulation method, apparatus, and device for a general-purpose processor to solve the problems of high power consumption and large electricity cost during communication protocol baseband processing based on a general-purpose processor in the prior art.
[0008] In a first aspect, an embodiment of the present invention provides a frequency modulation method for a general-purpose processor, including:
[0009] Detecting service scheduling information required for the general-purpose processor to process services;
[0010] In the case of detecting the service scheduling information, calculating a first core frequency required for the general-purpose processor to process services to reach a first time limit;
[0011] Adjust the core operating frequency of the general-purpose processor according to the first core operating frequency.
[0012] Optionally, calculating the first core operating frequency required for the general-purpose processor to process a service to reach a first time limit value according to the service scheduling information includes:
[0013] Calculate a second time required for the general-purpose processor to run a first number of times at the core operating frequency before adjustment according to multiple time-frequency resources included in the service scheduling information, where the first number of times is the number of times the general-purpose processor needs to run to process the multiple time-frequency resources at the core operating frequency before adjustment;
[0014] Calculate the first core operating frequency required for the general-purpose processor to process the multiple time-frequency resources to reach the first time limit value according to the core operating frequency before adjustment, the first time limit value, and the second time.
[0015] Optionally, the determination of the first number of times includes:
[0016] Calculate a second number of times required for the general-purpose processor to process one time-frequency resource at the core operating frequency before adjustment;
[0017] Calculate the first number of times required for the general-purpose processor to process the multiple time-frequency resources at the core operating frequency before adjustment according to the number of time-frequency resources in the service scheduling information and the second number of times.
[0018] Optionally, calculating the second number of times required for the general-purpose processor to process one time-frequency resource at the core operating frequency before adjustment includes:
[0019] Calculate a first quantity of cycles required for the general-purpose processor to process one floating-point complex multiplication and a second quantity of cycles required for one floating-point complex addition according to the processing capability of the general-purpose processor; where the cycle is the time required for the general-purpose processor to run once at the core operating frequency before adjustment;
[0020] Calculate the second number of times required for the general-purpose processor to process one time-frequency resource at the core operating frequency before adjustment according to the first quantity and the second quantity.
[0021] Optionally, calculating the second number of times required for the general-purpose processor to process one time-frequency resource at the core operating frequency before adjustment according to the first quantity and the second quantity includes:
[0022] Calculate the number of complex multiplications and the number of complex additions required for the general-purpose processor to process a time-frequency resource at the core operating frequency before adjustment.
[0023] Calculate the sum of the product of the first quantity and the number of complex multiplications and the product of the second quantity and the number of complex additions.
[0024] Use the sum value as the second number of operations required for the general-purpose processor to process a time-frequency resource at the core operating frequency before adjustment.
[0025] Optionally, after detecting the service scheduling information required for the general-purpose processor to process services, the method further includes:
[0026] When the service scheduling information is detected, adjust the non-core operating frequency of the general-purpose processor to the maximum value during operation.
[0027] Optionally, adjusting the core operating frequency of the general-purpose processor according to the first core operating frequency includes:
[0028] Compare the first core operating frequency with the core operating frequency threshold of the general-purpose processor;
[0029] Adjust the core operating frequency of the general-purpose processor to the larger value of the first core operating frequency and the core operating frequency threshold of the general-purpose processor.
[0030] Optionally, the method further includes:
[0031] When the service scheduling information is not detected, adjust the core operating frequency and the non-core operating frequency of the general-purpose processor to their respective preset values.
[0032] In a second aspect, an embodiment of the present invention further provides a device, including a memory, a transceiver, and a processor:
[0033] The memory is used to store computer programs; the transceiver is used to transmit and receive data under the control of the processor; the processor is used to read the computer programs in the memory and perform the following operations:
[0034] Detect the service scheduling information required for the general-purpose processor to process services;
[0035] When the service scheduling information is detected, calculate the first core operating frequency required for the general-purpose processor to process services to reach the first time limit according to the service scheduling information;
[0036] Adjust the core operating frequency of the general-purpose processor according to the first core operating frequency.
[0037] Optionally, when the processor calculates the first core main frequency required for the processing time of the general-purpose processor to process services to reach the first time limit according to the service scheduling information, it specifically includes:
[0038] According to multiple time-frequency resources included in the service scheduling information, calculate a second time required for the general-purpose processor to run a first number of times at the core working main frequency before adjustment, where the first number of times is the number of times the general-purpose processor needs to run to process the multiple time-frequency resources at the core working main frequency before adjustment;
[0039] According to the core working main frequency before adjustment, the first time limit, and the second time, calculate the first core main frequency required for the processing time of the general-purpose processor to process the multiple time-frequency resources to reach the first time limit.
[0040] Optionally, the determination of the first number of times includes:
[0041] Calculate a second number of times required for the general-purpose processor to run to process one time-frequency resource at the core working main frequency before adjustment;
[0042] According to the number of time-frequency resources in the service scheduling information and the second number of times, calculate the first number of times required for the general-purpose processor to run to process the multiple time-frequency resources at the core working main frequency before adjustment.
[0043] Optionally, when the processor calculates the second number of times required for the general-purpose processor to run to process one time-frequency resource at the core working main frequency before adjustment, it specifically includes:
[0044] According to the processing capability of the general-purpose processor, calculate a first quantity of cycles required for the general-purpose processor to process one floating-point complex multiplication and a second quantity of cycles required for one floating-point complex addition; where the cycle is the time required for the general-purpose processor to run once at the core working main frequency before adjustment;
[0045] According to the first quantity and the second quantity, calculate the second number of times required for the general-purpose processor to run to process one time-frequency resource at the core working main frequency before adjustment.
[0046] Optionally, when the processor calculates the second number of times required for the general-purpose processor to run to process one time-frequency resource at the core working main frequency before adjustment according to the first quantity and the second quantity, it specifically includes:
[0047] Calculate the number of complex multiplications required for the general-purpose processor to process one time-frequency resource at the core working main frequency before adjustment and the number of complex additions required;
[0048] Calculate the sum of the product of the first quantity and the number of complex multiplications and the product of the second quantity and the number of complex additions;
[0049] Use the sum value as the second number of operations required for the general - purpose processor to process a time - frequency resource at the core working main frequency before adjustment.
[0050] Optionally, when the processor executes to adjust the core working main frequency of the general - purpose processor according to the first core main frequency, it specifically includes:
[0051] Compare the first core main frequency with the core working main frequency threshold of the general - purpose processor;
[0052] Adjust the core working main frequency of the general - purpose processor to the larger value between the first core main frequency and the core working main frequency threshold of the general - purpose processor.
[0053] In a third aspect, an embodiment of the present invention further provides a frequency modulation device for a general - purpose processor, including:
[0054] A detection module, configured to detect service scheduling information required for the general - purpose processor to process services;
[0055] A first calculation module, configured to calculate, in the case of detecting the service scheduling information, the first core main frequency required for the general - purpose processor to process services to reach a first time limit value according to the service scheduling information;
[0056] A first frequency modulation module, configured to adjust the core working main frequency of the general - purpose processor according to the first core main frequency.
[0057] In a fourth aspect, an embodiment of the present invention further provides a processor - readable storage medium, where the processor - readable storage medium stores a computer program, and the computer program is used to enable the processor to execute the above - mentioned frequency modulation method for the general - purpose processor.
[0058] In the embodiment of the present invention, in the case of detecting service scheduling information, the first core main frequency required for the general - purpose processor to process services to reach a first time limit value can be calculated according to the service scheduling information, so that the core working main frequency of the general - purpose processor for processing services can be adjusted. That is, through the latest completion time (i.e., the first time limit value) of different time slots, the most suitable main frequency required for the scheduling to reach the latest completion time is calculated, and then the power - saving strategy that should be adopted within the next processing granularity is accurately calculated, solving the problems of high power consumption and large electricity cost during the baseband processing of communication protocols based on general - purpose processors, improving the accuracy of the power - saving strategy, thereby reducing power consumption and achieving an energy - saving effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] To more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the accompanying drawings required for the description of the embodiments of the present invention. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0060] Figure 1 It is a flowchart of the steps of the frequency modulation method for a general-purpose processor provided by an embodiment of the present invention;
[0061] Figure 2 It is a structural block diagram of the frequency modulation device for a general-purpose processor provided by an embodiment of the present invention;
[0062] Figure 3 It is a structural block diagram of the device provided by an embodiment of the present invention. Specific embodiments
[0063] In the embodiments of the present invention, the term "and / or" describes the association relationship of associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. The character " / " generally represents an "or" relationship between the associated objects before and after.
[0064] In the embodiments of the present application, the term "a plurality" refers to two or more, and other quantifiers are similar thereto.
[0065] The following will clearly and completely describe the technical solutions in the embodiments of the present application in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, not all of them. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present application.
[0066] The embodiments of the present application provide a frequency modulation method, device and equipment for a general-purpose processor, which can improve the accuracy of the power consumption reduction strategy, thereby reducing power consumption and achieving an energy-saving effect.
[0067] Among them, the method and the device are based on the same application concept. Since the principles of solving problems by the method and the device are similar, the implementation of the device and the method can be referred to each other, and the repeated parts will not be described again.
[0068] In addition, the technical solutions provided by the embodiments of the present application can be applied to multiple systems, especially 5G systems. For example, the applicable systems can be Global System of Mobile Communication (GSM) systems, Code Division Multiple Access (CDMA) systems, Wideband Code Division Multiple Access (WCDMA) General Packet Radio Service (GPRS) systems, Long Term Evolution (LTE) systems, LTE Frequency Division Duplex (FDD) systems, LTE Time Division Duplex (TDD) systems, Long Term Evolution Advanced (LTE-A) systems, Universal Mobile Telecommunication System (UMTS), Worldwide Interoperability for Microwave Access (WiMAX) systems, 5G New Radio (NR) systems, etc. Both terminals and network devices are included in these multiple systems. The system may also include a core network part, such as an Evolved Packet System (EPS), a 5G System (5GS), etc.
[0069] The terminal involved in the embodiments of this application can be a device that provides voice and / or data connectivity to users, such as a handheld device with wireless connection capabilities, or other processing devices connected to a wireless modem, etc. In different systems, the name of the terminal may also be different. For example, in a 5G system, the terminal can be called a User Equipment (UE). The wireless terminal can communicate with one or more Core Networks (CNs) via a Radio Access Network (RAN). The wireless terminal can be a mobile terminal, such as a mobile phone (or a "cellular" phone) and a computer with a mobile terminal. For example, it can be a portable, pocket-sized, handheld, computer-integrated, or vehicle-mounted mobile device that exchanges voice and / or data with the wireless access network. For example, devices such as Personal Communication Service (PCS) phones, cordless phones, Session Initiated Protocol (SIP) phones, Wireless Local Loop (WLL) stations, and Personal Digital Assistant (PDA). The wireless terminal can also be called a system, a subscriber unit, a subscriber station, a mobile station, a mobile, a remote station, an access point, a remote terminal, an access terminal, a user terminal, a user agent, a user device, which is not limited in the embodiments of this application.
[0070] The network device involved in the embodiments of this application can be a base station, which can include multiple cells that provide services to terminals. Depending on the specific application scenarios, the base station can also be referred to as an access point, or it can be a device in the access network that communicates with wireless terminals through one or more sectors over the air interface, or have other names. The network device can be used to mutually replace the received air frames and Internet Protocol (IP) packets, acting as a router between the wireless terminal and the rest of the access network, where the rest of the access network can include an IP communication network. The network device can also coordinate the attribute management of the air interface. For example, the network device involved in the embodiments of this application can be a network device (Base Transceiver Station, BTS) in the Global System for Mobile communications (GSM) or Code Division Multiple Access (CDMA), or it can be a network device (NodeB) in Wide-band Code Division Multiple Access (WCDMA), or it can also be an evolved network device (evolutional Node B, eNB or e-NodeB) in the Long Term Evolution (LTE) system, a 5G base station (gNB) in the 5G network architecture (next generation system), or it can be a Home evolved Node B (HeNB), a relay node, a femto, a pico, etc. The embodiments of this application do not limit it. In some network architectures, the network device can include a centralized unit (CU) node and a distributed unit (DU) node, and the centralized unit and the distributed unit can also be arranged separately geographically.
[0071] The network device and the terminal can each use one or more antennas for Multi-Input Multi-Output (MIMO) transmission, and the MIMO transmission can be Single User MIMO (SU-MIMO) or Multiple User MIMO (MU-MIMO). According to the form and quantity of the combined root antennas, the MIMO transmission can be 2D-MIMO, 3D-MIMO, FD-MIMO or massive-MIMO, or it can also be diversity transmission, precoding transmission, beamforming transmission, etc.
[0072] Specifically, as Figure 1 shown, an embodiment of the present invention provides a frequency modulation method for a general-purpose processor, which can be applied to a baseband processing unit. The baseband processing unit can be the baseband processing unit of a terminal or the baseband processing unit of a network device, and no specific limitation is made here. The frequency modulation method for the general-purpose processor specifically includes the following steps:
[0073] Step 101, detect the service scheduling information required for the general-purpose processor to process services.
[0074] In the above step 101, the baseband processing unit detects the service scheduling information required for the general-purpose processor to process services, that is, the baseband processing unit detects whether it has received the service scheduling information required for the general-purpose processor to process services. Among them, the service scheduling information can be sent by a service scheduler.
[0075] It should be noted that during the baseband processing of the communication protocol, all services to be processed are subject to advance scheduling, that is, before the arrival of the air interface time slot (the smallest processing granularity), the service scheduler needs to send the service scheduling information required for the service to the baseband processing unit in advance.
[0076] Optionally, the service scheduling information is the air interface resource. The air interface resource is a subframe in the time domain, a physical resource block (PRB) in the frequency domain, and the number of MIMO streams in the spatial domain. Taking the NR system as an example, the service scheduling information may include at least one of the following: service channel type, time-frequency resource, multiple-input multiple-output (MIMO) stream number, equalization algorithm, current frame structure, etc. Among them, the current frame structure can be carried in the service scheduling information or pre-configured; the equalization algorithm can be the Minimum Mean Squared Error (MMSE) equalization algorithm, etc.
[0077] Step 102, when the service scheduling information is detected, calculate the first core main frequency required for the processing time of the general-purpose processor to process services to reach the first time limit according to the service scheduling information.
[0078] In the above step 102, if it is detected that the service scheduling information is received, it is necessary to calculate the core main frequency required for the processing time of the general-purpose processor to process services to reach the first time limit according to the service scheduling information, that is, the first core main frequency. Among them, the first time limit is the latest completion time for the general-purpose processor to process services in different time slots under different frame structures.
[0079] It should be noted that the processing time required for different service loads can be accurately calculated, which is mainly related to several key factors such as the service channel type, time-frequency resources, number of MIMO streams, and equalization algorithm in the service scheduling information.
[0080] Step 103: Adjust the core operating frequency of the general-purpose processor according to the first core main frequency.
[0081] In the above step 103, after calculating the first core main frequency required for the general-purpose processor to process services to reach the first time limit, the core operating frequency of the general-purpose processor can be adjusted according to the first core main frequency, thereby determining the actual core main frequency of the general-purpose processor for processing services, and then adjusting the power consumption reduction strategy to obtain the true frequency required for the next service processing, so as to achieve the effect of precise power consumption reduction.
[0082] In the above embodiment, when the service scheduling information is detected, the first core main frequency required for the general-purpose processor to process services to reach the first time limit can be calculated according to the service scheduling information. Thus, the core operating frequency of the general-purpose processor for processing services can be adjusted, that is, the most suitable main frequency required to reach the latest completion time (i.e., the first time limit) is calculated through the latest completion time of different time slots, and then the power consumption reduction strategy that should be adopted within the next processing granularity can be accurately judged, solving the problems of high power consumption and large electricity cost during the baseband processing of communication protocols based on general-purpose processors, improving the accuracy of the power consumption reduction strategy, thereby reducing power consumption and achieving the energy-saving effect.
[0083] Optionally, step 102 calculates the first core main frequency required for the general-purpose processor to process services to reach the first time limit according to the service scheduling information, and specifically may include the following steps:
[0084] Step A1: Calculate the second time required for the general-purpose processor to run the first number of times at the core operating frequency before adjustment according to the multiple time-frequency resources included in the service scheduling information, where the first number of times is the number of times required for the general-purpose processor to process the multiple time-frequency resources at the core operating frequency before adjustment.
[0085] It can be understood that for this time, if it is the first frequency adjustment, the core operating frequency before adjustment is the core operating frequency at the initial working time. If this is not the first frequency adjustment, it can be understood that for this adjustment, the core operating frequency before adjustment is the core operating frequency after the previous adjustment corresponding to this adjustment.
[0086] In the above step A1, taking the NR system as an example, the service scheduling information may include multiple time-frequency resources. First, it is necessary to obtain the core working main frequency of the general-purpose processor before adjustment. If the service scheduling information is received, then according to the multiple time-frequency resources included in the service scheduling information, the total number of times the general-purpose processor needs to run to process the multiple time-frequency resources at the core working main frequency before adjustment can be calculated, that is, the first number; and further calculate the time required to run the first number, that is, the second time.
[0087] Step A2, calculate the first core main frequency required for the general-purpose processor to process the multiple time-frequency resources so that the processing time reaches the first time limit according to the core working main frequency before adjustment, the first time limit, and the second time.
[0088] In the above step A2, after calculating the second time, according to the core working main frequency of the general-purpose processor before adjustment, the first time limit, and the second time, the first core main frequency required for the general-purpose processor to process the multiple time-frequency resources so that the processing time reaches the first time limit can be calculated. Specifically, if the first time limit corresponds to the core working main frequency before adjustment, then the frequency corresponding to the second time is the first core main frequency.
[0089] The specific calculation method can be as follows:
[0090] The first core main frequency = the core working main frequency before adjustment / (the first time limit / the second time)
[0091] Optionally, step A1 calculates the second time required for the general-purpose processor to run the first number of times at the core working main frequency before adjustment according to the multiple time-frequency resources included in the service scheduling information, and specifically may include the following steps:
[0092] Step B1, calculate the first number of times the general-purpose processor needs to run to process the multiple time-frequency resources at the core working main frequency before adjustment according to the multiple time-frequency resources included in the service scheduling information.
[0093] In the above step B1, first, it is necessary to obtain the time cycle required for the general-purpose processor to run once at the core working main frequency before adjustment according to the core working main frequency before adjustment; after calculating a cycle, if the service scheduling information is received, then according to the multiple time-frequency resources included in the service scheduling information, the total number of times the general-purpose processor needs to run at the core working main frequency before adjustment can be calculated, and the number of runs is the first number; since cycle refers to the time for the general-purpose processor to run once at the core working main frequency before adjustment, in the case of knowing the first number of times the general-purpose processor needs to run at the core working main frequency before adjustment, the number of cycles can be further known, that is, the number of cycles is the numerical value of the first number.
[0094] Step B2: Calculate the second time required for the general-purpose processor to run the first number of times at the core operating main frequency before adjustment according to the first number and the cycle.
[0095] In the above step B2, according to the first number and a cycle, it can be calculated that the second time required for the general-purpose processor to run the first number of times at the core operating main frequency before adjustment, that is, multiplying the cycle by the first number can obtain the second time.
[0096] Optionally, the determination of the first number can specifically include the following steps:
[0097] Step C1: Calculate the second number of times required for the general-purpose processor to process one time-frequency resource at the core operating main frequency before adjustment.
[0098] In the above step C1, taking the NR system as an example, the service scheduling information may include multiple time-frequency resources. According to the service scheduling information, it can be calculated the second number of times required for the general-purpose processor to process one time-frequency resource at the core operating main frequency before adjustment, that is, obtaining the number of cycles required for one time-frequency resource.
[0099] Step C2: Calculate the first number of times required for the general-purpose processor to process the multiple time-frequency resources at the core operating main frequency before adjustment according to the number of time-frequency resources in the service scheduling information and the second number of times.
[0100] In the above step C2, the service scheduling information includes the number of multiple time-frequency resources. According to the number of time-frequency resources in the service scheduling information and the second number of times required for the general-purpose processor to run at the core operating main frequency before adjustment for one time-frequency resource, it is calculated the first number of times required for the general-purpose processor to run at the core operating main frequency before adjustment; specifically, multiplying the second number of times by the number of time-frequency resources can obtain the first number of times.
[0101] Optionally, step C1 calculates the second number of times required for the general-purpose processor to process one time-frequency resource at the core operating main frequency before adjustment, which may specifically include the following steps:
[0102] According to the processing capability of the general-purpose processor, calculate the first number of cycles required for the general-purpose processor to process one floating-point complex multiplication and the second number of cycles required for one floating-point complex addition; where the cycle is the time required for the general-purpose processor to run once at the core operating main frequency before adjustment;
[0103] Calculate a second number of times that the general - purpose processor needs to run to process one time - frequency resource at the core operating frequency before adjustment according to the first number and the second number.
[0104] In the above - mentioned embodiment, before calculating the first core operating frequency, first obtain the processing capacity of the general - purpose processor. Processors with different processing capabilities are different. According to the processing capacity of the general - purpose processor, a first number of cycles required for the general - purpose processor to perform a floating - point complex multiplication and a second number of cycles required for a floating - point complex addition can be calculated. That is, it is obtained that a floating - point complex multiplication needs to run a first number of times at the core operating frequency before adjustment, and calculating a floating - point complex addition needs to run a second number of times at the operating frequency. Then, according to the first number and the second number, a second number of times that the general - purpose processor needs to run to process one time - frequency resource at the core operating frequency before adjustment can be obtained.
[0105] Optionally, the step of calculating a second number of times that the general - purpose processor needs to run to process one time - frequency resource at the core operating frequency before adjustment according to the first number and the second number may specifically include the following content:
[0106] Calculate the number of complex multiplications and the number of complex additions required for the general - purpose processor to process one time - frequency resource at the core operating frequency before adjustment;
[0107] Calculate the sum of the product of the first number and the number of complex multiplications and the product of the second number and the number of complex additions;
[0108] Take the sum value as the second number of times that the general - purpose processor needs to run to process one time - frequency resource at the core operating frequency before adjustment.
[0109] In the above - mentioned embodiment, taking the NR system as an example, first calculate the number of complex multiplications required for the general - purpose processor to process one time - frequency resource at the core operating frequency before adjustment (i.e., the number of complex multiplications) according to the service scheduling information, and calculate the number of complex additions required for the general - purpose processor to process one time - frequency resource at the core operating frequency before adjustment (i.e., the number of complex additions); multiply the first number of cycles required for a floating - point complex multiplication by the number of complex multiplications to obtain a first value, and multiply the second number of cycles required for a floating - point complex addition by the number of complex additions to obtain a second value; add the first value and the second value, that is, obtain the sum value, and then the sum value can be taken as the second number of times that the general - purpose processor needs to run to process one time - frequency resource at the core operating frequency before adjustment.
[0110] Optionally, after detecting the service scheduling information required for the general-purpose processor to process services in step 101, the method may further include the following:
[0111] When the service scheduling information is detected, adjust the non-core main frequency of the general-purpose processor to the maximum value during operation.
[0112] Specifically, if the service scheduling information is received, the non-core main frequency of the general-purpose processor can be adjusted to the maximum value during operation. In other words, the non-core main frequency of the general-purpose processor has a range during operation, that is, it has a maximum non-core main frequency value and a minimum non-core main frequency value; if the service scheduling information is received, the non-core main frequency of the general-purpose processor can be adjusted to the maximum value during operation, that is, the maximum non-core main frequency value of the general-purpose processor during operation. It should be noted that when the baseband processing unit receives the service scheduling information, since the non-core main frequency has nothing to do with the load and is mainly related to the CPU memory access, the non-core main frequency can be adjusted to the highest non-core main frequency value when the service scheduling information is received, that is, the maximum non-core main frequency value of the general-purpose processor during operation.
[0113] Optionally, step 103 adjusts the core operating main frequency of the general-purpose processor according to the first core main frequency, specifically including:
[0114] Compare the first core main frequency with the core operating main frequency threshold of the general-purpose processor;
[0115] Adjust the core operating main frequency of the general-purpose processor to the larger value between the first core main frequency and the core operating main frequency threshold of the general-purpose processor.
[0116] In the above embodiment, the first core main frequency is compared with the core operating main frequency threshold of the general-purpose processor. If the first core main frequency is greater than the core operating main frequency threshold of the general-purpose processor, the first core main frequency is used as the core operating main frequency of the general-purpose processor; if the first core main frequency is less than the core operating main frequency threshold of the general-purpose processor, the core operating main frequency threshold is used as the core operating main frequency of the general-purpose processor. If the first core main frequency is equal to the core operating main frequency threshold of the general-purpose processor, the core operating main frequency threshold or the first core main frequency is used as the core operating main frequency of the general-purpose processor.
[0117] It should be noted that the core operating main frequency threshold of the general-purpose processor refers to the lowest core main frequency value during the operation of the general-purpose processor. Since the lowest core main frequency value may be higher than the calculated first core main frequency, the larger value between the first core main frequency and the core operating main frequency threshold of the general-purpose processor can be finally set as the adjusted core operating main frequency of the general-purpose processor.
[0118] Optionally, the method may further include:
[0119] In the case where the service scheduling information is not detected, the core operating main frequency and the non-core main frequency of the general-purpose processor are respectively adjusted to their corresponding preset values.
[0120] Specifically, if the service scheduling information is not detected, the core operating main frequency of the general-purpose processor can be adjusted to its corresponding preset value, that is, the first preset value; and the non-core main frequency of the general-purpose processor is adjusted to its corresponding preset value, that is, the second preset value.
[0121] Wherein, the first preset value may be the lowest core main frequency value, or a frequency value greater than the lowest core main frequency value, that is, the first preset value is a frequency value greater than or equal to the lowest core main frequency value and less than the highest core main frequency value. And the second preset value may be the lowest non-core main frequency value, or a frequency value greater than the lowest non-core main frequency value, that is, the second preset value is a frequency value greater than or equal to the lowest non-core main frequency value and less than the highest non-core main frequency value.
[0122] The above calculation process is elaborated in detail through specific embodiments as follows:
[0123] Taking the analysis of the overhead of floating-point complex multiplication operations as an example to illustrate the calculation process. The following specific data is only for reference, and the processing capabilities of different processors are different.
[0124] Assume that in one cycle, the general-purpose processor port port0 (i.e., the operation execution unit) can execute 16 floating-point addition / subtraction / multiplication operations. For a floating-point complex multiplication, it needs to be decomposed into 4 multiplications and 2 additions. According to the above analysis, for a floating-point complex multiplication, the first number P of cycles required is:
[0125]
[0126] For a floating-point complex addition, the real part and the imaginary part need to be decomposed into 2 addition processes, and the second number Q of cycles required is:
[0127]
[0128] Explanation 1: In the above formula, it is processed according to 0.7 port0 instead of 1, because in actual situations, due to factors such as data copying and data correlation before and after, it is impossible to achieve the ideal 1 port0 processing. Therefore, preferably, it can take the value of 0.7 port0.
[0129] Explanation 2: cycle refers to the time for the processor to run once at the core operating frequency. Assuming the core operating frequency is 2.2 GHz (which can be understood as before adjustment), then the time for one cycle is:
[0130] cycle = 1 / 2.2 GHz ≈ 0.45 ns
[0131] The above content will be elaborated through specific application scenarios as follows:
[0132] Example of Application Scenario 1:
[0133] For the FDD frame structure of NR, if is the number of symbols in one time slot, is the frame length of one radio frame, that is, one radio frame is 10 ms, each time slot is 1 ms, contains 14 symbols, the subcarrier spacing is 15 KHz, the bandwidth is 30 MHz, and the corresponding total number of PRBs is N RB = 160, and one PRB has 12 subcarriers.
[0134] If performing baseband signal processing for 4 antennas, scheduling the Physical Uplink Shared Channel (PUSCH) in time slot 7, with 160 PRBs occupied and a two-stream configuration, the received signal is obtained using the following MMSE equalization algorithm, along with the corresponding number of complex multiplications and complex additions:
[0135]
[0136] where k represents the subcarrier;
[0137] l represents the symbol;
[0138] The above formula is used to calculate the symbol result of the k-th subcarrier of the l-th symbol. The meaning of each matrix is explained as follows:
[0139] represents the channel estimation response matrix of the k-th subcarrier of the l-th symbol, which is related to the number of streams and antennas. The matrix dimension in this configuration is 4 antennas * 2 streams;
[0140] represents the matrix 's transpose conjugate matrix;
[0141] R uu represents the interference matrix, which is related to the number of antennas. The matrix dimension in this configuration is 4 antennas * 4 antennas;
[0142] represents the inverse matrix of matrix R uu ;
[0143] Denotes the received signal column vector, which is related to the number of antennas. The matrix dimension in this configuration is 4 antennas * 1;
[0144] I represents the identity matrix, which is related to the number of streams. The matrix dimension in this configuration is 2 streams * 2 streams;
[0145] Denotes the received signal column vector, which is related to the number of streams. The matrix dimension in this configuration is 2 streams * 1.
[0146] Specifically, the detailed calculation process of the cycle number is described in Table 1 below:
[0147] Table 1 Cycle number
[0148]
[0149] Among them, Denotes the multiplication of a 2*4-dimensional matrix and a 4*4-dimensional matrix to obtain a 2*4-dimensional matrix; in the calculation process of the 2*4-dimensional matrix and the 4*4-dimensional matrix, a total of 2*4*4 complex multiplications and 2*4*3 complex additions are required, that is, each element in the first row of the 2*4-dimensional matrix is multiplied and summed with each element in the first column of the 4*4-dimensional matrix, which goes through four complex multiplications and three complex additions; then each element in the first row of the 2*4-dimensional matrix is multiplied and summed with each element in the second column of the 4*4-dimensional matrix, which goes through four complex multiplications and three complex additions; each element in the first row of the 2*4-dimensional matrix is multiplied and summed with each element in the third column of the 4*4-dimensional matrix, which goes through four complex multiplications and three complex additions; each element in the first row of the 2*4-dimensional matrix is multiplied and summed with each element in the fourth column of the 4*4-dimensional matrix, which goes through four complex multiplications and three complex additions. The above calculations go through a total of 4*4 complex multiplication calculations and 3*4 complex addition calculations.
[0150] Similarly, each element in the second row of the 2×4 matrix is multiplied with each element in the first column of the 4×4 matrix and then summed up, which involves four complex multiplications and three complex additions; then each element in the second row of the 2×4 matrix is multiplied with each element in the second column of the 4×4 matrix and then summed up, which involves four complex multiplications and three complex additions; each element in the second row of the 2×4 matrix is multiplied with each element in the third column of the 4×4 matrix and then summed up, which involves four complex multiplications and three complex additions; each element in the second row of the 2×4 matrix is multiplied with each element in the fourth column of the 4×4 matrix and then summed up, which involves four complex multiplications and three complex additions; the above calculations altogether involve 4×4 complex multiplications and 3×4 complex additions. In summary, multiplying a 2×4 matrix with a 4×4 matrix altogether involves 2×4×4 complex multiplications and 2×4×3 complex additions.
[0151] Similarly, It means that multiplying a 2×4 matrix with a 4×4 matrix results in a 2×4 matrix, then multiplying this 2×4 matrix with a 4×2 matrix gives a 2×2 matrix, and then adding this 2×2 matrix with a 2×2 matrix results in a new 2×2 matrix; in the calculation process of multiplying the above three matrices, first multiplying the 2×4 matrix with the 4×4 matrix altogether requires 2×4×4 complex multiplications and 2×4×3 complex additions to obtain a 2×4 matrix, then multiplying the obtained 2×4 matrix with the 4×2 matrix altogether requires 2×2×4 complex multiplications and 2×2×3 complex additions to obtain a 2×2 matrix; and, adding the obtained 2×2 matrix with a 2×2 matrix altogether requires 2×2 complex additions to obtain a 2×2 matrix. In summary, the above calculations altogether require (2×2 + 2×4)×4 = 48 complex multiplications and (2×2 + 2×4)×3 + 4 = 40 complex additions.
[0152] Similarly, It means that multiplying a 2×4 matrix with a 4×4 matrix results in a 2×4 matrix, then multiplying this 2×4 matrix with a 4×1 matrix gives a 2×1 matrix; in the calculation process of multiplying the above three matrices, first multiplying the 2×4 matrix with the 4×4 matrix altogether requires 2×4×4 complex multiplications and 2×4×3 complex additions to obtain a 2×4 matrix, then multiplying the obtained 2×4 matrix with the 4×1 matrix altogether requires 2×1×4 complex multiplications and 2×1×3 complex additions to obtain a 2×1 matrix. In summary, the above calculations altogether require (2×1 + 2×4)×4 = 40 complex multiplications and (2×1 + 2×4)×3 = 30 complex additions.
[0153] Similarly, Represents the inverse matrix of a 2×2 dimensional matrix. The calculation process requires a total of 6 complex multiplications and 1 complex addition.
[0154] Similarly, Represents the multiplication of the inverse matrix of a 2×2 dimensional matrix and a 2×1 dimensional matrix, which requires a total of 2×2×2 = 8 complex multiplications and 2×2×1 = 4 complex additions.
[0155] In summary, the number of complex multiplications (i.e., the third number) using the above MMSE equalization algorithm is 48 + 40 + 6 + 8 = 102, and the corresponding number of cycles (which can also be said to be the fifth number) is: 102×0.536 ≈ 55; the number of complex additions (i.e., the fourth number) using the above MMSE equalization algorithm is 40 + 30 + 1 + 4 = 75, and the corresponding number of cycles (which can also be said to be the sixth number) is: 75×0.179 ≈ 14.
[0156] Therefore, the symbol of the k-th subcarrier of the l-th symbol requires 55 + 14 = 69 cycles (which can also be said to be the second number) to be calculated. Then the number of cycles (which can also be said to be the first number) required for 14 symbols and 160 PRBs (corresponding to 160×12 = 1920 subcarriers) is: 14×160×12×69 = 1854720. If the operating main frequency is set to 2.2 GHz, the required time (i.e., the second time) is 1854720×0.45 ns ≈ 834 μs. However, the latest completion time of this time slot (i.e., the first time limit) allows for a calculation time of 1 ms. Then the actual core main frequency can be set to 2.2 GHz / (1000 / 834) ≈ 1.8 GHz, that is, the first core main frequency.
[0157] Example of application scenario two:
[0158] For the FDD frame structure of NR, if is the number of symbols included in one time slot, is the frame length of a radio frame, that is, a radio frame is 10 ms, each time slot is 1 ms, contains 14 symbols, the subcarrier spacing is 15 KHz, the bandwidth is 30 MHz, the total number of corresponding PRBs is N RB = 160, and one PRB has 12 subcarriers.
[0159] If 4-antenna baseband signal processing is performed, in time slot 7, scheduling the PUSCH channel, with 100 PRBs occupied and single-stream configuration, the following MMSE equalization algorithm is used to obtain the received signal, and the corresponding number of complex multiplications and complex additions is calculated:
[0160]
[0161] Among them, k represents the subcarrier;
[0162] l represents the symbol;
[0163] The above formula is used to calculate the symbol result of the k-th subcarrier of the l-th symbol; among them, the meaning of each matrix is explained as follows:
[0164] represents the channel estimation response matrix of the k-th subcarrier of the l-th symbol, which is related to the number of streams and the number of antennas. The matrix dimension in this configuration is 4 antennas * 1 stream;
[0165] represents the matrix 's conjugate transpose matrix;
[0166] R uu represents the interference matrix, which is related to the number of antennas. The matrix dimension in this configuration is 4 antennas * 4 antennas;
[0167] represents the matrix R uu 's inverse matrix;
[0168] represents the received signal column vector, which is related to the number of antennas. The matrix dimension in this configuration is 4 antennas * 1;
[0169] I represents the identity matrix, which is related to the number of streams. The matrix dimension in this configuration is 1 stream * 1 stream;
[0170] represents the received signal column vector, which is related to the number of streams. The matrix dimension in this configuration is 1 stream * 1.
[0171] Specifically, the detailed calculation process of the cycle number is described in Table 2 below:
[0172] Table 2 Cycle number
[0173]
[0174] Among them, It represents the multiplication of a 1×4 matrix and a 4×4 matrix to obtain a 1×4 matrix. In the calculation process of multiplying the 1×4 matrix and the 4×4 matrix, a total of 1×4×4 complex multiplications and 1×4×3 complex additions are required. That is, each element of the 1×4 matrix is multiplied by and summed with each element of the first column of the 4×4 matrix, which undergoes four complex multiplications and three complex additions. Then, each element of the 1×4 matrix is multiplied by and summed with each element of the second column of the 4×4 matrix, which undergoes four complex multiplications and three complex additions. Each element of the 1×4 matrix is multiplied by and summed with each element of the third column of the 4×4 matrix, which undergoes four complex multiplications and three complex additions. Each element of the 1×4 matrix is multiplied by and summed with each element of the fourth column of the 4×4 matrix, which undergoes four complex multiplications and three complex additions. The above calculations altogether undergo 1×4×4 complex multiplication calculations and 1×4×3 complex addition calculations.
[0175] Similarly, It represents the multiplication of a 1×4 matrix and a 4×4 matrix to obtain a 1×4 matrix, then multiplying the resulting 1×4 matrix with a 4×1 matrix to obtain a 1×1 matrix, and then adding a 1×1 matrix to get a new 1×1 matrix. In the calculation process of multiplying the above three matrices, first, when multiplying the 1×4 matrix and the 4×4 matrix, a total of 1×4×4 complex multiplications and 1×4×3 complex additions are required to obtain a 1×4 matrix. Then, the resulting 1×4 matrix is multiplied with the 4×1 matrix, which requires 1×1×4 complex multiplications and 1×1×3 complex additions to obtain a 1×1 matrix. And, the resulting 1×1 matrix is added with a 1×1 matrix, which requires 1×1 complex addition to obtain a 1×1 matrix. In summary, the above calculations altogether require (1×1 + 1×4)×4 = 20 complex multiplications and (1×1 + 1×4)×3 + 1 = 16 complex addition calculations.
[0176] Similarly, It represents the multiplication of a 1×4 matrix and a 4×4 matrix to obtain a 1×4 matrix, then multiplying the resulting 1×4 matrix with a 4×1 matrix to obtain a 1×1 matrix. In the calculation process of multiplying the above three matrices, first, when multiplying the 1×4 matrix and the 4×4 matrix, a total of 1×4×4 complex multiplications and 1×4×3 complex additions are required to obtain a 1×4 matrix. Then, the resulting 1×4 matrix is multiplied with the 4×1 matrix, which requires 1×1×4 complex multiplications and 1×1×3 complex additions to obtain a 1×1 matrix. In summary, the above calculations altogether require (1×1 + 1×4)×4 = 20 complex multiplications and (1×1 + 1×4)×3 = 15 complex addition calculations.
[0177] Similarly, represents the inverse matrix of a 1*1 dimensional matrix. The calculation process requires a total of 1 complex multiplication and 0 complex additions.
[0178] Similarly, represents the multiplication of the inverse matrix of a 1*1 dimensional matrix and a 1*1 dimensional matrix, which requires a total of 1 complex multiplication calculation and 0 complex addition calculations.
[0179] In summary, the number of complex multiplications (i.e., the third number) corresponding to the above MMSE equalization algorithm is 20 + 20 + 1 + 1 = 42, and the corresponding number of cycles (which can also be said to be the fifth number) is: 42 * 0.536 ≈ 23; the number of complex additions (i.e., the fourth number) corresponding to the above MMSE equalization algorithm is 16 + 15 + 0 + 0 = 31, and the corresponding number of cycles (which can also be said to be the sixth number) is: 31 * 0.179 ≈ 6.
[0180] Therefore, the symbol of the k-th subcarrier of the l-th symbol requires 23 + 6 = 29 cycles (which can also be said to be the second number) to be calculated. Then the number of cycles (which can also be said to be the first number) required for 14 symbols and 100 PRBs (corresponding to 100 * 12 = 240 subcarriers) is: 14 * 100 * 12 * 29 = 487200. If the operating main frequency is set to 2.2 GHz, the required time (i.e., the second time) is 487200 * 0.45 ns ≈ 220 us. However, the latest completion time of this time slot (i.e., the first time limit) allows for a calculation of 1 ms, so the actual core main frequency can be set to 2.2 GHz / (1000 / 220) ≈ 484 MHz, that is, the first core main frequency.
[0181] In summary, in the above embodiments of the present invention, during the baseband processing of the communication protocol, all services to be processed belong to advanced scheduling, that is, before the air interface time slot (the smallest processing granularity) arrives, the service scheduler sends the service scheduling information required by the service to the baseband processing unit in advance; then calculates the processing time required for different service loads according to the service scheduling information; and calculates the most appropriate main frequency required to reach the latest completion time according to the latest completion time of different time slots under different frame structures, so as to accurately determine the power consumption reduction strategy that should be adopted within the next processing granularity, which can accelerate the frequency of adjusting the power consumption reduction strategy, improve the accuracy of the power consumption reduction strategy, thereby reducing power consumption and achieving an energy-saving effect.
[0182] The above introduced the frequency modulation method of the general-purpose processor provided by the embodiments of the present invention. Next, the frequency modulation device of the general-purpose processor provided by the embodiments of the present invention will be introduced with reference to the accompanying drawings.
[0183] See Figure 2, an embodiment of the present invention further provides a frequency modulation device 200 for a general-purpose processor, and the device includes:
[0184] A detection module 201, configured to detect service scheduling information required for the general-purpose processor to process services;
[0185] A first calculation module 202, configured to, when the service scheduling information is detected, calculate a first core main frequency required for the processing time of the general-purpose processor to process services to reach a first time limit value according to the service scheduling information;
[0186] A first frequency modulation module 203, configured to adjust the core operating main frequency of the general-purpose processor according to the first core main frequency.
[0187] Optionally, the first calculation module 202 includes:
[0188] A first calculation unit, configured to calculate a second time required for the general-purpose processor to operate a first number of times at the core operating main frequency before adjustment according to a plurality of time-frequency resources included in the service scheduling information, where the first number of times is the number of times required for the general-purpose processor to process the plurality of time-frequency resources at the core operating main frequency before adjustment;
[0189] A second calculation unit, configured to calculate a first core main frequency required for the processing time of the general-purpose processor to process the plurality of time-frequency resources to reach the first time limit value according to the core operating main frequency before adjustment, the first time limit value, and the second time.
[0190] Optionally, the determination of the first number of times includes:
[0191] Calculate a second number of times required for the general-purpose processor to process one time-frequency resource at the core operating main frequency before adjustment;
[0192] Calculate a first number of times required for the general-purpose processor to process the plurality of time-frequency resources at the core operating main frequency before adjustment according to the number of time-frequency resources in the service scheduling information and the second number of times.
[0193] Optionally, the calculation of the second number of times required for the general-purpose processor to process one time-frequency resource at the core operating main frequency before adjustment includes:
[0194] Calculate a first quantity of cycles required for the general-purpose processor to process one floating-point complex multiplication and a second quantity of cycles required for one floating-point complex addition according to the processing capability of the general-purpose processor; where the cycle is the time required for the general-purpose processor to operate once at the core operating main frequency before adjustment;
[0195] Calculate a second number of times required for the general - purpose processor to process one time - frequency resource at the core operating main frequency before adjustment according to the first number and the second number.
[0196] Optionally, the calculating a second number of times required for the general - purpose processor to process one time - frequency resource at the core operating main frequency before adjustment according to the first number and the second number includes:
[0197] Calculate the number of complex multiplications and the number of complex additions required for the general - purpose processor to process one time - frequency resource at the core operating main frequency before adjustment;
[0198] Calculate the sum of the product of the first number and the number of complex multiplications and the product of the second number and the number of complex additions;
[0199] Use the sum value as the second number of times required for the general - purpose processor to process one time - frequency resource at the core operating main frequency before adjustment.
[0200] Optionally, after detecting the service scheduling information required for the general - purpose processor to process services, the device further includes:
[0201] A second frequency - modulation module, configured to adjust the non - core main frequency of the general - purpose processor to the maximum value during operation when the service scheduling information is detected.
[0202] Optionally, the first frequency - modulation module 203 includes:
[0203] A comparison unit, configured to compare the first core main frequency with the core operating main - frequency threshold of the general - purpose processor;
[0204] A frequency - modulation unit, configured to adjust the core operating main frequency of the general - purpose processor to the larger value between the first core main frequency and the core operating main - frequency threshold of the general - purpose processor.
[0205] Optionally, the device further includes:
[0206] A third frequency - modulation module, configured to adjust the core operating main frequency and the non - core main frequency of the general - purpose processor to their respective preset values when the service scheduling information is not detected.
[0207] In summary, in the above embodiments of the present invention, during the baseband processing of the communication protocol, the services to be processed all belong to advanced scheduling, that is, before the air interface time slot (the smallest processing granularity) arrives, the service scheduler sends the service scheduling information required by the service to the baseband processing unit in advance; then calculates the processing time required for different service loads according to the service scheduling information; and calculates the most appropriate main frequency required to reach the latest completion time according to the latest completion time of different time slots under different frame structures, so as to accurately determine the power consumption reduction strategy that should be adopted within the next processing granularity, which can accelerate the frequency of adjusting the power consumption reduction strategy, improve the accuracy of the power consumption reduction strategy, thereby reducing power consumption and achieving the energy-saving effect.
[0208] It should be noted that the division of units in the embodiments of this application is illustrative, only a logical function division, and there may be other division methods in actual implementation. In addition, in each embodiment of this application, each functional unit can be integrated in one processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above integrated units can be implemented in the form of hardware or in the form of software functional units.
[0209] If the above integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a processor-readable storage medium. Based on such an understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the methods described in the embodiments of this application. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs that can store program codes.
[0210] It should be noted here that the above device provided in the embodiments of the present invention can implement all the method steps implemented in the above method embodiments and can achieve the same technical effects. Therefore, the same parts and beneficial effects as those in the method embodiments will not be specifically described in this embodiment.
[0211] Embodiments of the present invention also provide a device, which can be a terminal or a network device. When the device is a network device, as Figure 3 shown, the device includes a memory, a transceiver, and a processor;
[0212] A memory 320 for storing a computer program;
[0213] A transceiver 310 for receiving and sending data under the control of a processor 300;
[0214] A processor 300 for reading the computer program in the memory and performing the following operations:
[0215] Detect service scheduling information required for a general - purpose processor to process services;
[0216] When the service scheduling information is detected, calculate a first core main frequency required for the processing time of the general - purpose processor to process services to reach a first time limit value according to the service scheduling information;
[0217] Adjust the core operating main frequency of the general - purpose processor according to the first core main frequency.
[0218] Optionally, when the processor 300 executes calculating the first core main frequency required for the processing time of the general - purpose processor to process services to reach a first time limit value according to the service scheduling information, it specifically includes:
[0219] Calculate a second time required for the general - purpose processor to run a first number of times at the core operating main frequency before adjustment according to multiple time - frequency resources included in the service scheduling information, where the first number of times is the number of times required for the general - purpose processor to process the multiple time - frequency resources at the core operating main frequency before adjustment;
[0220] Calculate the first core main frequency required for the processing time of the general - purpose processor to process the multiple time - frequency resources to reach the first time limit value according to the core operating main frequency before adjustment, the first time limit value, and the second time.
[0221] Optionally, the determination of the first number of times includes:
[0222] Calculate a second number of times required for the general - purpose processor to process one time - frequency resource at the core operating main frequency before adjustment;
[0223] Calculate the first number of times required for the general - purpose processor to process the multiple time - frequency resources at the core operating main frequency before adjustment according to the number of time - frequency resources in the service scheduling information and the second number of times.
[0224] Optionally, when the processor 300 executes calculating the second number of times required for the general - purpose processor to process one time - frequency resource at the core operating main frequency before adjustment, it specifically includes:
[0225] According to the processing capacity of the general - purpose processor, calculate a first quantity of cycles required for the general - purpose processor to process a floating - point complex multiplication and a second quantity of cycles required for a floating - point complex addition; wherein, the cycle is the time required for the general - purpose processor to run once at the core working main frequency before adjustment.
[0226] According to the first quantity and the second quantity, calculate a second number of times the general - purpose processor needs to run to process a time - frequency resource at the core working main frequency before adjustment.
[0227] Optionally, when the processor 300 executes calculating the second number of times the general - purpose processor needs to run to process a time - frequency resource at the core working main frequency before adjustment according to the first quantity and the second quantity, it specifically includes:
[0228] Calculate the number of complex multiplications and the number of complex additions required for the general - purpose processor to process a time - frequency resource at the core working main frequency before adjustment.
[0229] Calculate the sum of the product of the first quantity and the number of complex multiplications and the product of the second quantity and the number of complex additions.
[0230] Take the sum value as the second number of times the general - purpose processor needs to run to process a time - frequency resource at the core working main frequency before adjustment.
[0231] Optionally, after detecting the service scheduling information required for the general - purpose processor to process services, the processor 300 also performs the following operations:
[0232] In the case of detecting the service scheduling information, adjust the non - core main frequency of the general - purpose processor to the maximum value during operation.
[0233] Optionally, when the processor 300 executes adjusting the core working main frequency of the general - purpose processor according to the first core main frequency, it specifically includes:
[0234] Compare the first core main frequency with the core working main frequency threshold of the general - purpose processor.
[0235] Adjust the core working main frequency of the general - purpose processor to the larger value between the first core main frequency and the core working main frequency threshold of the general - purpose processor.
[0236] Optionally, the processor 300 also performs the following operations:
[0237] In the case of not detecting the service scheduling information, adjust the core working main frequency and the non - core main frequency of the general - purpose processor to their respective preset values.
[0238] Among them, in Figure 3 , the bus architecture may include any number of interconnected buses and bridges, specifically various circuits represented by one or more processors represented by the processor 300 and the memory represented by the memory 320 are linked together. The bus architecture can also link together various other circuits such as peripheral devices, voltage regulators, and power management circuits, etc., which are well known in the art, so they will not be further described herein. The bus interface provides an interface. The transceiver 310 may be a plurality of components, that is, including a transmitter and a receiver, and provides a unit for communicating with various other devices on the transmission medium, and these transmission mediums include wireless channels, wired channels, optical fiber cables, and other transmission mediums. The processor 300 is responsible for managing the bus architecture and general processing, and the memory 320 can store the data used by the processor 300 when executing operations.
[0239] The processor 300 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or a complex programmable logic device (CPLD), and the processor may also adopt a multi-core architecture.
[0240] The processor is used to execute any of the methods provided in the embodiments of the present application according to the obtained executable instructions by calling the computer program stored in the memory. The processor and the memory may also be physically separated.
[0241] It should be noted here that the above device provided in the embodiments of the present invention can implement all the method steps implemented by the frequency modulation method embodiments of the above general processor, and can achieve the same technical effects, and the same parts and beneficial effects as the method embodiments in this embodiment will not be specifically described herein.
[0242] The embodiments of the present invention also provide a processor-readable storage medium, and the processor-readable storage medium stores a computer program, and the computer program is used to make the processor execute the frequency modulation method of the above general processor.
[0243] The processor-readable storage medium may be any available medium or data storage device accessible by the processor, including but not limited to magnetic memories (such as floppy disks, hard disks, magnetic tapes, magneto-optical discs (MO), etc.), optical memories (such as CDs, DVDs, BDs, HVDs, etc.), and semiconductor memories (such as ROMs, EPROMs, EEPROMs, non-volatile memories (NANDFLASH), solid state drives (SSD)), etc.
[0244] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memories and optical memories, etc.) that contain computer-usable program code.
[0245] The present application is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each flow and / or block in the flowchart and / or block diagram, as well as the combination of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer-executable instructions. These computer-executable instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing devices generate means for implementing the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0246] These processor-executable instructions can also be stored in a processor-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the processor-readable memory generate a manufactured article including instruction means that implement the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0247] These processor-executable instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operation steps are performed on the computer or other programmable device to generate a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0248] Obviously, those skilled in the art can make various modifications and variations to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalent technologies, the present application also intends to include these modifications and variations.
Claims
1. A frequency modulation method for a general-purpose processor, characterized in that, Including: Detecting service scheduling information required for a general-purpose processor to process services; When the service scheduling information is detected, calculating a first core main frequency required for the processing time of the general-purpose processor to process services to reach a first time limit value according to the service scheduling information; Adjusting the core working main frequency of the general-purpose processor according to the first core main frequency; The calculating the first core main frequency required for the processing time of the general-purpose processor to process services to reach a first time limit value according to the service scheduling information includes: Calculating a second time required for the general-purpose processor to run a first number of times at the core working main frequency before adjustment according to multiple time-frequency resources included in the service scheduling information, where the first number of times is the number of times required for the general-purpose processor to process the multiple time-frequency resources at the core working main frequency before adjustment; Calculating the first core main frequency required for the processing time of the general-purpose processor to process the multiple time-frequency resources to reach the first time limit value according to the core working main frequency before adjustment, the first time limit value, and the second time; Wherein, the specific calculation method of the first core main frequency is as follows: First core main frequency = core working main frequency before adjustment / (first time limit value / second time).
2. The method according to claim 1, wherein The determination of the first number of times includes: Calculating a second number of times required for the general-purpose processor to process one time-frequency resource at the core working main frequency before adjustment; Calculating the first number of times required for the general-purpose processor to process the multiple time-frequency resources at the core working main frequency before adjustment according to the number of time-frequency resources in the service scheduling information and the second number of times.
3. The method according to claim 2, wherein The calculating the second number of times required for the general-purpose processor to process one time-frequency resource at the core working main frequency before adjustment includes: Calculating a first quantity of cycles required for the general-purpose processor to process a floating-point complex multiplication and a second quantity of cycles required for a floating-point complex addition according to the processing capacity of the general-purpose processor; wherein, the cycle is the time required for the general-purpose processor to run once at the core working main frequency before adjustment; Calculating the second number of times required for the general-purpose processor to process one time-frequency resource at the core working main frequency before adjustment according to the first quantity and the second quantity.
4. The method according to claim 3, wherein Calculating the second number of times required for the general-purpose processor to process one time-frequency resource at the core working main frequency before adjustment includes: Calculating the number of complex multiplications and the number of complex additions required for the general-purpose processor to process one time-frequency resource at the core working main frequency before adjustment; Calculating the sum value of multiplying the first quantity by the number of complex multiplications and multiplying the second quantity by the number of complex additions; Taking the sum value as the second number of times required for the general-purpose processor to process one time-frequency resource at the core working main frequency before adjustment.
5. The method according to claim 1, wherein After detecting the service scheduling information required for the general-purpose processor to process services, the method further includes: When the service scheduling information is detected, adjusting the non-core main frequency of the general-purpose processor to the maximum value during operation.
6. The method according to claim 1, wherein Adjusting the core operating frequency of the general - purpose processor according to the first core operating frequency includes: Comparing the first core operating frequency with the threshold of the core operating frequency of the general - purpose processor; Adjusting the core operating frequency of the general - purpose processor to the larger value between the first core operating frequency and the threshold of the core operating frequency of the general - purpose processor.
7. The method according to claim 1, characterized in that, The method further includes: When the service scheduling information is not detected, adjusting the core operating frequency and the non - core operating frequency of the general - purpose processor to their respective preset values.
8. A device, characterized in that, Including a memory, a transceiver, and a processor: The memory is used to store computer programs; the transceiver is used to send and receive data under the control of the processor; the processor is used to read the computer programs in the memory and perform the following operations: Detecting service scheduling information required for the general - purpose processor to process services; When the service scheduling information is detected, calculating the first core operating frequency required for the general - purpose processor to process services to reach the first time limit according to the service scheduling information; Adjusting the core operating frequency of the general - purpose processor according to the first core operating frequency; When the processor calculates the first core operating frequency required for the general - purpose processor to process services to reach the first time limit according to the service scheduling information, it specifically includes: Calculating the second time required for the general - purpose processor to run the first number of times at the core operating frequency before adjustment according to multiple time - frequency resources included in the service scheduling information, where the first number of times is the number of times the general - purpose processor needs to run to process the multiple time - frequency resources at the core operating frequency before adjustment; Calculating the first core operating frequency required for the general - purpose processor to process the multiple time - frequency resources to reach the first time limit according to the core operating frequency before adjustment, the first time limit, and the second time; Wherein, the specific calculation method of the first core operating frequency is as follows: First core operating frequency = core operating frequency before adjustment / (first time limit / second time).
9. The device according to claim 8, wherein The determination of the first number of times includes: Calculating the second number of times required for the general - purpose processor to process one time - frequency resource at the core operating frequency before adjustment; Calculating the first number of times required for the general - purpose processor to process the multiple time - frequency resources at the core operating frequency before adjustment according to the number of time - frequency resources in the service scheduling information and the second number of times.
10. The device according to claim 9, characterized in that, When the processor calculates the second number of times required for the general - purpose processor to process one time - frequency resource at the core operating frequency before adjustment, it specifically includes: Calculating the first quantity of cycles required for the general - purpose processor to process one floating - point complex multiplication and the second quantity of cycles required for one floating - point complex addition according to the processing ability of the general - purpose processor; where the cycle is the time required for the general - purpose processor to run once at the core operating frequency before adjustment; Calculating the second number of times required for the general - purpose processor to process one time - frequency resource at the core operating frequency before adjustment according to the first quantity and the second quantity.
11. The device according to claim 10, characterized in that, When the processor executes the calculation of the second number of times required for the general-purpose processor to process one time-frequency resource at the core working main frequency before adjustment according to the first number and the second number, it specifically includes: Calculating the number of complex multiplications and the number of complex additions required for the general-purpose processor to process one time-frequency resource at the core working main frequency before adjustment; Calculating the sum of the product of the first number and the number of complex multiplications and the product of the second number and the number of complex additions; Taking the sum value as the second number of times required for the general-purpose processor to process one time-frequency resource at the core working main frequency before adjustment.
12. The device according to claim 8, characterized in that, When the processor executes the adjustment of the core working main frequency of the general-purpose processor according to the first core main frequency, it specifically includes: Comparing the first core main frequency with the core working main frequency threshold of the general-purpose processor; Adjusting the core working main frequency of the general-purpose processor to the larger value between the first core main frequency and the core working main frequency threshold of the general-purpose processor.
13. A frequency modulation device for a general-purpose processor, characterized in that, Including: A detection module for detecting the service scheduling information required for the general-purpose processor to process services; A first calculation module for calculating the first core main frequency required for the processing time of the general-purpose processor to process services to reach the first time limit according to the service scheduling information when the service scheduling information is detected; A first frequency modulation module for adjusting the core working main frequency of the general-purpose processor according to the first core main frequency; The first calculation module includes: A first calculation unit for calculating the second time required for the general-purpose processor to run the first number of times at the core working main frequency before adjustment according to the multiple time-frequency resources included in the service scheduling information, where the first number of times is the number of times required for the general-purpose processor to process the multiple time-frequency resources at the core working main frequency before adjustment; A second calculation unit for calculating the first core main frequency required for the processing time of the general-purpose processor to process the multiple time-frequency resources to reach the first time limit according to the core working main frequency before adjustment, the first time limit, and the second time; Wherein, the specific calculation method of the first core main frequency is as follows: First core main frequency = core working main frequency before adjustment / (first time limit / second time).
14. A processor-readable storage medium, characterized in that, The processor-readable storage medium stores a computer program, and the computer program is used to enable the processor to execute the frequency modulation method of the general-purpose processor according to any one of claims 1 to 7.
Citation Information
Patent Citations
Method and apparatus for adjusting frequency of central processing unit
CN107122036A
Method, apparatus and terminal for controlling CPU power consumption
WO2017206859A1