A performance level encoding method, decoding method and system on chip

By encoding the operating resource parameters and frequencies of the system-on-a-chip (SoC), operating performance codes are generated, which solves the problem of frequent communication between the Agent and the Product Manager (PM). This enables efficient selection of operating performance points, reduces communication frequency, improves selection efficiency, simplifies software design, and extends chip lifespan.

CN121255725BActive Publication Date: 2026-02-17CIX TECH (SHANGHAI) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202511804492.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-03
Publication Date
2026-02-17
Estimated Expiration
2045-12-03

AI Technical Summary

Technical Problem

In existing technologies, when the Agent and PM of a system-on-a-chip communicate via the SCMI protocol, they frequently exchange information about the running performance points, resulting in high communication frequency, low efficiency, and an inability to efficiently select the actual running performance points.

Method used

The system-on-a-chip (SoC) uses preset encoding rules to encode the operating resource parameters and operating frequencies at multiple operating performance points, generating operating performance codes that replace the existing performance levels, covering operating resource parameters and frequencies, reducing communication frequency and improving selection efficiency.

Benefits of technology

By using coding methods, the number of message interactions between the Agent and PM is reduced, the latency of adjusting OPP is decreased, the efficiency of selecting performance points is improved, software design is simplified, and chip lifespan is extended.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121255725B_ABST
    Figure CN121255725B_ABST
Patent Text Reader

Abstract

The application provides a performance level encoding method, decoding method and system on chip, wherein the encoding method comprises the following steps: acquiring running resource parameters used by the system on chip when running at multiple running performance points respectively and current performance levels of the multiple running performance points, wherein the current performance level is used to indicate a running frequency of each running performance point; for each running performance point, encoding the running resource parameters and the running frequency of the running performance point according to a preset encoding rule to obtain running performance encoding of the running performance point; and for each running performance point, updating the current performance level of the running performance point to the running performance encoding. The application solves the technical problem of low efficiency of selecting an actual running performance point caused by high communication frequency in the prior art, and achieves the technical effect of reducing the communication frequency and improving the selection efficiency of the running performance point.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of performance level coding, and particularly to a performance level coding method, a decoding method and a system on chip. BACKGROUND

[0002] A system on chip (SoC) generally sets multiple subsystems, and an ARM processor architecture of the system on chip supports a system control and management interface (SCMI) protocol. The multiple subsystems of the system on chip include an agent and a platform controller (PM), the agent is generally a component or device that performs a specific function, such as an operating system, a GPU, etc., and the PM is responsible for providing power, clock, reset and other related services for each agent, and the agent and the PM communicate according to the SCMI protocol.

[0003] In the prior art, the agent can send frequency adjustment, voltage adjustment and other commands to the PM through the SCMI protocol. A performance domain management protocol is one of the SCMI protocols. In the performance domain management protocol, the PM defines at least one operating performance point (OPP) for each performance domain according to actual platform conditions, each OPP includes a performance level, a working voltage, a running frequency and power consumption. At system startup, the agent obtains all OPPs supported by each performance domain from the PM, and determines an actual OPP used during running according to actual load, temperature, power consumption and other information. At this time, the agent only needs to inform the PM that the performance domain needs to run at the performance level corresponding to the OPP, and the PM can adjust the running frequency, the working voltage and the power consumption indicated by the OPP according to the performance level.

[0004] However, current performance levels are generally expressed using operating frequency, which fails to reflect the operating resources used by the system-on-a-chip (SoC) at its performance points. For IP cores (Intellectual Property Cores) such as Central Processing Units (CPUs), Graphics Processing Units (GPUs), and Neural Network Processing Units (NPUs), SoCs typically use symmetric multi-core architectures, meaning each core has the same performance. Operating resources, such as the number of running cores, are generally determined based on the load. Furthermore, the agent needs to specify the operating resources used at each performance point. This leads to multiple communications between the agent and the PM after receiving the performance point from the PM, so that the PM can shut down other inactive cores according to the agent's specified operating cores. For example, this could be done through the power domain protocol in SCMI to stop powering other cores. This increases the number of messages between the PM and the agent, increasing the latency of adjusting the OPP (Optical Point Protocol). Summary of the Invention

[0005] In view of this, the purpose of this application is to provide at least one encoding method, decoding method and system-on-a-chip with high performance level, which solves the technical problem of low efficiency in selecting the actual running performance point due to high communication frequency in the prior art, and achieves the technical effect of reducing communication frequency and improving the efficiency of selecting the running performance point.

[0006] This application mainly includes the following aspects:

[0007] In a first aspect, embodiments of this application provide a method for encoding performance levels. The method includes: obtaining the operating resource parameters used by a system-on-a-chip (SoC) when it is running at multiple operating performance points and the current performance level of each operating performance point, wherein the current performance level is used to indicate the operating frequency of each operating performance point; for each operating performance point, encoding the operating resource parameters and the operating frequency of the operating performance point according to a preset encoding rule to obtain the operating performance code of the operating performance point; and updating the current performance level of the operating performance point to the operating performance code for each operating performance point.

[0008] Optionally, the running resource parameters include one or more, and the preset encoding rule includes limiting the number of bases of the running performance encoding according to the number of running resource parameters and modifying the number of bits of the running frequency to obtain the running frequency number, wherein one running resource parameter and multiple running resource parameters correspond to different number bases.

[0009] Optionally, the one running resource parameter comprises a running core number, the numeral system corresponding to the one running resource parameter comprises a decimal system, and the running frequency number corresponding to the one running resource parameter comprises a first running frequency number, wherein the running performance code of the running performance point is obtained by: calculating a ratio of the running core number of the running performance point to a total number of chip cores of the system-on-chip, both of which are in the decimal system; calculating a product of the ratio and the first running frequency number to obtain a to-be-modified string; and modifying a last character of the to-be-modified string according to the running core number to obtain the running performance code.

[0010] Optionally, the multiple running resource parameters comprise a running core number, a preset cluster in which the running core is located, and a preset position of the running core in the preset cluster, the numeral system corresponding to the multiple running resource parameters comprises a hexadecimal system, and the running frequency number corresponding to the multiple running resource parameters comprises a second running frequency number, wherein the running performance code of the running performance point is obtained by: converting the second running frequency number into a first binary number in a binary system, and converting the running core number into a second binary number in the binary system; generating a third binary number corresponding to the preset cluster according to a total number of clusters of the system-on-chip and the preset cluster; generating a fourth binary number corresponding to the preset position according to a total number of cluster cores in one cluster and the preset position; combining the first binary number, the second binary number, the third binary number, and the fourth binary number according to a preset combination rule to obtain a to-be-converted binary number; and converting the to-be-converted binary number into the hexadecimal system to obtain the running performance code.

[0011] Optionally, a bit number of the third binary number is equal to the total number of clusters, each bit of the third binary number corresponds to one cluster, and a numerical value of each bit of the third binary number is used to indicate a working state of the cluster corresponding to the bit; a bit number of the fourth binary number is equal to the total number of cluster cores, each bit of the fourth binary number corresponds to one core in the cluster, and a numerical value of each bit of the fourth binary number is used to indicate a working state of the core corresponding to the bit.

[0012] Optionally, the preset combination rule is used to indicate an arrangement order of the first binary number, the second binary number, the third binary number, and the fourth binary number.

[0013] Optionally, a preset bit number of the running performance code depends on a bit number limited by a system control and management interface protocol, and the preset bit numbers corresponding to the one running resource parameter and the multiple running resource parameters are the same.

[0014] In a second aspect, the embodiments of the present application further provide a decoding method of performance level. The decoding method uses the running performance code obtained by the encoding method in the first aspect or any possible implementation manner of the first aspect, and includes: receiving the running performance code of the current performance level of the system chip; decoding the running performance code according to a preset decoding rule to obtain the running resource parameter used by the system chip when running at a target running performance point, wherein the preset decoding rule is the inverse decoding rule corresponding to the preset encoding rule, and the target running performance point is one of the multiple running performance points of the system chip.

[0015] In a third aspect, the embodiments of the present application further provide a system chip, which includes: a platform controller configured to perform the steps of the encoding method in the first aspect or any possible implementation manner of the first aspect, and generate a running performance signal corresponding to each running performance point, wherein the running performance signal includes the running performance code of the running performance point; and an agent configured to receive the running performance signal and perform the steps of the decoding method in the second aspect.

[0016] In a fourth aspect, the embodiments of the present application further provide a computer readable storage medium, which stores a computer program. When the computer program is run by a processor, the steps of the encoding method in the first aspect or any possible implementation manner of the first aspect are performed, or when the computer program is run by the processor, the steps of the decoding method in the second aspect are performed.

[0017] The encoding method, the decoding method and the system chip provided by the embodiments of the present application include: obtaining the running resource parameters used by a system chip when running at multiple running performance points respectively and the current performance level of each running performance point, wherein the current performance level is used to indicate the running frequency of each running performance point; for each running performance point, encoding the running resource parameter and the running frequency of the running performance point according to a preset encoding rule to obtain the running performance code of the running performance point; and for each running performance point, updating the current performance level of the running performance point to the running performance code. The embodiments of the present application encode the running resource parameter and the running frequency of each running performance point by using the preset encoding rule to obtain the running performance code of each running performance point, and replace the current performance level with the running performance code, so that the running performance code can cover the running resource parameter and the running frequency, thereby solving the technical problem of low efficiency of selecting the actual running running performance point caused by high communication frequency in the prior art, and achieving the technical effect of reducing the communication frequency and improving the selection efficiency of the running performance point.

[0018] In order to make the above objectives, characteristics and advantages of the present application more apparent, the following will describe a preferred embodiment in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF DRAWINGS

[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments. It should be understood that the following drawings only show some embodiments of the present application, and therefore should not be regarded as a limitation on the scope, and for those skilled in the art, other related drawings can also be obtained without creative labor.

[0020] Figure 1 A flow chart of a performance level encoding method provided by an embodiment of the present application is shown.

[0021] Figure 2 A structural schematic diagram of a system on chip provided by an embodiment of the present application is shown. DETAILED DESCRIPTION

[0022] In order to make the objectives, technical solutions and advantages of the embodiments of the present application more apparent, the following will describe the technical solutions of the embodiments of the present application clearly and completely with reference to the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of illustration and description, and are not used to limit the protection scope of the present application. In addition, it should be understood that the schematic drawings are not drawn according to the actual proportions. The flow chart shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flow chart can not be implemented in sequence, and the steps without logical context relationship can be reversed in sequence or implemented simultaneously. In addition, one or more other operations can be added to the flow chart or removed from the flow chart by those skilled in the art under the guidance of the content of the present application.

[0023] In addition, the described embodiments are only some of the embodiments of the present application, not all the embodiments. The components of the embodiments of the present application described and shown in the drawings herein can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the claimed present application, but only represents selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.

[0024] In the prior art, the performance level of each operating performance point is generally set as the operating frequency, or a running score obtained by a basic test, or a serial number 1, 2, 3, 4, etc. directly. That is, the performance level only serves as an identifier of the operating performance point and cannot reflect the operating resources used by the system-on-chip when running at the operating performance point. Since the performances of the operating cores in the system-on-chip are the same, not specifying the specific number of operating cores will cause all operating cores to participate in running, which is unnecessary when the load demand is not high and will increase energy consumption. Further, information interaction between the Agent and the PM needs to be performed on the operating resources. The PM can not only adjust the working voltage, operating frequency and power consumption according to the indication of the operating performance point, but also needs to supply power to the working operating core according to the operating resources specified by the Agent. Therefore, the number of messages between the PM and the Agent increases, which increases the delay of adjusting the OPP.

[0025] Based on this, the embodiment of the present application provides a performance level encoding method, a decoding method and a system-on-chip. The operating resource parameters and the operating frequency of each operating performance point are encoded using a preset encoding rule to obtain the operating performance encoding of each operating performance point. The operating performance encoding replaces the current performance level, so that the operating performance encoding can cover the operating resource parameters and the operating frequency. The technical problem of low efficiency of selecting the actual operating performance point caused by high communication frequency in the prior art is solved, and the technical effect of reducing the communication frequency and improving the selection efficiency of the operating performance point is achieved. Specifically as follows:

[0026] Please refer to Figure 1 , Figure 1 The flowchart of the performance level encoding method provided by the embodiment of the present application is shown in FIG. 1. As shown in FIG. 1, the performance level encoding method provided by the embodiment of the present application includes the following steps: Figure 1

[0027] S101: Obtain the operating resource parameters used by the system-on-chip when running at multiple operating performance points and the current performance level of each operating performance point.

[0028] The system-on-chip is generally in the form of a symmetric multi-core. The multiple clusters of the system-on-chip can be multiple clusters in the CPU of the system-on-chip, or multiple clusters in the GPU, or multiple clusters in the NPU of the system-on-chip. That is, the multiple clusters of the system-on-chip refer to multiple clusters in an IP core in the system-on-chip.

[0029] ​The current performance level of each operating performance point refers to the performance level of the operating performance point in the prior art, and is used to indicate the operating frequency of each operating performance point. Generally, the PM sends each operating performance point to the Agent in order of performance level from small to large, and the sending order of the operating performance points also needs to indicate the order of the operating frequency from small to large, that is, the operating performance points with an operating frequency of 350 MHz are sent first, and then the operating performance points with an operating frequency of 800 MHz are sent. Therefore, the value of the current performance level is related to the value of the operating frequency, so that when each operating performance point is sent in ascending order of performance level, the operating frequency can also be guaranteed to be in ascending order.

[0030] For example, the value of the operating frequency used by the current performance level is different from the unit of the value of the operating frequency used by the operating performance point. If the operating performance point indicates running at 350 MHz, 850 mV and 4000 mW, the encoding of the operating performance point is {level=350, frequency=350000, voltage=850, power=4000}, that is, the current performance level (level) is set to 350, the operating frequency (frequency) is set to 350000, the operating voltage (voltage) is set to 850, and the power consumption (power) is set to 4000. Furthermore, the current performance level 350 is in units of MHz, and the operating frequency 350000 is in units of kHz.

[0031] S102: For each operating performance point, encode the operating resource parameters and the operating frequency of the operating performance point according to a preset encoding rule to obtain the operating performance encoding of the operating performance point.

[0032] Specifically, the operating resource parameters include one or more, and the preset encoding rule includes limiting the binary form of the operating performance encoding according to the number of operating resource parameters and modifying the bit number of the operating frequency to obtain the operating frequency number, wherein one operating resource parameter and multiple operating resource parameters correspond to different binary forms.

[0033] That is, the type of the running resource parameter can be one or multiple, when there is only one type of the running resource parameter, the running resource parameter should fully reflect the running resource used by the running performance point, therefore, the running resource parameter is generally selected as the running core number; when the type of the running resource parameter is multiple, the multiple running resource parameters include the running core number, the preset cluster where the running core is located and the preset position of the running core in the preset cluster, wherein, the preset cluster and the preset position can indicate the specific position of the running core, thereby specifically indicating the specific core participating in the running of the system on chip when running at the running performance point.

[0034] The preset bit number of the running performance code depends on the bit number limited by the system control and management interface protocol, and the preset bit numbers corresponding to one running resource parameter and multiple running resource parameters are the same.

[0035] That is, when the running performance code is transmitted, it needs to be transmitted in the form of binary, and therefore, whether the type of the running resource parameter is one or multiple, the preset bit number indicated by the binary number of the running performance code should comply with the bit number required by the system control and management interface (SCMI) protocol, i.e. the bit number is the bit number of the current performance level (generally 32 bits). Or, even if the number of running resource parameters is different, the bit number of the binary number of the running performance code obtained after encoding by the respective preset encoding rules should be the same. Therefore, although the current performance level is replaced by the running performance code, the occupied bit number does not change, and the SCMI protocol requirement can still be met, and the data transmission will not be affected.

[0036] Further, in the case that the type of the running resource parameter is different, the preset encoding rules for different running resource parameters are also different, so that the bit number of the binary number of the running performance code is consistent. Exemplarily, the difference of the preset encoding rules at least reflects in the binary form of the running performance code.

[0037] Moreover, the purpose of embodying the running performance code in different binary forms is that when the subsequent technical personnel check the data interaction content between the PM and the Agent, the running resource situation of the running performance point sent by the PM can be directly and explicitly known, the work efficiency is improved, and the technical personnel is facilitated to analyze whether there is a problem in resource allocation.

[0038] The bit number of the first running frequency number corresponding to one running resource parameter and the bit number of the second running frequency number corresponding to multiple running resource parameters can be the same or different. That is, the bit number of the first running frequency number corresponding to one running resource parameter and the bit number of the second running frequency number corresponding to multiple running resource parameters can be the same or different, depending on the partitioning of the bit number of the binary number of the running performance code.

[0039] That is, in the case of one running resource parameter, the binary number of the running performance code should be divided into two parts, one part representing the first running frequency number and the other part representing the running core number; in the case of multiple running resource parameters, the binary number of the running performance code should be divided into four parts, each part representing the second running frequency number, the running core number, the preset cluster, and the preset position in turn. Further, the bit number of the first running frequency number and the bit number of the second running frequency number depend on the bit number of the corresponding part in the binary number of the running performance code, which is not limited by the present application. The bit number of the first running frequency number and the bit number of the second running frequency number can be set according to actual conditions, and the second running frequency number should be increased as the running frequency increases as much as possible.

[0040] Therefore, in order to reduce the communication frequency reflected by the running core number in the running performance code, the running resource parameter should at least include the running core number used by the system-level chip when running at the running performance point, and the running core number of each running performance point is generally even. Moreover, in order to realize that the PM sends the running performance point to the Agent in ascending order of performance level while also ensuring that the running order of each running performance point is also in ascending order. Further, the running resource parameter and the running frequency of the running performance point need to be considered synchronously to encode the running performance code.

[0041] Specifically, one running resource parameter includes a running core number, the decimal system is included in the binary form corresponding to one running resource parameter, and the first running frequency number is included in the running frequency number corresponding to one running resource parameter. The running performance code of the running performance point is obtained by the following method: calculating the ratio of the running core number of the running performance point to the total number of chip cores of the system-level chip, both the running core number and the total number of chip cores being in the decimal system; calculating the product of the ratio and the first running frequency number to obtain a to-be-modified string; and modifying the last character of the to-be-modified string according to the running core number to obtain the running performance code.

[0042] The total number of chip cores of the system chip refers to the number of all cores of the system chip. For example, the first running frequency number refers to the number of running frequencies selected in megahertz, for example, if the running frequency is 350 megahertz, the first running frequency number is determined as 350, if the running frequency is 800 megahertz, the first running frequency number is determined as 800, and if the running frequency is 1000 megahertz, the first running frequency number is determined as 1000. In addition, the first running frequency number can increase with the increase of the running frequency, and the first running frequency number generally should not be presented in the form of reserving the first N high-order digits. For example, if the first running frequency number is set to reserve the first three high-order digits, the first running frequency number is set to 350 when the running frequency is 350 megahertz, and the first running frequency number is set to 100 when the running frequency is 1000 megahertz, which results in that the first running frequency number corresponding to 1000 megahertz is less than the first running frequency number corresponding to 350 megahertz, which does not comply with the rule of increasing running frequency.

[0043] In an example, the running resource parameter only selects the running core number, the total number of chip cores is 10, and the running frequency of each running performance point is 350 megahertz. At this time, if the running core number of the running performance point is 2, and the total number of chip cores of the system chip is 10, the first running frequency number is determined as 350, the ratio of the running core number to the total number of chip cores of the system chip is calculated as 0.2, and the product of 0.2 and the first running frequency number 350 is 70. The last character 0 of the modified string 70 is modified to the running core number 2, so that the running performance code is 72. If the running core number of the running performance point is 6, and the running frequency is 350 megahertz, the first running frequency number is determined as 350, the ratio of the running core number to the total number of chip cores of the system chip is calculated as 0.6, and the product of 0.6 and the first running frequency number 350 is 210. The last character 0 of the modified string 210 is modified to the running core number 6, so that the running performance code is 216. If the running core number of the running performance point is 10, and the running frequency is 350 megahertz, the first running frequency number is determined as 350, the ratio of the running core number to the total number of chip cores of the system chip is calculated as 1, and the product of 1 and the first running frequency number 350 is 350. The modified string 350 is directly used as the running performance code by using 0 to represent the running core number 10.

[0044] That is, the last character of the running performance code directly represents the running core number, and when the total number of chip cores is between 1 and 10, the last bit of the running performance code is used to represent the running core number, and when the running core number is 10, 0 is used to represent it. By analogy, if the number of chip cores is between 1 and 100, the last two bits of the running performance code are used to represent the core number, and when the running core number is 100, 00 is used to represent it.

[0045] Specifically, the plurality of running resource parameters include a running core number, a preset cluster where the running core is located, and a preset position of the running core in the preset cluster, the base form corresponding to the plurality of running resource parameters includes a hexadecimal, and the running frequency number corresponding to the plurality of running resource parameters includes a second running frequency number, wherein the running performance code of the running performance point is obtained by: converting the second running frequency number into a first binary number in binary form, and converting the running core number into a second binary number in binary form; generating a third binary number corresponding to the preset cluster according to the total number of clusters of the system-on-chip and the preset cluster; generating a fourth binary number corresponding to the preset position according to the total number of cluster cores in a cluster and the preset position; combining the first binary number, the second binary number, the third binary number and the fourth binary number through a preset combination rule to obtain a to-be-converted binary number; and converting the to-be-converted binary number into hexadecimal to obtain the running performance code.

[0046] Wherein, the bit number of the third binary number is equal to the total number of clusters, each bit of the third binary number corresponds to a cluster, and the numerical value of each bit of the third binary number is used to indicate the working state of the cluster corresponding thereto; the bit number of the fourth binary number is equal to the total number of cluster cores, each bit of the fourth binary number corresponds to a core in the cluster, and the numerical value of each bit of the fourth binary number is used to indicate the working state of the core corresponding thereto.

[0047] Wherein, the preset combination rule combination is used to indicate the arrangement order of the first binary number, the second binary number, the third binary number and the fourth binary number.

[0048] That is, the first binary number directly represents the second running frequency number, and the second binary number directly represents the running core number. For example, the preset bit number of the running performance coding binary number is 32 bits, that is, the bit position of the running performance coding binary number is [31:0]. Moreover, since the first binary number indicates the running frequency of the running performance point, the bit number occupied by the first binary number in the preset bit number is not less than the bit number of the binary number of the maximum running frequency of all running performance points. For example, if the maximum running frequency of all running performance points is 1000 MHz, the second running frequency number is set to 1000, the binary number of 1000 is 1111101000, and the bit number is 10, the bit number occupied by the first binary number in the preset bit number should be at least 10, that is, at least 10 bits in 32 bits are used as the first binary number to represent the second running frequency number. Similarly, the bit number occupied by the second binary number in the preset bit number is not less than the bit number of the binary number of the total number of clusters. For example, if the total number of clusters is 10, the binary number of 10 is 1010, and the bit number is 4, the bit number occupied by the second binary number in the preset bit number should be at least 4, that is, at least 4 bits in 32 bits are used as the second binary number to represent the running core number.

[0049] For example, the running frequency number value in megahertz units is set to the second running frequency number by removing the lowest 0, so that when the running frequency is 350 MHz, the second running frequency number is set to 35, when the running frequency is 800 MHz, the second running frequency number is set to 80, and when the running frequency is 1000 MHz, the second running frequency number is set to 100. In this way, the bit number of the first binary can be reduced to prevent the bit number of the running performance coding binary number from exceeding the preset bit number.

[0050] The system-level chip includes a plurality of clusters, and each cluster includes a plurality of cores. The number of cores in each cluster is the same. The third binary number is used to indicate the preset cluster in which the running core number is located. The value of the third binary number does not directly indicate the code of the preset cluster, but each bit in the third binary number represents a cluster. If the value of the bit is 0, it means that the cluster corresponding to the bit is not in the working state. If the value of the bit is 1, it means that the cluster corresponding to the bit is in the working state. The fourth binary number is used to indicate the position of the preset cluster in which the running core number is located. The value of the fourth binary number does not directly indicate the code of the preset position, but each bit in the fourth binary number represents the position of a core in a cluster. If the value of the bit is 0, it means that the core corresponding to the bit in a cluster is not in the working state. If the value of the bit is 1, it means that the core corresponding to the bit in a cluster is in the working state.

[0051] For example, if the system-level chip includes 8 clusters (cluster 0 to cluster 7), each cluster includes 8 cores (core 0 to core 7), and the total number of chip cores of the system-level chip is 64, the bit number of the second binary number can represent 64 numbers, and the bit number of the second binary number can be set to 6. The minimum value represented by the binary number with 6 bits is 0, and the maximum value represented by the binary number with 6 bits is 63. When the number of running cores is 1, the second binary number can be directly 000001; when the number of running cores is 2, the second binary number can be directly 000010; when the number of running cores is 63, the second binary number can be directly 111111; and when the number of running cores is 64, the second binary number can be set to 000000. In addition, the bit number of the third binary number is 8, and the bit number of the fourth binary number is 8. The bit number of the third binary number from the highest bit to the lowest bit represents each cluster from high to low, that is, the highest bit of the third binary number represents cluster 7, and the lowest bit of the third binary number represents cluster 0. The bit number of the fourth binary number from the highest bit to the lowest bit represents each core from high to low, that is, the highest bit of the fourth binary number represents core 7, and the lowest bit of the fourth binary number represents core 0. In addition, the calculation method of the bit number of the first binary number is as follows: calculate the sum of the bit number of the second binary number, the bit number of the third binary number, and the bit number of the fourth binary number, and subtract the sum from the preset bit number to obtain the bit number of the first binary number, that is, 32-6-8-8=10, and the bit number of the first binary number is 10.

[0052] In addition, in the binary number of the running performance code, the bit position of the first binary number is [31:22], the bit position of the second binary number is [21:16], the bit position of the third binary number is [15:8], and the bit position of the fourth binary number is [7:0].

[0053] Alternatively, the first binary number is located at the head of the binary number to be converted, the fourth binary number is located at the tail of the binary number to be converted, the second binary number is located between the first binary number and the third binary number, and the third binary number is located between the second binary number and the fourth binary number. That is, the preset combination rule refers to arranging the first binary number, the second binary number, the third binary number, and the fourth binary number from left to right to obtain the binary number to be converted. In addition, the binary number to be converted is converted into hexadecimal, and the running performance code of the running performance point can be obtained.

[0054] For example, if the second running frequency number is 35, the first binary number is 0000100011, which can be simplified as 100011; if the running core of the running performance point is 8 cores of cluster 0, i.e., the running core number is 8, the second binary number is 001000; the third binary number is set as 00000001, i.e., the value of the bit number of the lowest bit of the third binary number is 1, which represents that only cluster 0 is in working state, and clusters 1 to 7 are not in working state; the fourth binary number is set as 11111111, i.e., the value of each bit number of the fourth binary number is 1, which represents that 8 cores of cluster 0 are used. Further, the to-be-converted binary number (10001100 1000000011 1111) of the running performance point is converted into hexadecimal to obtain the running performance code 0x8c801ff of the running performance point.

[0055] For example, if the second running frequency number is 35, the first binary number is 0000100011, which can be simplified as 100011; if the running core of the running performance point is 8 cores of cluster 0, i.e., the running core number is 8, the second binary number is 001000; the third binary number is set as 00000001, i.e., the value of the bit number of the lowest bit of the third binary number is 1, which represents that only cluster 0 is in working state, and clusters 1 to 7 are not in working state; the fourth binary number is set as 11111111, i.e., the value of each bit number of the fourth binary number is 1, which represents that 8 cores of cluster 0 are used. Further, the to-be-converted binary number (10001100 1000000011 1111) of the running performance point is converted into hexadecimal to obtain the running performance code 0x8c801ff of the running performance point.

[0056] For example, if the second running frequency number is 35, the first binary number is 0000100011, which can be simplified to 100011; if the running core of the running performance point is the first 4 cores of cluster 0 and the first 4 cores of cluster 1, i.e., the number of running cores is 8, the second binary number is 001000; the third binary number is set to 00000011, i.e., the value of the bit number of the lowest bit of the third binary number is 1, which represents that cluster 0 is used, the value of the bit number of the second last bit of the third binary number is 1, which represents that cluster 1 is used, and clusters cluster 2 to cluster 7 are not in working state; the fourth binary number is set to 00001111, and the value of the last four bit numbers of the fourth binary number is 1, which represents that the first 4 cores of clusters cluster 0 and cluster 1 are used, and other cores are not in working state. Further, the to-be-converted binary number (10001100 10000000 00110000 1111) of the running performance point is converted into hexadecimal to obtain the running performance code 0x8c8030f of the running performance point.

[0057] S103: For each running performance point, the current performance level of the running performance point is updated to the running performance code.

[0058] That is, the current performance level of the running performance point is replaced by the running performance code obtained by encoding according to the preset encoding rule of the present application. The working voltage, running frequency and power consumption of the running performance point remain unchanged.

[0059] For example, if the running resource parameter only selects the running core number, the total number of chip cores is 10, and the running frequency of each running performance point is 350 MHz. At this time, if the running core number of the running performance point is 2, the running frequency is 350 MHz, the working voltage is 850 mV, and the power consumption is 1500 mW, the encoding of the running performance point is modified to {level = 72, frequency = 350000, voltage = 850, power = 1500}, and thus the running performance encoding 72 is used to represent the case that 2 cores run at 350 MHz, the working voltage is 850 mV, and the power consumption is 1500 mW. If the running core number of the running performance point is 6, the running frequency is 350 MHz, the working voltage is 850 mV, and the power consumption is 3000 mW, the encoding of the running performance point is modified to {level = 216, frequency = 350000, voltage = 850, power = 3000}, and thus the running performance encoding 216 is used to represent the case that 6 cores run at 350 MHz, the working voltage is 850 mV, and the power consumption is 3000 mW. If the running core number of the running performance point is 10, the running frequency is 350 MHz, the working voltage is 850 mV, and the power consumption is 3000 mW, the encoding of the running performance point is modified to {level = 350, frequency = 350000, voltage = 850, power = 4000}, and thus the running performance encoding 350 is used to represent the case that 10 cores run at 350 MHz, the working voltage is 850 mV, and the power consumption is 4000 mW.

[0060] For example, if the running resource parameters include the running core number, the preset cluster and the preset location, the system-level chip includes 8 clusters (cluster0 to cluster7), each cluster includes 8 cores (core0 to core7), the total number of chip cores of the system-level chip is 64, and the running frequency of each running performance point is 350 MHz. If the running core of the running performance point is the 8 cores of the cluster cluster0, the running frequency is 350 MHz, the working voltage is 850 mV, and the power consumption is 1000 mW, the encoding of the running performance point is modified as {level=0x8c801ff, frequency=350000, voltage=850, power=1000}, so that the running performance encoding 0x8c801ff represents the case that the 8 cores of the cluster cluster0 run at 350 MHz, the working voltage is 850 mV, and the power consumption is 1000 mW. If the running core of the running performance point is the 8 cores of the cluster cluster4, the running frequency is 350 MHz, the working voltage is 850 mV, and the power consumption is 1000 mW, the encoding of the running performance point is modified as {level=0x8c810ff, frequency=350000, voltage=850, power=1000}, so that the running performance encoding 0x8c801ff represents the case that the 8 cores of the cluster cluster4 run at 350 MHz, the working voltage is 850 mV, and the power consumption is 1000 mW. If the running core of the running performance point is the first 4 cores of the cluster cluster0 and the first 4 cores of the cluster cluster1, the running frequency is 350 MHz, the working voltage is 850 mV, and the power consumption is 1200 mW, the encoding of the running performance point is modified as {level=0x8c8030f, frequency=350000, voltage=850, power=1200}, so that the running performance encoding 0x8c8030f represents the case that the first 4 cores of the cluster cluster0 and the first 4 cores of the cluster cluster1 run at 350 MHz, the working voltage is 850 mV, and the power consumption is 1200 mW.

[0061] For example, one running core number can correspond to multiple running performance points, and the distribution of running cores of each running performance point is different. For example, in the case of 8 running cores, one running performance point indicates that 8 cores of cluster 0 are in working state, and another running performance point indicates that 8 cores of cluster 1 are in working state. In this way, different core distributions can be used to achieve the same performance, thereby prolonging the service life of the chip. Alternatively, one running core number can correspond to one running performance point. For example, in the case of 8 running cores, only one running performance point indicates that 8 cores of cluster 0 are in working state. In the case of 16 running cores, only one running performance point indicates that 8 cores of cluster 0 and 8 cores of cluster 1 are in working state.

[0062] Furthermore, the application solves the problem of using a 32-bit running performance code to simultaneously transmit the running core number, the cluster in which the running core number is located, and the position in the cluster. The running performance code replaces the performance level of the running performance point in the prior art. Multiple running resource parameters can be transmitted by using only one message. This can reduce the number of messages transmitted between the Agent and the PM and reduce the delay of the PM switching the running performance point, thereby improving efficiency. Moreover, the PM can directly adjust the running frequency and working voltage of the running resource in working state indicated in the running performance code and control the power supply of the core not in working state to be disconnected. This does not require corresponding power management according to the power domain management protocol, thereby reducing the software design complexity of the IP core module and improving reliability. The PM can also provide different running core distributions by using different running performance codes at each startup for a specific performance level, thereby prolonging the service life of the chip.

[0063] Based on the same application concept, the application embodiment also provides a decoding method corresponding to the encoding method of the performance level provided in the above embodiment. Since the decoding method in the application embodiment has a similar problem-solving principle to the encoding method of the above embodiment, the implementation of the decoding method can be referred to the implementation of the encoding method, and the repeated parts will not be described again.

[0064] The application embodiment also provides a decoding method of a performance level. The decoding method uses the running performance code obtained by the encoding method described in the above embodiment. The decoding method includes: receiving the running performance code of the current performance level of the system-on-chip; and decoding the running performance code according to a preset decoding rule to obtain the running resource parameter used by the system-on-chip when running at a target running performance point. The preset decoding rule is the inverse decoding rule corresponding to the preset encoding rule, and the target running performance point is one of the multiple running performance points of the system-on-chip.

[0065] That is, after receiving the running performance code, if the preset encoding rule of the running performance code indicates that one running performance parameter and the running power are encoded, the preset decoding rule decodes the running performance code according to the corresponding binary form of the one running performance parameter to deduce the one running performance parameter indicated in the running performance code; if the preset encoding rule of the running performance code indicates that multiple running performance parameters and the running power are encoded, the preset decoding rule decodes the running performance code according to the corresponding binary form of the multiple running performance parameters to deduce the multiple running performance parameters indicated in the running performance code.

[0066] For example, if the preset encoding rule corresponds to one running performance parameter, and the received running performance code is 216, it is known from the lowest character of the running performance code that the running core number of the running performance point indicated by the running performance code is 6. If the preset encoding rule corresponds to multiple running performance parameters, and the received running performance code is 0x8c801ff, 0x8c801ff is converted into a binary number 1000 1100 1000 0000 0001 1111 1111, the last 8 bits represent the fourth binary number 1111 1111, the bit position [15:8] of the running performance code represents the third binary number 00000001, the bit position [21:16] of the running performance code represents the second binary number 001000, and the other bits of the running performance code represent the first binary number 1000 11. Therefore, it is known that the running core number of the running performance point indicated by the running performance code is 8, and it refers to 8 cores of cluster0, and the running frequency is 350 megahertz. Further, the decoding process can be directly deduced in the case of clear encoding form, and the present application will not be repeated.

[0067] Based on the same application concept, the present embodiment also provides a system-on-chip corresponding to the encoding method and the decoding method provided in the above embodiment. Since the system-on-chip in the present embodiment has a similar principle to the encoding method and the decoding method of the above embodiment, the implementation of the system-on-chip can be referred to the implementation of the method, and the repeated parts will not be repeated.

[0068] Please refer to Figure 2 , Figure 2A structural schematic diagram of a system on chip is provided in the embodiments of the present application. The system on chip 10 provided in the embodiments of the present application comprises a platform controller PM configured to perform the steps of the encoding method as described in the above embodiments and to generate a running performance signal corresponding to each running performance point, wherein the running performance signal comprises the running performance encoding of the running performance point; and an agent Agent configured to receive the running performance signal and perform the steps of the decoding method as described in the above embodiments.

[0069] That is, the platform controller sends the running performance signal containing the running performance encoding of the running performance point to the agent, and the agent decodes the running performance encoding in the running performance signal according to the inverse decoding manner of the preset encoding rule, so that the agent explicitly indicates the running core number of the running performance point or explicitly indicates the running core number of the running performance point, the preset cluster where the running core is located and the preset position of the running core in the preset cluster.

[0070] Based on the same application concept, the embodiments of the present application further provide a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program is run by a processor to perform the steps of the encoding method or the decoding method provided in the above embodiments.

[0071] Specifically, the storage medium can be a general storage medium such as a mobile disk, a hard disk, etc., and the computer program on the storage medium can be run to perform the above encoding method or decoding method, to encode the running resource parameter and the running frequency of each running performance point by using the preset encoding rule, to obtain the running performance encoding of each running performance point, and to replace the current performance level with the running performance encoding, so that the running performance encoding can cover the running resource parameter and the running frequency, thereby solving the technical problem of low efficiency of selecting the actual running running performance point caused by high communication frequency in the prior art, and achieving the technical effects of reducing the communication frequency and improving the selection efficiency of the running performance point.

[0072] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system and device described above can refer to the corresponding process in the foregoing method embodiment, and will not be repeated here. In several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented in other ways. The device embodiments described above are only schematic, for example, the division of the units is only a logical function division, and there can be another division manner in actual implementation, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some communication interfaces, devices or units, and can be electrical, mechanical or other forms.

[0073] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, i.e., can be located in one place or distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.

[0074] In addition, the functional units in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit.

[0075] If the functions are realized in the form of software function units and sold or used as independent products, they can be stored in a non-volatile computer readable storage medium executable by a processor. Based on this understanding, the technical solutions of the present application or the essential part or part of the prior art can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The foregoing storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk, and various program code storage media.

[0076] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think of changes or replacements within the technical scope disclosed in the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A method of encoding a performance level, characterized by, The encoding method comprises: obtaining running resource parameters used by a system-on-chip when running at a plurality of running performance points respectively and current performance levels of the running performance points, the current performance level being used to indicate a running frequency of each running performance point; for each running performance point, encoding the running resource parameters and the running frequency of the running performance point according to a preset encoding rule to obtain a running performance encoding of the running performance point; for each running performance point, updating the current performance level of the running performance point to the running performance encoding; the running resource parameters comprise one or more, and the preset encoding rule comprises limiting a radix form of the running performance encoding according to a quantity of the running resource parameters and modifying a bit number of the running frequency to obtain a running frequency number, wherein one running resource parameter and a plurality of running resource parameters correspond to different radix forms respectively; one running resource parameter comprises a running core number, the radix form corresponding to one running resource parameter comprises a decimal form, and the running frequency number corresponding to one running resource parameter comprises a first running frequency number, wherein the running performance encoding of the running performance point is obtained by the following manner: calculating a ratio of the running core number of the running performance point to a total number of chip cores of the system-on-chip, the running core number and the total number of chip cores being in a decimal form; calculating a product of the ratio and the first running frequency number to obtain a to-be-modified string; modifying a last character of the to-be-modified string according to the running core number to obtain the running performance encoding.

2. The encoding method of claim 1, wherein, the plurality of running resource parameters comprise a running core number, a preset cluster in which a running core is located, and a preset position of the running core in the preset cluster, the radix form corresponding to the plurality of running resource parameters comprises a hexadecimal form, and the running frequency number corresponding to the plurality of running resource parameters comprises a second running frequency number, wherein the running performance encoding of the running performance point is obtained by the following manner: converting the second running frequency number into a first binary number in a binary form and converting the running core number into a second binary number in a binary form; generating a third binary number corresponding to the preset cluster according to a total number of clusters of the system-on-chip and the preset cluster; generating a fourth binary number corresponding to the preset position according to a total number of cluster cores in one cluster and the preset position; combining the first binary number, the second binary number, the third binary number, and the fourth binary number through a preset combination rule to obtain a to-be-converted binary number; converting the to-be-converted binary number into a hexadecimal form to obtain the running performance encoding.

3. The encoding method of claim 2, wherein, a bit number of the third binary number is equal to the total number of clusters, each bit of the third binary number corresponds to one cluster, and a numerical value of each bit of the third binary number is used to indicate a working state of the cluster corresponding to the bit. The fourth binary number has the same number of bits as the total number of cluster cores, each bit of the fourth binary number corresponds to a core in a cluster, and the value of each bit of the fourth binary number indicates the working state of the corresponding core.

4. The encoding method of claim 2, wherein, The preset combination rule is used to indicate the arrangement order of the first binary number, the second binary number, the third binary number and the fourth binary number.

5. The encoding method of claim 1, wherein, The preset bit number of the running performance code depends on the bit number limited by the system control and management interface protocol, and the preset bit number corresponding to one running resource parameter and multiple running resource parameters is the same.

6. A decoding method of a performance level, characterized by, The decoding method applies the running performance code obtained by the encoding method in any one of claims 1 to 5, and the decoding method comprises: receiving the running performance code of the current performance level of the system on chip; decoding the running performance code according to a preset decoding rule to obtain a running resource parameter used by the system on chip when running at a target running performance point, wherein the preset decoding rule is an inverse decoding rule corresponding to the preset encoding rule, and the target running performance point is one of multiple running performance points of the system on chip.

7. A system on chip, comprising: The system on chip comprises: a platform controller configured to perform the steps of the encoding method in any one of claims 1 to 5 and generate a running performance signal corresponding to each running performance point, wherein the running performance signal comprises the running performance code of the running performance point; an agent configured to receive the running performance signal and perform the steps of the decoding method in claim 6.

8. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program is run by a processor to perform the steps of the encoding method in any one of claims 1 to 5 or the steps of the decoding method in claim 6.

Citation Information

Patent Citations

  • Memory-system resource partitioning and monitoring (MPAM) configuration using secure processor

    US20250045467A1